oweals/u-boot.git
13 years agopowerpc/mpc8xxx: adjust DDR burst length and chop accroding to sdram width
York Sun [Thu, 26 May 2011 23:25:48 +0000 (07:25 +0800)]
powerpc/mpc8xxx: adjust DDR burst length and chop accroding to sdram width

If the bus width is 32-bit, burst chop should be disabled and burst length
should be 8. Read from SPD or other source to determine the width.

Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/86xx: display boot device and bank on the MPC8610 HPCD
Timur Tabi [Thu, 28 Apr 2011 18:41:20 +0000 (13:41 -0500)]
powerpc/86xx: display boot device and bank on the MPC8610 HPCD

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Add NAND boot support for P3041/P5020DS
Shaohui Xie [Mon, 9 May 2011 08:53:51 +0000 (16:53 +0800)]
powerpc/85xx: Add NAND boot support for P3041/P5020DS

When booting from NAND we get the environment and FMan ucode from NAND.

Signed-off-by: Shaohui Xie <b21989@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Add P2041 processor support
Kumar Gala [Fri, 13 May 2011 06:16:07 +0000 (01:16 -0500)]
powerpc/85xx: Add P2041 processor support

The P2041 is similar to P2040, however has a 10G port and backside L2

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/p2040: Add various p2040 specific information
Mingkai Hu [Fri, 15 Apr 2011 07:18:03 +0000 (15:18 +0800)]
powerpc/p2040: Add various p2040 specific information

Add P2040 SoC specific information:
* LIODN setup
* Portal configuration
* etc

Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
Signed-off-by: Roy Zang <tie-fei.zang@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Fix compile errors if CONFIG_SYS_DPAA_QBMAN isn't set
Kumar Gala [Thu, 19 May 2011 21:15:11 +0000 (16:15 -0500)]
powerpc/85xx: Fix compile errors if CONFIG_SYS_DPAA_QBMAN isn't set

Add ifdef protection for qp_info and liodn associated with Q/BMan.  Also
rearrange setting of _tbl_sz variables to utilize existing ifdef
protection for things like FMAN.

Also add protection around setup_portals() call in corenet_ds board
code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoqoriq/p1_p2_rdb: Add Dual Role USB support macro for P1020RDB
Ramneek Mehresh [Thu, 12 May 2011 14:01:42 +0000 (19:31 +0530)]
qoriq/p1_p2_rdb: Add Dual Role USB support macro for P1020RDB

Add CONFIG_HAS_FSL_DR_USB macro for P1020RDB

Signed-off-by: Ramneek Mehresh <ramneek.mehresh@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Fix compile errors if CONFIG_SYS_{BR,OR}0_PRELIM aren't set
Kumar Gala [Fri, 20 May 2011 05:54:39 +0000 (00:54 -0500)]
powerpc/85xx: Fix compile errors if CONFIG_SYS_{BR,OR}0_PRELIM aren't set

Add ifdef protection in LBC code to handle the case in which
CONFIG_SYS_BR0_PRELIM and CONFIG_SYS_OR0_PRELIM arent defined for a
build.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agopowerpc/85xx: Fix compile errors if CONFIG_SYS_{B,Q}MAN_MEM_PHYS aren't set
Kumar Gala [Fri, 20 May 2011 05:51:55 +0000 (00:51 -0500)]
powerpc/85xx: Fix compile errors if CONFIG_SYS_{B,Q}MAN_MEM_PHYS aren't set

Add ifdef protection in LAW & TLB code to handle the case in which
CONFIG_SYS_BMAN_MEM_PHYS or CONFIG_SYS_QMAN_MEM_PHYS arent defined for a
build.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
13 years agoMPC83XX: Fix PCI express clock setup
Bill Cook [Wed, 25 May 2011 19:51:07 +0000 (15:51 -0400)]
MPC83XX: Fix PCI express clock setup

On a 8308 based board it was found that the PEX_GLK_RATIO register
(programmed in arch/powerpc/cpu/mpc83xx/pcie.c) was getting set to 0, This
was tracked to the fact that the pci express clock frequency was not being
assigned to the pciexp1_clk entry in the global data structure in file
arch/powerpc/cpu/mpc83xx/speed.c. Fix this and a similiar issue in
'do_clocks' command.

Signed-off-by: Bill Cook <cook@isgchips.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agopowerpc/83xx: remove empty board_early_init_f()
Timur Tabi [Thu, 28 Apr 2011 20:01:29 +0000 (15:01 -0500)]
powerpc/83xx: remove empty board_early_init_f()

Remove an empty board_early_init_f() from the MPC8323ERD and MPC360ERDK boards.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agompc83xx: Add support for MergerBox board
Andre Schwarz [Thu, 14 Apr 2011 13:11:44 +0000 (15:11 +0200)]
mpc83xx: Add support for MergerBox board

Includes board config file, documentation, maintainer and boards.cfg
entries, and board specific files in vendor dir.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agoMPC83xx: add config options for memory setup.
Andre Schwarz [Thu, 14 Apr 2011 12:54:05 +0000 (14:54 +0200)]
MPC83xx: add config options for memory setup.

CPO value and driver strength settings are board specifc.
Also allow SPD data fetch from any accessible I2C EEPROM.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Acked-by: York Sun <yorksun@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agoMPC83xx: add define for global half-strength enable (HSE)
Andre Schwarz [Thu, 14 Apr 2011 12:53:37 +0000 (14:53 +0200)]
MPC83xx: add define for global half-strength enable (HSE)

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agoMPC837x: set i2c1_clk
Andre Schwarz [Thu, 14 Apr 2011 12:57:40 +0000 (14:57 +0200)]
MPC837x: set i2c1_clk

 Running on mpc837x without CONFIG_FSL_ESDHC leads to
 i2c1_clk not being set at all. It is bound to clock
 of encryption module. fix this.

Signed-off-by: Andre Schwarz <andre.schwarz@matrix-vision.de>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agofsl_dma: fix support for 83xx DMA engine
Ira W. Snyder [Tue, 1 Mar 2011 22:40:55 +0000 (14:40 -0800)]
fsl_dma: fix support for 83xx DMA engine

Commit 359ec4931944adb885882deb9b781e4095eabc94 broke support for the
Freescale DMA engine on the 83xx parts. This is due to using registers
which do not exist on 83xx. Remove the attribute register accesses from
the 83xx build.

Signed-off-by: Ira W. Snyder <iws@ovro.caltech.edu>
Cc: York Sun <yorksun@freescale.com>
Cc: Peter Tyser <ptyser@xes-inc.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
13 years agoAdd support for Network Space v2 and parents
Simon Guinot [Fri, 17 Jun 2011 14:11:33 +0000 (19:41 +0530)]
Add support for Network Space v2 and parents

This patch add support for the Network Space v2 board and parents, based
on the Marvell Kirkwood 6281 SoC. This include Network Space (Max) v2
and Internet Space v2.

Additional information is available at:
http://lacie-nas.org/doku.php?id=network_space_v2

Signed-off-by: Simon Guinot <sguinot@lacie.com>
13 years agoarm/km: add support for portl2 board
Valentin Longchamp [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/km: add support for portl2 board

This adds support for the keymile Kirkwood BEC portl2 board. This board
relies on the km_arm (km_kirkwood) BEC.

The egiga driver is configured for a 100M full-duplex, A/N off connnection
to the backplane. This board has always ethernet present, because it is
connected to the marvell switch similar to mgcoge3un. The reset_phy
functionality is also the same to mgcoge3un.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm/km: replace suenx targets with km_kirkwood
Holger Brunck [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/km: replace suenx targets with km_kirkwood

suen3 and suen8 were in first HW version quite different, but
now they are from a u-boot point of view similar. So these
two boards can use the same header file. Other keymile boards
differ only in the usage of the PCI interface. Therefore
a target km_kirkwood_pci was introduced. All targets use
the same header file.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm/km: ethernet support for mgcoge3un
Valentin Longchamp [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/km: ethernet support for mgcoge3un

The phy is also configured with "RGMII clock transitions when data
stable" and "Class A driver for the direct backplane connection".

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm/km: use board KM_ENV_BUS for CONFIG_I2C_ENV_EEPROM_BUS
Valentin Longchamp [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/km: use board KM_ENV_BUS for CONFIG_I2C_ENV_EEPROM_BUS

This is defined for all km_kirkwood boards and was not used up to now.
This value was the same for all boards but it could be changed for some
boards (and thus needs to be defined for every board).

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm/km: remove unneeded define
Holger Brunck [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/km: remove unneeded define

CONFIG_ENV_SIZE for NAND was later in this file overwritten
because we have the environment in i2c eeprom, so remove
this define.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm/km: fix u-boot.kwb build breakage
Holger Brunck [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/km: fix u-boot.kwb build breakage

commit 010a958b
(arm/km: remove CONFIG_SYS_KWD_CONFIG from keymile-common.h)
breaks building keymile arm targets, when u-boot.kwb tries to
generate the binary with mkimage. A simple make <board> or MAKEALL
succeeded because it don't try to build the kirwood binary at the end.

Due this commit we use the CONFIG_SYS_KWD_CONFIG from the
arch-kirkwood/config.h and it was removed from the board config.
But it was forgotten to include the header. Now the header is included
in km_arm.h. Some other defines were obsolete due to this include,
these are also removed in this commit.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoarm/kirkwood: if CONFIG_SOFT_I2C is set don't set CONFIG_I2C_MVTWSI
Holger Brunck [Thu, 16 Jun 2011 12:41:15 +0000 (18:11 +0530)]
arm/kirkwood: if CONFIG_SOFT_I2C is set don't set CONFIG_I2C_MVTWSI

Some boards e.g. keymile arm boards have CONFIG_CMD_I2C switched on
but they use soft i2c on kirkwood. So don't switch CONFIG_I2C_MVTWSI
on in this case.

Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
cc: Valentin Longchamp <valentin.longchamp@keymile.com>
cc: Prafulla Wadaskar <prafulla@marvell.com>
cc: Heiko Schocher <hs@denx.de>

13 years agoFix compiler error for cpu at91sam9, if lowlevel init is enabled
Jens Scharsig [Tue, 28 Jun 2011 23:40:07 +0000 (23:40 +0000)]
Fix compiler error for cpu at91sam9, if lowlevel init is enabled

* Fix compiler error for cpu at91sam9, if lowlevel init is enabled
* use correct ATMEL_ name scheme to define ATMEL_BASE_SDRAMC

Signed-off-by: Jens Scharsig
13 years agoatstk100x: switch to common cfi driver
Andreas Bießmann [Tue, 28 Jun 2011 04:15:58 +0000 (04:15 +0000)]
atstk100x: switch to common cfi driver

This patch removes the board implemenatation for flash driver which can now
safely switched to the common cfi driver.

Compile tested for all atstk100x boards, runtime tested on atstk1002.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
13 years agodriver/serial: delete at91rm9200_usart
Andreas Bießmann [Sun, 12 Jun 2011 01:49:17 +0000 (01:49 +0000)]
driver/serial: delete at91rm9200_usart

The at91rm9200_usart driver could be fully replaced by atmel_usart driver.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
13 years agocpuat91: use atmel_usart
Andreas Bießmann [Sun, 12 Jun 2011 01:49:16 +0000 (01:49 +0000)]
cpuat91: use atmel_usart

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Eric Bénard <eric@eukrea.com>
13 years agoeb_cpux9k2: use atmel_usart
Andreas Bießmann [Sun, 12 Jun 2011 01:49:15 +0000 (01:49 +0000)]
eb_cpux9k2: use atmel_usart

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Jens Scharsig <js_at_ng@scharsoft.de>
Acked-by: Jens Scharsig<js_at_ng@scharsoft.de>
Tested-by: Jens Scharsig<js_at_ng@scharsoft.de> (for eb_cpux9k2 board)
13 years agoat91rm9200ek: use atmel_usart
Andreas Bießmann [Sun, 12 Jun 2011 01:49:14 +0000 (01:49 +0000)]
at91rm9200ek: use atmel_usart

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
13 years agoarm920t/at91: add at91rm9200_devices.c
Andreas Bießmann [Sun, 12 Jun 2011 01:49:13 +0000 (01:49 +0000)]
arm920t/at91: add at91rm9200_devices.c

This is a copy of arm926ejs/at91 api for perpherial initialisation.
At the moment we just need the usart part of the api.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
13 years agoarm920t/at91: use new clock.c features
Andreas Bießmann [Sun, 12 Jun 2011 01:49:12 +0000 (01:49 +0000)]
arm920t/at91: use new clock.c features

This patch enables the new clock features from arm920t/at91/clock.c. This
is an required step to get at91rm9200_usart replaced by atmel_usart driver.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Cc: Jens Scharsig <js_at_ng@scharsoft.de>
Cc: Eric Bénard <eric@eukrea.com>
13 years agoarm920t/at91: add clock.c
Andreas Bießmann [Sun, 12 Jun 2011 01:49:11 +0000 (01:49 +0000)]
arm920t/at91: add clock.c

This patch adds an copy of arm926ejs/at91/clock.c to arm920t/at91. The
arm926ejs specialities are removed from arm920t version and vice versa.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
13 years agoat91rm9200.h: fix ATMEL_PMX_AA_TXD2
Andreas Bießmann [Sun, 12 Jun 2011 01:25:16 +0000 (01:25 +0000)]
at91rm9200.h: fix ATMEL_PMX_AA_TXD2

This patch sets the ATMEL_PMX_AA_TXD2 to the correct value.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
CC: Jens Scharsig <js_at_ng@scharsoft.de>
CC: eric@eukrea.com
Acked-by: Eric Bénard <eric@eukrea.com>
13 years agovision2: Fix build due to WEIM registers name change
Fabio Estevam [Sat, 11 Jun 2011 17:41:53 +0000 (17:41 +0000)]
vision2: Fix build due to WEIM registers name change

commit 0015de1a (MX5: Make the weim structure complete) fixed the name for
the WEIM registers in order to match with the MX51/MX53 manuals.

Fix the WEIM register for vision2 board so that it can build again.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMX53: Add initial support for MX53ARD
Fabio Estevam [Tue, 7 Jun 2011 07:02:53 +0000 (07:02 +0000)]
MX53: Add initial support for MX53ARD

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMX5: Introduce a function for setting the chip select size
Fabio Estevam [Tue, 7 Jun 2011 07:02:52 +0000 (07:02 +0000)]
MX5: Introduce a function for setting the chip select size

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMX5: Add iomux structure
Fabio Estevam [Tue, 7 Jun 2011 07:02:51 +0000 (07:02 +0000)]
MX5: Add iomux structure

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoMX5: Make the weim structure complete
Fabio Estevam [Tue, 7 Jun 2011 07:02:50 +0000 (07:02 +0000)]
MX5: Make the weim structure complete

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoarm: Update jadecpu board
Matthias Weisser [Wed, 29 Jun 2011 02:08:07 +0000 (02:08 +0000)]
arm: Update jadecpu board

Enable dcache and arch memset/memcpy for speed reasons
Remove of config.mk and some environment overwrites
Some generic cleanup

Signed-off-by: Matthias Weisser <weisserm@arcor.de>
13 years agoarm: omap2: apollon: fix broken build
Igor Grinberg [Fri, 24 Jun 2011 09:34:38 +0000 (09:34 +0000)]
arm: omap2: apollon: fix broken build

Define CONFIG_SYS_SDRAM_BASE to physical SDRAM address
and CONFIG_SYS_INIT_SP_ADDR to physical SRAM address

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
13 years agoOMAP[34]: fix broken timer
John Rigby [Mon, 27 Dec 2010 14:33:10 +0000 (14:33 +0000)]
OMAP[34]: fix broken timer

As implemented now the timer used to implement __udelay counts
to 0xffffffff and then gets stuck there because the the programmed
reload value is 0xffffffff.  This value is not only wrong but
illegal according to the reference manual.

One can reproduce the bug by leaving a board at the u-boot prompt
for sometime then issuing a sleep command.  The sleep will hang
forever.

The timer is a count up timer that reloads as it rolls over
from 0xffffffff so the correct load value is 0.

Change TIMER_LOAD_VAL from 0xffffffff to 0 and introduce
a new constant called TIMER_OVERFLOW_VAL set to 0xffffffff.

Signed-off-by: John Rigby <john.rigby@linaro.org>
Tested-by: Igor Grinberg <grinberg@compulab.co.il>
13 years agoarm: Tegra2: GPIO: enable GPIO for Tegra2 boards
Tom Warren [Fri, 17 Jun 2011 06:27:29 +0000 (06:27 +0000)]
arm: Tegra2: GPIO: enable GPIO for Tegra2 boards

Signed-off-by: Tom Warren <twarren@nvidia.com>
13 years agoGPIO: Tegra2: add GPIO driver for Tegra2
Tom Warren [Fri, 17 Jun 2011 06:27:28 +0000 (06:27 +0000)]
GPIO: Tegra2: add GPIO driver for Tegra2

Signed-off-by: Tom Warren <twarren@nvidia.com>
13 years agoVCMA9: various cleanups/code style fixes
David Müller (ELSOFT AG) [Sun, 1 May 2011 21:52:51 +0000 (21:52 +0000)]
VCMA9: various cleanups/code style fixes

Signed-off-by: David Müller <d.mueller@elsoft.ch>
13 years agoVCMA9: use CFI driver (and remove the old one)
David Müller (ELSOFT AG) [Sun, 1 May 2011 21:52:50 +0000 (21:52 +0000)]
VCMA9: use CFI driver (and remove the old one)

Signed-off-by: David Müller <d.mueller@elsoft.ch>
13 years agoVCMA9: remove unneeded config.mk
David Müller (ELSOFT AG) [Sun, 1 May 2011 21:52:49 +0000 (21:52 +0000)]
VCMA9: remove unneeded config.mk

Signed-off-by: David Müller <d.mueller@elsoft.ch>
13 years agoarmv7: adapt s5pc1xx to the new cache maintenance framework
Aneesh V [Thu, 16 Jun 2011 23:30:54 +0000 (23:30 +0000)]
armv7: adapt s5pc1xx to the new cache maintenance framework

adapt s5pc1xx to the new layered cache maintenance framework

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarmv7: adapt omap3 to the new cache maintenance framework
Aneesh V [Thu, 16 Jun 2011 23:30:53 +0000 (23:30 +0000)]
armv7: adapt omap3 to the new cache maintenance framework

adapt omap3 to the new layered cache maintenance framework

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarmv7: adapt omap4 to the new cache maintenance framework
Aneesh V [Thu, 16 Jun 2011 23:30:52 +0000 (23:30 +0000)]
armv7: adapt omap4 to the new cache maintenance framework

adapt omap4 to the new layered cache maintenance framework

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarmv7: add PL310 support to u-boot
Aneesh V [Thu, 16 Jun 2011 23:30:51 +0000 (23:30 +0000)]
armv7: add PL310 support to u-boot

PL310 is the L2$ controller from ARM used in many SoCs
including the Cortex-A9 based OMAP4430

Add support for some of the key PL310 operations
- Invalidate all
- Invalidate range
- Flush(clean & invalidate) all
- Flush range

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarm: minor fixes for cache and mmu handling
Aneesh V [Thu, 16 Jun 2011 23:30:50 +0000 (23:30 +0000)]
arm: minor fixes for cache and mmu handling

1. make sure that page table setup is not done multiple times
2. flush_dcache_all() is more appropriate while disabling cache
   than a range flush on the entire memory(flush_cache())

   Provide a default implementation for flush_dcache_all()
   for backward compatibility and to avoid build issues.

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarmv7: integrate cache maintenance support
Aneesh V [Thu, 16 Jun 2011 23:30:49 +0000 (23:30 +0000)]
armv7: integrate cache maintenance support

- Enable I-cache on bootup
- Enable MMU and D-cache immediately after relocation
- Do necessary initialization before enabling d-cache and MMU
- Changes to cleanup_before_linux()
- Make changes according to the new framework

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarmv7: rename cache related CONFIG flags
Aneesh V [Thu, 16 Jun 2011 23:30:48 +0000 (23:30 +0000)]
armv7: rename cache related CONFIG flags

Replace the cache related CONFIG flags with more meaningful
names. Following are the changes:

CONFIG_L2_OFF      -> CONFIG_SYS_L2CACHE_OFF
CONFIG_SYS_NO_ICACHE -> CONFIG_SYS_ICACHE_OFF
CONFIG_SYS_NO_DCACHE -> CONFIG_SYS_DCACHE_OFF

Signed-off-by: Aneesh V <aneesh@ti.com>
V2:
 * Changed CONFIG_L2_OFF -> CONFIG_SYS_NO_L2CACHE
V4:
 * Changed all three flags to the final names suggested as above
   and accordingly changed the commit message

13 years agoarmv7: cache maintenance operations for armv7
Aneesh V [Thu, 16 Jun 2011 23:30:47 +0000 (23:30 +0000)]
armv7: cache maintenance operations for armv7

- Add a framework for layered cache maintenance
- separate out SOC specific outer cache maintenance from
  maintenance of caches known to CPU

- Add generic ARMv7 cache maintenance operations that affect all
  caches known to ARMv7 CPUs. For instance in Cortex-A8 these
  opertions will affect both L1 and L2 caches. In Cortex-A9
  these will affect only L1 cache

- D-cache operations supported:
- Invalidate entire D-cache
- Invalidate D-cache range
- Flush(clean & invalidate) entire D-cache
- Flush D-cache range
- I-cache operations supported:
- Invalidate entire I-cache

- Add maintenance functions for TLB, branch predictor array etc.

- Enable -march=armv7-a so that armv7 assembly instructions can be
  used

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoarm: make default implementation of cache_flush() weakly linked
Aneesh V [Thu, 16 Jun 2011 23:30:46 +0000 (23:30 +0000)]
arm: make default implementation of cache_flush() weakly linked

make default implementation of cache_flush() weakly linked so that
sub-architectures can override it

Signed-off-by: Aneesh V <aneesh@ti.com>
13 years agoMakefile: need to remove generated u-boot-nand_spl.lds
Kumar Gala [Thu, 30 Jun 2011 06:17:02 +0000 (01:17 -0500)]
Makefile: need to remove generated u-boot-nand_spl.lds

On MPC85xx based NAND_SPL builds we generate a u-boot-nand_spl.lds based
on output from preprocessor.  We where never removed it.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agoNAND: Add 16bit NAND support for the NDFC
Alex Waterman [Thu, 19 May 2011 19:08:36 +0000 (15:08 -0400)]
NAND: Add 16bit NAND support for the NDFC

This patch adds support for 16 bit NAND devices attached to the
NDFC on ppc4xx processors. Two config entries were added:

  CONFIG_SYS_NDFC_16        - Setting this tells the NDFC that a
      16 bit device is attached.
  CONFIG_SYS_NDFC_EBC0_CFG  - This is for the External Bus
      Controller configuration register.

Also, a new ndfc_read_byte() function was added which does not
first convert the data to little endian.

The NAND SPL was also modified to do 16bit bad block testing
when a 16 bit chip is being used.

Signed-off-by: Alex Waterman <awaterman@dawning.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agocmd_nand: add nand write.trimffs command
Ben Gardiner [Tue, 14 Jun 2011 20:35:07 +0000 (16:35 -0400)]
cmd_nand: add nand write.trimffs command

Add another nand write. variant, trimffs. This command will request of
nand_write_skip_bad() that all trailing all-0xff pages will be
dropped from eraseblocks when they are written to flash as-per the
reccommended behaviour of the UBI FAQ [1].

The function that implements this timming is the drop_ffs() function
by Artem Bityutskiy, ported from the mtd-utils tree.

[1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Artem Bityutskiy <dedekind1@gmail.com>
CC: Detlev Zundel <dzu@denx.de>
Acked-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agonand_util: drop trailing all-0xff pages if requested
Ben Gardiner [Tue, 14 Jun 2011 20:35:06 +0000 (16:35 -0400)]
nand_util: drop trailing all-0xff pages if requested

Add a flag to nand_read_skip_bad() such that if true, any trailing
pages in an eraseblock whose contents are entirely 0xff will be
dropped.

The implementation is via a new drop_ffs() function which is
based on the function of the same name from the ubiformat
utility by Artem Bityutskiy.

This is as-per the reccomendations of the UBI FAQ [1]

[1] http://www.linux-mtd.infradead.org/doc/ubi.html#L_flasher_algo

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Artem Bityutskiy <dedekind1@gmail.com>
Acked-by: Detlev Zundel <dzu@denx.de>
CC: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agonand_util: treat WITH_YAFFS_OOB as a mode
Ben Gardiner [Tue, 14 Jun 2011 20:35:05 +0000 (16:35 -0400)]
nand_util: treat WITH_YAFFS_OOB as a mode

When specified in the flags argument of nand_write, WITH_YAFFS_OOB causes an
operation which is mutually exclusive with the 'usual' way of writing.

Add a check that client code does not specify WITH_YAFFS_OOB along with any
other flags and add a comment indicating that the WITH_YAFFS_OOB flag should
not be mixed with other flags.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
CC: Scott Wood <scottwood@freescale.com>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agonand_util: convert nand_write_skip_bad() to flags
Ben Gardiner [Tue, 24 May 2011 14:18:35 +0000 (10:18 -0400)]
nand_util: convert nand_write_skip_bad() to flags

In a future commit the behaviour of nand_write_skip_bad()
will be further extended.

Convert the only flag currently passed to the nand_write_
skip_bad() function to a bitfield of only one allocated
member. This should avoid an explosion of int's at the
end of the parameter list or the ambiguous calls like

nand_write_skip_bad(info, offset, len, buf, 0, 1, 1);
nand_write_skip_bad(info, offset, len, buf, 0, 1, 0);

Instead there will be:

nand_write_skip_bad(info, offset, len, buf, WITH_YAFFS_OOB |
WITH_OTHER);

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Detlev Zundel <dzu@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agonand_base: trivial: fix comment read/write comment
Ben Gardiner [Tue, 24 May 2011 14:18:34 +0000 (10:18 -0400)]
nand_base: trivial: fix comment read/write comment

Replace an incorrect 'read' with 'write' in a comment.

Signed-off-by: Ben Gardiner <bengardiner@nanometrics.ca>
Acked-by: Detlev Zundel <dzu@denx.de>
Signed-off-by: Scott Wood <scottwood@freescale.com>
13 years agoMerge branch 'next' of git://git.denx.de/u-boot-nios
Wolfgang Denk [Fri, 1 Jul 2011 07:42:25 +0000 (09:42 +0200)]
Merge branch 'next' of git://git.denx.de/u-boot-nios

* 'next' of git://git.denx.de/u-boot-nios:
  nios2: move generic config to boards.cfg

13 years agonios2: move generic config to boards.cfg
Mike Frysinger [Mon, 27 Jun 2011 03:00:19 +0000 (23:00 -0400)]
nios2: move generic config to boards.cfg

I can't build test this, but just looking at the config files written
and it seems OK ...

Tested-by: Thomas Chou <thomas@wytron.com.tw>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Scott McNutt <smcnutt@psyent.com>
13 years agocfi_flash: reverse geometry for newer STM parts
Mike Frysinger [Mon, 9 May 2011 22:33:36 +0000 (18:33 -0400)]
cfi_flash: reverse geometry for newer STM parts

For newer STM parts where CFI >= 1.1, there is a byte in the extended
structure that declares the flash layout type (just like the AMD parts),
so key off of that to find out when we need to reverse the geometry.

This can be seen with M29W640 parts where U-Boot does:
Bank # 1: CFI conformant FLASH (16 x 16)  Size: 8 MB in 135 Sectors
  AMD Standard command set, Manufacturer ID: 0x20, Device ID: 0x22ED
  Erase timeout: 8192 ms, write timeout: 1 ms
  Buffer write timeout: 1 ms, buffer size: 16 bytes

  Sector Start Addresses:
  20000000   RO   20002000   RO   20004000   RO   20006000   RO   20008000   RO
  2000A000   RO   2000C000   RO   2000E000   RO   20010000   RO   20020000   RO
  ...

But Linux does:
physmap platform flash device: 00800000 at 20000000
physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank.
                 Manufacturer ID 0x000020 Chip ID 0x0022ed
physmap-flash.0: Swapping erase regions for top-boot CFI table.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Stefan Roese <sr@denx.de>
13 years agoPrepare v2011.06 v2011.06
Wolfgang Denk [Mon, 27 Jun 2011 20:22:42 +0000 (22:22 +0200)]
Prepare v2011.06

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoMinor coding style fixes.
Wolfgang Denk [Mon, 27 Jun 2011 20:20:37 +0000 (22:20 +0200)]
Minor coding style fixes.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agousb: convert to partial linking
Mike Frysinger [Sat, 25 Jun 2011 01:12:36 +0000 (21:12 -0400)]
usb: convert to partial linking

Looks like this was missed during the conversion to partial linking.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoehci-pci: Fix PCI EHCI driver for 36-bit
Zhao Chenhui [Tue, 19 Apr 2011 02:47:05 +0000 (10:47 +0800)]
ehci-pci: Fix PCI EHCI driver for 36-bit

Convert the PCI base address into a virtual address.

Signed-off-by: Zhao Chenhui <b35336@freescale.com>
Signed-off-by: Li Yang <leoli@freescale.com>
13 years agomusb: process control messages after roothub accepted it
Cliff Cai [Thu, 21 Apr 2011 16:42:10 +0000 (12:42 -0400)]
musb: process control messages after roothub accepted it

When dealing with non-multipoint devices, if the software root hub code
accepted the message, then we still need to process it normally.  So only
return quickly when the root hub skipped the message or is otherwise in
an error state.

Signed-off-by: Cliff Cai <cliff.cai@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Wolfgang Denk [Thu, 23 Jun 2011 13:37:33 +0000 (15:37 +0200)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

* 'master' of git://git.denx.de/u-boot-arm:
  run arm_pci_init after relocation
  IXP42x PCI rewrite
  update/fix PDNB3 board
  update/fix IXDP425 / IXDPG425 boards
  add dvlhost (dLAN 200 AV Wireless G) board
  IXP NPE: add support for fixed-speed MII ports
  update/fix AcTux4 board
  update/fix AcTux3 board
  update/fix AcTux2 board
  update/fix AcTux1 board
  use -ffunction-sections / --gc-sections on IXP42x
  support CONFIG_SYS_LDSCRIPT on ARM
  fix "depend" target in npe directory
  Fix IXP code to work after relocation was added
  trigger hardware watchdog in IXP42x serial driver
  add support for IXP42x Rev. B1 and newer
  add XScale sub architecture (IXP/PXA) to maintainer list

Conflicts:
arch/arm/lib/board.c

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agorun arm_pci_init after relocation
Michael Schwingen [Sun, 22 May 2011 22:00:13 +0000 (00:00 +0200)]
run arm_pci_init after relocation

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoIXP42x PCI rewrite
Michael Schwingen [Sun, 22 May 2011 22:00:12 +0000 (00:00 +0200)]
IXP42x PCI rewrite

clean up IXP PCI handling: get rid of IXP-private bus scan, BAR assign etc.
code and use u-boot's PCI infrastructure instead.  Move board-specific PCI
setup code (clock/reset) to board directory.

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoupdate/fix PDNB3 board
Michael Schwingen [Sun, 22 May 2011 22:00:11 +0000 (00:00 +0200)]
update/fix PDNB3 board

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoupdate/fix IXDP425 / IXDPG425 boards
Michael Schwingen [Sun, 22 May 2011 22:00:10 +0000 (00:00 +0200)]
update/fix IXDP425 / IXDPG425 boards

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoadd dvlhost (dLAN 200 AV Wireless G) board
Michael Schwingen [Sun, 22 May 2011 22:00:09 +0000 (00:00 +0200)]
add dvlhost (dLAN 200 AV Wireless G) board

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoIXP NPE: add support for fixed-speed MII ports
Michael Schwingen [Sun, 22 May 2011 22:00:08 +0000 (00:00 +0200)]
IXP NPE: add support for fixed-speed MII ports

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoupdate/fix AcTux4 board
Michael Schwingen [Sun, 22 May 2011 22:00:07 +0000 (00:00 +0200)]
update/fix AcTux4 board

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoupdate/fix AcTux3 board
Michael Schwingen [Sun, 22 May 2011 22:00:06 +0000 (00:00 +0200)]
update/fix AcTux3 board

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoupdate/fix AcTux2 board
Michael Schwingen [Sun, 22 May 2011 22:00:05 +0000 (00:00 +0200)]
update/fix AcTux2 board

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoupdate/fix AcTux1 board
Michael Schwingen [Sun, 22 May 2011 22:00:04 +0000 (00:00 +0200)]
update/fix AcTux1 board

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agouse -ffunction-sections / --gc-sections on IXP42x
Michael Schwingen [Sun, 22 May 2011 22:00:03 +0000 (00:00 +0200)]
use -ffunction-sections / --gc-sections on IXP42x

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agosupport CONFIG_SYS_LDSCRIPT on ARM
Michael Schwingen [Sun, 22 May 2011 22:00:02 +0000 (00:00 +0200)]
support CONFIG_SYS_LDSCRIPT on ARM

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agofix "depend" target in npe directory
Michael Schwingen [Sun, 22 May 2011 22:00:01 +0000 (00:00 +0200)]
fix "depend" target in npe directory

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoFix IXP code to work after relocation was added
Michael Schwingen [Sun, 22 May 2011 22:00:00 +0000 (00:00 +0200)]
Fix IXP code to work after relocation was added

 - jump to real flash location after reset before turning off flash mirror
 - fix timer system to use HZ == 1000, remove broken interrupt-based code

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agotrigger hardware watchdog in IXP42x serial driver
Michael Schwingen [Sun, 22 May 2011 21:59:59 +0000 (23:59 +0200)]
trigger hardware watchdog in IXP42x serial driver

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoadd support for IXP42x Rev. B1 and newer
Michael Schwingen [Sun, 22 May 2011 21:59:58 +0000 (23:59 +0200)]
add support for IXP42x Rev. B1 and newer

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agoadd XScale sub architecture (IXP/PXA) to maintainer list
Michael Schwingen [Sun, 22 May 2011 21:59:57 +0000 (23:59 +0200)]
add XScale sub architecture (IXP/PXA) to maintainer list

Signed-off-by: Michael Schwingen <michael@schwingen.org>
13 years agotools: make it possible to build tools unconfigured
Mike Frysinger [Sun, 19 Jun 2011 08:27:39 +0000 (08:27 +0000)]
tools: make it possible to build tools unconfigured

On Sunday, June 19, 2011 13:55:13 Ilya Yanok wrote:
> On 18.06.2011 23:03, Mike Frysinger wrote:
> >>  - tools/Makefile put common/env_embedded.o and envcrc.o to object list
> >>
> >> conditionally. This fixes errors during dependency generation.
> >
> > pretty sure this breaks board builds.  if the only thing this fixes is a
>
> I'm sorry but I can't see how this can break the builds. Could you
> please be more specific? I've tried to build some boards, it actually
> works...

i might be thinking of a different env_embedded situation.  a different
problem with your patch to tools/Makefile: you copied the same logic multiple
times which means more bitrot.

why dont you do something like:

> > harmless warning when generating dependency files, then i say ignore it.
> > after all, this is how it has always worked in the past and no one really
> > cared.
>
> Yep, they are harmless but they are not warnings but rather scary errors
> actually. ;) I think it's better to fix them.

i guess my threshold for being scared is a bit higher :p
-mike

13 years agoMakefile: move $(VERSION_FILE) rule out of ifeq configured
Ilya Yanok [Mon, 20 Jun 2011 12:45:38 +0000 (12:45 +0000)]
Makefile: move $(VERSION_FILE) rule out of ifeq configured

mkimage relies on autogenerated version so we need to move
$(VERSION_FILE) rule out of ifeq and make tools rule depend on it to be
able to run 'make tools' from the unconfigured tree.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoconfig.mk: move LDSCRIPT processing to the top-level Makefile
Ilya Yanok [Mon, 20 Jun 2011 12:45:37 +0000 (12:45 +0000)]
config.mk: move LDSCRIPT processing to the top-level Makefile

LDSCRIPT is used only from the top-level Makefile and only when the
system is configured so we can move LDSCRIPT and CONFIG_SYS_LDSCRIPT
related logic into the top level Makefile and under configured condition
to avoid errors when building tools from unconfigured tree.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoARM: drop unsupported 'trab' board
Wolfgang Denk [Sun, 1 May 2011 18:44:23 +0000 (20:44 +0200)]
ARM: drop unsupported 'trab' board

The 'trab' board configuration is broken, and there is nobody who is
interested and willing to fix it.  Drop it.

This includes support for VFD displays which have always been used by
this board only.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoPrepare v2011.06-rc3 v2011.06-rc3
Wolfgang Denk [Wed, 22 Jun 2011 09:39:24 +0000 (11:39 +0200)]
Prepare v2011.06-rc3

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoBuild fix/update of AFEB9260
Sergey Lapin [Thu, 9 Jun 2011 05:45:31 +0000 (05:45 +0000)]
Build fix/update of AFEB9260

Make AFEB9260 build again.
Based on fix for AT91SAM9260EK.

Signed-off-by: Sergey Lapin <slapin@ossfans.org>
13 years agomacb: fix compile warning
andreas.devel@googlemail.com [Thu, 9 Jun 2011 02:08:46 +0000 (02:08 +0000)]
macb: fix compile warning

This patch fixes following compile warning:

---8<---
macb.c: In function 'macb_write_hwaddr':
macb.c:525:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@gmail.com>
13 years agoat91_emac: fix compile warning
andreas.devel@googlemail.com [Thu, 9 Jun 2011 00:22:54 +0000 (00:22 +0000)]
at91_emac: fix compile warning

This patch removes the warning

---8<---
at91_emac.c: In function 'at91emac_write_hwaddr':
at91_emac.c:487:2: warning: dereferencing type-punned pointer will break strict-aliasing rules
--->8---

Signed-off-by: Andreas Bießmann <andreas.devel@gmail.com>
13 years agoinclude/asm/arch-at91: update several .h files to ATMEL_xxx name scheme
Eric Benard [Mon, 6 Jun 2011 22:48:26 +0000 (22:48 +0000)]
include/asm/arch-at91: update several .h files to ATMEL_xxx name scheme

Signed-off-by: Eric Bénard <eric@eukrea.com>
13 years agocpuat91: fix board support
Eric Benard [Mon, 6 Jun 2011 22:48:29 +0000 (22:48 +0000)]
cpuat91: fix board support

Signed-off-by: Eric Bénard <eric@eukrea.com>
13 years agocpu9260/9G20: fix board support
Eric Benard [Mon, 6 Jun 2011 22:48:28 +0000 (22:48 +0000)]
cpu9260/9G20: fix board support

Signed-off-by: Eric Bénard <eric@eukrea.com>