X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=board%2Fmotionpro%2Fmotionpro.c;h=6eb5fe9cfc9950a914e9ebfad3d274a9cc701e6a;hb=98c440bee623ecdd5322852732b883e696fb2140;hp=b05e2ab1cdb851d75a20396d50feb8824f7fa148;hpb=c00125e07c1ebc125bab40e1e18bceed8be0c162;p=oweals%2Fu-boot.git diff --git a/board/motionpro/motionpro.c b/board/motionpro/motionpro.c index b05e2ab1cd..6eb5fe9cfc 100644 --- a/board/motionpro/motionpro.c +++ b/board/motionpro/motionpro.c @@ -102,7 +102,7 @@ void reset_phy(void) /* * Helper function to initialize SDRAM controller. */ -static void sdram_start (int hi_addr) +static void sdram_start(int hi_addr) { long hi_addr_bit = hi_addr ? 0x01000000 : 0; @@ -134,7 +134,7 @@ static void sdram_start (int hi_addr) /* * Initalize SDRAM - configure SDRAM controller, detect memory size. */ -long int initdram (int board_type) +long int initdram(int board_type) { ulong dramsize = 0; #ifndef CFG_RAMBOOT @@ -164,11 +164,12 @@ long int initdram (int board_type) dramsize = 0; /* set SDRAM CS0 size according to the amount of RAM found */ - if (dramsize > 0) + if (dramsize > 0) { *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0x13 + __builtin_ffs(dramsize >> 20) - 1; - else + } else { *(vu_long *)MPC5XXX_SDRAM_CS0CFG = 0; /* disabled */ + } /* let SDRAM CS1 start right after CS0 and disable it */ *(vu_long *) MPC5XXX_SDRAM_CS1CFG = dramsize; @@ -187,7 +188,7 @@ long int initdram (int board_type) } -int checkboard (void) +int checkboard(void) { uchar rev = *(vu_char *)CPLD_REV_REGISTER; printf("Board: Promess Motion-PRO board (CPLD rev. 0x%02x)\n", rev); @@ -204,7 +205,7 @@ void ft_board_setup(void *blob, bd_t *bd) #if defined(CONFIG_STATUS_LED) -void __led_init (led_id_t regaddr, int state) +void __led_init(led_id_t regaddr, int state) { *((vu_long *) regaddr) |= ENABLE_GPIO_OUT; @@ -214,7 +215,7 @@ void __led_init (led_id_t regaddr, int state) *((vu_long *) regaddr) &= ~LED_ON; } -void __led_set (led_id_t regaddr, int state) +void __led_set(led_id_t regaddr, int state) { if (state == STATUS_LED_ON) *((vu_long *) regaddr) |= LED_ON; @@ -222,7 +223,7 @@ void __led_set (led_id_t regaddr, int state) *((vu_long *) regaddr) &= ~LED_ON; } -void __led_toggle (led_id_t regaddr) +void __led_toggle(led_id_t regaddr) { *((vu_long *) regaddr) ^= LED_ON; }