Changeset 6f07226 in mainline for kernel/arch/arm32/src/mach/beaglebone/beaglebone.c
- Timestamp:
- 2012-10-14T15:49:23Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 5de9ff9
- Parents:
- 42f2a45
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/beaglebone/beaglebone.c
r42f2a45 r6f07226 37 37 #include <genarch/drivers/am335x/irc.h> 38 38 #include <genarch/drivers/am335x/uart.h> 39 #include <genarch/drivers/am335x/timer.h> 39 40 #include <genarch/srln/srln.h> 40 41 #include <interrupt.h> … … 56 57 static struct beaglebone { 57 58 am335x_irc_regs_t *irc_addr; 59 am335x_timer_t timer; 58 60 am335x_uart_t uart; 59 61 } bbone; … … 81 83 } 82 84 85 static irq_ownership_t bbone_timer_irq_claim(irq_t *irq) 86 { 87 return IRQ_ACCEPT; 88 } 89 90 static void bbone_timer_irq_handler(irq_t *irq) 91 { 92 am335x_timer_intr_ack(&bbone.timer); 93 spinlock_unlock(&irq->lock); 94 clock(); 95 spinlock_lock(&irq->lock); 96 } 97 83 98 static void bbone_timer_irq_start(void) 84 99 { 100 /* Initialize the IRQ */ 101 static irq_t timer_irq; 102 irq_initialize(&timer_irq); 103 timer_irq.devno = device_assign_devno(); 104 timer_irq.inr = AM335x_DMTIMER0_IRQ; 105 timer_irq.claim = bbone_timer_irq_claim; 106 timer_irq.handler = bbone_timer_irq_handler; 107 irq_register(&timer_irq); 108 109 /* Initialize the DMTIMER0 */ 110 am335x_timer_init(&bbone.timer, DMTIMER0, HZ); 111 /* Enable the interrupt */ 112 am335x_irc_enable(bbone.irc_addr, AM335x_DMTIMER0_IRQ); 113 /* Start the timer */ 114 am335x_timer_start(&bbone.timer); 85 115 } 86 116 87 117 static void bbone_cpu_halt(void) 88 118 { 119 while (1); 89 120 } 90 121
Note:
See TracChangeset
for help on using the changeset viewer.