Commit Graph

12465 Commits

Author SHA1 Message Date
Florian Fainelli
a931f49296 NAND: Fix integer overflow in ONFI detection of chips >= 4GiB
This patch sync with David's patch on Linux in nand_flash_detect_onfi()

	commit 4ccb3b4497ce01fab4933704fe21581e30fda1a5
	Author: David Woodhouse <David.Woodhouse@intel.com>
	Date:   Fri Dec 3 16:36:34 2010 +0000

    	mtd: nand: Fix integer overflow in ONFI detection of chips >= 4GiB

    	Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>

Signed-off-by: Florian Fainelli <florian@openwrt.org>
2011-04-15 15:53:11 -05:00
Fabio Estevam
73e5476e1e MAINTAINERS: fix email address case
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
2011-04-13 22:40:51 +02:00
Simon Glass
21076f61c7 Fix bad padding of bootp request packet
This seems to pad to one byte longer than required

Signed-off-by: Simon Glass <sjg@chromium.org>
2011-04-13 22:25:07 +02:00
Wolfgang Denk
f16b608ae7 Merge branch 'sf' of git://git.denx.de/u-boot-blackfin 2011-04-13 22:04:11 +02:00
Wolfgang Denk
107b56bdd8 Merge branch 'master' of git://git.denx.de/u-boot-x86 2011-04-13 21:53:09 +02:00
Peter Tyser
2c51983b81 cfi_flash: Fix CONFIG_SYS_FLASH_AUTOPROTECT_LIST usage
Commit 6ee1416e81 (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>
2011-04-13 21:50:25 +02:00
James Kosin
1c091f59a0 sf: sst: add support for SST25VF064C
Signed-off-by: James Kosin <jkosin@intcomgrp.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-13 15:39:08 -04:00
Graeme Russ
880c80d004 Merge branch 'master' of git://git.denx.de/u-boot-x86 2011-04-13 19:56:23 +10:00
Graeme Russ
b3acbb221d x86: Update MAINTAINERS and delete README files
The README files are totally out-of-date to the point where they do more
harm than good

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-13 19:43:30 +10:00
Graeme Russ
b7af583185 sc520: Move reset to stand-alone file
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

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-13 19:43:29 +10:00
Graeme Russ
fea2572001 x86: Rename i386 to x86
Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-13 19:43:28 +10:00
Graeme Russ
dbf7115a32 x86: Code cleanup
Make the copyright notices in the x86 files consistent and update them with
proper attributions for recent updates

Also fix a few comment style/accuracy and whitespace/blank line issues

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-13 19:43:26 +10:00
Graeme Russ
e413554f9d eNET: Remove config.mk
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

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-13 19:43:25 +10:00
Graeme Russ
ec8016c856 eNET: Fix saveenv crash
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

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
2011-04-13 19:43:24 +10:00
Lei Wen
b16aadf411 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.

Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-04-12 22:58:35 +02:00
Remy Bohmer
9eeaa8e66c 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.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
2011-04-12 22:58:34 +02:00
Wolfgang Denk
976b38c074 mkimage: add "-V" option to print version information
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-04-12 22:58:33 +02:00
Macpaul Lin
04c2dd827b 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>
2011-04-12 22:58:33 +02:00
Andreas Bießmann
418e046d89 common/cmd_bdinfo.c: fix do_bdinfo() for AVR32
This patch fixes following warning message:

---8<---
cmd_bdinfo.c:458: warning: initialization from incompatible pointer type
--->8---

There was a prototype change in 54841ab50c 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 Biemann <biessmann@corscience.de>
2011-04-12 22:58:32 +02:00
Andreas Bießmann
8c3aff525c cmd_nvedit: use explicit typecast for printf
This patch fixes warnings in MAKEALL for avr32:

---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 Biemann <biessmann@corscience.de>
2011-04-12 22:58:32 +02:00
Wolfgang Denk
8ae86b76c6 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>
2011-04-12 22:58:32 +02:00
Loïc Minier
13d72f02ef 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.

Signed-off-by: Loc Minier <loic.minier@linaro.org>
2011-04-12 22:58:31 +02:00
Loïc Minier
6052cbab40 Fix misc spelling errors found by lintian
Signed-off-by: Loc Minier <loic.minier@linaro.org>
2011-04-12 22:58:31 +02:00
Catalin Radu
f039ada5c1 Fix gunzip to work for any gziped uImage size
Signed-off-by: Catalin Radu <Catalin@VirtualMetrix.com>
2011-04-12 22:58:30 +02:00
Aaron Williams
1472af34c1 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>
2011-04-12 22:58:30 +02:00
Mike Frysinger
8a07de03f0 cmd_sf: use cmd_usage() in more places
Requires a little reworking of the code flow with sub-functions, but
not a big deal.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12 02:30:25 -04:00
Mike Frysinger
840ff99889 cmd_sf: drop device status message when probing
The common spi flash layer displays useful info when probing, so no
need for us to duplicate that.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12 02:30:25 -04:00
Mike Frysinger
493c360721 sf: use print_size() for sector_size output
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12 02:30:25 -04:00
Richard Retanubun
334eb4b02f cmd_sf: add handler for +len arg for erase command
This patch adds [+]len handler for the erase command that will
automatically round up the requested erase length to the flash's
sector_size.

Signed-off-by: Richard Retanubun <RichardRetanubun@RuggedCom.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12 02:30:25 -04:00
Mike Frysinger
f8f0757dcb sf: localize erase funcs
No need for these to be exported as they are only accessed indirectly
via function pointers.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12 02:15:56 -04:00
Mike Frysinger
c5910874ba sf: sst: setup read func
The previous unification patch missed setting up the sst read func.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-12 02:15:54 -04:00
Richard Retanubun
4e6a515899 sf: add struct spi_flash.sector_size parameter
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>
2011-04-12 02:15:37 -04:00
Mike Frysinger
cdb6a00fb8 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.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 23:41:09 -04:00
Mike Frysinger
192b639ecc sf: punt unused spi_flash_region struct
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 23:40:59 -04:00
Macpaul Lin
9096963c72 ftwdt010_wdt: support faraday ftwdt010 watchdog
Faraday ftwdt010 watchdog is an architecture independant
watchdog. It is usually used in SoC chip design.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-04-11 22:47:52 +02:00
Eric Bénard
ee986e2a7d mp2usb: remove board support
this board was cancelled long time ago so remove it as it won't
be maintained anymore

Signed-off-by: Eric Bnard <eric@eukrea.com>
2011-04-11 22:44:02 +02:00
Andreas Huber
91a3c14cd0 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>
2011-04-11 22:41:37 +02:00
Holger Brunck
086f09150d 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.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
2011-04-11 22:39:25 +02:00
Roy Zang
2c2668f971 Net: Add Intel E1000 82574L PCIe card support
Add Intel E1000 82574L PCIe card support. Test on MPC8544DS
and MPC8572 board.
Add the missing contact information for future support.

Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2011-04-11 22:20:13 +02:00
Joakim Tjernlund
39768f7715 PowerPC: Add support for -msingle-pic-base
-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

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2011-04-11 21:38:47 +02:00
Joakim Tjernlund
33ee4c9233 PowerPC: Move -fPIC flag to common place
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)

 #ifndef RS6000_BI_ARCH
--

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
2011-04-11 21:36:41 +02:00
Ben Gardiner
7d2fade7b1 ea20: fix undefined PHY_* errors
This patch fixes ea20 after 8ef583a035 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>
2011-04-11 21:28:44 +02:00
Ben Gardiner
fa9cd788bc ea20: fix libea20.o not found
This patch fixes ea20 after commit 6d8962e814
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.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Sebastien Carlier <sebastien.carlier@gmail.com>
Acked-by : Stefano Babic <sbabic@denx.de>
2011-04-11 21:26:48 +02:00
Lei Wen
02cf345973 bootm: replace blob_start with image_start
For uImage always has a 64 bytes header, we couldn't expect to do
the xip from the header but should xip from the image start.

The latter logic in that section is also move the image from image_start
to the load address, so sync this logic to the xip operation.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 21:10:44 +02:00
Mike Frysinger
a4c3b40b33 sf: unify read functions
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 21:00:55 +02:00
Mike Frysinger
e7b44eddbe sf: unify erase functions
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 21:00:54 +02:00
Mike Frysinger
6163045bcd 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.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 21:00:53 +02:00
Mike Frysinger
000044d8bf sf: unify read/write helpers
These functions largely do the same exact thing, so unify them all
into one basic function.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-04-11 21:00:49 +02:00
Wolfgang Denk
17e967b3df Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2011-04-10 21:24:40 +02:00
Wolfgang Denk
4fd783d63f Merge branch 'next' of git://git.denx.de/u-boot-nios 2011-04-10 21:20:28 +02:00