X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=board%2Fbc3450%2Fcmd_bc3450.c;h=fefffc39c26f7ff92a6c496be8df7b0c3b611306;hb=4a207e8b9a1ecc3e87d5a63bb5442dbcd50bd4b6;hp=ae5061f94b3c52fc6c0686de31f7a26ced6800ac;hpb=6d0f6bcf337c5261c08fabe12982178c2c489d76;p=u-boot diff --git a/board/bc3450/cmd_bc3450.c b/board/bc3450/cmd_bc3450.c index ae5061f94b..fefffc39c2 100644 --- a/board/bc3450/cmd_bc3450.c +++ b/board/bc3450/cmd_bc3450.c @@ -32,13 +32,6 @@ */ #if defined(CONFIG_CMD_BSP) -#undef DEBUG -#ifdef DEBUG -# define dprintf(fmt,args...) printf(fmt, ##args) -#else -# define dprintf(fmt,args...) -#endif - /* * Definitions for DS1620 chip */ @@ -52,7 +45,6 @@ #define THERM_WRITE_TL 0x02 #define THERM_WRITE_TH 0x01 -#define CONFIG_SYS_CPU 2 #define CONFIG_SYS_1SHOT 1 #define CONFIG_SYS_STANDALONE 0 @@ -129,7 +121,7 @@ int sm501_gpio_init (void) static int init_done = 0; if (init_done) { -/* dprintf("sm501_gpio_init: nothing to be done.\n"); */ + debug("sm501_gpio_init: nothing to be done.\n"); return 1; } @@ -162,7 +154,8 @@ int sm501_gpio_init (void) (PWR_OFF | BUZZER | FP_DATA_TRI); init_done = 1; -/* dprintf("sm501_gpio_init: done.\n"); */ + debug("sm501_gpio_init: done.\n"); + return 0; } @@ -173,7 +166,7 @@ int sm501_gpio_init (void) * read and prints the dip switch * and/or external config inputs (4bits) 0...0x0F */ -int cmd_dip (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int cmd_dip (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { vu_long rc = 0; @@ -194,18 +187,18 @@ int cmd_dip (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } U_BOOT_CMD (dip, 1, 1, cmd_dip, - "dip - read dip switch and config inputs\n", + "read dip switch and config inputs", "\n" " - prints the state of the dip switch and/or\n" " external configuration inputs as hex value.\n" - " - \"Config 1\" is the LSB\n"); + " - \"Config 1\" is the LSB"); /* * buz - turns Buzzer on/off */ #ifdef CONFIG_BC3450_BUZZER -static int cmd_buz (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int cmd_buz (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { if (argc != 2) { printf ("Usage:\nspecify one argument: \"on\" or \"off\"\n"); @@ -228,15 +221,15 @@ static int cmd_buz (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } U_BOOT_CMD (buz, 2, 1, cmd_buz, - "buz - turns buzzer on/off\n", - "\n" "buz \n" " - turns the buzzer on or off\n"); + "turns buzzer on/off", + "\n" "buz \n" " - turns the buzzer on or off"); #endif /* CONFIG_BC3450_BUZZER */ /* * fp - front panel commands */ -static int cmd_fp (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int cmd_fp (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { sm501_gpio_init (); @@ -322,18 +315,18 @@ static int cmd_fp (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } U_BOOT_CMD (fp, 3, 1, cmd_fp, - "fp - front panes access functions\n", + "front panes access functions", "\n" "fp bl \n" " - turns the CCFL backlight of the display on/off\n" - "fp \n" " - turns the whole display on/off\n" + "fp \n" " - turns the whole display on/off" #ifdef CONFIG_BC3450_CRT + "\n" "fp crt \n" - " - enables/disables the crt output (debug only)\n" + " - enables/disables the crt output (debug only)" #endif /* CONFIG_BC3450_CRT */ ); - /* * temp - DS1620 thermometer */ @@ -491,7 +484,7 @@ static void ds1620_write_state (struct therm *therm) ds1620_out (THERM_START_CONVERT, 0, 0); } -static int cmd_temp (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +static int cmd_temp (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { int i; struct therm therm; @@ -523,8 +516,8 @@ static int cmd_temp (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) } U_BOOT_CMD (temp, 3, 1, cmd_temp, - "temp - print current temperature\n", - "\n" "temp\n" " - print current temperature\n"); + "print current temperature", + "\n" "temp\n" " - print current temperature"); #ifdef CONFIG_BC3450_CAN /* @@ -682,7 +675,7 @@ int can_init (void) * return 1 on CAN failure * return 0 if no failure */ -int do_can (char *argv[]) +int do_can (char * const argv[]) { int i; struct mpc5xxx_mscan *can1 = @@ -777,7 +770,7 @@ int do_can (char *argv[]) /* * test - BC3450 HW test routines */ -int cmd_test (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) +int cmd_test (cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[]) { #ifdef CONFIG_BC3450_CAN int rcode; @@ -816,12 +809,13 @@ int cmd_test (cmd_tbl_t * cmdtp, int flag, int argc, char *argv[]) return 1; } -U_BOOT_CMD (test, 2, 1, cmd_test, "test - unit test routines\n", "\n" +U_BOOT_CMD (test, 2, 1, cmd_test, "unit test routines", "\n" #ifdef CONFIG_BC3450_CAN - "test can\n" - " - connect CAN1 (X8) with CAN2 (X9) for this test\n" + "test can\n" + " - connect CAN1 (X8) with CAN2 (X9) for this test\n" #endif /* CONFIG_BC3450_CAN */ - "test unit-off\n" - " - turns off the BC3450 unit\n" - " WARNING: Unsaved environment variables will be lost!\n"); + "test unit-off\n" + " - turns off the BC3450 unit\n" + " WARNING: Unsaved environment variables will be lost!" +); #endif