Coding Style cleanup

This commit is contained in:
Wolfgang Denk 2006-03-12 02:55:22 +01:00
parent 1264b4050c
commit 8e7b703a62
35 changed files with 482 additions and 500 deletions

View File

@ -2,6 +2,8 @@
Changes since U-Boot 1.1.4:
======================================================================
* Coding Style cleanup
* Avoid dereferencing NULL in find_cmd() if no valid commands were found
Patch by Andrew Dyer, 13 Jun 2005

View File

@ -23,4 +23,3 @@
TEXT_BASE = 0x01FC0000
PLATFORM_CPPFLAGS += -I$(TOPDIR)

View File

@ -65,4 +65,3 @@
#define PSDA_LED6 0x04 /* LED 6, 1 = LED ON */
#define PSDA_LED5 0x02 /* LED 5, 1 = LED ON */
#define PSDA_LED4 0x01 /* LED 4, 1 = LED ON */

View File

@ -146,4 +146,3 @@ SECTIONS
_end = . ;
PROVIDE (end = .);
}

View File

@ -23,4 +23,3 @@
TEXT_BASE = 0x07FC0000
PLATFORM_CPPFLAGS += -I$(TOPDIR)

View File

@ -53,8 +53,12 @@ long int initdram(int board_type)
#ifdef DEBUG
printf ("SDRAM attributes:\n");
printf (" tRCD:%d Cycles; tRP:%d Cycles; tRAS:%d Cycles; tWR:%d Cycles; "
"CAS Latency:%d cycles\n", (SDRAM_tRCD >> 15), (SDRAM_tRP >> 11),
(SDRAM_tRAS >> 6), ( SDRAM_tWR >> 19), (SDRAM_CL >> 2 ));
"CAS Latency:%d cycles\n",
(SDRAM_tRCD >> 15),
(SDRAM_tRP >> 11),
(SDRAM_tRAS >> 6),
(SDRAM_tWR >> 19),
(SDRAM_CL >> 2));
printf ("SDRAM Begin: 0x%x\n", CFG_SDRAM_BASE);
printf ("Bank size = %d MB\n", 128);
#endif
@ -66,15 +70,12 @@ long int initdram(int board_type)
void swap_to (int device_id)
{
if (device_id == ETHERNET)
{
if (device_id == ETHERNET) {
*pFIO_DIR = PF0;
asm ("ssync;");
*pFIO_FLAG_S = PF0;
asm ("ssync;");
}
else if (device_id == FLASH)
{
} else if (device_id == FLASH) {
*pFIO_DIR = (PF4 | PF3 | PF2 | PF1 | PF0);
*pFIO_FLAG_S = (PF4 | PF3 | PF2);
*pFIO_MASKA_D = (PF8 | PF6 | PF5);
@ -84,8 +85,7 @@ void swap_to(int device_id)
*pFIO_INEN = (PF8 | PF7 | PF6 | PF5);
*pFIO_FLAG_D = (PF4 | PF3 | PF2);
asm ("ssync;");
}
else {
} else {
printf ("Unknown bank to switch\n");
}
@ -102,14 +102,12 @@ int misc_init_r(void)
/* Check whether CF card is inserted */
*pFIO_EDGE = FIO_EDGE_CF_BITS;
*pFIO_POLAR = FIO_POLAR_CF_BITS;
for (i=0; i < 0x300 ; i++) asm("nop;");
for (i = 0; i < 0x300; i++)
asm ("nop;");
if ( (*pFIO_FLAG_S) & CF_STAT_BITS)
{
if ((*pFIO_FLAG_S) & CF_STAT_BITS) {
cf_stat = 0;
}
else
{
} else {
cf_stat = 1;
}
@ -117,25 +115,26 @@ int misc_init_r(void)
*pFIO_POLAR = FIO_POLAR_BITS;
if (cf_stat)
{
if (cf_stat) {
printf ("Booting from COMPACT flash\n");
/* Set cycle time for CF */
*(volatile unsigned long *) ambctl1 = CF_AMBCTL1VAL;
for (i=0; i < 0x1000 ; i++) asm("nop;");
for (i=0; i < 0x1000 ; i++) asm("nop;");
for (i=0; i < 0x1000 ; i++) asm("nop;");
for (i = 0; i < 0x1000; i++)
asm ("nop;");
for (i = 0; i < 0x1000; i++)
asm ("nop;");
for (i = 0; i < 0x1000; i++)
asm ("nop;");
serial_setbrg ();
ide_init ();
setenv ("bootargs", "");
setenv ("bootcmd", "fatload ide 0:1 0x1000000 uImage-stamp;bootm 0x1000000;bootm 0x20100000" );
}
else
{
setenv ("bootcmd",
"fatload ide 0:1 0x1000000 uImage-stamp;bootm 0x1000000;bootm 0x20100000");
} else {
printf ("Booting from FLASH\n");
}
@ -189,8 +188,7 @@ void cf_insw(unsigned short *sect_buf, unsigned short *addr, int words)
*pFIO_FLAG_C = CF_PF1;
asm ("ssync;");
for (i = 0;i < words; i++)
{
for (i = 0; i < words; i++) {
*(sect_buf + i) = *(addr);
asm ("ssync;");
}
@ -207,8 +205,7 @@ void cf_outsw(unsigned short *addr, unsigned short *sect_buf, int words)
*pFIO_FLAG_C = CF_PF1;
asm ("ssync;");
for (i = 0;i < words; i++)
{
for (i = 0; i < words; i++) {
*(addr) = *(sect_buf + i);
asm ("ssync;");
}
@ -268,11 +265,11 @@ void show_boot_progress(int status)
case 13:
case 14:
case 15:
stamp_led_set(STATUS_LED_OFF,STATUS_LED_OFF,STATUS_LED_OFF);
stamp_led_set (STATUS_LED_OFF, STATUS_LED_OFF,
STATUS_LED_OFF);
break;
default:
stamp_led_set (STATUS_LED_ON, STATUS_LED_ON, STATUS_LED_ON);
break;
}
}

View File

@ -145,4 +145,3 @@ SECTIONS
_end = . ;
PROVIDE (end = .);
}

View File

@ -191,4 +191,3 @@ do_not_know_what_to_do:
panic_bfin:
RTS;

View File

@ -86,10 +86,6 @@ static unsigned int dcplb_table[16][2]={
{0x20000000,SDRAM_EBIU}, /*For Network */
};
int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
{
__asm__ __volatile__
@ -173,7 +169,6 @@ void dcache_enable(void)
sti();
}
void dcache_disable(void)
{
cli();

View File

@ -272,9 +272,6 @@
#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
#define CFG_MONITOR_BASE (CFG_MAX_RAM_SIZE - CFG_MONITOR_LEN)
#if ( CONFIG_CLKIN_HALF == 0 )
#define CONFIG_VCO_HZ ( CONFIG_CLKIN_HZ * CONFIG_VCO_MULT )
#else
@ -289,8 +286,6 @@
#define CONFIG_SCLK_HZ CONFIG_CLKIN_HZ
#endif
/*
* Miscellaneous configurable options
*/
@ -311,7 +306,6 @@
*/
#define CONFIG_STACKSIZE (128*1024) /* regular stack */
/*
* FLASH organization and environment definitions
*/
@ -336,5 +330,4 @@
#define VDSP_ENTRY_ADDR 0xFFA00000
#endif
#endif

View File

@ -38,4 +38,3 @@ void flush_cache(unsigned long dummy1, unsigned long dummy2)
}
return;
}

View File

@ -92,7 +92,9 @@ void rtc_set (struct rtc_time *tmp)
return;
}
time_in_secs = mktime(tmp->tm_year, tmp->tm_mon, tmp->tm_mday,tmp->tm_hour, tmp->tm_min, tmp->tm_sec);
time_in_secs =
mktime (tmp->tm_year, tmp->tm_mon, tmp->tm_mday, tmp->tm_hour,
tmp->tm_min, tmp->tm_sec);
/* Compute no. of days since 1970 */
n_days_1970 = (unsigned long) (time_in_secs / (NUM_SECS_IN_DAY));