]> git.dujemihanovic.xyz Git - u-boot.git/log
u-boot.git
7 years agoclk: rmobile: Add RCar Gen3 clock driver
Marek Vasut [Fri, 21 Jul 2017 21:18:03 +0000 (23:18 +0200)]
clk: rmobile: Add RCar Gen3 clock driver

Add clock driver for the RCar Gen3 R8A7795 and R8A7796 SoCs .
This driver allows reading out the clock configuration set by
previous boot stages and enabling and disabling clock using
the MSTP registers. Setting clock is not supported thus far.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Enable OF_CONTROL on RCar Gen3
Marek Vasut [Fri, 21 Jul 2017 21:17:00 +0000 (23:17 +0200)]
ARM: rmobile: Enable OF_CONTROL on RCar Gen3

Since the DTs are now in place, enable OF control so that they get
bundled into the U-Boot.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: dts: rmobile: Import DTS from Linux 4.12
Marek Vasut [Fri, 21 Jul 2017 21:16:59 +0000 (23:16 +0200)]
ARM: dts: rmobile: Import DTS from Linux 4.12

Import the RCar Gen3 DTS and headers from upstream Linux kernel v4.12-rc6,
commit 6f7da290413ba713f0cdd9ff1a2a9bb129ef4f6c . This includes both M3
and H3 ULCB and Salvator-X boards.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Increase console buffer sizes
Marek Vasut [Fri, 21 Jul 2017 21:16:08 +0000 (23:16 +0200)]
ARM: rmobile: Increase console buffer sizes

Allow pasting extra long lines into the U-Boot console on RCar Gen3.
This is OK since we have plenty of resources and it's convenient.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: ulcb: Add ULCB board support
Marek Vasut [Fri, 21 Jul 2017 21:15:21 +0000 (23:15 +0200)]
ARM: rmobile: ulcb: Add ULCB board support

Add initial support for the R8A7795 and R8A7796 based ULCB board.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoARM: rmobile: Add PFC PUEN bank 5 address
Marek Vasut [Fri, 21 Jul 2017 21:15:20 +0000 (23:15 +0200)]
ARM: rmobile: Add PFC PUEN bank 5 address

Add the PFC5 PUEN address and SSI SDATA4 bit offset into the
rcar-gen3-base.h .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
7 years agoMerge git://git.denx.de/u-boot-x86
Tom Rini [Tue, 1 Aug 2017 19:38:32 +0000 (15:38 -0400)]
Merge git://git.denx.de/u-boot-x86

7 years agoMerge git://git.denx.de/u-boot-mmc
Tom Rini [Tue, 1 Aug 2017 19:38:23 +0000 (15:38 -0400)]
Merge git://git.denx.de/u-boot-mmc

7 years agox86: Switch all boards to use DM SCSI
Bin Meng [Mon, 31 Jul 2017 02:24:02 +0000 (19:24 -0700)]
x86: Switch all boards to use DM SCSI

After MMC is converted to DM, convert to use DM SCSI as well for all
x86 boards and imply BLK for both MMC and SCSI drivers.

CONFIG_SCSI_DEV_LIST is no longer used. Clean them up.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Convert MMC to driver model
Simon Glass [Mon, 31 Jul 2017 02:24:01 +0000 (19:24 -0700)]
x86: Convert MMC to driver model

Convert the pci_mmc driver over to driver model and migrate all x86 boards
that use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
[bmeng: remove DM_MMC from edison_defconfig]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoblock: ide: Fix build error when CONFIG_BLK is on
Bin Meng [Mon, 31 Jul 2017 02:24:00 +0000 (19:24 -0700)]
block: ide: Fix build error when CONFIG_BLK is on

Add missing #ifndef CONFIG_BLK to wrap dev_desc->block_read.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agodm: scsi: Add a generic PCI-based AHCI driver
Bin Meng [Mon, 31 Jul 2017 02:23:59 +0000 (19:23 -0700)]
dm: scsi: Add a generic PCI-based AHCI driver

This adds support for PCI-based AHCI controller based on DM SCSI.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Tested-by: Simon Glass <sjg@chromium.org>
7 years agox86: ivybridge: remove unused uma_memory_size
xypron.glpk@gmx.de [Sun, 30 Jul 2017 19:17:26 +0000 (21:17 +0200)]
x86: ivybridge: remove unused uma_memory_size

The value of uma_memory_size depends on an undefined value
from the stack. The value of uma_memory_size is changed but
never used.

So simply remove this superfluous code.

The problem was indicated by cppcheck.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Convert INTEL_ICH6_GPIO to Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:28 +0000 (06:23 -0700)]
x86: Convert INTEL_ICH6_GPIO to Kconfig

This converts Intel ICH6 GPIO driver to Kconfig, and add it to the
imply list of platform drivers.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Move USB to platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:27 +0000 (06:23 -0700)]
x86: kconfig: Move USB to platform Kconfig

Like other peripheral drivers, move USB related drivers to platform
Kconfig as well.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Let board select SPI flash
Bin Meng [Sun, 30 Jul 2017 13:23:26 +0000 (06:23 -0700)]
x86: kconfig: Let board select SPI flash

Only a specific type of SPI flash exists on a board, having board
Kconfig to select the SPI flash seems to make more sense. Other
flash types are not necessary except coreboot, which implies all
available flash drivers there.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: qemu: Remove SPI flash from defconfigs
Bin Meng [Sun, 30 Jul 2017 13:23:25 +0000 (06:23 -0700)]
x86: qemu: Remove SPI flash from defconfigs

QEMU does not support ICH SPI controller yet. It's meaningless to
include SPI flash support.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: qemu: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:24 +0000 (06:23 -0700)]
x86: qemu: kconfig: Imply platform specific drivers

Imply Qemu-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: quark: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:23 +0000 (06:23 -0700)]
x86: quark: kconfig: Imply platform specific drivers

Imply Quark-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tangier: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:22 +0000 (06:23 -0700)]
x86: tangier: kconfig: Imply platform specific drivers

Imply Tangier-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: queensbay: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:21 +0000 (06:23 -0700)]
x86: queensbay: kconfig: Imply platform specific drivers

Imply drivers that work with Intel Queensbay platform.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: coreboot: kconfig: Imply drivers that are useful
Bin Meng [Sun, 30 Jul 2017 13:23:20 +0000 (06:23 -0700)]
x86: coreboot: kconfig: Imply drivers that are useful

U-Boot as coreboot payload can run on any x86 hardware ideally.
Let's imply some common drivers that are useful.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: broadwell: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:19 +0000 (06:23 -0700)]
x86: broadwell: kconfig: Imply platform specific drivers

Imply Broadwell-specific drivers in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: ivybridge: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:18 +0000 (06:23 -0700)]
x86: ivybridge: kconfig: Imply platform specific drivers

Imply drivers that are working with Ivybridge platform in the
platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: baytrail: kconfig: Imply platform specific drivers
Bin Meng [Sun, 30 Jul 2017 13:23:17 +0000 (06:23 -0700)]
x86: baytrail: kconfig: Imply platform specific drivers

BayTrail integrates lots of peripherals that have U-Boot drivers.
Imply those in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Imply DM uclass drivers
Bin Meng [Sun, 30 Jul 2017 13:23:16 +0000 (06:23 -0700)]
x86: kconfig: Imply DM uclass drivers

Now that all x86 boards have been converted to use DM, we can imply
these uclass drivers (DM_ETH, DM_RTC, DM_USB, DM_VIDEO) from the
top level.

Previously DM_GPIO, DM_KEYBOARD, DM_SERIAL, DM_SPI, DM_SPI_FLASH
are selected. Change to use 'imply' to allow them to be removed.

Note with this change, chromebook_link64 build fails:

common/built-in.o:(.data.env_htab+0xc): undefined reference to 'env_flags_validate'
lib/built-in.o: In function `hsearch_r':
lib/hashtable.c:380: undefined reference to 'env_callback_init'
lib/hashtable.c:382: undefined reference to 'env_flags_init'
make[1]: *** [spl/u-boot-spl] Error 1

CONFIG_SPL_ENV_SUPPORT is required for chromebook_link64 to build
again. This is just a workaround as it is not needed at all. See
commit bda40d5 "x86: qemu: Add a config for 64-bit U-Boot" for
the same issue seen on QEMU 64-bit target.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select OF_CONTROL
Bin Meng [Sun, 30 Jul 2017 13:23:15 +0000 (06:23 -0700)]
x86: kconfig: Select OF_CONTROL

This is a must have for all x86 boards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Imply ENABLE_MRC_CACHE in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:14 +0000 (06:23 -0700)]
x86: kconfig: Imply ENABLE_MRC_CACHE in the platform Kconfig

Platform knows whether MRC cache is implemented, but using it can
be a choice of a specific board.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:13 +0000 (06:23 -0700)]
x86: kconfig: Select ARCH_EARLY_INIT_R in the platform Kconfig

This is architecture-dependent early initialization hence should
be put in the platform Kconfig.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select ARCH_MISC_INIT in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:12 +0000 (06:23 -0700)]
x86: kconfig: Select ARCH_MISC_INIT in the platform Kconfig

arch_misc_init() is intended to do architecture-dependent stuff.
This is required by each platform.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Let board select BOARD_EARLY_INIT_F
Bin Meng [Sun, 30 Jul 2017 13:23:11 +0000 (06:23 -0700)]
x86: kconfig: Let board select BOARD_EARLY_INIT_F

CONFIG_BOARD_EARLY_INIT_F literally indicates board-specific codes
and should be not 'default y' for all x86 boards.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Imply HAVE_INTEL_ME in the platform Kconfig
Bin Meng [Sun, 30 Jul 2017 13:23:10 +0000 (06:23 -0700)]
x86: kconfig: Imply HAVE_INTEL_ME in the platform Kconfig

Intel Management Engine is required by the platform, however it's
not a must have when building a U-Boot image. For example, during
development normally programming ME firmware is a one-time effort.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select PCI and DM_PCI
Bin Meng [Sun, 30 Jul 2017 13:23:09 +0000 (06:23 -0700)]
x86: kconfig: Select PCI and DM_PCI

PCI is the de facto interconnect bus in an x86 system.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select USE_PRIVATE_LIBGCC
Bin Meng [Sun, 30 Jul 2017 13:23:08 +0000 (06:23 -0700)]
x86: kconfig: Select USE_PRIVATE_LIBGCC

x86 is using the built-in libgcc implementation and this cannot be
turned off.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: kconfig: Select TIMER and X86_TSC_TIMER
Bin Meng [Sun, 30 Jul 2017 13:23:07 +0000 (06:23 -0700)]
x86: kconfig: Select TIMER and X86_TSC_TIMER

Without a timer, U-Boot just doesn't boot. This is not something
we can turn off.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Make table address selectable
Andy Shevchenko [Fri, 28 Jul 2017 17:02:15 +0000 (20:02 +0300)]
x86: Make table address selectable

Some firmwares might have another window for generated tables.

So, introduce two configuration options to select start address and
maximum length for the generated tables.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: tsc: Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr()
Bin Meng [Wed, 26 Jul 2017 03:12:05 +0000 (20:12 -0700)]
x86: tsc: Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr()

Rename try_msr_calibrate_tsc() to cpu_mhz_from_msr(), as that
better describes what the routine does.

This keeps in sync with Linux kernel commit:
  02c0cd2: x86/tsc_msr: Remove irqoff around MSR-based TSC enumeration

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Correct Silvermont reference clock values
Bin Meng [Wed, 26 Jul 2017 03:12:04 +0000 (20:12 -0700)]
x86: tsc: Correct Silvermont reference clock values

Atom processors use a 19.2 MHz crystal oscillator.

Early processors generate 100 MHz via 19.2 MHz * 26 / 5 = 99.84 MHz.

Later processors generate 100 MHz via 19.2 MHz * 125 / 24 = 100 MHz.

Update the Silvermont-based tables accordingly, matching the Software
Developers Manual.

Also, correct a 166 MHz entry that should have been 116 MHz, and add
a missing 80 MHz entry for VLV2.

This keeps in sync with Linux kernel commit:
  05680e7: x86/tsc_msr: Correct Silvermont reference clock values

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Update comments and expand definitions in freq_desc_tables[]
Bin Meng [Wed, 26 Jul 2017 03:12:03 +0000 (20:12 -0700)]
x86: tsc: Update comments and expand definitions in freq_desc_tables[]

Some processor abbreviations in the comments of freq_desc_tables[]
are obscure. This updates part of these to mention processors
that are known to us. Also expand frequency definitions.

This keeps in sync with Linux kernel commit:
  9e0cae9: x86/tsc_msr: Update comments, expand definitions

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Remove the fail handling in try_msr_calibrate_tsc()
Bin Meng [Wed, 26 Jul 2017 03:12:02 +0000 (20:12 -0700)]
x86: tsc: Remove the fail handling in try_msr_calibrate_tsc()

If either ratio or freq is zero, the return value is zero. There
is no need to create a fail branch and return zero there.

This keeps in sync with Linux kernel commit:
  14bb4e3: x86/tsc_msr: Remove debugging messages

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Identify Intel-specific code
Bin Meng [Wed, 26 Jul 2017 03:12:01 +0000 (20:12 -0700)]
x86: tsc: Identify Intel-specific code

try_msr_calibrate_tsc() is currently Intel-specific, and should not
execute on any other vendor's parts.

This keeps in sync with Linux kernel commit:
  ba82683: x86/tsc_msr: Identify Intel-specific code

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: tsc: Read all ratio bits from MSR_PLATFORM_INFO
Bin Meng [Wed, 26 Jul 2017 03:12:00 +0000 (20:12 -0700)]
x86: tsc: Read all ratio bits from MSR_PLATFORM_INFO

Currently we read the tsc radio like this:

ratio = (MSR_PLATFORM_INFO >> 8) & 0x1f;

Thus we get bit 8-12 of MSR_PLATFORM_INFO, however according to the
Intel manual, the ratio bits are bit 8-15.

Fix this problem by masking 0xff instead.

This keeps in sync with Linux kernel commit:
  886123f: x86/tsc: Read all ratio bits from MSR_PLATFORM_INFO

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Enforce toolchain to generate 64-bit codes for 64-bit U-Boot
Bin Meng [Thu, 27 Jul 2017 13:12:35 +0000 (06:12 -0700)]
x86: Enforce toolchain to generate 64-bit codes for 64-bit U-Boot

64-bit U-Boot image is a combination of 32-bit U-Boot (SPL) plus
64-bit U-Boot (proper). For the U-Boot proper, it has be compiled
to 64-bit object codes. Attempting to use a toolchain to compile
64-bit U-Boot for qemu-x86_64, like kernel.org 4.9 i386-linux-gcc,
fails with the following errors:

  arch/x86/cpu/intel_common/microcode.c:79:2: error: PIC register
  clobbered by 'ebx' in 'asm'

The issue is because toolchain is preconfigured to generate code
for the 32-bit architecture (i386), and currently '-m64' is missing
in the makefile fragment. Using kernel.org 4.9 x86_64-linux-gcc
works out of the box, since it is preconfigured to generate 64-bit
codes.

When compiling U-Boot SPL, '-m32' is passed to the toolchain, no
mater 32-bit (i386-linux-) or 64-bit (x86_64-linux) the toolchain
is preconfigured to generate.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agox86: Use default stack boundary alignment
Bin Meng [Thu, 27 Jul 2017 13:12:34 +0000 (06:12 -0700)]
x86: Use default stack boundary alignment

At present U-Boot x86 build is using -mpreferred-stack-boundary=2
which is 4 bytes stack boundary alignment. With 64-bit U-Boot, the
minimal required stack boundary alignment is 16 bytes.

If -mpreferred-stack-boundary is not specified, the default is 4
(16 bytes). Switch to use the default one.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoregulator: palmas: disable bypass when the LDO is enabled
Jean-Jacques Hiblot [Wed, 12 Jul 2017 09:42:47 +0000 (11:42 +0200)]
regulator: palmas: disable bypass when the LDO is enabled

Some LDOs have a bypass capability. Make sure that the bypass is disabled
when is the LDO is enabled (otherwise the voltage can't be changed).

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoregulator: palmas: Add support for LDO1 regulator to provide 1.8V
Kishon Vijay Abraham I [Wed, 12 Jul 2017 09:42:46 +0000 (11:42 +0200)]
regulator: palmas: Add support for LDO1 regulator to provide 1.8V

Modify palmas_mmc1_poweron_ldo() API to set the voltage based on the
voltage parameter passed as argument instead of always setting it to
3.0V. This allows MMC1 to set the LDO1 regulator voltage to 3.3V or 1.8V.
1.8V is required to add support for UHS mode.

Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agodm: sunxi: Move Linksprite_pcDuino3 to use DM for MMC, SATA
Simon Glass [Tue, 4 Jul 2017 19:31:32 +0000 (13:31 -0600)]
dm: sunxi: Move Linksprite_pcDuino3 to use DM for MMC, SATA

Move this board over to driver model for MMC and SATA. This means that it
uses CONFIG_BLK as well. In SPL these options remain turned off since it
increases the code size. One option would be to use CONFIG_SPL_OF_PLATDATA
to avoid device-tree overhead.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: sata: sunxi: Add support for driver model
Simon Glass [Tue, 4 Jul 2017 19:31:31 +0000 (13:31 -0600)]
dm: sata: sunxi: Add support for driver model

Adjust SATA setup to support driver model.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: sunxi: sata: Don't build sata support into SPL
Simon Glass [Tue, 4 Jul 2017 19:31:30 +0000 (13:31 -0600)]
dm: sunxi: sata: Don't build sata support into SPL

This is not used in SPL so we do not need to compile it. Make this change
before adding driver-model support to the driver, to avoid build errors.
With driver model we define a U_BOOT_DRIVER() which would otherwise be
present in SPL and not be garbage-collected when building.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: sunxi: Linksprite_pcDuino3: Correct polarity of MMC card detect
Simon Glass [Tue, 4 Jul 2017 19:31:28 +0000 (13:31 -0600)]
dm: sunxi: Linksprite_pcDuino3: Correct polarity of MMC card detect

This is shown as active high in the schematics[1], so fix it.

[1] https://patchwork.ozlabs.org/patch/777890/

Signed-off-by: Simon Glass <sjg@chromium.org>
Reported-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: mmc: sunxi: Add support for driver model
Simon Glass [Tue, 4 Jul 2017 19:31:27 +0000 (13:31 -0600)]
dm: mmc: sunxi: Add support for driver model

Add a driver-model version of this driver which mostly uses the existing
code. The old code can be removed once all boards are switched over.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: mmc: sunxi: Drop mmc_clk_io_on()
Simon Glass [Tue, 4 Jul 2017 19:31:26 +0000 (13:31 -0600)]
dm: mmc: sunxi: Drop mmc_clk_io_on()

This function has #ifdefs in it which we want to avoid for driver model.
Instead we should use different compatible strings and the .data field.
It also uses the MMC device number which is not available in driver
model except through aliases.

Move the function's into its caller so that the driver-model version can
do things its own way.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: mmc: sunxi: Pass private data around explicitly
Simon Glass [Tue, 4 Jul 2017 19:31:25 +0000 (13:31 -0600)]
dm: mmc: sunxi: Pass private data around explicitly

At present the driver-private data is obtained in various functions by
various means. With driver model this is provided automatically. Without
driver model it comes from a C array declared at the top of the file.

Adjust internal functions so that they are passed the private data as
a parameter, allowing the caller to obtain it using either means.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: mmc: sunxi: Rename mmchost to priv
Simon Glass [Tue, 4 Jul 2017 19:31:24 +0000 (13:31 -0600)]
dm: mmc: sunxi: Rename mmchost to priv

Use the driver-model naming convention for this structure. It is data
private to the driver so the local variable should be called 'priv'.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: mmc: sunxi: Rename struct sunxi_mmc_host to sunxi_mmc_priv
Simon Glass [Tue, 4 Jul 2017 19:31:23 +0000 (13:31 -0600)]
dm: mmc: sunxi: Rename struct sunxi_mmc_host to sunxi_mmc_priv

Use the driver-model naming convention for this structure. It is data
private to the driver.

Signed-off-by: Simon Glass <sjg@chromium.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
7 years agodm: ahci: Correct uclass private data
Simon Glass [Tue, 4 Jul 2017 19:31:22 +0000 (13:31 -0600)]
dm: ahci: Correct uclass private data

This is expected to be attached to the uclass and the code operates that
way, but the uclass has not been updated. Fix it to avoid using memory at
address 0.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 47fc61a (dm: ahci: Drop use of probe_ent)
7 years agodm: scsi: Drop duplicate SCSI and DM_SCSI options
Simon Glass [Tue, 4 Jul 2017 19:31:21 +0000 (13:31 -0600)]
dm: scsi: Drop duplicate SCSI and DM_SCSI options

When the SATA code was moved into drivers/ata these Kconfig options were
added to that directory. They already exist in drivers/scsi. Remove them
from drivers/ata to fix the duplication.

Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: 7f2b5f4 (sata: Move drivers into new drivers/ata directory)
7 years agofdt: Correct fdt_get_base_address()
Simon Glass [Tue, 4 Jul 2017 19:31:20 +0000 (13:31 -0600)]
fdt: Correct fdt_get_base_address()

This function appears to obtain the value of the 'ranges' property rather
than 'reg'. As such it does not behave as documented or expected.

In addition it picks up the second field of the property which is the size
(with prop += naddr) rather than the first which is the address.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agodm: mmc: Allow disabling driver model in SPL
Simon Glass [Tue, 4 Jul 2017 19:31:19 +0000 (13:31 -0600)]
dm: mmc: Allow disabling driver model in SPL

At present if U-Boot proper uses driver model for MMC, then SPL has to
also. While this is desirable, it places a significant barrier to moving
to driver model in some cases. For example, with a space-constrained SPL
it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves
adjusting some drivers.

Add new SPL versions of the options for DM_MMC, DM_MMC_OPS and BLK. By
default these follow their non-SPL versions, but this can be changed by
boards which need it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoahci: Support non-PCI controllers
Simon Glass [Tue, 4 Jul 2017 19:31:18 +0000 (13:31 -0600)]
ahci: Support non-PCI controllers

At present the AHCI SCSI driver only supports PCI with driver model.
Rename the existing function to indicate this and add support for adding
a non-PCI controller .

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoPrepare v2017.09-rc1
Tom Rini [Tue, 1 Aug 2017 00:37:25 +0000 (20:37 -0400)]
Prepare v2017.09-rc1

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: Resync with savedefconfig
Tom Rini [Mon, 31 Jul 2017 22:59:01 +0000 (18:59 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoconfigs: Migrate CMD_NAND*
Tom Rini [Sat, 29 Jul 2017 01:31:42 +0000 (21:31 -0400)]
configs: Migrate CMD_NAND*

Migrate all remaining instances of CMD_NAND, CMD_NAND_TRIMFFS
CMD_NAND_LOCK_UNLOCK and CMD_NAND_TORTURE from the headers into the
defconfig files.

Tested-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agodm: console: Check for serial devices properly
Simon Glass [Thu, 27 Jul 2017 15:31:04 +0000 (09:31 -0600)]
dm: console: Check for serial devices properly

With driver model the serial device is often not called "serial". Mark
driver-model stdio devices so that they can be detected and we can look up
the uclass. This is a more reliable way of finding out whether the console
is connected to a serial device or not.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoconsole: Unify the check for a serial console
Simon Glass [Thu, 27 Jul 2017 15:31:03 +0000 (09:31 -0600)]
console: Unify the check for a serial console

Put the check for whether a console is a serial device in a function so
that we can share the code in the two places that use it.

Signed-off-by: Simon Glass <sjg@chromium.org>
7 years agoarm: mach-omap2: Align image address before cache operations
Andrew F. Davis [Wed, 26 Jul 2017 19:53:19 +0000 (14:53 -0500)]
arm: mach-omap2: Align image address before cache operations

The image address passed to secure_boot_verify_image() may not be
cacheline aligned, round the address down to the nearest cacheline.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
7 years agoti: Default to ENV_IS_IN_FAT if MMC_OMAP_HS
Tom Rini [Wed, 26 Jul 2017 17:11:37 +0000 (13:11 -0400)]
ti: Default to ENV_IS_IN_FAT if MMC_OMAP_HS

When we have MMC available we assume that we want to put the env as a
file on FAT.

Cc: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoam335x_hs_evm: Disable CONFIG_SPL_ENV_SUPPORT
Tom Rini [Wed, 26 Jul 2017 17:11:36 +0000 (13:11 -0400)]
am335x_hs_evm: Disable CONFIG_SPL_ENV_SUPPORT

The main uses of CONFIG_SPL_ENV_SUPPORT are for network support and for
disabling "Falcon Mode" support at run-time.  As this build enables
neither, remove this feature.

Cc: Andrew F. Davis <afd@ti.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
7 years agoenv: Migrate CONFIG_ENV_IS_IN_FAT options to Kconfig
Tom Rini [Thu, 27 Jul 2017 01:48:00 +0000 (21:48 -0400)]
env: Migrate CONFIG_ENV_IS_IN_FAT options to Kconfig

We rename the various FAT_ENV_xxx options to CONFIG_ENV_FAT_xxx so that
they can be modified via Kconfig.  Migrate all existing users to the new
values.

Signed-off-by: Tom Rini <trini@konsulko.com>
7 years agoRemove unused CONFIG_TWL4030_PWM
Adam Ford [Wed, 26 Jul 2017 15:04:40 +0000 (10:04 -0500)]
Remove unused CONFIG_TWL4030_PWM

CONFIG_TWL4030_PWM is not being used by any source, so let's remove the #define
and the whitelist entry

Signed-off-by: Adam Ford <aford173@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
7 years agoserial: stm32x7: Convert CONFIG_STM32X7_SERIAL to Kconfig
Patrice Chotard [Wed, 26 Jul 2017 13:48:39 +0000 (15:48 +0200)]
serial: stm32x7: Convert CONFIG_STM32X7_SERIAL to Kconfig

Add CONFIG_STM32X7_SERIAL as a Kconfig option.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Vikas Manocha <vikas.manocha@st.com>
7 years agodm: Kconfig: fix typo in help for SPL_PINCTRL
Philipp Tomsich [Wed, 26 Jul 2017 10:27:42 +0000 (12:27 +0200)]
dm: Kconfig: fix typo in help for SPL_PINCTRL

Changes 'controlloers' to 'controllers' in the help-text for
SPL_PINCTRL.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
7 years agoefi_loader: Fix warning in efi_gop
Alexander Graf [Mon, 31 Jul 2017 07:15:57 +0000 (09:15 +0200)]
efi_loader: Fix warning in efi_gop

Commit ca9193d2b16 ("efi_loader: gop: fixes for CONFIG_DM_VIDEO without
CONFIG_LCD") dropped the explicit (void*) cast for fb_base in efi gop support
for CONFIG_LCD without DM. This patch adds it back, eliminating the now occuring
warning again

Fixes: ca9193d2b16 ("efi_loader: gop: fixes for CONFIG_DM_VIDEO without CONFIG_LCD")
Reported-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoMerge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Tom Rini [Mon, 31 Jul 2017 11:27:45 +0000 (07:27 -0400)]
Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot

Patch queue for efi - 2017-07-29

A lot of EFI greatness this time around. Thanks a lot to the
two amazing new contributors

  Heinrich Schuchardt and
  Rob Clark

we now gain

  - stable objects across multiple bootefi invocations
  - fixes for shim
  - fixes for ipxe
  - protocol installation
  - device path conversion to/from text
  - working "lsefi" support in grub
  - working notifiers
  - various bug fixes

7 years agox86: minnowmax: Remove CONFIG_SMSC_LPC47M
Bin Meng [Sat, 22 Jul 2017 14:39:38 +0000 (07:39 -0700)]
x86: minnowmax: Remove CONFIG_SMSC_LPC47M

There is no SMSC LPC47M Super I/O chipset on the MinnowMax board.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: acpi: Don't touch hardware on HW reduced platforms
Andy Shevchenko [Fri, 21 Jul 2017 19:32:06 +0000 (22:32 +0300)]
x86: acpi: Don't touch hardware on HW reduced platforms

If ACPI HW reduced bit in FADT is set we should ignore any ACPI hardware
communications.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: acpi: Export acpi_fill_mcfg() with __weak attribute
Andy Shevchenko [Fri, 21 Jul 2017 19:32:05 +0000 (22:32 +0300)]
x86: acpi: Export acpi_fill_mcfg() with __weak attribute

Some platforms might require different approach when filling memory
mappings configuration table.

Allow them to override the common method.

At the same time export acpi_create_mcfg_mmconfig().

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: acpi: Deduplicate acpi_fill_madt() implementation
Andy Shevchenko [Fri, 21 Jul 2017 19:32:04 +0000 (22:32 +0300)]
x86: acpi: Deduplicate acpi_fill_madt() implementation

In Baytrail and Quark support code acpi_fill_madt() is identical.

Deduplicate its implementation by moving to lib/acpi_tables.c.

At the same time mark acpi_fill_madt() with __weak attribute to keep a
possibility to override it in platform code

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: acpi: Name fields in FADT in accordance with specification
Andy Shevchenko [Fri, 21 Jul 2017 19:32:03 +0000 (22:32 +0300)]
x86: acpi: Name fields in FADT in accordance with specification

ACPI specification defines FADT fields marked as reserved in U-Boot.

Name these fields in accordance with ACPI specification.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: acpi: Fill OEM revision
Andy Shevchenko [Fri, 21 Jul 2017 19:32:02 +0000 (22:32 +0300)]
x86: acpi: Fill OEM revision

Fill OEM revision field in the tables by U-Boot build date.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoMakefile: Export build date as integer
Andy Shevchenko [Fri, 21 Jul 2017 19:32:01 +0000 (22:32 +0300)]
Makefile: Export build date as integer

In some cases we would need build date as integer value.
Export U_BOOT_BUILD_DATE as %Y%m%d integer value.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoMakefile: Don't shadow actual error when compile ASL
Andy Shevchenko [Fri, 21 Jul 2017 19:32:00 +0000 (22:32 +0300)]
Makefile: Don't shadow actual error when compile ASL

If ASL compiler failed by any reason do not produce output C file.
Otherwise sequential run of make will shadow the actual error in ASL,
i.e.

  CC      board/intel/edison/dsdt.o
board/intel/edison/dsdt.c:1:1: error: unterminated comment
 /*

and user has to remove dsdt.c and run make in order to see the error again.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Tested-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: conga-qeval20-qa3-e3845.dts: Enable xHCI support in dts
Stefan Roese [Tue, 18 Jul 2017 12:10:50 +0000 (14:10 +0200)]
x86: conga-qeval20-qa3-e3845.dts: Enable xHCI support in dts

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: dfi-bt700: Add xHCI USB support
Stefan Roese [Tue, 18 Jul 2017 12:10:49 +0000 (14:10 +0200)]
x86: dfi-bt700: Add xHCI USB support

Change from EHCI to xHCI on the DFI BayTrail SoM.

The xHCI USB hub is connected to an GPIO on the DFI BayTrail SoM. For
correct operation, it needs to get reset upon power-up. Otherwise it
may happen that the hub is not detected after a software reboot. This
patch also configures this GPIO in the dts for correct operation.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: conga-qeval20-qa3-e3845: Select CONFIG_BOARD_LATE_INIT
Stefan Roese [Tue, 18 Jul 2017 12:10:45 +0000 (14:10 +0200)]
x86: conga-qeval20-qa3-e3845: Select CONFIG_BOARD_LATE_INIT

This config option is needed on the congatec x86 BayTrail board, as
otherwise the USB hub will not get initialized correctly. This
patch selects this Kconfig option again.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: theadorable-x86-dfi-bt700: Add Spansion SPI support and move VIDEO blob
Stefan Roese [Tue, 18 Jul 2017 12:10:41 +0000 (14:10 +0200)]
x86: theadorable-x86-dfi-bt700: Add Spansion SPI support and move VIDEO blob

To support the Spansion SPI NOR flashes, this patch enables the support in
defconfig. This increases the U-Boot binary too much so that it does
not fit into its area in the ROM. So also move the VIDEO BIOS blob
a bit to make some space here.

Signed-off-by: Stefan Roese <sr@denx.de>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: Add Intel Edison board files
Andy Shevchenko [Thu, 6 Jul 2017 11:41:53 +0000 (14:41 +0300)]
x86: Add Intel Edison board files

Add Intel Edison board which is using U-Boot.

The patch is based on work done by the following people (in alphabetical
order):
Aiden Park <aiden.park@intel.com>
Dukjoon Jeon <dukjoon.jeon@intel.com>
eric.park <eric.park@intel.com>
Fabien Chereau <fabien.chereau@intel.com>
Felipe Balbi <felipe.balbi@linux.intel.com>
Scott D Phillips <scott.d.phillips@intel.com>
Sebastien Colleur <sebastienx.colleur@intel.com>
Steve Sakoman <steve.sakoman@intel.com>
Vincent Tinelli <vincent.tinelli@intel.com>

In case we're building for Intel Edison, we must have 4096 bytes of
zeroes in the beginning on u-boot.bin. This is done in
board/intel/edison/config.mk.

First run sets hardware_id environment variable which is read from
System Controller Unit (SCU).

Serial number (serial# environment variable) is generated based on eMMC
CID.

MAC address on USB network interface is unique to the board but kept the
same all over the time.

Set mac address from U-Boot using following scheme:
OUI = 02:00:86
next 3 bytes of MAC address set from eMMC serial number

This allows to have a unique mac address across reboot and flashing.

Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[bmeng: Add MAINTAINERS file for Intel Edison board]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agox86: Add Intel Tangier support
Felipe Balbi [Thu, 6 Jul 2017 11:41:52 +0000 (14:41 +0300)]
x86: Add Intel Tangier support

Add Intel Tangier SoC support.

Intel Tangier SoC is a core part of Intel Merrifield platform. For
example, Intel Edison board is based on such platform.

The patch is based on work done by the following people (in alphabetical
order):
Aiden Park <aiden.park@intel.com>
Dukjoon Jeon <dukjoon.jeon@intel.com>
eric.park <eric.park@intel.com>
Fabien Chereau <fabien.chereau@intel.com>
Scott D Phillips <scott.d.phillips@intel.com>
Sebastien Colleur <sebastienx.colleur@intel.com>
Steve Sakoman <steve.sakoman@intel.com>
Vincent Tinelli <vincent.tinelli@intel.com>

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agox86: Add dma-mapping.h to architectural code
Andy Shevchenko [Thu, 6 Jul 2017 11:41:51 +0000 (14:41 +0300)]
x86: Add dma-mapping.h to architectural code

Some cross-platform drivers rely on this header present.
Make it so for x86.

It's just a copy'n'paste of arch/arm/include/asm/dma-mapping.h.

Suggested-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
7 years agowatchdog: Introduce watchdog driver for Intel Tangier
Felipe Balbi [Wed, 5 Jul 2017 17:33:20 +0000 (20:33 +0300)]
watchdog: Introduce watchdog driver for Intel Tangier

Add watchdog driver for Intel Tangier based platforms.

Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoarch/x86: Select USB before selecting host driver
Andy Shevchenko [Tue, 4 Jul 2017 16:32:22 +0000 (19:32 +0300)]
arch/x86: Select USB before selecting host driver

Kbuild complains if USB is not selected before any of host driver.

warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)
warning: (X86) selects USB_EHCI_HCD which has unmet direct dependencies (USB)

Select it for X86.

Fixes: 64d6ac5bc4a9 ("Kconfig: USB: Migrate CONFIG_USB_EHCI_HCD users to Kconfig")
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
[bmeng: Update all x86 boards' defconfig files to remove CONFIG_USB]
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
7 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Sat, 29 Jul 2017 15:44:08 +0000 (11:44 -0400)]
Merge git://git.denx.de/u-boot-socfpga

7 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Sat, 29 Jul 2017 15:43:51 +0000 (11:43 -0400)]
Merge git://git.denx.de/u-boot-usb

7 years agoefi_loader: indent entry/exit prints to show nesting level
Rob Clark [Thu, 27 Jul 2017 12:04:19 +0000 (08:04 -0400)]
efi_loader: indent entry/exit prints to show nesting level

This should make it easier to see when a callback back to UEFI world
calls back in to the u-boot world, and generally match up EFI_ENTRY()
and EFI_EXIT() calls.

Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: remove static from const var]
Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoefi_loader: add checking for incorrect use of EFI_ENTRY/EXIT
Rob Clark [Thu, 27 Jul 2017 12:04:18 +0000 (08:04 -0400)]
efi_loader: add checking for incorrect use of EFI_ENTRY/EXIT

Missing an EFI_ENTRY() or doubling up EFI_EXIT() leads to non-obvious
crashes.  Let's add some error checking.

Signed-off-by: Rob Clark <robdclark@gmail.com>
[agraf: fix bogus assert() and fix app_gd breakage]
Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoclk: fix compilation errors for poplar platform
Patrice Chotard [Tue, 25 Jul 2017 11:24:45 +0000 (13:24 +0200)]
clk: fix compilation errors for poplar platform

Move clk_release_all() prototype and definition inside
OF_CONTROL flag to avoid following compilation error for
poplar platform:

aarch64:  +   poplar
+drivers/usb/host/built-in.o: In function `ehci_usb_remove':
+drivers/usb/host/ehci-generic.c:159: undefined reference to `clk_release_all'
+drivers/usb/host/built-in.o: In function `ehci_usb_probe':
+drivers/usb/host/ehci-generic.c:133: undefined reference to `clk_release_all'
+make[1]: *** [u-boot] Error 139
+make: *** [sub-make] Error 2

Introduced by 4e542c4 clk: add clk_release_all()

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
7 years agousb: host: xhci-dxc3: fix compilation warnings
Patrice Chotard [Tue, 25 Jul 2017 11:24:44 +0000 (13:24 +0200)]
usb: host: xhci-dxc3: fix compilation warnings

Fix following warnings encountered with platforms
dra7xx_evm and dra7xx_hs_evm :

       arm:  +   dra7xx_evm
+  hccr = (struct xhci_hccr *)devfdt_get_addr(dev);
+         ^
+  hcor = (struct xhci_hcor *)((phys_addr_t)hccr +
+                              ^
w+drivers/usb/host/xhci-dwc3.c: In function 'xhci_dwc3_probe':
w+drivers/usb/host/xhci-dwc3.c:124:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
w+drivers/usb/host/xhci-dwc3.c:125:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
w+drivers/usb/host/xhci-dwc3.c:125:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
       arm:  +   dra7xx_hs_evm
+  hccr = (struct xhci_hccr *)devfdt_get_addr(dev);
+         ^
+  hcor = (struct xhci_hcor *)((phys_addr_t)hccr +
+                              ^
w+drivers/usb/host/xhci-dwc3.c: In function 'xhci_dwc3_probe':
w+drivers/usb/host/xhci-dwc3.c:124:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
w+drivers/usb/host/xhci-dwc3.c:125:30: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
w+drivers/usb/host/xhci-dwc3.c:125:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]

Introduced by 7e65e84 usb: host: xhci-dwc3: Convert driver to DM

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
7 years agophy: add a NO-OP phy driver
Jean-Jacques Hiblot [Mon, 24 Jul 2017 13:18:15 +0000 (15:18 +0200)]
phy: add a NO-OP phy driver

This driver is used to stub PHY operations in a driver (USB, SATA).
This is useful when the 'client' driver (USB, SATA, ...) uses the PHY
framework and there is no actual PHY harwdare to drive.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
7 years agousb: host: ohci-generic: initialize PHY only when found
Patrice Chotard [Mon, 24 Jul 2017 15:07:05 +0000 (17:07 +0200)]
usb: host: ohci-generic: initialize PHY only when found

Call generic_phy_init() only when a PHY was found.
This will avoid a crash if no "phys" property is found in DT.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reported-by: Patrick Delaunay <patrick.delaunay@st.com>
7 years agousb: host: ehci-generic: initialize PHY only when found
Patrice Chotard [Mon, 24 Jul 2017 15:07:04 +0000 (17:07 +0200)]
usb: host: ehci-generic: initialize PHY only when found

Call generic_phy_init() only when a PHY was found.
This will avoid a crash if no "phys" property is found in DT.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reported-by: Patrick Delaunay <patrick.delaunay@st.com>