kernel/u-boot.git
13 years agoARM: Reintroduce MACH_TYPE_KM_KIRKWOOD for keymile ARM boards
Valentin Longchamp [Tue, 1 Nov 2011 11:56:36 +0000 (17:26 +0530)]
ARM: Reintroduce MACH_TYPE_KM_KIRKWOOD for keymile ARM boards

We got dropped from Linux mach-types.h because of a lack of mainline
support and this is needed since the last Linux/u-boot mach-types
synchro.

This patch also defines CONFIG_MACH_TYPE for all keymile boards, as
this is a mandatory CONFIG for ARM boards now. The initialization
of gd->bd->bi_arch_number is removed form km_arm.c, our board file.

Signed-off-by: Valentin Longchamp <valentin.longchamp@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
13 years agonetspace_v2: enable I2C EEPROM support
Simon Guinot [Tue, 1 Nov 2011 11:14:12 +0000 (16:44 +0530)]
netspace_v2: enable I2C EEPROM support

An I2C EEPROM HT24LC04 (512B) is available on the netspace_v2 board
(and parents). This EEPROM hold data such as Ethernet MAC addresses
and power flags.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
13 years agonetspace_v2: fix SDRAM configuration
Simon Guinot [Tue, 1 Nov 2011 11:14:12 +0000 (16:44 +0530)]
netspace_v2: fix SDRAM configuration

Network Space (Max) v2 and Internet Space v2 boards have different
SDRAM configuration and size: respectively 256MB (DDR2 1Gb, 128Mbx8
organisation) and 128MB (DDR2 512Mb, 64Mbx8 organisation). To handle
the differences, this patch add a dedicated kwimage.cfg file for
Internet Space v2.

Additionnaly the number of SDRAM banks is fixed.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
13 years agoarmada100: define CONFIG_SYS_CACHELINE_SIZE
Lei Wen [Tue, 1 Nov 2011 10:55:56 +0000 (16:25 +0530)]
armada100: define CONFIG_SYS_CACHELINE_SIZE

By default, on Armada100 SoC DCache Lnd ICache line
lengths are 32 bytes long

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agopantheon: define CONFIG_SYS_CACHELINE_SIZE
Lei Wen [Tue, 1 Nov 2011 10:55:56 +0000 (16:25 +0530)]
pantheon: define CONFIG_SYS_CACHELINE_SIZE

By default, on Pantheon SoC DCache Lnd ICache line
lengths are 32 bytes long

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agokirkwood: define CONFIG_SYS_CACHELINE_SIZE
Michael Walle [Mon, 31 Oct 2011 14:52:58 +0000 (20:22 +0530)]
kirkwood: define CONFIG_SYS_CACHELINE_SIZE

By default, on Kirkwood SoC DCache Lnd ICache line
lengths are 32 bytes long

Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
13 years agokirkwood: drop empty asm-offsets.s file
Mike Frysinger [Mon, 31 Oct 2011 14:33:38 +0000 (20:03 +0530)]
kirkwood: drop empty asm-offsets.s file

This generated file does not belong in the tree -> punt.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
13 years agoarm/km/mgcoge3un: enhance "waitforne" feature
Holger Brunck [Tue, 27 Sep 2011 02:54:31 +0000 (02:54 +0000)]
arm/km/mgcoge3un: enhance "waitforne" feature

The mgcoge3un waits to be released from mgcoge3ne at startup.
This patch enhances this feature with the possibility to interrupt
this wait if a key is pressed.

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

13 years agoarm/km: add variable waitforne to mgcoge3un
Holger Brunck [Tue, 27 Sep 2011 02:54:30 +0000 (02:54 +0000)]
arm/km: add variable waitforne to mgcoge3un

Add this board specific variable to the default environment
of this board.

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

13 years agogplugD: Fix for error:MACH_TYPE_SHEEVAD undeclared
Ajay Bhargav [Mon, 31 Oct 2011 11:57:46 +0000 (17:27 +0530)]
gplugD: Fix for error:MACH_TYPE_SHEEVAD undeclared

This patch fix the build failure (error: 'MACH_TYPE_SHEEVAD' undeclared
(first use in this function)) for gplugD due to recent sync of
mach-types.h with its linux original.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
13 years agoARM: dreamplug: fix compilation
Anatolij Gustschin [Sat, 29 Oct 2011 11:19:47 +0000 (11:19 +0000)]
ARM: dreamplug: fix compilation

Fix build issues:

mvrtc.c: In function 'rtc_get':
mvrtc.c:45: warning: implicit declaration of function 'readl'
mvrtc.c: In function 'rtc_set':
mvrtc.c:100: warning: implicit declaration of function 'writel'
dreamplug.c: In function 'board_early_init_f':
dreamplug.c:43: warning: implicit declaration of function 'kw_config_gpio'
dreamplug.c: In function 'board_init':
dreamplug.c:108: warning: implicit declaration of function 'kw_sdram_bar'
drivers/rtc/librtc.o: In function `rtc_set':
/home/ag/u-boot/u-boot-move-new-host/u-boot-video/drivers/rtc/mvrtc.c:92: undefined reference to `writel'
/home/ag/u-boot/u-boot-move-new-host/u-boot-video/drivers/rtc/mvrtc.c:103: undefined reference to `writel'
drivers/rtc/librtc.o: In function `rtc_reset':
/home/ag/u-boot/u-boot-move-new-host/u-boot-video/drivers/rtc/mvrtc.c:117: undefined reference to `readl'
/home/ag/u-boot/u-boot-move-new-host/u-boot-video/drivers/rtc/mvrtc.c:120: undefined reference to `readl'
drivers/rtc/librtc.o: In function `rtc_get':
/home/ag/u-boot/u-boot-move-new-host/u-boot-video/drivers/rtc/mvrtc.c:45: undefined reference to `readl'
/home/ag/u-boot/u-boot-move-new-host/u-boot-video/drivers/rtc/mvrtc.c:48: undefined reference to `readl'
...

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Jason Cooper <u-boot@lakedaemon.net>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoARM: DockStar: fix compilation
Anatolij Gustschin [Sat, 29 Oct 2011 10:09:22 +0000 (10:09 +0000)]
ARM: DockStar: fix compilation

Fix build problem:

mvgbe.c: In function 'mvgbe_initialize':
mvgbe.c:735: warning: implicit declaration of function 'get_random_hex'
dockstar.c: In function 'board_early_init_f':
dockstar.c:43: warning: implicit declaration of function 'kw_config_gpio'
dockstar.c: In function 'board_init':
dockstar.c:113: warning: implicit declaration of function 'kw_sdram_bar'
dockstar.c: In function 'set_leds':
dockstar.c:161: warning: implicit declaration of function 'readl'
dockstar.c:161: error: dereferencing pointer to incomplete type
dockstar.c:162: warning: implicit declaration of function 'writel'
dockstar.c:162: error: dereferencing pointer to incomplete type
dockstar.c:163: error: dereferencing pointer to incomplete type
dockstar.c:164: error: dereferencing pointer to incomplete type
make[1]: *** [dockstar.o] Error 1
make: *** [board/Seagate/dockstar/libdockstar.o] Error 2

Reported-by: Roland Kletzing <devzero@web.de>
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
13 years agoARM: netspace_v2: fix warnings
Anatolij Gustschin [Sat, 29 Oct 2011 11:31:19 +0000 (11:31 +0000)]
ARM: netspace_v2: fix warnings

Fix compiler warnings when compiling for netspace_v2, netspace_max_v2
and inetspace_v2:

netspace_v2.c: In function 'board_early_init_f':
netspace_v2.c:37: warning: implicit declaration of function 'kw_config_gpio'
netspace_v2.c: In function 'board_init':
netspace_v2.c:86: warning: implicit declaration of function 'kw_sdram_bar'

Signed-off-by: Anatolij Gustschin <agust@denx.de>
Cc: Simon Guinot <simon.guinot@sequanux.org>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoam335x: Drop board_sysinfo struct
Tom Rini [Fri, 21 Oct 2011 12:23:07 +0000 (12:23 +0000)]
am335x: Drop board_sysinfo struct

This isn't used presumably should be a typedef if needed later.

Signed-off-by: Tom Rini <trini@ti.com>
13 years agoam335x: Temporarily add MACH_TYPE define
Tom Rini [Fri, 21 Oct 2011 12:23:06 +0000 (12:23 +0000)]
am335x: Temporarily add MACH_TYPE define

This is registered and can be removed at the next sync up.

Signed-off-by: Tom Rini <trini@ti.com>
13 years agomisc:pmic:samsung Enable PMIC driver at C210 Universal target
Łukasz Majewski [Wed, 26 Oct 2011 22:33:17 +0000 (22:33 +0000)]
misc:pmic:samsung Enable PMIC driver at C210 Universal target

Enable support for PMIC driver at C210 Universal reference target.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agodcache:s5p CONFIG_SYS_CACHELINE_SIZE added for s5p UNIVERSAL C210 target
Łukasz Majewski [Mon, 17 Oct 2011 01:42:24 +0000 (01:42 +0000)]
dcache:s5p CONFIG_SYS_CACHELINE_SIZE added for s5p UNIVERSAL C210 target

Define the D-cache line size for S5PC210 UNIVERSAL reference target.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Anton Staaf <robotboy@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agodcache:s5p CONFIG_SYS_CACHELINE_SIZE added for s5p GONI target
Łukasz Majewski [Mon, 17 Oct 2011 01:42:23 +0000 (01:42 +0000)]
dcache:s5p CONFIG_SYS_CACHELINE_SIZE added for s5p GONI target

Define the D-cache line size for S5PC110 GONI reference target.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Anton Staaf <robotboy@chromium.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agosmdkv310: use macro for mmc data read function address
Chander Kashyap [Tue, 20 Sep 2011 21:25:04 +0000 (21:25 +0000)]
smdkv310: use macro for mmc data read function address

board/samsung/smdkv310/mmc_boot.c:
Removed the typedef for "mmc data read API (copy_sd_mmc_to_mem)"
as it is used only once and replaced hard-coded API address value
by macro.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agosmdkv310: use spl framework for mmc spl
Chander Kashyap [Tue, 20 Sep 2011 21:25:03 +0000 (21:25 +0000)]
smdkv310: use spl framework for mmc spl

smdkv310 board was using mmc_spl framework for mmc spl support.
This patch migrates the framework from mmc_spl to spl.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agoSMDKV310: use get_ram_size() to validate dram size
Chander Kashyap [Tue, 20 Sep 2011 21:25:02 +0000 (21:25 +0000)]
SMDKV310: use get_ram_size() to validate dram size

smdkv310.c: in dram_init_banksize(void) function dram size was
initialized without validation. get_ram_size() function will
validate the bank size before initialization.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agoSMDKV310: Initialize board id using CONFIG_MACH_TYPE
Chander Kashyap [Tue, 20 Sep 2011 21:25:01 +0000 (21:25 +0000)]
SMDKV310: Initialize board id using CONFIG_MACH_TYPE

Use CONFIG_MACH_TYPE generic macro to initialize board id.

Signed-off-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agoORIGEN : use absolute paths and fix tool naming
Angus Ainslie [Mon, 12 Sep 2011 10:11:58 +0000 (10:11 +0000)]
ORIGEN : use absolute paths and fix tool naming

On some hosts using relative paths will cause the build to fail. This
patch sets absolute paths for the tools directory

Get rid of MSDOS style excecutable extension

Signed-off-by: Angus Ainslie <angus.ainslie@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agoORIGEN : enable device tree support
Angus Ainslie [Fri, 9 Sep 2011 12:02:02 +0000 (12:02 +0000)]
ORIGEN : enable device tree support

Enable passing a flattened device tree to the kernel.

Signed-off-by: Angus Ainslie <angus.ainslie@linaro.org>
Acked-by: Chander Kashyap <chander.kashyap@linaro.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
13 years agoMX25: tx25: Fix building due to missing MACH_TYPE
Stefano Babic [Fri, 28 Oct 2011 08:23:02 +0000 (10:23 +0200)]
MX25: tx25: Fix building due to missing MACH_TYPE

Added MACH_TYPE for the tx25 to the configuration file.
The MACH_TYPE is dropped from mach-types.h after last sync
with kernel.

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agomx31: Add board support for HALE TT-01
Helmut Raiger [Thu, 27 Oct 2011 01:31:15 +0000 (01:31 +0000)]
mx31: Add board support for HALE TT-01

This adds basic board support for TT-01 based on
the Bluetechnix i.MX31 SOM. Currently only NOR-Flash
boot is implemented.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agomx31: add ESD control registers
Helmut Raiger [Thu, 27 Oct 2011 01:31:14 +0000 (01:31 +0000)]
mx31: add ESD control registers

This allows to initialize DDR memory in C code.
Currently all mx31 boards use assembler code (lowlevel_init.S)

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agomx31: define pins and init for UART2 and CSPI3
Helmut Raiger [Thu, 27 Oct 2011 01:31:13 +0000 (01:31 +0000)]
mx31: define pins and init for UART2 and CSPI3

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agoMX35: add support for flea3 board
Stefano Babic [Sun, 23 Oct 2011 23:58:20 +0000 (23:58 +0000)]
MX35: add support for flea3 board

The flea3 board is a custom board by CarMediaLab used
in automotive.
Network (FEC), NOR, NAND and SPI are supported.

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agoMX51: vision2: add MACH_TYPE in config file
Stefano Babic [Thu, 27 Oct 2011 12:30:27 +0000 (14:30 +0200)]
MX51: vision2: add MACH_TYPE in config file

Add the MACH type to the configuration file. Maybe the board
will be not pushed into linux ML, but it remains compatible
with older kernels.

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agovision2: Remove unused header file
Fabio Estevam [Tue, 25 Oct 2011 04:34:20 +0000 (04:34 +0000)]
vision2: Remove unused header file

errno.h is not used on this file, so remove it.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agomx51evk: Remove unused get_board_rev function
Fabio Estevam [Wed, 26 Oct 2011 09:01:00 +0000 (09:01 +0000)]
mx51evk: Remove unused get_board_rev function

No board information is passed for MX51EVK, so remove get_board_rev function.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agomx51evk: Remove unneeded '1' from mx51evk.h
Fabio Estevam [Mon, 24 Oct 2011 08:24:28 +0000 (08:24 +0000)]
mx51evk: Remove unneeded '1' from mx51evk.h

Remove unneeded '1' from mx51evk.h.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoI2C: Fix mxc_i2c.c problem on imx31_phycore
Marek Vasut [Wed, 26 Oct 2011 00:05:44 +0000 (00:05 +0000)]
I2C: Fix mxc_i2c.c problem on imx31_phycore

The problem was caused by a global variable being used early in the boot
process.

The symptoms were on imx31_phycore board, reading the environment from I2C
EEPROM didn't work correctly and causes default environment to be loaded.

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Cc: Wolfgang Denk <wd@denx.de>
Cc: Albert ARIBAUD <albert.u.boot@aribaud.net>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
Tested-by: Anatolij Gustschin <agust@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
13 years agomx35pdk: Add RTC support
Fabio Estevam [Tue, 25 Oct 2011 01:35:37 +0000 (01:35 +0000)]
mx35pdk: Add RTC support

MX35PDK has an MC13892 PMIC. Add RTC support.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Tested-by: Stefano Babic <sbabic@denx.de>
13 years agomx51evk: Use GPIO API for configuring the IOMUX
Fabio Estevam [Tue, 25 Oct 2011 03:14:00 +0000 (03:14 +0000)]
mx51evk: Use GPIO API for configuring the IOMUX

GPIO API provides mxc_request_iomux function for setting the IOMUX mode.

Use this function instead of directly writing to the IOMUX register.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agomx51evk: Add RTC support
Fabio Estevam [Mon, 24 Oct 2011 06:44:16 +0000 (06:44 +0000)]
mx51evk: Add RTC support

MX51EVK has a MC13892 PMIC. Add RTC support.

Tested via 'date' command that reads the PMIC RTC registers:

MX51EVK U-Boot > date
Date: 1970-01-01 (Thursday)    Time:  0:40:35

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agortc: Make mc13783-rtc driver generic
Fabio Estevam [Mon, 24 Oct 2011 06:44:15 +0000 (06:44 +0000)]
rtc: Make mc13783-rtc driver generic

Rename mc13783-rtc so that it can be used for both MC13783 and MC13892 PMICs.

efikamx board, for example, does use a MC13892 PMIC, but the RTC selection is currently made as:

#define CONFIG_RTC_MC13783

,which is not very obvious.

Let the MC13783 and MC13892 RTC be selected by:

#define CONFIG_RTC_MC13XXX

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agoqong: remove unneeded IOMUX settings
Fabio Estevam [Thu, 20 Oct 2011 16:01:31 +0000 (16:01 +0000)]
qong: remove unneeded IOMUX settings

On qong board some of the USBH2 pins are set via GPR register, so don need to setup
the IOMUX for each pin individually.

Other than that, these pins should not be configured as primary function because the primary
function selects SSI functionality.

Let GPR register do the work and remove the unneeded IOMUX setup.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agoqong: Use mx31_set_gpr to setup USBH2 pins
Fabio Estevam [Thu, 20 Oct 2011 16:01:30 +0000 (16:01 +0000)]
qong: Use mx31_set_gpr to setup USBH2 pins

Instead of writing directly to the GPR register, use mx31_set_gpr to setup USBH2 pins.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agomx31: Introduce mx31_set_gpr function
Fabio Estevam [Thu, 20 Oct 2011 16:01:29 +0000 (16:01 +0000)]
mx31: Introduce mx31_set_gpr function

Introduce mx31_set_gpr function for setting the GPR (General Purpose Register) on MX31.

This function can be useful for setting a group of pins into tied to some specific peripherals.

Reuse this function from the linux kernel.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agomx31pdk: Add MC13783 PMIC support
Fabio Estevam [Mon, 24 Oct 2011 05:32:28 +0000 (05:32 +0000)]
mx31pdk: Add MC13783 PMIC support

Add MC13783 PMIC support.

Tested by using the 'date' command, which reads the MC13783 RTC registers:

MX31PDK U-Boot > date
Date: 1970-01-01 (Thursday)    Time:  2:22:35

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agoqong: remove unneeded "1" from qong.h
Fabio Estevam [Fri, 21 Oct 2011 07:03:54 +0000 (07:03 +0000)]
qong: remove unneeded "1" from qong.h

Remove unneeded "1" from qong.h.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
13 years agomisc: pmic: fix regression in pmic_fsl.c (SPI)
Helmut Raiger [Wed, 19 Oct 2011 20:34:43 +0000 (20:34 +0000)]
misc: pmic: fix regression in pmic_fsl.c (SPI)

This fixes write access to PMIC registers, the bug was
introduced partly in commit 64aac65099 and in commit c9fe76dd91.
It was tested on an i.mx31 with a mc13783.

Signed-off-by: Helmut Raiger <helmut.raiger@hale.at>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agomx5 configs: CONFIG_PRIME should really be CONFIG_ETHPRIME
Wolfgang Grandegger [Mon, 17 Oct 2011 08:21:56 +0000 (08:21 +0000)]
mx5 configs: CONFIG_PRIME should really be CONFIG_ETHPRIME

Signed-off-by: Wolfgang Grandegger <wg@denx.de>
Acked-by: Stefano Babic <sbabic@denx.de>
13 years agoMX35: Drop unnecessary prototypes from imx-regs.h
Stefano Babic [Tue, 6 Sep 2011 14:46:07 +0000 (16:46 +0200)]
MX35: Drop unnecessary prototypes from imx-regs.h

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agoI2C: added I2C-2 and I2C-3 to MX35
Stefano Babic [Fri, 5 Aug 2011 10:19:08 +0000 (12:19 +0200)]
I2C: added I2C-2 and I2C-3 to MX35

Signed-off-by: Stefano Babic <sbabic@denx.de>
CC: Heiko Schocher <hs@denx.de>
Acked-by: Heiko Schocher <hs@denx.de>
13 years agoMX35: factorize common assembly code
Stefano Babic [Fri, 5 Aug 2011 11:43:21 +0000 (13:43 +0200)]
MX35: factorize common assembly code

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agoMX35: add reset cause as provided by other i.MX
Stefano Babic [Fri, 5 Aug 2011 10:21:37 +0000 (12:21 +0200)]
MX35: add reset cause as provided by other i.MX

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agoMX35: add pins definition for UART3
Stefano Babic [Fri, 5 Aug 2011 07:12:34 +0000 (09:12 +0200)]
MX35: add pins definition for UART3

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agoMX35: added ESDC structure to imx-regs
Stefano Babic [Fri, 5 Aug 2011 07:11:11 +0000 (09:11 +0200)]
MX35: added ESDC structure to imx-regs

The structure and PLL defines are added to
the imx-regs.h file and dropped from board
header files.

Signed-off-by: Stefano Babic <sbabic@denx.de>
13 years agosandbox: drop unused return
Mike Frysinger [Wed, 26 Oct 2011 00:22:14 +0000 (00:22 +0000)]
sandbox: drop unused return

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: put stdin into raw mode
Mike Frysinger [Wed, 26 Oct 2011 00:21:29 +0000 (00:21 +0000)]
sandbox: put stdin into raw mode

This allows us to act like a serial device: we get tab chars and CTRL+C
and respond appropriately.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Simon Glass <sjg@chromium.org>
13 years agoserial: sandbox: use ssize_t to match os_read
Mike Frysinger [Wed, 26 Oct 2011 00:21:01 +0000 (00:21 +0000)]
serial: sandbox: use ssize_t to match os_read

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agoserial: sandbox: optimize puts
Mike Frysinger [Wed, 26 Oct 2011 00:20:39 +0000 (00:20 +0000)]
serial: sandbox: optimize puts

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agosandbox/tegra2: fix typo in autocomplete define
Mike Frysinger [Wed, 26 Oct 2011 00:19:58 +0000 (00:19 +0000)]
sandbox/tegra2: fix typo in autocomplete define

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Change md command to use map_physmem
Simon Glass [Tue, 25 Oct 2011 13:51:09 +0000 (13:51 +0000)]
sandbox: Change md command to use map_physmem

Sandbox wants to support commands which use memory. The map_physmen()
call provides this feature, so should be used more consistently in
U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Matthias Weisser <weisserm@arcor.de>
13 years agosandbox: Adjust Makefile so that standalone/api are not built
Simon Glass [Tue, 25 Oct 2011 11:29:28 +0000 (11:29 +0000)]
sandbox: Adjust Makefile so that standalone/api are not built

The check for sandbox architecture is too early in the Makefile, so
standalone and api are built regardless. This moves the check until
after autoconf.mk has been read.

This fixes a build breakage.

Signed-off-by: Simon Glass <sjg@chromium.org>
13 years agosandbox: Add asm/cache.h for sandbox
Anton staaf [Tue, 25 Oct 2011 10:48:03 +0000 (10:48 +0000)]
sandbox: Add asm/cache.h for sandbox

This file is required by the new DMA buffer alignment macro.

Signed-off-by: Anton Staaf <robotboy@chromium.org>
Cc: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agoReduce build times
Wolfgang Denk [Tue, 1 Nov 2011 20:54:02 +0000 (20:54 +0000)]
Reduce build times

U-Boot Makefiles contain a number of tests for compiler features etc.
which so far are executed again and again.  On some architectures
(especially ARM) this results in a large number of calls to gcc.

This patch makes sure to run such tests only once, thus largely
reducing the number of "execve" system calls.

Example: number of "execve" system calls for building the "P2020DS"
(Power Architecture) and "qong" (ARM) boards, measured as:
-> strace -f -e trace=execve -o /tmp/foo ./MAKEALL <board>
-> grep execve /tmp/foo | wc -l

Before: After: Reduction:
==================================
P2020DS 20555 15205 -26%
qong 31692 14490 -54%

As a result, built times are significantly reduced, typically by
30...50%.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Andy Fleming <afleming@gmail.com>
Cc: Kumar Gala <galak@kernel.crashing.org>
Cc: Albert Aribaud <albert.aribaud@free.fr>
cc: Graeme Russ <graeme.russ@gmail.com>
cc: Mike Frysinger <vapier@gentoo.org>
Tested-by: Graeme Russ <graeme.russ@gmail.com>
Tested-by: Matthias Weisser <weisserm@arcor.de>
Tested-by: Sanjeev Premi <premi@ti.com>
Tested-by: Simon Glass <sjg@chromium.org>
Tested-by: Macpaul Lin <macpaul@gmail.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
13 years agopost/post.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:42:23 +0000 (09:42 +0000)]
post/post.c: fix GCC 4.6 build warnings

Fix:
post.c: In function 'post_log':
post.c:425:7: warning: variable 'i' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agopost/post.c: CodingStyle cleanup
Wolfgang Denk [Sat, 29 Oct 2011 09:42:22 +0000 (09:42 +0000)]
post/post.c: CodingStyle cleanup

Make checkpatch-clean..

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
13 years agocommon/cmd_ide.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:41:41 +0000 (09:41 +0000)]
common/cmd_ide.c: fix GCC 4.6 build warnings

Fix:
cmd_ide.c: In function 'ide_ident':
cmd_ide.c:988:6: warning: variable 'do_retry' set but not used
[-Wunused-but-set-variable]

Delete the unused variable.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agocommon/cmd_ide.c: CodingStyle cleanup
Wolfgang Denk [Sat, 29 Oct 2011 09:41:40 +0000 (09:41 +0000)]
common/cmd_ide.c: CodingStyle cleanup

Make file acceptable to checkpatch.

This is only a basic clean up to the extend possible without any real
changes to the source code. Warnings due to line over 80 characters
were accepted because these affect only printf()s with user visible
strings.  No attempts were made to fix warnings about volatile and
externs - these need a more thorough cleanup.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/rtc/ds1337.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:39:11 +0000 (09:39 +0000)]
drivers/rtc/ds1337.c: fix GCC 4.6 build warnings

Fix:
ds1337.c: In function 'rtc_get':
ds1337.c:88:52: warning: variable 'control' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years ago4xx_pci.c: add error checking, fix GCC 4.6 build warning
Wolfgang Denk [Sat, 29 Oct 2011 09:38:31 +0000 (09:38 +0000)]
4xx_pci.c: add error checking, fix GCC 4.6 build warning

Fix:
4xx_pci.c: In function 'pci_init_board':
4xx_pci.c:855:6: warning: variable 'busno' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
Acked-by: Stefan Roese <sr@denx.de>
13 years agoboard/prodrive/p3mx/mv_eth.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:38:21 +0000 (09:38 +0000)]
board/prodrive/p3mx/mv_eth.c: fix GCC 4.6 build warnings

Fix:
mv_eth.c: In function 'mv64460_eth_real_open':
mv_eth.c:471:6: warning: variable 'port_status' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_stop':
mv_eth.c:722:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_xmit':
mv_eth.c:796:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_receive':
mv_eth.c:877:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_get_stats':
mv_eth.c:979:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_update_stat':
mv_eth.c:1006:24: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]
mv_eth.c:1005:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'mv64460_eth_print_stat':
mv_eth.c:1087:15: warning: variable 'port_num' set but not used [-Wunused-but-set-variable]
mv_eth.c: In function 'eth_clear_mib_counters':
mv_eth.c:2141:15: warning: variable 'dummy' set but not used [-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years ago4xx_enet.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:56 +0000 (09:37 +0000)]
4xx_enet.c: fix GCC 4.6 build warnings

Fix:
4xx_enet.c: In function 'enet_rcv':
4xx_enet.c:1772:21: warning: variable 'ef_ptr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
13 years ago4xx_uart.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:52 +0000 (09:37 +0000)]
4xx_uart.c: fix GCC 4.6 build warnings

Fix:
4xx_uart.c: In function 'get_serial_clock':
4xx_uart.c:204:6: warning: variable 'tmp' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Stefan Roese <sr@denx.de>
13 years agodrivers/net/eepro100.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:48 +0000 (09:37 +0000)]
drivers/net/eepro100.c: fix GCC 4.6 build warnings

Fix:
eepro100.c: In function 'read_hw_addr':
eepro100.c:926:6: warning: variable 'eeprom' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/g2000/strataflash.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:44 +0000 (09:37 +0000)]
board/g2000/strataflash.c: fix GCC 4.6 build warnings

Fix:
strataflash.c: In function 'flash_write_cfiword':
strataflash.c:669:11: warning: variable 'ctladdr' set but not used
[-Wunused-but-set-variable]

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoboard/jse/flash.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:40 +0000 (09:37 +0000)]
board/jse/flash.c: fix GCC 4.6 build warnings

Fix:
flash.c: In function 'flash_erase':
flash.c:304:24: warning: variable 'l_sect' set but not used
[-Wunused-but-set-variable]

In addition, remove some dead code.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agodrivers/net/ns8382x.c: fix GCC 4.6 build warnings
Wolfgang Denk [Sat, 29 Oct 2011 09:37:34 +0000 (09:37 +0000)]
drivers/net/ns8382x.c: fix GCC 4.6 build warnings

Fix:
ns8382x.c: In function 'ns8382x_check_duplex':
ns8382x.c:704:6: warning: variable 'hun' set but not used
[-Wunused-but-set-variable]

To fix this, we get rid of the NS8382X_DEBUG code and use standard
debug() instead.

This will now trigger a so far undetected warning:
ns8382x.c:780:2: warning: format '%X' expects argument of type
'unsigned int', but argument 2 has type 'long unsigned int' [-Wformat]

Fix that, too.

Signed-off-by: Wolfgang Denk <wd@denx.de>
13 years agoarch/powerpc/lib/board.c: fix build warning
Wolfgang Denk [Sun, 23 Oct 2011 11:58:52 +0000 (11:58 +0000)]
arch/powerpc/lib/board.c: fix build warning

Commit 1272592 "powerpc: Use getenv_ulong() in place of getenv(),
strtoul" instroduced a build warning for some PPC systems:

board.c: In function 'board_init_r':
board.c:626: warning: unused variable 's'

Fix it.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Heiko Schocher <hs@denx.de>
13 years agoMerge branch 'master' of git://git.denx.de/u-boot-mmc
Wolfgang Denk [Thu, 3 Nov 2011 19:36:16 +0000 (20:36 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-mmc

* 'master' of git://git.denx.de/u-boot-mmc:
  tegra2: Move MMC clock initialization into MMC driver
  mmc: sdhci: fix sdma bug for large file transfer
  mmc: sdhci: add timeout for data transfer
  mmc: sdhci: add mmc structure for host
  mmc: sdhci: fix build warning
  mmc: sdhci: fix cache flush
  mmc: CMD7:MMC_CMD_SELECT_CARD response fix
  mmc: test mmc bus width on startup
  mmc: change magic number to macro define
  mmc: mv_sdhci: fix 8bus width access for 88SV331xV5
  mmc: retry the cmd8 to meet 74 clocks requirement in the spec
  PXA: Add MMC driver using the generic MMC framework

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-x86
Wolfgang Denk [Thu, 3 Nov 2011 19:36:04 +0000 (20:36 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-x86

* 'master' of git://git.denx.de/u-boot-x86:
  x86: Fix a compiler warning in arch/x86/lib/realmode.c
  x86: Remove the prototype for the unused function board_init
  x86: Rename include/asm/ic to include/asm/arch-sc520
  x86: turn off cache: set control register properly

13 years agoMerge branch 'master' of git://git.denx.de/u-boot-nds32
Wolfgang Denk [Thu, 3 Nov 2011 19:35:45 +0000 (20:35 +0100)]
Merge branch 'master' of git://git.denx.de/u-boot-nds32

* 'master' of git://git.denx.de/u-boot-nds32:
  nds32: asm/io.h: add __iormb __iowmb and inline io support
  nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
  nds32: Use getenv_ulong() in place of getenv(), strtoul

13 years agoe1000: fix bugs from recent commits
Wolfgang Denk [Fri, 28 Oct 2011 05:37:04 +0000 (07:37 +0200)]
e1000: fix bugs from recent commits

Commit 114d7fc0 "e1000: Rewrite EEPROM checksum error to give more
information" failed to initialize the checksum variable which should
result in random results. Fix that.

Commit 2326a94d caused a ton of "unused variable 'x'" warnings.
Fix these.  While we are at it, remove some bogus parens.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Cc: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Tested-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
13 years agotegra2: Move MMC clock initialization into MMC driver
Stephen Warren [Mon, 31 Oct 2011 06:51:34 +0000 (06:51 +0000)]
tegra2: Move MMC clock initialization into MMC driver

This centralizes knowledge of MMC clocking into the MMC driver. This also
removes clock setup from the board files, which will simplify later changes
that modify the Harmony board to support the correct set of MMC controllers.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Cc: Andy Fleming <afleming@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
13 years agommc: sdhci: fix sdma bug for large file transfer
Lei Wen [Sat, 8 Oct 2011 04:14:58 +0000 (04:14 +0000)]
mmc: sdhci: fix sdma bug for large file transfer

SDHCI spec need to reset the sdma base address while the software
try to accorss the 512k bytes address boundary. When meet such
accross behavior, sdhci controller would generate a interrupt
automatically, and software need handle this.

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: sdhci: add timeout for data transfer
Lei Wen [Sat, 8 Oct 2011 04:14:57 +0000 (04:14 +0000)]
mmc: sdhci: add timeout for data transfer

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: sdhci: add mmc structure for host
Lei Wen [Sat, 8 Oct 2011 04:14:56 +0000 (04:14 +0000)]
mmc: sdhci: add mmc structure for host

So that sdhci host would tell in the driver that the mmc current
attributes.

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: sdhci: fix build warning
Lei Wen [Sat, 8 Oct 2011 04:14:55 +0000 (04:14 +0000)]
mmc: sdhci: fix build warning

If CONFIG_MMC_SDHCI_IO_ACCESSORS is defined, the following warning would
shows up:

include/sdhci.h:224: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:224: warning: its scope is only this definition or
declaration, which is probably not what you want
include/sdhci.h:225: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:226: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:227: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:228: warning: 'struct sdhci_host' declared inside
parameter list
include/sdhci.h:229: warning: 'struct sdhci_host' declared inside
parameter list

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: sdhci: fix cache flush
Lei Wen [Sat, 8 Oct 2011 04:14:54 +0000 (04:14 +0000)]
mmc: sdhci: fix cache flush

Only flush the memory range needed.

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: CMD7:MMC_CMD_SELECT_CARD response fix
Ajay Bhargav [Wed, 5 Oct 2011 03:13:23 +0000 (03:13 +0000)]
mmc: CMD7:MMC_CMD_SELECT_CARD response fix

As per JEDEC document JESD84-A441 (page 105) response for CMD7
(MMC_CMD_SELECT_CARD) response should be R1 instead of R1b. In uboot we
never take MMC to disconnected state and on powerup its always ideal
state which later goes to stand-by state.

from document footnote:
R1 while selecting from Stand-By State to Transfer State; R1b while
selecting from Disconnected State to Programming State.

Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
13 years agommc: test mmc bus width on startup
Lei Wen [Mon, 3 Oct 2011 20:35:11 +0000 (20:35 +0000)]
mmc: test mmc bus width on startup

For we don't know mmc bus width from reading registers, the only way
to check is to test.

Current compare offset is:
EXT_CSD_PARTITIONING_SUPPORT
EXT_CSD_ERASE_GROUP_DEF
EXT_CSD_REV
EXT_CSD_HC_ERASE_GRP_SIZE
EXT_CSD_SEC_CNT

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: change magic number to macro define
Lei Wen [Mon, 3 Oct 2011 20:35:10 +0000 (20:35 +0000)]
mmc: change magic number to macro define

Previous magic number is hard to parse its meaning, change it to
respective macro definition

Signed-off-by: Lei Wen <leiwen@marvell.com>
Acked-by: WOlfgang Denk <wd@denx.de>
13 years agommc: mv_sdhci: fix 8bus width access for 88SV331xV5
Lei Wen [Mon, 3 Oct 2011 20:33:44 +0000 (20:33 +0000)]
mmc: mv_sdhci: fix 8bus width access for 88SV331xV5

Marvell 88SV331xV5 platform's sdhci host control is not very standard
with the spec in the 8bit handling. It need to set its private register
to switch to the 8bit mode which is not included in the standard sdhci
registers.

This patch mainly hacks the writeb method, and set its private register
if it find the driver is going to switch to the 8bit mode.

Signed-off-by: Lei Wen <leiwen@marvell.com>
13 years agommc: retry the cmd8 to meet 74 clocks requirement in the spec
Lei Wen [Fri, 2 Sep 2011 17:34:17 +0000 (17:34 +0000)]
mmc: retry the cmd8 to meet 74 clocks requirement in the spec

For some controller it has dynamic clock gating, and only toggle out clk
when the first cmd0 send out, while some card strictly obey the 74
clocks rule, the interval may not be sufficient between the cmd0 and
this cmd8, retry to fulfil the clock requirement.

Signed-off-by: Lei Wen <leiwen@marvell.com>
Tested-by: Marek Vasut <marek.vasut@gmail.com>
13 years agoPXA: Add MMC driver using the generic MMC framework
Marek Vasut [Wed, 2 Nov 2011 00:29:27 +0000 (00:29 +0000)]
PXA: Add MMC driver using the generic MMC framework

Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
13 years agox86: Fix a compiler warning in arch/x86/lib/realmode.c
Gabe Black [Thu, 20 Oct 2011 18:29:17 +0000 (18:29 +0000)]
x86: Fix a compiler warning in arch/x86/lib/realmode.c

Ensure that the value being passed to a %d format specifier is of type
int.

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Remove the prototype for the unused function board_init
Gabe Black [Fri, 28 Oct 2011 12:38:47 +0000 (12:38 +0000)]
x86: Remove the prototype for the unused function board_init

Signed-off-by: Gabe Black <gabeblack@chromium.org>
13 years agox86: Rename include/asm/ic to include/asm/arch-sc520
Graeme Russ [Thu, 4 Aug 2011 12:05:09 +0000 (22:05 +1000)]
x86: Rename include/asm/ic to include/asm/arch-sc520

Also include some trivial related cleanups

13 years agox86: turn off cache: set control register properly
Ondrej Kupka [Fri, 30 Sep 2011 10:05:11 +0000 (21:05 +1100)]
x86: turn off cache: set control register properly

Bits should be ORed when they are supposed to be added together

Signed-off-by: Ondrej Kupka <ondra.cap@gmail.com>
13 years agonds32: asm/io.h: add __iormb __iowmb and inline io support
Macpaul Lin [Mon, 24 Oct 2011 05:31:05 +0000 (13:31 +0800)]
nds32: asm/io.h: add __iormb __iowmb and inline io support

1. This patch add required __iormb and __iowmb to io.h.
   This also fix some misbehavior to periphal drivers.
   This io.h has been fixed with referencing arm/include/asm/io.h.
2. This patch replaced macro writeb and readb into inline function.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
13 years agonds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment
Macpaul Lin [Mon, 24 Oct 2011 08:48:39 +0000 (16:48 +0800)]
nds32: cache: define ARCH_DMA_MINALIGN for DMA buffer alignment

Add ARCH_DMA_MINALIGN definition to asm/cache.h

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
13 years agonds32: Use getenv_ulong() in place of getenv(), strtoul
Macpaul Lin [Mon, 24 Oct 2011 08:43:17 +0000 (16:43 +0800)]
nds32: Use getenv_ulong() in place of getenv(), strtoul

This changes the board code to use the new getenv_ulong() function.

Signed-off-by: Macpaul Lin <macpaul@andestech.com>
13 years agoe1000: Allow direct access to the E1000 SPI EEPROM device
Kyle Moffett [Tue, 18 Oct 2011 11:05:29 +0000 (11:05 +0000)]
e1000: Allow direct access to the E1000 SPI EEPROM device

As a part of the manufacturing process for some of our custom hardware,
we are programming the EEPROMs attached to our Intel 82571EB controllers
from software using U-Boot and Linux.

This code provides several conditionally-compiled features to assist in
our manufacturing process:

  CONFIG_CMD_E1000:
    This is a basic "e1000" command which allows querying the controller
    and (if other config options are set) performing EEPROM programming.
    In particular, with CONFIG_E1000_SPI this allows you to display a
    hex-dump of the EEPROM, copy to/from main memory, and verify/update
    the software checksum.

  CONFIG_E1000_SPI_GENERIC:
    Build a generic SPI driver providing the standard U-Boot SPI driver
    interface.  This allows commands such as "sspi" to access the bus
    attached to the E1000 controller.  Additionally, some E1000 chipsets
    can support user data in a reserved space in the E1000 EEPROM which
    could be used for U-Boot environment storage.

  CONFIG_E1000_SPI:
    The core SPI access code used by the above interfaces.

For example, the following commands allow you to program the EEPROM from
a USB device (assumes CONFIG_E1000_SPI and CONFIG_CMD_E1000 are enabled):
  usb start
  fatload usb 0 $loadaddr 82571EB_No_Mgmt_Discrete-LOM.bin
  e1000 0 spi program $loadaddr 0 1024
  e1000 0 spi checksum update

Please keep in mind that the Intel-provided .eep files are organized as
16-bit words.  When converting them to binary form for programming you
must byteswap each 16-bit word so that it is in little-endian form.

This means that when reading and writing words to the SPI EEPROM, the
bit ordering for each word looks like this on the wire:

  Time >>>
------------------------------------------------------------------
  ... [7, 6, 5, 4, 3, 2, 1, 0, 15, 14, 13, 12, 11, 10, 9, 8], ...
------------------------------------------------------------------
  (MSB is 15, LSB is 0).

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agoe1000: Export core EEPROM access functions for SPI support
Kyle Moffett [Tue, 18 Oct 2011 11:05:28 +0000 (11:05 +0000)]
e1000: Export core EEPROM access functions for SPI support

A followup patch will be adding a configurable feature to enable
programming of E1000 EEPROMs from the command line or via the generic
U-Boot SPI interface.

In order for it to work it needs access to certain E1000-internal
functions, so export those in the e1000.h header file.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Ben Warren <biggerbadderben@gmail.com>
13 years agoe1000: Rewrite EEPROM checksum error to give more information
Kyle Moffett [Tue, 18 Oct 2011 11:05:27 +0000 (11:05 +0000)]
e1000: Rewrite EEPROM checksum error to give more information

As an aide to debugging, we should print out the expected value of the
EEPROM checksum in addition to just saying that it is wrong.

Signed-off-by: Kyle Moffett <Kyle.D.Moffett@boeing.com>
Cc: Ben Warren <biggerbadderben@gmail.com>