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-- | drivers/mtd/jedec_flash.c | 18 | ||||
| -rw-r--r-- | fs/ubifs/misc.h | 3 | ||||
| -rw-r--r-- | include/configs/lwmon5.h | 17 | ||||
| -rw-r--r-- | include/configs/microblaze-generic.h | 8 | 
17 files changed, 51 insertions, 54 deletions
| diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c index e9d53c1af..5a1321128 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 eeef579dc..b06212efd 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 206c47664..9f8f8fa18 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 680feaa6a..8b7bfce63 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 717ffc9c9..501fd467e 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 1760e4e3b..ed2cf9f43 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 d373480f7..cdb050c25 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 238abdde4..2af4ca0ef 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 f6278812a..df7bdf56e 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 c547a683f..678364535 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 00e0ea8dd..8c6f5c8c3 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 63a46ded8..be4fe741c 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 843919822..b04a8df76 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/drivers/mtd/jedec_flash.c b/drivers/mtd/jedec_flash.c index 223fb7114..da8c9b15b 100644 --- a/drivers/mtd/jedec_flash.c +++ b/drivers/mtd/jedec_flash.c @@ -41,6 +41,7 @@  #define AM29DL800BB	0x22CB  #define AM29DL800BT	0x224A +#define AM29F400BB	0x22AB  #define AM29F800BB	0x2258  #define AM29F800BT	0x22D6  #define AM29LV400BB	0x22BA @@ -296,6 +297,23 @@ static const struct amd_flash_info jedec_table[] = {  #ifdef CONFIG_SYS_FLASH_LEGACY_512Kx16  	{  		.mfr_id		= (u16)AMD_MANUFACT, +		.dev_id		= AM29F400BB, +		.name		= "AMD AM29F400BB", +		.uaddr		= { +			[1] = MTD_UADDR_0x0555_0x02AA /* x16 */ +		}, +		.DevSize	= SIZE_512KiB, +		.CmdSet		= CFI_CMDSET_AMD_LEGACY, +		.NumEraseRegions= 4, +		.regions	= { +			ERASEINFO(0x04000, 1), +			ERASEINFO(0x02000, 2), +			ERASEINFO(0x08000, 1), +			ERASEINFO(0x10000, 7), +		} +	}, +	{ +		.mfr_id		= (u16)AMD_MANUFACT,  		.dev_id		= AM29LV400BB,  		.name		= "AMD AM29LV400BB",  		.uaddr		= { diff --git a/fs/ubifs/misc.h b/fs/ubifs/misc.h index b745d8678..609232e93 100644 --- a/fs/ubifs/misc.h +++ b/fs/ubifs/misc.h @@ -260,7 +260,8 @@ struct ubifs_branch *ubifs_idx_branch(const struct ubifs_info *c,  static inline void *ubifs_idx_key(const struct ubifs_info *c,  				  const struct ubifs_idx_node *idx)  { -	return (void *)((struct ubifs_branch *)idx->branches)->key; +	const __u8 *branch = idx->branches; +	return (void *)((struct ubifs_branch *)branch)->key;  }  /** diff --git a/include/configs/lwmon5.h b/include/configs/lwmon5.h index aedf49510..a1ead70ee 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 75e4e0761..090ab3bc2 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 |