Commit 6ee1416e8184b4d9ebe6087d396a60bcecf3551c (mtd, cfi: introduce
void flash_protect_default(void)) introduced a bug which resulted in
boards that define CONFIG_SYS_FLASH_AUTOPROTECT_LIST not compiling with
the the following errors and warning:
ptyser@petert u-boot $ make -s xpedite520x
Configuring for xpedite520x board...
cfi_flash.c: In function 'flash_protect_default':
cfi_flash.c:2118: error: 'i' undeclared (first use in this function)
cfi_flash.c:2118: error: (Each undeclared identifier is reported only once
cfi_flash.c:2118: error: for each function it appears in.)
cfi_flash.c:2118: error: 'apl' undeclared (first use in this function)
cfi_flash.c:2118: error: invalid application of 'sizeof' to incomplete type 'struct apl_s'
cfi_flash.c: In function 'flash_init':
cfi_flash.c:2137: warning: unused variable 'apl'
Signed-off-by: Peter Tyser <ptyser@xes-inc.com> Reported-by: Kumar Gala <galak@kernel.crashing.org> Cc: Heiko Schocher <hs@denx.de>
Partial linking allows weak functions to be overridden in files containing
only one function. Moving the sc520 override of reset_cpu gets rid of an
ugly #ifdef
By including <config.h> in the ld script, CONFIG_SYS_MONITOR_LEN (defined
in the boards config file) can be used in lieu of FLASH_SIZE (defined in
the board specific config.mk)
As this is the last remaining entry in the board specific config.mk, this
file can now be removed
CONFIG_ENV_SIZE = CONFIG_ENV_SECT_SIZE = 128kB but CONFIG_SYS_STACK_SIZE
is only 32kB resulting in saveenv causing a stack overflow and crashing
U-Boot. Resolve by reducing CONFIG_ENV_SIZE to 4kB
Also fix up CONFIG_SYS_MALLOC_LEN to correctly use environment sector
size and add some comments to the memory organisation configuration
Lei Wen [Tue, 15 Feb 2011 08:56:40 +0000 (16:56 +0800)]
disk/part.c: fix potential stack overflow bug
If the param pass to get_dev is not the one defined in the block_drvr,
it could make uboot becomes unstable, for it would continue run after
search complete the block_drvr table.
Remy Bohmer [Sat, 12 Feb 2011 18:06:26 +0000 (19:06 +0100)]
Add support for dataflash to U-boot environment settings tool.
* The sector size for SPI-dataflash (like AT45 flashes) are not always
a power-of-2. So, the sector calculations are rewritten such that it
works for either power-of-2 as any size sectors.
* Make the flash sector size optional in case it is the same value as
the environment size.
Macpaul Lin [Tue, 12 Apr 2011 05:04:02 +0000 (13:04 +0800)]
ftwdt010_wdt: move header to include/faraday and enhance
1. Move header to include/faraday
2. Fix include path in ftwdt010_wdt.c
3. Fix function prototype and declaration to
- ftwdt010_wdt_settimeout
- ftwdt010_wdt_reset
- ftwdt010_wdt_disable
4. Add "#if definde (CONFIG_HW_WATCHDOG)" let user have flexibilty
to choose which better to his product.
Signed-off-by: Macpaul Lin <macpaul@andestech.com>
---8<---
cmd_bdinfo.c:458: warning: initialization from incompatible pointer type
--->8---
There was a prototype change in 54841ab50c20d6fa6c9cc3eb826989da3a22d934 for
argv[] pointer type to const. This change was not made for AVR32 cause this
code came in later by a merge.
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---8<---
cmd_nvedit.c: In function 'do_env_export':
cmd_nvedit.c:663: warning: format '%zX' expects type 'size_t', but argument 3 has type 'ssize_t'
--->8---
Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
Wolfgang Denk [Fri, 4 Feb 2011 13:25:17 +0000 (14:25 +0100)]
Make STANDALONE_LOAD_ADDR configurable per board
Rename STANDALONE_LOAD_ADDR into CONFIG_STANDALONE_LOAD_ADDR
and allow that the architecture-specific default value gets
overwritten by defining the value in the board header file.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Mike Frysinger <vapier@gentoo.org> Cc: Shinya Kuribayashi <skuribay@ruby.dti.ne.jp> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Tsi Chung Liew <tsi-chung.liew@freescale.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Loïc Minier [Thu, 3 Feb 2011 14:07:01 +0000 (15:07 +0100)]
Drop config.h include in tools/imximage.h
"make tools-all" should allow building tools such as mkimage and the new
imximage without any config, but imximage.c currently fails to build
with:
imximage.h:27:20: error: config.h: No such file or directory
config.h is not needed in imximage.h nor in imximage.c, and imximage.h
is only included from imximage.c, so drop this include to fix the build.
Aaron Williams [Tue, 1 Feb 2011 03:55:50 +0000 (19:55 -0800)]
Fix min/max macros in include/common.h
There is a bug in the min and max macros in common.h which occurs if
Y is a larger type than X. For example, if Y is a 64-bit value and X
is a 32-bit value then Y will be truncated to 32-bits. This fix
matches what is done in the Linux kernel but without the additional
type checking present in the kernel version.
Signed-off-by: Aaron Williams <aaron.williams@caviumnetworks.com>
This patch adds a new member to struct spi_flash (u16 sector_size)
and updates the spi flash drivers to start populating it.
This parameter can be used by spi flash commands that need to round
up units of operation to the flash's sector_size.
Having this number in one place also allows duplicated code to be
further collapsed into one common location (such as erase parameter
and the detected message).
Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 12 Apr 2011 03:39:28 +0000 (23:39 -0400)]
sf: atmel: undo unification of status polling
The AT45 flashes are completely different (at the command set and
status register level) from all other SPI flashes, so we can't unify
their logic with common code.
Andreas Huber [Tue, 25 Jan 2011 10:26:15 +0000 (11:26 +0100)]
ppc, mgcoge: add DIP switch detection
This reads the DIP switch on mgcoge. The DIP switch is connected to
the BFTICU (0x40000089) FPGA. If the DIP switch is set the environment
variable 'actual_bank' is set to 0 and starts the SW in bank0.
Signed-off-by: Andreas Huber <andreas.huber@keymile.com> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Holger Brunck [Tue, 25 Jan 2011 08:57:19 +0000 (09:57 +0100)]
arm, keymile: remove unneeded code
On first HW versions the BOCO FPGA was behind a MUX device. These
HW versions are not supported anymore. And therefore this code can
be removed, it is already unused.
-msingle-pic-base is a new gcc option for ppc and
it reduces the size of my u-boot with 6-8 KB.
While at it, add -fno-jump-tables too to save a
few more bytes.
-msingle-pic-base will be in gcc 4.6, however
backported patches are available at
http://bugs.gentoo.org/show_bug.cgi?id=347281
The -fPIC flag belongs with -mrelocatable, move it there.
Also change -fPIC to -fpic as this produces smaller
binaries.
However, currently -mrelocatable promotes -fpic to -fPIC, a
fix for this is in upcoming gcc 4.6 or you can apply this small
patch to gcc:
diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h
index 8da8410..e4b8280 100644
--- a/gcc/config/rs6000/sysv4.h
+++ b/gcc/config/rs6000/sysv4.h
@@ -227,7 +227,8 @@ do { \
} \
\
else if (TARGET_RELOCATABLE) \
- flag_pic = 2; \
+ if (!flag_pic) \
+ flag_pic = 2; \
} while (0)
Ben Gardiner [Tue, 11 Jan 2011 19:48:17 +0000 (14:48 -0500)]
ea20: fix undefined PHY_* errors
This patch fixes ea20 after 8ef583a0351590a91394499eb5ca2ab8a703d959 where
the u-boot custom PHY_ macros were replaced with those of linux/mii.h MII_
definitions except in the RMII support for davinci_emac. Probably also due to
the merge path of changes in 2010.12.
Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca> CC: Mike Frysinger <vapier@gentoo.org> Acked-by: Mike Frysinger <vapier@gentoo.org>
Ben Gardiner [Tue, 11 Jan 2011 19:48:16 +0000 (14:48 -0500)]
ea20: fix libea20.o not found
This patch fixes ea20 after commit 6d8962e814c15807dd6ac5757904be2a02d187b8
where $(obj)lib$(BOARD).a was changed to $(obj)lib$(BOARD).o in almost all the
Makefiles except ea20, probably due to merge path of the changes in 2010.12.
Mike Frysinger [Mon, 10 Jan 2011 07:20:12 +0000 (02:20 -0500)]
sf: unify status polling for ready bit
All of the spi flash drivers implement the status register polling for
detecting the device ready state, so unify them all in a new helper
function -- spi_flash_wait_ready.
Shaohui Xie [Wed, 16 Mar 2011 02:10:32 +0000 (10:10 +0800)]
powerpc/85xx: Add PBL boot from SPI flash support on P4080DS
PBL(pre-boot loader): SPI flash used as RCW(Reset Configuration Word) and
PBI(pre-boot initialization) source, CPC(CoreNet Platform Cache) used as
1M SRAM where PBL will copy whole U-BOOT image to, U-boot can boot from
CPC after PBL completes RCW and PBI phases.
Signed-off-by: Chunhe Lan <b25806@freescale.com> Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com> Signed-off-by: Shaohui Xie <b21989@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Jiang Yutang [Fri, 4 Mar 2011 02:25:54 +0000 (10:25 +0800)]
powerpc/85xx: Add support usb2/etsec and tdm/audio pin multiplex on P1022DS
For soc which have pin multiplex relation, some of them can't enable
simultaneously. This patch add environment var 'hwconfig' content
defination for them. you can enable some one function by setting
environment var 'hwconfig' content and reset board. Detail setting
please refer doc/README.p1022ds
Signed-off-by: Jiang Yutang <b14898@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Timur Tabi [Fri, 25 Mar 2011 19:11:48 +0000 (14:11 -0500)]
p4080ds: add README.p4080ds which documents the "serdes" hwconfig option
Add documentation for the "serdes" hwconfig option, which is used to
specify the status of SerDes banks two and three for the SERDES8 erratum
work-around.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Kumar Gala [Fri, 8 Apr 2011 07:46:39 +0000 (02:46 -0500)]
powerpc/85xx: Drop CONFIG_VIDEO support on corenet_ds boards
We don't really ever use Video cards on corenet_ds style boards and its
bloating our image which is close the its max size. Drop support and
also kill some defines for non-PNP PCI which we never use.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
renaming 85xx define CONFIG_NAND_OR_PRELIM to CONFIG_SYS_NAND_OR_PRELIM
and CONFIG_NAND_BR_PRELIM to CONFIG_SYS_NAND_BR_PRELIM to use the more
appropriate CONFIG_SYS prefix as well as be consistent with 83xx.
Signed-off-by: Matthew McClintock <msm@freescale.com>
cc: Scott Wood <scottwood@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
eNET: Fix undefined reference to `monitor_flash_len'
commit cfbe861506e2dc3250ac99dc45bb3d1ac60f4857 removed the definition of
monitor_flash_len from the eNET which was not picked up due to extensive
use of the SRAM configuration target for testing
Mike Frysinger [Fri, 24 Dec 2010 19:46:12 +0000 (14:46 -0500)]
Blackfin: turn off caches when self initializing
When bootstrapping ourselves on the fly at runtime (via "go"), we need to
turn off the caches to avoid taking software exceptions. Since caches
need CPLBs and CPLBs need exception handlers, but we're about to rewrite
the code in memory where those exception handlers live, we need to turn
off caches first.
This new code also encourages a slight code optimization by storing the
MMR bases in dedicated registers so we don't have to fully load up the
pointer regs multiple times.
Mike Frysinger [Fri, 24 Dec 2010 18:19:25 +0000 (13:19 -0500)]
Blackfin: only check for os log when we have external memory
If the part has no external memory configured, then there will be no os
log for us to check, and any attempt to access that memory will trigger
hardware errors.
Mike Frysinger [Fri, 24 Dec 2010 17:48:16 +0000 (12:48 -0500)]
Blackfin: fix bd_t handling
The recent global data changes (making the size autogenerated) broke the
board info handling on Blackfin ports as we were lying and lumping the
bd_t size in with the gd_t size. So use the new dedicated bd_t size to
setup its own address in memory.
Have CONFIG_ENV_ADDR be based on CONFIG_ENV_OFFSET rather than the other
way around so that we can use CONFIG_ENV_OFFSET during build. It also
avoids a little address duplication.