Changeset d701672 in mainline


Ignore:
Timestamp:
2016-09-20T08:49:48Z (8 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
38097a43
Parents:
b30846e
Message:

Fix cstyle

File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/mach/integratorcp/integratorcp.c

    rb30846e rd701672  
    5555
    5656
    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]
    5959
    6060static struct {
     
    6363        pl011_uart_t uart;
    6464} icp;
    65 
    66 
    6765
    6866struct arm_machine_ops icp_machine_ops = {
     
    9896void icp_vga_init(void)
    9997{
    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;
    108106       
    109107}
     
    114112        return *((uint32_t *) icp.hw_map.irqc);
    115113}
    116 
    117114
    118115/** Masks interrupt.
     
    173170{
    174171        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;
    178175        icp_irqc_unmask(ICP_TIMER_IRQ);
    179176}
     
    182179{
    183180        if (icp.hw_map.rtc1_intrstat) {
    184                 *((uint32_t*) icp.hw_map.rtc1_intrclr) = 1;
     181                *((uint32_t *) icp.hw_map.rtc1_intrclr) = 1;
    185182                return IRQ_ACCEPT;
    186183        } else
     
    218215}
    219216
    220 
    221217/** Starts timer.
    222218 *
     
    240236
    241237        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];
    244240        } else {
    245241                *size = SDRAM_SIZE;
     
    325321
    326322        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;
    330326               
    331327        pl050_instance_t *pl050_instance = pl050_init(pl050, ICP_KBD_IRQ);
     
    347343        sysinfo_set_item_val("kbd", NULL, true);
    348344        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);
    351346
    352347#ifdef CONFIG_PL011_UART
Note: See TracChangeset for help on using the changeset viewer.