Changeset 590ce352 in mainline
- Timestamp:
- 2012-03-07T21:07:55Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 13be128d
- Parents:
- b8e56d9b
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/beagleboardxm/beagleboardxm.c
rb8e56d9b r590ce352 37 37 #include <genarch/drivers/amdm37x_irc/amdm37x_irc.h> 38 38 #include <genarch/drivers/amdm37x_uart/amdm37x_uart.h> 39 #include <genarch/drivers/amdm37x_gpt/amdm37x_gpt.h> 39 40 #include <interrupt.h> 40 41 #include <mm/km.h> … … 59 60 amdm37x_irc_regs_t *irc_addr; 60 61 amdm37x_uart_t uart; 62 amdm37x_gpt_t timer; 61 63 } beagleboard; 62 64 63 65 struct arm_machine_ops bbxm_machine_ops = { 64 bbxm_init,65 bbxm_timer_irq_start,66 bbxm_cpu_halt,67 bbxm_get_memory_extents,68 bbxm_irq_exception,69 bbxm_frame_init,70 bbxm_output_init,71 bbxm_input_init,72 bbxm_get_irq_count,73 bbxm_get_platform_name66 .machine_init = bbxm_init, 67 .machine_timer_irq_start = bbxm_timer_irq_start, 68 .machine_cpu_halt = bbxm_cpu_halt, 69 .machine_get_memory_extents = bbxm_get_memory_extents, 70 .machine_irq_exception = bbxm_irq_exception, 71 .machine_frame_init = bbxm_frame_init, 72 .machine_output_init = bbxm_output_init, 73 .machine_input_init = bbxm_input_init, 74 .machine_get_irq_count = bbxm_get_irq_count, 75 .machine_get_platform_name = bbxm_get_platform_name 74 76 }; 75 77 … … 98 100 amdm37x_irc_init(beagleboard.irc_addr); 99 101 100 //initialize timer here 102 // TODO: setup 32kHz clock source for timer1 103 104 /* Initialize timer, pick timer1, beacues it is in always power domain 105 * and has special capabilities for regular ticks */ 106 amdm37x_gpt_timer_ticks_init(&beagleboard.timer, 107 AMDM37x_GPT1_BASE_ADDRESS, AMDM37x_GPT1_SIZE, 100); 101 108 } 102 109 … … 107 114 irq_initialize(&timer_irq); 108 115 timer_irq.devno = device_assign_devno(); 109 timer_irq.inr = 0;//BB_TIMER_IRQ;116 timer_irq.inr = AMDM37x_GPT1_IRQ; 110 117 timer_irq.claim = bb_timer_irq_claim; 111 118 timer_irq.handler = bb_timer_irq_handler; 112 119 irq_register(&timer_irq); 113 // start timer here 120 121 /* Start timer here */ 122 amdm37x_gpt_timer_ticks_start(&beagleboard.timer); 114 123 } 115 124 116 125 static void bbxm_cpu_halt(void) 117 126 { 127 while (1); 118 128 } 119 129 … … 125 135 static void bbxm_get_memory_extents(uintptr_t *start, size_t *size) 126 136 { 127 // FIXME: This is just a guess...128 137 *start = BBXM_MEMORY_START; 129 138 *size = BBXM_MEMORY_SIZE; … … 156 165 #error "Frame buffer is not yet supported!" 157 166 #endif 158 159 167 /* UART3 is wired to external RS232 connector */ 160 168 const bool ok = amdm37x_uart_init(&beagleboard.uart,
Note:
See TracChangeset
for help on using the changeset viewer.