project/bcm63xx/u-boot.git
11 years agoam33xx: add ti814x specific register definitions
Matt Porter [Fri, 15 Mar 2013 10:07:06 +0000 (10:07 +0000)]
am33xx: add ti814x specific register definitions

Support the ti814x specific register definitions within
arch-am33xx.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: refactor am33xx mux support and add ti814x support
Matt Porter [Fri, 15 Mar 2013 10:07:05 +0000 (10:07 +0000)]
am33xx: refactor am33xx mux support and add ti814x support

AM33XX and TI814X have a similar mux though the pinmux register
layout and address space differ. Add a separate ti814x mux include
to support the TI814X-specific differences.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoam33xx: refactor am33xx clocks and add ti814x support
Matt Porter [Fri, 15 Mar 2013 10:07:04 +0000 (10:07 +0000)]
am33xx: refactor am33xx clocks and add ti814x support

Split clock.c for am335x and ti814x and add ti814x specific
clock support.

Signed-off-by: Matt Porter <mporter@ti.com>
11 years agoam33xx: refactor emif4/ddr to support multiple EMIF instances
Matt Porter [Fri, 15 Mar 2013 10:07:03 +0000 (10:07 +0000)]
am33xx: refactor emif4/ddr to support multiple EMIF instances

The AM33xx emif4/ddr support closely matches what is need to support
TI814x except that TI814x has two EMIF instances. Refactor all the
emif4 helper calls and the config_ddr() init function to use an
additional instance number argument.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: convert defines from am33xx-specific to generic names
Matt Porter [Fri, 15 Mar 2013 10:07:02 +0000 (10:07 +0000)]
am33xx: convert defines from am33xx-specific to generic names

Eliminate AM33xx specific names to prepare for TI814x support
within AM33xx-land.

Signed-off-by: Matt Porter <mporter@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx: Add required includes to some omap/am33xx code
Tom Rini [Thu, 14 Mar 2013 11:15:25 +0000 (11:15 +0000)]
am33xx: Add required includes to some omap/am33xx code

- In arch/arm/cpu/armv7/omap-common/timer.c,
  drivers/mtd/nand/omap_gpmc.c and drivers/net/cpsw.c add #include files
  that the driver needs but had been relying on <config.h> to bring in.
- In arch/arm/cpu/armv7/omap-common/lowlevel_init.S add <config.h>
- In am335x_evm.h and pcm051.h don't globally include
  <asm/arch/hardware.h> and <asm/arch/cpu.h> but just <asm/arch/omap.h>
  as that is the only include which defines things the config uses.

Cc: Lars Poeschel <poeschel@lemonage.de>
Signed-off-by: Tom Rini <trini@ti.com>
11 years agoigep00x0: Enable CONFIG_CMD_BOOTZ
Enric Balletbo i Serra [Fri, 15 Mar 2013 02:32:35 +0000 (02:32 +0000)]
igep00x0: Enable CONFIG_CMD_BOOTZ

With v3.9 and later of the Linux Kernel defaulting to multi-platform
images with omap2plus_defconfig, uImage isn't builtable anymore by
default.  Add CONFIG_CMD_BOOTZ so that we can still boot something the
kernel spits out.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
11 years agoARM: AM33XX: Fix typo that causes an AM duplication in CPU name.
Enric Balletbo i Serra [Fri, 15 Mar 2013 01:35:37 +0000 (01:35 +0000)]
ARM: AM33XX: Fix typo that causes an AM duplication in CPU name.

Just fix a typo displaying the CPU info. With CONFIG_DISPLAY_INFO we see
something like AMAM335X-GP rev 0 instead of AM335X-GP rev 0.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
11 years agoam335x: Enable DDR PHY dynamic power down bit for DDR3 boards
Vaibhav Hiremath [Thu, 14 Mar 2013 21:11:16 +0000 (21:11 +0000)]
am335x: Enable DDR PHY dynamic power down bit for DDR3 boards

Enable DDR PHY dynamic power down bit, which enables
powering down the IO receiver when not performing read.

This also helps in reducing overall power consumption in
low power states (suspend/standby).

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Satyanarayana, Sandhya <sandhya.satyanarayana@ti.com>
Cc: Tom Rini <trini@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
11 years agoam33xx:ddr:Fix config_sdram to work for all DDR
Steve Kipisz [Fri, 8 Mar 2013 07:40:58 +0000 (07:40 +0000)]
am33xx:ddr:Fix config_sdram to work for all DDR

The original write to sdram_config is correct for DDR3 but incorrect
for DDR2 so SPL was hanging. For DDR2, the write to sdram_config
should be after the writes to ref_ctrl. This was working for DDR3
because there was a write of 0x2800 to ref_ctrl before a write
to sdram_config.

Tested on: GP EVM 1.1A (DDR2), GP EVM 1.5A (DDR3),
           Beaglebone A6 (DDR2), Beagleone Blacd A4A (DDR3)

Signed-off-by: Steve Kipisz <s-kipisz2@ti.com>
11 years agoam335x_evm: Add more variables and switch to DT booting.
Koen Kooi [Thu, 14 Mar 2013 05:55:21 +0000 (05:55 +0000)]
am335x_evm: Add more variables and switch to DT booting.

Make bootcmd run findfdt so that we know what dtb file to load.  Add a
loadfdt command to load this file in.  Make mmcboot pass in ${fdtaddr}
and make the mmc section of bootcmd run loadfdt.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoam335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env
Koen Kooi [Thu, 14 Mar 2013 05:55:20 +0000 (05:55 +0000)]
am335x_evm: Enable CMD_EXT4 and CMD_FS_GENERIC, add bootpart to env

The kernel is loaded from some form of ext[234] or FAT, depending on the
distribution used.  We add a bootpart variable to the environment so
that we can load from the correct mmc partition as well.  We leave
CONFIG_CMD_EXT2 for existing scripts that use ext2load.

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoam335x_evm: add support for BeagleBone Black DT name
Koen Kooi [Thu, 14 Mar 2013 05:55:19 +0000 (05:55 +0000)]
am335x_evm: add support for BeagleBone Black DT name

Cc: Matt Porter <mporter@ti.com>
Cc: Nishanth Menon <nm@ti.com>
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Signed-off-by: Tom Rini <trini@ti.com>
Acked-by: Matt Porter <mporter@ti.com>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Nishanth Menon <nm@ti.com>
11 years agoInitialise correct GPMC WAITx irq for AM33xx
Mark Jackson [Thu, 21 Feb 2013 02:49:38 +0000 (02:49 +0000)]
Initialise correct GPMC WAITx irq for AM33xx

Currently WAIT0 irq is reset and then WAIT1 irq is enabled.
Fix it such that WAIT0 irq is enabled instead.

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agoAllow AM335x MPU core clock speed to be specified in the board config file
Mark Jackson [Mon, 4 Mar 2013 01:27:20 +0000 (01:27 +0000)]
Allow AM335x MPU core clock speed to be specified in the board config file

Allow AM335x MPU core clock speed to be specified in the board config file.
To use, add the following to the board's config file:-

#define CONFIG_SYS_MPUCLK <desired clock freq in MHz>

Signed-off-by: Mark Jackson <mpfj@newflow.co.uk>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
11 years agocm-t35: add support for loading splash image from NAND
Nikita Kiryanov [Sat, 22 Dec 2012 21:03:48 +0000 (21:03 +0000)]
cm-t35: add support for loading splash image from NAND

Add support for loading splash image from NAND

Signed-off-by: Nikita Kiryanov <nikita@compulab.co.il>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
11 years agoARM: rpi_b: enable SD controller, add related env/cmds
Stephen Warren [Tue, 29 Jan 2013 16:37:42 +0000 (16:37 +0000)]
ARM: rpi_b: enable SD controller, add related env/cmds

Enable the SD controller driver for the Raspberry Pi. Enable a number
of useful MMC, partition, and filesystem-related commands. Set up the
environment to provide standard locations for loading a kernel, DTB,
etc. Provide a boot command that loads and executes boot.scr.uimg from
the SD card; this is written considering future extensibilty to USB
storage.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agommc: add bcm2835 driver
Stephen Warren [Tue, 29 Jan 2013 16:37:41 +0000 (16:37 +0000)]
mmc: add bcm2835 driver

This adds a simple driver for the BCM2835's SD controller.

Workarounds are implemented for:
* Register writes can't be too close to each-other in time, or they will
  be lost.
* Register accesses must all be 32-bit, so implement custom accessors.

This code was extracted from:
git://github.com/gonzoua/u-boot-pi.git master
which was created by Oleksandr Tymoshenko.

Portions of the code there were obviously based on the Linux kernel at:
git://github.com/raspberrypi/linux.git rpi-3.6.y
commit f5b930b "Main bcm2708 linux port" signed-off-by Dom Cobley.

swarren changed the following for upstream:
* Removed hack udelay()s in bcm2835_sdhci_raw_writel(); setting
  SDHCI_QUIRK_WAIT_SEND_CMD appears to solve the issues.
* Remove register logging from read*/write* functions.
* Sort out confusion with min/max_freq values passed to add_sdhci().
* Use more descriptive variable names and calculations in IO accessors.
* Simplified and commented twoticks_delay calculation.
* checkpatch fixes.

Cc: Andy Fleming <afleming@gmail.com>
Signed-off-by: Oleksandr Tymoshenko <gonzo@bluezbox.com>
Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Andy Fleming <afleming@gmail.com>
11 years agovideo: add a driver for the bcm2835
Stephen Warren [Tue, 29 Jan 2013 16:37:40 +0000 (16:37 +0000)]
video: add a driver for the bcm2835

The firmware running on the bcm2835 SoC's VideoCore CPU manages the
display controller. Add a simple "LCD" driver that communicates with the
firmware using the property mailbox protocol. This configures the
display and frame-buffer to match whatever physical resolution the
firmware chosen when booting, which is typically the native resolution
of the attached display device, presumably unless otherwise specified
in config.txt on the boot media.

Enable this driver in the Raspberry Pi board configuration.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
11 years agoARM: rpi_b: disable rpi_b dcache explicitly
Stephen Warren [Tue, 29 Jan 2013 16:37:39 +0000 (16:37 +0000)]
ARM: rpi_b: disable rpi_b dcache explicitly

There appears to be no implementation of flush_dcache_range() for
ARM1176, so explicitly disable dcache support to avoid references to
that function from the LCD core in the next patch. This was presumably
not noticed before simply because no drivers for the rpi_b were
attempting DMA.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agolcd: calculate line_length after lcd_ctrl_init()
Stephen Warren [Tue, 29 Jan 2013 16:37:38 +0000 (16:37 +0000)]
lcd: calculate line_length after lcd_ctrl_init()

When an LCD driver is actually driving a regular external display, e.g.
an HDMI monitor, the display resolution might not be known until the
display controller has initialized, i.e. during lcd_ctrl_init(). However,
lcd.c calculates lcd_line_length before calling this function, thus
relying on a hard-coded resolution in struct panel_info.

Instead, defer this calculation until after lcd_ctrl_init() has had the
chance to dynamically determine the resolution. This needs to happen
before lcd_clear(), since the value is used there.

grep indicates that no code outside lcd.c uses this lcd_line_length; in
particular, no lcd_ctrl_init() implementations read it.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Anatolij Gustschin <agust@denx.de>
11 years agoARM: rpi_b: use bcm2835 mbox driver to get memory size
Stephen Warren [Tue, 29 Jan 2013 16:37:37 +0000 (16:37 +0000)]
ARM: rpi_b: use bcm2835 mbox driver to get memory size

The firmware running on the bcm2835 SoC's VideoCore CPU determines how
much of the system RAM is available for use by the ARM CPU. Previously,
U-Boot assumed that only 128MB was available, since this was the
smallest value configured by any public firmware. However, we can now
query the actual value at run-time from the firmware using the mbox
property protocol.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agoARM: bcm2835: add mailbox driver
Stephen Warren [Tue, 29 Jan 2013 16:37:36 +0000 (16:37 +0000)]
ARM: bcm2835: add mailbox driver

The BCM2835 SoC contains (at least) two CPUs; the VideoCore (a/k/a "GPU")
and the ARM CPU. The ARM CPU is often thought of as the main CPU.
However, the VideoCore actually controls the initial SoC boot, and hides
much of the hardware behind a protocol. This protocol is transported
using the SoC's mailbox hardware module.

Here, we add a very simplistic driver for the mailbox module, and define
a few structures for the property messages.

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
11 years agoMerge branch 'master' of git://git.denx.de/u-boot-usb
Tom Rini [Mon, 18 Mar 2013 19:33:47 +0000 (15:33 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-usb

11 years agoMerge branch 'master' of git://git.denx.de/u-boot-arm
Tom Rini [Mon, 18 Mar 2013 16:31:00 +0000 (12:31 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-arm

Albert's rework of the linker scripts conflicted with Simon's making
everyone use __bss_end.  We also had a minor conflict over
README.scrapyard being added to in mainline and enhanced in
u-boot-arm/master with proper formatting.

Conflicts:
arch/arm/cpu/ixp/u-boot.lds
arch/arm/cpu/u-boot.lds
arch/arm/lib/Makefile
board/actux1/u-boot.lds
board/actux2/u-boot.lds
board/actux3/u-boot.lds
board/dvlhost/u-boot.lds
board/freescale/mx31ads/u-boot.lds
doc/README.scrapyard
include/configs/tegra-common.h

Build tested for all of ARM and run-time tested on am335x_evm.

Signed-off-by: Tom Rini <trini@ti.com>
11 years agousb: Add multiple controllers support for EHCI PCI
Vincent Palatin [Tue, 12 Mar 2013 03:45:31 +0000 (03:45 +0000)]
usb: Add multiple controllers support for EHCI PCI

Use the ability to have several active EHCI controller on a system
in the PCI EHCI controller implementation.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable USB features for coreboot
Simon Glass [Wed, 6 Mar 2013 14:08:35 +0000 (14:08 +0000)]
x86: Enable USB features for coreboot

Enable PCI EHCI, storage, keyboard and Ethernet for USB.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: usbeth: smsc95xx: remove EEPROM loaded check
Michael Spang [Wed, 6 Mar 2013 14:08:33 +0000 (14:08 +0000)]
usb: usbeth: smsc95xx: remove EEPROM loaded check

[port of Linux kernel commit bcd218be5aeb by Steve Glendinning]

The eeprom read & write commands currently check the E2P_CMD_LOADED_ bit is
set before allowing any operations.  This prevents any reading or writing
unless a correctly programmed EEPROM is installed.

Signed-off-by: Michael Spang <spang@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Marek Vasut <marex@denx.de>
11 years agousb: ehci: Fix aliasing issue in EHCI interrupt code
Vincent Palatin [Wed, 6 Mar 2013 14:08:32 +0000 (14:08 +0000)]
usb: ehci: Fix aliasing issue in EHCI interrupt code

The interrupt endpoint handling code stores the buffer pointer in the QH
padding field. We need to make it the size of a pointer to avoid strict
aliasing issue with the compiler.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: Support interrupt transfers via periodic list
Patrick Georgi [Wed, 6 Mar 2013 14:08:31 +0000 (14:08 +0000)]
usb: ehci: Support interrupt transfers via periodic list

Interrupt transfers aren't meant to be used from the async list
(the EHCI spec indicates trouble with low/full-speed intr on async).

Build a periodic list instead, and provide an API to make use of it.
Then, use that API from the existing interrupt transfer API.

This provides support for USB keyboards using EHCI.

Use timeouts to ensure we cannot get stuck in the keyboard scanning
if something wrong happens (USB device unplugged or fatal I/O error)

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: exynos: Enable non-dt path
Vivek Gautam [Wed, 6 Mar 2013 08:48:33 +0000 (14:18 +0530)]
usb: ehci: exynos: Enable non-dt path

Enabling the non-dt path for the driver so that
we don't get any build errors for non-dt configuration.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: exynos: Fix multiple FDT decode
Vivek Gautam [Wed, 6 Mar 2013 08:48:32 +0000 (14:18 +0530)]
usb: ehci: exynos: Fix multiple FDT decode

With current FDT support driver tries to parse device node
twice in ehci_hcd_init() and ehci_hcd_stop(), which shouldn't
happen ideally.
Making provision to store data in a global structure and thereby
passing its pointer when needed.

Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
11 years agoarm:trats: Use new ums command
Lukasz Majewski [Tue, 5 Mar 2013 11:10:18 +0000 (12:10 +0100)]
arm:trats: Use new ums command

This patch enables new "ums" command on Trats board

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Minkyu Kang <mk7.kang@samsung.com>
11 years agousb:gadget: USB Mass Storage Gadget support
Lukasz Majewski [Tue, 5 Mar 2013 11:10:17 +0000 (12:10 +0100)]
usb:gadget: USB Mass Storage Gadget support

This patch adds the USB Mass Storage Gadget to u-boot
New command called "ums" is implemented to provide access
to on-device embedded persistent memory.

USB Mass Storage is supposed to work on top of the USB
Gadget framework

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
11 years agousb:composite: USB Mass Storage - f_mass_storage.c from Linux kernel
Piotr Wilczek [Tue, 5 Mar 2013 11:10:16 +0000 (12:10 +0100)]
usb:composite: USB Mass Storage - f_mass_storage.c from Linux kernel

The f_mass_storage.c source file from v2.6.36 Linux kernel.

commit 8876f5e7d3b2a320777dd4f6f5301d474c97a06c
Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
Date:   Mon Jun 21 13:57:09 2010 +0200

USB: gadget: f_mass_storage: added eject callback

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
11 years agousb:composite: USB Mass Storage - storage_common.c from Linux kernel
Lukasz Majewski [Tue, 5 Mar 2013 11:10:15 +0000 (12:10 +0100)]
usb:composite: USB Mass Storage - storage_common.c from Linux kernel

The storage_common.c source file from v2.6.36 Linux kernel.

commit d26a6aa08b9f12b44fb1ee65625e7480d3d5bb81
Author: Michal Nazarewicz <m.nazarewicz@samsung.com>
Date:   Mon Nov 9 14:15:23 2009 +0100

USB: g_mass_storage: code cleaned up and comments updated

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Marek Vasut <marek.vasut@gmail.com>
11 years agousb:composite:fix Provide function data when addressing device with only one interface
Lukasz Majewski [Fri, 1 Mar 2013 14:30:18 +0000 (15:30 +0100)]
usb:composite:fix Provide function data when addressing device with only one interface

This commit fixes problems with some non-standard requests send with
device address instead of interface address (bmRequestType.Receipent field).

This happens with dfu-util (debian version: 0.5), which address non standard
requests (like w_value=0x21 and bRequest=GET_DESCRIPTOR) to device.
Without this fix, the above request is STALLED, and hence causes dfu-util
to assume some standard configuration (packet size = 1024B instead of 4096B)
In turn it displays following errors:
Error obtaining DFU functional descriptor
Warning: Assuming DFU version 1.0
Warning: Transfer size can not be detected
...
Warning: Trying default transfer size 1024

This fix allows passing non-standard request to function setup code, where
it shall be handled.

Tested at:  Trats (exynos4210)
Tested with:DFU and UMS gadgets

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
11 years agousbtty: adapt buffers for large packet support
Shiraz Hashim [Mon, 17 Dec 2012 08:49:37 +0000 (14:19 +0530)]
usbtty: adapt buffers for large packet support

Increase buffer sizes at driver and tty level to accommodate kermit
large packet support.

Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com>
11 years agousb/host/ehci: Add support for EHCI on spear
Vipin Kumar [Mon, 17 Dec 2012 08:48:55 +0000 (14:18 +0530)]
usb/host/ehci: Add support for EHCI on spear

Add EHCI support for spear boards

Signed-off-by: Armando Visconti <armando.visconti@st.com>
Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
11 years agousb: Fix bug when both DFU & ETHER are defined
Pantelis Antoniou [Mon, 3 Dec 2012 00:10:28 +0000 (00:10 +0000)]
usb: Fix bug when both DFU & ETHER are defined

When both CONFIG_USB_GADGET & CONFIG_USB_ETHER are defined
the makefile links objects twice.

This patch uses a Makefile specific idiom of
'if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)'
to handle the case.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Add a partition type target
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:11 +0000 (08:01 +0000)]
dfu: Add a partition type target

Dealing with raw block numbers with the dfu is very annoying.
Introduce a partition method.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Properly zero out timeout value
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:10 +0000 (08:01 +0000)]
dfu: Properly zero out timeout value

Zero out timeout value; letting it filled with undefined values
ends up with the dfu host hanging.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Fix crash when wrong number of arguments given
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:08 +0000 (08:01 +0000)]
dfu: Fix crash when wrong number of arguments given

Fix obvious crash when not enough arguments are given to the dfu
command.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agodfu: Only perform DFU board_usb_init() for TRATS
Pantelis Antoniou [Fri, 30 Nov 2012 08:01:07 +0000 (08:01 +0000)]
dfu: Only perform DFU board_usb_init() for TRATS

USB initialization shouldn't happen for all the boards.

Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
11 years agousb: ehci: Add 64-bit controller support
Vincent Palatin [Thu, 13 Dec 2012 01:55:22 +0000 (17:55 -0800)]
usb: ehci: Add 64-bit controller support

On EHCI controller with 64-bit address space support, we must initialize
properly the high word for the PCI bus master accesses.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agousb: ehci: generic PCI support
Vincent Palatin [Fri, 14 Dec 2012 06:58:27 +0000 (22:58 -0800)]
usb: ehci: generic PCI support

Instead of hardcoding the PCI IDs on the USB controller, use the PCI
class to detect them.

Ensure the busmaster bit is properly set in the PCI configuration.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoUse 'unsigned int' for global_data's baudrate
Simon Glass [Tue, 5 Mar 2013 14:40:05 +0000 (14:40 +0000)]
Use 'unsigned int' for global_data's baudrate

We decided to used unsigned int here, rather than unsigned long. But
for the generic global_data it is still unsigned long. So change it
over.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosparc: Fix build warnings in serial.c
Simon Glass [Tue, 5 Mar 2013 14:40:04 +0000 (14:40 +0000)]
sparc: Fix build warnings in serial.c

These macros are already defined in io.h so should not be declared in
serial.c.

serial.c:38:0: warning: "READ_BYTE" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:36:0: note: this is the location of the previous definition
serial.c:39:0: warning: "READ_HWORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:37:0: note: this is the location of the previous definition
serial.c:40:0: warning: "READ_WORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:38:0: note: this is the location of the previous definition
serial.c:41:0: warning: "READ_DWORD" redefined
/home/sjg/c/src/third_party/u-boot/files/include/asm/io.h:39:0: note: this is the location of the previous definition

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agosparc: Fix out-of-tree building
Simon Glass [Tue, 5 Mar 2013 14:40:03 +0000 (14:40 +0000)]
sparc: Fix out-of-tree building

It isn't clear why the sparc cpu Makefile has its own compile line, but
it does not work correctly with an out-of-tree build. Removing it fixes
this problem. Perhaps it does not introduce others.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoserial: ns16550: Remove unwanted cast
Simon Glass [Tue, 5 Mar 2013 14:40:02 +0000 (14:40 +0000)]
serial: ns16550: Remove unwanted cast

This cast does not seem correct, since we should be writing to a pointer,
not a ulong.

This fixes the following warning on nds32:

-ns16550.c:49: warning: passing argument 2 of 'writeb' makes pointer from integer without a cast

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoavr32: Fix cast warning in board.c
Simon Glass [Tue, 5 Mar 2013 14:40:01 +0000 (14:40 +0000)]
avr32: Fix cast warning in board.c

The frame buffer pointer in global_data is not a pointer, so we should
remove these casts.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Andreas Bießmann <andreas.devel@googlemail.com>
11 years agoblackfin: Remove noreturn attribute from cpu_init_f()
Simon Glass [Tue, 5 Mar 2013 14:40:00 +0000 (14:40 +0000)]
blackfin: Remove noreturn attribute from cpu_init_f()

Now that board_init_f() is not marked as noreturn, we need to do the same
to blackfin's cpu_init_f() function.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoblackfin: Fix up board_type global data
Simon Glass [Tue, 5 Mar 2013 14:39:59 +0000 (14:39 +0000)]
blackfin: Fix up board_type global data

This should be in arch_global_data but was dropped in the change-over.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoexynos5: Enable generic board for Exynos5 device tree boards
Simon Glass [Tue, 5 Mar 2013 14:39:58 +0000 (14:39 +0000)]
exynos5: Enable generic board for Exynos5 device tree boards

Enable CONFIG_SYS_GENERIC_BOARD for all Exynos5 boards that use
CONFIG_OF_CONTROL.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable generic board
Simon Glass [Tue, 5 Mar 2013 14:39:57 +0000 (14:39 +0000)]
x86: Enable generic board

This will be used exclusively on x86, so enable it for the whole
architecture.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agotegra: Enable generic board for Tegra
Simon Glass [Tue, 5 Mar 2013 14:39:56 +0000 (14:39 +0000)]
tegra: Enable generic board for Tegra

Bravely enable CONFIG_SYS_GENERIC_BOARD for all Tegra boards.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Enable generic board support
Simon Glass [Mon, 11 Mar 2013 07:40:13 +0000 (07:40 +0000)]
x86: Enable generic board support

This enables generic board support so that x86 boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Use sections header to obtain link symbols
Simon Glass [Tue, 5 Mar 2013 14:39:54 +0000 (14:39 +0000)]
x86: Use sections header to obtain link symbols

These are defined in asm-generic/sections.h, so remove them from
architecture-specific files.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Adjust board_r.c for x86
Simon Glass [Tue, 5 Mar 2013 14:39:53 +0000 (14:39 +0000)]
x86: Adjust board_r.c for x86

For x86 the global_data is managed entirely by the start.S code so we do
not need to touch it. However, we do have some more initcalls to add.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agox86: Adjust board_f.c for x86
Simon Glass [Tue, 5 Mar 2013 14:39:52 +0000 (14:39 +0000)]
x86: Adjust board_f.c for x86

For x86, things have adjusted somewhat since this series was originally
written. It has its own way of running through initcalls which is actually
nicer than others archs.

Unfortunately this does introduce exceptions. We will soon require use of
generic board on x86, but until then we need to fit in with what is there,
and treat x86 as a special case.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoppc: Enable generic board support
Simon Glass [Mon, 11 Mar 2013 06:50:01 +0000 (06:50 +0000)]
ppc: Enable generic board support

This enables generic board support so that ppc boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdjust board_r.c for ppc
Simon Glass [Thu, 14 Mar 2013 07:20:12 +0000 (07:20 +0000)]
Adjust board_r.c for ppc

This adds ppc features to the generic post-relocation board init.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdjust board_f.c for ppc
Simon Glass [Mon, 11 Mar 2013 14:30:42 +0000 (14:30 +0000)]
Adjust board_f.c for ppc

This adds ppc features to the generic pre-relocation board init.

This is a separate commit so that these features are clearly shown.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd CONFIG_SYS_SYM_OFFSETS to support offset symbols
Simon Glass [Mon, 11 Mar 2013 07:06:48 +0000 (07:06 +0000)]
Add CONFIG_SYS_SYM_OFFSETS to support offset symbols

Link symbols as created by the link script can either be absolute or
relative to the text start. This option switches between the two options
so that we can support both.

As we convert architectures over to generic board, we can see if this
option is actually needed, or whether it is possible to unify this feature
also.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoarm: Enable generic board support
Simon Glass [Mon, 11 Mar 2013 06:49:57 +0000 (06:49 +0000)]
arm: Enable generic board support

This enables generic board support so that ARM boards can define
CONFIG_SYS_GENERIC_BOARD.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoarm: Remove use of board_early_init_r/last_stage_init()
Simon Glass [Tue, 5 Mar 2013 14:39:46 +0000 (14:39 +0000)]
arm: Remove use of board_early_init_r/last_stage_init()

These boards define CONFIG_LAST_STAGE_INIT and CONFIG_BOARD_EARLY_INIT_R
but these options are not available on ARM. Move them into the powerpc
common file instead.

This change affects: km_kirkwood_pci, mgcoge3un, kmnusa, kmcoge5un,
km_kirkwood and portl2.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoAdd spl load feature
Simon Glass [Tue, 5 Mar 2013 14:39:45 +0000 (14:39 +0000)]
Add spl load feature

This adds secondary program loader support to the generic board.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic post-relocation board_r.c
Simon Glass [Mon, 11 Mar 2013 14:30:37 +0000 (14:30 +0000)]
Introduce generic post-relocation board_r.c

This file handles common post-relocation init for boards which use
the generic framework.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic pre-relocation board_f.c
Simon Glass [Mon, 11 Mar 2013 06:49:53 +0000 (06:49 +0000)]
Introduce generic pre-relocation board_f.c

This file handles common pre-relocation init for boards which use
the generic framework.

It starts up the console, DRAM, performs relocation and then jumps
to post-relocation init.

Signed-off-by: Simon Glass <sjg@chromium.org>
Tested-by: Wolfgang Denk <wd@denx.de>
Acked-by: Wolfgang Denk <wd@denx.de>
11 years agoDeclare watchdog functions in watchdog.h
Simon Glass [Tue, 5 Mar 2013 14:39:42 +0000 (14:39 +0000)]
Declare watchdog functions in watchdog.h

These functions are only available for powerpc and are not declared in a
header file. We want to use the rest function in two places (board_f and
board_r), so declare the functions in watchdog.h.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years ago__HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board
Simon Glass [Fri, 8 Mar 2013 13:45:27 +0000 (13:45 +0000)]
__HAVE_ARCH_GENERIC_BOARD controls availabilty of generic board

We are introducing a new unified board setup. Add a check to make sure that
board config files do not define CONFIG_SYS_GENERIC_BOARD unless their
architecture defines __HAVE_ARCH_GENERIC_BOARD

__HAVE_ARCH_GENERIC_BOARD will currently not be the default setting, but
we can switch this later when most architecture support generic board.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce a basic initcall implementation
Simon Glass [Tue, 5 Mar 2013 14:39:40 +0000 (14:39 +0000)]
Introduce a basic initcall implementation

This library supports calling a list of functions one after the
other.

It is intended that we move to a more powerful initcall implementation
as proposed by Graeme Russ <graeme.russ@gmail.com>. For now, this allows
us to do the basics.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoChange stub example to use asm-generic/sections.h
Simon Glass [Tue, 5 Mar 2013 14:39:39 +0000 (14:39 +0000)]
Change stub example to use asm-generic/sections.h

We can use the declarations of __bss_start and _end from this header
instead of declaring them locally.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoarm: Use sections header to obtain link symbols
Simon Glass [Tue, 5 Mar 2013 14:39:38 +0000 (14:39 +0000)]
arm: Use sections header to obtain link symbols

Include this header to get access to link symbols, which are otherwise
removed.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic link section.h symbol files
Simon Glass [Tue, 5 Mar 2013 14:39:37 +0000 (14:39 +0000)]
Introduce generic link section.h symbol files

We create a separate header file for link symbols defined by the link
scripts. It is helpful to have these all in one place and try to
make them common across architectures. Since Linux already has a similar
file, we bring this in even though many of the symbols there are not
relevant to us.

Each architecture has its own asm/sections.h where symbols specifc to
that architecture can be added. For now everything except AVR32 just
includes the generic header.

One change is needed in arch/avr32/lib/board.c to make this conversion
work.

Reviewed-by: Tom Rini <trini@ti.com> (version 5)
Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoReplace __bss_end__ with __bss_end
Simon Glass [Thu, 14 Mar 2013 06:54:53 +0000 (06:54 +0000)]
Replace __bss_end__ with __bss_end

Note this is a tree-wide change affecting multiple architectures.

At present we use __bss_start, but mostly __bss_end__. This seems
inconsistent and in a number of places __bss_end is used instead.

Change to use __bss_end for the BSS end symbol throughout U-Boot. This
makes it possible to use the asm-generic/sections.h file on all
archs.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoIntroduce generic u-boot.h file
Simon Glass [Tue, 5 Mar 2013 14:39:35 +0000 (14:39 +0000)]
Introduce generic u-boot.h file

This file holds the board info structure. We need this to be generic
for the unified board series, so create a structure which contains
the basic fields required by the main architectures.

Signed-off-by: Simon Glass <sjg@chromium.org>
11 years agoMerge branch 'u-boot-tegra/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 15 Mar 2013 19:50:43 +0000 (20:50 +0100)]
Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'

11 years agoMerge branch 'u-boot-imx/master' into 'u-boot-arm/master'
Albert ARIBAUD [Fri, 15 Mar 2013 14:18:31 +0000 (15:18 +0100)]
Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'

11 years agonitrogen: Use unsigned long to specify the total RAM size
fabio.estevam@freescale.com [Thu, 14 Mar 2013 02:32:55 +0000 (02:32 +0000)]
nitrogen: Use unsigned long to specify the total RAM size

When building for the nitrogen boards with 2GiB the following warning happens:

nitrogen6x.c:89:38: warning: integer overflow in expression [-Woverflow]

2GiB can not fit in 32-bits, so use ulong instead.

Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agonitrogen6x: Fix RAM size variable
Fabio Estevam [Thu, 14 Mar 2013 02:32:54 +0000 (02:32 +0000)]
nitrogen6x: Fix RAM size variable

Fix the following build error when buildig nitrogen6s1g:

nitrogen6x.c:89:17: error: 'CONFIG_DDR_MB' undeclared (first use in
this function)
nitrogen6x.c:89:17: note: each undeclared identifier is reported only
once for each function it appears in

Reported-by: Albert Aribaud <albert.u.boot@aribaud.net>
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
11 years agoTegra114: Dalmore: Add pad config tables/code based on pinmux code
Tom Warren [Mon, 11 Mar 2013 23:43:49 +0000 (16:43 -0700)]
Tegra114: Dalmore: Add pad config tables/code based on pinmux code

Pad config registers exist in APB_MISC_GP space, and control slew
rate, drive strengh, schmidt, high-speed, and low-power modes for
all of the pingroups in Tegra30. This builds off of the pinmux
way of constructing init tables to configure select pads (SDIOCFG,
for instance) during pinmux_init().

Currently, no padcfg entries exist. SDIO3CFG will be added when the
MMC driver is added as per the TRM to work with the SD-card slot on
Dalmore E1611.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: fdt: Move aliases from dtsi to dts file as per other Tegras
Tom Warren [Tue, 12 Mar 2013 00:07:21 +0000 (17:07 -0700)]
Tegra114: fdt: Move aliases from dtsi to dts file as per other Tegras

All other Tegra boards have their alias nodes in the .dts file

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: Dalmore: Always use DEFAULT instead of DISABLE for lock bits
Tom Warren [Wed, 13 Mar 2013 22:40:33 +0000 (15:40 -0700)]
Tegra114: Dalmore: Always use DEFAULT instead of DISABLE for lock bits

The pinmux code issues a warning if the caller attempts to disable the
lock bit in a pinmux register, since this is impossible (once it's
locked, the only way to unlock it is to reset the device/pmt controller).

The I2C/DDC/CEC/USB macros expect a lock setting to be passed in,
and the previous setting of DISABLE caused the pinmux table parsing
code to issue the warning. Changing the lock bits in these table
entries to DEFAULT (i.e. don't touch it) fixes this.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: Fix/update GP padcfg register struct
Tom Warren [Wed, 13 Mar 2013 22:13:47 +0000 (15:13 -0700)]
Tegra114: Fix/update GP padcfg register struct

Differences in padcfg registers (some removed, some added) between
Tegra30 and Tegra114 weren't picked up when I first ported this file.

Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoTegra114: pinmux: Fix bad CAM_MCLK func 3 table entry
Tom Warren [Wed, 13 Mar 2013 22:00:54 +0000 (15:00 -0700)]
Tegra114: pinmux: Fix bad CAM_MCLK func 3 table entry

This caused CAM_MCLK's pinmux reg to be locked out, since the
table parsing code couldn't find a matching entry for VI_ALT3
and wrote garbage to the register.

Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: enable a common set of disk-related commands everywhere
Stephen Warren [Thu, 28 Feb 2013 15:03:48 +0000 (15:03 +0000)]
ARM: tegra: enable a common set of disk-related commands everywhere

Enable a common set of partition types, filesystems, and related
commands in tegra-common.h, so that they are available on all Tegra
boards. This allows boot.scr (loaded and executed by the default
built-in environment) on those boards to assume that certain features
are always available.

Do this in tegra-common.h, so that individual board files can undefine
the features if they really don't want any of them.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agodisk: define HAVE_BLOCK_DEVICE if CONFIG_CMD_PART
Stephen Warren [Thu, 28 Feb 2013 15:03:47 +0000 (15:03 +0000)]
disk: define HAVE_BLOCK_DEVICE if CONFIG_CMD_PART

Various code that is conditional upon HAVE_BLOCK_DEVICE is required by
code conditional upon CONFIG_CMD_PART. So, enable HAVE_BLOCK_DEVICE if
CONFIG_CMD_PART is enabled.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agodisk: define HAVE_BLOCK_DEVICE in a common place
Stephen Warren [Thu, 28 Feb 2013 15:03:46 +0000 (15:03 +0000)]
disk: define HAVE_BLOCK_DEVICE in a common place

This set of ifdefs is used in a number of places. Move its definition
somewhere common so it doesn't have to be repeated.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoARM: tegra: make bounce buffer option common
Stephen Warren [Thu, 28 Feb 2013 15:03:45 +0000 (15:03 +0000)]
ARM: tegra: make bounce buffer option common

All Tegra devices will need CONFIG_BOUNCE_BUFFER. Move it to
tegra-common.h to ensure it's always set.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tom Warren <twarren@nvidia.com>
11 years agoTegra30: MMC: Enable DT MMC driver support for Tegra30 Cardhu boards
Tom Warren [Tue, 26 Feb 2013 19:36:22 +0000 (12:36 -0700)]
Tegra30: MMC: Enable DT MMC driver support for Tegra30 Cardhu boards

Tested on my Cardhu-A04 tablet, eMMC and SD-Card work fine, can load
a kernel off of an SD card OK, card detect works, and the env is now
stored in eMMC (end of the 2nd 'boot' sector, same as Tegra20).

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra30: mmc: Add Tegra30 SDMMC compatible entry to fdtdec & driver
Tom Warren [Mon, 4 Mar 2013 21:07:18 +0000 (14:07 -0700)]
Tegra30: mmc: Add Tegra30 SDMMC compatible entry to fdtdec & driver

Tegra30 SD/MMC controller differs enough from Tegra20 that it
needs its own entry in the compat_names/compat_id tables and in
the Tegra MMC driver.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agommc: Tegra: Add SD bus power/voltage function and MMC pad init call.
Tom Warren [Tue, 26 Feb 2013 19:31:26 +0000 (12:31 -0700)]
mmc: Tegra: Add SD bus power/voltage function and MMC pad init call.

Tegra30 requires the SD Bus Voltage & Power bits be set in the SD
Power Control register. Tegra20 works w/o them set, but do it anyway
for those SoCs as it's part of the SD spec. Also call a common
board pad init routine (pad_init_mmc) in mmc_reset(), used by
Tegra30 only for now.

Note that Tegra20 SD/MMC HW differs enough from Tegra20 that a
new compatible entry is used in the fdt compat_names/id tables.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra30: MMC: Add SD bus power-rail and SDMMC pad init routines
Tom Warren [Tue, 26 Feb 2013 19:26:55 +0000 (12:26 -0700)]
Tegra30: MMC: Add SD bus power-rail and SDMMC pad init routines

T30 requires specific SDMMC pad programming, and bus power-rail bringup.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra: MMC: Added/update SDMMC registers/base addresses for T20/T30
Tom Warren [Tue, 26 Feb 2013 18:17:43 +0000 (11:17 -0700)]
Tegra: MMC: Added/update SDMMC registers/base addresses for T20/T30

Removed SDMMC base addresses from tegra.h since they're no longer used.
Added additional vendor-specific SD/MMC registers and bus power defines.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra30: fdt: Add SDMMC (sdhci) nodes for T30 boards (Cardhu for now)
Tom Warren [Tue, 26 Feb 2013 18:14:17 +0000 (11:14 -0700)]
Tegra30: fdt: Add SDMMC (sdhci) nodes for T30 boards (Cardhu for now)

Took these values directly from the kernel dts files.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra30: Cardhu: Add pad config tables/code based on pinmux code
Tom Warren [Wed, 6 Mar 2013 23:16:22 +0000 (16:16 -0700)]
Tegra30: Cardhu: Add pad config tables/code based on pinmux code

Pad config registers exist in APB_MISC_GP space, and control slew
rate, drive strengh, schmidt, high-speed, and low-power modes for
all of the pingroups in Tegra30. This builds off of the pinmux
way of constructing init tables to configure select pads (SDIOCFG,
for instance) during pinmux_init().

Currently, only SDIO1CFG is changed as per the TRM to work with
the SD-card slot on Cardhu.

Thanks to StephenW for the suggestion/original idea.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: pinmux: Update pinmux tables & code, fix a bug w/SDMMC3 init
Tom Warren [Fri, 1 Mar 2013 21:38:20 +0000 (14:38 -0700)]
Tegra114: pinmux: Update pinmux tables & code, fix a bug w/SDMMC3 init

Use the latest tables & code from our internal U-Boot repo.
The SDMMC3_CD, CLK_LB_IN and CLK_LB_OUT offsets in the pingroup
table were off by a few indices, causing the pinmux init code to
write bad data to the PINMUX_AUX_ regs. This also enabled the lock
bit, which made it impossible to reconfig the pads correctly for
SDMMC3 (SD card on Dalmore) operation. Also fixes SPI_CS2_N,
USB_VBUS_EN0, HDMI_CEC and UART2_RXD/TXD muxes.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra30: Cardhu: Remove unneeded cardhu.c.mmc file
Tom Warren [Thu, 28 Feb 2013 06:30:03 +0000 (06:30 +0000)]
Tegra30: Cardhu: Remove unneeded cardhu.c.mmc file

This was an older debug/developmental file that got added
accidentally. Not needed/used in any Cardhu build.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
11 years agoTegra114: fdt: Sync DT nodes with kernel DT files (GPIO, tegra_car)
Tom Warren [Wed, 27 Feb 2013 05:52:52 +0000 (05:52 +0000)]
Tegra114: fdt: Sync DT nodes with kernel DT files (GPIO, tegra_car)

Minor edit to tegra_car node, add gpio node.

Signed-off-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>