Changeset d701672 in mainline
- Timestamp:
- 2016-09-20T08:49:48Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 38097a43
- Parents:
- b30846e
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/arm32/src/mach/integratorcp/integratorcp.c
rb30846e rd701672 55 55 56 56 57 58 #define SDRAM_SIZE (sdram[((*(uint32_t *)(ICP_CMCR+ICP_SDRAMCR_OFFSET) & ICP_SDRAM_MASK) >> 2)]) 57 #define SDRAM_SIZE \ 58 sdram[(*(uint32_t *) (ICP_CMCR + ICP_SDRAMCR_OFFSET) & ICP_SDRAM_MASK) >> 2] 59 59 60 60 static struct { … … 63 63 pl011_uart_t uart; 64 64 } icp; 65 66 67 65 68 66 struct arm_machine_ops icp_machine_ops = { … … 98 96 void icp_vga_init(void) 99 97 { 100 *(uint32_t *)((char *)(icp.hw_map.cmcr)+0x14) = 0xA05F0000;101 *(uint32_t *)((char *)(icp.hw_map.cmcr)+0x1C) = 0x12C11000;102 *(uint32_t *)icp.hw_map.vga = 0x3F1F3F9C;103 *(uint32_t *)((char *)(icp.hw_map.vga) + 0x4) = 0x080B61DF;104 *(uint32_t *)((char *)(icp.hw_map.vga) + 0x8) = 0x067F3800;105 *(uint32_t *)((char *)(icp.hw_map.vga) + 0x10) = ICP_FB;106 *(uint32_t *) ((char *)(icp.hw_map.vga) + 0x1C) = 0x182B;107 *(uint32_t *)((char *)(icp.hw_map.cmcr)+0xC) = 0x33805000;98 *(uint32_t *) ((char *)(icp.hw_map.cmcr) + 0x14) = 0xA05F0000; 99 *(uint32_t *) ((char *)(icp.hw_map.cmcr) + 0x1C) = 0x12C11000; 100 *(uint32_t *) icp.hw_map.vga = 0x3F1F3F9C; 101 *(uint32_t *) ((char *)(icp.hw_map.vga) + 0x4) = 0x080B61DF; 102 *(uint32_t *) ((char *)(icp.hw_map.vga) + 0x8) = 0x067F3800; 103 *(uint32_t *) ((char *)(icp.hw_map.vga) + 0x10) = ICP_FB; 104 *(uint32_t *) ((char *)(icp.hw_map.vga) + 0x1C) = 0x182B; 105 *(uint32_t *) ((char *)(icp.hw_map.cmcr) + 0xC) = 0x33805000; 108 106 109 107 } … … 114 112 return *((uint32_t *) icp.hw_map.irqc); 115 113 } 116 117 114 118 115 /** Masks interrupt. … … 173 170 { 174 171 icp_irqc_mask(ICP_TIMER_IRQ); 175 *((uint32_t *) icp.hw_map.rtc1_load) = frequency;176 *((uint32_t *) icp.hw_map.rtc1_bgload) = frequency;177 *((uint32_t *) icp.hw_map.rtc1_ctl) = ICP_RTC_CTL_VALUE;172 *((uint32_t *) icp.hw_map.rtc1_load) = frequency; 173 *((uint32_t *) icp.hw_map.rtc1_bgload) = frequency; 174 *((uint32_t *) icp.hw_map.rtc1_ctl) = ICP_RTC_CTL_VALUE; 178 175 icp_irqc_unmask(ICP_TIMER_IRQ); 179 176 } … … 182 179 { 183 180 if (icp.hw_map.rtc1_intrstat) { 184 *((uint32_t *) icp.hw_map.rtc1_intrclr) = 1;181 *((uint32_t *) icp.hw_map.rtc1_intrclr) = 1; 185 182 return IRQ_ACCEPT; 186 183 } else … … 218 215 } 219 216 220 221 217 /** Starts timer. 222 218 * … … 240 236 241 237 if (hw_map_init_called) { 242 *size = (sdram[((*(uint32_t *)icp.hw_map.sdramcr &243 ICP_SDRAM_MASK) >> 2 )]);238 *size = sdram[(*(uint32_t *) icp.hw_map.sdramcr & 239 ICP_SDRAM_MASK) >> 2]; 244 240 } else { 245 241 *size = SDRAM_SIZE; … … 325 321 326 322 pl050_t *pl050 = malloc(sizeof(pl050_t), FRAME_ATOMIC); 327 pl050->status = (ioport8_t *) icp.hw_map.kbd_stat;328 pl050->data = (ioport8_t *) icp.hw_map.kbd_data;329 pl050->ctrl = (ioport8_t *) icp.hw_map.kbd_ctrl;323 pl050->status = (ioport8_t *) icp.hw_map.kbd_stat; 324 pl050->data = (ioport8_t *) icp.hw_map.kbd_data; 325 pl050->ctrl = (ioport8_t *) icp.hw_map.kbd_ctrl; 330 326 331 327 pl050_instance_t *pl050_instance = pl050_init(pl050, ICP_KBD_IRQ); … … 347 343 sysinfo_set_item_val("kbd", NULL, true); 348 344 sysinfo_set_item_val("kbd.inr", NULL, ICP_KBD_IRQ); 349 sysinfo_set_item_val("kbd.address.physical", NULL, 350 ICP_KBD); 345 sysinfo_set_item_val("kbd.address.physical", NULL, ICP_KBD); 351 346 352 347 #ifdef CONFIG_PL011_UART
Note:
See TracChangeset
for help on using the changeset viewer.