Changeset 0fb70e1 in mainline for kernel/arch/arm32/src/mach/beaglebone/beaglebone.c
- Timestamp:
- 2012-10-09T21:31:38Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 954b6458
- Parents:
- a829a5b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/beaglebone/beaglebone.c
ra829a5b r0fb70e1 35 35 #include <arch/exception.h> 36 36 #include <arch/mach/beaglebone/beaglebone.h> 37 #include <genarch/drivers/am335x_irc/am335x_irc.h> 37 #include <genarch/drivers/am335x/irc.h> 38 #include <genarch/drivers/am335x/uart.h> 39 #include <genarch/srln/srln.h> 38 40 #include <interrupt.h> 39 41 #include <ddi/ddi.h> … … 54 56 static struct beaglebone { 55 57 am335x_irc_regs_t *irc_addr; 58 am335x_uart_t uart; 56 59 } bbone; 57 60 58 61 struct arm_machine_ops bbone_machine_ops = { 59 bbone_init,60 bbone_timer_irq_start,61 bbone_cpu_halt,62 bbone_get_memory_extents,63 bbone_irq_exception,64 bbone_frame_init,65 bbone_output_init,66 bbone_input_init,67 bbone_get_irq_count,68 bbone_get_platform_name62 .machine_init = bbone_init, 63 .machine_timer_irq_start = bbone_timer_irq_start, 64 .machine_cpu_halt = bbone_cpu_halt, 65 .machine_get_memory_extents = bbone_get_memory_extents, 66 .machine_irq_exception = bbone_irq_exception, 67 .machine_frame_init = bbone_frame_init, 68 .machine_output_init = bbone_output_init, 69 .machine_input_init = bbone_input_init, 70 .machine_get_irq_count = bbone_get_irq_count, 71 .machine_get_platform_name = bbone_get_platform_name, 69 72 }; 70 73 … … 105 108 static void bbone_output_init(void) 106 109 { 110 const bool ok = am335x_uart_init(&bbone.uart, 111 AM335x_UART0_IRQ, AM335x_UART0_BASE_ADDRESS, 112 AM335x_UART0_SIZE); 113 114 if (ok) 115 stdout_wire(&bbone.uart.outdev); 107 116 } 108 117 109 118 static void bbone_input_init(void) 110 119 { 120 srln_instance_t *srln_instance = srln_init(); 121 if (srln_instance) { 122 indev_t *sink = stdin_wire(); 123 indev_t *srln = srln_wire(srln_instance, sink); 124 am335x_uart_input_wire(&bbone.uart, srln); 125 am335x_irc_enable(bbone.irc_addr, AM335x_UART0_IRQ); 126 } 111 127 } 112 128 113 129 size_t bbone_get_irq_count(void) 114 130 { 115 return 0;131 return AM335x_IRC_IRQ_COUNT; 116 132 } 117 133
Note:
See TracChangeset
for help on using the changeset viewer.