Changeset 6843a9c in mainline for kernel/arch/arm32/src/mach/testarm/testarm.c
- Timestamp:
- 2012-06-29T13:02:14Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 722912e
- Parents:
- ba72f2b (diff), 0bbd13e (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
kernel/arch/arm32/src/mach/testarm/testarm.c (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/testarm/testarm.c
rba72f2b r6843a9c 37 37 #include <arch/mach/testarm/testarm.h> 38 38 #include <mm/page.h> 39 #include <mm/km.h> 39 40 #include <genarch/fb/fb.h> 40 41 #include <abi/fb/visuals.h> … … 71 72 void gxemul_init(void) 72 73 { 73 gxemul_kbd = (void *) hw_map(GXEMUL_KBD_ADDRESS, PAGE_SIZE); 74 gxemul_rtc = (void *) hw_map(GXEMUL_RTC_ADDRESS, PAGE_SIZE); 75 gxemul_irqc = (void *) hw_map(GXEMUL_IRQC_ADDRESS, PAGE_SIZE); 74 gxemul_kbd = (void *) km_map(GXEMUL_KBD_ADDRESS, PAGE_SIZE, 75 PAGE_WRITE | PAGE_NOT_CACHEABLE); 76 gxemul_rtc = (void *) km_map(GXEMUL_RTC_ADDRESS, PAGE_SIZE, 77 PAGE_WRITE | PAGE_NOT_CACHEABLE); 78 gxemul_irqc = (void *) km_map(GXEMUL_IRQC_ADDRESS, PAGE_SIZE, 79 PAGE_WRITE | PAGE_NOT_CACHEABLE); 76 80 } 77 81 … … 117 121 } 118 122 } 119 123 120 124 /* 121 125 * This is the necessary evil until the userspace driver is entirely … … 124 128 sysinfo_set_item_val("kbd", NULL, true); 125 129 sysinfo_set_item_val("kbd.inr", NULL, GXEMUL_KBD_IRQ); 126 sysinfo_set_item_val("kbd.address.virtual", NULL, (sysarg_t) gxemul_kbd); 130 sysinfo_set_item_val("kbd.address.physical", NULL, 131 GXEMUL_KBD_ADDRESS); 127 132 #endif 128 133 } … … 167 172 clock(); 168 173 spinlock_lock(&irq->lock); 169 174 170 175 /* acknowledge tick */ 171 176 *((uint32_t *) (gxemul_rtc + GXEMUL_RTC_ACK_OFFSET)) … … 176 181 static void gxemul_timer_irq_init(void) 177 182 { 178 irq_initialize(&gxemul_timer_irq);179 gxemul_timer_irq.devno = device_assign_devno();180 gxemul_timer_irq.inr = GXEMUL_TIMER_IRQ;181 gxemul_timer_irq.claim = gxemul_timer_claim;182 gxemul_timer_irq.handler = gxemul_timer_irq_handler;183 184 irq_register(&gxemul_timer_irq);183 irq_initialize(&gxemul_timer_irq); 184 gxemul_timer_irq.devno = device_assign_devno(); 185 gxemul_timer_irq.inr = GXEMUL_TIMER_IRQ; 186 gxemul_timer_irq.claim = gxemul_timer_claim; 187 gxemul_timer_irq.handler = gxemul_timer_irq_handler; 188 189 irq_register(&gxemul_timer_irq); 185 190 } 186 191 … … 193 198 void gxemul_timer_irq_start(void) 194 199 { 195 gxemul_timer_irq_init();196 gxemul_timer_start(GXEMUL_TIMER_FREQ);200 gxemul_timer_irq_init(); 201 gxemul_timer_start(GXEMUL_TIMER_FREQ); 197 202 } 198 203 … … 202 207 * @param size Place to store memory size. 203 208 */ 204 void gxemul_get_memory_extents(uintptr_t *start, uintptr_t *size)209 void gxemul_get_memory_extents(uintptr_t *start, size_t *size) 205 210 { 206 211 *start = 0; 207 *size = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET));212 *size = *((uintptr_t *) (GXEMUL_MP_ADDRESS + GXEMUL_MP_MEMSIZE_OFFSET)); 208 213 } 209 214 … … 222 227 uint32_t sources = gxemul_irqc_get_sources(); 223 228 unsigned int i; 224 229 225 230 for (i = 0; i < GXEMUL_IRQ_COUNT; i++) { 226 231 if (sources & (1 << i)) {
Note:
See TracChangeset
for help on using the changeset viewer.
