]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 years agoARM: uniphier: refactor Support Card init code
Masahiro Yamada [Sun, 15 Jan 2017 05:59:06 +0000 (14:59 +0900)]
ARM: uniphier: refactor Support Card init code

Splitting reset assertion (support_card_reset) and deassertion
(support_card_init) is not adding much value any more.  Handle
all the initialization of Support Card in support_card_init(),
then remove support_card_reset().

Also, detect_num_flash_banks() can have a static qualifier.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: refactor SBC init code
Masahiro Yamada [Sun, 15 Jan 2017 05:59:05 +0000 (14:59 +0900)]
ARM: uniphier: refactor SBC init code

Merge sbc-admulti.c and sbc-savepin.c into a single file to avoid
code duplication.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: refactor MEMCONF init code
Masahiro Yamada [Sun, 15 Jan 2017 05:59:04 +0000 (14:59 +0900)]
ARM: uniphier: refactor MEMCONF init code

Currently, memconf-sld3.c and memconf-pxs2.c duplicate the code.

There are 3 patterns in terms of MEMCONF init:
  - DRAM 2 channels: LD4, sLD8, Pro4, Pro5, LD11
  - DRAM 3 channels: sLD3
  - DRAM 3 channels (Ch2 is disable by MEMCONF[21]): Pxs2, LD20

All of them can be moved into a single file by a little more
refactoring.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: split out UMC clock enable
Masahiro Yamada [Sun, 15 Jan 2017 05:59:03 +0000 (14:59 +0900)]
ARM: uniphier: split out UMC clock enable

The clock enable bits for UMC are more SoC-specific than for
the other hardware blocks.  Separate the UMC clocks and the other
clocks for better code reuse across SoCs.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: remove unneeded argument of uniphier_ld20_pll_init()
Masahiro Yamada [Sun, 15 Jan 2017 05:59:02 +0000 (14:59 +0900)]
ARM: uniphier: remove unneeded argument of uniphier_ld20_pll_init()

At first, we thought the LD20 PLL setting would be board dependent,
but this argument turned out unneeded after all.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: dts: uniphier: add UniPhier specific compatible to eMMC node
Masahiro Yamada [Wed, 4 Jan 2017 11:08:37 +0000 (20:08 +0900)]
ARM: dts: uniphier: add UniPhier specific compatible to eMMC node

The "cdns,sd4hc" is a fallback of the IP.  Add the SoC-specific
compatible string.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoARM: uniphier: enable Cadence eMMC controller for LD11/LD20
Masahiro Yamada [Wed, 4 Jan 2017 11:08:36 +0000 (20:08 +0900)]
ARM: uniphier: enable Cadence eMMC controller for LD11/LD20

Enable SDMA (Single Operation DMA) for LD11, but not for LD20.
The SDMA does not work for LD20 boards because they are generally
equipped with more memory than fits in the 32 bit physical address
space supported by the SDMA.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Sun, 15 Jan 2017 18:33:30 +0000 (13:33 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

7 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Sun, 15 Jan 2017 18:33:16 +0000 (13:33 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

7 years agospi: Zap cf_qspi driver and related code
Jagan Teki [Mon, 2 Jan 2017 22:29:04 +0000 (23:29 +0100)]
spi: Zap cf_qspi driver and related code

Dropped becuase
- driver not used any board.
- no dm conversion.

Cc: Angelo Dureghello <angelo@sysam.it>
Cc: Richard Retanubun <richardretanubun@ruggedcom.com>
Signed-off-by: Jagan Teki <jagan@openedev.com>
Acked-by: Angelo Dureghello <angelo@sysam.it>
7 years agosunxi: OrangePi Zero: defconfig: enable SPI flash
Andre Przywara [Sat, 14 Jan 2017 02:06:10 +0000 (02:06 +0000)]
sunxi: OrangePi Zero: defconfig: enable SPI flash

Newer OrangePi Zero boards all come with 16 Mib SPI flash soldered, from
which the board can actually boot from.
Enable the SPL support for the SPI controller and SPI flash to allow
putting the SPL, the DT and U-Boot proper into there. This will let
a board boot without an SD card inserted.
The flash chip can be written with a version of the sunxi-fel tool.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Priit Laes <plaes@plaes.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: dts: OrangePi Zero: add Ethernet node
Andre Przywara [Sat, 14 Jan 2017 02:06:09 +0000 (02:06 +0000)]
sunxi: dts: OrangePi Zero: add Ethernet node

The OrangePi Zero can happily use the EMAC along with its integrated
PHY to use Ethernet (for TFTP booting, for instance).
Add the emac node to the board .dts by copying it from the OrangePi One
DT.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: add orangepi zero defconfig
Icenowy Zheng [Fri, 16 Dec 2016 14:35:02 +0000 (22:35 +0800)]
sunxi: add orangepi zero defconfig

Orange Pi Zero is a board designed by Xunlong. It has an Allwinner H2+
SoC (similar to H3, which shares the same SoC ID), 256MB/512MB RAM,
Allwinner XR819 SDIO Wi-Fi, a MicroUSB port which is used to power the
board (also capable of OTG), a USB Type-A socket and a MicroSD slot.

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: add proper device tree for Orange Pi Zero boards
Icenowy Zheng [Fri, 16 Dec 2016 14:35:01 +0000 (22:35 +0800)]
sunxi: add proper device tree for Orange Pi Zero boards

Add a proper device tree file for Orange Pi Zero boards from Xunlong,
which come with a Allwinner H2+ SoC (similar to H3).

Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agosunxi: enable H3 EMAC for the nanopi neo
Jelle van der Waa [Mon, 5 Dec 2016 18:47:21 +0000 (19:47 +0100)]
sunxi: enable H3 EMAC for the nanopi neo

The nanopi already had the CONFIG_SUN8I_EMAC=y enabled in it's defconfig
file, but was missing the &emac the device tree entry.

Signed-off-by: Jelle van der Waa <jelle@vdwaa.nl>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
7 years agortc: pcf2127: Update Kconfig and code style
Meng Yi [Mon, 9 Jan 2017 18:24:51 +0000 (11:24 -0700)]
rtc: pcf2127: Update Kconfig and code style

Unfortunately version 2 of this patch was applied which was missing some
changes. Fix this.

Signed-off-by: Meng Yi <meng.yi@nxp.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoigep00x0: Remove IGEP0020_NAND BOARD entry from MAINTAINERS
Ladislav Michl [Mon, 9 Jan 2017 10:31:43 +0000 (11:31 +0100)]
igep00x0: Remove IGEP0020_NAND BOARD entry from MAINTAINERS

Boards with NAND and OneNAND are supported by single configuration,
thus remove now obsolete IGEP0020_NAND BOARD entry.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
7 years agoigep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS
Ladislav Michl [Mon, 9 Jan 2017 10:21:06 +0000 (11:21 +0100)]
igep00x0: enable CONFIG_FDT_FIXUP_PARTITIONS

SPL partition size depends on sector size and we want kernel to use
the same layout, so let U-Boot modify FDT accordingly.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
7 years agoomap-gpmc: use SECTOR_BYTES instead of hardcoded value
Ladislav Michl [Mon, 9 Jan 2017 10:15:14 +0000 (11:15 +0100)]
omap-gpmc: use SECTOR_BYTES instead of hardcoded value

Replace hardcoded value with defined constant SECTOR_BYTES.

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoomapl138_lcdk: remove empty ifdef block
Fabien Parent [Mon, 9 Jan 2017 10:06:38 +0000 (11:06 +0100)]
omapl138_lcdk: remove empty ifdef block

Small clean-up.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoomapl138_lcdk: enable SPL MMC support
Fabien Parent [Mon, 9 Jan 2017 10:06:37 +0000 (11:06 +0100)]
omapl138_lcdk: enable SPL MMC support

Enable SPL MMC support in order to allow to build a single u-boot image
that is able to boot from MMC and NAND devices.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodavinci: spl: use bootcfg to select boot device
Fabien Parent [Mon, 9 Jan 2017 10:06:36 +0000 (11:06 +0100)]
davinci: spl: use bootcfg to select boot device

Right now the SPL is trying to load u-boot based on defines, i.e. one
has to define CONFIG_SPL_NAND_SIMPLE to boot from NAND,
or CONFIG_SPL_SPI_LOAD to boot from SPI FLASH, etc...
This prevent us from having a single SPL image that is able to boot from
all media, and one need to build an image for each medium. This
commit is replacing the #ifdef that select the boot medium by reading
the value of the boot pins (via the BOOTCFG register).

Now a single SPL image will be able to read from the boot pin to know
which device should be used to load u-boot.

Signed-off-by: Fabien Parent <fparent@baylibre.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoAvoid non-portable sed construct
Mark Kettenis [Sun, 8 Jan 2017 18:11:27 +0000 (19:11 +0100)]
Avoid non-portable sed construct

Using \n in a substitution is a GNU extension.  Use the 'G" command instead
to insert the desired line.

Signed-off-by: Mark Kettenis <kettenis@openbsd.org>
7 years agoMakefile: Make EFI build quiet
Andrew F. Davis [Fri, 6 Jan 2017 22:23:59 +0000 (16:23 -0600)]
Makefile: Make EFI build quiet

Make building EFI example less noisy.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agomkimage: Add support for signing with pkcs11
George McCollister [Fri, 6 Jan 2017 19:14:17 +0000 (13:14 -0600)]
mkimage: Add support for signing with pkcs11

Add support for signing with the pkcs11 engine. This allows FIT images
to be signed with keys securely stored on a smartcard, hardware security
module, etc without exposing the keys.

Support for other engines can be added in the future by modifying
rsa_engine_get_pub_key() and rsa_engine_get_priv_key() to construct
correct key_id strings.

Signed-off-by: George McCollister <george.mccollister@gmail.com>
7 years agoti: am335x: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE
Emmanuel Vadot [Thu, 5 Jan 2017 03:16:36 +0000 (04:16 +0100)]
ti: am335x: mmc: Set CONFIG_SYS_MMC_MAX_DEVICE

Set CONFIG_SYS_MMC_MAX_DEVICE to 2 for am335x SoC.
This define is needed in the API code.

Signed-off-by: Emmanuel Vadot <manu@bidouilliste.com>
7 years agoARM: omap3_logic: Use DEFAULT_LINUX_BOOT_ENV from ti_armv7_common
Adam Ford [Wed, 4 Jan 2017 15:26:43 +0000 (09:26 -0600)]
ARM: omap3_logic: Use DEFAULT_LINUX_BOOT_ENV from ti_armv7_common

Since we're including ti_armv7_common, let's pull in DEFAULT_LINUX_BOOT_ENV
and remove unnecessary duplicative definitions.  This patch also renames a
few environmental variables to match what is inside ti_armv7_common. This
should help future-proof any subsequent memory or memory location changes.

Signed-off-by: Adam Ford <aford173@gmail.com>
7 years agolib: net_utils: enforce '.' as octet separator in string_to_ip
Chris Packham [Wed, 4 Jan 2017 00:36:26 +0000 (13:36 +1300)]
lib: net_utils: enforce '.' as octet separator in string_to_ip

Ensure '.' is used to separate octets. If another character is seen
reject the string outright and return 0.0.0.0.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
7 years agolib: net_utils: make string_to_ip stricter
Chris Packham [Wed, 4 Jan 2017 00:36:25 +0000 (13:36 +1300)]
lib: net_utils: make string_to_ip stricter

Previously values greater than 255 were implicitly truncated. Add some
stricter checking to reject addresses with components >255.

With the input "1234192.168.1.1" the old behaviour would truncate the
address to 192.168.1.1. New behaviour rejects the string outright and
returns 0.0.0.0, which for the purposes of IP addresses can be
considered an error.

Signed-off-by: Chris Packham <judge.packham@gmail.com>
7 years agoKconfig: Refactoring of top-level Kconfig file
Robert P. J. Day [Mon, 2 Jan 2017 21:32:13 +0000 (16:32 -0500)]
Kconfig: Refactoring of top-level Kconfig file

Some refactoring of the top-level Kconfig file which includes:

* using "if" to remove numerous identical dependency tests
* reordering config entries to group related ones
* spelling and grammar fixes

There should be no functional changes, only aesthetic ones.

Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>
7 years agoarmv8: release slave cores from CPU_RELEASE_ADDR
Oded Gabbay [Wed, 28 Dec 2016 11:38:35 +0000 (13:38 +0200)]
armv8: release slave cores from CPU_RELEASE_ADDR

When using ARMv8 with ARMV8_SPIN_TABLE=y, we want the slave cores to
wait on spin_table_cpu_release_addr, until the Linux kernel will "wake" them
by writing to that location. The address of spin_table_cpu_release_addr is
transferred to the kernel using the device tree that is updated by
spin_table_update_dt().

However, if we also use SPL, then the slave cores are stuck at
CPU_RELEASE_ADDR instead and as a result, never wake up.

This patch releases the slave cores by writing spl_image->entry_point to
CPU_RELEASE_ADDR location before the end of the SPL code
(at jump_to_image_no_args()).

That way, the slave cores will start to execute the u-boot and will get to
the spin-table code and wait on the correct address
(spin_table_cpu_release_addr).

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoiopoll: import include/linux/iopoll.h from Linux 4.9
Masahiro Yamada [Tue, 27 Dec 2016 15:36:03 +0000 (00:36 +0900)]
iopoll: import include/linux/iopoll.h from Linux 4.9

This was imported from Linux 4.9 and adjusted for U-Boot.

 - Replace the license block with SPDX
 - Drop all *_atomic variants, which make no sense for U-Boot
 - Remove the sleep_us argument, which makes no sense for U-Boot

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agotime: import time_after, time_before and friends from Linux
Masahiro Yamada [Tue, 27 Dec 2016 15:36:02 +0000 (00:36 +0900)]
time: import time_after, time_before and friends from Linux

It is not safe to compare timer values directly.

On 32-bit systems, for example, timer_get_us() wraps around every
72 min. (2 ^ 32 / 1000000 =~ 4295 sec =~ 72 min).  Depending on
the get_ticks() implementation, it may wrap more frequently.
The 72 min might be possible on the use of U-Boot.

Let's borrow time_after, time_before, and friends to solve the
wrap-around problem.

These macros were copied from include/linux/jiffies.h of Linux 4.9.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agotypecheck: import include/linux/typecheck.h from Linux 4.9
Masahiro Yamada [Tue, 27 Dec 2016 15:36:01 +0000 (00:36 +0900)]
typecheck: import include/linux/typecheck.h from Linux 4.9

Copied from Linux 4.9.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agotime: move timer APIs to include/time.h
Masahiro Yamada [Tue, 27 Dec 2016 15:36:00 +0000 (00:36 +0900)]
time: move timer APIs to include/time.h

The include/common.h is a collection of unrelated declarations,
macros, etc.

It is horrible to include such a cluttered header just for some
timer functions.  Split out timer functions into include/time.h.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodelay: collect {m, n, u}delay declarations to include/linux/delay.h
Masahiro Yamada [Tue, 27 Dec 2016 15:35:59 +0000 (00:35 +0900)]
delay: collect {m, n, u}delay declarations to include/linux/delay.h

Currently, mdelay() and udelay() are declared in include/common.h,
while ndelay() in include/linux/compat.h.  It would be nice to
collect them into include/linux/delay.h like Linux.

While we are here, fix the ndelay() implementation; I used the
DIV_ROUND_UP() instead of (x)/1000 because it must wait *longer*
than the given period of time.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoarmv8: fix #if around spin-table code in start.S
Oded Gabbay [Tue, 27 Dec 2016 09:19:43 +0000 (11:19 +0200)]
armv8: fix #if around spin-table code in start.S

Using CONFIG_IS_ENABLED() doesn't work in SPL. This patch replaces the only
occurrence of CONFIG_IS_ENABLED() in start.S to a regular #if defined().
It also adds "&& !defined(CONFIG_SPL_BUILD)" to that #if statement because
the spin-table code can't currently work in SPL, and the spin-table file
isn't even compiled in SPL.

Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
7 years agospl: move RAM boot support in separate file
Stefan Agner [Fri, 23 Dec 2016 06:51:53 +0000 (07:51 +0100)]
spl: move RAM boot support in separate file

Add a new top-level config option so support booting an image stored
in RAM. This allows to move the RAM boot support into a sparate file
and having a single condition to compile that file.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agoConvert CONFIG_SPL_RAM_DEVICE to defconfig
Stefan Agner [Fri, 23 Dec 2016 06:51:52 +0000 (07:51 +0100)]
Convert CONFIG_SPL_RAM_DEVICE to defconfig

This converts the following to Kconfig:
  CONFIG_SPL_RAM_DEVICE

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
7 years agoarm: omap-common: add secure ROM signature verify index for AM33xx
Andrew F. Davis [Wed, 11 Jan 2017 16:19:52 +0000 (10:19 -0600)]
arm: omap-common: add secure ROM signature verify index for AM33xx

On AM33xx devices the secure ROM uses a different call index for
signature verification, the function and arguments are the same.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agoti_armv7_common: env: Use FIT image configs by default
Andrew F. Davis [Wed, 11 Jan 2017 16:28:08 +0000 (10:28 -0600)]
ti_armv7_common: env: Use FIT image configs by default

This allows us to specify a FIT configuration that will automatically
use the correct images from the FIT blob.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agoMAINTAINERS: Add maintainer for TI security related files
Andrew F. Davis [Wed, 11 Jan 2017 17:09:27 +0000 (11:09 -0600)]
MAINTAINERS: Add maintainer for TI security related files

Changes involving High-Security boards should be CC'd for additional
assessment of the security implications.

Signed-off-by: Andrew F. Davis <afd@ti.com>
7 years agocmd: sata: fix init command return value
Gary Bisson [Wed, 11 Jan 2017 15:51:53 +0000 (16:51 +0100)]
cmd: sata: fix init command return value

Since commit aa6ab905b2, sata_initialize returns -1 if init_sata or
scan_sata fails. But this return value becomes the do_sata return
value which is equivalent to CMD_RET_USAGE.

In case one issues 'sata init' and that the hardware fails to
initialize, there's no need to display the command usage. Instead
the command shoud just return the CMD_RET_FAILURE value.

Fixes: aa6ab905b2 (sata: fix sata command can not being executed bug)
Signed-off-by: Gary Bisson <gary.bisson@boundarydevices.com>
Reviewed-by: Eric Nelson <eric@nelint.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoKconfig: CONFIG_OF_PLATDATA doesn't really exist
Tom Rini [Sat, 14 Jan 2017 17:20:23 +0000 (12:20 -0500)]
Kconfig: CONFIG_OF_PLATDATA doesn't really exist

There is no CONFIG_OF_PLATDATA, only CONFIG_SPL_OF_PLATDATA, so rename
the two references to CONFIG_OF_PLATDATA to CONFIG_SPL_OF_PLATDATA.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoarm: Re-sync asm/mach-types.h with Linux Kernel v4.9
Tom Rini [Tue, 10 Jan 2017 22:22:08 +0000 (17:22 -0500)]
arm: Re-sync asm/mach-types.h with Linux Kernel v4.9

This re-syncs the MACH_TYPE_xxx values from the Linux Kernel v4.9
release.  In addition this removes all of the machine_arch_type and
machine_is_xxx logic that is unused in U-Boot.  This removal removes a
large number of otherwise unused CONFIG values from the list to be
converted.

Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Adam Ford <aford173@gmail.com>
7 years agoarm: Remove unregister MACH_TYPE_xxx uses
Tom Rini [Tue, 10 Jan 2017 22:22:07 +0000 (17:22 -0500)]
arm: Remove unregister MACH_TYPE_xxx uses

Before we can sync with the latest mach-types.h file from the Linux
Kernel we need to remove some instances of MACH_TYPE_xxx from our
sources.  As these values have been removed from the canonical upstream
source we should not be using them either, so drop.

Cc: Tom Warren <twarren@nvidia.com>
Cc: Lucas Stach <dev@lynxeye.de>
Cc: Luka Perkov <luka@openwrt.org>
Cc: Stephen Warren <swarren@wwwdotorg.org>
Cc: Heiko Schocher <hs@denx.de>
Cc: Thomas Weber <weber@corscience.de>
Cc: Lucile Quirion <lucile.quirion@savoirfairelinux.com>
Cc: Matthias Weisser <weisserm@arcor.de>
Cc: Suriyan Ramasami <suriyan.r@gmail.com>
Cc: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Cc: Bo Shen <voice.shen@atmel.com>
Cc: Nick Thompson <nick.thompson@gefanuc.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Erik van Luijk <evanluijk@interact.nl>
Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoomap3_igep00x0: Rework MACH_TYPE and status LED logic slightly
Tom Rini [Tue, 10 Jan 2017 22:22:06 +0000 (17:22 -0500)]
omap3_igep00x0: Rework MACH_TYPE and status LED logic slightly

The MACH_TYPE for IGEP0032 was never officially used and has been
removed from upstream, so we must not use it.  In order to remove this
we need to rework the status LED logic.

Cc: Enric Balletbo i Serra <eballetbo@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Enric Balletbo i Serra <eballetbo@gmail.com>
7 years agoomap3_logic: Rework MACH_TYPE and fdtfile logic
Tom Rini [Tue, 10 Jan 2017 22:22:05 +0000 (17:22 -0500)]
omap3_logic: Rework MACH_TYPE and fdtfile logic

The MACH_TYPE values for the omap37xx based platforms are no longer
officially valid, so we must not set and pass them.  In order to not
reference them but still be able to set the default fdtfile based on the
board detection logic we need to combine the two steps into one.

Cc: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Adam Ford <aford173@gmail.com>
7 years agoMerge git://git.denx.de/u-boot-fdt
Tom Rini [Sat, 14 Jan 2017 17:16:43 +0000 (12:16 -0500)]
Merge git://git.denx.de/u-boot-fdt

7 years agocmd/fdt: Make fdt get value endian-safe for single-cell properties
Andreas Färber [Mon, 9 Jan 2017 15:08:02 +0000 (16:08 +0100)]
cmd/fdt: Make fdt get value endian-safe for single-cell properties

On a Raspberry Pi 2 disagreements on cell endianness can be observed:

  U-Boot> fdt print /soc/gpio@7e200000 phandle
  phandle = <0x0000000d>
  U-Boot> fdt get value myvar /soc/gpio@7e200000 phandle; printenv myvar
  myvar=0x0D000000

Fix this by always treating the pointer as BE and converting it in
fdt_value_setenv(), like its counterpart fdt_parse_prop() already does.

Consistently use fdt32_t, fdt32_to_cpu() and cpu_to_fdt32().

Fixes: bc80295 ("fdt: Add get commands to fdt")
Cc: Joe Hershberger <joe.hershberger@ni.com>
Cc: Gerald Van Baren <gvb@unssw.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agocmd: fdt: Print error message when fdt application fails
Stefan Agner [Tue, 20 Dec 2016 14:58:45 +0000 (15:58 +0100)]
cmd: fdt: Print error message when fdt application fails

There are lots of reason why a FDT application might fail, the
error code might give an indication. Let the error code translate
in a error string so users can try to understand what went wrong.

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agolibfdt: Correct fdt handling of overlays without fixups and base trees without symbols
David Gibson [Tue, 20 Dec 2016 14:58:44 +0000 (15:58 +0100)]
libfdt: Correct fdt handling of overlays without fixups and base trees without symbols

The fdt_overlay_apply() function purports to support the edge cases where
an overlay has no fixups to be applied, or a base tree which has no
symbols (the latter can only work if the former is also true).  However it
gets it wrong in a couple of small ways:

  * In the no fixups case, it doesn't fail immediately, but will attempt
    fdt_for_each_property_offset() giving -FDT_ERR_NOTFOUND as the node
    offset, which will fail.  Instead it should succeed immediately, since
    there's nothing to do.
  * In the case of no symbols, it again doesn't fail immediately.  However
    if there is an actual fixup it will fail with an unexpected error,
    because -FDT_ERR_NOTFOUND is passed to fdt_getprop() when attempting to
    look up the symbols.  We should instead return -FDT_ERR_NOTFOUND
    directly.

Both of these errors lead to the code returning misleading error codes in
failing cases.

[ DTC commit: 7d8ef6e1db9794f72805a0855f4f7f12fadd03d3 ]

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agospi: Zap ep93xx_spi driver and related code
Jagan Teki [Mon, 2 Jan 2017 22:29:03 +0000 (23:29 +0100)]
spi: Zap ep93xx_spi driver and related code

Dropped becuase
- driver and related configs not used any board.
- no dm conversion.

Cc: Heiko Schocher <hs@denx.de>
Cc: Sergey Kostanbaev <sergey.kostanbaev@gmail.com>
Signed-off-by: Jagan Teki <jagan@openedev.com>
7 years agoMerge branch 'master' of http://git.denx.de/u-boot-mmc
Tom Rini [Fri, 13 Jan 2017 14:17:21 +0000 (09:17 -0500)]
Merge branch 'master' of http://git.denx.de/u-boot-mmc

7 years agommc: sunxi: revive depends on UART0_PORT_F
Masahiro Yamada [Thu, 12 Jan 2017 03:16:15 +0000 (12:16 +0900)]
mmc: sunxi: revive depends on UART0_PORT_F

Commit f401e907fcbc ("ARM: sunxi: remove bare default for
CONFIG_MMC") dropped "depends on UART0_PORT_F", but it is still
needed.  Revive it as a prerequisite of CONFIG_MMC_SUNXI.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agommc: pic32_sdhci: rename {pci->pic}32_sdhci_get_cd
Masahiro Yamada [Fri, 13 Jan 2017 03:13:48 +0000 (12:13 +0900)]
mmc: pic32_sdhci: rename {pci->pic}32_sdhci_get_cd

I suspect this is a typo.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agommc: sdhci: fix NULL pointer access when host->ops is not set
Masahiro Yamada [Fri, 13 Jan 2017 02:51:51 +0000 (11:51 +0900)]
mmc: sdhci: fix NULL pointer access when host->ops is not set

Until recently, sdhci_ops was used only for overriding IO accessors.
(so, host->ops was not set by any drivers except bcm2835_sdhci.c)

Now, we have more optional callbacks, get_cd, set_control_reg, and
set_clock.  However, the code

    if (host->ops->get_cd)
            host->ops->get_cd(host);

... expects host->ops is set for all drivers.

Commit 5e96217f0434 ("mmc: pic32_sdhci: move the code to
pic32_sdhci.c") and commit 62226b68631b ("mmc: sdhci: move the
callback function into sdhci_ops") added sdhci_ops for pic32_sdhci.c
and s5p_sdhci.c, but the other drivers still do not (need not) set
host->ops because all callbacks in sdhci_ops are optional.

host->ops must be checked to avoid the system crash caused by NULL
pointer access.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agoMerge git://git.denx.de/u-boot-rockchip
Tom Rini [Fri, 13 Jan 2017 02:20:51 +0000 (21:20 -0500)]
Merge git://git.denx.de/u-boot-rockchip

7 years agocmd: mem: Use memcpy for 'cp' command
Fabio Estevam [Thu, 15 Dec 2016 18:00:13 +0000 (16:00 -0200)]
cmd: mem: Use memcpy for 'cp' command

Simplify the 'cp' command implementation by using the memcpy() function,
which brings the additional benefit of performance gain for those who have
CONFIG_USE_ARCH_MEMCPY selected.

Tested on a mx6qsabreauto board where a 5x gain in performance is seen
when reading 10MB from the parallel NOR memory.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
7 years agorockchip: Drop Ethernet from the TODO
Sjoerd Simons [Wed, 11 Jan 2017 10:46:17 +0000 (11:46 +0100)]
rockchip: Drop Ethernet from the TODO

Now that ethernet support works, it can be dropped from the rockchip
TODO

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Enable ETH address randomization for the rock2
Romain Perier [Wed, 11 Jan 2017 10:46:16 +0000 (11:46 +0100)]
rockchip: Enable ETH address randomization for the rock2

This commit enables ethernet MAC address randomization on the rock2. It
removes the error at startup 'ethernet@ff290000 address not set'.

Signed-off-by: Romain Perier <romain.perier@collabora.com>
7 years agorockchip: Add PXE and DHCP to the default boot targets
Sjoerd Simons [Wed, 11 Jan 2017 10:46:15 +0000 (11:46 +0100)]
rockchip: Add PXE and DHCP to the default boot targets

Now that at least on the firefly board we have network support, enable
PXE and DHCP boot targets by default.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agoEnable DISTRO_DEFAULTS for Rockchip platforms
Romain Perier [Wed, 11 Jan 2017 10:46:14 +0000 (11:46 +0100)]
Enable DISTRO_DEFAULTS for Rockchip platforms

This enables suitable commands needed for booting general purpose
Linux distribution. This is required for example if we want to use PXE
or DHCP as default boot targets, symbols no longer enabled by
config_distro_defaults.h .

Signed-off-by: Romain Perier <romain.perier@collabora.com>
7 years agorockchip: evb-rk3339: Enable DHCP
Simon Glass [Wed, 11 Jan 2017 10:46:13 +0000 (11:46 +0100)]
rockchip: evb-rk3339: Enable DHCP

This is the only RK3399 device without DHCP. Enable it so that we
can use a common BOOT_TARGET_DEVICES setting. It is likely useful to be
able to use USB networking, at least. Full networking can be enabled when
a suitable platform needs it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: Enable networking support on rock2 and firefly
Sjoerd Simons [Wed, 11 Jan 2017 10:46:12 +0000 (11:46 +0100)]
rockchip: Enable networking support on rock2 and firefly

Enable the various configuration option required to get the ethernet
interface up and running on Radxa Rock2 and Firefly.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: gmac_rockchip: Add Rockchip GMAC driver
Sjoerd Simons [Wed, 11 Jan 2017 10:46:11 +0000 (11:46 +0100)]
net: gmac_rockchip: Add Rockchip GMAC driver

Add a new driver for the GMAC ethernet interface present in Rockchip
RK3288 SOCs. This driver subclasses the generic design-ware driver to
add the glue needed specifically for Rockchip.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: designware: Export the operation functions
Simon Glass [Wed, 11 Jan 2017 10:46:10 +0000 (11:46 +0100)]
net: designware: Export the operation functions

Export all functions so that drivers can use them, or not, as the need
arises.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: designware: Split the link init into a separate function
Simon Glass [Wed, 11 Jan 2017 10:46:09 +0000 (11:46 +0100)]
net: designware: Split the link init into a separate function

With rockchip we need to make adjustments after the link speed is set but
before enabling received/transmit. In preparation for this, split these
two pieces into separate functions.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: designware: Adjust dw_adjust_link() to return an error
Simon Glass [Wed, 11 Jan 2017 10:46:08 +0000 (11:46 +0100)]
net: designware: Adjust dw_adjust_link() to return an error

This function can fail, so return the error if there is one.

Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agonet: designware: Export various functions/struct to allow subclassing
Sjoerd Simons [Wed, 11 Jan 2017 10:46:07 +0000 (11:46 +0100)]
net: designware: Export various functions/struct to allow subclassing

To allow other DM drivers to subclass the designware driver various
functions and structures need to be exported. Export these.

Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk>
Signed-off-by: Romain Perier <romain.perier@collabora.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
Acked-by: Joe Hershberger <joe.hershberger@ni.com>
7 years agorockchip: video: fix mpixelclock in rockchip HDMI
Nickey Yang Nickey Yang [Thu, 29 Dec 2016 06:01:26 +0000 (14:01 +0800)]
rockchip: video: fix mpixelclock in rockchip HDMI

Correct mpixelclock errors in rockchip_phy_config[] and rockchip_mpll_cfg[].

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
7 years agorockchip: rk3288: set isp/vop qos priority level
Nickey Yang Nickey Yang [Thu, 29 Dec 2016 02:47:30 +0000 (10:47 +0800)]
rockchip: rk3288: set isp/vop qos priority level

Isp-camera preview image will be broken when dual screen display mode.
This patch set isp/vop qos level higher to solve this problem.
We have verified this patch on rk3288-miniarm board.

Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
7 years agoarm64: rk3399: update rockchip_get_cru API
Kever Yang [Wed, 28 Dec 2016 09:48:26 +0000 (17:48 +0800)]
arm64: rk3399: update rockchip_get_cru API

rk3399 has two clock-controller: cru and pmucru, update the
rockchip_get_crui() API, and rockchip_get_clk() do not used for
other module.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
7 years agodts: arm64: rk3399: add max-frequency for sdhci
Kever Yang [Wed, 28 Dec 2016 03:32:36 +0000 (11:32 +0800)]
dts: arm64: rk3399: add max-frequency for sdhci

Add 'max-frequency' for sdhci node for clock init.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: rockchip_sdhci: add clock init for mmc
Kever Yang [Wed, 28 Dec 2016 03:32:35 +0000 (11:32 +0800)]
mmc: rockchip_sdhci: add clock init for mmc

Init the clock rate to max-frequency from dts with clock driver api.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agorockchip: Fix veyron-minnie's Kconfig description
Martin Michlmayr [Sun, 18 Dec 2016 01:40:26 +0000 (17:40 -0800)]
rockchip: Fix veyron-minnie's Kconfig description

The veyron-minnie Kconfig referred to jerry by mistake.

Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Acked-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: configs: make rk3036 env config same as rk3288
Jacob Chen [Fri, 18 Nov 2016 07:54:26 +0000 (15:54 +0800)]
rockchip: configs: make rk3036 env config same as rk3288

To make rockchip soc keep the same partition map

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agorockchip: configs: correct env offset when enable CONFIG_ROCKCHIP_SPL_BACK_TO_BROM
Jacob Chen [Fri, 18 Nov 2016 07:54:25 +0000 (15:54 +0800)]
rockchip: configs: correct env offset when enable CONFIG_ROCKCHIP_SPL_BACK_TO_BROM

With CONFIG_ROCKCHIP_SPL_BACK_TO_BROM enabled,
the environment is inside u-boot.
So solve it by moving environment after u-boot.

Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agorockchip: dts: popmetal: add usb host power supply node
Kever Yang [Thu, 24 Nov 2016 07:29:52 +0000 (15:29 +0800)]
rockchip: dts: popmetal: add usb host power supply node

The popmetal board using a HOST_VBUS_DRV gpio signal to control the
USB host port 5V power, add a fix regulator and pinctrl for it, and
enable the USB host1 controller with the vbus-supply.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Added rockchip: tag:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: config: popmetal: enable the USB host controller and function
Kever Yang [Thu, 24 Nov 2016 07:29:51 +0000 (15:29 +0800)]
rockchip: config: popmetal: enable the USB host controller and function

RK3288 using the dwc2 USB host controller, enable it and other usb host
funtion like storage and ether.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Added rockchip: tag:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agorockchip: board: popmetal: de-assert the host rst pin in board init
Kever Yang [Thu, 24 Nov 2016 07:29:50 +0000 (15:29 +0800)]
rockchip: board: popmetal: de-assert the host rst pin in board init

The PopMetal board have a on board FE1.1 usb 2.0 hub which connect to
the usb host port, we need to de-assert its reset pin to enable it.

Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Acked-by: Simon Glass <sjg@chromium.org>
Added rockchip: tag:
Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoSPL: Adjust more debug prints for ulong entry_point
Tom Rini [Wed, 11 Jan 2017 15:45:48 +0000 (10:45 -0500)]
SPL: Adjust more debug prints for ulong entry_point

With entry_point now being an unsigned long we need to adapt the last
two debug prints to use %lX not %X.

Fixes: 11e1479b9e67 ("SPL: make struct spl_image 64-bit safe")
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agopower_i2c.c: Fix unused variable warning
Tom Rini [Wed, 11 Jan 2017 14:16:05 +0000 (09:16 -0500)]
power_i2c.c: Fix unused variable warning

The variable ret was added but never set as we did not make calls to
other functions that we needed to check the return value on.

Fixes: 505cf4750ae5 ("power: change from meaningless value to error number")
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoMerge tag 'xilinx-for-v2017.03' of git://www.denx.de/git/u-boot-microblaze
Tom Rini [Wed, 11 Jan 2017 13:04:26 +0000 (08:04 -0500)]
Merge tag 'xilinx-for-v2017.03' of git://www.denx.de/git/u-boot-microblaze

Xilinx changes for v2017.03

- ATF handoff
- DT syncups
- gem: Use wait_for_bit(), add simple clk support
- Simple clk driver for ZynqMP
- Other small changes

7 years agoARM: sunxi: remove bare default for CONFIG_MMC
Masahiro Yamada [Tue, 10 Jan 2017 04:32:08 +0000 (13:32 +0900)]
ARM: sunxi: remove bare default for CONFIG_MMC

The bare default entry is wrong.  Just remove it since the (real)
entry in drivers/mmc/Kconfig has "default ARM || PPC || SANDBOX".

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agommc: move more driver config options to Kconfig
Masahiro Yamada [Tue, 10 Jan 2017 04:32:07 +0000 (13:32 +0900)]
mmc: move more driver config options to Kconfig

Move (and rename) the following CONFIG options to Kconfig:

  CONFIG_DAVINCI_MMC  (renamed to CONFIG_MMC_DAVINCI)
  CONFIG_OMAP_HSMMC   (renamed to CONFIG_MMC_OMAP_HS)
  CONFIG_MXC_MMC      (renamed to CONFIG_MMC_MXC)
  CONFIG_MXS_MMC      (renamed to CONFIG_MMC_MXS)
  CONFIG_TEGRA_MMC    (renamed to CONFIG_MMC_SDHCI_TEGRA)
  CONFIG_SUNXI_MMC    (renamed to CONFIG_MMC_SUNXI)

They are the same option names as used in Linux.

This commit was created as follows:

[1] Rename the options with the following command:

find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \
-type f -print | xargs sed -i -e '
s/CONFIG_DAVINCI_MMC/CONFIG_MMC_DAVINCI/g
s/CONFIG_OMAP_HSMMC/CONFIG_MMC_OMAP_HS/g
s/CONFIG_MXC_MMC/CONFIG_MMC_MXC/g
s/CONFIG_MXS_MMC/CONFIG_MMC_MXS/g
s/CONFIG_TEGRA_MMC/CONFIG_MMC_SDHCI_TEGRA/g
s/CONFIG_SUNXI_MMC/CONFIG_MMC_SUNXI/g
'

[2] Commit the changes

[3] Create entries in driver/mmc/Kconfig.
    (copied from Linux)

[4] Move the options with the following command
tools/moveconfig.py -y -r HEAD \
MMC_DAVINCI MMC_OMAP_HS MMC_MXC MMC_MXS MMC_SDHCI_TEGRA MMC_SUNXI

[5] Sort and align drivers/mmc/Makefile for readability

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoARM: davinci: remove unused CONFIG_DAVINCI_MMC_SD1
Masahiro Yamada [Tue, 10 Jan 2017 04:32:06 +0000 (13:32 +0900)]
ARM: davinci: remove unused CONFIG_DAVINCI_MMC_SD1

This CONFIG is not referenced from anywhere.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agommc: move DesignWare-based drivers to Kconfig
Masahiro Yamada [Tue, 10 Jan 2017 04:32:05 +0000 (13:32 +0900)]
mmc: move DesignWare-based drivers to Kconfig

Move (and rename) the following CONFIG options to Kconfig:

  CONFIG_EXYNOS_DWMMC  (renamed to CONFIG_MMC_DW_EXYNOS)
  CONFIG_HIKEY_DWMMC   (renamed to CONFIG_MMC_DW_K3)
  CONFIG_SOCFPGA_DWMMC (renamed to CONFIG_MMC_DW_SOCFPGA)

The "HIKEY" is a board name, so it is not suitable for the MMC
controller name.  I am following the name used in Linux.

This commit was generated as follows:

[1] Rename the config options with the following command:
find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \
-type f -print | xargs sed -i -e '
s/CONFIG_EXYNOS_DWMMC/CONFIG_MMC_DW_EXYNOS/g
s/CONFIG_HIKEY_DWMMC/CONFIG_MMC_DW_K3/g
s/CONFIG_SOCFPGA_DWMMC/CONFIG_MMC_DW_SOCFPGA/g
'

[2] Commit the changes

[3] Create the entries in drivers/mmc/Kconfig
    (with default y for EXYNOS and SOCFPGA)

[4] Run the following:
tools/moveconfig.py -y -r HEAD MMC_DW_EXYNOS MMC_DW_K3 MMC_DW_SOCFPGA

[5] Sort and align drivers/mmc/Makefile for readability

[6] Clean-up doc/README.socfpga by hand

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agommc: move CONFIG_DWMMC to Kconfig, renaming to CONFIG_MMC_DW
Masahiro Yamada [Tue, 10 Jan 2017 04:32:04 +0000 (13:32 +0900)]
mmc: move CONFIG_DWMMC to Kconfig, renaming to CONFIG_MMC_DW

This commit was created as follows:

[1] Rename the option with the following command:
find . -name .git -prune -o ! -path ./scripts/config_whitelist.txt \
-type f -print | xargs sed -i -e 's/CONFIG_DWMMC/CONFIG_MMC_DW/g'

[2] create the entry for MMC_DW in drivers/mmc/Kconfig
    (the prompt and help were copied from Linux)

[3] run "tools/moveconfig.py -y MMC_DW"

[4] add "depends on MMC_DW" to the MMC_DW_ROCKCHIP entry

[5] Clean-up doc/README.socfpga by hand

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agommc: rename CONFIG_ROCKCHIP_DWMMC to CONFIG_MMC_DW_ROCKCHIP
Masahiro Yamada [Tue, 10 Jan 2017 04:32:03 +0000 (13:32 +0900)]
mmc: rename CONFIG_ROCKCHIP_DWMMC to CONFIG_MMC_DW_ROCKCHIP

I am trying to make all DesignWare-based driver options prefixed
with CONFIG_MMC_DW_.

This commit was generated as follows:

find . -name .git -prune -o -type f -print | \
xargs sed -i -e 's/ROCKCHIP_DWMMC/MMC_DW_ROCKCHIP/g'

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agoARM: socfpga: remove unused CONFIG option and cleanup README.socfpga
Masahiro Yamada [Tue, 10 Jan 2017 04:32:02 +0000 (13:32 +0900)]
ARM: socfpga: remove unused CONFIG option and cleanup README.socfpga

CONFIG_SOCFPGA_DWMMC_FIFO_DEPTH is defined in the socfpga_common.h,
but not referenced at all.  Remove.

Also, clean-up the README.socfpga.  CONFIG_MMC should not be defined
in the header since it was moved to Kconfig by commit c27269953b94
("mmc: complete unfinished move of CONFIG_MMC").  I see no grep hit
for the others.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Marek Vasut <marex@denx.de>
7 years agopower: change from meaningless value to error number
Jaehoon Chung [Thu, 15 Dec 2016 11:49:50 +0000 (20:49 +0900)]
power: change from meaningless value to error number

'-1' is absolutely meaningless value.
This patch changed from meaningless value to error number.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agommc: uniphier-sd: fix Kconfig dependency
Masahiro Yamada [Fri, 30 Dec 2016 14:20:14 +0000 (23:20 +0900)]
mmc: uniphier-sd: fix Kconfig dependency

Some MMC drivers describe operations with the DM_MMC_OPS form, but
there are still several drivers with older implementation.  We can
not compile drivers from different groups at the same time because
the core framework is shared with #ifdef CONFIG_DM_MMC_OPS.

Every driver should have "depends on DM_MMC_OPS" (or !DM_MMC_OPS)
explicitly to express which framework it is based on.  This will
avoid enabling drivers with incompatible interface at the same time.
It is incorrect to make a driver "select DM_MMC_OPS".

While we are here, add "depends on OF_CONTROL" as well because this
driver can be configured only by Device Tree.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agommc: sdhci-cadence: add Cadence SD4HC support
Masahiro Yamada [Fri, 30 Dec 2016 13:41:46 +0000 (22:41 +0900)]
mmc: sdhci-cadence: add Cadence SD4HC support

Add a driver for the Cadence SD4HC SD/SDIO/eMMC Controller.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
7 years agommc: sdhci: combine the Host controller v3.0 feature into one condition
Jaehoon Chung [Fri, 30 Dec 2016 06:30:21 +0000 (15:30 +0900)]
mmc: sdhci: combine the Host controller v3.0 feature into one condition

It doesn't need to seperate the condition.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: sdhci: remove the SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER
Jaehoon Chung [Fri, 30 Dec 2016 06:30:20 +0000 (15:30 +0900)]
mmc: sdhci: remove the SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER

Ther is no usage anywhere. It doesn't need to maintain this bit.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: sdhci: use the bitops APIs in sdhci.h
Jaehoon Chung [Fri, 30 Dec 2016 06:30:19 +0000 (15:30 +0900)]
mmc: sdhci: use the bitops APIs in sdhci.h

The using the bitops is too easy controlling than now.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: sdhci: move the callback function into sdhci_ops
Jaehoon Chung [Fri, 30 Dec 2016 06:30:18 +0000 (15:30 +0900)]
mmc: sdhci: move the callback function into sdhci_ops

callback function should be moved into sdhci_ops struct.
Other controller can use these ops for controlling clock or their own
specific register.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: s5p_sdhci: add the s5p_set_clock function
Jaehoon Chung [Fri, 30 Dec 2016 06:30:17 +0000 (15:30 +0900)]
mmc: s5p_sdhci: add the s5p_set_clock function

Add the s5p_set_clock function.
It's not good that "set_mmc_clk" is assigned directly.
In future, it should be changed to use the clock framework.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
7 years agommc: change the set_ios return type from void to int
Jaehoon Chung [Fri, 30 Dec 2016 06:30:16 +0000 (15:30 +0900)]
mmc: change the set_ios return type from void to int

To maintain consistency, set_ios type of legacy mmc_ops changed to int.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>