platform/kernel/u-boot.git
9 years agoARM: sunxi: Allow specifying module in prcm apb0 init function
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:46 +0000 (16:47 +0800)]
ARM: sunxi: Allow specifying module in prcm apb0 init function

The prcm apb0 controls multiple modules. Allow specifying which
modules to enable clocks and de-assert resets so the function
can be reused.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Add support for R_PIO gpio banks
Hans de Goede [Wed, 22 Oct 2014 08:47:45 +0000 (16:47 +0800)]
ARM: sunxi: Add support for R_PIO gpio banks

The A31, A23 and later SoCs have an extra pin controller, called CPUs_PIO
or R_PIO, which handles pin banks L and beyond.

Also add a clear description about SUNXI_GPIO_BANKS, stating it only
counts the number of pin banks in the _main_ pin controller.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: expanded commit message]
[wens@csie.org: add pin bank M and expand comments]
[wens@csie.org: add comment on SUNXI_GPIO_BANKS macro]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Add basic A23 support
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:44 +0000 (16:47 +0800)]
ARM: sunxi: Add basic A23 support

The basic blocks of the A23 are similar to the A31 (sun6i). Re-use
sun6i code for initial clock, gpio, and uart setup.

There is no SPL support for A23, as we do not have any documentation
or sample code for DRAM initialization.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agommc: sunxi: Add support for sun8i (A23)
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:43 +0000 (16:47 +0800)]
mmc: sunxi: Add support for sun8i (A23)

The Allwinner A23 SoC has reset controls like the A31 (sun6i).
The FIFO address is also the same as sun6i.

Re-use code added for sun6i.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Add support for uart0 on port F (mmc0)
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:42 +0000 (16:47 +0800)]
ARM: sunxi: Add support for uart0 on port F (mmc0)

Allwinner SoCs provide uart0 muxed with mmc0, which can then be used
with a micro SD breakout board. On the A23, this is the only way to
use uart0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Add sun8i (A23) UART0 pin mux support
Chen-Yu Tsai [Wed, 22 Oct 2014 08:47:41 +0000 (16:47 +0800)]
ARM: sunxi: Add sun8i (A23) UART0 pin mux support

UART0 pin muxes on the A23 have a different function value.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Fix reset command on sun6i/sun8i
Chen-Yu Tsai [Sat, 4 Oct 2014 12:37:28 +0000 (20:37 +0800)]
ARM: sunxi: Fix reset command on sun6i/sun8i

The watchdog on sun6i/sun8i has a different layout.

Add the new layout and fix up the setup functions so that reset works.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
[ ijc -- removed sun5i workaround from sun6i/sun8i codepath as discussed ]

9 years agoARM: sunxi: Add sun6i/sun8i timer block register definition
Chen-Yu Tsai [Sat, 4 Oct 2014 12:37:27 +0000 (20:37 +0800)]
ARM: sunxi: Add sun6i/sun8i timer block register definition

The RTC hardware has been moved out of the timer block on sun6i/sun8i.
In addition, there are more watchdogs available.

Also note that the timer block definition is not completely accurate
for sun5i/sun7i. Various blocks are missing or have been moved out.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Move watchdog register definitions to separate file
Chen-Yu Tsai [Sat, 4 Oct 2014 12:37:26 +0000 (20:37 +0800)]
ARM: sunxi: Move watchdog register definitions to separate file

On later Allwinner SoCs, the watchdog hardware is by all means a
separate hardware block, with its own address range and interrupt
line.

Move the register definitions to a separate file to facilitate
supporting newer SoCs.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Fix build break when CONFIG_MMC is not defined
Chen-Yu Tsai [Tue, 7 Oct 2014 07:11:49 +0000 (15:11 +0800)]
ARM: sunxi: Fix build break when CONFIG_MMC is not defined

BOOT_TARGET_DEVICES includes MMC unconditionally. This breaks when
CONFIG_CMD_MMC is not defined. Use a secondary macro to conditionally
include it when CONFIG_MMC is enabled, as we do for CONFIG_AHCI.

This is used when we want to use uart0 from port F, which conflicts
with mmc0.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add CONFIG_MACH_TYPE defines to sun4i, sun5i and sun7i
Hans de Goede [Mon, 13 Oct 2014 05:41:16 +0000 (07:41 +0200)]
sunxi: Add CONFIG_MACH_TYPE defines to sun4i, sun5i and sun7i

Many people are still using old linux-sunxi-3.4 kernels on sunxi devices,
adding the proper MACH_TYPE defines for this allows people to switch to
upstream u-boot, so that we can stop maintaining the linux-sunxi u-boot fork.

These machine-ids are all properly registered at:

http://www.arm.linux.org.uk/developer/machines/

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Kconfig: Unify sunxi Kconfig code
Hans de Goede [Wed, 13 Aug 2014 12:02:29 +0000 (14:02 +0200)]
sunxi: Kconfig: Unify sunxi Kconfig code

Unify the sunxi Kconfig code, instead of having separate code blocks for
each of sun4i - sun7i.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Enable second sdcard slot found on some boards
Hans de Goede [Fri, 3 Oct 2014 14:58:04 +0000 (16:58 +0200)]
sunxi: Enable second sdcard slot found on some boards

Enable the second sdcard slot found on some boards. Note that we do not
set CONFIG_MMC_SUNXI_SLOT_EXTRA for the SPL, as having it there is not useful,

Except for on the Mele-M3 where the second sdcard is an eMMC, from which the
device can also boot, and there we want to have both in the SPL, so that
a single u-boot binary can both from both. So for the M3 we do prefix the
defconfig setting with the special "+S:" syntax so that it applies to the
SPL too.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Use PG3 - PG8 as io-pins for mmc1
Hans de Goede [Fri, 3 Oct 2014 14:44:57 +0000 (16:44 +0200)]
sunxi: Use PG3 - PG8 as io-pins for mmc1

None of the known sunxi devices actually use mmc1 routed through PH, where
as some devices do actually use mmc1 routed through PG, so change the routing
of mmc1 to PG. If in the future we encounter devices with mmc1 routed through
PH, we will need to change things to be a bit more flexible.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: When we've both mmc0 and mmc2, detect from which one we're booting
Hans de Goede [Thu, 2 Oct 2014 19:13:54 +0000 (21:13 +0200)]
sunxi: When we've both mmc0 and mmc2, detect from which one we're booting

sunxi SOCs can boot from both mmc0 and mmc2, detect from which one we're
booting, and make that one "mmc dev 0" so that a single u-boot binary can
be used for both the onboard eMMC and for external sdcards.

When we're booting from mmc2, we make it dev 0 because that is where the SPL
will load the tertiary payload (the actual u-boot binary in our case) from,
see: common/spl/spl_mmc.c, which has dev 0 hardcoded everywhere.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option
Hans de Goede [Thu, 2 Oct 2014 18:43:50 +0000 (20:43 +0200)]
sunxi: Turn MMC_SUNXI_SLOT_EXTRA into a proper Kconfig option

Note we also drop the SPL check for initializing the 2nd mmc slot, the SPL
check is not necessary with Kconfig, because only options explicitly marked
as also being for the SPL get set during SPL builds.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add mmc card-detect functionality
Hans de Goede [Thu, 2 Oct 2014 18:29:26 +0000 (20:29 +0200)]
sunxi: Add mmc card-detect functionality

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sun6i: Add Colombus board defconfig
Chen-Yu Tsai [Fri, 3 Oct 2014 12:16:30 +0000 (20:16 +0800)]
ARM: sun6i: Add Colombus board defconfig

The Colombus board is an A31 evaluation board from WITS Technology.

Maxime has kindly agreed to maintain this board.

[1] http://lists.denx.de/pipermail/u-boot/2014-September/190043.html

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Cc: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Add basic A31 support
Maxime Ripard [Fri, 3 Oct 2014 12:16:29 +0000 (20:16 +0800)]
ARM: sunxi: Add basic A31 support

Add a new sun6i machine that supports UART and MMC.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: use SPDX labels, adapt to Kconfig system, drop ifdef
around mmc and smp code, drop MACH_TYPE]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sun6i: Setup the A31 UART0 muxing
Maxime Ripard [Fri, 3 Oct 2014 12:16:28 +0000 (20:16 +0800)]
ARM: sun6i: Setup the A31 UART0 muxing

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: commit message was "ARM: sunxi: Setup the A31 UART0 muxing"]
[wens@csie.org: reorder #ifs by SUN?I]
[wens@csie.org: replace magic numbers with GPIO definitions]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sun6i: Define UART0 pins for A31
Chen-Yu Tsai [Fri, 3 Oct 2014 12:16:27 +0000 (20:16 +0800)]
ARM: sun6i: Define UART0 pins for A31

UART0 is the default debug/console UART on the A31.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi-mmc: Add mmc support for sun6i / A31
Hans de Goede [Fri, 3 Oct 2014 12:16:26 +0000 (20:16 +0800)]
ARM: sunxi-mmc: Add mmc support for sun6i / A31

The mmc hardware on sun6i has an extra reset control that needs to
be de-asserted prior to usage. Also the FIFO address is different.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: use setbits_le32 for reset control, drop obsolete changes,
rewrite different FIFO address handling, add commit message]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sun6i: Add clock support
Chen-Yu Tsai [Fri, 3 Oct 2014 12:16:25 +0000 (20:16 +0800)]
ARM: sun6i: Add clock support

This patch adds the basic clocks support for the Allwinner A31 (sun6i)
processor. This code will not been compiled until the build is hooked
up in a later patch. It has been split out to keep the patches manageable.

This includes changes from the following commits from u-boot-sunxi:

a92051b ARM: sunxi: Add sun6i clock controller structure
1f72c6f ARM: sun6i: Setup the UART0 clocks
5f2e712 ARM: sunxi: Enable pll6 by default on all models
2be2f2a ARM: sunxi-mmc: Add mmc support for sun6i / A31
12e1633 ARM: sun6i: Add initial clock setup for SPL
1a9c9c6 ARM: sunxi: Split clock code into common, sun4i and sun6i code
0b194ee ARM: sun6i: Properly setup the PLL LDO in clock_init_safe
b54c626 sunxi: avoid sr32 for APB1 clock setup.
68fe29c sunxi: remove magic numbers from clock_get_pll{5,6}
c89867d sunxi: clocks: clock_get_pll5 prototype and coding style
501ab1e ARM: sunxi: Fix sun6i PLL6 settings
37f669b ARM: sunxi: Fix macro names for mmc and uart reset offsets
61de1e6 ARM: sunxi: Correct comment for MBUS1 register in sun6i clock definitions

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Ian Campbell <ijc@hellion.org.uk>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: styling fixes reported by checkpatch.pl]
[wens@csie.org: drop unsupported SPL code block and unused gpio.h header]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Cc: Tom Cubie <Mr.hipboi@gmail.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sun6i: Add support for the power reset control module found on the A31
Oliver Schinagl [Fri, 3 Oct 2014 12:16:24 +0000 (20:16 +0800)]
ARM: sun6i: Add support for the power reset control module found on the A31

The A31 has a new module called PRCM, or Power, Reset Control Module.
This module controls clocks and resets for RTC block modules, and also
PLL biasing in the main clock module.

This patch adds the register definitions, and also enables the clocks
and resets for the RTC block PIO (pin controller) and P2WI (push-pull
2 wire interface) which is used to talk to the PMIC.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[wens@csie.org: spacing fixes reported by checkpatch.pl]
[wens@csie.org: Use setbits helper in PRCM init function]
[wens@csie.org: rephrase commit message to explain what the hardware
supports and what we actually enable]
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sun6i: Add base address for the new controllers in A31
Oliver Schinagl [Fri, 3 Oct 2014 12:16:23 +0000 (20:16 +0800)]
ARM: sun6i: Add base address for the new controllers in A31

A31 has several new and changed memory address. This patch adds them.

Signed-off-by: Oliver Schinagl <oliver@schinagl.nl>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined
Chen-Yu Tsai [Fri, 3 Oct 2014 12:16:22 +0000 (20:16 +0800)]
ARM: sunxi: Fix build break when CONFIG_USB_EHCI is not defined

BOOT_TARGET_DEVICES includes USB unconditionally. This breaks when
CONFIG_CMD_USB is not defined. Use a secondary macro to conditionally
include it when CONFIG_EHCI is enabled, as we do for CONFIG_AHCI.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agoARM: sunxi: Use macro values for setting UART GPIO pull-ups
Chen-Yu Tsai [Fri, 3 Oct 2014 12:16:21 +0000 (20:16 +0800)]
ARM: sunxi: Use macro values for setting UART GPIO pull-ups

We have already defined macros for pull-up/down values in the
GPIO header. Use them instead of magic numbers when configuring
the UART pins.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agosunxi: Add support for the Mele M3 board
Hans de Goede [Tue, 30 Sep 2014 14:12:39 +0000 (16:12 +0200)]
sunxi: Add support for the Mele M3 board

The Mele M3 is yet another Allwinnner based Android top set box from Mele.

It uses a housing similar to the A2000, but without the USM sata storage slot
at the top.

It features an A20 SoC, 1G RAM, 4G eMMC (unique for Allwinner devices),
100Mbit ethernet, HDMI out, 3 USB A receptacles, VGA, and A/V OUT connections.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Ian Campbell <ijc@hellion.org.uk>
9 years agommc: sunxi: add SDHC support for sun6i/sun7i/sun8i
Wills Wang [Mon, 22 Sep 2014 10:26:03 +0000 (18:26 +0800)]
mmc: sunxi: add SDHC support for sun6i/sun7i/sun8i

Allwinner A20/A23/A31's SD/MMC host support SDHC High Capacity feature.

Signed-off-by: Wills Wang <wills.wang.open@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agosun7i: Add support for Olimex A20-OLinuXino-LIME2
Iain Paton [Sun, 28 Sep 2014 13:18:42 +0000 (14:18 +0100)]
sun7i: Add support for Olimex A20-OLinuXino-LIME2

This adds support for the Olimex A20-OLinuXino-Lime2
https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXIno-LIME2

Differences to previous Lime boards are 1GB RAM and gigabit ethernet

Signed-off-by: Iain Paton <ipaton0@gmail.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
9 years agoserial: remove uniphier_serial_initialize() call
Masahiro Yamada [Thu, 23 Oct 2014 13:26:12 +0000 (22:26 +0900)]
serial: remove uniphier_serial_initialize() call

The UniPhier serial driver has been converted to driver model.
Let's remove uniphier_serial_initialize() call from the old
serial driver framework.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoserial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 13:26:11 +0000 (22:26 +0900)]
serial: uniphier: move CONFIG_UNIPHIER_SERIAL to Kconfig

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: use Driver Model for UniPhier serial driver
Masahiro Yamada [Thu, 23 Oct 2014 13:26:10 +0000 (22:26 +0900)]
dm: serial: use Driver Model for UniPhier serial driver

This commit converts UniPhier on-chip serial driver to driver model.

Since UniPhier SoCs do not have Device Tree support, some board files
should be added under arch/arm/cpu/armv7/uniphier/ph1-*/ directories.
(Device Tree support for UniPhier platform is still under way.)

Now the base address and master clock frequency are passed from
platform data, so CONFIG_SYS_UNIPHIER_SERIAL_BASE* and
CONFIG_SYS_UNIPHIER_UART_CLK should be removed.

Tested on UniPhier PH1-LD4 ref board.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: add entries to Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 13:26:09 +0000 (22:26 +0900)]
dm: add entries to Kconfig

Create entries of CONFIG_DM, CONFIG_DM_SERIAL, CONFIG_DM_GPIO
and CONFIG_DM_SPI.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: consolidate common code more
Masahiro Yamada [Thu, 23 Oct 2014 13:26:08 +0000 (22:26 +0900)]
dm: serial: consolidate common code more

Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() and putc().  This commit does more puts() and tsts().

Also rename locally used functions to _serial_*() for clarification
because we have similar functions names here are there in this file.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: remove unnecessary casting
Masahiro Yamada [Thu, 23 Oct 2014 13:26:07 +0000 (22:26 +0900)]
dm: serial: remove unnecessary casting

The type (void *) can be directly passed to a function that
takes a specific pointer type.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: fix console putc
Masahiro Yamada [Thu, 23 Oct 2014 13:26:06 +0000 (22:26 +0900)]
dm: serial: fix console putc

Commit b8893327e9d2 (dm: serial: Put common code into separate functions)
consolidated getc() correctly, but introduced another bug to putc();
serial_stub_putc() passes sdev->priv to serial_putc_dev(), but
serial_putc_dev() uses cur_dev instead of the given argument.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agoserial: add static directive to local functions
Masahiro Yamada [Thu, 23 Oct 2014 13:26:05 +0000 (22:26 +0900)]
serial: add static directive to local functions

The functions _serial_putc, _serial_putc_raw, _serial_puts,
_serial_getc, _serial_tstc, _serial_setbrg are defined and used
locally in each of serial_ns16550.c and serial_s3c24x0.c.

Add static directive to them and remove declarations from
include/common.h.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agodm: move platform data headers to include/dm/platform_data
Masahiro Yamada [Fri, 24 Oct 2014 03:41:19 +0000 (12:41 +0900)]
dm: move platform data headers to include/dm/platform_data

The platform_data definitions are generally referenced from both
drivers and board files.  That is why header files defining
platform_data sturectures are placed in "include" directory,
but our top level "include" directory is already too cluttered.

Let's collect platform_data definitions under the directory
"include/dm/platform_data" like Linux gathers ones around under
"include/linux/platform_data".

This commit moves two header files:

  include/serial_mxc.h -> include/dm/platform_data/serial_mxc.h
  include/serial_pl01x.h -> include/dm/platform_data/serial_pl01x.h

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agodm: x86: Convert coreboot serial to use driver model
Simon Glass [Fri, 10 Oct 2014 13:49:20 +0000 (07:49 -0600)]
dm: x86: Convert coreboot serial to use driver model

This makes use of the existing device tree node to use driver model
for the serial console.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: dts: Add additional info to the serial port node
Simon Glass [Fri, 10 Oct 2014 13:49:19 +0000 (07:49 -0600)]
dm: x86: dts: Add additional info to the serial port node

Add more information so that U-Boot can find the address of the serial port.
Also fix the reg-shift value.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: Convert Intel ICH6 GPIO driver to use driver model
Simon Glass [Fri, 10 Oct 2014 13:49:18 +0000 (07:49 -0600)]
dm: x86: Convert Intel ICH6 GPIO driver to use driver model

Convert over this driver, using device tree to pass in the required
information. The peripheral is still probed, just the number of GPIO banks
and their offsets is in the device tree (previously this was a table in
the driver).

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: Add a gpio header for coreboot
Simon Glass [Fri, 10 Oct 2014 13:49:17 +0000 (07:49 -0600)]
dm: x86: Add a gpio header for coreboot

This code doesn't follow the normal approach of having its arch-specific
definitions in an arch-specific directory. Add a new arch-specific file
and make use of it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: Support pre-reloc malloc()
Simon Glass [Fri, 10 Oct 2014 13:49:16 +0000 (07:49 -0600)]
dm: x86: Support pre-reloc malloc()

Add support for this by reserving a block of memory below global_data.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: Zero global data before board_init_f()
Simon Glass [Fri, 10 Oct 2014 13:49:15 +0000 (07:49 -0600)]
dm: x86: Zero global data before board_init_f()

To permit information to be passed from the early U-Boot code to
board_init_f() we cannot zero the global_data in board_init_f(). Instead
zero it in the start-up code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: x86: Remove ebp assembler warning in zimage.c
Simon Glass [Fri, 10 Oct 2014 13:49:14 +0000 (07:49 -0600)]
dm: x86: Remove ebp assembler warning in zimage.c

This code generates warnings with recent gcc versions. We really don't need
the clobber specification, so just drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: serial: ns16550: Add a cast to the I/O operations
Simon Glass [Fri, 10 Oct 2014 13:49:13 +0000 (07:49 -0600)]
dm: serial: ns16550: Add a cast to the I/O operations

This generates a warning when driver model is enabled, so fix it by adding
a cast.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: Remove unused get_state() uclass method
Simon Glass [Sat, 4 Oct 2014 17:29:57 +0000 (11:29 -0600)]
dm: gpio: Remove unused get_state() uclass method

This is no longer used so drop it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: dts: Move omap device tree includes to correct place
Simon Glass [Thu, 23 Oct 2014 19:15:58 +0000 (13:15 -0600)]
dm: dts: Move omap device tree includes to correct place

These ended up in arch/arm/dts/dt-bindings temporarily, but in fact the
correct place is now include/dt-bindings. Move them to be consistent.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: imx: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:56 +0000 (11:29 -0600)]
dm: gpio: imx: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: exynos: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:55 +0000 (11:29 -0600)]
dm: gpio: exynos: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: rpi_b: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:54 +0000 (11:29 -0600)]
dm: gpio: rpi_b: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: omap3: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:53 +0000 (11:29 -0600)]
dm: gpio: omap3: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: tegra: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:52 +0000 (11:29 -0600)]
dm: gpio: tegra: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotest: dm: Add additional GPIO tests
Simon Glass [Sat, 4 Oct 2014 17:29:51 +0000 (11:29 -0600)]
test: dm: Add additional GPIO tests

Add tests for gpio_requestf() and for memory leaks.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotest: dm: Support memory leak checking as a core feature
Simon Glass [Sat, 4 Oct 2014 17:29:50 +0000 (11:29 -0600)]
test: dm: Support memory leak checking as a core feature

Check the state of the malloc() heap before each test is run, so that tests
can verify that all is well at the end. Provide helper functions to mark
the heap and to check that it returns to its initial state.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: Add gpio_requestf() helper for printf() strings
Simon Glass [Sat, 4 Oct 2014 17:29:49 +0000 (11:29 -0600)]
dm: gpio: Add gpio_requestf() helper for printf() strings

Add a helper which permits a printf()-style format string for the requester
string.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agotest: dm: Update GPIO tests for new gpio_request() method
Simon Glass [Sat, 4 Oct 2014 17:29:48 +0000 (11:29 -0600)]
test: dm: Update GPIO tests for new gpio_request() method

Now that gpio_request() is handled by the uclass, updates the tests
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: sandbox: Drop request()/free() in the driver
Simon Glass [Sat, 4 Oct 2014 17:29:47 +0000 (11:29 -0600)]
dm: gpio: sandbox: Drop request()/free() in the driver

Now that the uclass supports gpio_request/free() there is no need for the
driver to implement it too. Drop this unnecessary code.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: sandbox: Implement the remove() method
Simon Glass [Sat, 4 Oct 2014 17:29:46 +0000 (11:29 -0600)]
dm: gpio: sandbox: Implement the remove() method

This method frees memory so we must make sure to implement it.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: sandbox: Implement the get_function() method
Simon Glass [Sat, 4 Oct 2014 17:29:45 +0000 (11:29 -0600)]
dm: gpio: sandbox: Implement the get_function() method

Implement this method so that the 'gpio' command can do its job correctly.
For sandbox we only support input and output states for a gpio.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: Move the function for getting GPIO status into the uclass
Simon Glass [Sat, 4 Oct 2014 17:29:44 +0000 (11:29 -0600)]
dm: Move the function for getting GPIO status into the uclass

This function can be more easily tested if it is in the uclass.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: Add gpio_get_function() and friends
Simon Glass [Sat, 4 Oct 2014 17:29:43 +0000 (11:29 -0600)]
dm: gpio: Add gpio_get_function() and friends

Add helpers to the uclass to allow finding out the pin function.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: gpio: Implement GPIO reservation in the uclass
Simon Glass [Sat, 4 Oct 2014 17:29:42 +0000 (11:29 -0600)]
dm: gpio: Implement GPIO reservation in the uclass

We have several GPIO drivers now and all are doing similar things to record
which GPIOs are reserved.

Move this logic into the uclass to make the drivers similar.

We retain the request()/free() methods since currently one driver does use
these for setting up the pin.

Signed-off-by: Simon Glass <sjg@chromium.org>
9 years agodm: omap3: Move to driver model for GPIO and serial
Simon Glass [Thu, 23 Oct 2014 03:37:15 +0000 (21:37 -0600)]
dm: omap3: Move to driver model for GPIO and serial

Adjust the configuration for the am33xx boards, including beagleboard,
to use driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
9 years agodm: am33xx: Move to driver model for GPIO and serial
Simon Glass [Thu, 23 Oct 2014 03:37:14 +0000 (21:37 -0600)]
dm: am33xx: Move to driver model for GPIO and serial

Adjust the configuration for the am33xx boards, including beaglebone black
to use driver model.

This can be extended to other OMAP boards once platform data is provided
for them.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
9 years agodm: am335x: Remove serial options from CONFIG_SYS_EXTRA_OPTIONS
Simon Glass [Thu, 23 Oct 2014 03:37:13 +0000 (21:37 -0600)]
dm: am335x: Remove serial options from CONFIG_SYS_EXTRA_OPTIONS

With these options in place it is not possible to change the serial port
using 'make menuconfig' or similar. It seems to result in duplicate
defines.

For example:

In file included from include/linux/kconfig.h:4:0,
                 from <command-line>:0:
include/generated/autoconf.h:20:0: note: this is the location of the previous definition
 #define CONFIG_CONS_INDEX 2
 ^

The default option seems to be 1 anyway, in board/ti/am335x/Kconfig.

Remove the options so that we can adjust the serial port if required.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
9 years agodm: omap: serial: Add driver model support
Simon Glass [Thu, 23 Oct 2014 03:37:12 +0000 (21:37 -0600)]
dm: omap: serial: Add driver model support

Add driver model support to this driver, while retaining support for the
legacy system. Driver model serial support is enabled with CONFIG_DM_SERIAL
as usual.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: am33xx: Provide platform data for serial
Simon Glass [Thu, 23 Oct 2014 03:37:11 +0000 (21:37 -0600)]
dm: am33xx: Provide platform data for serial

Provide suitable platform data for am33xx boards, so that these boards can
use driver model for serial.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: am33xx: Provide platform data for GPIOs
Simon Glass [Thu, 23 Oct 2014 03:37:10 +0000 (21:37 -0600)]
dm: am33xx: Provide platform data for GPIOs

Provide suitable platform data for am33xx boards, so that these boards can
use driver model for GPIO access.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: omap: gpio: Support driver model
Simon Glass [Thu, 23 Oct 2014 03:37:09 +0000 (21:37 -0600)]
dm: omap: gpio: Support driver model

Add driver model support to this driver, while retaining support for the
legacy system. Driver model GPIO support is enabled with CONFIG_DM_GPIO
as usual.

Since gpio_is_valid() no longer exists, we can use the -EINVAL error
returned from gpio_request().

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: omap: gpio: Put _get_gpio_value() logic into its own function
Simon Glass [Thu, 23 Oct 2014 03:37:08 +0000 (21:37 -0600)]
dm: omap: gpio: Put _get_gpio_value() logic into its own function

Add a separate internal helper function to get a GPIO value, so that we
will be able to call it with the driver model version and avoid code
duplication.

Also move gpio_get_bank() and check_gpio() down below the helper functions
as these won't be needed with driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: dts: omap: Select correct console for beaglebone
Simon Glass [Thu, 23 Oct 2014 03:37:07 +0000 (21:37 -0600)]
dm: dts: omap: Select correct console for beaglebone

Select serial0 as the console.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Tom Rini <trini@ti.com>
9 years agodm: serial: Support CONFIG_CONS_INDEX if available
Simon Glass [Thu, 23 Oct 2014 03:37:06 +0000 (21:37 -0600)]
dm: serial: Support CONFIG_CONS_INDEX if available

Try to use this option to select the correct uart for the console. This
mimics the behaviour of drivers/serial.c.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: ns16550: Correct the probe logic for platform data
Simon Glass [Thu, 23 Oct 2014 03:37:05 +0000 (21:37 -0600)]
dm: ns16550: Correct the probe logic for platform data

The probe logic sets up the pointer to the platform data in the device
tree decode method. It should be done in the probe() method, and anyway
the device tree decode method can't be used when CONFIG_OF_CONTROL is
not enabled.

Fix these two problems.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: ns16550: Use an address instead of a pointer for the uart base
Simon Glass [Thu, 23 Oct 2014 03:37:04 +0000 (21:37 -0600)]
dm: ns16550: Use an address instead of a pointer for the uart base

It is inconvenient to have to use casts when specifying platform data. Also
it is not strictly correct, since we should use map_sysmem() to convert an
address to a pointer.

Adjust the platform data to use an address.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: serial: ns16550: Correct logic for checking for character
Simon Glass [Thu, 23 Oct 2014 03:37:03 +0000 (21:37 -0600)]
dm: serial: ns16550: Correct logic for checking for character

There is a bug in the logic which checks for an available character. This
can cause invalid characters to be received - this was noticed on
beaglebone. Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: serial: Reset the watchdog while waiting in getc()
Simon Glass [Thu, 23 Oct 2014 03:37:02 +0000 (21:37 -0600)]
dm: serial: Reset the watchdog while waiting in getc()

We have moved the busy-wait loop out of drivers and into the uclass. This
means that we must reset the watchdog when busy-waiting.

Note: some drivers may still have a busy-wait even with driver model, as
a transition mechanism. Driver model will tolerate this, and is can be
cleaned up when all users of the driver use driver model. An example is
ns16550.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agodm: gpio: Support numbered GPIOs
Simon Glass [Thu, 23 Oct 2014 03:37:01 +0000 (21:37 -0600)]
dm: gpio: Support numbered GPIOs

At present banks must be named and it is not possible to refer to GPIOs by
number in driver model. Some boards use numbering - e.g. OMAP. It is fairly
easy to support by detecting the absense of a bank name (which starts with
a letter).

Add support for numbered GPIOs in addition to the existing bank support.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@ti.com>
9 years agokbuild: clear VENDOR variable to fix build error on tcsh
Masahiro Yamada [Tue, 21 Oct 2014 04:18:32 +0000 (13:18 +0900)]
kbuild: clear VENDOR variable to fix build error on tcsh

Since the environment "VENDOR" is set in tcsh, it must be cleared in our
makefile.  Otherwise, boards without CONFIG_SYS_VENDOR fail to build:

  > make CROSS_COMPILE=arm-linux-gnueabi- wandboard_quad_defconfig all
    [ snip ]
    AR      arch/arm/lib/lib.a
    CC      arch/arm/lib/eabi_compat.o
  scripts/Makefile.build:55: /home/foo/u-boot/board/unknown/wandboard/ \
  Makefile: No such file or directory
  make[2]: *** No rule to make target `/home/foo/u-boot/board/unknown/ \
  wandboard/Makefile'.  Stop.
  make[1]: *** [board/unknown/wandboard] Error 2
  make: *** [__build_one_by_one] Error 2

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reported-by: Tom Everett <tom@khubla.com>
Reported-by: Jeroen Hofstee <jeroen@myspectrum.nl>
9 years agomusb: fix warning in include/linux/usb/musb.h
Igor Grinberg [Thu, 23 Oct 2014 11:25:25 +0000 (14:25 +0300)]
musb: fix warning in include/linux/usb/musb.h

Fix the following build warning by including linux/compat.h:
include/linux/usb/musb.h:110: warning: 'struct device' declared inside
parameter list
include/linux/usb/musb.h:110: warning: its scope is only this definition
or declaration, which is probably not what you want

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agoMerge branch 'master' of git://git.denx.de/u-boot-tegra
Tom Rini [Thu, 23 Oct 2014 18:05:34 +0000 (14:05 -0400)]
Merge branch 'master' of git://git.denx.de/u-boot-tegra

9 years agomips: enable CONFIG_USE_PRIVATE_LIBGCC by default
Masahiro Yamada [Thu, 23 Oct 2014 16:30:46 +0000 (01:30 +0900)]
mips: enable CONFIG_USE_PRIVATE_LIBGCC by default

Without the private libgcc, we need a full multilib toolchain with
different libgcc or multiple toolchains to build all BE/LE and
hard-float/soft-float variants of MIPS boards.  That is not feasible.

This commit allows us to build all the MIPS boards with a single
kernel.org toolchain:

https://www.kernel.org/pub/tools/crosstool/files/bin/x86_64/4.9.0/
x86_64-gcc-4.9.0-nolibc_mips-linux.tar.xz

This change sounds reasonable for most users.  If necessary,
you can disable this option via "make menuconfig" or friends.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Acked-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
9 years agokconfig: invoke silentoldconfig if spl, tpl/.config is updated
Masahiro Yamada [Thu, 23 Oct 2014 16:30:45 +0000 (01:30 +0900)]
kconfig: invoke silentoldconfig if spl, tpl/.config is updated

When spl/.config is updated by "make spl/menuconfig" or friends,
spl/include/config/auto.conf, spl/include/generated/autoconf.h
and some other files must be updated by "make silentoldconfig".

There is no hook for SPL in the top Makefile, so this commit
touches .config when spl/.config is updated to invoke silentoldconfig.
Likewise for TPL.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokbuild: fix a bug of the u-boot-spl link rule
Masahiro Yamada [Thu, 23 Oct 2014 16:30:44 +0000 (01:30 +0900)]
kbuild: fix a bug of the u-boot-spl link rule

cmd_u-boot-spl includes $(PLATFORM_LIBS) which changes
when CONFIG_USE_PRIVATE_GCC is updated.  The u-boot-spl image
should be re-linked if any prerequisite is newer than it
or the command line has changed.
$(call, if_changed,...) should be used instead of $(call cmd,...).

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
9 years agokconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 16:30:43 +0000 (01:30 +0900)]
kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig

The private libgcc is supported only on ARM, MIPS, PowerPC, SH, x86.
Those architectures should "select" HAVE_PRIVATE_LIBGCC and
CONFIG_USE_PRIVATE_LIBGCC should depend on it.

Currently, this option is enabled on Tegra boards and x86 architecture.
Move the definition from header files to Kconfig.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
Cc: Stephen Warren <swarren@nvidia.com>
Cc: Tom Warren <twarren@nvidia.com>
9 years agokbuild: drop CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax
Masahiro Yamada [Thu, 23 Oct 2014 16:30:42 +0000 (01:30 +0900)]
kbuild: drop CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax

Now CONFIG_USE_PRIVATE_LIBGCC is only used as a boolean macro.
Remove CONFIG_USE_PRIVATE_LIBGCC=path/to/libgcc syntax.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agox86: set CONFIG_USE_PRIVATE_LIBGCC to y
Masahiro Yamada [Thu, 23 Oct 2014 16:30:41 +0000 (01:30 +0900)]
x86: set CONFIG_USE_PRIVATE_LIBGCC to y

The motivation of this commit is to change CONFIG_USE_PRIVATE_LIBGCC
to a boolean macro so we can move it to Kconfig.

In the current implementation, there are two forms of syntax
for this macro:

  - CONFIG_USE_PRIVATE_LIBGCC=y
  - CONFIG_USE_PRIVATE_LIBGCC=path/to/private/libgcc

The latter is only used by x86 architecture.
With a little bit refactoring, it can be converted to the former.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Tested-by: Simon Glass <sjg@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
9 years agokconfig: move CONFIG_SYS_HZ to lib/Kconfig
Masahiro Yamada [Thu, 23 Oct 2014 16:30:40 +0000 (01:30 +0900)]
kconfig: move CONFIG_SYS_HZ to lib/Kconfig

CONFIG_SYS_HZ is always defined as 1000 in config_fallbacks.h
(but some boards still have redundant definitions).

This commit moves the definition and the document in README to
Kconfig.  Since lib/Kconfig can assure that CONFIG_SYS_HZ is 1000,
the sanity check in lib/time.c should be removed.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
Reviewed-by: Marek Vasut <marex@denx.de>
9 years agoomap3/am33xx: mux: fix several checkpatch issues
Igor Grinberg [Tue, 21 Oct 2014 15:25:30 +0000 (18:25 +0300)]
omap3/am33xx: mux: fix several checkpatch issues

Fix the following checkpatch issues:

CHECK: No space is necessary after a cast
\#39: FILE: arch/arm/include/asm/arch-am33xx/mux.h:39:
+#define PAD_CTRL_BASE  0x800
+#define OFFSET(x)      (unsigned int) (&((struct pad_signals *) \

CHECK: Avoid CamelCase: <CONTROL_PADCONF_JTAG_nTRST>
\#284: FILE: arch/arm/include/asm/arch-omap3/mux.h:284:
+#define CONTROL_PADCONF_JTAG_nTRST     0x0A1C

ERROR: space required after that ',' (ctx:VxV)
\#446: FILE: arch/arm/include/asm/arch-omap3/mux.h:446:
+#define MUX_VAL(OFFSET,VALUE)\
                       ^
Cc: Raphael Assenat <raph@8d.com>
Cc: Ilya Yanok <yanok@emcraft.com>
Cc: Vaibhav Hiremath <hvaibhav@ti.com>
Cc: Peter Barada <peter.barada@logicpd.com>
Cc: Grazvydas Ignotas <notasas@gmail.com>
Cc: Stefan Roese <sr@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Nagendra T S <nagendra@mistralsolutions.com>
Cc: Nishanth Menon <nm@ti.com>
Cc: Tom Rini <trini@ti.com>
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Acked-by: Stefan Roese <sr@denx.de>
9 years agoomap3: cm-t35: remove enable_gpmc_cs_config()
Igor Grinberg [Tue, 21 Oct 2014 13:39:47 +0000 (16:39 +0300)]
omap3: cm-t35: remove enable_gpmc_cs_config()

The gpmc_init() function already calls enable_gpmc_cs_config() for chip
select 0. Although the bus width is configured for 16 bit, it gets
reconfigured correctly in the omap_gpmc driver later.

Remove the enable_gpmc_cs_config() function call and the associated
gpmc_nand_config[] array.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agoomap3: cm-t35: use define for mmc wp gpio
Igor Grinberg [Tue, 21 Oct 2014 13:39:46 +0000 (16:39 +0300)]
omap3: cm-t35: use define for mmc wp gpio

Switch to using define for MMC WP GPIO instead of a magic number.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agoomap3: Kconfig: fix the cm-t35 board option prompt
Igor Grinberg [Tue, 21 Oct 2014 13:39:45 +0000 (16:39 +0300)]
omap3: Kconfig: fix the cm-t35 board option prompt

The cm-t35 board support covers both cm-t3530 and cm-t3730 boards.
Mention both boards in the Kconfig option prompt.

Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
9 years agoam335x_evm: Correct "raw" portions of DFU alt into
Tom Rini [Thu, 9 Oct 2014 15:01:16 +0000 (11:01 -0400)]
am335x_evm: Correct "raw" portions of DFU alt into

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoam335x_boneblack: Only modify NAND/NOR/MMC1 pinmux on BBB in boneblack builds.
Tom Rini [Wed, 8 Oct 2014 21:10:27 +0000 (17:10 -0400)]
am335x_boneblack: Only modify NAND/NOR/MMC1 pinmux on BBB in boneblack builds.

In the case of Beaglebone Black we only want to set the NAND or NOR cape
pinmux when the config has been specifically modified by the user for
this non-default case.  Make the default be to set the MMC1 (eMMC)
pinmux.  We don't need similar changes for Beaglebone White as there is
nothing on MMC1 by default there.

Signed-off-by: Tom Rini <trini@ti.com>
9 years agoarm: am43xx: switch over to CONFIG_ENV_IS_IN_FAT
Felipe Balbi [Tue, 23 Sep 2014 15:44:18 +0000 (10:44 -0500)]
arm: am43xx: switch over to CONFIG_ENV_IS_IN_FAT

By using CONFIG_ENV_IS_IN_FAT it's far easier
to have a private, minimal environment for e.g.
booting off of network or mounting rootfs on NFS
without having to modify the configuration header.

Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agocommon: Makefile: allow for spl builds with env_fat
Felipe Balbi [Tue, 23 Sep 2014 15:44:17 +0000 (10:44 -0500)]
common: Makefile: allow for spl builds with env_fat

If CONFIG_SPL_BUILD and CONFIG_ENV_IS_IN_FAT are
defined, u-boot spl will fail to build. Fix that.

Signed-off-by: Felipe Balbi <balbi@ti.com>
9 years agoomap3: overo: Add usb host support
Stefan Herbrechtsmeier [Tue, 16 Sep 2014 15:51:09 +0000 (17:51 +0200)]
omap3: overo: Add usb host support

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
9 years agoomap3: overo: Separate module and expansion board MUX configuration
Stefan Herbrechtsmeier [Tue, 16 Sep 2014 15:51:08 +0000 (17:51 +0200)]
omap3: overo: Separate module and expansion board MUX configuration

Separate overo module and expansion board MUX configuration. This allows
an foreign expansion board to use the boot loader without any adaption.
It only needs to save the expansion name in the EEPROM to load a
specific device tree.

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
9 years agoomap3: overo: Move ethernet setup to board_eth_init function
Stefan Herbrechtsmeier [Tue, 16 Sep 2014 15:51:07 +0000 (17:51 +0200)]
omap3: overo: Move ethernet setup to board_eth_init function

Move ethernet setup to the board_eth_init function and select
the available network devices via expansion id.

Signed-off-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>