diff options
-rw-r--r-- | arch/microblaze/cpu/interrupts.c | 5 | ||||
-rw-r--r-- | arch/microblaze/lib/board.c | 8 | ||||
-rw-r--r-- | arch/powerpc/cpu/ppc4xx/miiphy.c | 2 | ||||
-rw-r--r-- | board/amcc/canyonlands/init.S | 2 | ||||
-rw-r--r-- | board/xilinx/ppc405-generic/Makefile | 11 | ||||
-rw-r--r-- | board/xilinx/ppc440-generic/Makefile | 14 | ||||
-rw-r--r-- | common/cmd_fdc.c | 3 | ||||
-rw-r--r-- | common/cmd_fdos.c | 2 | ||||
-rw-r--r-- | common/cmd_ide.c | 2 | ||||
-rw-r--r-- | common/cmd_nand.c | 4 | ||||
-rw-r--r-- | common/cmd_net.c | 2 | ||||
-rw-r--r-- | common/cmd_scsi.c | 2 | ||||
-rw-r--r-- | common/cmd_usb.c | 2 | ||||
-rw-r--r-- | include/configs/lwmon5.h | 17 | ||||
-rw-r--r-- | include/configs/microblaze-generic.h | 8 |
15 files changed, 31 insertions, 53 deletions
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index e9d53c1..5a13211 100644 --- a/arch/microblaze/cpu/interrupts.c +++ b/arch/microblaze/cpu/interrupts.c @@ -41,8 +41,11 @@ void enable_interrupts (void) int disable_interrupts (void) { + unsigned int msr; + + MFS(msr, rmsr); MSRCLR(0x2); - return 0; + return (msr & 0x2) != 0; } #ifdef CONFIG_SYS_INTC_0 diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c index eeef579..b06212e 100644 --- a/arch/microblaze/lib/board.c +++ b/arch/microblaze/lib/board.c @@ -90,16 +90,18 @@ void board_init (void) { bd_t *bd; init_fnc_t **init_fnc_ptr; - gd = (gd_t *) CONFIG_SYS_GBL_DATA_OFFSET; + gd = (gd_t *) (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET); + bd = (bd_t *) (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET \ + - GENERATED_BD_INFO_SIZE); char *s; #if defined(CONFIG_CMD_FLASH) ulong flash_size = 0; #endif asm ("nop"); /* FIXME gd is not initialize - wait */ memset ((void *)gd, 0, GENERATED_GBL_DATA_SIZE); - gd->bd = (bd_t *) (gd + 1); /* At end of global data */ + memset ((void *)bd, 0, GENERATED_BD_INFO_SIZE); + gd->bd = bd; gd->baudrate = CONFIG_BAUDRATE; - bd = gd->bd; bd->bi_baudrate = CONFIG_BAUDRATE; bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; diff --git a/arch/powerpc/cpu/ppc4xx/miiphy.c b/arch/powerpc/cpu/ppc4xx/miiphy.c index 206c476..9f8f8fa 100644 --- a/arch/powerpc/cpu/ppc4xx/miiphy.c +++ b/arch/powerpc/cpu/ppc4xx/miiphy.c @@ -100,7 +100,7 @@ int phy_setup_aneg (char *devname, unsigned char addr) u16 anar = 0x0000; if (exsr & ESTATUS_1000XF) - anar |= ADVERTISE_1000XFULL); + anar |= ADVERTISE_1000XFULL; if (exsr & ESTATUS_1000XH) anar |= ADVERTISE_1000XHALF; diff --git a/board/amcc/canyonlands/init.S b/board/amcc/canyonlands/init.S index 680feaa..8b7bfce 100644 --- a/board/amcc/canyonlands/init.S +++ b/board/amcc/canyonlands/init.S @@ -80,7 +80,7 @@ tlbtab: #if !defined(CONFIG_ARCHES) /* TLB-entry for NAND */ - tlbentry(CONFIG_SYS_NAND_ADDR, SZ_16M, CONFIG_SYS_NAND_ADDR, 4, AC_RWX | SA_IG) + tlbentry(CONFIG_SYS_NAND_ADDR, SZ_1K, CONFIG_SYS_NAND_ADDR, 4, AC_RWX | SA_IG) /* TLB-entry for CPLD */ tlbentry(CONFIG_SYS_BCSR_BASE, SZ_1K, CONFIG_SYS_BCSR_BASE, 4, AC_RW | SA_IG) diff --git a/board/xilinx/ppc405-generic/Makefile b/board/xilinx/ppc405-generic/Makefile index 717ffc9..501fd46 100644 --- a/board/xilinx/ppc405-generic/Makefile +++ b/board/xilinx/ppc405-generic/Makefile @@ -27,12 +27,9 @@ include $(TOPDIR)/config.mk ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../../xilinx/ppc405-generic) endif -INCS := -CFLAGS += $(INCS) -HOSTCFLAGS += $(INCS) - LIB = $(obj)lib$(BOARD).o COBJS += ../../xilinx/ppc405-generic/xilinx_ppc405_generic.o @@ -41,10 +38,8 @@ SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) -all: $(LIB) $(SOBJS) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $^) +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS)) clean: rm -f $(SOBJS) $(OBJS) diff --git a/board/xilinx/ppc440-generic/Makefile b/board/xilinx/ppc440-generic/Makefile index 1760e4e..ed2cf9f 100644 --- a/board/xilinx/ppc440-generic/Makefile +++ b/board/xilinx/ppc440-generic/Makefile @@ -27,26 +27,20 @@ include $(TOPDIR)/config.mk ifneq ($(OBJTREE),$(SRCTREE)) +$(shell mkdir -p $(obj)../../xilinx/ppc440-generic) endif -INCS := -CFLAGS += $(INCS) -HOSTCFLAGS += $(INCS) - LIB = $(obj)lib$(BOARD).o COBJS += ../../xilinx/ppc440-generic/xilinx_ppc440_generic.o - -SOBJS += ../../xilinx/ppc440-generic/init.o +SOBJS += ../../xilinx/ppc440-generic/init.o SRCS := $(SOBJS:.o=.S) $(COBJS:.o=.c) OBJS := $(addprefix $(obj),$(COBJS)) SOBJS := $(addprefix $(obj),$(SOBJS)) -all: $(LIB) $(SOBJS) - -$(LIB): $(OBJS) - $(call cmd_link_o_target, $^) +$(LIB): $(obj).depend $(OBJS) $(SOBJS) + $(call cmd_link_o_target, $(OBJS)) clean: rm -f $(SOBJS) $(OBJS) diff --git a/common/cmd_fdc.c b/common/cmd_fdc.c index d373480..cdb050c 100644 --- a/common/cmd_fdc.c +++ b/common/cmd_fdc.c @@ -721,6 +721,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) image_header_t *hdr; /* used for fdc boot */ unsigned char boot_drive; int i,nrofblk; + char *ep; int rcode = 0; #if defined(CONFIG_FIT) const void *fit_hdr = NULL; @@ -823,7 +824,7 @@ int do_fdcboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) load_addr = addr; /* Check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { char *local_args[2]; local_args[0] = argv[0]; diff --git a/common/cmd_fdos.c b/common/cmd_fdos.c index 238abdd..2af4ca0 100644 --- a/common/cmd_fdos.c +++ b/common/cmd_fdos.c @@ -99,7 +99,7 @@ int do_fdosboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) size, load_addr); /* Check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { char *local_args[2]; local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/common/cmd_ide.c b/common/cmd_ide.c index f627881..df7bdf5 100644 --- a/common/cmd_ide.c +++ b/common/cmd_ide.c @@ -496,7 +496,7 @@ int do_diskboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) load_addr = addr; /* Check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { char *local_args[2]; local_args[0] = argv[0]; diff --git a/common/cmd_nand.c b/common/cmd_nand.c index c547a68..6783645 100644 --- a/common/cmd_nand.c +++ b/common/cmd_nand.c @@ -711,7 +711,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, ulong offset, ulong addr, char *cmd) { int r; - char *s; + char *ep, *s; size_t cnt; image_header_t *hdr; #if defined(CONFIG_FIT) @@ -787,7 +787,7 @@ static int nand_load_image(cmd_tbl_t *cmdtp, nand_info_t *nand, load_addr = addr; /* Check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) { char *local_args[2]; local_args[0] = cmd; diff --git a/common/cmd_net.c b/common/cmd_net.c index 00e0ea8..8c6f5c8 100644 --- a/common/cmd_net.c +++ b/common/cmd_net.c @@ -211,7 +211,7 @@ netboot_common (proto_t proto, cmd_tbl_t *cmdtp, int argc, char * const argv[]) flush_cache(load_addr, size); /* Loading ok, check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((s = getenv("autostart")) != NULL) && (strcmp(s,"yes") == 0)) { char *local_args[2]; local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/common/cmd_scsi.c b/common/cmd_scsi.c index 63a46de..be4fe74 100644 --- a/common/cmd_scsi.c +++ b/common/cmd_scsi.c @@ -327,7 +327,7 @@ int do_scsiboot (cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) flush_cache (addr, (cnt+1)*info.blksz); /* Check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((ep = getenv("autostart")) != NULL) && (strcmp(ep,"yes") == 0)) { char *local_args[2]; local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/common/cmd_usb.c b/common/cmd_usb.c index 8439198..b04a8df 100644 --- a/common/cmd_usb.c +++ b/common/cmd_usb.c @@ -488,7 +488,7 @@ int do_usbboot(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]) flush_cache(addr, (cnt+1)*info.blksz); /* Check if we should attempt an auto-start */ - if (getenv_yesno("autostart")) { + if (((ep = getenv("autostart")) != NULL) && (strcmp(ep, "yes") == 0)) { char *local_args[2]; local_args[0] = argv[0]; local_args[1] = NULL; diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index aedf495..a1ead70 100644 --- a/include/configs/lwmon5.h +++ b/include/configs/lwmon5.h @@ -440,7 +440,6 @@ #define CONFIG_CMD_MII #define CONFIG_CMD_NET #define CONFIG_CMD_NFS -#define CONFIG_CMD_PCI #define CONFIG_CMD_PING #define CONFIG_CMD_REGINFO #define CONFIG_CMD_SDRAM @@ -488,22 +487,6 @@ #define CONFIG_MX_CYCLIC 1 /* enable mdc/mwc commands */ #define CONFIG_VERSION_VARIABLE 1 /* include version env variable */ -/* - * PCI stuff - */ -/* General PCI */ -#define CONFIG_PCI /* include pci support */ -#undef CONFIG_PCI_PNP /* do (not) pci plug-and-play */ -#define CONFIG_PCI_SCAN_SHOW /* show pci devices on startup */ -#define CONFIG_SYS_PCI_TARGBASE 0x80000000 /* PCIaddr mapped to CONFIG_SYS_PCI_MEMBASE*/ - -/* Board-specific PCI */ -#define CONFIG_SYS_PCI_TARGET_INIT -#define CONFIG_SYS_PCI_MASTER_INIT - -#define CONFIG_SYS_PCI_SUBSYS_VENDORID 0x10e8 /* AMCC */ -#define CONFIG_SYS_PCI_SUBSYS_ID 0xcafe /* Whatever */ - #ifndef DEBUG #define CONFIG_HW_WATCHDOG 1 /* Use external HW-Watchdog */ #endif diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 75e4e07..090ab3b 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -137,14 +137,14 @@ /* global pointer */ /* start of global data */ #define CONFIG_SYS_GBL_DATA_OFFSET \ - (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_SDRAM_SIZE \ - - GENERATED_GBL_DATA_SIZE) + (CONFIG_SYS_SDRAM_SIZE - GENERATED_GBL_DATA_SIZE) /* monitor code */ #define SIZE 0x40000 -#define CONFIG_SYS_MONITOR_LEN (SIZE - GENERATED_GBL_DATA_SIZE) +#define CONFIG_SYS_MONITOR_LEN SIZE #define CONFIG_SYS_MONITOR_BASE \ - (CONFIG_SYS_GBL_DATA_OFFSET - CONFIG_SYS_MONITOR_LEN) + (CONFIG_SYS_SDRAM_BASE + CONFIG_SYS_GBL_DATA_OFFSET \ + - CONFIG_SYS_MONITOR_LEN - GENERATED_BD_INFO_SIZE) #define CONFIG_SYS_MONITOR_END \ (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN) #define CONFIG_SYS_MALLOC_LEN SIZE |