Wolfgang Denk [Fri, 15 May 2009 07:27:58 +0000 (09:27 +0200)]
IDE: bail out of dev_print() for unknown device types
Commit 574b319512 introduced a subtle bug by mixing a list of tests
for "dev_desc->type" and "dev_desc->if_type" into one switch(), which
then mostly did not work because "dev_desc->type" cannot take any
"IF_*" type values. A later fix in commit 8ec6e332ea changed the
switch() into testing "dev_desc->if_type", but at this point the
initial test for unknown device types was completely lost, which
resulted in output like that for IDE ports without device attached:
Device 1: Model: Firm: Ser#:
Type: # 1F #
Capacity: not available
This patch re-introduces the missing test for unknown device types.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Stefan Roese <sr@denx.de> Cc: Detlev Zundel <dzu@denx.de> Tested-by: Stefan Roese <sr@denx.de>
Wolfgang Denk [Tue, 12 May 2009 13:17:35 +0000 (15:17 +0200)]
MPC8260: fixup device tree by property instead of path
cpu/mpc8260/cpu.c used to use do_fixup_by_path_u32() to update the
clock frequencies in the device tree, using a CPU path
"/cpus/OF_CPU", with OF_CPU beind defined in the board config file.
However, this does not work when one board config file (here:
MPC8260ADS.h) is intended to be used for several diffrent CPUs and
therefor contains a generic definition like "cpu@0", as the device
trees that will then be loaded will contain specific names like
"PowerPC,8272@0".
We switch to using do_fixup_by_prop_u32() instead, so we can search
for device_type="cpu", as it is done in other architectures, too.
Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Heiko Schocher <hs@denx.de> Acked-by: Heiko Schocher <hs@denx.de> Tested-by: Heiko Schocher <hs@denx.de>
Add CONFIG_SYS_MONITOR_LEN macro to apollon board config.
CONFIG_SYS_MONITOR_LEN defines the U-Boot image size.
and is used by OneNAND ipl when reading U-Boot image.
Signed-off-by: Rohit Hagargundgi <h.rohit at samsung.com> Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
Marco Stornelli [Tue, 28 Apr 2009 17:04:02 +0000 (19:04 +0200)]
Add imls utility command
This patch adds, under tools folder, a new command called imls. Its
goal is the same of UBoot's imls but it can be used as Linux shell
command. It reads from raw mtd partition and prints the list of the
stored images.
Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com>
- added some comment for the env_id variable in common_cmd_nvedit.c
- moved some variables in fn scope instead of file scope
- NetInitLoop now static void
Signed-off-by: Heiko Schocher <hs@denx.de> Acked-by: Ben Warren <biggerbadderben@gmail.com>
Sascha Hauer [Fri, 15 May 2009 08:21:33 +0000 (10:21 +0200)]
remove myself as phycore/litekit Maintainer
I never acked a patch that adds me as phycore i.MX31 maintainer nor was
it me who pushed the patches, so remove myself from the maintainer list
so that other people do not longer wait for my ack.
Graf Yang [Tue, 5 May 2009 06:26:27 +0000 (02:26 -0400)]
Blackfin: bf518f-ezbrd: reset ethernet PHY during init
We don't know what state the ethernet PHY is in when starting up, so make
sure we set it to a sane state. This fixes troubles seen when Linux boots
up, configures the PHY is a non-default state, and then the system reboots
into U-Boot which previously expected a reset state only.
Signed-off-by: Graf Yang <graf.yang@analog.com> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Mike Frysinger [Tue, 5 May 2009 05:35:41 +0000 (01:35 -0400)]
Blackfin: bf527-ezkit: fix SPI flash env params
The BF527-EZKIT settings for storing the environment in SPI flash wasn't
using the correct sector settings for the SPI flash part that is actually
on the board.
Mike Frysinger [Sat, 25 Apr 2009 03:54:19 +0000 (23:54 -0400)]
Blackfin: avoid get_sclk() with early serial debug
When the clock functions were changed to use cached values (and thereby
avoiding expensive math functions), early serial debug broke because the
baud programming is called before external memory is available.
Mike Frysinger [Sat, 25 Apr 2009 03:39:41 +0000 (23:39 -0400)]
Blackfin: fix booting with older bootroms (no EVT1)
When dropping jump block support, the assumption was that all bootroms
supported entry point redirection via the EVT1 register. Unfortunately,
this turned out to be incorrect for the oldest Blackfin parts (BF533-0.2
and older and BF561). No one really noticed earlier because these parts
usually are booted by bypassing the bootrom entirely, and older BF533
parts are not supported at all (too many anomalies).
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>