From: wdenk Date: Wed, 9 Aug 2000 20:33:09 +0000 (+0000) Subject: Cleanup. Removed dead code. X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=d73610bc6a26b9e4215179cee1563be064d6917a;p=users%2Frw%2Fppcboot.git Cleanup. Removed dead code. Added SST39xFx00A flash chip definitions. Added ETX_094 configuration. --- diff --git a/Makefile b/Makefile index cd9b438..49ef502 100644 --- a/Makefile +++ b/Makefile @@ -22,8 +22,9 @@ # ARCH := ppc -CPU := mpc8xx -BOARD := tqm8xx +CPU := $(shell perl -e '$$_="cpu";printf"%s\n",(-l $$_)?readlink:$$_;') +BOARD := $(shell perl -e '$$_="board";printf"%s\n",(-l $$_)?readlink:$$_;') + HOSTARCH := $(shell uname -m | \ sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/) @@ -80,6 +81,12 @@ TQM860L_config : ln -s mpc8xx cpu cd include ; ln -s config_$(@:_config=).h config.h +ETX094_config : + rm -f board cpu include/config.h + ln -s etx094 board + ln -s mpc8xx cpu + cd include ; ln -s config_$(@:_config=).h config.h + FADS_config: rm -f board cpu include/config.h ln -s FADS board @@ -91,7 +98,7 @@ FADS_config: clean: @for dir in $(SUBDIRS); do $(MAKE) -C $$dir clean; done -clobber distclean: clean +clobber distclean: @for dir in $(SUBDIRS) ; do $(MAKE) -C $$dir distclean; done rm -f $(OBJS) *.bak rm -f ppcboot ppcboot.bin ppcboot.elf ppcboot.srec ppcboot.map diff --git a/common/Makefile b/common/Makefile index 6d953f6..60587c4 100644 --- a/common/Makefile +++ b/common/Makefile @@ -34,8 +34,10 @@ OBJS = $(AOBJS) $(COBJS) CPPFLAGS += -I.. -$(LIB): $(OBJS) - $(AR) crv $@ $(OBJS) +all: $(LIB) $(AOBJS) + +$(LIB): $(COBJS) + $(AR) crv $@ $(COBJS) clean: rm -f $(OBJS) diff --git a/common/cmd_boot.c b/common/cmd_boot.c index da09465..80c5625 100644 --- a/common/cmd_boot.c +++ b/common/cmd_boot.c @@ -56,7 +56,7 @@ void do_bdinfo (cmd_tbl_t *cmdtp, bd_t *bd, int flag, int argc, char *argv[]) } printf ("\n IP addr ="); for (i=0; i<4; ++i) { - printf ("%c%d", i ? '.' : ' ', (ip >> 24) & 0xFF); + printf ("%c%ld", i ? '.' : ' ', (ip >> 24) & 0xFF); ip <<= 8; } printf ("\n baudrate = %6ld bps\n", bd->bi_baudrate ); diff --git a/common/environment.S b/common/environment.S index 3db1276..fa2f7d3 100644 --- a/common/environment.S +++ b/common/environment.S @@ -5,6 +5,7 @@ .text .p2align CFG_FLASH_ENV_ALIGN + .globl environment environment: .ascii "bootargs=" diff --git a/config.mk b/config.mk index 357405a..cd7732b 100644 --- a/config.mk +++ b/config.mk @@ -28,6 +28,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ else echo sh; fi ; fi) CDK_DIR = /LinuxPPC/CDK +#CDK_DIR = /opt/hardhat/devkit/ppc/8xx/ CDKHEADERS = -I$(CDK_DIR)/include \ -I$(CDK_DIR)/lib/gcc-lib/powerpc-linux/2.95.2/include diff --git a/include/flash.h b/include/flash.h index aa33aa6..dda429f 100644 --- a/include/flash.h +++ b/include/flash.h @@ -59,12 +59,13 @@ void flash_erase (flash_info_t *, int, int); #define AMD_MANUFACT 0x00010001 /* AMD manuf. ID in D23..D16, D7..D0 */ #define FUJ_MANUFACT 0x00040004 /* FUJITSU manuf. ID in D23..D16, D7..D0 */ +#define SST_MANUFACT 0x00BF00BF /* SST manuf. ID in D23..D16, D7..D0 */ -#define AMD_ID_LV400T 0x22B922B9 /* 29LV400T ID (4 M, top boot sector) */ -#define AMD_ID_LV400B 0x22BA22BA /* 29LV400B ID (4 M, bottom boot sect) */ +#define AMD_ID_LV400T 0x22B922B9 /* 29LV400T ID ( 4 M, top boot sector) */ +#define AMD_ID_LV400B 0x22BA22BA /* 29LV400B ID ( 4 M, bottom boot sect) */ -#define AMD_ID_LV800T 0x22DA22DA /* 29LV800T ID (8 M, top boot sector) */ -#define AMD_ID_LV800B 0x225B225B /* 29LV800B ID (8 M, bottom boot sect) */ +#define AMD_ID_LV800T 0x22DA22DA /* 29LV800T ID ( 8 M, top boot sector) */ +#define AMD_ID_LV800B 0x225B225B /* 29LV800B ID ( 8 M, bottom boot sect) */ #define AMD_ID_LV160T 0x22C422C4 /* 29LV160T ID (16 M, top boot sector) */ #define AMD_ID_LV160B 0x22492249 /* 29LV160B ID (16 M, bottom boot sect) */ @@ -73,6 +74,10 @@ void flash_erase (flash_info_t *, int, int); #define AMD_ID_LV320T 0xDEADBEEF /* 29LV320T ID (32 M, top boot sector) */ #define AMD_ID_LV320B 0xDEADBEEF /* 29LV320B ID (32 M, bottom boot sect) */ +#define SST_ID_xF200A 0x27892789 /* 39xF200A ID ( 2M = 128K x 16 ) */ +#define SST_ID_xF400A 0x27802780 /* 39xF400A ID ( 4M = 256K x 16 ) */ +#define SST_ID_xF800A 0x27812781 /* 39xF800A ID ( 8M = 512K x 16 ) */ + /*----------------------------------------------------------------------- * Internal FLASH identification codes */ diff --git a/include/ppcboot.h b/include/ppcboot.h index aee520e..11d6d8f 100644 --- a/include/ppcboot.h +++ b/include/ppcboot.h @@ -108,7 +108,6 @@ int set_board_info(bd_t *, uint); int checkboard (void); int checkflash (void); int checkdram (void); -int testdram (void); /* common/cmd_nvedit.c */ char *getenv (uchar *); diff --git a/tqm8xx/tqm8xx.c b/tqm8xx/tqm8xx.c index fc334e0..aacd018 100644 --- a/tqm8xx/tqm8xx.c +++ b/tqm8xx/tqm8xx.c @@ -23,7 +23,6 @@ #include #include "mpc8xx.h" -#include "tqm8xx.h" /* ------------------------------------------------------------------------- */ @@ -278,16 +277,6 @@ long int initdram (int board_type) /* ------------------------------------------------------------------------- */ -int testdram (void) -{ - /* TODO: XXX XXX XXX */ - printf ("test: 16 MB - ok\n"); - - return (0); -} - -/* ------------------------------------------------------------------------- */ - /* * Check memory range for valid RAM. A simple memory test determines * the actually available RAM size between addresses `base' and