kernel/u-boot.git
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Wed, 27 Apr 2011 19:43:42 +0000 (21:43 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-blackfin

13 years agoMerge branch 'spi' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Wed, 27 Apr 2011 19:42:18 +0000 (21:42 +0200)]
Merge branch 'spi' of git://git.denx.de/u-boot-blackfin

13 years agompc52xx, digsy_mtc: add trickle charger support for rev5 boards.
Heiko Schocher [Mon, 28 Mar 2011 07:24:23 +0000 (09:24 +0200)]
mpc52xx, digsy_mtc: add trickle charger support for rev5 boards.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agortc, rv3029: add trickle charger support.
Heiko Schocher [Mon, 28 Mar 2011 07:24:22 +0000 (09:24 +0200)]
rtc, rv3029: add trickle charger support.

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoFix typo in #error: IS_IN_NOWHERE vs. IS_NOWHERE
Loïc Minier [Thu, 24 Mar 2011 16:21:42 +0000 (17:21 +0100)]
Fix typo in #error: IS_IN_NOWHERE vs. IS_NOWHERE

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
13 years agoBlackfin: adi boards: add eon to the "all" spi flash list
Mike Frysinger [Tue, 12 Apr 2011 05:42:05 +0000 (01:42 -0400)]
Blackfin: adi boards: add eon to the "all" spi flash list

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf506f-ezkit: disable import/export env commands
Mike Frysinger [Mon, 10 Jan 2011 05:48:53 +0000 (00:48 -0500)]
Blackfin: bf506f-ezkit: disable import/export env commands

Space is very tight on this board, so remove more extraneous commands.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoBlackfin: bf537-stamp/bf527-ad7160-eval: convert to mmc_spi
Mike Frysinger [Fri, 24 Dec 2010 17:53:47 +0000 (12:53 -0500)]
Blackfin: bf537-stamp/bf527-ad7160-eval: convert to mmc_spi

Switch to the new common mmc_spi driver.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agobfin_spi: add spi_set_speed
Thomas Chou [Fri, 24 Dec 2010 07:16:08 +0000 (15:16 +0800)]
bfin_spi: add spi_set_speed

The new speed will be applied by spi_claim_bus.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agospi: add spi_set_speed func
Thomas Chou [Fri, 24 Dec 2010 07:16:07 +0000 (15:16 +0800)]
spi: add spi_set_speed func

This func helps mmc_spi driver set correct speed for mmc/sd, as
mmc card needs 400KHz clock for spi mode initialization.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-cfi-flash
Wolfgang Denk [Sun, 24 Apr 2011 22:58:45 +0000 (00:58 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Sun, 24 Apr 2011 22:55:26 +0000 (00:55 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

13 years agopowerpc, 8xx: Fix fallout from "Fixup all 8xx u-boot.lds scripts"
Joakim Tjernlund [Sun, 24 Apr 2011 08:29:32 +0000 (10:29 +0200)]
powerpc, 8xx: Fix fallout from "Fixup all 8xx u-boot.lds scripts"

Two linker scripts for 8xx was missed.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
13 years agocfi_flash driver - Add delay after reset command
Aaron Williams [Tue, 12 Apr 2011 07:59:04 +0000 (00:59 -0700)]
cfi_flash driver - Add delay after reset command

I ran into a problem where the reset was failing except when I enabled
debugging support.  After talking with Garret Swalling at Spansion I
was told that the GL-N series of devices require a 500ns wait for the
reset to complete.  The below patch adds a 1us delay after all reset
commands.

-Aaron Williams

Signed-off-by: Aaron Williams <aaron.williams@caviumnetworks.com>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agomtd, cfi: read AMD 3-byte (expanded) device ids on 16bit devices
Heiko Schocher [Mon, 11 Apr 2011 12:16:19 +0000 (14:16 +0200)]
mtd, cfi: read AMD 3-byte (expanded) device ids on 16bit devices

tested on the a4m072 board with a S29GL512P flash.

flinfo without this patch
Bank # 1: CFI conformant flash (16 x 16)  Size: 32 MB in 256 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E
  Erase timeout: 16384 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 32 bytes
[...]

flinfo with this patch
Bank # 1: CFI conformant flash (16 x 16)  Size: 32 MB in 256 Sectors
  AMD Standard command set, Manufacturer ID: 0x01, Device ID: 0x227E2301
  Erase timeout: 16384 ms, write timeout: 2 ms
  Buffer write timeout: 5 ms, buffer size: 32 bytes
[...]

Signed-off-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agocfi_flash: reverse geometry for M29W800DT parts
Mike Frysinger [Sun, 10 Apr 2011 20:06:29 +0000 (16:06 -0400)]
cfi_flash: reverse geometry for M29W800DT parts

The M29W800DT parts also report their geometry with the sector layout
reversed.  So add that ID to the flash_fixup_stm function.

Otherwise, we get:
bfin> flinfo

Bank # 1: CFI conformant FLASH (16 x 16)  Size: 1 MB in 19 Sectors
  AMD Standard command set, Manufacturer ID: 0x20, Device ID: 0x22D7
  Erase timeout: 8192 ms, write timeout: 1 ms

  Sector Start Addresses:
  20000000        20004000        20006000        20008000        20010000
  20020000        20030000        20040000        20050000        20060000
  20070000        20080000        20090000        200A0000        200B0000
  200C0000        200D0000        200E0000        200F0000

Reported-by: Jianxi Fu <fujianxi@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Do not stop booting on any keypress on dlvision-10g
Dirk Eibach [Wed, 6 Apr 2011 11:53:50 +0000 (13:53 +0200)]
ppc4xx: Do not stop booting on any keypress on dlvision-10g

Use CONFIG_AUTOBOOT_KEYED on dlvision-10g so that booting can only be
stopped with well defined keypresses.

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Improve fan PWM curve on DLVision 10G
Dirk Eibach [Wed, 6 Apr 2011 11:53:49 +0000 (13:53 +0200)]
ppc4xx: Improve fan PWM curve on DLVision 10G

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Enable MPC92469AC on DLVision 10G
Dirk Eibach [Wed, 6 Apr 2011 11:53:48 +0000 (13:53 +0200)]
ppc4xx: Enable MPC92469AC on DLVision 10G

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Set DLVision 10G osd position to linux defaults
Dirk Eibach [Wed, 6 Apr 2011 11:53:47 +0000 (13:53 +0200)]
ppc4xx: Set DLVision 10G osd position to linux defaults

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Adapt DLVision 10G to new FPGA firmware
Dirk Eibach [Wed, 6 Apr 2011 11:53:46 +0000 (13:53 +0200)]
ppc4xx: Adapt DLVision 10G to new FPGA firmware

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Enable LM64 on DLVision 10G
Dirk Eibach [Mon, 18 Apr 2011 08:42:19 +0000 (10:42 +0200)]
ppc4xx: Enable LM64 on DLVision 10G

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Improve video board detection
Dirk Eibach [Wed, 6 Apr 2011 11:53:44 +0000 (13:53 +0200)]
ppc4xx: Improve video board detection

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoppc4xx: Improve DLVision-10G PLL setup
Dirk Eibach [Wed, 6 Apr 2011 11:53:43 +0000 (13:53 +0200)]
ppc4xx: Improve DLVision-10G PLL setup

Signed-off-by: Dirk Eibach <eibach@gdsys.de>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoxilinx_ppc_boards: Change address of RESET_VECTOR
Ricardo Ribalda Delgado [Wed, 12 Jan 2011 09:14:42 +0000 (10:14 +0100)]
xilinx_ppc_boards: Change address of RESET_VECTOR

Old address of RESET_VECTOR were overwritten by the bss sector, making
impossible its run from xmd.

Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agotools/env: fix redundant env flag comparison
Jon Povey [Fri, 11 Mar 2011 05:10:56 +0000 (14:10 +0900)]
tools/env: fix redundant env flag comparison

This fixes two bugs with comparison of redundant environment flags on
read.

flag0 and flag1 in fw_env_open() were declared signed instead of
unsigned char breaking BOOLEAN mode "== 0xFF" tests and in INCREMENTAL
mode the wrong environment would be chosen where the flag values are
127 and 128 (either way round). With both flags over 128, both signs
flipped and the logic worked by happy accident.

Also there was a logic bug in the INCREMENTAL test (after signedness was
fixed) in the case flag0=0, flag1=255, env 1 would be incorrectly chosen.

Fix both of these.

Signed-off-by: Jon Povey <jon.povey@racelogic.co.uk>
13 years agoMerge branch 'phylib' of git://git.denx.de/u-boot-mmc
Wolfgang Denk [Wed, 20 Apr 2011 21:01:52 +0000 (23:01 +0200)]
Merge branch 'phylib' of git://git.denx.de/u-boot-mmc

13 years agoMerge branch 'misc' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Wed, 20 Apr 2011 20:57:35 +0000 (22:57 +0200)]
Merge branch 'misc' of git://git.denx.de/u-boot-blackfin

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-fdt
Wolfgang Denk [Wed, 20 Apr 2011 20:53:34 +0000 (22:53 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-fdt

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Wolfgang Denk [Wed, 20 Apr 2011 20:50:22 +0000 (22:50 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Wed, 20 Apr 2011 20:48:47 +0000 (22:48 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Wolfgang Denk [Wed, 20 Apr 2011 20:18:13 +0000 (22:18 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

13 years agoRevert "PowerPC: Add support for -msingle-pic-base"
Wolfgang Denk [Wed, 20 Apr 2011 20:11:21 +0000 (22:11 +0200)]
Revert "PowerPC: Add support for -msingle-pic-base"

This reverts commit 39768f7715ed637ef02f49fc7de664cc1aaf14b3.

Reson: it breaks a number of boards with embedded environment as the
code size grows in some places.

13 years agoAdd mdio command for new PHY infrastructure
Andy Fleming [Mon, 21 Mar 2011 23:03:22 +0000 (18:03 -0500)]
Add mdio command for new PHY infrastructure

The new mdio command doesn't have all of the features of the mii
command, but it provides the necessary read/write primitives, and allows
users to interact with 10G PHYs, and other PHYs which use Clause 45 of
802.3.  This means that the mdio command requires a "Device Address"
argument, though for clause 22 PHYs, the argument can be "-".

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agofsl: Change fsl_phy_enet_if to phy_interface_t
Andy Fleming [Wed, 13 Apr 2011 05:37:12 +0000 (00:37 -0500)]
fsl: Change fsl_phy_enet_if to phy_interface_t

The fsl_phy_enet_if enum was, essentially, the phy_interface_t enum.
This meant that drivers which used fsl_phy_enet_if to deal with
PHY interfaces would have to convert between the two (or we would have
to have them mirror each other, and deal with the ensuing maintenance
headache). Instead, we switch all clients of fsl_phy_enet_if over to
phy_interface_t, which should become the standard, anyway.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agotsec: Convert tsec to use PHY Lib
Andy Fleming [Fri, 8 Apr 2011 07:10:54 +0000 (02:10 -0500)]
tsec: Convert tsec to use PHY Lib

This converts tsec to use the new PHY Lib.  All of the old PHY support
is ripped out.  The old MDIO driver is split off, and placed in
fsl_mdio.c.  The initialization is modified to initialize the MDIO
driver as well.  The powerpc config file is modified to configure PHYLIB
if TSEC_ENET is configured.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agophylib: Add a bunch of PHY drivers from tsec
Andy Fleming [Fri, 8 Apr 2011 02:56:05 +0000 (21:56 -0500)]
phylib: Add a bunch of PHY drivers from tsec

The tsec driver had a bunch of PHY drivers already written. This
converts them all into PHY Lib drivers, and serves as the first
set of PHY drivers for PHY Lib.

While doing that, cleaned up a number of magic numbers (though
not all of them, as PHY vendors like to keep their numbers as
magical as possible).  Also, noticed that almost all of the
vitesse/cicada PHYs had the same config/parse/startup functions,
so those have been collapsed into one.

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoCreate PHY Lib for U-Boot
Andy Fleming [Fri, 8 Apr 2011 07:10:27 +0000 (02:10 -0500)]
Create PHY Lib for U-Boot

Extends the mii_dev structure to participate in a full-blown MDIO and
PHY driver scheme.  The mii_dev structure and miiphy calls are modified
in such a way to allow the original mii command and miiphy
infrastructure to work as before, but also to support a new set of APIs
which allow (among other things) sharing of PHY driver code and 10G support

The mii command will continue to support normal PHY management functions
(Clause 22 of 802.3), but will not be changed to support 10G
(Clause 45).

The basic design is similar to PHY Lib from Linux, but simplified for
U-Boot's network and driver infrastructure.

We now have MDIO drivers and PHY drivers

An MDIO driver provides:
read
write
reset

A PHY driver provides:
(optionally): probe
config - initial setup, starting of auto-negotiation
startup - waiting for AN, and reading link state
shutdown - any cleanup needed

The ethernet drivers interact with the PHY Lib using these functions:
phy_connect()
phy_config()
phy_startup()
phy_shutdown()

Each PHY driver can be configured separately, or all at once using
config_phylib_all_drivers.h (added in the patch which adds the drivers)

We also provide generic drivers for Clause 22 (10/100/1000), and
Clause 45 (10G) PHYs.

We also implement phy_reset(), and call it in phy_connect(). Because
phy_reset() is essentially the same as miiphy_reset, but:
a) must support 10G PHYs, and
b) should use the phylib primitives,

we implement miiphy_reset, using phy_reset(), but only when
CONFIG_PHYLIB is set. Otherwise, we just use the old version. In this
way, we save on compile size, even if we don't manage to save code size.

Pulled ethtool.h and mdio.h from:
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
782d640afd15af7a1faf01cfe566ca4ac511319d
With many, many deletions so as to enable compilation under u-boot

Signed-off-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agopowerpc, 8xx: Fixup all 8xx u-boot.lds scripts
Joakim Tjernlund [Wed, 20 Apr 2011 12:22:59 +0000 (14:22 +0200)]
powerpc, 8xx: Fixup all 8xx u-boot.lds scripts

8xx was left behind when fixing up powerpc linking
scripts to support -fpic.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
13 years agomiiphy: Fix some formatting issues
Andy Fleming [Thu, 7 Apr 2011 19:38:35 +0000 (14:38 -0500)]
miiphy: Fix some formatting issues

Mostly putting a space between function name and "(", and
doing return (foo)

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agoRemove instances of phy_read/write
Andy Fleming [Wed, 23 Mar 2011 03:49:13 +0000 (22:49 -0500)]
Remove instances of phy_read/write

There were a few files which were already using phy_read and phy_write
for their PHY function names.  It's only a few places, and the name
seems most appropriate for the high-level abstraction, so let's
rename the other versions to something more specific.

Also, uec_phy.c had a marvell_init function which I renamed to not
conflict with the one in marvell.c

Lastly, uec_phy.c was putting a space between the phy writing
function names, and the open paren, so I fixed that

Signed-off-by: Andy Fleming <afleming@freescale.com>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agotsec: arrange the code to avoid useless function declaration
Mingkai Hu [Thu, 27 Jan 2011 04:52:46 +0000 (12:52 +0800)]
tsec: arrange the code to avoid useless function declaration

This is merely a rearrangement.  No changes to the code, except
to remove now-useless declarations.

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agotsec: use IO accessors for IO accesses
Mingkai Hu [Thu, 27 Jan 2011 04:52:45 +0000 (12:52 +0800)]
tsec: use IO accessors for IO accesses

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Acked-by: Andy Fleming <afleming@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: Detlev Zundel <dzu@denx.de>
13 years agofdt_support: Fix buffer overflow in fdt_fixup_memory_banks
Kyle Moffett [Wed, 23 Feb 2011 06:18:24 +0000 (06:18 +0000)]
fdt_support: Fix buffer overflow in fdt_fixup_memory_banks

When fdt_fixup_memory_banks is called with 2-cell address and size
fields in the device-tree (IE: 64-bit address and size), then it will
overflow its on-stack "tmp" buffer.

This fixes the buffer size and adds a comment explaining how many bytes
need to be allocated per record.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Jerry Van Baren <vanbaren@cideas.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
13 years agopowerpc/85xx: Modify NAND loader makefiles to compile NAND_SPL linker script
Dipen Dudhat [Sat, 9 Apr 2011 17:52:32 +0000 (12:52 -0500)]
powerpc/85xx: Modify NAND loader makefiles to compile NAND_SPL linker script

Modify eLBC based platform's NAND loader Makefile to preprocess nand loader
linker script and then use it.

Signed-off-by: Dipen Dudhat <Dipen.Dudhat@freescale.com>
CC: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agonand_spl: Fix large page nand_command()
Alex Waterman [Wed, 6 Apr 2011 20:01:52 +0000 (16:01 -0400)]
nand_spl: Fix large page nand_command()

This patch changes the large page nand_command() routine to use a word
offset instead of a byte offset. The 'offs' argument gets divided by 2
so that the offset passed to nand_command() is still by byte offset.
Originally, the offset was not shifted and when too high an offset was
requested the nand chip would attempt to read non-existent data.

Signed-off-by: Alex Waterman <awaterman@dawning.com>
13 years agonand/spl: Assuming a static nand page size to reduce code size
Matthew McClintock [Tue, 5 Apr 2011 19:39:34 +0000 (14:39 -0500)]
nand/spl: Assuming a static nand page size to reduce code size

Change variables to const to reduce code size, these values are
hardcoded via defines anyways so we might as well assume they
are constants

Signed-off-by: Matthew McClintock <msm@freescale.com>
cc: Scott Wood <scottwood@freescale.com>

13 years agoNAND: rearrange ONFI revision checking, add ONFI 2.3
Florian Fainelli [Sun, 3 Apr 2011 16:23:56 +0000 (18:23 +0200)]
NAND: rearrange ONFI revision checking, add ONFI 2.3

This patch sync with Brian's patch on Linux in nand_flash_detect_onfi()

commit b7b1a29d94c17e4341856381bccb4d17495bea60
Author: Brian Norris <computersforpeace@gmail.com>
Date:   Sun Dec 12 00:23:33 2010 -0800

    mtd: nand: rearrange ONFI revision checking, add ONFI 2.3

    In checking for the ONFI revision, the first conditional (for checking
    "unsupported" ONFI) seems unnecessary.  All ONFI revisions should be
    backwards-compatible; even if this is not the case on some newer ONFI
    revision, it should simply fail the second version-checking if-else block
    (i.e., the bit-fields for 1.0, 2.0, etc. would not be set to 1). Thus, we
    move our "unsupported" condition after having checked each bit field.

    Also, it's simple enough to add a condition for ONFI revision 2.3. Note
    that this does *NOT* mean we handle all new features of ONFI versions
    above 1.0.

Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Acked-by: Florian Fainelli <ffainelli@freebox.fr>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Florian Fainelli <florian@openwrt.org>
13 years agoNAND: Fix integer overflow in ONFI detection of chips >= 4GiB
Florian Fainelli [Sun, 3 Apr 2011 16:23:52 +0000 (18:23 +0200)]
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>
13 years agoI2C: OMAP: detect more devices when probing an i2c bus
Nick Thompson [Mon, 11 Apr 2011 22:37:41 +0000 (22:37 +0000)]
I2C: OMAP: detect more devices when probing an i2c bus

The omap24xx driver only seems to support devices that have a single subaddress
byte. With these types of devices, the first access in a bus transaction is
usually a write (writes the subaddress) followed by either a read or write to
access the devices registers.

Many such devices will respond to a read as the first access, but there are at
least some that will NACK such a read. (e.g. ADV7180.)

The probe function attempts to detect a devices ACK to a read access only and
fails to find devices that NACK a read.

This commit modifies the probe function to start a write instead. This detects
devices that respond to reads (since they must also respond to writes) as well
as those that only respond to writes. The bus is immediately set to idle after a
(N)ACK avoiding actually writing anything to the device.

Signed-off-by: Nick Thompson <nick.thompson@ge.com>
13 years agoMAINTAINERS: fix email address case
Fabio Estevam [Mon, 21 Feb 2011 18:02:07 +0000 (15:02 -0300)]
MAINTAINERS: fix email address case

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoFix bad padding of bootp request packet
Simon Glass [Wed, 2 Feb 2011 23:03:28 +0000 (15:03 -0800)]
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>
13 years agoMerge branch 'sf' of git://git.denx.de/u-boot-blackfin
Wolfgang Denk [Wed, 13 Apr 2011 20:04:11 +0000 (22:04 +0200)]
Merge branch 'sf' of git://git.denx.de/u-boot-blackfin

13 years agogpio: check request result
Mike Frysinger [Tue, 12 Apr 2011 07:02:11 +0000 (03:02 -0400)]
gpio: check request result

Make sure the pin request passed before attempting to use it later on.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoconfig_defaults.h: drop OSE bootm default
Mike Frysinger [Fri, 8 Apr 2011 04:39:46 +0000 (00:39 -0400)]
config_defaults.h: drop OSE bootm default

Most arches don't support OSE, and this is a new bootm target, so the
likelihood of any board actually wanting this today is fairly low.

Any board who actually wants this can enable it in the board-specific
config without making it a default bloat.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agogpio: generalize for all generic gpio providers
Mike Frysinger [Sun, 3 Apr 2011 08:40:46 +0000 (04:40 -0400)]
gpio: generalize for all generic gpio providers

The Blackfin gpio command isn't terribly Blackfin-specific.  So generalize
the few pieces into two new optional helpers:
name_to_gpio() - turn a string name into a GPIO #
gpio_status() - display current pin bindings (think /proc/gpio)

Once these pieces are pulled out, we can relocate the cmd_gpio.c into the
common directory.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agomd5sum/sha1sum/unzip: split out of mondo mem file
Mike Frysinger [Sun, 3 Apr 2011 01:40:19 +0000 (21:40 -0400)]
md5sum/sha1sum/unzip: split out of mondo mem file

There's no real need to keep these functions in the cmd_mem file since
they do not use any of the common global mem variables.  So split them
out into their own dedicated cmd files.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agocrc32: make command optional
Mike Frysinger [Tue, 21 Dec 2010 19:19:51 +0000 (14:19 -0500)]
crc32: make command optional

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agomake `go` optional
Mike Frysinger [Mon, 27 Dec 2010 04:32:22 +0000 (23:32 -0500)]
make `go` optional

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoenv: make import/export optional
Mike Frysinger [Mon, 27 Dec 2010 04:09:45 +0000 (23:09 -0500)]
env: make import/export optional

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Wolfgang Denk [Wed, 13 Apr 2011 19:53:09 +0000 (21:53 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

13 years agocfi_flash: Fix CONFIG_SYS_FLASH_AUTOPROTECT_LIST usage
Peter Tyser [Wed, 13 Apr 2011 16:46:56 +0000 (11:46 -0500)]
cfi_flash: Fix CONFIG_SYS_FLASH_AUTOPROTECT_LIST usage

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>
13 years agosf: sst: add support for SST25VF064C
James Kosin [Wed, 13 Apr 2011 19:12:18 +0000 (15:12 -0400)]
sf: sst: add support for SST25VF064C

Signed-off-by: James Kosin <jkosin@intcomgrp.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMMC may wrongly regconize 2GB eMMC as high capacity
Raffaele Recalcati [Wed, 23 Mar 2011 04:06:50 +0000 (04:06 +0000)]
MMC may wrongly regconize 2GB eMMC as high capacity

Hi Terry,

> So I guess:
> mmc_init calls mmc_send_op_cond  that set  high_capacity,
> than it calls mmc_startup, that, with MMC_CMD_SEND_CSD  command, set
> the capacity, using values in CSD register.
> So I guess that mmc_change_freq should not recalculate high_capacity.
>
> It seems better, isn't it?
>
> Regards,
> Raffaele
>

Finally I think that it is enough to apply the following patch in order
to fix the issue.

Regards,
Raffaele

Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: trace added
Raffaele Recalcati [Fri, 11 Mar 2011 02:01:14 +0000 (02:01 +0000)]
mmc: trace added

Defining CONFIG_MMC_TRACE in the include board file it is possible to activate
a tracing support.
This code helps in case of eMMC hw failure or to investigate possible eMMC
initialization issues.

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: SEND_OP_COND considers card capabilities (voltage)
Raffaele Recalcati [Fri, 11 Mar 2011 02:01:13 +0000 (02:01 +0000)]
mmc: SEND_OP_COND considers card capabilities (voltage)

The first SEND_OP_COND (CMD1) command added is used to ask card capabilities.
After it an AND operation is done between card capabilities and host
capabilities (at the moment only for the voltage field).
Finally the correct value is sent to the MMC, waiting that the card
exits from busy state.

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: checking status after commands with R1b response
Raffaele Recalcati [Fri, 11 Mar 2011 02:01:12 +0000 (02:01 +0000)]
mmc: checking status after commands with R1b response

It is recommended to check card status after these kind of commands.
This is done using CMD13 (SEND_STATUS) JEDEC command until
the card is ready.
In case of error the card status field is displayed.

Signed-off-by: Raffaele Recalcati <raffaele.recalcati@bticino.it>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: remove duplicated header file
Minkyu Kang [Tue, 4 Jan 2011 01:04:56 +0000 (01:04 +0000)]
mmc: remove duplicated header file

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: show mmc capacity using print_size
Minkyu Kang [Tue, 4 Jan 2011 01:04:19 +0000 (01:04 +0000)]
mmc: show mmc capacity using print_size

Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: add generic mmc spi driver
Thomas Chou [Fri, 24 Dec 2010 13:12:21 +0000 (13:12 +0000)]
mmc: add generic mmc spi driver

This patch supports mmc/sd card with spi interface. It is based on
the generic mmc framework. It works with SDHC and supports multi
blocks read/write.

The crc checksum on data packet is enabled with the def,

There is a subcomamnd "mmc_spi" to setup spi bus and cs at run time.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agommc: constify & localize data
Mike Frysinger [Wed, 20 Oct 2010 01:15:53 +0000 (01:15 +0000)]
mmc: constify & localize data

These local vars need not be writable nor exported.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agodrivers/mmc/fsl_esdhc.c: reordered tests
Frans Meulenbroeks [Sat, 31 Jul 2010 04:45:18 +0000 (04:45 +0000)]
drivers/mmc/fsl_esdhc.c: reordered tests

As DATA_ERROR includes the value IRQSTAT_DTOE, a timeout error
would yield the first error return instead of TIMEOUT.
By swapping the test TIMEOUTs are reported as such

An alternate solution would be to remove the IRQSTAT_DTOE from the DATA_ERROR define
but as that one might be less desired I've opted for the simplest solution

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agoadd CONFIG_SPI_IDLE_VAL for cf_spi.c to allow use of spi_mmc
Wolfgang Wegner [Fri, 23 Apr 2010 05:43:12 +0000 (05:43 +0000)]
add CONFIG_SPI_IDLE_VAL for cf_spi.c to allow use of spi_mmc

This patch adds CONFIG_SPI_IDLE_VAL to cf_spi.c
The default setting is 0x0 to behave same as current version, in case
CONFIG_SPI_MMC is set, the value is set to 0xFFFF (all ones). In either
case, the value can be overwritten by board configuration.

Signed-off-by: Wolfgang Wegner <w.wegner@astro-kom.de>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agoMMC: Max blocks value adjustable
Matt Waddel [Thu, 24 Feb 2011 16:35:23 +0000 (16:35 +0000)]
MMC: Max blocks value adjustable

The maximum blocks value was hardcoded to 65535 due to a 16 bit
register length.  The value can change for different platforms.
This patch makes the default the current value of 65535, but it
is configurable for other platforms.

Signed-off-by: Matt Waddel <matt.waddel@linaro.org>
Signed-off-by: Andy Fleming <afleming@freescale.com>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Graeme Russ [Wed, 13 Apr 2011 09:56:23 +0000 (19:56 +1000)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

13 years agox86: Update MAINTAINERS and delete README files
Graeme Russ [Wed, 13 Apr 2011 09:43:30 +0000 (19:43 +1000)]
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>
13 years agosc520: Move reset to stand-alone file
Graeme Russ [Wed, 13 Apr 2011 09:43:29 +0000 (19:43 +1000)]
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>
13 years agox86: Rename i386 to x86
Graeme Russ [Wed, 13 Apr 2011 09:43:28 +0000 (19:43 +1000)]
x86: Rename i386 to x86

Signed-off-by: Graeme Russ <graeme.russ@gmail.com>
13 years agox86: Code cleanup
Graeme Russ [Wed, 13 Apr 2011 09:43:26 +0000 (19:43 +1000)]
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>
13 years agoeNET: Remove config.mk
Graeme Russ [Wed, 13 Apr 2011 09:43:25 +0000 (19:43 +1000)]
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>
13 years agoeNET: Fix saveenv crash
Graeme Russ [Wed, 13 Apr 2011 09:43:24 +0000 (19:43 +1000)]
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>
13 years agoSD1.00 wide-bus fix
Alagu Sankar [Wed, 12 May 2010 09:38:24 +0000 (15:08 +0530)]
SD1.00 wide-bus fix

Fixed a bug wherein SD version 1.0 cards were not configured for 4-bit mode

Signed-off-by: Alagu Sankar <alagusankar@embwise.com>
13 years agodisk/part.c: fix potential stack overflow bug
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.

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agoAdd support for dataflash to U-boot environment settings tool.
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.

Signed-off-by: Remy Bohmer <linux@bohmer.net>
13 years agomkimage: add "-V" option to print version information
Wolfgang Denk [Sat, 12 Feb 2011 09:37:11 +0000 (10:37 +0100)]
mkimage: add "-V" option to print version information

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoftwdt010_wdt: move header to include/faraday and enhance
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>
13 years agocommon/cmd_bdinfo.c: fix do_bdinfo() for AVR32
Andreas Bießmann [Wed, 9 Feb 2011 14:10:31 +0000 (15:10 +0100)]
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 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>
13 years agocmd_nvedit: use explicit typecast for printf
Andreas Bießmann [Wed, 9 Feb 2011 14:10:29 +0000 (15:10 +0100)]
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 Bießmann <biessmann@corscience.de>
13 years agoMake STANDALONE_LOAD_ADDR configurable per board
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>
13 years agoDrop config.h include in tools/imximage.h
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.

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
13 years agoFix misc spelling errors found by lintian
Loïc Minier [Thu, 3 Feb 2011 21:04:26 +0000 (22:04 +0100)]
Fix misc spelling errors found by lintian

Signed-off-by: Loïc Minier <loic.minier@linaro.org>
13 years agoFix gunzip to work for any gziped uImage size
Catalin Radu [Fri, 4 Feb 2011 12:35:47 +0000 (14:35 +0200)]
Fix gunzip to work for any gziped uImage size

Signed-off-by: Catalin Radu <Catalin@VirtualMetrix.com>
13 years agoFix min/max macros in include/common.h
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>
13 years agocmd_sf: use cmd_usage() in more places
Mike Frysinger [Tue, 12 Apr 2011 06:21:31 +0000 (02:21 -0400)]
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>
13 years agocmd_sf: drop device status message when probing
Mike Frysinger [Tue, 12 Apr 2011 06:10:19 +0000 (02:10 -0400)]
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>
13 years agosf: use print_size() for sector_size output
Mike Frysinger [Tue, 12 Apr 2011 06:09:28 +0000 (02:09 -0400)]
sf: use print_size() for sector_size output

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agocmd_sf: add handler for +len arg for erase command
Richard Retanubun [Wed, 16 Feb 2011 21:39:44 +0000 (16:39 -0500)]
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>
13 years agosf: localize erase funcs
Mike Frysinger [Tue, 12 Apr 2011 05:51:29 +0000 (01:51 -0400)]
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>
13 years agosf: sst: setup read func
Mike Frysinger [Tue, 12 Apr 2011 05:34:55 +0000 (01:34 -0400)]
sf: sst: setup read func

The previous unification patch missed setting up the sst read func.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agosf: add struct spi_flash.sector_size parameter
Richard Retanubun [Wed, 16 Feb 2011 21:37:22 +0000 (16:37 -0500)]
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>