Changes in kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c [a14f346:3c9646b] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
ra14f346 r3c9646b 35 35 #include <arch/exception.h> 36 36 #include <arch/mach/beagleboardxm/beagleboardxm.h> 37 #include <genarch/drivers/amdm37x _irc/amdm37x_irc.h>38 #include <genarch/drivers/amdm37x _uart/amdm37x_uart.h>39 #include <genarch/drivers/amdm37x _gpt/amdm37x_gpt.h>37 #include <genarch/drivers/amdm37x/uart.h> 38 #include <genarch/drivers/amdm37x/irc.h> 39 #include <genarch/drivers/amdm37x/gpt.h> 40 40 #include <genarch/fb/fb.h> 41 41 #include <genarch/srln/srln.h> … … 60 60 61 61 static struct beagleboard { 62 amdm37x_irc_regs_t *irc_addr;63 amdm37x_uart_t uart;62 omap_irc_regs_t *irc_addr; 63 omap_uart_t uart; 64 64 amdm37x_gpt_t timer; 65 65 } beagleboard; … … 85 85 static void bb_timer_irq_handler(irq_t *irq) 86 86 { 87 amdm37x_gpt_irq_ack(&beagleboard.timer); 88 87 89 /* 88 90 * We are holding a lock which prevents preemption. 89 91 * Release the lock, call clock() and reacquire the lock again. 90 92 */ 91 amdm37x_gpt_irq_ack(&beagleboard.timer);92 93 spinlock_unlock(&irq->lock); 93 94 clock(); … … 102 103 PAGE_NOT_CACHEABLE); 103 104 ASSERT(beagleboard.irc_addr); 104 amdm37x_irc_init(beagleboard.irc_addr);105 omap_irc_init(beagleboard.irc_addr); 105 106 106 107 /* Initialize timer. Use timer1, because it is in WKUP power domain … … 122 123 123 124 /* Enable timer interrupt */ 124 amdm37x_irc_enable(beagleboard.irc_addr, AMDM37x_GPT1_IRQ);125 omap_irc_enable(beagleboard.irc_addr, AMDM37x_GPT1_IRQ); 125 126 126 127 /* Start timer here */ … … 146 147 static void bbxm_irq_exception(unsigned int exc_no, istate_t *istate) 147 148 { 148 const unsigned inum = amdm37x_irc_inum_get(beagleboard.irc_addr); 149 amdm37x_irc_irq_ack(beagleboard.irc_addr); 149 const unsigned inum = omap_irc_inum_get(beagleboard.irc_addr); 150 150 151 151 irq_t *irq = irq_dispatch_and_lock(inum); … … 159 159 CPU->id, inum); 160 160 } 161 /** amdm37x manual ch. 12.5.2 (p. 2428) places irc ack at the end 162 * of ISR. DO this to avoid strange behavior. */ 163 omap_irc_irq_ack(beagleboard.irc_addr); 161 164 } 162 165 … … 167 170 static void bbxm_output_init(void) 168 171 { 172 #ifdef CONFIG_OMAP_UART 169 173 /* UART3 is wired to external RS232 connector */ 170 const bool ok = amdm37x_uart_init(&beagleboard.uart,174 const bool ok = omap_uart_init(&beagleboard.uart, 171 175 AMDM37x_UART3_IRQ, AMDM37x_UART3_BASE_ADDRESS, AMDM37x_UART3_SIZE); 172 176 if (ok) { 173 177 stdout_wire(&beagleboard.uart.outdev); 174 178 } 179 #endif 175 180 } 176 181 177 182 static void bbxm_input_init(void) 178 183 { 184 #ifdef CONFIG_OMAP_UART 179 185 srln_instance_t *srln_instance = srln_init(); 180 186 if (srln_instance) { 181 187 indev_t *sink = stdin_wire(); 182 188 indev_t *srln = srln_wire(srln_instance, sink); 183 amdm37x_uart_input_wire(&beagleboard.uart, srln);184 amdm37x_irc_enable(beagleboard.irc_addr, AMDM37x_UART3_IRQ);189 omap_uart_input_wire(&beagleboard.uart, srln); 190 omap_irc_enable(beagleboard.irc_addr, AMDM37x_UART3_IRQ); 185 191 } 192 #endif 186 193 } 187 194
Note:
See TracChangeset
for help on using the changeset viewer.