project/bcm63xx/u-boot.git
5 years agoarm: exynos: Remove duplicated "boardname" env setting
Krzysztof Kozlowski [Fri, 22 Feb 2019 18:36:43 +0000 (19:36 +0100)]
arm: exynos: Remove duplicated "boardname" env setting

Various places in the code set "boardname" env property.  It was used
for booting from ITB images and choosing proper DTB file name.  Instead
of duplicating it, use existing U-Boot wide - "board_name".

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoconfigs: odroid_xu3: Unify indentation
Krzysztof Kozlowski [Fri, 22 Feb 2019 18:36:42 +0000 (19:36 +0100)]
configs: odroid_xu3: Unify indentation

File mixed space and tab indentation.  Unify it.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoconfigs: odroid_xu3: Use consistent syntax for #include
Krzysztof Kozlowski [Fri, 22 Feb 2019 18:36:41 +0000 (19:36 +0100)]
configs: odroid_xu3: Use consistent syntax for #include

When including other header from configs, use consistent <> syntax.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: exynos: arndale: Replace Chander Kashyap inactive maintainer
Krzysztof Kozlowski [Fri, 22 Feb 2019 18:36:40 +0000 (19:36 +0100)]
arm: exynos: arndale: Replace Chander Kashyap inactive maintainer

Last activity from Arndale (Exynos5250) board maintainer Chander Kashyap
was in January 2014 (Signed-off).  Recently his samsung.com email
bounces with 550 (5.1.1 Recipient address rejected: User unknown).

Add Krzysztof Kozlowski as odd fixer for this board.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: dts: exynos: Add ramp delay property to LDO regulators to Odroid XU3 family
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:57 +0000 (19:37 +0100)]
arm: dts: exynos: Add ramp delay property to LDO regulators to Odroid XU3 family

Add startup time to LDO regulators of S2MPS11 PMIC on Odroid XU3/XU4/HC1
family of boards to be sure the voltage is proper before relying on the
regulator.

The datasheet for all the S2MPS1x family is inconsistent here and does
not specify unambiguously the value of ramp delay for LDO.  It mentions
30 mV/us in one timing diagram but then omits it completely in LDO
regulator characteristics table (it is specified for bucks).

However the vendor kernels for Galaxy S5 and Odroid XU3 use values of 12
mV/us or 24 mV/us.

Without the ramp delay value the consumers do not wait for voltage
settle after changing it.  Although the proper value of ramp delay for
LDOs is unknown, it seems safer to use at least some value from
reference kernel than to leave it unset.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: dts: exynos: Add supply for ADC block to Odroid XU3 family
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:56 +0000 (19:37 +0100)]
arm: dts: exynos: Add supply for ADC block to Odroid XU3 family

The ADC block requires VDD supply to be on so provide one.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agopower: regulator: s2mps11: Add enable delay
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:55 +0000 (19:37 +0100)]
power: regulator: s2mps11: Add enable delay

According to datasheet, the output on LDO regulators will start
appearing after 10-15 us.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoregulator: Add support for ramp delay
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:54 +0000 (19:37 +0100)]
regulator: Add support for ramp delay

Changing voltage and enabling regulator might require delays so the
regulator stabilizes at expected level.

Add support for "regulator-ramp-delay" binding which can introduce
required time to both enabling the regulator and to changing the
voltage.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: exynos: Wait till ADC stabilizes before checking Odroid HC1 revision
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:53 +0000 (19:37 +0100)]
arm: exynos: Wait till ADC stabilizes before checking Odroid HC1 revision

Fix detection of Odroid HC1 (Exynos5422) after reboot if kernel disabled
the LDO4/VDD_ADC regulator.

The LDO4 supplies both ADC block and the ADC input AIN9.  Voltage on
AIN9 will rise slowly, so use delay of 5 milliseconds instead of
timers-based loop to wait for voltage stabilization.

First reads on Odroid HC1 return 305, 1207, 1297 and finally 1308
(reference value is 1309).

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: exynos: odroid-xu3: Display info late to have proper type
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:52 +0000 (19:37 +0100)]
arm: exynos: odroid-xu3: Display info late to have proper type

Printing the "Type" of board requires proper detection of revision which
can happen only late because regulators are needed.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoarm: exynos: Detect revision later, when all resources are ready
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:51 +0000 (19:37 +0100)]
arm: exynos: Detect revision later, when all resources are ready

Detection of board revision is done early - before power setup.  In case of
Odroid XU3/XU4/HC1 family, the detection is done using ADC which
is supplied by LDO4/VDD_ADC regulator.  This regulator could be turned
off (e.g. by kernel before reboot).  If ADC is used early, the
regulators are not yet available and the detection won't work.

Split the revision detection out of set_board_type() into separate
function called later - either when displaying board info (in late mode)
or during misc_init_r.  The idea is that set_board_type() will be called
early so its method of detection are limited to flattened device tree
(exynos5-dt-types.c for Exynos5) or GPIO (odroid.c for Exynos4412).  The
newly added set_board_revision() can be called only later, when
resources like regulator are available.

This is necessary to fix the detection of Odroid HC1 after reboot, if
kernel turned off the LDO4 regulator.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agopower: regulator: s2mps11: Fix step for LDO27 and LDO35
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:50 +0000 (19:37 +0100)]
power: regulator: s2mps11: Fix step for LDO27 and LDO35

LDO27 and LDO35 have 25 mV step, not 50 mV.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoadc: exynos-adc: Fix wrong bit operation used to stop the ADC
Krzysztof Kozlowski [Wed, 6 Mar 2019 18:37:49 +0000 (19:37 +0100)]
adc: exynos-adc: Fix wrong bit operation used to stop the ADC

When stopping the ADC_V2_CON1_STC_EN should be cleared.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
5 years agoMerge branch '2019-03-08-master-imports'
Tom Rini [Fri, 8 Mar 2019 23:04:13 +0000 (18:04 -0500)]
Merge branch '2019-03-08-master-imports'

- Assorted minor fixes:
  - ARM: qemu-arm: enable USB boot in distro boot with UEFI
  - image: fdt: handle coalesced reserve region
  - cmd: thordown: Fix spelling of download.
  - fdt: Fix FIT header verification in mkimage and conduct same checks
    as bootm
  - test: Update test-imagetools.sh to match new syntax

5 years agoARM: qemu-arm: enable USB boot in distro boot with UEFI
AKASHI Takahiro [Fri, 14 Dec 2018 09:53:22 +0000 (18:53 +0900)]
ARM: qemu-arm: enable USB boot in distro boot with UEFI

With this patch which adds a removable USB mass storage to a list
of bootable devices, USB boot is supported in distro boot if UEFI is
configured.

Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
5 years agoimage: fdt: handle coalesced reserve region
Patrick Delaunay [Wed, 6 Mar 2019 13:23:52 +0000 (14:23 +0100)]
image: fdt: handle coalesced reserve region

Handle in boot_fdt_reserve_region
any return value > 0 of lmb_reserve() function;
it occurs when coalesced region are found:
adjacent reserved region are merged.

This patch avoid the error trace:
  ERROR: reserving fdt memory region failed..
when reserved region are merged (return value = 1).

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agocmd: thordown: Fix spelling of download.
Vagrant Cascadian [Wed, 6 Mar 2019 06:52:14 +0000 (22:52 -0800)]
cmd: thordown: Fix spelling of download.

Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
5 years agofdt: Fix FIT header verification in mkimage and conduct same checks as bootm
Jordan Hand [Tue, 5 Mar 2019 22:47:56 +0000 (14:47 -0800)]
fdt: Fix FIT header verification in mkimage and conduct same checks as bootm

FIT header verification in mkimage was treating a return code as a boolean,
which meant that failures in validating the fit were seen as successes.

Additionally, mkimage was checking all formats to find a header which
passes validation, rather than using the image type specified to
mkimage.

checkpatch.pl checks for lines ending with '(' and alignment matching
open parentheses are ignored to keep with existing coding style.

Signed-off-by: Jordan Hand <jorhand@microsoft.com>
5 years agotest: Update test-imagetools.sh to match new syntax
Martyn Welch [Thu, 14 Feb 2019 13:11:35 +0000 (13:11 +0000)]
test: Update test-imagetools.sh to match new syntax

The syntax of dumpimage was simplified in commit 12b831879a76 ("tools:
dumpimage: Simplify arguments"), but the test
(test/image/test-imagetools.sh) was not updated and is now failing.

Update the test to use the new syntax.

Reported-by: Vagrant Cascadian <vagrant@debian.org>
Signed-off-by: Martyn Welch <martyn.welch@collabora.com>
Tested-by: Vagrant Cascadian <vagrant@debian.org>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-i2c
Tom Rini [Fri, 8 Mar 2019 12:26:29 +0000 (07:26 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-i2c

This pull request contains bugfixes for rcar_i2c, rcar_ii2c and
i2c_cdns driver.

Also the commit "i2c: rcar_i2c: Add Gen3 SoC support" from Marek
is a bugfix for arm64 builds, as discussed with Marek on list.

5 years agoi2c: rcar_i2c: Move FSDA check to rcar_i2c_recover
Ismael Luceno Cortes [Thu, 7 Mar 2019 18:00:55 +0000 (18:00 +0000)]
i2c: rcar_i2c: Move FSDA check to rcar_i2c_recover

Cosmetic change.  Any call to the recover function would need to do the
same check afterwards, so it's sensible to make it part of the function.

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
5 years agoi2c: rcar_i2c: Set the slave address from rcar_i2c_xfer
Ismael Luceno Cortes [Thu, 7 Mar 2019 18:00:54 +0000 (18:00 +0000)]
i2c: rcar_i2c: Set the slave address from rcar_i2c_xfer

It needs to be done for both reads and writes, so do it at rcar_i2c_xfer
to avoid duplication.

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: rcar_i2c: Don't mask errors with EREMOTEIO at rcar_i2c_xfer
Ismael Luceno Cortes [Thu, 7 Mar 2019 18:00:53 +0000 (18:00 +0000)]
i2c: rcar_i2c: Don't mask errors with EREMOTEIO at rcar_i2c_xfer

Fix rcar_i2c_xfer return value, previously it was always returning
-EREMOTEIO when dealing with errors from calls to the read/write
functions.

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: rcar_i2c: Fix sending of slave addresses
Ismael Luceno Cortes [Thu, 7 Mar 2019 18:00:52 +0000 (18:00 +0000)]
i2c: rcar_i2c: Fix sending of slave addresses

Do the reset before clearing the MSR, otherwise it may result in a read
or write operation instead if the start condition is repeated.

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: rcar_i2c: Add comments about registers & values
Ismael Luceno Cortes [Thu, 7 Mar 2019 18:00:51 +0000 (18:00 +0000)]
i2c: rcar_i2c: Add comments about registers & values

Document the meaning of macros related to registers and values to be
written to them.

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: rcar_i2c: Setup SCL/SDA delay at rcar_i2c_set_speed
Ismael Luceno Cortes [Thu, 7 Mar 2019 18:00:49 +0000 (18:00 +0000)]
i2c: rcar_i2c: Setup SCL/SDA delay at rcar_i2c_set_speed

Setting up the delay only needs to be done once; move it to
rcar_i2c_set_speed so it's done at initialization time.

Signed-off-by: Ismael Luceno <ismael.luceno@silicon-gears.com>
Reviewed-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: i2c_cdns: Add support for handling arbitration lost
Siva Durga Prasad Paladugu [Thu, 7 Mar 2019 10:52:49 +0000 (11:52 +0100)]
i2c: i2c_cdns: Add support for handling arbitration lost

This patch adds support for handling arbitration lost
in case of multi master mode. When an arbitration lost
is detected, it retries for 10 times before failing.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: i2c_cdns: Fix clearing of all interrupts
Siva Durga Prasad Paladugu [Thu, 7 Mar 2019 10:52:48 +0000 (11:52 +0100)]
i2c: i2c_cdns: Fix clearing of all interrupts

The arbitration lost interrupt was not getting cleared
while clearing interrupts. This patch fixes this by adding
arbitration lost interrupt as well during clear. This patch
also removes hardcoded value and defined a macro for it.

Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: rcar_i2c: Add Gen3 SoC support
Marek Vasut [Sat, 2 Mar 2019 16:17:11 +0000 (17:17 +0100)]
i2c: rcar_i2c: Add Gen3 SoC support

Add support for R-Car Gen3 SoCs into the driver, which encompases
the Gen3 SoC extra timing register handling and 64bit build fixes.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoi2c: rcar_iic: Read ICSR only once
Marek Vasut [Thu, 7 Mar 2019 02:41:08 +0000 (03:41 +0100)]
i2c: rcar_iic: Read ICSR only once

Read ICSR only once to avoid missing interrupts. This happens on R8A7791
Porter during reset, when reading the PMIC register 0x13, which may fail
sometimes because of the missed DTE interrupt.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-spi
Tom Rini [Thu, 7 Mar 2019 01:25:09 +0000 (20:25 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-spi

- dw spi include file fix
- Allwinner A31 spi, been in ML in many releases.

5 years agoMerge tag 'efi-2019-04-rc4' of https://github.com/xypron2/u-boot
Tom Rini [Tue, 5 Mar 2019 13:51:48 +0000 (08:51 -0500)]
Merge tag 'efi-2019-04-rc4' of https://github.com/xypron2/u-boot

Pull request for the UEFI subsystem for v2019.04-rc4

This pull request contains only bug fixes.

The most notable bug fixed was writing to random memory addresses when
trying to add a HII package of a yet unsupported package type.

5 years agoPrepare v2019.04-rc4
Tom Rini [Tue, 5 Mar 2019 02:46:24 +0000 (21:46 -0500)]
Prepare v2019.04-rc4

Signed-off-by: Tom Rini <trini@konsulko.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Mon, 4 Mar 2019 21:35:40 +0000 (16:35 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Assorted PFC fixes

5 years agoMerge tag 'u-boot-atmel-2019.04-a' of git://git.denx.de/u-boot-atmel
Tom Rini [Mon, 4 Mar 2019 18:06:22 +0000 (13:06 -0500)]
Merge tag 'u-boot-atmel-2019.04-a' of git://git.denx.de/u-boot-atmel

First set of u-boot-atmel fixes for 2019.04 cycle

5 years agoMerge git://git.denx.de/u-boot-fsl-qoriq
Tom Rini [Mon, 4 Mar 2019 18:05:53 +0000 (13:05 -0500)]
Merge git://git.denx.de/u-boot-fsl-qoriq

- Enable DHCP as boot-source in distro boot for NXP layerscape
  platforms
- fix register layout for SEC on Layerscape architectures
- fixes related to DPAA2 ethernet

5 years agospi: Rename sun4i_spi.c into spi-sunxi.c
Jagan Teki [Wed, 27 Feb 2019 14:32:13 +0000 (20:02 +0530)]
spi: Rename sun4i_spi.c into spi-sunxi.c

Now the same SPI controller driver is reusable in all Allwinner
SoC variants, so rename the existing sun4i_spi.c into spi-sunxi.c
which eventually look like a common sunxi driver.

Also update the function, variable, structure names in driver from
sun4i into sunxi.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: sun4i: Driver cleanup
Jagan Teki [Wed, 27 Feb 2019 14:32:12 +0000 (20:02 +0530)]
spi: sun4i: Driver cleanup

- drop unused macros.
- use base instead of base_addr, for better code readability
- move .probe and .ofdata_to_platdata functions in required
  places to add platdata support in future.
- use sentinel sun4i_spi_ids.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: sun4: Add A31 spi controller support
Jagan Teki [Wed, 27 Feb 2019 14:32:11 +0000 (20:02 +0530)]
spi: sun4: Add A31 spi controller support

The usual SPI transmission protocol in Allwinner A10 and A31
controllers share similar context with minimal changes in register
offsets along with few additional register bits on A31.

So, add A31 spi controller support in existing sun4i_spi with A31
specific register offsets and bits.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agospi: sun4i: Add CLK support
Jagan Teki [Wed, 27 Feb 2019 14:32:10 +0000 (20:02 +0530)]
spi: sun4i: Add CLK support

Add CLK support to enable AHB and MOD SPI clocks on sun4i_spi driver.

Clock disablement could be done while releasing the bus transfer, but
the existing code doesn't disable the clocks it only taken care of clock
enablement globally in probe.

So to make a proper clock handling, the clocks should enable it in claim
and disable it in release.

This patch would also do that change, by enable and disable clock in
proper order.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 years agospi: sun4i: Support fifo_depth via drvdata
Jagan Teki [Wed, 27 Feb 2019 14:32:09 +0000 (20:02 +0530)]
spi: sun4i: Support fifo_depth via drvdata

Support fifo_depth via drvdata instead of macro definition, this would
eventually reduce another macro definition for new SPI controller fifo
depth support addition.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 years agospi: sun4i: Access registers and bits via enum offsets
Jagan Teki [Wed, 27 Feb 2019 14:32:08 +0000 (20:02 +0530)]
spi: sun4i: Access registers and bits via enum offsets

Allwinner support two different SPI controllers one for A10 and
another for A31 with minimal changes in register offsets and
respective register bits, but the logic for accessing the SPI
master via SPI slave remains nearly similar.

Add enum offsets for register set and register bits, so-that
it can access both classes of SPI controllers.

Assign same control register for global, transfer and fifo control
registers to make the same code compatible with A31 SPI controller.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Tested-by: Stefan Mavrodiev <stefan@olimex.com> # A20-SOM204
5 years agospi: sun4i: Simplify reg writes using set/clrbits_le32
Jagan Teki [Wed, 27 Feb 2019 14:32:07 +0000 (20:02 +0530)]
spi: sun4i: Simplify reg writes using set/clrbits_le32

Update the existing register writes using setbits_le32 and
clrbits_le32 in required places.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
5 years agoclk: sunxi: Implement SPI clocks, resets
Jagan Teki [Wed, 27 Feb 2019 14:32:06 +0000 (20:02 +0530)]
clk: sunxi: Implement SPI clocks, resets

- Implement SPI AHB, MOD clocks via ccu_clk_gate for all
  supported Allwinner SoCs
- Implement SPI resets via ccu_reset for all supported
  Allwinner SoCs.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 years agospi: sun4i: Poll for rxfifo to be filled up
Jagan Teki [Wed, 27 Feb 2019 14:32:05 +0000 (20:02 +0530)]
spi: sun4i: Poll for rxfifo to be filled up

To drain rx fifo the fifo need to poll for how much data has
been filled up in rx fifo.

To achieve this, the current code is using wait_for_bit logic
on control register with exchange burst mode mask, which is not
a proper way of waiting for fifo filled up.

So, add code for polling rxfifo to be filled up using fifo
status register.

Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
5 years agospi: designware: Change include order
Horatiu.Vultur@microchip.com [Mon, 25 Feb 2019 10:59:54 +0000 (10:59 +0000)]
spi: designware: Change include order

With current order of include files, the file designware_spi.c
can't see that the struct global_data has the member
board_type when CONFIG_BOARD_TYPES is defined. By not seeing this
then all the members are shifted in the struct global_data.
So when the driver is trying to read from device tree blob, it
would pass the wrong address to the function 'fdtdev_get_int'.
This will make to use the default frequency 500000.

The fix consists of changing the order of include files in
designware_spi.c to include first common.h file.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
5 years agoconfigs: at91: remove SPL_GENERATE_ATMEL_PMECC_HEADER from non-nand configs
Eugen Hristev [Fri, 8 Feb 2019 08:57:01 +0000 (10:57 +0200)]
configs: at91: remove SPL_GENERATE_ATMEL_PMECC_HEADER from non-nand configs

SPL_GENERATE_ATMEL_PMECC_HEADER will generate a header for the SPL for NAND
information. The initial stage 1 bootloader will use this header in case the
NAND flash doesn't support commands to retrieve sector size, etc.
However this header is bad for different boot media, like MMC or SPI.
In case SD_BOOT or SPI_BOOT is used, remove the config for this.

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
5 years agoconfigs: sama5d27_som1_ek: Activate misc init for uSD variant
Alexander Dahl [Wed, 6 Feb 2019 14:19:41 +0000 (15:19 +0100)]
configs: sama5d27_som1_ek: Activate misc init for uSD variant

This was already set for 'sama5d27_som1_ek_mmc_defconfig' (first SD
card, full size). Without this option set, the MAC address is not read
from the I²C EEPROM at boot, and remains unset:

    U-Boot 2019.01 (Jan 01 2019 - 00:00:00 +0000)

    CPU: SAMA5D27 1G bits DDR2 SDRAM
    Crystal frequency:       24 MHz
    CPU clock        :      492 MHz
    Master clock     :      164 MHz
    DRAM:  128 MiB
    MMC:   sdio-host@a0000000: 0, sdio-host@b0000000: 1
    Loading Environment from FAT... OK
    In:    serial
    Out:   serial
    Err:   serial
    Net:
    Error: ethernet@f8008000 address not set.
    eth-1: ethernet@f8008000
    Hit any key to stop autoboot:  0

Signed-off-by: Alexander Dahl <ada@thorsis.com>
5 years agopinctrl: renesas: r8a77990: Reivse USB ID pin name
Hiroyuki Yokoyama [Wed, 13 Feb 2019 05:23:46 +0000 (14:23 +0900)]
pinctrl: renesas: r8a77990: Reivse USB ID pin name

Since the datasheet Rev.1.00 has an error about the USB ID pin name,
this patch revises it.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: r8a77990: Fix MOD_SEL0 bit3 when using TX0
Hiroyuki Yokoyama [Wed, 13 Feb 2019 03:41:04 +0000 (12:41 +0900)]
pinctrl: renesas: r8a77990: Fix MOD_SEL0 bit3 when using TX0

According to the R-Car Gen3 Hardware Manual Errata for Rev 1.50,
the MOD_SEL0 bit3 is set to 0 when TX0_A pin function is selected,
and the MOD_SEL0 bit3 is set to 1 when TX0_B pin function is
selected.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: r8a77990: Fix MOD_SEL0 bit16 when using NFALE and NFRB_N
Hiroyuki Yokoyama [Wed, 13 Feb 2019 03:35:53 +0000 (12:35 +0900)]
pinctrl: renesas: r8a77990: Fix MOD_SEL0 bit16 when using NFALE and NFRB_N

According to the R-Car Gen3 Hardware Manual Rev.1.50, the MOD_SEL0
bit16 is set to 0 when NFALE_A and NFRB_N_A pin functions are
selected.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: r8a77990: Fix MOD_SEL0 bit2 when using RX2,TX2 and SCK2
Hiroyuki Yokoyama [Wed, 13 Feb 2019 03:18:28 +0000 (12:18 +0900)]
pinctrl: renesas: r8a77990: Fix MOD_SEL0 bit2 when using RX2,TX2 and SCK2

According to the R-Car Gen3 Hardware Manual Rev 1.50, the MOD_SEL0
bit2 is set when RX2_{A,B}, TX2_{A,B} and SCK2_A pin functions are
selected.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: r8a77990: Fix rename RTSx_N_TANS_x to RTSx_N_x
Hiroyuki Yokoyama [Wed, 13 Feb 2019 01:37:48 +0000 (10:37 +0900)]
pinctrl: renesas: r8a77990: Fix rename RTSx_N_TANS_x to RTSx_N_x

This patch fixes the allocation name "RTSx_N_TANS_x" of IPSR /
 MOD_SEL0/1 of r8a77990 to "RTSx_N_x". This information was
confirmed in the R-Car Gen3 Hardware Manual Rev.1.50.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: Fix r8a779{6,65} rename sel_ndfc to sel_ndf
Hiroyuki Yokoyama [Wed, 13 Feb 2019 01:22:26 +0000 (10:22 +0900)]
pinctrl: renesas: Fix r8a779{6,65} rename sel_ndfc to sel_ndf

This patch fixes the allocation name "sel_ndfc" of MOD_SEL2[22]
of r8a7796 / r8a77965 to "sel_ndf". This information was confirmed
in the R-Car Gen3 Hardware Manual Rev.1.50.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: Remove r8a779{5,6,65} CC5_OSCOUT of IP17
Hiroyuki Yokoyama [Wed, 13 Feb 2019 01:06:22 +0000 (10:06 +0900)]
pinctrl: renesas: Remove r8a779{5,6,65} CC5_OSCOUT of IP17

This patch removes CC5_OSCOUT assignment of IP17[3:0] of r8a7795
 / r8a7796 / r8a77965. This information was confirmed in the R-Car
Gen3 Hardware Manual Rev.1.50.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: Fix r8a779{5,6,65} rename sel_adg_ to sel_adg
Hiroyuki Yokoyama [Tue, 12 Feb 2019 11:50:01 +0000 (20:50 +0900)]
pinctrl: renesas: Fix r8a779{5,6,65} rename sel_adg_ to sel_adg

This patch fixes to the correct names, and "_" is not include after
"adg" for r8a7795/r8a7796/r8a77965. This information was confirmed
in the R-Car Gen3 Hardware Manual Rev.1.50.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agopinctrl: renesas: Fix r8a779{5,6,65} assign to GP7_03/02 of GPSR7
Hiroyuki Yokoyama [Tue, 12 Feb 2019 10:09:13 +0000 (19:09 +0900)]
pinctrl: renesas: Fix r8a779{5,6,65} assign to GP7_03/02 of GPSR7

This patch is change the bit assignment of "HDMI1_CEC" to "GP7_03",
and "HDMI0_CEC" to "GP7_02". This information was confirmed in the
R-Car Gen3 Hardware Manual Rev.1.50.

Signed-off-by: Hiroyuki Yokoyama <hiroyuki.yokoyama.vx@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
5 years agoboard: Enable DHCP distro boot for LS1012a, LS1021a
Yunfeng Ding [Tue, 19 Feb 2019 06:44:04 +0000 (14:44 +0800)]
board: Enable DHCP distro boot for LS1012a, LS1021a

Enable DHCP distro boot for Layerscape LS1012A and LS1021A.

Signed-off-by: Yunfeng Ding <yunfeng.ding@nxp.com>
Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoarmv8: fsl-layerscape: avoid DT fixup warning
Laurentiu Tudor [Tue, 26 Feb 2019 11:18:34 +0000 (13:18 +0200)]
armv8: fsl-layerscape: avoid DT fixup warning

sec_firmware reserves JR3 for it's own usage and deletes the JR3 node
from the device tree. This causes this warning to be issued when doing
the device tree fixup:

WARNING could not find node fsl,sec-v4.0-job-ring: FDT_ERR_NOTFOUND.

Fix it by excluding the device tree fixup for the JR reserved by
sec_firmware.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoarmv8: fsl-layerscape: fix SEC QI ICID setup
Laurentiu Tudor [Tue, 26 Feb 2019 11:18:33 +0000 (13:18 +0200)]
armv8: fsl-layerscape: fix SEC QI ICID setup

The SEC QI ICID setup in the QIIC_LS register is actually an offset
that is being added to the ICID coming from the qman portal. Setting
it with a non-zero value breaks SMMU setup as the resulting ICID is
not known. On top of that, the SEC QI ICID must match the qman portal
ICIDs in order to share the isolation context.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agofsl_sec: fix register layout on Layerscape architectures
Laurentiu Tudor [Tue, 26 Feb 2019 11:18:32 +0000 (13:18 +0200)]
fsl_sec: fix register layout on Layerscape architectures

On Layerscape architectures the SEC memory map is 1MB and the
register blocks contained in it are 64KB aligned, not 4KB as
the ccsr_sec structure currently assumes. Fix the layout of
the structure for these architectures.

Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Reviewed-by: Horia Geanta <horia.geanta@nxp.com>
Reviewed-by: Bharat Bhushan <bharat.bhushan@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1046qds: Enable PPA for secure boot
Prabhakar Kushwaha [Sun, 3 Mar 2019 16:27:54 +0000 (21:57 +0530)]
board: ls1046qds: Enable PPA for secure boot

Re-organize defconfig and enabled PPA for secure boot

Signed-off-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoconfigs: fsl: move DDR specific defines to Kconfig
Rajesh Bhagat [Fri, 1 Feb 2019 05:22:01 +0000 (05:22 +0000)]
configs: fsl: move DDR specific defines to Kconfig

Moves below DDR specific defines to Kconfig:

CONFIG_FSL_DDR_BIST
CONFIG_FSL_DDR_FIRST_SLOT_QUAD_CAPABLE
CONFIG_FSL_DDR_INTERACTIVE
CONFIG_FSL_DDR_SYNC_REFRESH

Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1043a: use default scan_dev_for_boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:41 +0000 (16:38 +0100)]
board: ls1043a: use default scan_dev_for_boot

Default environment variable is more complete. Also scans for efi
binaries for example.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1043a: enable dhcp boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:40 +0000 (16:38 +0100)]
board: ls1043a: enable dhcp boot

dhcp boot is a useful feature and works out-of-the-box on these
platforms. Enable it as a boot source.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1043a: enable EFI_LOADER_BOUNCE_BUFFER
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:39 +0000 (16:38 +0100)]
board: ls1043a: enable EFI_LOADER_BOUNCE_BUFFER

EFI applications need bounce buffers to work properly on these
platforms.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1046a: use default scan_dev_for_boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:38 +0000 (16:38 +0100)]
board: ls1046a: use default scan_dev_for_boot

Default environment variable is more complete. Also scans for efi
binaries for example.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1046a: enable dhcp boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:37 +0000 (16:38 +0100)]
board: ls1046a: enable dhcp boot

dhcp boot is a useful feature and works out-of-the-box on these
platforms. Enable it as a boot source.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1046a: enable EFI_LOADER_BOUNCE_BUFFER
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:36 +0000 (16:38 +0100)]
board: ls1046a: enable EFI_LOADER_BOUNCE_BUFFER

EFI applications need bounce buffers to work properly on these
platforms.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls2080ardb: use default scan_dev_for_boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:35 +0000 (16:38 +0100)]
board: ls2080ardb: use default scan_dev_for_boot

Default environment variable is more complete. Also scans for efi
binaries for example.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoRevert "ls2080ardb: remove dhcp function from env as boot source"
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:34 +0000 (16:38 +0100)]
Revert "ls2080ardb: remove dhcp function from env as boot source"

dhcp boot is a useful feature and works out-of-the-box for ls2088a
platforms. Moreover, no solid reason is given for disabling it.
Revert the patch to re-enable it.

This reverts commit aea5cd75e63c20de4c00ce24a93eeee8542f923e.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1088ardb: use default scan_dev_for_boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:33 +0000 (16:38 +0100)]
board: ls1088ardb: use default scan_dev_for_boot

Default environment variable is more complete. Also scans for efi
binaries for example.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoRevert "ls1088a: remove dhcp function from u-boot env as boot source"
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:32 +0000 (16:38 +0100)]
Revert "ls1088a: remove dhcp function from u-boot env as boot source"

dhcp boot is a useful feature and works out-of-the-box for ls1088a
platforms. Moreover, no solid reason is given for disabling it.
Revert the patch to re-enable it.

This reverts commit 863e42e8b1f9e97d87919e20e34a7b98089f7522.

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1088a: fix fsl-mc search path
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:31 +0000 (16:38 +0100)]
board: ls1088a: fix fsl-mc search path

Path for fsl-mc node in kernel device-tree is /soc/fsl-mc whereas
in u-boot it is /fsl-mc.

Fix the incorrect search path to fix following error:
fdt_fixup_board_enet: ERROR: fsl-mc node not found in device tree
(error -1)

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoboard: ls1088a: fix dppa exit when using efi boot
Mian Yousaf Kaukab [Tue, 29 Jan 2019 15:38:30 +0000 (16:38 +0100)]
board: ls1088a: fix dppa exit when using efi boot

Same issue for ls2080a was fixed by following patch:
b7b8410a8f ls2080: Exit dpaa only right before exiting U-Boot

Signed-off-by: Mian Yousaf Kaukab <ykaukab@suse.de>
Reviewed-by: Ashish Kumar <Ashish.Kumar@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoMerge git://git.denx.de/u-boot-mpc85xx
Tom Rini [Sun, 3 Mar 2019 13:00:30 +0000 (08:00 -0500)]
Merge git://git.denx.de/u-boot-mpc85xx

5 years agoefi_loader: HII protocols: debug messages
Heinrich Schuchardt [Thu, 28 Feb 2019 22:56:35 +0000 (23:56 +0100)]
efi_loader: HII protocols: debug messages

When package types are not supported by our implementation of the HII
database protocol supported error messages are displayed.

Essentially the output is only needed for debugging. By using EFI_PRINT()
the messages are only written for in debug mode and with correct
indentation.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoefi_loader: error handling for `efidebug boot add`
Heinrich Schuchardt [Thu, 28 Feb 2019 19:41:58 +0000 (20:41 +0100)]
efi_loader: error handling for `efidebug boot add`

In  `efidebug boot add iPXE scsi 0:1 snp-arm64.efi --foo` a parameter is
missing. Hence the command should not silently return as if everything were
ok but should display the usage info.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Alexander Graf <agraf@csgraf.de>
5 years agoefi_loader: HII protocols: fix new_package_list()
Heinrich Schuchardt [Thu, 28 Feb 2019 22:07:00 +0000 (23:07 +0100)]
efi_loader: HII protocols: fix new_package_list()

In new_package_list() we call new_packagelist() to create a new package
list. Next we try to add the packages which fails for form packages. Due
to this error we call free_packagelist(). Now in free_packagelist()
list_del() is called for an uninitialized field hii->link. This leads to
changing random memory addresses.

To solve the problem move the initialization of hii->link to
new_packagelist().

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: AKASHI Takahiro <takahiro.akashi@linaro.org>
5 years agoefi_loader: do not add \ in efi_fs_from_name()
Heinrich Schuchardt [Sat, 23 Feb 2019 10:20:23 +0000 (11:20 +0100)]
efi_loader: do not add \ in efi_fs_from_name()

In the `efidebug boot add` command we do not want an unsolicited leading
backslash added to the file name.

There is no good reason to mark a loaded file with a backslash as absolute.
Anyway when reading files the file name will be interpreted as relative to
root directory of the device.

So let's get rid of this backslash.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agopowerpc: t104xrdb: Add support of MTA9ADF1G72AZ DDR
Peng Ma [Thu, 21 Feb 2019 02:18:27 +0000 (10:18 +0800)]
powerpc: t104xrdb: Add support of MTA9ADF1G72AZ DDR

T1040RDB has been upgraded to support  new DDR ie. MTA9ADF1G72AZ-3G2, 8GB.
So adding support of new DDR part by updating board_specific_parameters
udimm0.

Signed-off-by: Peng Ma <peng.ma@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agopowerpc: enabled building with CONFIG_DM=y
Heinrich Schuchardt [Sun, 20 Jan 2019 08:11:07 +0000 (09:11 +0100)]
powerpc: enabled building with CONFIG_DM=y

Moving to the driver model requires CONFIG_DM to be enabled. Currently
several boards like kmeter1_defconfig produce a build error when CONFIG_DM
is enabled:

In file included from include/common.h:35,
                 from ./arch/powerpc/include/asm/fsl_lbc.h:10,
                 from include/mpc83xx.h:10,
                 from ./arch/powerpc/include/asm/ppc.h:27,
                 from ./arch/powerpc/include/asm/u-boot.h:18,
                 from include/dm/of.h:10,
                 from include/dm/ofnode.h:12,
                 from include/dm/device.h:13,
                 from include/linux/mtd/mtd.h:26,
                 from drivers/mtd/mtdconcat.c:25:
include/image.h: In function ‘image_check_target_arch’:
include/image.h:846:3: error: #error "please define IH_ARCH_DEFAULT in
                       your arch asm/u-boot.h"
 # error "please define IH_ARCH_DEFAULT in your arch asm/u-boot.h"
   ^~~~~
include/image.h:848:31: error: ‘IH_ARCH_DEFAULT’ undeclared (first use in
                        this function); did you mean ‘IH_ARCH_COUNT’?
  return image_check_arch(hdr, IH_ARCH_DEFAULT);

The error can be avoided by moving the definition of IH_ARCH_DEFAULT before

     #include <asm/ppc.h>

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
5 years agoMerge branch 'master' of git://git.denx.de/u-boot-socfpga
Tom Rini [Thu, 28 Feb 2019 23:57:32 +0000 (18:57 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-socfpga

- SoCFPGA cache/gpio fixes

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sh
Tom Rini [Thu, 28 Feb 2019 23:57:17 +0000 (18:57 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sh

- Gen2/Gen3 fixes for warnings and sdhi

5 years agoMerge branch 'master' of git://git.denx.de/u-boot-sunxi
Tom Rini [Thu, 28 Feb 2019 19:22:50 +0000 (14:22 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sunxi

- Various Bananapi fixes

5 years agoMerge branch '2019-02-29-master-imports'
Tom Rini [Thu, 28 Feb 2019 19:22:03 +0000 (14:22 -0500)]
Merge branch '2019-02-29-master-imports'

- Assorted BSP fixes
- Kbuild fix

5 years agospl: add debug print for early malloc usage
Simon Goldschmidt [Tue, 26 Feb 2019 21:27:52 +0000 (22:27 +0100)]
spl: add debug print for early malloc usage

To find out how big the early malloc heap must be in SPL, add a debug
print statement that dumps its usage before switching to relocated heap
in spl_relocate_stack_gd() via CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN.

Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
5 years agokbuild: fix DTB .cmd source variable
Stephen Warren [Tue, 26 Feb 2019 19:20:26 +0000 (12:20 -0700)]
kbuild: fix DTB .cmd source variable

*.dts are processed using a custom command, then the C pre-processor is
run on them, then they are compiled using dtc. Thus, the dependency
files generated by both cpp and dtc reference a temporary file name
rather than the actual source file. While this information isn't used
for any purpose by the build system, and hence this causes no functional
issue, it does cause the dependency files to contain invalid and
confusing data, which is unhelpful while debugging build problems. Fix
this using sed.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agokbuild: make arch-dtbs target PHONY
Stephen Warren [Tue, 26 Feb 2019 19:20:25 +0000 (12:20 -0700)]
kbuild: make arch-dtbs target PHONY

Without this, the arch-dtbs target only gets evaluated when building
U-Boot the first time, not when re-building (incrementally building)
U-Boot. Thus incremental builds ignore changes to DTB files.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
5 years agodoc: binding: rename directory ram to memory-controller
Patrick Delaunay [Tue, 26 Feb 2019 12:09:00 +0000 (13:09 +0100)]
doc: binding: rename directory ram to memory-controller

Alignment with kernel directory name as it have already bindings for
DDR controllers in the directory:
Documentation/devicetree/bindings/memory-controller

PS: the drivers using RAM u-class should be associated with
    this binding directory

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
5 years agofs: fat: fix link error when building with DEBUG=1
Heinrich Schuchardt [Mon, 25 Feb 2019 18:42:48 +0000 (19:42 +0100)]
fs: fat: fix link error when building with DEBUG=1

When compiling with DEBUG=1 an error
fs/fat/fat_write.c:831: undefined reference to `__aeabi_ldivmod'
occurred.

We should use do_div() instead of the modulus operator.

filesize and cur_pos cannot be negative. So let's use u64 to avoid
warnings.

Fixes: cb8af8af5ba0 ("fs: fat: support write with non-zero offset")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
5 years agoarm: pdu001: Fix order of include files
Felix Brack [Mon, 25 Feb 2019 15:38:23 +0000 (16:38 +0100)]
arm: pdu001: Fix order of include files

Fix the order of include files according to U-Boot coding style.

Signed-off-by: Felix Brack <fb@ltec.ch>
5 years ago.gitignore: Ignore regenerated *.dtbo files
Michal Simek [Thu, 21 Feb 2019 06:48:54 +0000 (07:48 +0100)]
.gitignore: Ignore regenerated *.dtbo files

*.dtbo are dt overlays files which should be also ignored as *.dtb.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
5 years agoARM: cache: Fix incorrect bitwise operation
Marek Vasut [Tue, 19 Feb 2019 00:43:51 +0000 (01:43 +0100)]
ARM: cache: Fix incorrect bitwise operation

The loop implemented in the code is supposed to check whether the
PL310 operation register has any bit from the mask set. Currently,
the code checks whether the PL310 operation register has any bit
set AND whether the mask is non-zero, which is incorrect. Fix the
conditional.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Dalon Westergreen <dwesterg@gmail.com>
Cc: Dinh Nguyen <dinguyen@kernel.org>
Cc: Tom Rini <trini@konsulko.com>
Fixes: 93bc21930a1b ("armv7: add PL310 support to u-boot")
Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
Reviewed-by: Dinh Nguyen <dinguyen@kernel.org>
5 years agospi: omap3: fix set_wordlen() reading from incorrect address for CHCONF
David Rivshin [Mon, 18 Feb 2019 23:04:29 +0000 (18:04 -0500)]
spi: omap3: fix set_wordlen() reading from incorrect address for CHCONF

_omap3_spi_set_wordlen() indexed the regs->channel[] array with the
old wordlen (instead of the chipselect number) when reading the current
CHCONF register value. This meant it read from the wrong memory location,
modified that value, and then wrote it back to the correct CHCONF
register. The end result is that most slave configuration settings would
be lost, such as clock divisor, clock/chipselect polarities, etc.

Fixes: 77b8d04854f4 ("spi: omap3: Convert to driver model")
Signed-off-by: David Rivshin <drivshin@allworx.com>
5 years agoMerge git://git.denx.de/u-boot-riscv
Tom Rini [Wed, 27 Feb 2019 18:32:09 +0000 (13:32 -0500)]
Merge git://git.denx.de/u-boot-riscv

- SiFive FU540 Support

5 years agoriscv: Enable CONFIG_SYS_BOOT_RAMDISK_HIGH for using initrd
Anup Patel [Mon, 25 Feb 2019 08:15:33 +0000 (08:15 +0000)]
riscv: Enable CONFIG_SYS_BOOT_RAMDISK_HIGH for using initrd

This patch enables CONFIG_SYS_BOOT_RAMDISK_HIGH for RISC-V
because bootm will update initrd location in DTB only if
CONFIG_SYS_BOOT_RAMDISK_HIGH is enabled. If we don't enable
this option then bootm assumes DTB already has initrd details
which is not the case most of the time.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agodoc: Add a readme guide for SiFive FU540
Atish Patra [Mon, 25 Feb 2019 08:15:27 +0000 (08:15 +0000)]
doc: Add a readme guide for SiFive FU540

The readme guide describes the procedure to build, flash and boot Linux
using U-Boot on HiFive Unleashed. It also explains the current state of
U-boot support and future action items.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
5 years agoriscv: Add SiFive FU540 board support
Anup Patel [Mon, 25 Feb 2019 08:15:19 +0000 (08:15 +0000)]
riscv: Add SiFive FU540 board support

This patch adds SiFive FU540 board support. For now, only
SiFive serial, SiFive PRCI, and Cadance MACB drivers are
only enabled. The SiFive FU540 defconfig by default builds
U-Boot for S-Mode because U-Boot on SiFive FU540 will run
in S-Mode as payload of BBL or OpenSBI.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
5 years agocpu: Bind timer driver for boot hart
Atish Patra [Mon, 25 Feb 2019 08:15:14 +0000 (08:15 +0000)]
cpu: Bind timer driver for boot hart

Currently, timer driver is bound only for hart0.

There is no mandatory requirement that hart0 should always
come up. In fact, HiFive Unleashed SoC hart0 doesn't boot
in S-mode because it only has M-mode.

The timer driver should be bound for boot hart.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
Reviewed-by: Lukas Auer <lukas.auer@aisec.fraunhofer.de>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>