mirror of
https://github.com/Stichting-MINIX-Research-Foundation/u-boot.git
synced 2025-09-16 23:47:49 -04:00
cosmetic: arm: lib/board.c: Coding Style cleanup
Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Detlev Zundel <dzu@denx.de> cc: Albert Aribaud <albert.u.boot@aribaud.net> cc: <macpaul@gmail.com> cc: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
d388298a59
commit
ceb1d6d75e
@ -84,26 +84,28 @@ extern void rtl8019_get_enetaddr (uchar * addr);
|
|||||||
************************************************************************
|
************************************************************************
|
||||||
* May be supplied by boards if desired
|
* May be supplied by boards if desired
|
||||||
*/
|
*/
|
||||||
void inline __coloured_LED_init (void) {}
|
inline void __coloured_LED_init(void) {}
|
||||||
void coloured_LED_init (void) __attribute__((weak, alias("__coloured_LED_init")));
|
void coloured_LED_init(void)
|
||||||
void inline __red_LED_on (void) {}
|
__attribute__((weak, alias("__coloured_LED_init")));
|
||||||
|
inline void __red_LED_on(void) {}
|
||||||
void red_LED_on(void) __attribute__((weak, alias("__red_LED_on")));
|
void red_LED_on(void) __attribute__((weak, alias("__red_LED_on")));
|
||||||
void inline __red_LED_off(void) {}
|
inline void __red_LED_off(void) {}
|
||||||
void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
|
void red_LED_off(void) __attribute__((weak, alias("__red_LED_off")));
|
||||||
void inline __green_LED_on(void) {}
|
inline void __green_LED_on(void) {}
|
||||||
void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
|
void green_LED_on(void) __attribute__((weak, alias("__green_LED_on")));
|
||||||
void inline __green_LED_off(void) {}
|
inline void __green_LED_off(void) {}
|
||||||
void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
|
void green_LED_off(void) __attribute__((weak, alias("__green_LED_off")));
|
||||||
void inline __yellow_LED_on(void) {}
|
inline void __yellow_LED_on(void) {}
|
||||||
void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
|
void yellow_LED_on(void) __attribute__((weak, alias("__yellow_LED_on")));
|
||||||
void inline __yellow_LED_off(void) {}
|
inline void __yellow_LED_off(void) {}
|
||||||
void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
|
void yellow_LED_off(void) __attribute__((weak, alias("__yellow_LED_off")));
|
||||||
void inline __blue_LED_on(void) {}
|
inline void __blue_LED_on(void) {}
|
||||||
void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
|
void blue_LED_on(void) __attribute__((weak, alias("__blue_LED_on")));
|
||||||
void inline __blue_LED_off(void) {}
|
inline void __blue_LED_off(void) {}
|
||||||
void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
|
void blue_LED_off(void) __attribute__((weak, alias("__blue_LED_off")));
|
||||||
|
|
||||||
/************************************************************************
|
/*
|
||||||
|
************************************************************************
|
||||||
* Init Utilities *
|
* Init Utilities *
|
||||||
************************************************************************
|
************************************************************************
|
||||||
* Some of this code should be moved into the core functions,
|
* Some of this code should be moved into the core functions,
|
||||||
@ -164,9 +166,9 @@ static int display_dram_config (void)
|
|||||||
#else
|
#else
|
||||||
ulong size = 0;
|
ulong size = 0;
|
||||||
|
|
||||||
for (i=0; i<CONFIG_NR_DRAM_BANKS; i++) {
|
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++)
|
||||||
size += gd->bd->bi_dram[i].size;
|
size += gd->bd->bi_dram[i].size;
|
||||||
}
|
|
||||||
puts("DRAM: ");
|
puts("DRAM: ");
|
||||||
print_size(size, "\n");
|
print_size(size, "\n");
|
||||||
#endif
|
#endif
|
||||||
@ -308,7 +310,8 @@ void board_init_f (ulong bootflag)
|
|||||||
#ifndef CONFIG_ALT_LB_ADDR
|
#ifndef CONFIG_ALT_LB_ADDR
|
||||||
/* reserve kernel log buffer */
|
/* reserve kernel log buffer */
|
||||||
addr -= (LOGBUFF_RESERVE);
|
addr -= (LOGBUFF_RESERVE);
|
||||||
debug ("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN, addr);
|
debug("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN,
|
||||||
|
addr);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -317,7 +320,8 @@ void board_init_f (ulong bootflag)
|
|||||||
* reserve protected RAM
|
* reserve protected RAM
|
||||||
*/
|
*/
|
||||||
i = getenv_r("pram", (char *)tmp, sizeof(tmp));
|
i = getenv_r("pram", (char *)tmp, sizeof(tmp));
|
||||||
reg = (i > 0) ? simple_strtoul ((const char *)tmp, NULL, 10) : CONFIG_PRAM;
|
reg = (i > 0) ? simple_strtoul((const char *)tmp, NULL, 10) :
|
||||||
|
CONFIG_PRAM;
|
||||||
addr -= (reg << 10); /* size is in kB */
|
addr -= (reg << 10); /* size is in kB */
|
||||||
debug("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
|
debug("Reserving %ldk for protected RAM at %08lx\n", reg, addr);
|
||||||
#endif /* CONFIG_PRAM */
|
#endif /* CONFIG_PRAM */
|
||||||
@ -421,7 +425,8 @@ void board_init_f (ulong bootflag)
|
|||||||
static char *failed = "*** failed ***\n";
|
static char *failed = "*** failed ***\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/************************************************************************
|
/*
|
||||||
|
************************************************************************
|
||||||
*
|
*
|
||||||
* This is the next part if the initialization sequence: we are now
|
* This is the next part if the initialization sequence: we are now
|
||||||
* running from RAM and have a "normal" C environment, i. e. global
|
* running from RAM and have a "normal" C environment, i. e. global
|
||||||
@ -475,7 +480,8 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
|||||||
#if !defined(CONFIG_SYS_NO_FLASH)
|
#if !defined(CONFIG_SYS_NO_FLASH)
|
||||||
puts("Flash: ");
|
puts("Flash: ");
|
||||||
|
|
||||||
if ((flash_size = flash_init ()) > 0) {
|
flash_size = flash_init();
|
||||||
|
if (flash_size > 0) {
|
||||||
# ifdef CONFIG_SYS_FLASH_CHECKSUM
|
# ifdef CONFIG_SYS_FLASH_CHECKSUM
|
||||||
print_size(flash_size, "");
|
print_size(flash_size, "");
|
||||||
/*
|
/*
|
||||||
@ -485,9 +491,9 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
|||||||
*/
|
*/
|
||||||
s = getenv("flashchecksum");
|
s = getenv("flashchecksum");
|
||||||
if (s && (*s == 'y')) {
|
if (s && (*s == 'y')) {
|
||||||
printf (" CRC: %08X",
|
printf(" CRC: %08X", crc32(0,
|
||||||
crc32 (0, (const unsigned char *) CONFIG_SYS_FLASH_BASE, flash_size)
|
(const unsigned char *) CONFIG_SYS_FLASH_BASE,
|
||||||
);
|
flash_size));
|
||||||
}
|
}
|
||||||
putc('\n');
|
putc('\n');
|
||||||
# else /* !CONFIG_SYS_FLASH_CHECKSUM */
|
# else /* !CONFIG_SYS_FLASH_CHECKSUM */
|
||||||
@ -564,13 +570,13 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
|||||||
#endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
|
#endif /* CONFIG_DRIVER_SMC91111 || CONFIG_DRIVER_LAN91C96 */
|
||||||
|
|
||||||
/* Initialize from environment */
|
/* Initialize from environment */
|
||||||
if ((s = getenv ("loadaddr")) != NULL) {
|
s = getenv("loadaddr");
|
||||||
|
if (s != NULL)
|
||||||
load_addr = simple_strtoul(s, NULL, 16);
|
load_addr = simple_strtoul(s, NULL, 16);
|
||||||
}
|
|
||||||
#if defined(CONFIG_CMD_NET)
|
#if defined(CONFIG_CMD_NET)
|
||||||
if ((s = getenv ("bootfile")) != NULL) {
|
s = getenv("bootfile");
|
||||||
|
if (s != NULL)
|
||||||
copy_filename(BootFile, s, sizeof(BootFile));
|
copy_filename(BootFile, s, sizeof(BootFile));
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef BOARD_LATE_INIT
|
#ifdef BOARD_LATE_INIT
|
||||||
@ -606,11 +612,11 @@ void board_init_r (gd_t *id, ulong dest_addr)
|
|||||||
#ifdef CONFIG_PRAM
|
#ifdef CONFIG_PRAM
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
if ((s = getenv ("pram")) != NULL) {
|
s = getenv("pram");
|
||||||
|
if (s != NULL)
|
||||||
pram = simple_strtoul(s, NULL, 10);
|
pram = simple_strtoul(s, NULL, 10);
|
||||||
} else {
|
else
|
||||||
pram = CONFIG_PRAM;
|
pram = CONFIG_PRAM;
|
||||||
}
|
|
||||||
#else
|
#else
|
||||||
pram = 0;
|
pram = 0;
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user