gunzip: Find the end of the header and call zunzip.
zunzip: Inflate gunzip block without header.
UBI fs blocks can be compresed in lzo, zlib or no-compression. The
current implementation of u-boot supported all the compressions but
there was a bug in the implementation of the zlib blocks.
UBIFS's Zlib blocks do not have header but they were compressed using
gunzip, a function used to decompress gunzip files/sectors with a
header.
This patch adds a new function zunzip that uncompress a zlib block with
no header.
The board-types defined in struct omap3_sysinfo seem to be
unused. The function display_board_info() is passed
board type as an argument; which is ignored.
This patch removes all uses of board-type, related definitions
and functions.
Stefan Roese [Wed, 18 Mar 2009 10:17:37 +0000 (11:17 +0100)]
MTD: Change cfi-mtd to accept non-uniform sector sizes
With this patch non-uniform NOR FLASH chips (chips with multiple erase
regions) can be exported via the cfi-mtd layer and therefor used by UBI.
We select the largest sector size as erasesize. The cfi driver will make
sure that the smaller sectors are handled correctly.
Fix bug in drawing long version/info strings:
U-Boot version string like
"U-Boot 2009.03-05647-g7c51e06 (Apr 23 2009 - 12:40:00) MPC83XX"
is long and doesn't wrap around correctly while drawing
beside the logo. Such long strings partially overwrite
the logo. This patch is an attempt to fix it.
Wolfgang Denk [Tue, 28 Apr 2009 06:50:31 +0000 (08:50 +0200)]
cmd_ext2.c: fix compile warnings
Get rid of these warnings:
cmd_ext2.c:247: warning: format '%ld' expects type 'long int', but argument 2 has type 'int'
cmd_ext2.c:248: warning: format '%lX' expects type 'long unsigned int', but argument 3 has type 'int'
Stefan Roese [Fri, 24 Apr 2009 13:59:35 +0000 (15:59 +0200)]
mtd: nand/onenand: Register mtd device upon device scanning
With this patch the NAND and OneNAND devices are registered in the MTD
subsystem and can then be referenced by the mtdcore code (e.g.
get_mtd_device_nm()). This is needed for the new "ubi part" command
syntax without the flash type parameter (nor|nand|onenand).
Stefan Roese [Fri, 24 Apr 2009 18:24:19 +0000 (20:24 +0200)]
ubi: Remove flash selection parameter (nor|nand|onenand) from "ubi part"
This patch removes the now unnecessary flash type parameter from the
"ubi part" command. Currently the user has to define the type of flash
he will be using UBI on. Example:
=> ubi part nor partition1
With this patch this type parameter is not needed anymore. The user can
now select the partition directly without the flash type paramter.
Example:
=> ubi part partition1
This breaks backward compatibility right now because of the change in the
command syntax. But UBI support is still quite fresh and the advantage of
this new command is syntax big enough for this change. Additionally the
code is much cleaner now.
Signed-off-by: Stefan Roese <sr@denx.de> CC: Kyungmin Park <kyungmin.park@samsung.com>
As the common code also handles baudrate switching, which the board
specific vct.c driver did not support, this is one of the rare
occassions where deleting code actually adds a feature :)
Ladislav Michl [Tue, 21 Apr 2009 00:26:31 +0000 (02:26 +0200)]
Separate mtdparts command from jffs2
On Thu, Mar 19, 2009 at 01:30:36PM +0100, Stefan Roese wrote:
> Currently the mtdparts commands are included in the jffs2 command support.
> This doesn't make sense anymore since other commands (e.g. UBI) use this
> infrastructure as well now. This patch separates the mtdparts commands from
> the jffs2 commands making it possible to only select mtdparts when no JFFS2
> support is needed.
One more leftover... Let nboot command know about partitions even if JFFS2
support is not enabled.
Signed-off-by: Ladislav Michl <ladis@linux-mips.org> Acked-by: Stefan Roese <sr@denx.de>
Peter Tyser [Mon, 20 Apr 2009 16:08:46 +0000 (11:08 -0500)]
Replace __attribute references with __attribute__
__attribute__ follows gcc's documented syntax and is generally more
common than __attribute. This change is only asthetic and should not
affect functionality.
Stefan Roese [Tue, 14 Apr 2009 15:51:21 +0000 (17:51 +0200)]
UBIFS: Remove tnc_commit.c which is not used in the read-only version
I missed removing this file while implementing the UBIFS support. It's
not referenced at all, so let's remove it. Thanks to Artem Bityutskiy
for spotting.
Adrian Hunter [Tue, 14 Apr 2009 15:50:38 +0000 (17:50 +0200)]
UBIFS: fix recovery bug
UBIFS did not recovery in a situation in which it could
have. The relevant function assumed there could not be
more nodes in an eraseblock after a corrupted node, but
in fact the last (NAND) page written might contain anything.
The correct approach is to check for empty space (0xFF bytes)
from then on.
Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Stefan Roese <sr@denx.de>
David Brownell [Fri, 17 Apr 2009 06:15:15 +0000 (23:15 -0700)]
dm9000 EEPROM reading bugfix
Make the U-Boot dm9000 driver read addresses from EEPROM just
like Linux does ... read six bytes, instead of reading twelve
bytes and then discarding every other one.
Using the right Ethernet address is a big win.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Ben Warren <biggerbadderben@gmail.com>
For a long time, the print_cpuinfo() declaration in lib_arm/board.c
had been marked as "test-only", which is plain wrong considering
current usage. Delete this misleading comment.
David Brownell [Sun, 12 Apr 2009 22:40:16 +0000 (15:40 -0700)]
minor DaVinci clock cleanup
Minor cleanup to clock-related defines for DaVinci DM6446 boards:
- CONFIG_SYS_CLK_FREQ is unused; remove it.
- CONFIG_SYS_NS16550_CLK must be the same as CONFIG_SYS_HZ_CLOCK
On DM6446 both of those peripheral clocks actually come from the
same source, the primary oscillator. Having them use the same
symbol avoids bugs in the clone'n'modify development cycle.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
83xx: searching "muram-data" by compatible property
if using CONFIG_BOOTCOUNT_LIMIT feature on a MPC8360 CPU
in the muram-data node, the reg entry needs to be updated.
This is done in fdt_fixup_muram(), but we should use
the compatible "fsl,qe-muram-data" for searching the
node instead of searching the muram-data node with
an absolute path.
Signed-off-by: Heiko Schocher <hs@denx.de> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
The size of U-Boot binary for MPC8360ERDK increased
(> 2 flash sectors now), so 'saveenv' will partially
overwrite U-Boot in flash and will brick the board.
This patch moves environment offset to fourth flash
sector and also fixes CONFIG_SYS_MONITOR_LEN.
Signed-off-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Michael Zaidman [Fri, 3 Apr 2009 22:43:00 +0000 (01:43 +0300)]
NetLoop initialization bug
The patch fixes the bug of partial initialization of global network
parameters.
Upon u-boot's start up the first ping command causes a failure of the
consequent TFTP command. It happens in the recently added mechanism of
the NetLoop initialization where initialization of global network
parameters is separated in the NetInitLoop routine which is called per
env_id change. Thus, ping request will initialize the network parameters
necessary for ping operation only, afterwards the env_changed_id will be
set to the env_id that will prevent all following initialization requests
from other protocols.
The problem is that the initialized by ping subset of network parameters
is not sufficient for other protocols and particularly for TFTP which
requires the NetServerIp also.
Signed-off-by: Michael Zaidman <michael.zaidman@gmail.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
Timur Tabi [Thu, 9 Apr 2009 15:27:05 +0000 (10:27 -0500)]
net: fix ULI 526x macro usage in netdev.h
Change netdev.h to use CONFIG_ULI526X instead of CONFIG_ULI526. CONFIG_ULI526X
is used everywhere else, so that's the correct macro name. Without this fix,
Ethernet will not work on the Freescale MPC8610 HPCD.
Signed-off-by: Timur Tabi <timur@freescale.com> Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
David Brownell [Sun, 12 Apr 2009 22:38:06 +0000 (15:38 -0700)]
fix DaVinci NS16550_REG_SIZE regression
Update the DaVinci DM6446 boards to use the new convention
for CONFIG_SYS_NS16550_REG_SIZE ... the size hasn't changed
from the original 4 bytes, but these chips are little-endian.
(Resolves a regression added recently by the include/ns16550.h
patch to "Unify structure declaration for registers". The code
previously worked just fine because the registers were accessed
as host-endian words, not as bytes.)
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Stefan Roese [Wed, 15 Apr 2009 12:08:48 +0000 (14:08 +0200)]
ppc4xx: Disable POST memory test on NAND-booting Kilauea
Don't run the memory POST on the NAND-booting version. It will
overwrite part of the U-Boot image which is already loaded from NAND
to SDRAM. We were just lucky that it booted at all with this SDRAM
test enabled.
Stefan Roese [Wed, 15 Apr 2009 12:06:26 +0000 (14:06 +0200)]
ppc4xx: Disable POST memory test on NAND-booting Sequoia
Don't run the memory POST on the NAND-booting version. It will
overwrite part of the U-Boot image which is already loaded from NAND
to SDRAM. We were just lucky that it booted at all with this SDRAM
test enabled.
Stefan Roese [Wed, 15 Apr 2009 09:32:53 +0000 (11:32 +0200)]
ppc4xx: Remove unused code for Sequoia NAND booting version
The current define of get_bus_freq() in the CONFIG_NAND_SPL #ifdef is not
used at all. This patch changes it's define to the currently used value of 133333333 and removes the unnecessary code.
Stefan Roese [Wed, 15 Apr 2009 08:50:48 +0000 (10:50 +0200)]
ppc4xx: Add "booting from NAND" to 4xx NAND-booting targets
This additional text in the bootup log helps to see if the board is
configured for NAND-booting. Especially helpful for boards that can
boot from NOR and NAND (e.g. most of the AMCC eval boards).
Stefan Roese [Wed, 8 Apr 2009 08:36:22 +0000 (10:36 +0200)]
ppc4xx: Fixup chip-selects in dtb for NAND-booting Sequoia
Currently the NOR & NAND support in Linux only works for the "standard"
Sequoia, the version booting for NOR flash. The NAND-booting version
has the chip-selects swapped. Here the chip-select mappings:
"Standard" NOR-booting version:
CS0 NOR
CS3 NAND
NAND-booting version:
CS0 NAND
CS3 NOR
With this path the dtb gets fixed-up, so that the correct chip-select
numbers are patched in the dtb enabling correct NOR & NAND support
in Linux on the NAND-booting Sequoia version.
DESCRIPTION:
The column address width settings for banks 2 and 3 are misconnected in
the SDRAM controller. Accesses to bank 2 will result in an error if the
Column Address Width for bank 3 (EB3CAW ) is not set to be the same as
that of bank 2.
WORKAROUND:
If using bank 2, make sure that banks 2 and 3 have the same column address
width settings in the EBIU_SDBCTL register. This must be the case
regardless of whether or not bank 3 is enabled.
DESCRIPTION:
If the DF bit is set prior to a hardware reset, the PLL will continue to
divide CLKIN by 2 after the hardware reset, but the DF bit itself will be
cleared in the PLL_CTL register.
WORKAROUND:
Reprogram the PLL with DF cleared if the desire is to not divide CLKIN by
2 after reset.
DESCRIPTION:
The Boot ROM is executed at power up/reset and changes the value of the
SICA_IWR registers from their default reset value of 0xFFFF, but does not
restore them.
WORKAROUND:
User code should not rely on the default value of these registers. Set
the desired values explicitly.
Graf Yang [Sat, 4 Apr 2009 11:45:57 +0000 (07:45 -0400)]
Blackfin: nand: flush peripheral before polling it
We need to make sure the data written to the nand flash controller makes
it there before we start polling its status register. Otherwise, we may
get stale data and return before the controller is actually ready.
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Scott Wood <scottwood@freescale.com>
Blackfin: spi: make cs deassert function deterministic
Blackfin SPI driver was not driving the SPI chip-select high before
putting the chip-select signals into tri-state mode. This is probably
something that slipped by unnoticed in most designs. If the signals are
put directly into a tri-state mode, then the board is relying on the
pull-up resistors to pull up the chip-select before the next transaction.
Most of the time this is fine, except when you have two transactions that
follow each other very closely, such as the flash erase and read status
register commands. In this case I was seeing a 500ns separation between
the transactions. In my setup, with a 10kOhm pull-up, it would meet
timing spec about half the time and resulted in intermittent errors. (A
stronger pull up would fix this, but our design is targeted for low power
consumption and a 3.3kOhm @ 3.3v is 3.3mW of needless power consumption.)
I modified the spi_cs_deactivate() function in bfin_spi.c to drive the
chip-selects high before putting them into tri-state. For me, this
resulted in a rise time of 5ns instead of the previous rise time of about
1us, and fully satisfied the timing spec of the chip.
Signed-off-by: Todor I Mollov <tmollov@ucsd.edu> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Dirk Behme [Mon, 30 Mar 2009 19:15:23 +0000 (21:15 +0200)]
OMAP3: Update Overo pin mux for new expansion board
A new Overo expansion board uses GPIO 14, 21, 22 and 23 for LED's and
switches. This patch changes the pinmux configuration for those pins.
They were previously set up for unused MMC3_DAT4-7.
Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Dirk Behme <dirk.behme@googlemail.com>
ARM: add the imx31_phycore_eet target to MAINTAINERS
imx31_phycore_eet is a variant of the imx31_phycore board with a few
extensions, which justifies a separate entry in the MAINTAINERS list,
whereas normally all entries sharing a single configuration file and a
board/ directory have only one entry in MAINTAINERS.
Reported-by: Wolfgang Denk <wd@denx.de> Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Jon Smirl [Sat, 4 Apr 2009 21:44:51 +0000 (17:44 -0400)]
mpc5200: reduce delays in i2c
The previous code waited 1000us before checking i2c
status. Measurement shows i2c is usually ready in
under 50us. Change the polling interval to 15us,
loop 6,667 times to keep the polling timeout constant
at 100ms.
Fixes this compile error:
board.c: In function 'do_switch_ecc':
board.c:339: error: 'cmd_tbl_t' has no member named 'help'
make[1]: *** [board.o] Error 1
make[1]: Leaving directory `/db/psp_git/users/a0756819/u-boot/cpu/arm_cortexa8/omap3'
make: *** [cpu/arm_cortexa8/omap3/libomap3.a] Error 2
This is due to the fact that current command uses long
help for the usage print even if the CONFIG_SYS_LONGHELP
is not enabled. (Thanks Jean-Christophe for explanation).
Wolfgang Denk [Sat, 4 Apr 2009 22:18:44 +0000 (00:18 +0200)]
One more fix for building env_embedded.o
In addition to the changes for CONFIG_ENV_IS_IN_FLASH as done in
commit afcbce07, we also need to do the same for
CONFIG_ENV_IS_IN_EEPROM and CONFIG_ENV_IS_IN_NVRAM.
Andreas Huber [Thu, 2 Apr 2009 15:15:34 +0000 (17:15 +0200)]
UBI/cfi-mtd: Fix mtd name for multiple chips
On platforms with multiple NOR chips, currently only the first one
can be selected using the "ubi part" command. This patch fixes this
problem by using different names for the NOR "mtd devices".
It also changes the name of the NOR MTD device from "cfi-mtd" to
"norX" (X indexing the device numer) to better match the mtdparts
defaults.
Signed-off-by: Stefan Roese <sr@denx.de> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Artem Bityutskiy [Fri, 27 Mar 2009 09:21:14 +0000 (10:21 +0100)]
UBIFS: add R/O compatibility
Now UBIFS is supported by u-boot. If we ever decide to change the
media format, then people will have to upgrade their u-boots to
mount new format images. However, very often it is possible to
preserve R/O forward-compatibility, even though the write
forward-compatibility is not preserved.
This patch introduces a new super-block field which stores the
R/O compatibility version.
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com> Acked-by: Adrian Hunter <Adrian.Hunter@nokia.com> Signed-off-by: Stefan Roese <sr@denx.de>