diff options
author | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 |
---|---|---|
committer | wdenk <wdenk> | 2003-06-27 21:31:46 +0000 |
commit | 8bde7f776c77b343aca29b8c7b58464d915ac245 (patch) | |
tree | 20f1fd99975215e7c658454a15cdb4ed4694e2d4 /board/lwmon | |
parent | 993cad9364c6b87ae429d1ed1130d8153f6f027e (diff) | |
download | bootable_bootloader_goldelico_gta04-8bde7f776c77b343aca29b8c7b58464d915ac245.zip bootable_bootloader_goldelico_gta04-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.gz bootable_bootloader_goldelico_gta04-8bde7f776c77b343aca29b8c7b58464d915ac245.tar.bz2 |
* Code cleanup:
- remove trailing white space, trailing empty lines, C++ comments, etc.
- split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)
* Patches by Kenneth Johansson, 25 Jun 2003:
- major rework of command structure
(work done mostly by Michal Cendrowski and Joakim Kristiansen)
Diffstat (limited to 'board/lwmon')
-rw-r--r-- | board/lwmon/Makefile | 2 | ||||
-rw-r--r-- | board/lwmon/README.keybd | 1 | ||||
-rw-r--r-- | board/lwmon/lwmon.c | 53 | ||||
-rw-r--r-- | board/lwmon/u-boot.lds | 6 | ||||
-rw-r--r-- | board/lwmon/u-boot.lds.debug | 6 |
5 files changed, 47 insertions, 21 deletions
diff --git a/board/lwmon/Makefile b/board/lwmon/Makefile index 35b8428..7a2014d 100644 --- a/board/lwmon/Makefile +++ b/board/lwmon/Makefile @@ -28,7 +28,7 @@ LIB = lib$(BOARD).a OBJS = $(BOARD).o flash.o $(LIB): .depend $(OBJS) - $(AR) crv $@ $^ + $(AR) crv $@ $(OBJS) ######################################################################### diff --git a/board/lwmon/README.keybd b/board/lwmon/README.keybd index bf759c6..788c864 100644 --- a/board/lwmon/README.keybd +++ b/board/lwmon/README.keybd @@ -15,7 +15,6 @@ Linux-Kernel übergeben und dort z. B. in einem Device-Treiber oder einer Applikation ausgewertet werden. - Sonderfunktionen beim Booten: Es lassen sich eine oder mehrere (beliebig viele) Tasten oder Tasten- diff --git a/board/lwmon/lwmon.c b/board/lwmon/lwmon.c index d5a637f..b359ec7 100644 --- a/board/lwmon/lwmon.c +++ b/board/lwmon/lwmon.c @@ -38,7 +38,6 @@ V* Verification: dzu@denx.de #include <commproc.h> #include <i2c.h> #include <command.h> -#include <cmd_bsp.h> #include <malloc.h> #include <post.h> @@ -73,9 +72,9 @@ const uint sdram_table[] = /* * SDRAM Initialization (offset 5 in UPM RAM) * - * This is no UPM entry point. The following definition uses - * the remaining space to establish an initialization - * sequence, which is executed by a RUN command. + * This is no UPM entry point. The following definition uses + * the remaining space to establish an initialization + * sequence, which is executed by a RUN command. * */ 0x1FF5FC34, 0xEFEABC34, 0x1FB57C35, /* last */ @@ -121,9 +120,9 @@ const uint sdram_table[] = /* * SDRAM Initialization (offset 5 in UPM RAM) * - * This is no UPM entry point. The following definition uses - * the remaining space to establish an initialization - * sequence, which is executed by a RUN command. + * This is no UPM entry point. The following definition uses + * the remaining space to establish an initialization + * sequence, which is executed by a RUN command. * */ 0x1FF5FC34, 0xEFEABC34, 0x1FB57C35, /* last */ @@ -132,7 +131,7 @@ const uint sdram_table[] = */ 0x0E2DBC04, 0x10AF7C04, 0xF0AFFC00, 0xF0AFFC00, 0xF1AFFC00, 0xEFBAFC00, 0x1FF5FC47, /* last */ - _NOT_USED_, + _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, /* @@ -146,7 +145,7 @@ const uint sdram_table[] = */ 0x0E29BC04, 0x10A77C00, 0xF0AFFC00, 0xF0AFFC00, 0xE1BAFC04, 0x1FF5FC47, /* last */ - _NOT_USED_, _NOT_USED_, + _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, _NOT_USED_, /* @@ -511,7 +510,7 @@ static void kbd_init (void) int i; i2c_init (CFG_I2C_SPEED, CFG_I2C_SLAVE); - + gd->kbd_status = 0; /* Read initial keyboard error code */ @@ -543,13 +542,13 @@ static void kbd_init (void) /* * Read current keyboard state. * - * After the error reset it may take some time before the - * keyboard PIC picks up a valid keyboard scan - the total - * scan time is approx. 1.6 ms (information by Martin Rajek, - * 28 Sep 2002). We read a couple of times for the keyboard - * to stabilize, using a big enough delay. - * 10 times should be enough. If the data is still changing, - * we use what we get :-( + * After the error reset it may take some time before the + * keyboard PIC picks up a valid keyboard scan - the total + * scan time is approx. 1.6 ms (information by Martin Rajek, + * 28 Sep 2002). We read a couple of times for the keyboard + * to stabilize, using a big enough delay. + * 10 times should be enough. If the data is still changing, + * we use what we get :-( */ memset (tmp_data, 0xFF, KEYBD_DATALEN); /* impossible value */ @@ -849,6 +848,12 @@ int do_pic (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) printf ("Usage:\n%s\n", cmdtp->usage); return 1; } +cmd_tbl_t U_BOOT_CMD(pic) = MK_CMD_ENTRY( + "pic", 4, 1, do_pic, + "pic - read and write PIC registers\n", + "read reg - read PIC register `reg'\n" + "pic write reg val - write value `val' to PIC register `reg'\n" +); /*********************************************************************** F* Function: int do_kbd (cmd_tbl_t *cmdtp, int flag, @@ -902,6 +907,12 @@ int do_kbd (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 0; } +cmd_tbl_t U_BOOT_CMD(kdb) = MK_CMD_ENTRY( + "kbd", 1, 1, do_kbd, + "kbd - read keyboard status\n", + NULL +); + /* Read and set LSB switch */ #define CFG_PC_TXD1_ENA 0x0008 /* PC.12 */ @@ -968,6 +979,14 @@ int do_lsb (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) return 1; } +cmd_tbl_t U_BOOT_CMD(lsb) = MK_CMD_ENTRY( + "lsb", 2, 1, do_lsb, + "lsb - check and set LSB switch\n", + "on - switch LSB on\n" + "lsb off - switch LSB off\n" + "lsb - print current setting\n" +); + #endif /* CFG_CMD_BSP */ /*----------------------------- Utilities -----------------------------*/ diff --git a/board/lwmon/u-boot.lds b/board/lwmon/u-boot.lds index 3764878..fffa79e 100644 --- a/board/lwmon/u-boot.lds +++ b/board/lwmon/u-boot.lds @@ -98,6 +98,11 @@ SECTIONS _edata = .; PROVIDE (edata = .); + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; @@ -120,4 +125,3 @@ SECTIONS _end = . ; PROVIDE (end = .); } - diff --git a/board/lwmon/u-boot.lds.debug b/board/lwmon/u-boot.lds.debug index 9183016..153286b 100644 --- a/board/lwmon/u-boot.lds.debug +++ b/board/lwmon/u-boot.lds.debug @@ -107,6 +107,11 @@ SECTIONS _edata = .; PROVIDE (edata = .); + __u_boot_cmd_start = .; + .u_boot_cmd : { *(.u_boot_cmd) } + __u_boot_cmd_end = .; + + __start___ex_table = .; __ex_table : { *(__ex_table) } __stop___ex_table = .; @@ -129,4 +134,3 @@ SECTIONS _end = . ; PROVIDE (end = .); } - |