Commit Graph

6361 Commits

Author SHA1 Message Date
Gerald Van Baren
cd3cb0d926 libfdt: Fix error in documentation for fdt_get_alias_namelen()
Oops, screwed up the function name in the documenting comment for this
function.  Trivial correction in this patch.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
2008-10-04 07:56:06 -04:00
David Gibson
9a6cf73a88 libfdt: Add function to explicitly expand aliases
Kumar has already added alias expansion to fdt_path_offset().
However, in some circumstances it may be convenient for the user of
libfdt to explicitly get the string expansion of an alias.  This patch
adds a function to do this, fdt_get_alias(), and uses it to implement
fdt_path_offset().

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-10-02 19:06:09 -04:00
Mike Frysinger
2215987e10 cfi_flash: do not reset flash when probe fails
The CFI flash driver starts at flash_init() which calls down into
flash_get_size().  This starts by calling flash_detect_cfi().  If said
function fails, flash_get_size() finishes by attempting to reset the
flash.  Unfortunately, it does this with an info->portwidth set to 0x10
which filters down into flash_make_cmd() and that happily smashes the
stack by sticking info->portwidth bytes into a cfiword_t variable that
lives on the stack.  On a 64bit system you probably won't notice, but
killing the last 8 bytes on a 32bit system usually leads to a corrupt
return address.  Which is what happens on a Blackfin system.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-10-02 10:30:32 +02:00
Stefan Roese
3e38577208 fdt: Overwrite /chosen node in bootm if it already exists in the dtb
Set force parameter in fdt_chosen() call in do_bootm_linux() call.
Without this, the chosen node is not overwritten if it already
exists.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-10-01 22:01:52 -04:00
Jon Loeliger
741a6d010d Fix an overflow case in fdt_offset_ptr() detected by GCC 4.3.
Using Gcc 4.3 detected this problem:

    ../dtc/libfdt/fdt.c: In function 'fdt_next_tag':
    ../dtc/libfdt/fdt.c:82: error: assuming signed overflow does not
    occur when assuming that (X + c) < X is always false

To fix the problem, treat the offset as an unsigned int.

The problem report and proposed fix were provided
by Steve Papacharalambous <stevep@freescale.com>.

Signed-off-by: Jon Loeliger <jdl@freescale.com>
2008-10-01 22:01:52 -04:00
David Gibson
bbdbc7cb3a libfdt: Fix bugs in fdt_get_path()
The current implementation of fdt_get_path() has a couple of bugs,
fixed by this patch.

First, contrary to its documentation, on success it returns the length
of the node's path, rather than 0.  The testcase is correspondingly
wrong, and the patch fixes this as well.

Second, in some circumstances, it will return -FDT_ERR_BADOFFSET
instead of -FDT_ERR_NOSPACE when given insufficient buffer space.
Specifically this happens when there is insufficient space even to
hold the path's second last component.  This behaviour is corrected,
and the testcase updated to check it.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2008-10-01 22:01:51 -04:00
Wolfgang Denk
33af3e6656 TQM5200: enable support for ATAPI devices
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-10-01 12:34:58 +02:00
Jean-Christophe PLAGNIOL-VILLARD
d13ff2358f Revert "ARM: set GD_FLG_RELOC for boards skipping relocation to RAM"
we need this due to the arm implementation which supposed that U-Boot
is in RAM when we jump to start_armboot

This reverts commit f96b44cef8.
in order to do it for all arm board

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-30 22:10:15 +02:00
Kim Phillips
7fd0bea2e4 mpc83xx: don't disable autoboot
bootdelay set to -1 'permanently' disables autobooting, even if
bootcmd is specified.  Change to a positive value to allow
autobooting when a bootcmd is set.

Reported-by: Coray Tate <Coray.Tate@freescale.com>
Cc: Scott Wood <scottwood@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-09-24 09:58:34 -05:00
Nobuhiro Iwamatsu
2fb29c520c mpc83xx: Fix typo in include/mpc83xx.h
Fixed typo from CONIFG_MPC837X to CONFIG_MPC837X

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-09-24 09:58:34 -05:00
Kim Phillips
162c41c031 mpc83xx: add h/w flash protection to board configs
the operating system may leave flash in a h/w locked state after writing.
This allows u-boot to continue to write flash by enabling h/w unlocking
by default.

Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-09-24 09:58:34 -05:00
Anton Vorontsov
d26154c9a6 mpc83xx: spd_sdram: fix ddr sdram base address assignment bug
The spd_dram code shifts the base address, then masks 20 bits, but
forgets to shift the base address back. Fix this by just masking the
base address correctly.

Found this bug while trying to relocate a DDR memory at the base != 0.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
2008-09-24 09:58:33 -05:00
Stefan Roese
50a874b3b0 Merge branch 'master' of /home/stefan/git/u-boot/u-boot 2008-09-23 10:15:59 +02:00
Stefan Roese
8fd4166c46 ppc4xx: Canyonlands: Remove unnecessary FDT warning upon DTB fixup
Depending on the configuration jumper "SATA SELECT", U-Boot disabled
either one PCIe node or the SATA node in the device tree blob. This
patch removes the unnecessary and even confusing warning, when the node
is not found at all.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-09-22 23:17:31 +02:00
Remy Bohmer
6e24a1eb14 Add missing device types to dev_print() in part.c
Signed-off-by: Remy Bohmer <linux@bohmer.net>
2008-09-22 23:10:37 +02:00
Wolfgang Denk
5fdc215f0b Fix DPRAM memory leak when CFG_ALLOC_DPRAM is defined, which
eventually leads to a machine check. This change assures that DPRAM
is allocated only once in that case.

Signed-off-by: Gary Jennejohn <garyj@denx.de>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-22 22:23:06 +02:00
Laurent Pinchart
a07faf7b9a Fix Spartan-3 definitions.
A few Spartan-3 definitions erroneously use Spartan-3E size
constants. This patch fixes them.

Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
2008-09-22 22:07:20 +02:00
Laurent Pinchart
28113e1f0d Remove duplicate Spartan-3E definition.
Signed-off-by: Laurent Pinchart <laurentp@cse-semaphore.com>
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-22 22:03:33 +02:00
Anatolij Gustschin
5c65ecf7cd socrates: change default mtest address range
Running mtest command on socrates without specifying
an address range crashes the board. This patch changes
default mtest address range to prevent this behavior.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-22 21:49:19 +02:00
Anatolij Gustschin
d666b2d596 socrates: fix crash after relocation
Currently U-Boot crashes after relocation to RAM.
Changing the CPO value of the DDR SDRAM TIMING_CFG_2
register to READ_LAT + 1 (to the value it was before
conversion of socrates to new DDR code) fixes the
problem.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-22 21:48:07 +02:00
Anatolij Gustschin
562788b0a3 socrates: fix SPD EEPROM address
Commit be0bd8234b
changed SPD EEPROM address to 0x51 and DDR SDRAM
detection stopped working. Change this address
back to 0x50.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-22 21:46:56 +02:00
Stefan Roese
5289feadb7 Merge branch 'master' of /home/stefan/git/u-boot/u-boot 2008-09-22 15:26:49 +02:00
Stefan Roese
023824549a Revert "ppc4xx: Fix DDR2 auto calibration on Kilauea 600MHz (200MHz PLB)"
This reverts commit 3eec160a3a.

Signed-off-by: Stefan Roese <sr@denx.de>
2008-09-22 11:06:50 +02:00
Wolfgang Denk
3a9a000d9f Merge branch 'master' of git://git.denx.de/u-boot-mpc85xx 2008-09-21 22:36:23 +02:00
Nobuhiro Iwamatsu
b5d10a1352 sh: Fix compile warning
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2008-09-19 11:05:22 +09:00
Nobuhiro Iwamatsu
4a065abf92 sh: Add support watchdog for SH4A core
Add support watchdog for SH4A core (SH7763, SH7780 and SH7785).
And fix some compile warning.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2008-09-19 11:05:22 +09:00
Nobuhiro Iwamatsu
a03c09c5fd sh: Fix typo in SH serial driver
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2008-09-19 11:05:22 +09:00
Nobuhiro Iwamatsu
6b44a43921 sh: Add support any page size and empty_zero_page to SH Linux uImage
Old U-Boot supported 4KB page size only. If this version, Linux
kernel can not get command line from U-Boot.
SH Linux kernel can change page size and empty_zero_page.
This patch support this function and fix promlem.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2008-09-19 11:05:22 +09:00
Nobuhiro Iwamatsu
ce9f99ddb5 sh: rsk7203: Add support pkt_data_pull and pkt_data_push function
Add function of smc911x, pkt_data_pull and pkt_data_push.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2008-09-19 11:05:22 +09:00
Wolfgang Denk
dd820b03a2 ADS5121: fix typo in "rootpath" default setting
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-18 13:57:32 +02:00
Wolfgang Denk
87b4ef560c Coding style cleanup; update CHANEGLOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-17 10:17:55 +02:00
Victor Gallardo
3eec160a3a ppc4xx: Fix DDR2 auto calibration on Kilauea 600MHz (200MHz PLB)
Signed-off-by: Victor Gallardo <vgallardo@amcc.com>
Signed-off-by: Adam Graham <agraham@amcc.com>
Signed-off-by: Stefan Roese <sr@denx.de>
2008-09-16 20:16:31 +02:00
Peter Tyser
ce47eb402c Support for multiple SGMII/TBI interfaces for TSEC ethernet
Fix TBI PHY accesses to use the proper offset in CPU register space. The
previous code would incorrectly access the TBI PHY by reading/writing to CPU
register space at the same location as would be used to access external PHYs.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Acked-by: Andy Fleming <afleming@freescale.com>
2008-09-16 11:32:45 -05:00
Wolfgang Denk
7c803be2eb TQM8xx: Fix CFI flash driver support for all TQM8xx based boards
After switching to using the CFI flash driver, the correct remapping
of the flash banks was forgotten.

Also, some boards were not adapted, and the old legacy flash driver
was not removed yet.

Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-16 18:02:19 +02:00
Wolfgang Denk
c0d2f87d6c Prepare v2008.10-rc2
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-14 00:59:35 +02:00
Wolfgang Denk
f12e4549b6 Coding style cleanup, update CHANGELOG
Signed-off-by: Wolfgang Denk <wd@denx.de>
2008-09-13 02:23:05 +02:00
Peter Tyser
0c32565f53 Update mailing list email and archive addresses
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
2008-09-13 02:12:41 +02:00
u-boot@bugs.denx.de
fb661ea444 85xx: socrates: autoprobe Lime chip
This patch is an attempt to implement autoprobing for the Lime
presence on the bus.
Configure GPCM for Lime CS2 and try to access chip ID registers.
Second read atempt delivers register values if the chip is present.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
2008-09-13 02:07:39 +02:00
u-boot@bugs.denx.de
e99b607a5e 85xx: socrates: Add support for new image format.
Signed-off-by: Detlev Zundel <dzu@denx.de>
2008-09-13 02:05:37 +02:00
Nobuhiro Iwamatsu
3c094b652d sh: Fix compile error for r2dplus
netdev.h was not include by r2dplus.

Signed-off-by: Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
2008-09-13 02:04:15 +02:00
Heiko Schocher
56844a22b7 powerpc: Fix bootm to boot up again with a Ramdisk
Commit 2a1a2cb6 didnt remove the dummy mem reservation in fdt_chosen,
and this stopped Linux from booting with a Ramdisk. This patch fixes
this, by deleting the useless dummy mem reservation.

When booting with a Ramdisk, a fix offset FDT_RAMDISK_OVERHEAD is now
added to of_size, so we dont need anymore a dummy mem reservation.

I measured the value of FDT_RAMDISK_OVERHEAD on a MPC8270 based
system (=0x44 bytes) and rounded it up to 0x80).

Signed-off-by: Heiko Schocher <hs@denx.de>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
2008-09-13 02:03:38 +02:00
Luigi 'Comio' Mantellini
fc9c1727b5 Add support for LZMA uncompression algorithm.
Signed-off-by: Luigi 'Comio' Mantellini <luigi.mantellini@idf-hit.com>
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
2008-09-13 01:59:07 +02:00
Wolfgang Denk
508eb85db7 Merge branch 'master' of git://git.denx.de/u-boot-nand-flash 2008-09-13 01:45:56 +02:00
Anton Vorontsov
0008b6d968 fsl_elbc_nand: ecclayout cleanups
This patch deletes oobavail assignments, they're calculated by the nand
core code in nand_scan_tail, plus current oobavail values are wrong for
the LP NANDs.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-09-12 14:58:33 -05:00
Anton Vorontsov
8f42bf1c39 fsl_elbc_nand: implement support for flash-based BBT
This patch implements support for flash-based BBT for chips working
through ELBC NAND controller, so that NAND core will not have to re-scan
for bad blocks on every boot.

Because ELBC controller may provide HW-generated ECCs we should adjust
bbt pattern and bbt version positions in the OOB free area.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-09-12 14:57:20 -05:00
Anton Vorontsov
97ae023648 fsl_elbc_nand: fix OOB workability for large page NAND chips
For large page chips, nand_bbt is looking into OOB area, and checking
for "0xff 0xff" pattern at OOB offset 0. That is, two bytes should be
reserved for bbt means.

But ELBC driver is specifying ecclayout so that oobfree area starts at
offset 1, so only one byte left for the bbt purposes.

This causes problems with any OOB users, namely JFFS2: after first mount
JFFS2 will fill all OOBs with "erased marker", so OOBs will contain:

  OOB Data: ff 19 85 20 03 00 ff ff ff 00 00 08 ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
  OOB Data: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff

And on the next boot, NAND core will rescan for bad blocks, then will
see "0xff 0x19" pattern, and will mark all blocks as bad ones.

To fix the issue we should implement our own bad block pattern: just one
byte at OOB start. Though, this will work only for x8 chips. For x16
chips two bytes must be checked. Since ELBC driver does not support x16
NANDs (yet), we're safe for now.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
2008-09-12 14:56:03 -05:00
Wolfgang Denk
225f0eaa74 Merge branch 'master' of /home/wd/git/u-boot/custodians 2008-09-12 16:14:28 +02:00
Wolfgang Denk
afbc526336 Merge branch 'Makefile-next' of git://git.denx.de/u-boot-arm 2008-09-12 16:13:12 +02:00
Wolfgang Denk
6b8be3e58e Merge branch 'master' of /home/wd/git/u-boot/custodians 2008-09-12 15:24:54 +02:00
Wolfgang Denk
b476b03256 Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx 2008-09-12 15:23:20 +02:00