oweals/u-boot.git
14 years agosh: Add support load and boot of Initrd.
Nobuhiro Iwamatsu [Tue, 28 Sep 2010 03:14:57 +0000 (12:14 +0900)]
sh: Add support load and boot of Initrd.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
14 years agoppc: Don't initialize write protected NOR flashes
John Schmoller [Wed, 29 Sep 2010 19:05:44 +0000 (14:05 -0500)]
ppc: Don't initialize write protected NOR flashes

If a NOR flash is write protected it can not be initialized/detected so
add the ability for boards to skip NOR initialization on bootup.  A
board can skip NOR initialization by implementing the
board_flash_wp_on() function.

Signed-off-by: John Schmoller <jschmoller@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
CC: sr@denx.de
Acked-by: Stefan Roese <sr@denx.de>
14 years agoMPC52xx, motionpro: update default configuration
Wolfgang Denk [Wed, 20 Oct 2010 06:31:45 +0000 (08:31 +0200)]
MPC52xx, motionpro: update default configuration

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoftrtc010.c : enhance code according to original datasheet
Macpaul Lin [Tue, 19 Oct 2010 12:14:36 +0000 (20:14 +0800)]
ftrtc010.c : enhance code according to original datasheet

Add missing codes according to original datasheet.
This patch also makes ftrtc010 could be adapted to PCLK and EXT_CLK.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Wolfgang Denk [Wed, 20 Oct 2010 19:23:22 +0000 (21:23 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

14 years agoMerge branch 'master' of git://git.denx.de/u-boot-ppc4xx
Wolfgang Denk [Wed, 20 Oct 2010 19:20:24 +0000 (21:20 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-ppc4xx

14 years agoARMV7: OMAP: I2C driver: Restructure i2c_probe function
Steve Sakoman [Wed, 20 Oct 2010 13:07:47 +0000 (06:07 -0700)]
ARMV7: OMAP: I2C driver: Restructure i2c_probe function

This patch removes the "magic number" delays and instead
monitors state changes in the status register bits.

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: Heiko Schocher <hs@denx.de>
14 years agoARMV7: OMAP: I2C driver: Restructure i2c_write_byte function
Steve Sakoman [Wed, 20 Oct 2010 13:07:46 +0000 (06:07 -0700)]
ARMV7: OMAP: I2C driver: Restructure i2c_write_byte function

This patch removes the "magic number" delays and instead
monitors state changes in the status register bits.

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: Heiko Schocher <hs@denx.de>
14 years agoARMV7: OMAP: I2C driver: Restructure i2c_read_byte function
Steve Sakoman [Wed, 20 Oct 2010 13:07:45 +0000 (06:07 -0700)]
ARMV7: OMAP: I2C driver: Restructure i2c_read_byte function

This patch removes the "magic number" delays and instead
monitors state changes in the status register bits.

Signed-off-by: Steve Sakoman <steve.sakomanlinaro.org>
Tested-by: Heiko Schocher <hs@denx.de>
14 years agoARMV7: OMAP: I2C driver: Use same timeout value as linux kernel driver
Steve Sakoman [Wed, 20 Oct 2010 13:07:44 +0000 (06:07 -0700)]
ARMV7: OMAP: I2C driver: Use same timeout value as linux kernel driver

This patch matches the poll interval (1 millisecond) and timeout (1 second)
used in the linux driver. It also adds a return value of 0 in the event of
a timeout error and cleans up some formatting errors in that section of the
code.

Signed-off-by: Steve Sakoman <steve.sakoman@linaro.org>
Tested-by: Heiko Schocher <hs@denx.de>
14 years agoppc4xx: Fix default environment for AMCC boards
Stefan Roese [Fri, 15 Oct 2010 06:41:01 +0000 (08:41 +0200)]
ppc4xx: Fix default environment for AMCC boards

Commit 0ad7f0950a9bc0a69b3cd5f34ccf7da25fcf1c6d [ppc4xx: cleanup
default environment for AMCC boards] broke the default env for
many PPC4xx boards. The '\0' character got removed at the end
of some environment commands like "update". This patch adds the
missing '\0' characters again.

Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoppc4xx: Enable NOR flash support in sequoia_ramboot target
Stefan Roese [Mon, 11 Oct 2010 13:50:10 +0000 (15:50 +0200)]
ppc4xx: Enable NOR flash support in sequoia_ramboot target

Until now, the Sequoia RAM-booting image disabled NOR flash support
as this image was mainly created for NAND-only boards. This patch
now enables NOR flash support for this RAM-booting version as well.

Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoppc4xx/POST: Add board specific UART POST test to lwmon5
Stefan Roese [Thu, 7 Oct 2010 12:16:25 +0000 (14:16 +0200)]
ppc4xx/POST: Add board specific UART POST test to lwmon5

Add CONFIG_POST_UART to implement a board specific UART POST test.
This is done since lwmon5 needs to set POST_ALWAYS to run this
test on each reboot. And we don't want to change the default
behavious of this this.

Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoppc4xx: Change tsr/tcr macros to upper case
Stefan Roese [Mon, 4 Oct 2010 09:09:40 +0000 (11:09 +0200)]
ppc4xx: Change tsr/tcr macros to upper case

Remove uneccessary functions to access the TCR/TSR registers as well.

Signed-off-by: Stefan Roese <sr@denx.de>
14 years agoFix compile warning in uli526x driver
Kumar Gala [Wed, 20 Oct 2010 06:55:39 +0000 (01:55 -0500)]
Fix compile warning in uli526x driver

uli526x.c: In function 'uli526x_init_one':
uli526x.c:314:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
uli526x.c:314:2: warning: dereferencing type-punned pointer will break strict-aliasing rules

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago85xx: Use gc-sections to reduce image size
Peter Tyser [Wed, 29 Sep 2010 19:05:56 +0000 (14:05 -0500)]
85xx: Use gc-sections to reduce image size

On an XPedite5370 over 11KBytes were saved:
  Before:
       text    data     bss     dec     hex filename
   332456   33364   33476  399296   617c0 ./u-boot

  After:
      text    data     bss     dec     hex filename
   321075   33836   33476  388387   5ed23 ./u-boot

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago86xx: Use gc-sections to reduce image size
Peter Tyser [Wed, 29 Sep 2010 19:05:55 +0000 (14:05 -0500)]
86xx: Use gc-sections to reduce image size

On an XPedite5170 over 11KBytes were saved:
  Before:
     text    data     bss     dec     hex filename
   319488   28700   33204  381392   5d1d0 ./u-boot

  After:
     text    data     bss     dec     hex filename
   307663   29144   33204  370011   5a55b ./u-boot

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago86xx: Create common linker script
Kumar Gala [Wed, 20 Oct 2010 06:29:29 +0000 (01:29 -0500)]
86xx: Create common linker script

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agompc8640: Update the io_sel fields for PCI Express
Peter Tyser [Wed, 29 Sep 2010 19:05:41 +0000 (14:05 -0500)]
mpc8640: Update the io_sel fields for PCI Express

Previously io_sel=0xe incorrect stated PCIE1 was enabled.  Also add
support for the mpc8640's PCIE2 interface.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agotqm85xx: Update PCI code
Peter Tyser [Wed, 29 Sep 2010 18:37:28 +0000 (13:37 -0500)]
tqm85xx: Update PCI code

Update to use the recent, common FSL PCI initialization code.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
CC: sr@denx.de
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agosbc8641d: Update PCI code
Peter Tyser [Wed, 29 Sep 2010 18:37:27 +0000 (13:37 -0500)]
sbc8641d: Update PCI code

Update to use the recent, common FSL PCI initialization code.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
CC: joe.hamman@embeddedspecialties.com
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agompc8641hpcn: Update PCI code
Peter Tyser [Wed, 29 Sep 2010 18:37:26 +0000 (13:37 -0500)]
mpc8641hpcn: Update PCI code

Update to use the recent, common FSL PCI initialization code.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years ago85xx: Add support for not releasing secondary cores via 'mp_holdoff'
Aaron Sierra [Thu, 30 Sep 2010 17:22:16 +0000 (12:22 -0500)]
85xx: Add support for not releasing secondary cores via 'mp_holdoff'

Some OSes require that secondary cores not be initialized when they
are booted (eg VxWorks).  By default when U-Boot is compiled with the
CONFIG_MP option all secondary cores are brought out of reset and held
in spinloops.  Setting the "mp_holdoff" environment variable to 'yes'
or '1' will cause U-Boot to leave secondary cores in their default
state.

Signed-off-by: Aaron Sierra <asierra@xes-inc.com>
Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoDisable unused chip-select for DDR controller interleaving
York Sun [Mon, 18 Oct 2010 20:46:50 +0000 (13:46 -0700)]
Disable unused chip-select for DDR controller interleaving

When DDR controller interleaving is eabled and less than all bank (chip-select)
interleaving is seletected, the unused chip-select should be disabled.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoAdding fixed sdram setting for cornet_ds board
York Sun [Mon, 18 Oct 2010 20:46:49 +0000 (13:46 -0700)]
Adding fixed sdram setting for cornet_ds board

800, 900, 1000, 1200MT/s data rate parameters are added for fixed sdram
setting. SPD based parameters and fixed parameters can be toggled by hwconfig.
To use fixed parameters,

hwconfig=fsl_ddr:sdram=fixed

To use SPD parameters,

hwconfig=fsl_ddr:ctlr_intlv=cacheline,bank_intlv=cs0_cs1

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoEnable POST memory test for P2020DS
York Sun [Tue, 28 Sep 2010 22:20:37 +0000 (15:20 -0700)]
Enable POST memory test for P2020DS

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoEnable POST memory test for corenet_ds
York Sun [Tue, 28 Sep 2010 22:20:36 +0000 (15:20 -0700)]
Enable POST memory test for corenet_ds

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoSetup POST word for generic mpc85xx
York Sun [Tue, 28 Sep 2010 22:20:35 +0000 (15:20 -0700)]
Setup POST word for generic mpc85xx

Using PIC TFRR register for post word load/store for generic MPC85xx.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoAdd memory test feature for mpc85xx POST.
York Sun [Tue, 28 Sep 2010 22:20:33 +0000 (15:20 -0700)]
Add memory test feature for mpc85xx POST.

The memory test is performed after DDR initialization when U-boot stills runs
in flash and cache. On recent mpc85xx platforms, the total memory can be more
than 2GB. To cover whole memory, it needs be mapped 2GB at a time using a
sliding TLB window. After the testing, DDR is remapped with up to 2GB memory
from the lowest address as normal.

If memory test fails, DDR DIMM SPD and DDR controller registers are dumped for
further debugging.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoAdding more control to physical address mapping
York Sun [Tue, 28 Sep 2010 22:20:32 +0000 (15:20 -0700)]
Adding more control to physical address mapping

A worker function setup_ddr_tlbs_phys() is introduced to implement more
control on physical address mapping.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoalways relocate fdt into an lmb-allocated memory block
Timur Tabi [Mon, 24 May 2010 20:10:25 +0000 (15:10 -0500)]
always relocate fdt into an lmb-allocated memory block

The device tree (fdt) must always exist in within the bootmap (usually the
first 16MB of RAM).  If it doesn't, then boot_relocate_fdt() will allocate
an LMB region in the bootmap and copy the fdt into that region.  It will
also increase the size of the fdt.

If the fdt is already in the bootmap, then previously the memory was just
reserved.  There was no contingency if the reservation failed, however.

By always allocating an lmb region and copying/resizing the fdt into that
region, the code is simplified and the memory region is always allocated
properly.

Also change the types of some variables to avoid some typecasts.

Signed-off-by: Timur Tabi <timur@freescale.com>
Tested-by: Ira Snyder <iws@ovro.caltech.edu>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/8xxx: Add fdt_fixup_phy_connection helper
Kumar Gala [Thu, 30 Sep 2010 14:15:03 +0000 (09:15 -0500)]
powerpc/8xxx: Add fdt_fixup_phy_connection helper

Add a common helper that will set the PHY connection type based on enum.
We use this on eTSEC, UCC, and will with Fman in the future.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agopowerpc/fsl: Introduce common enum for PHY types
Kumar Gala [Thu, 30 Sep 2010 14:14:40 +0000 (09:14 -0500)]
powerpc/fsl: Introduce common enum for PHY types

Have a common enum for phy types that we use in the UCC driver.  We will
also use this enum for dealing with phy connection fixup in the device
tree.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
14 years agoFAT: buffer overflow with FAT12/16
Stefano Babic [Wed, 20 Oct 2010 06:51:45 +0000 (08:51 +0200)]
FAT: buffer overflow with FAT12/16

Last commit 3831530dcb7b71329c272ccd6181f8038b6a6dd0a was intended
"explicitly specify FAT12/16 root directory parsing buffer size, instead
of relying on cluster size". Howver, the underlying function requires
the size of the buffer in blocks, not in bytes, and instead of passing
a double sector size a request for 1024 blocks is sent. This generates
a buffer overflow with overwriting of other structure (in the case seen,
USB structures were overwritten).

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Mikhail Zolotaryov <lebon@lebon.org.ua>
14 years agocommon/fdt_support.c: Fix compile warnings
Wolfgang Denk [Wed, 20 Oct 2010 06:59:16 +0000 (08:59 +0200)]
common/fdt_support.c: Fix compile warnings

Commit a6bd9e8 "FDT: Add fixup support for multiple banks of memory"
removed code but forgot to remove the variables used by it, resulting
in warnings:

fdt_support.c: In function 'fdt_fixup_memory_banks':
fdt_support.c:399: warning: unused variable 'sizecell'
fdt_support.c:399: warning: unused variable 'addrcell'

Remove the declarations, too.

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoUSB: sync Queue Element Transfer Descriptor against EHCI spec
Wolfgang Denk [Tue, 19 Oct 2010 14:13:15 +0000 (16:13 +0200)]
USB: sync Queue Element Transfer Descriptor against EHCI spec

Appendix B "EHCI 64-Bit Data Structures" of the "Enhanced Host
Controller Interface Specification for Universal Serial Bus" (Rev.
1.0, March 12, 2002) defines additional fields which were missing in
U-Boot's struct qTD; as these are also present in recent versions of
struct ehci_qtd in the Linux kernel, we add them here, too.

This fixes some nasty memory corruption problems.

Reported-by: Dan Lykowski <lykowdk@gmail.com>
See http://permalink.gmane.org/gmane.comp.boot-loaders.u-boot/76942

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Remy Bohmer <linux@bohmer.net>
Cc: Dan Lykowski <lykowdk@gmail.com>
Cc: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
14 years agoMX31: Removed warnings for iomux function
Stefano Babic [Tue, 19 Oct 2010 18:19:13 +0000 (20:19 +0200)]
MX31: Removed warnings for iomux function

Removed warnings generated in the mx31_set_pad() function.

Signed-off-by: Stefano Babic <sbabic@denx.de>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Tue, 19 Oct 2010 22:10:07 +0000 (00:10 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

14 years agoMakefile: rename TEXT_BASE to CONFIG_SYS_TEXT_BASE
Eric Cooper [Tue, 19 Oct 2010 17:31:11 +0000 (13:31 -0400)]
Makefile: rename TEXT_BASE to CONFIG_SYS_TEXT_BASE

14 years agoboard_init_r: Removed unused cmdtp variable
Richard Retanubun [Tue, 19 Oct 2010 14:29:55 +0000 (10:29 -0400)]
board_init_r: Removed unused cmdtp variable

Follow up to commit 620f1f6a64095ed558e68d37f1965d015cd49b02
removed compiler warning for (now) unused cmd_tbl_t* cmdtp

14 years agoAdd UBI README
Stefan Roese [Tue, 19 Oct 2010 12:58:02 +0000 (14:58 +0200)]
Add UBI README

This patch adds a small README to describe the usage of the
U-Boot UBI commands.

Signed-off-by: Stefan Roese <sr@denx.de>
14 years agocmd_fpga: cleanup help and check parameters
Stefano Babic [Tue, 19 Oct 2010 07:22:52 +0000 (09:22 +0200)]
cmd_fpga: cleanup help and check parameters

The usage and help for the fpga command is wrong and incomplete,
and the parameters are not checked before to be passed to the
underlying subfunction.

Signed-off-by: Stefano Babic <sbabic@denx.de>
14 years agoFPGA: Add missing prototype
Stefano Babic [Tue, 19 Oct 2010 07:22:23 +0000 (09:22 +0200)]
FPGA: Add missing prototype

Add prototype function for ispVMFreeMem to remove warnings
when support for Lattice FPGA is compiled.

Signed-off-by: Stefano Babic <sbabic@denx.de>
14 years agoboards.cfg: update local documentation
Mike Frysinger [Tue, 19 Oct 2010 06:49:40 +0000 (02:49 -0400)]
boards.cfg: update local documentation

The "options" field at the moment is only documented in the changelog
which isn't terribly useful to people without git.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agoupdate board EB+CPUx9K2
Jens Scharsig [Tue, 19 Oct 2010 17:37:15 +0000 (19:37 +0200)]
update board EB+CPUx9K2

* update to support arm reloaction
* unnecessary environment variables removed

Signed-off-by: Jens Scharsig <js_at_ng@scharsoft.de>
14 years agoAdd support for HP Jornada flashrom boards
Kristoffer Ericson [Fri, 15 Oct 2010 21:31:43 +0000 (23:31 +0200)]
Add support for HP Jornada flashrom boards

This patch adds support for the HP Jornada flashboards
that were made in 2008. Older flashroms should work if
memory registers are adjusted.

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Adpted for TEXT_BASE -> CONFIG_SYS_TEXT_BASE rename.
Removed now redundant board/jornada/config.mk file.
Removed unused empty jornada_init() function to silence
"jornada.c:35: warning: 'jornada_init' defined but not used"

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoMakefile: allow boards to check file size limits
Mike Frysinger [Thu, 14 Oct 2010 02:58:23 +0000 (22:58 -0400)]
Makefile: allow boards to check file size limits

Boards often have a reserved size limit on the flash where they're stored.
Sometimes during upgrades or config changes, those limits are exceeded,
but no one notices until they try to upgrade and the limit screws things
up.  Either not enough of U-Boot is written to flash (and so the reboot
fails), or too much is written (and so things after it get clobbered).

So allow boards to declare a size limit (in bytes) and have the build
system check it while building.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
14 years agodrivers/net/fec_mxc.c: write mac address in init
John Rigby [Wed, 13 Oct 2010 20:31:08 +0000 (14:31 -0600)]
drivers/net/fec_mxc.c: write mac address in init

Call fec_set_hwaddr in init routine to setup MAC address so when ethaddr is set
late via setenv the change will propagate to the hw.

Signed-off-by: John Rigby <john.rigby@linaro.org>
CC: Ben Warren <biggerbadderben@gmail.com>
14 years agoBuild: PXA: Fix TrizepsIV build variants
Marek Vasut [Sun, 3 Oct 2010 22:21:51 +0000 (00:21 +0200)]
Build: PXA: Fix TrizepsIV build variants

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoBuild: PXA: Fix Vpac270 build variants
Marek Vasut [Sun, 3 Oct 2010 16:27:36 +0000 (18:27 +0200)]
Build: PXA: Fix Vpac270 build variants

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Fix vpac270 OneNAND booter
Marek Vasut [Sat, 16 Oct 2010 19:32:11 +0000 (21:32 +0200)]
PXA: Fix vpac270 OneNAND booter

NOTE: The modification in Makefile will be superseded by a pending patch!

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Fix Balloon3 for Reloc
Marek Vasut [Sat, 2 Oct 2010 23:05:55 +0000 (01:05 +0200)]
PXA: Fix Balloon3 for Reloc

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Fix ZipitZ2 for Reloc
Marek Vasut [Thu, 30 Sep 2010 10:22:38 +0000 (12:22 +0200)]
PXA: Fix ZipitZ2 for Reloc

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Fix vpac270 for Reloc
Marek Vasut [Tue, 28 Sep 2010 13:50:49 +0000 (15:50 +0200)]
PXA: Fix vpac270 for Reloc

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Fix reloc, Push lowlevel init into C code
Marek Vasut [Tue, 28 Sep 2010 13:44:10 +0000 (15:44 +0200)]
PXA: Fix reloc, Push lowlevel init into C code

Firstly, this fixes relocation issues. I had to use part of Dcache as RAM for a
while. I also moved around the lowlevel init code. It turned out so most of the
lowlevel init code ended in cpu.c (and eventually was rewritten into C).

This will also allow easier operation with FDT, multi-CPU-model support etc. in
later releases.

NOTE: This breaks most of the PXA boards (actually, the reloc stuff did already,
this only finishes the doom).

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Add necessary information for RELOC
Marek Vasut [Thu, 23 Sep 2010 07:46:57 +0000 (09:46 +0200)]
PXA: Add necessary information for RELOC

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: fix MDREFR[APD] bit setting
Mikhail Kshevetskiy [Thu, 26 Aug 2010 19:24:22 +0000 (23:24 +0400)]
PXA: fix MDREFR[APD] bit setting

pxa_mem_setup macro use r6 to store CONFIG_SYS_MDREFR_VAL during memory
initialization. This reg is modified during execution of pxa_wait_ticks.
Later we use r6 to setup MDREFR[APD] bit. As result MDREFR[APD] is always
zero.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
14 years agoPXA: fix environment sector size, kernel and environment location for vpac270
Mikhail Kshevetskiy [Thu, 26 Aug 2010 19:24:19 +0000 (23:24 +0400)]
PXA: fix environment sector size, kernel and environment location for vpac270

Define ENV_ADDR as MONITOR_BASE + MONITOR_LEN. Fix environment sector
size (NOR: 32Kb for first four sectors and 128Kb for other; OneNAND: 128Kb).

Last but not least: we have MONITOR_LEN = 0x40000 and one sector for
environment (size = 0x20000), so the kernel may start from 0x00060000 only.

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
14 years agoPXA: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000
Mikhail Kshevetskiy [Thu, 26 Aug 2010 19:24:18 +0000 (23:24 +0400)]
PXA: cleanup vpac270 config and set CONFIG_SYS_HZ to 1000

* CONFIG_SYS_CLKS_IN_HZ is not used anywhere, so removing it
* CONFIG_SYS_HZ is set to 1000 on most architectures, so it
  seems to be the safe default

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
14 years agoPXA: remove unused u-boot.lds from board/vpac270
Mikhail Kshevetskiy [Thu, 26 Aug 2010 10:47:56 +0000 (14:47 +0400)]
PXA: remove unused u-boot.lds from board/vpac270

This file is not used, automatically generated u-boot.lds is used instead

Signed-off-by: Mikhail Kshevetskiy <mikhail.kshevetskiy@gmail.com>
14 years agoPXA: Add missing MAINTAINERS entries
Marek Vasut [Sat, 14 Aug 2010 04:02:11 +0000 (06:02 +0200)]
PXA: Add missing MAINTAINERS entries

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Balloon3 board support
Marek Vasut [Mon, 26 Jul 2010 04:30:25 +0000 (06:30 +0200)]
PXA: Balloon3 board support

The following hardware is currently supported:
- UART
- USB Host
- FPGA

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Voipac270 improvements
Marek Vasut [Thu, 22 Jul 2010 14:51:52 +0000 (16:51 +0200)]
PXA: Voipac270 improvements

128MB NOR module support.
Define __io to get harddrive working.
Fix saving of environment into OneNAND.
Boot from harddrive when possible.
Add missing MAINTAINERS entry.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Add initial Palm LifeDrive support
Marek Vasut [Mon, 19 Jul 2010 09:23:07 +0000 (11:23 +0200)]
PXA: Add initial Palm LifeDrive support

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: Palm Tungsten|C Support
Marek Vasut [Sun, 18 Jul 2010 03:23:19 +0000 (05:23 +0200)]
PXA: Palm Tungsten|C Support

This patch adds support for the Palm Tungsten|C PXA255 board. The support
includes:
- LCD
- MMC
- UART
- NOR

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agocommon: Enable serial for PXA250
Marek Vasut [Sun, 18 Jul 2010 02:49:18 +0000 (04:49 +0200)]
common: Enable serial for PXA250

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: pxafb: Marvell Littleton LCD definition
Marek Vasut [Thu, 31 Dec 2009 02:44:22 +0000 (03:44 +0100)]
PXA: pxafb: Marvell Littleton LCD definition

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: pxafb: Add support for Sharp LQ038J7DH53
Marek Vasut [Mon, 19 Jul 2010 09:21:38 +0000 (11:21 +0200)]
PXA: pxafb: Add support for Sharp LQ038J7DH53

This LCD panel is found in Palm LifeDrive handheld

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: pxafb: Add ACX517AKN support
Marek Vasut [Sun, 18 Jul 2010 02:46:55 +0000 (04:46 +0200)]
PXA: pxafb: Add ACX517AKN support

ACX517AKN LCD panel is found in Palm Tungsten|C

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: pxa-regs.h cleanup
Marek Vasut [Thu, 9 Sep 2010 07:50:39 +0000 (09:50 +0200)]
PXA: pxa-regs.h cleanup

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoPXA: pxafb: Fix indent problems
Marek Vasut [Thu, 23 Sep 2010 06:32:54 +0000 (08:32 +0200)]
PXA: pxafb: Fix indent problems

Also change the initializer style

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
14 years agoExpand POST memory test to support arch-depended implementation.
York Sun [Tue, 28 Sep 2010 22:20:31 +0000 (15:20 -0700)]
Expand POST memory test to support arch-depended implementation.

Add weak functions to enable architecture depended preparation, address
advancing, cleaning up and error handling.

These weak functions provides the framwork to implemente arch/platform
dependent code for initializing/maintenance/restore the start address, size,
physical address as well as memory mapping before/between/after memory test.
arch_memory_failure_handle can also be implemented in case more care is needed
for arch/platform.

Signed-off-by: York Sun <yorksun@freescale.com>
14 years agoMerge branch 'at91' of git://git.denx.de/u-boot-atmel
Wolfgang Denk [Tue, 19 Oct 2010 20:10:47 +0000 (22:10 +0200)]
Merge branch 'at91' of git://git.denx.de/u-boot-atmel

14 years agodoc/README.scrapyard: add documentation for abandoned boards
Wolfgang Denk [Tue, 19 Oct 2010 19:46:25 +0000 (21:46 +0200)]
doc/README.scrapyard: add documentation for abandoned boards

Add a document to maintain a list of boards removed from the current
source tree, so archeologists can check more easily if here is
something they might want to dig for...

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoMerge branch 'elf_reloc'
Wolfgang Denk [Tue, 19 Oct 2010 19:07:52 +0000 (21:07 +0200)]
Merge branch 'elf_reloc'

Conflicts:
arch/arm/include/asm/config.h
board/LaCie/edminiv2/config.mk
board/karo/tx25/config.mk
board/logicpd/imx27lite/config.mk
doc/README.arm-relocation

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-imx
Wolfgang Denk [Tue, 19 Oct 2010 18:58:16 +0000 (20:58 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-imx

Conflicts:
board/logicpd/imx31_litekit/config.mk
boards.cfg

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoAT91 clock/timer: move static data to global_data struct
Reinhard Meyer [Tue, 5 Oct 2010 14:54:35 +0000 (16:54 +0200)]
AT91 clock/timer: move static data to global_data struct

clock.c / timer.c used static data and are called before relocation.
Move all static variables into global_data structure. Also cleanup
timer.c from unused stubs and make it truly use 64 bit tick values.

Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
14 years agoat91rm9200ek: enbable USB support
Andreas Bießmann [Mon, 18 Oct 2010 20:58:31 +0000 (22:58 +0200)]
at91rm9200ek: enbable USB support

This patch enables USB for at91rm9200ek board.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
14 years agoat91rm9200: enable USB support
Andreas Bießmann [Mon, 18 Oct 2010 20:58:30 +0000 (22:58 +0200)]
at91rm9200: enable USB support

This patch fixes arch-at91/hardware.h to have the relevant defines for
at91rm9200 devices to support existing at91 usb driver.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
14 years agoat91rm9200ek: convert to at91
Andreas Bießmann [Mon, 18 Oct 2010 20:58:29 +0000 (22:58 +0200)]
at91rm9200ek: convert to at91

This patch removes some functionality from at91rm9200ek board but the
remaining functionality does now work with newer at91 code and
arm-relocation.

Currently missing features are:
 - dataflash booting (due to missing HW for testing)
 - MMC/SD-Card
 - first stage bootloader support is completely removed (not needed for
   NOR)

Cause this board was (some days ago) reference for all at91rm9200 based
boards this should be a good starting point to convert all remaining
at91rm9200 borads to at91 code. Aside from that this is a good base to
get some drivers between at91sam/at91rm/avr32 merged.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Signed-off-by: Reinhard Meyer <u-boot@emk-elektronik.de>
14 years agoNC650/CP850: remove code for yet another corpse
Wolfgang Denk [Tue, 19 Oct 2010 09:27:05 +0000 (11:27 +0200)]
NC650/CP850: remove code for yet another corpse

The NC650 / CP850 boards have long been unmaintained and left broken.
As obviously nobody is interested in that code any more, we may as
well remove it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoQONG: fix and update board config file
Wolfgang Denk [Tue, 19 Oct 2010 09:10:06 +0000 (11:10 +0200)]
QONG: fix and update board config file

Fix flash memory map and other updates for QONG board:

- adjust/fix "kernel_addr" settings
- adjust/fix mtdparts NOR flash settings
- add mtdparts NAND flash mapping
- sort command list
- enable "setexpr" command
- enable ext2 support
- delete bogus comment

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
14 years agoi.MX31: Fix Litekit board to use new ARM relocation support.
Magnus Lilja [Sat, 16 Oct 2010 17:47:06 +0000 (19:47 +0200)]
i.MX31: Fix Litekit board to use new ARM relocation support.

Tested on hardware. Boots Linux nicely.

Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
14 years agoMX5: Remove dead code with ENABLE_IMPRECISE_ABORT
Jason Liu [Tue, 19 Oct 2010 08:22:14 +0000 (16:22 +0800)]
MX5: Remove dead code with ENABLE_IMPRECISE_ABORT

This code section is dead due to we never define
ENABLE_IMPRECISE_ABORT for MX5

Signed-off-by: Jason Liu <r64343@freescale.com>
14 years agoRename TEXT_BASE: fix merge conflicts
Wolfgang Denk [Mon, 18 Oct 2010 21:43:37 +0000 (23:43 +0200)]
Rename TEXT_BASE: fix merge conflicts

Commit 14d0a02a "Rename TEXT_BASE into CONFIG_SYS_TEXT_BASE" missed a
few places, especially for boards that were added inbetween. Fix the
remaining issues.

Signed-off-by: Wolfgang Denk <wd@denx.de>
14 years agoARM: enable device tree for beagle
John Rigby [Wed, 13 Oct 2010 19:57:37 +0000 (13:57 -0600)]
ARM: enable device tree for beagle

For testing ARM device tree support

Signed-off-by: John Rigby <john.rigby@linaro.org>
Acked-by: Wolfgang Denk <wd@denx.de>
14 years agoARM: add flat device tree support
John Rigby [Wed, 13 Oct 2010 19:57:36 +0000 (13:57 -0600)]
ARM: add flat device tree support

Based on other architectures already supported.
Tested on OMAP3 Beagle board and another unnamed ARM platform.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Tested-by: Rob Herring <rob.herring@smooth-stone.com>
Acked-by: Wolfgang Denk <wd@denx.de>
14 years agoboot: change some arch ifdefs to feature ifdefs
John Rigby [Wed, 13 Oct 2010 19:57:35 +0000 (13:57 -0600)]
boot: change some arch ifdefs to feature ifdefs

The routines boot_ramdisk_high, boot_get_cmdline and boot_get_kbd
are currently enabled by various combinations of CONFIG_M68K,
CONFIG_POWERPC and CONFIG_SPARC.

Use CONFIG_SYS_BOOT_<FEATURE> defines instead.

CONFIG_SYS_BOOT_RAMDISK_HIGH
CONFIG_SYS_BOOT_GET_CMDLINE
CONFIG_SYS_BOOT_GET_KBD

Define these as appropriate in arch/include/asm/config.h files.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Acked-by: Wolfgang Denk <wd@denx.de>
14 years agoFDT: only call boot_get_fdt from generic code
John Rigby [Wed, 13 Oct 2010 19:57:34 +0000 (13:57 -0600)]
FDT: only call boot_get_fdt from generic code

All arches except nios2 and microblaze call boot_get_fdt
from bootm_start in common/cmd_bootm.c.

Having nios2 and microblaze do so as well removes code from
their respective do_bootm_linux routines and allows removal of
a nasty ifdef from bootm_start.

In the case where boot_get_fdt returns an error bootm_start
returns and the platform specific do_bootm_linux routines
will never get called.

Also only check argv[3] for an fdt addr if argc > 3 first.
This is already the case for nios2.

Signed-off-by: John Rigby <john.rigby@linaro.org>
CC: Scott McNutt <smcnutt@psyent.com>
CC: Michal Simek <monstr@monstr.eu>
CC: Thomas Chou <thomas@wytron.com.tw>
Acked-by: Wolfgang Denk <wd@denx.de>
Acked-by: Michal Simek <monstr@monstr.eu>
Tested-by: Thomas Chou <thomas@wytron.com.tw>
14 years agoFDT: Add fixup support for multiple banks of memory
John Rigby [Wed, 13 Oct 2010 19:57:33 +0000 (13:57 -0600)]
FDT: Add fixup support for multiple banks of memory

Add fdt_fixup_memory_banks and reimplement fdt_fixup_memory
using it.  Tested on OMAP3 beagle board with two banks of
memory.

Signed-off-by: John Rigby <john.rigby@linaro.org>
CC: Jerry Van Baren <vanbaren@cideas.com>
Acked-by: Gerald Van Baren <vanbaren@cideas.com>
14 years agocommon/image.c remove extra calls to be32_to_cpu in boot_get_fdt
John Rigby [Wed, 13 Oct 2010 19:57:32 +0000 (13:57 -0600)]
common/image.c remove extra calls to be32_to_cpu in boot_get_fdt

fdt_totalsize returns size in cpu endian so don't call be32_to_cpu
on the result.  This was harmless on big endian platforms but not
on little endian ARMs.

Signed-off-by: John Rigby <john.rigby@linaro.org>
14 years agocommon/image.c fix length calculation in boot_relocate_fdt
John Rigby [Wed, 13 Oct 2010 19:57:31 +0000 (13:57 -0600)]
common/image.c fix length calculation in boot_relocate_fdt

boot_relocate_fdt is called on platforms with CONFIG_SYS_BOOTMAPSZ
defined to relocate the device tree blob to be inside the
boot map area between bootmap_base and bootmap_base+CONFIG_SYS_BOOTMAPSZ.

For the case where the blob needs to be relocated, space is
allocated inside the bootmap by calling lmb_alloc_base with
size passed in plus some padding:

    of_len = *of_size + CONFIG_SYS_FDT_PAD;

For the case where the blob is already inside the bounds of the boot map
area, lmb_reserve is called to reserve the the space where the blob is
already residing.  The calculation for this case is currently:

    of_len = (CONFIG_SYS_BOOTMAPSZ + bootmap_base) - (ulong)fdt_blob;

This is wrong because it reserves all the space in the boot map area
from the blob to the end ignoring completely the actual size. The
worst case is where the blob is at the beginning and the entire boot map
area get reserved. Fix this by changing the length calculation to this:

    of_len = *of_size + CONFIG_SYS_FDT_PAD;

This bug has likely never manifested itself because bootm has never
been called with the fdt blob already in the bootmap area.  In my
testing on an OMAP3 beagle board I initially worked around the bug
by simply moving the initial location of the fdt blob.  I have tested
with the new calculation with the fdt blob both inside and outside
the boot map area.

Signed-off-by: John Rigby <john.rigby@linaro.org>
14 years agodlmalloc.c: Fix gcc alias warning
Joakim Tjernlund [Thu, 14 Oct 2010 06:51:34 +0000 (08:51 +0200)]
dlmalloc.c: Fix gcc alias warning

Fix these warnings:
dlmalloc.c: In function 'free':
dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules
dlmalloc.c:2507: warning: dereferencing pointer '({anonymous})' does break strict-aliasing rules

Some page(http://blog.worldofcoding.com/2010/02/solving-gcc-44-strict-aliasing-problems.html)
suggests adding __attribute__((__may_alias__)). Doing so makes the warnings go away.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Mike Frysinger <vapier@gentoo.org>
14 years agopowerpc: do not fixup NULL ptrs
Joakim Tjernlund [Thu, 14 Oct 2010 09:51:44 +0000 (11:51 +0200)]
powerpc: do not fixup NULL ptrs

The fixup routine must not fixup NULL pointers.
Problem can be seen by
 char *testfun(void) __attribute__((weak));
 char *(*myfun)(void) = testfun;

Then add
  printf("myfun:%p, &myfun:%p\n", myfun, &myfun);
before relocation and after relocation.
myfun should be NULL in both cases but it is not.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
14 years agopowerpc: Cleanup BOOTFLAG_* references
Peter Tyser [Fri, 15 Oct 2010 04:33:24 +0000 (23:33 -0500)]
powerpc: Cleanup BOOTFLAG_* references

Now that warm booting is not supported, there isn't a need for the
BOOTFLAG_COLD and BOOTFLAG_WARM defines, so remove them.

Note that this change makes the board info bd_bootflags field useless.
It will always be set to 0, but we leave it around so that we don't
break the board info structure that some OSes are expecting to be passed
from U-Boot.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
14 years agoMPC5121: Add USB EHCI support
Damien Dusha [Thu, 14 Oct 2010 13:27:06 +0000 (15:27 +0200)]
MPC5121: Add USB EHCI support

Signed-off-by: Francesco Rendine <francesco.rendine@valueteam.com>
Signed-off-by: Damien Dusha <d.dusha@gmail.com>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Coding style cleanup; slight file restructuring.
Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Remy Bohmer <linux@bohmer.net>
14 years agoMerge branch 'master' of /home/wd/git/u-boot/master/
Wolfgang Denk [Mon, 18 Oct 2010 20:29:40 +0000 (22:29 +0200)]
Merge branch 'master' of /home/wd/git/u-boot/master/

14 years agoMAINTAINERS: Fix alphabetical order in ARM subsection
Enric Balletbo i Serra [Mon, 18 Oct 2010 17:38:34 +0000 (19:38 +0200)]
MAINTAINERS: Fix alphabetical order in ARM subsection

I'm noticed that IGEP maintainer isn't in the correct place within
the ARM subsection: it's supposed to be in alphabetical order by
maintainer. This patch fix this.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
14 years agoMerge branch 'master' of git://git.denx.de/u-boot-nand-flash
Wolfgang Denk [Mon, 18 Oct 2010 20:23:36 +0000 (22:23 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-nand-flash

14 years agoconfig.mk cleanup: drop "-I$(TOPDIR)/board" entries
Wolfgang Denk [Sun, 17 Oct 2010 15:31:59 +0000 (17:31 +0200)]
config.mk cleanup: drop "-I$(TOPDIR)/board" entries

After the recent cleanups, a number of config.mk files consist only of
a "PLATFORM_CPPFLAGS += -I$(TOPDIR)/board" entry whih is not needed.
Remove such entries.  In most cases, that means that the whole
config.mk file can be removed.

Signed-off-by: Wolfgang Denk <wd@denx.de>