Commit Graph

11200 Commits

Author SHA1 Message Date
Stefan Roese f852628638 zlib/gunzip: Use WATCHDOG_RESET macro
As usually done in U-Boot, the watchdog_reset code is called via a
macro (WATCHDOG_RESET). In zlib.c this was done differently, by using
a function pointer which is initialized with WATCHDOG_RESET upon watchdog
usage or with NULL otherwise. This patch now uses the plain
WATCHDOG_RESET macros to call the function resulting in slightly smaller
U-Boot images and simpler code.

U-Boot code size reduction:

PowerPC board with watchdog support (lwmon5):
-> 80 bytes smaller image size

PowerPC board without watchdog support (sequoia):
-> 112 bytes smaller image size

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Detlev Zundel <dzu@denx.de>
Cc: Wolfgang Denk <wd@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-10-12 21:15:10 +02:00
Anatolij Gustschin 6213b8ffa5 pdm360ng: add EDID property to FDT display node
PDM360NG board uses this functionality to pass display
timing info to the Linux Framebuffer driver.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
2010-10-12 21:07:13 +02:00
Anatolij Gustschin beca5a5f5b fdt_support: support adding EDID property to FDT display nodes
Boards can pass display timing info for drivers using EDID
block. Provide common function to add board specific EDID
data to the device tree. Subsequent patch makes use of this
functionality.

Detailed timing descriptor data from EDID is used for
programming the display controller. This is currently
implemented on the Linux side by the fsl-diu-fb frame
buffer driver and it is documented there in
Documentation/powerpc/dts-bindings/fsl/diu.txt.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Acked-by: Detlev Zundel <dzu@denx.de>
Cc: Gerald Van Baren <vanbaren@cideas.com>
2010-10-12 21:05:58 +02:00
Alexander Stein c000808b6a CONFIG_CMD_JFFS2 is not necessary to use mtdparts on erase & protect on/off
The include <jffs2/jffs2.h> is still necessary though.

Signed-off-by: Alexander Stein <alexander.stein@systec-electronic.com>
Acked-by: Stefan Roese <sr@denx.de>
2010-10-12 21:02:55 +02:00
Wolfgang Denk c0c3590bb2 Merge branch 'master' of git://git.denx.de/u-boot-cfi-flash 2010-10-12 20:49:27 +02:00
Wolfgang Denk 655c549752 Merge branch 'master' of git://git.denx.de/u-boot-microblaze 2010-10-12 20:48:01 +02:00
Wolfgang Denk 0ee8746a93 Merge branch 'master' of git://git.denx.de/u-boot-net 2010-10-12 20:44:46 +02:00
John Schmoller 0e3fa01a63 cfi_flash: Fix "Unknown FLASH" error message
When a CFI flash chip could not be detected an error message similar to
the following would be printed on bootup:

 FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 0 MB

The printf incorrectly converted the flash size into megabytes.  This
patch fixes the printing of the flash size in megabytes:

 FLASH: ## Unknown FLASH on Bank 1 - Size = 0x01000000 = 16 MB

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2010-10-12 08:59:15 +02:00
Michal Simek b98cba0911 microblaze: Support little-endian microblaze target
Microblaze little-endian toolchain should export
__MICROBLAZEEL__.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:51:34 +10:00
Michal Simek d69f8f41af microblaze: Add support for NET_MULTI api
Microblaze hasn't supported NET_MULTI support.

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:51:34 +10:00
Michal Simek 4aecfb1602 microblaze: Fix microblaze-generic config file
1. Fix preprocessor statements
2. Clean coding style

Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:44:21 +10:00
Stephan Linz c82a541d47 microblaze: generic: rename MTD partition set to 'flash-0'
Signed-off-by: Stephan Linz <linz@li-pro.net>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:44:21 +10:00
Stephan Linz 3faf987de5 microblaze: generic: adding DHCP support
Signed-off-by: Stephan Linz <linz@li-pro.net>
Signed-off-by: Michal Simek <monstr@monstr.eu>
2010-10-12 16:44:21 +10:00
Thomas Chou 1ca6d0df3e smc91111: add write_hwaddr
Add smc_write_hwaddr() to set mac address.
Clear dev before use.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:28 -07:00
Ben Gardiner 7b37a27e14 davinci_emac: davinci_eth_set_mac_addr to ->write_hwaddr
This patch proposes to migrate the davinci_emac driver to using the
eth_device->write_hwaddr function pointer as suggested by Ben Warren.

All the davinci boards had the behaviour, prior to this patch, of
sync'ing the environment variable enetaddr with the MAC address read
from non-volatile storage on boot -- when the two locations disagreed,
the environment variable value took precendence. This patch keeps the
same behaviour but lets eth_initialize take care of it.

This patch refactors davinci_emac setup in the boards so that the MAC
address is read from non-volatile storage into the environment variable
and then the environment variable value is use in eth_intialize. The
only exception is the direct call to davinci_eth_set_mac_addr made by
the da830evm board init which was changed into an assignment of the
enetaddr field.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Tested-by: Nick Thompson <nick.thompson@ge.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:17 -07:00
Michal Simek 042272a6f2 net: Move Emaclite to NET_MULTI
Emaclite was using old net api that's why
this patch move emaclite to NET_MULTI api.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:07:04 -07:00
Peter Tyser bf6cb247a5 rarp: Condtionally compile rarp support
Most people don't use the 'rarpboot' command, so only enable it when
CONFIG_CMD_RARP is defined.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Michal Simek 3f91ec0fa1 net: Fix emaclite driver to support little-endian microblaze
Support New emaclite AXI IP.

Signed-off-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Ilya Yanok f87a6f27e6 mpc5xxx_fec: add call to reset_phy() after PHY initialization
Some boards need their board-specific PHY quirks to be called
to PHY to work normally. As mpc5xxx_fec driver uses on demand
PHY initialization and can even reinit PHY during normal operation
we can't count on reset_phy() call from arch/<arch>/lib/board.c
(it is most likely called _before_ we init the PHY from the
driver) so we need to add call to reset_phy() directly in the
driver.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Andreas Bießmann 77179067db drivers/net/at91_emac.c: change return values
Some return values pretended correct pass. This patch changes them according
to README.drivers.net. This patch changes e.g. command 'dhcp' to stop after
errorneous autonegotiation.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:29 -07:00
Andreas Bießmann e63ac4cf11 drivers/net/at91_emac.c: increase timeout for autonegotiation
This patch increases timeout for autonegotiation from 1 second to 3 seconds.
Some boards (e.g. at91rm9200ek) did not negotiate within 1 second.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 23:00:28 -07:00
Reinhard Meyer a61a81967f NET: add ENC28J60 driver using SPI framework
V3: further refinements:
- use priv member instead of container method
- allow setting of MAC address by write_hwaddr method
- avoid shutting down link between commands

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund f29c181cd4 UEC PHY: Speed up initial PHY neg.
Instead of always performing an autoneg, check if the PHY
already has a link and if it matches one of the requested
modes. Initially only 100MbFD is optimized this way.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Ben Warren 68e1ede88a Net: Remove redundant CONFIG_NET_MULTI directives
All are within an #ifdef CONFIG_NET_MULTI block already

Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund b0a75d7aa3 UEC PHY: Remove strange 0.5 sec delay
This udelay looks bogus and doesn't help my board.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund bd6c25afd2 UEC: Don't udelay needlessly
uec_init() adds an udelay(100000) even though
the PHY status read went well, don't do that.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Reinhard Meyer (-VC) b7081d9197 NET: move legacy enc28j60.c to sidetrack as enc28j60_lpc2292.c
This patch is required before the upcoming new enc28j60 driver
using SPI framework patch can be applied:
- Move legacy enc28j60.c to enc28j60_lpc2292.c.
- Change Makefile and the two affected boards' definition files.

Tested with ./MAKEALL ARM7 that both boards still compile.

Signed-off-by: Reinhard Meyer<info@emk-elektronik.de>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:48 -07:00
Joakim Tjernlund 91955834f5 net: Fix faulty definition of uec_initialize()
The correct definition is in drivers/qe/uec.h so just
remove this one.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
2010-10-11 22:47:47 -07:00
Enric Balletbo i Serra 456be17dbe mtd: OneNAND: add support for OneNAND manufactured by Numonyx
This patch adds the Numonyx manufacturer code (0x20) to
onenand manufacturers.

Signed-off-by: Enric Balletbo i Serra <eballetbo@gmail.com>
Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: Steve Sakoman <steve.sakoman@linaro.org>
2010-10-11 15:15:45 -05:00
Scott Wood fdd813def8 README: Add new NAND env features
CONFIG_ENV_SIZE does not need block alignment.

Document CONFIG_ENV_RANGE and CONFIG_ENV_OFFSET_OOB.

Signed-off-by: Scott Wood <scottwood@freescale.com>
2010-10-11 15:11:33 -05:00
Scott Wood 36650ca9f1 Followup fixes on the mtdparts spread patchset
Consolidate some code in mtd_get_len_incl_bad(), and fix a condition
where a valid partition could be reported as truncated if it has a
good block at the end of the device (unlikely, since the BBT is usually
there).

Fix mid-block declarations in net_part_size().

Signed-off-by: Scott Wood <scottwood@freescale.com>
Reviewed-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:11:01 -05:00
Ben Gardiner 59a50d2de1 mtdparts: new add.spread: add part skipping bad blocks
This patch adds a new 'mtdparts add' variant: add.spread. This command variant
adds a new partition to the mtdparts variable but also increases the partitions
size by skipping bad blocks and aggregating any additional bad blocks found at
the end of the partition.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Wolfgang Denk <wd@denx.de>
CC: Scott Wood <scottwood@freescale.com>
2010-10-11 15:11:01 -05:00
Ben Gardiner ca75b20ebb mtdparts: add new sub-command "spread"
This patch introduces the 'spread' sub-command of the mtdparts command.
This command will modify the existing mtdparts variable by increasing
the size of the partitions such that 1) each partition's net size is at
least as large as the size specified in the mtdparts variable and 2)
each partition starts on a good block.

The new subcommand is implemented by iterating over the mtd device
partitions and collecting a bad blocks count in each -- including any
trailing bad blocks -- and then modifying that partitions's part_info
structure and checking if the modification affects the next partition.

This patch is based on a port of the 'dynnamic partitions' feature by
Harald Welte <laforge@gnumonks.org>; ported from commit
e05835df019027391f58f9d8ce5e1257d6924798 of
git://git.openmoko.org/u-boot.git. Whereas Harald's feature used a
compile-time array to specify partitions, the feature introduced by
this patch uses the mtdparts environment variable.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Signed-off-by: Harald Welte <laforge@gnumonks.org>
CC: Wolfgang Denk <wd@denx.de>
CC: Scott Wood <scottwood@freescale.com>
2010-10-11 15:11:01 -05:00
Ben Gardiner 04ac380288 mtdparts: show net size in mtdparts list
This patch adds an additional column to the output of list_partitions. The
additional column will contain the net size and a '(!)' beside it if the net
size is not equal to the partition size.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Wolfgang Denk <wd@denx.de>
CC: Scott Wood <scottwood@freescale.com>
2010-10-11 15:11:00 -05:00
Ben Gardiner 4ba692fb1e mtd: add an mtd method for get_len_incl_bad()
The logic to 'spread' mtd partitions needs to calculate the length in
the mtd device, including bad blocks.

This patch introduces a new function, mtd_get_len_incl_bad that can
return both the length including bad blocks and whether that length
was truncated on the device. This new function will be used by the
mtdparts spread command later in this series. The definition of the
function is #ifdef'd out in configurations that do not use the new
'mtdparts spread' command.

Signed-off-by: Ben Gardiner<bengardiner@nanometrics.ca>
CC: Scott Wood <scottwood@freescale.com>
2010-10-11 15:11:00 -05:00
Ben Gardiner 0a026d3e86 mtdparts: regroup calls to get_mtd_device_nm
The get_mtd_device_nm function is called in a couple places and the
string that is passed to it is not really used after the calls.

This patch regroups the calls to this function into a new function,
get_mtd_info.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Stefan Roese <sr@denx.de>
CC: Wolfgang Denk <wd@denx.de>
2010-10-11 15:11:00 -05:00
Scott Wood 5b8e6bb517 nand: remove dead code and suspend/resume
Get rid of the several "#if 0" sections that were keeping around Linux
code that isn't relevant to U-Boot.  Besides cluttering the code, these
sections make tracking upstream changes harder, rather than easier.
It's easy to discard obviously irrelevant diff hunks that patch rejects,
but it's not as easy to notice hunks that apply cleanly to the #if 0
section, but *are* relevant to U-Boot and require modification elsewhere.

Also remove suspend/resume, as this is not applicable to U-Boot.  Removal
saves 232 bytes on powerpc.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:10:35 -05:00
Scott Wood 8c5659a6da nand commands: make only "dump" repeatable.
The dump command is made to increment its address on repeat,
as md does.  Other commands do not make sense to issue repeatedly,
and can be irritating when it happens accidentally, so don't.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:10:26 -05:00
Scott Wood 3048632251 nand erase: .spread, .part, .chip subcommands
A while back, in http://lists.denx.de/pipermail/u-boot/2009-June/054428.html,
Michele De Candia posted a patch to not count bad blocks toward the
requested size to be erased.  This is desireable when you're passing in
something like $filesize, but not when you're trying to erase a partition.

Thus, a .spread subcommand (named for consistency with
http://lists.denx.de/pipermail/u-boot/2010-August/075163.html) is introduced
to make explicit the user's desire to erase for a given amount of data,
rather than to erase a specific region of the chip.

While passing $filesize to "nand erase" is useful, accidentally passing
something like $fliesize currently produces quite unpleasant results, as the
variable evaluates to nothing and U-Boot assumes that you want to erase
the entire rest of the chip/partition.  To improve the safety of the
erase command, require the user to make explicit their intentions by
using a .part or .chip subcommand.  This is an incompatible user interface
change, but keeping compatibility would eliminate the safety gain, and IMHO
it's worth it.

While touching nand_erase_opts(), make it accept 64-bit offsets and sizes,
fix the percentage display when erase length is rounded up, eliminate
an inconsistent warning about rounding up the erase length which only
happened when the length was less than one block (rounding up for $filesize
is normal operation), and add a diagnostic if there's an attempt to erase
beginning at a non-block boundary.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:10:17 -05:00
Scott Wood ea533c260a cmd_nand: some infrastructure fixes and refactoring
- If the current device is overridden by a named partition,
  - update the caller's pointer/index, rather than copy over the
    nand_info struct, and
  - be sure to call board_nand_select_device even when the device
    is overridden by a named partition.
- Support 64-bit offsets/sizes in a few more places.
- Refactor arg_off_size for added readability and flexibility,
  and some added checks such as partition size.
- Remove redundant check for bad subcommands -- if there's no match
  it'll print usage when it gets to the end anyway.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:09:54 -05:00
Scott Wood f9a5254111 nand util: read/write: accept unaligned length
The underlying code in nand_base.c already supports non-page-aligned reads
and writes, but the block-skipping wrapper code did not.

With block skipping, an unaligned start address is not useful since you
really want to be starting at the beginning of a partition -- or at least
that's where you want to start checking for blocks to skip, but we don't
(yet) support that.  So we still require the start address to be aligned.

An unaligned length, though, is useful for passing $filesize to the
read/write command, and handling it does not complicate block skipping.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Tested-by: Ben Gardiner <bengardiner@nanometrics.ca>
2010-10-11 15:09:23 -05:00
Wolfgang Denk bfc7bea6ad Merge branch 'master' of git://git.denx.de/u-boot-x86 2010-10-11 10:00:34 +02:00
Wolfgang Denk 29840de6b6 Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2010-10-11 09:56:34 +02:00
Wolfgang Denk 02b117d42b Merge branch 'sf' of git://git.denx.de/u-boot-blackfin 2010-10-11 09:52:16 +02:00
Timur Tabi bfb707191a fsl: add support for NXID v1 EEPROM format
Freescale application note AN3638 describes an update to the NXID format,
which stores MAC addresses and related data on an on-board EEPROM.  The new
version adds support for up to 23 MAC addresses, instead of just 8.  Since
the initial implementation of NXID had a "0" in the 'version' field, this
new version is called "v1".

Boards that are shipped with EEPROMs in the NXID v1 format should define
CONFIG_SYS_I2C_EEPROM_NXID_1 instead of CONFIG_SYS_I2C_EEPROM_NXID.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:57:07 -05:00
Kim Phillips e95a0611f2 powerpc/85xx: fix rev.2 job queue LIODN error storm
pumping line-rate traffic though a p4080 rev.2, which
is configured to encrypt packets prior to forwarding through
an IPsec tunnel, gets this error:

of_platform ffe302000.jq: DECO: desc idx 22: LIODN error. DECO was trying
to share from itself or from another DECO but the two Non-SEQ LIODN
values didn't match or the "shared from" DECO's Descriptor required that
the SEQ LIODNs be the same and they aren't.

Since high traffic rates cause DECOs to begin to start sharing
shared descriptors amongst themselves, and DECOs inherit job queue
LIODNs when accessing shared descriptors, and a recently discovered
rev.2 h/w erratum requires all sharing job queues in a partition
have same liodn assignment, reassign the first job queue's liodn
assignment to the rest.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Kumar Gala 3c6a22b962 powerpc/p4080: Add new CPC register - HDBCR0
Manual was updated to add a new register for disabling CDQ speculation.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Kumar Gala 1bf8e9fd74 powerpc/85xx: Add support for 4th PCI controller on corenet_ds
We configure the controller but dont have virtual address space thus any
devices on the 4th controller are not accessible in u-boot.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Emil Medve c2b3b6408b powerpc/corenet_ds: Various updates to initial env cfg
* Make the U-Boot update command sequence conditional.  Helps prevent
  accidental erasing if an upload or previous step fails
* Make it easier to update other FLASH banks
* Enable DDR controller cache line interleaving and bank cs0/cs1 by default

Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00
Timur Tabi 3addcb9343 fsl: verify writes to the MAC address EEPROM
Update the code which writes to the on-board EEPROM so that it can detect if
the write failed because the EEPROM is write-protected.  Most of the 8xxx-class
Freescale reference boards use an AT24C02 EEPROM to store MAC addresses and
similar information.  With this patch, if the EEPROM is protected, the
"mac save" command will display an error message indicating that the write
has not succeeded.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
2010-10-07 09:49:47 -05:00