oweals/u-boot.git
6 years agorockchip: configs: Enable CONFIG_NET_RANDOM_ETHADDR for rk3288-evb
David Wu [Sat, 13 Jan 2018 05:53:55 +0000 (13:53 +0800)]
rockchip: configs: Enable CONFIG_NET_RANDOM_ETHADDR for rk3288-evb

If the Ethernet address is not set, the network can't work,
enable the random address config for default use.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: dts: rk3399-evb: Change the tx/rx delay value for transmission quality
David Wu [Sat, 13 Jan 2018 05:53:54 +0000 (13:53 +0800)]
rockchip: dts: rk3399-evb: Change the tx/rx delay value for transmission quality

Give the mac controller the correct tx-delay and rx-delay value
for the rgmii mode transmission. If they are not matched, there
would be Ethernet packets lost, the net feature may not work.

Signed-off-by: David Wu <david.wu@rock-chips.com>
Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
6 years agorockchip: clk: rk3399: accept all assigned-clocks from the 'cru'-node
Philipp Tomsich [Mon, 8 Jan 2018 13:00:27 +0000 (14:00 +0100)]
rockchip: clk: rk3399: accept all assigned-clocks from the 'cru'-node

The RK3399 CRU-node assigns rates to a number of clocks that are not
implemented in the RK3399 clock-driver (but which have been
sufficiently initialised from rkclk_init()): for these clocks, we
simply ignore the set_rate() operation and return 0 to signal success.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: David Wu <david.wu@rock-chips.com>
Series-changes: 2
- Fixed David's email address.

6 years agoclk: implement clk_set_defaults()
Philipp Tomsich [Mon, 8 Jan 2018 12:59:18 +0000 (13:59 +0100)]
clk: implement clk_set_defaults()

Linux uses the properties 'assigned-clocks', 'assigned-clock-parents'
and 'assigned-clock-rates' to configure the clock subsystem for use
with various peripheral nodes.

This implements clk_set_defaults() and hooks it up with the general
device probibin in drivers/core/device.c: when a new device is probed,
clk_set_defaults() will be called for it and will process the
properties mentioned above.

Note that this functionality is designed to fail gracefully (i.e. if a
clock-driver does not implement set_parent(), we simply accept this
and ignore the error) as not to break existing board-support.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: David Wu <david.wu@rock-chips.com>
Series-changes: 2
- Fixed David's email address.

Series-version: 2

Cover-letter:
clk: support assigned-clock, assigned-clock-parents, assigned-clock-rates

For various peripherals on Rockchip SoCs (e.g. for the Ethernet GMAC),
the parent-clock needs to be set via the DTS.  This adds the required
plumbing and implements the GMAC case for the RK3399.
END

6 years agorockchip: clk: rk3399: implement set_parent() operation
Philipp Tomsich [Mon, 8 Jan 2018 12:11:01 +0000 (13:11 +0100)]
rockchip: clk: rk3399: implement set_parent() operation

This implements the (newly added) set_parent() operation for the
RK3399 with a focus on allowing the RGMII clock parent to be
configured via the assigned-clock-parents property of the GMAC node.

This implementation supports only the GMAC (in fact only the RGMII
clock parent) and allows to set this clock's parent either to the
internal SCLK_GMAC or to an external clock input (identifiable by it
providing a 'clock-output-name' of "gmac_clkin").

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: David Wu <david.wu@rock-chips.com>
Series-changes: 2
- Fixed David's email address.

6 years agoclk: refactor clk_get_by_index() into clk_get_by_indexed_prop()
Philipp Tomsich [Mon, 8 Jan 2018 10:18:18 +0000 (11:18 +0100)]
clk: refactor clk_get_by_index() into clk_get_by_indexed_prop()

The logic in clk_get_by_index() may be useful for other properties
than 'clocks': e.g. 'assigned-clocks' and 'assigned-clock-parents'
follows the same model.

This commit refactors clk_get_by_index() by introducing an internal
function clk_get_by_indexed_prop() that allows to specify the name
of the property to process.  The original clk_get_by_index() call
is simply directed through this helper function with the property
name fixed to "clocks".

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: David Wu <david.wu@rock-chips.com>
Series-changes: 2
- Fixed David's email address.

6 years agoclk: add clk_set_parent()
Philipp Tomsich [Mon, 8 Jan 2018 10:15:08 +0000 (11:15 +0100)]
clk: add clk_set_parent()

Clocks may support multiple parents: this change introduces an
optional operation on the clk-uclass to set a clock's parent.

Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
Tested-by: David Wu <david.wu@rock-chips.com>
Series-changes: 2
- Fixed David's email address.

6 years agoMerge git://git.denx.de/u-boot-uniphier
Tom Rini [Sun, 28 Jan 2018 02:55:04 +0000 (21:55 -0500)]
Merge git://git.denx.de/u-boot-uniphier

6 years agoMerge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh
Tom Rini [Sat, 27 Jan 2018 19:50:52 +0000 (14:50 -0500)]
Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-sh

6 years agoARM: uniphier: enable HS200 support for uniphier_v8_defconfig
Masahiro Yamada [Thu, 25 Jan 2018 04:43:19 +0000 (13:43 +0900)]
ARM: uniphier: enable HS200 support for uniphier_v8_defconfig

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Sat, 27 Jan 2018 19:48:52 +0000 (14:48 -0500)]
Merge git://git.denx.de/u-boot-usb

6 years agoMerge git://git.denx.de/u-boot-socfpga
Tom Rini [Sat, 27 Jan 2018 19:48:41 +0000 (14:48 -0500)]
Merge git://git.denx.de/u-boot-socfpga

6 years agoARM: rmobile: Convert R8A7791 Porter board to DM and DT
Marek Vasut [Sun, 7 Jan 2018 18:32:56 +0000 (19:32 +0100)]
ARM: rmobile: Convert R8A7791 Porter board to DM and DT

Convert the R8A7791 Porter board to DM and DT. This implies mostly
enabling the necessary configuration options and plucking out the
ad-hoc configuration from the board file. Moreover, the pre-reloc
malloc size was increased to allow the clock driver to start up
early without running out of malloc space and the early stack was
moved further up in the DRAM to avoid rewriting U-Boot itself.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Enable OF_CONTROL on RCar Gen2
Marek Vasut [Sun, 7 Jan 2018 19:26:04 +0000 (20:26 +0100)]
ARM: rmobile: Enable OF_CONTROL on RCar Gen2

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>
6 years agoARM: dts: rmobile: Add SoC and board U-Boot DT extras
Marek Vasut [Wed, 17 Jan 2018 21:47:21 +0000 (22:47 +0100)]
ARM: dts: rmobile: Add SoC and board U-Boot DT extras

Add U-Boot DT extras for each SoC and board. This marks the required
nodes with u-boot,dm-pre-reloc to start clock and PRR early on while
avoiding modification of the DTs imported from Linux.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Add rudimentary R8A7790 Stout DT
Marek Vasut [Wed, 24 Jan 2018 14:52:56 +0000 (15:52 +0100)]
ARM: dts: rmobile: Add rudimentary R8A7790 Stout DT

The Stout board is not supported in Linux, so add a rudimentary DTS
for H2 Stout as a placeholder for when a proper DTS is available.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
---
NOTE: The Stout is already being shipped over, so proper DTS for both
      U-Boot and Linux will happen once it's delivered :-)

6 years agoARM: dts: rmobile: Import R8A7794 DTS from Linux 4.15-rc8
Marek Vasut [Sun, 7 Jan 2018 19:18:28 +0000 (20:18 +0100)]
ARM: dts: rmobile: Import R8A7794 DTS from Linux 4.15-rc8

Import the Renesas R8A7794 DTS and headers from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Import R8A7793 DTS from Linux 4.15-rc8
Marek Vasut [Sun, 7 Jan 2018 19:18:11 +0000 (20:18 +0100)]
ARM: dts: rmobile: Import R8A7793 DTS from Linux 4.15-rc8

Import the Renesas R8A7793 DTS and headers from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Import R8A7792 DTS from Linux 4.15-rc8
Marek Vasut [Sun, 7 Jan 2018 19:17:53 +0000 (20:17 +0100)]
ARM: dts: rmobile: Import R8A7792 DTS from Linux 4.15-rc8

Import the Renesas R8A7792 DTS and headers from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Import R8A7791 DTS from Linux 4.15-rc8
Marek Vasut [Sun, 7 Jan 2018 19:17:39 +0000 (20:17 +0100)]
ARM: dts: rmobile: Import R8A7791 DTS from Linux 4.15-rc8

Import the Renesas R8A7791 DTS and headers from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: dts: rmobile: Import R8A7790 DTS from Linux 4.15-rc8
Marek Vasut [Sun, 7 Jan 2018 19:17:23 +0000 (20:17 +0100)]
ARM: dts: rmobile: Import R8A7790 DTS from Linux 4.15-rc8

Import the Renesas R8A7790 DTS and headers from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agonet: sh_eth: Add DM and DT support
Marek Vasut [Fri, 19 Jan 2018 17:57:17 +0000 (18:57 +0100)]
net: sh_eth: Add DM and DT support

Add DM capable code into the SH ethernet driver and support probing
both from DT and pdata. The legacy non-DM, non-DT support is retained
as there are still systems in the tree which are not DM or DT capable.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Clump legacy functions together
Marek Vasut [Sun, 21 Jan 2018 14:31:48 +0000 (15:31 +0100)]
net: sh_eth: Clump legacy functions together

Move the legacy functions around, so that they can be wrapped in a
massive ifdef CONFIG_DM_ETH once DM support is added. No functional
change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Split sh_eth_init
Marek Vasut [Sun, 21 Jan 2018 14:10:21 +0000 (15:10 +0100)]
net: sh_eth: Split sh_eth_init

Split sh_eth_init() function into smaller chunks, which can
be called from both DM and non-DM code while handling the
specifics of both configurations.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Separate out MAC address programming
Marek Vasut [Sun, 21 Jan 2018 13:55:44 +0000 (14:55 +0100)]
net: sh_eth: Separate out MAC address programming

Pull out the code for writing MAC address into the NIC into a
separate function, so it can be reused by both DM and non-DM
code. This is done in preparation for DM support, which handles
MAC address programming separately.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Split sh_eth_recv
Marek Vasut [Sun, 21 Jan 2018 14:39:50 +0000 (15:39 +0100)]
net: sh_eth: Split sh_eth_recv

Split sh_eth_recv into two functions, one which checks whether
a packet was received and one which handles the received packet.
This is done in preparation for DM support, which handles these
two parts separately.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Pass sh_eth_dev around
Marek Vasut [Sun, 21 Jan 2018 13:27:51 +0000 (14:27 +0100)]
net: sh_eth: Pass sh_eth_dev around

Pass sh_eth_dev structure around instead of eth_device, since the
later is specific to the legacy networking support. This change is
done in preparation for the DM addition.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: sh_eth: Unify CONFIG_R8A779[01234] as CONFIG_RCAR_GEN2
Marek Vasut [Mon, 22 Jan 2018 00:42:32 +0000 (01:42 +0100)]
net: sh_eth: Unify CONFIG_R8A779[01234] as CONFIG_RCAR_GEN2

Use the common RCAR_GEN2 config option instead of enumerating
each SoC and having a lengthy ifdef clause. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agonet: ravb: staticize ravb_start
Marek Vasut [Fri, 19 Jan 2018 22:58:32 +0000 (23:58 +0100)]
net: ravb: staticize ravb_start

Cosmetic fix, make ravb_start() static.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Cc: Joe Hershberger <joe.hershberger@ni.com>
6 years agopci: rmobile: Add RCar Gen2 PCIe controller driver
Marek Vasut [Thu, 18 Jan 2018 13:35:35 +0000 (14:35 +0100)]
pci: rmobile: Add RCar Gen2 PCIe controller driver

Add driver for the Renesas RCar PCIe controller present on Gen2 SoCs.
The PCIe on Gen2 is used both to connect external PCIe peripherals as
well as access the on-SoC USB EHCI controller.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
6 years agogpio: rmobile: Add RCar Gen2 compatible string
Marek Vasut [Wed, 17 Jan 2018 23:52:15 +0000 (00:52 +0100)]
gpio: rmobile: Add RCar Gen2 compatible string

Add DT compatible string for RCar Gen2.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoenv: sunxi: Enable FAT-based environment support by default
Maxime Ripard [Tue, 23 Jan 2018 20:17:04 +0000 (21:17 +0100)]
env: sunxi: Enable FAT-based environment support by default

Now that we have everything in place to implement the transition scheme,
let's enable it by default.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agosunxi: Transition from the MMC to a FAT-based environment
Maxime Ripard [Tue, 23 Jan 2018 20:17:03 +0000 (21:17 +0100)]
sunxi: Transition from the MMC to a FAT-based environment

The current environment has been hardcoded to an offset that starts to be
an issue given the current size of our main U-Boot binary.

By implementing a custom environment location routine, we can always favor
the FAT-based environment, and fallback to the MMC if we don't find
something in the FAT partition. We also implement the same order when
saving the environment, so that hopefully we can slowly migrate the users
over to FAT-based environment and away from the raw MMC one.

Eventually, and hopefully before we reach that limit again, we will have
most of our users using that setup, and we'll be able to retire the raw
environment, and gain more room for the U-Boot binary.

Reviewed-by: Lukasz Majewski <lukma@denx.de>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Mark env_get_location as weak
Maxime Ripard [Tue, 23 Jan 2018 20:17:02 +0000 (21:17 +0100)]
env: Mark env_get_location as weak

Allow boards and architectures to override the default environment lookup
code by overriding env_get_location.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Allow to build multiple environments in Kconfig
Maxime Ripard [Tue, 23 Jan 2018 20:17:01 +0000 (21:17 +0100)]
env: Allow to build multiple environments in Kconfig

Now that we have everything in place in the code, let's allow to build
multiple environments backend through Kconfig.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: mmc: depends on the MMC framework
Maxime Ripard [Tue, 23 Jan 2018 20:17:00 +0000 (21:17 +0100)]
env: mmc: depends on the MMC framework

The raw MMC environment directly calls into the MMC framework. Make sure
it's enabled before we can select it.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoenv: Initialise all the environments
Maxime Ripard [Tue, 23 Jan 2018 20:16:59 +0000 (21:16 +0100)]
env: Initialise all the environments

Since we want to have multiple environments, we will need to initialise
all the environments since we don't know at init time what drivers might
fail when calling load.

Let's init all of them, and only consider for further operations the ones
that have not reported any errors at init time.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Support multiple environments
Maxime Ripard [Tue, 23 Jan 2018 20:16:58 +0000 (21:16 +0100)]
env: Support multiple environments

Now that we have everything in place to support multiple environment, let's
make sure the current code can use it.

The priority used between the various environment is the same one that was
used in the code previously.

At read / init times, the highest priority environment is going to be
detected, and we'll use the same one without lookup during writes. This
should implement the same behaviour than we currently have.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: common: Make the debug messages play a little nicer
Maxime Ripard [Tue, 23 Jan 2018 20:16:57 +0000 (21:16 +0100)]
env: common: Make the debug messages play a little nicer

Since we have global messages to indicate what's going on, the custom
messages in the environment drivers only make the output less readable.

Make the common code play a little nicer by removing all the extra output
in the standard case.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: mmc: Make the debug messages play a little nicer
Maxime Ripard [Tue, 23 Jan 2018 20:16:56 +0000 (21:16 +0100)]
env: mmc: Make the debug messages play a little nicer

Since we have global messages to indicate what's going on, the custom
messages in the environment drivers only make the output less readable.

Make MMC play a little nicer by removing all the extra \n and formatting
that is redundant with the global output.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
6 years agoenv: fat: Make the debug messages play a little nicer
Maxime Ripard [Tue, 23 Jan 2018 20:16:55 +0000 (21:16 +0100)]
env: fat: Make the debug messages play a little nicer

Since we have global messages to indicate what's going on, the custom
messages in the environment drivers only make the output less readable.

Make FAT play a little nicer by removing all the extra \n and formatting
that is redundant with the global output.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Make it explicit where we're loading our environment from
Maxime Ripard [Tue, 23 Jan 2018 20:16:54 +0000 (21:16 +0100)]
env: Make it explicit where we're loading our environment from

Since we can have multiple environments now, it's better to provide a
decent indication on what environments were tried and which were the one to
fail and succeed.

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Make the env save message a bit more explicit
Maxime Ripard [Tue, 23 Jan 2018 20:16:53 +0000 (21:16 +0100)]
env: Make the env save message a bit more explicit

Since we'll soon have support for multiple environments, the environment
saving message might end up being printed multiple times if the higher
priority environment cannot be used.

That might confuse the user, so let's make it explicit if the operation
failed or not.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Pass additional parameters to the env lookup function
Maxime Ripard [Tue, 23 Jan 2018 20:16:52 +0000 (21:16 +0100)]
env: Pass additional parameters to the env lookup function

In preparation for the multiple environment support, let's introduce two
new parameters to the environment driver lookup function: the priority and
operation.

The operation parameter is meant to identify, obviously, the operation you
might want to perform on the environment.

The priority is a number passed to identify the environment priority you
want to retrieve. The lowest priority parameter (0) will be the primary
source.

Combining the two parameters allow you to support multiple environments
through different priorities, and to change those priorities between read
and writes operations.

This is especially useful to implement migration mechanisms where you want
to always use the same environment first, be it to read or write, while the
common case is more likely to use the same environment it has read from to
write it to.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoenv: Rename env_driver_lookup_default and env_get_default_location
Maxime Ripard [Tue, 23 Jan 2018 20:16:51 +0000 (21:16 +0100)]
env: Rename env_driver_lookup_default and env_get_default_location

The env_driver_lookup_default and env_get_default_location functions are
about to get refactored to support loading from multiple environment.

The name is therefore not really well suited anymore. Drop the default
part to be a bit more relevant.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agocmd: nvedit: Get rid of the env lookup
Maxime Ripard [Tue, 23 Jan 2018 20:16:50 +0000 (21:16 +0100)]
cmd: nvedit: Get rid of the env lookup

The nvedit command is the only user of env_driver_lookup_default outside of
the environment code itself, and it uses it only to print the environment
it's about to save to during env save.

As we're about to rework the environment to be able to handle multiple
environment sources, we might not have an idea of what environment backend
is going to be used before trying (and possibly failing for some).

Therefore, it makes sense to remove that message and move it to the
env_save function itself. As a side effect, we also can get rid of the call
to env_driver_lookup_default that is also about to get refactored.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
6 years agoMerge git://git.denx.de/u-boot-sunxi
Tom Rini [Fri, 26 Jan 2018 18:22:40 +0000 (13:22 -0500)]
Merge git://git.denx.de/u-boot-sunxi

6 years agoARM: socfpga: Convert callers of cm_write_with_phase for wait_for_bit_le32
Tom Rini [Fri, 26 Jan 2018 16:24:04 +0000 (11:24 -0500)]
ARM: socfpga: Convert callers of cm_write_with_phase for wait_for_bit_le32

Now that we have and use wait_for_bit_le32() available, the callers of
cm_write_with_phase() should not be casting values to u32 and instead we
expect a const void *, so provide that directly.

Fixes: 48263504c8d5 ("wait_bit: use wait_for_bit_le32 and remove wait_for_bit")
Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agogpio: sunxi: Add compatible string for H5 PIO
Chris Blake [Mon, 15 Jan 2018 22:28:18 +0000 (16:28 -0600)]
gpio: sunxi: Add compatible string for H5 PIO

Add allwinner,sun50i-h5-pinctrl compatible for H5 boards.

Signed-off-by: Chris Blake <chrisrblake93@gmail.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
[jagan: remove external link and format commit message]
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
6 years agosunxi: Add limit with the MMC environment
Maxime Ripard [Tue, 16 Jan 2018 08:44:24 +0000 (09:44 +0100)]
sunxi: Add limit with the MMC environment

The MMC environment offset is getting very close to the end of the U-Boot
binary now. Since we want to make sure this will not overflow, add a size
limit in the board for arm64. arm32 has already that limit enforced in our
custom image generation.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agoMakefile: Add size check to the u-boot.itb make target
Maxime Ripard [Tue, 16 Jan 2018 08:44:23 +0000 (09:44 +0100)]
Makefile: Add size check to the u-boot.itb make target

The make macro to check if the binary exceeds the board size limit is not
called. Make sure that is the case.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agosunxi: imply CONFIG_OF_LIBFDT_OVERLAY
Andre Heider [Tue, 16 Jan 2018 08:44:22 +0000 (09:44 +0100)]
sunxi: imply CONFIG_OF_LIBFDT_OVERLAY

fdt overlay support is useful for all sunxi boards, enable per default
and remove it from sunxi defconfigs.

Signed-off-by: Andre Heider <a.heider@gmail.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agonet: regex: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:21 +0000 (09:44 +0100)]
net: regex: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this option that is not critical until we can adress the issue
properly.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agovideo: bpp16: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:20 +0000 (09:44 +0100)]
video: bpp16: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agovideo: bpp8: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:19 +0000 (09:44 +0100)]
video: bpp8: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Reviewed-by: Anatolij Gustschin <agust@denx.de>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agocmd: misc: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:18 +0000 (09:44 +0100)]
cmd: misc: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agocmd: loads: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:17 +0000 (09:44 +0100)]
cmd: loads: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agocmd: loadb: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:16 +0000 (09:44 +0100)]
cmd: loadb: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agocmd: unzip: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:15 +0000 (09:44 +0100)]
cmd: unzip: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agocmd: crc32: Disable by default on sunXi
Maxime Ripard [Tue, 16 Jan 2018 08:44:14 +0000 (09:44 +0100)]
cmd: crc32: Disable by default on sunXi

The sunXi arm64 build has overflown, leading to the main U-boot binary
overwriting the environment when flashing the new image, or even worse,
overwriting itself when we're calling saveenv.

Disable this command that is not critical until we can adress the issue
properly.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agodfu: select HASH
Maxime Ripard [Tue, 16 Jan 2018 08:44:13 +0000 (09:44 +0100)]
dfu: select HASH

The DFU code relies on the HASH config option. Make sure it is always there
by selecting it.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agoMerge git://git.denx.de/u-boot-mips
Tom Rini [Fri, 26 Jan 2018 12:46:47 +0000 (07:46 -0500)]
Merge git://git.denx.de/u-boot-mips

6 years agoMerge git://git.denx.de/u-boot-spi
Tom Rini [Fri, 26 Jan 2018 12:46:34 +0000 (07:46 -0500)]
Merge git://git.denx.de/u-boot-spi

6 years agoMIPS: add BMIPS Comtrend AR-5315u board
Álvaro Fernández Rojas [Sat, 20 Jan 2018 18:16:05 +0000 (19:16 +0100)]
MIPS: add BMIPS Comtrend AR-5315u board

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoMIPS: add support for Broadcom MIPS BCM6318 SoC family
Álvaro Fernández Rojas [Sat, 20 Jan 2018 18:16:04 +0000 (19:16 +0100)]
MIPS: add support for Broadcom MIPS BCM6318 SoC family

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agodm: ram: bmips: add BCM6318 support
Álvaro Fernández Rojas [Sat, 20 Jan 2018 18:16:03 +0000 (19:16 +0100)]
dm: ram: bmips: add BCM6318 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agodm: cpu: bmips: add BCM6318 support
Álvaro Fernández Rojas [Sat, 20 Jan 2018 18:16:02 +0000 (19:16 +0100)]
dm: cpu: bmips: add BCM6318 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoMIPS: add BMIPS Comtrend WAP-5813n board
Álvaro Fernández Rojas [Sat, 20 Jan 2018 13:16:56 +0000 (14:16 +0100)]
MIPS: add BMIPS Comtrend WAP-5813n board

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoMIPS: add support for Broadcom MIPS BCM6368 SoC family
Álvaro Fernández Rojas [Sat, 20 Jan 2018 13:16:55 +0000 (14:16 +0100)]
MIPS: add support for Broadcom MIPS BCM6368 SoC family

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agodm: cpu: bmips: add BCM6368 support
Álvaro Fernández Rojas [Sat, 20 Jan 2018 13:16:54 +0000 (14:16 +0100)]
dm: cpu: bmips: add BCM6368 support

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoDW SPI: Get clock value from Device Tree
Eugeniy Paltsev [Thu, 28 Dec 2017 12:09:03 +0000 (15:09 +0300)]
DW SPI: Get clock value from Device Tree

Add option to set spi controller clock frequency via device tree
using standard clock bindings.

Define dw_spi_get_clk function as 'weak' as some targets
(like SOCFPGA_GEN5 and SOCFPGA_ARRIA10) don't use standard clock API
and implement dw_spi_get_clk their own way in their clock manager.

Get rid of clock_manager.h include as we don't use
cm_get_spi_controller_clk_hz function anymore. (we use redefined
dw_spi_get_clk in SOCFPGA clock managers instead)

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agoSOCFPGA: clock manager: implement dw_spi_get_clk function
Eugeniy Paltsev [Thu, 28 Dec 2017 12:09:02 +0000 (15:09 +0300)]
SOCFPGA: clock manager: implement dw_spi_get_clk function

Implement dw_spi_get_clk function to override its weak
implementation in designware_spi.c driver.

We need this change to get rid of cm_get_spi_controller_clk_hz
function and clock_manager.h include in designware_spi.c driver.

Reviewed-by: Marek Vasut <marex@denx.de>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
Reviewed-by: Jagan Teki <jagan@openedev.com>
6 years agousb: ehci: mxs: fix swapped argument in ehci_writel()
Daniel Schwierzeck [Thu, 25 Jan 2018 19:43:58 +0000 (20:43 +0100)]
usb: ehci: mxs: fix swapped argument in ehci_writel()

ehci_writel() swaps the arguments for address and value. One call
in ehci-mxs ignores that.

This fixes the warning:

drivers/usb/host/ehci-mxs.c: In function ?ehci_hcd_stop?:
drivers/usb/host/ehci-mxs.c:159:19: error: initialization makes integer from pointer without a cast [-Werror=int-conversion]
  ehci_writel(tmp, &hcor->or_usbcmd);
                   ^
arch/arm/include/asm/io.h:117:34: note: in definition of macro ?writel?
 #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
                                  ^
drivers/usb/host/ehci-mxs.c:159:2: note: in expansion of macro ?ehci_writel?
  ^~~~~~~~~~~

Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agousb: xhci: Fix bool initialization in xhci_bulk_tx
Gustavo A. R. Silva [Sat, 20 Jan 2018 08:37:31 +0000 (02:37 -0600)]
usb: xhci: Fix bool initialization in xhci_bulk_tx

Bool initializations should use true and false.

This issue was detected with the help of Coccinelle.

Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Marek Vasut <marex@denx.de>
6 years agomips: bmips: increment SYS_MALLOC_F_LEN
Álvaro Fernández Rojas [Sat, 20 Jan 2018 10:45:39 +0000 (11:45 +0100)]
mips: bmips: increment SYS_MALLOC_F_LEN

This prevents the following ENOMEM:
Error binding driver 'bmips_cpu': -12

Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoboston: Pad binary in .mcs to a multiple of 16 bytes
Paul Burton [Thu, 18 Jan 2018 22:36:41 +0000 (14:36 -0800)]
boston: Pad binary in .mcs to a multiple of 16 bytes

When flashing U-Boot on a Boston board using Xilinx Vivado tools, the
final 0x00 byte which ends the .relocs section seems to be skipped &
left in flash as 0xff unless the data contained in the .mcs is padded
out to a 16 byte boundary. Without our final zero byte relocation will
fail with an error about a spurious reloc:

Avoid this problem by padding out the data in the .mcs file to a 16 byte
boundary using srec_cat's -range-pad functionality.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
6 years agoddr: altera: silence PHY calibration unless in debug mode
Goldschmidt Simon [Thu, 25 Jan 2018 06:04:44 +0000 (06:04 +0000)]
ddr: altera: silence PHY calibration unless in debug mode

This driver has been using printf() including filename since it was
added. Convert to using debug() instead.

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
6 years agoarm: socfpga: allow configs without network support
Simon Goldschmidt [Thu, 25 Jan 2018 06:18:27 +0000 (07:18 +0100)]
arm: socfpga: allow configs without network support

Currently, socfpga_common.h does not allow configurations without
network support. This is because CONFIG_CMD_PXE is defined in this
file and distro mode has DHCP hard-coded as available.

Fix this by moving CONFIG_CMD_PXE and CONFIG_MENU to the defconfigs
and by making DHCP optional in BOOT_TARGET_DEVICES(func).

Signed-off-by: Simon Goldschmidt <sgoldschmidt@de.pepperl-fuchs.com>
6 years agoMerge branch 'master' of git://git.denx.de/u-boot-coldfire
Tom Rini [Thu, 25 Jan 2018 03:08:00 +0000 (22:08 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-coldfire

6 years agopinctrl: rmobile: Import R8A7794 E2 PFC tables
Marek Vasut [Wed, 17 Jan 2018 21:33:59 +0000 (22:33 +0100)]
pinctrl: rmobile: Import R8A7794 E2 PFC tables

Import PFC tables for R8A7794 E2 SoC from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agopinctrl: rmobile: Import R8A7792 V2H PFC tables
Marek Vasut [Wed, 17 Jan 2018 21:29:50 +0000 (22:29 +0100)]
pinctrl: rmobile: Import R8A7792 V2H PFC tables

Import PFC tables for R8A7792 V2H SoC from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agopinctrl: rmobile: Import R8A7791/R8A7793 M2 PFC tables
Marek Vasut [Wed, 17 Jan 2018 16:14:45 +0000 (17:14 +0100)]
pinctrl: rmobile: Import R8A7791/R8A7793 M2 PFC tables

Import PFC tables for R8A7791 M2W and R8A7793 M2N SoC from upstream Linux
kernel v4.15-rc8, commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agopinctrl: rmobile: Import R8A7790 H2 PFC tables
Marek Vasut [Wed, 17 Jan 2018 21:18:59 +0000 (22:18 +0100)]
pinctrl: rmobile: Import R8A7790 H2 PFC tables

Import PFC tables for R8A7790 H2 SoC from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Import R8A7794 E2 clock tables
Marek Vasut [Wed, 17 Jan 2018 22:39:57 +0000 (23:39 +0100)]
clk: renesas: Import R8A7794 E2 clock tables

Import clock tables for R8A7794 E2 SoC from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Import R8A7792 V2H clock tables
Marek Vasut [Wed, 17 Jan 2018 22:39:10 +0000 (23:39 +0100)]
clk: renesas: Import R8A7792 V2H clock tables

Import clock tables for R8A7792 V2H SoC from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Import R8A7791/R8A7793 M2 clock tables
Marek Vasut [Mon, 8 Jan 2018 15:38:51 +0000 (16:38 +0100)]
clk: renesas: Import R8A7791/R8A7793 M2 clock tables

Import clock tables for R8A7791 M2W and R8A7793 M2N SoC from upstream Linux
kernel v4.15-rc8, commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Import R8A7790 H2 clock tables
Marek Vasut [Wed, 17 Jan 2018 22:14:25 +0000 (23:14 +0100)]
clk: renesas: Import R8A7790 H2 clock tables

Import clock tables for R8A7790 H2 SoC from upstream Linux kernel v4.15-rc8,
commit bebc6082da0a9f5d47a1ea2edc099bf671058bd4 .

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Add Gen2 clock core
Marek Vasut [Mon, 8 Jan 2018 15:38:51 +0000 (16:38 +0100)]
clk: renesas: Add Gen2 clock core

Add common clock code for Renesas RCar Gen2 platforms.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Add DIV6P1 clock type
Marek Vasut [Wed, 17 Jan 2018 23:05:28 +0000 (00:05 +0100)]
clk: renesas: Add DIV6P1 clock type

Add macros for the DIV6P1 clock type, which is used on Gen2
and optionally also on Gen3.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Split out code shared between Gen2 and Gen3
Marek Vasut [Mon, 15 Jan 2018 15:44:39 +0000 (16:44 +0100)]
clk: renesas: Split out code shared between Gen2 and Gen3

Pull code which is common for RCar Gen2 and RCar Gen3 into
separate source file. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Make clock tables Kconfig configurable
Marek Vasut [Mon, 8 Jan 2018 15:32:38 +0000 (16:32 +0100)]
clk: renesas: Make clock tables Kconfig configurable

Add Kconfig entries for each SoC clock table, so they can be
compiled in or out at build time. This can reduce the size of
the binary if desired.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Split SMSTPCR and RMSTPCR tables
Marek Vasut [Sun, 14 Jan 2018 23:58:35 +0000 (00:58 +0100)]
clk: renesas: Split SMSTPCR and RMSTPCR tables

The Gen2 requires setting RMSTPCR before booting, while on Gen3 this
is thus far always zero. Split the tables so the RMSTPCR can be set
too.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Pull Gen3 specific bits into separate header
Marek Vasut [Mon, 8 Jan 2018 16:09:45 +0000 (17:09 +0100)]
clk: renesas: Pull Gen3 specific bits into separate header

Extract the macros specific to Gen3 clock into a separate header.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Make PLL configurations per-SoC
Marek Vasut [Tue, 16 Jan 2018 18:23:17 +0000 (19:23 +0100)]
clk: renesas: Make PLL configurations per-SoC

Not all SoCs have the same PLL configuration options,
so make those PLL configuraion tables per-SoC.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Make clk_ids per-driver
Marek Vasut [Mon, 8 Jan 2018 15:05:28 +0000 (16:05 +0100)]
clk: renesas: Make clk_ids per-driver

Not all drivers use the same IDs, so make those IDs per-driver.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Split RCar Gen3 driver
Marek Vasut [Mon, 8 Jan 2018 13:01:40 +0000 (14:01 +0100)]
clk: renesas: Split RCar Gen3 driver

Split the massive driver into smaller per-SoC drivers and pull the
common code into a separate file. This would allow configuring out
unnecessary clock drivers once the Kconfig changes are in and also
allow adding more clock tables easily.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoserial: sh: Add support for R7S72100 (RZ/A1)
Chris Brandt [Wed, 17 Jan 2018 01:52:18 +0000 (20:52 -0500)]
serial: sh: Add support for R7S72100 (RZ/A1)

Add support for RZ/A1 series SoCs.

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
6 years agoserial: sh: Unify CONFIG_R8A779[01234] as CONFIG_RCAR_GEN2
Marek Vasut [Mon, 22 Jan 2018 00:43:25 +0000 (01:43 +0100)]
serial: sh: Unify CONFIG_R8A779[01234] as CONFIG_RCAR_GEN2

Use the common RCAR_GEN2 config option instead of enumerating
each SoC and having a lengthy ifdef clause. No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoserial: sh: Replace fdtdec_get_addr() with devfdt_get_addr()
Marek Vasut [Wed, 17 Jan 2018 21:36:37 +0000 (22:36 +0100)]
serial: sh: Replace fdtdec_get_addr() with devfdt_get_addr()

Replace fdtdec_get_addr() with devfdt_get_addr() as the later one is
the current recommended practice.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Convert CONFIG_R8A77xx to Kconfig
Marek Vasut [Sun, 7 Jan 2018 18:37:06 +0000 (19:37 +0100)]
ARM: rmobile: Convert CONFIG_R8A77xx to Kconfig

Convert these configuration options to Kconfig, update board defconfigs
and drop them from whitelist.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>