]> git.sur5r.net Git - u-boot/log
u-boot
6 years agogpio: atmel_pio4: give a full configuration when muxing pins
Ludovic Desroches [Tue, 24 Apr 2018 07:16:01 +0000 (10:16 +0300)]
gpio: atmel_pio4: give a full configuration when muxing pins

When a pin is muxed to a peripheral or as a GPIO, the only
configuration that can be set is the pullup. It is too restrictive
so this patch allows to give a full configuration.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
6 years agoboard: atmel: sama5d2_ptc_ek: update pin configuration for NAND
Ludovic Desroches [Mon, 23 Apr 2018 07:59:50 +0000 (10:59 +0300)]
board: atmel: sama5d2_ptc_ek: update pin configuration for NAND

The drive strength has to be set to medium for the NAND data lines.
With a low drive, we can get some data corruption.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
6 years agogpio: atmel_pio4: add drive strength macros
Ludovic Desroches [Mon, 23 Apr 2018 07:59:49 +0000 (10:59 +0300)]
gpio: atmel_pio4: add drive strength macros

Macros for drive strength configuration were missing.

Signed-off-by: Ludovic Desroches <ludovic.desroches@microchip.com>
6 years agopci: intel: Add Intel FPGA PCIe controller driver
Ley Foon Tan [Fri, 20 Apr 2018 13:55:45 +0000 (21:55 +0800)]
pci: intel: Add Intel FPGA PCIe controller driver

Add PCIe driver for Intel FPGA PCIe IP. This driver operates the PCIe IP in
rootport mode only, the EP mode is not supported. The driver is tested
with the Intel e1000e NIC driver.

Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
6 years agoarm64: Add SMC and HVC commands
Michalis Pappas [Fri, 13 Apr 2018 07:40:57 +0000 (10:40 +0300)]
arm64: Add SMC and HVC commands

This patch adds smc and hvc commands, that allow issuing Secure Monitor
Calls and Hypervisor Calls conforming to the ARM SMC Calling Convention.

Add Kconfig items to allow each command can be individually enabled.

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agopinctrl: meson: Update pinmux with new Linux bindings
Neil Armstrong [Wed, 11 Apr 2018 15:40:41 +0000 (17:40 +0200)]
pinctrl: meson: Update pinmux with new Linux bindings

The pinctrl bindings has changed for Amlogic Meson SoCs since Linux 4.13,
update the pinctrl driver to take this in account.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoARM64: meson: Sync DT and Bindings with Linux 4.16
Neil Armstrong [Wed, 11 Apr 2018 15:40:40 +0000 (17:40 +0200)]
ARM64: meson: Sync DT and Bindings with Linux 4.16

Synchronize the Linux Device Tree for Amlogic Meson GX boards from Linux 4.16.0.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoARM: meson: rename GXBB to GX
Neil Armstrong [Wed, 11 Apr 2018 15:13:45 +0000 (17:13 +0200)]
ARM: meson: rename GXBB to GX

Taking into account the Amlogic Family name starts with GX, including
the GXBB, GXL and GXM SoCs.

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
6 years agoclk: clk_stm32f: Use PLLSAIP as USB 48MHz clock
Patrice Chotard [Wed, 11 Apr 2018 15:07:45 +0000 (17:07 +0200)]
clk: clk_stm32f: Use PLLSAIP as USB 48MHz clock

On all STM32F4 and F7 SoCs  family (except STM32F429), PLLSAI
output P can be used as 48MHz clock source for USB and SDMMC.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Tested By: Bruno Herrera <bruherrera@gmail.com>

6 years agodm: led: add testcase for "default-state" property
Patrick Bruenn [Wed, 11 Apr 2018 09:16:29 +0000 (11:16 +0200)]
dm: led: add testcase for "default-state" property

Add two more gpio-leds to sandbox test device tree with default-state
property set to "on"/"off".
Add dm_test_led_default_state() to check that these new LED's are set to
LEDST_ON and LEDST_OFF.

dm: led: add testcase for "default-state" property

Add two more gpio-leds to sandbox test device tree with default-state
property set to "on"/"off".
Add dm_test_led_default_state() to check that these new LED's are set to
LEDST_ON and LEDST_OFF.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
6 years agodm: led: auto probe() LEDs with "default-state"
Patrick Bruenn [Wed, 11 Apr 2018 09:16:28 +0000 (11:16 +0200)]
dm: led: auto probe() LEDs with "default-state"

To avoid board specificy LED activation code, automatically
activate gpio-leds with "default-state" property during bind().

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
6 years agodm: led: Support "default-state" property
Patrick Bruenn [Wed, 11 Apr 2018 09:16:27 +0000 (11:16 +0200)]
dm: led: Support "default-state" property

Add support for the device tree property "default-state". This feature
might be useful for LEDs indicating "power on" or similar states.

Note: Even with this commit gpio-leds remain in reset state. That's
because the led_gpio is not probed until DM_FLAG_ACTIVATED is set.

Signed-off-by: Patrick Bruenn <p.bruenn@beckhoff.com>
6 years agommc: support writing sparse images
Jassi Brar [Fri, 6 Apr 2018 06:35:24 +0000 (12:05 +0530)]
mmc: support writing sparse images

Provide an alternate path for sparse-images to be
written to MMC. For example, via tftp on platforms
that don't support fastboot protocol. Or when an
image is to written at some offset, rather than the
start of a partition.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
[trini: Guard with CONFIG_FASTBOOT_FLASH tests, use LBAF for lbaint_t
        printing]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agofastboot: sparse: make write_sparse_image useable for non-fastboot
Jassi Brar [Fri, 6 Apr 2018 06:35:09 +0000 (12:05 +0530)]
fastboot: sparse: make write_sparse_image useable for non-fastboot

write_sparse_image could be useful for non-fastboot users.
For ex a platform, without usb-device/fastboot support, could
get sparse images over tftp and write using the mmc command.
Or non-android systems could also leverage the sparse format.

Towards that, this patch removes anything fastboot specific from
the write_sparse_image implementation. Which includes making the
function return integer as error code and calls for fastboot logging
via an optional callback function 'mssg'.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
6 years agofastboot: sparse: remove redundant argument to write_sparse_image
Jassi Brar [Fri, 6 Apr 2018 06:34:52 +0000 (12:04 +0530)]
fastboot: sparse: remove redundant argument to write_sparse_image

'sz' has no use for write_sparse_image, remove it simplifying the api.

Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
6 years agoarm: v7R: Add support for enabling caches
Lokesh Vutla [Thu, 26 Apr 2018 12:51:31 +0000 (18:21 +0530)]
arm: v7R: Add support for enabling caches

Cache maintenance procedure is same for v7A and v7R
processors. So re-use cache-cp15.c file except for
mmu parts.

Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoarm: v7R: Add support for MPU
Lokesh Vutla [Thu, 26 Apr 2018 12:51:30 +0000 (18:21 +0530)]
arm: v7R: Add support for MPU

The Memory Protection Unit(MPU) allows to partition memory into regions
and set individual protection attributes for each region. In absence
of MPU a default map[1] will take effect. Add support for configuring
MPU on Cortex-R, by reusing the existing support for Cortex-M processor.

[1] http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0460d/I1002400.html

Tested-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoarm: v7R: Add initial support
Michal Simek [Thu, 26 Apr 2018 12:51:29 +0000 (18:21 +0530)]
arm: v7R: Add initial support

The Cortex-R* processors are a mid-range CPUs for use in deeply-embedded,
real-time systems. It implements the ARMv7-R architecture, and includes
Thumb-2 technology for optimum code density and processing throughput.

Except for MPU(Memory Protection Unit) and few CP15 registers, most of the
features are compatible with v7 architecture. So,reuse the same armv7
folder and introduce a new config CPU_V7R in order to differentiate
from v7 based platforms.

Tested-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoarm: v7: Kconfig: Introduce SYS_ARM_CACHE_CP15
Lokesh Vutla [Thu, 26 Apr 2018 12:51:28 +0000 (18:21 +0530)]
arm: v7: Kconfig: Introduce SYS_ARM_CACHE_CP15

Certain ARM architectures like ARMv7-A, ARMv7-R has support for
enabling caches using CP15 registers. To have a common support
for all these architectures, introduce a Kconfig symbol
SYS_ARM_CACHE_CP15 that selects cache-cp15.c

Tested-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoarm: v7: Kconfig: Add entry for MMU
Lokesh Vutla [Thu, 26 Apr 2018 12:51:27 +0000 (18:21 +0530)]
arm: v7: Kconfig: Add entry for MMU

Add a Kconfig entry for MMU and imply for all platforms using
cache-cp15.c containing MMU setup. Using imply instead of select so that
MMU can be disabled by defconfigs when not needed.

Tested-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoarm: v7: Kconfig: Rename CPU_V7 as CPU_V7A
Lokesh Vutla [Thu, 26 Apr 2018 12:51:26 +0000 (18:21 +0530)]
arm: v7: Kconfig: Rename CPU_V7 as CPU_V7A

Currently CPU_V7 kconfig symbol supports only ARMv7A architectures under
armv7 folder. This led to a misconception of creating separate folders
for armv7m and armv7r. There is no reason to create separate folder for
other armv7 based architectures when it can co-exist with few Kconfig
symbols.

As a first step towards a common folder, rename CPU_V7 as CPUV7A. Later
separate Kconfig symbols can be added for CPU_V7R and CPU_V7M and
can co exist in the same folder.

Reviewed-by: Tom Rini <trini@konsulko.com>
Tested-by: Michal Simek <michal.simek@xilinx.com>
Suggested-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agoarm: v7: Update VBAR only if available
Lokesh Vutla [Thu, 26 Apr 2018 12:51:25 +0000 (18:21 +0530)]
arm: v7: Update VBAR only if available

Not all ARM V7 based cpus has VBAR for remapping
vector base address. So, update VBAR only if it available.

Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
6 years agotest: ofnode: test ofnode_device_is_compatible()
Masahiro Yamada [Thu, 26 Apr 2018 16:02:02 +0000 (01:02 +0900)]
test: ofnode: test ofnode_device_is_compatible()

Test ofnode_device_is_compatible(), and also ofnode_path().

Requested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agotest: regmap: test Linux-compatible syscon_node_to_regmap()
Masahiro Yamada [Mon, 23 Apr 2018 04:26:53 +0000 (13:26 +0900)]
test: regmap: test Linux-compatible syscon_node_to_regmap()

Like Linux, syscon_node_to_regmap() allows a node to work as a syscon
provider without binding it to a syscon driver.  Test this.

Requested-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agosyscon: add Linux-compatible syscon API
Masahiro Yamada [Thu, 19 Apr 2018 03:14:04 +0000 (12:14 +0900)]
syscon: add Linux-compatible syscon API

The syscon implementation in U-Boot is different from that in Linux.
Thus, DT files imported from Linux do not work for U-Boot.

In U-Boot driver model, each node is bound to a dedicated driver
that is the most compatible to it.  This design gets along with the
concept of DT, and the syscon in Linux originally worked like that.

However, Linux commit bdb0066df96e ("mfd: syscon: Decouple syscon
interface from platform devices") changed the behavior because it is
useful to let a device bind to another driver, but still work as a
syscon provider.

That change had happened before U-Boot initially supported the syscon
driver by commit 6f98b7504f70 ("dm: Add support for generic system
controllers (syscon)").  So, the U-Boot's syscon works differently
from the beginning.  I'd say this is mis-implementation given that
DT is not oriented to a particular project, but Linux is the canon
of DT in practice.

The problem typically arises in the combination of "syscon" and
"simple-mfd" compatibles.

In Linux, they are orthogonal, i.e., the order between "syscon" and
"simple-mfd" does not matter at all.

Assume the following compatible.

   compatible = "foo,bar-syscon", "syscon", "simple-mfd";

In U-Boot, this device node is bound to the syscon driver
(driver/core/syscon-uclass.c) since the "syscon" is found to be the
most compatible.  Then, syscon_get_regmap() succeeds.

However,

   compatible = "foo,bar-syscon", "simple-mfd", "syscon";

does not work because this node is bound to the simple-bus driver
(drivers/core/simple-bus.c) in favor of "simple-mfd" compatible.
The compatible string "syscon" is just dismissed.

Moreover,

   compatible = "foo,bar-syscon", "syscon";

works like the first case because the syscon driver populates the
child devices.  This is wrong because populating children is the job
of "simple-mfd" (or "simple-bus").

This commit ports syscon_node_to_regmap() from Linux.  This API
does not require the given node to be bound to a driver in any way.

Reported-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoregmap: change regmap_init_mem() to take ofnode instead udevice
Masahiro Yamada [Thu, 19 Apr 2018 03:14:03 +0000 (12:14 +0900)]
regmap: change regmap_init_mem() to take ofnode instead udevice

Currently, regmap_init_mem() takes a udevice. This requires the node
has already been associated with a device. It prevents syscon/regmap
from behaving like those in Linux.

Change the first argumenet to take a device node.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agodm: ofnode: add ofnode_device_is_compatible() helper
Masahiro Yamada [Thu, 19 Apr 2018 03:14:02 +0000 (12:14 +0900)]
dm: ofnode: add ofnode_device_is_compatible() helper

device_is_compatible() takes udevice, but there is no such a helper
that takes ofnode.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoregmap: clean up regmap allocation
Masahiro Yamada [Thu, 19 Apr 2018 03:14:01 +0000 (12:14 +0900)]
regmap: clean up regmap allocation

Putting zero length array at the end of struct is a common technique
to embed arbitrary length of members.  There is no good reason to let
regmap_alloc_count() branch by "if (count <= 1)".

As far as I understood the code, regmap->base is an alias of
regmap->ranges[0].start, but it is not helpful but make the code
just ugly.

Rename regmap_alloc_count() to regmap_alloc() because the _count
suffix seems pointless.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[trini: fixup cpu_info-rcar.c]
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agopsci: arm: remove armv7 function psci_save_target_pc
Patrick Delaunay [Mon, 16 Apr 2018 08:15:12 +0000 (10:15 +0200)]
psci: arm: remove armv7 function psci_save_target_pc

This function is no more used, and replaced by psci_save
which save also context id as requested by PSCI requirements.

Even if the context id is not used by Linux, it should be saved
and restored in r0 when the CPU_ON is performed.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agosunxi: psci: save context id in cpu_on command
Patrick Delaunay [Mon, 16 Apr 2018 08:15:11 +0000 (10:15 +0200)]
sunxi: psci: save context id in cpu_on command

Replace the psci_save_target_pc call by the new function
psci_save(cpu, pc,context_id)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agouniphier: psci: save context id in cpu_on command
Patrick Delaunay [Mon, 16 Apr 2018 08:15:10 +0000 (10:15 +0200)]
uniphier: psci: save context id in cpu_on command

Replace the psci_save_target_pc call by the new function
psci_save(cpu, pc,context_id)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Acked-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agotegra: psci: save context id in cpu_on command
Patrick Delaunay [Mon, 16 Apr 2018 08:15:09 +0000 (10:15 +0200)]
tegra: psci: save context id in cpu_on command

Replace the psci_save_target_pc call by the new function
psci_save(cpu, pc,context_id)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
6 years agoimx7: psci: save context id in cpu_on command
Patrick Delaunay [Mon, 16 Apr 2018 08:15:08 +0000 (10:15 +0200)]
imx7: psci: save context id in cpu_on command

Replace the psci_save_target_pc call by the new function
psci_save(cpu, pc,context_id)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agols102xa: psci: save context id in cpu_on command
Patrick Delaunay [Mon, 16 Apr 2018 08:15:07 +0000 (10:15 +0200)]
ls102xa: psci: save context id in cpu_on command

Replace the psci_save_target_pc call by the new function
psci_save(cpu, pc,context_id)

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agoarm: stm32mp1: add PSCI support
Patrick Delaunay [Mon, 16 Apr 2018 08:13:24 +0000 (10:13 +0200)]
arm: stm32mp1: add PSCI support

Add PSCI v1.0 support for Linux and manage PSCI state
for each CPU (affinity 0 level) with all mandatory functions:
- PSCI_VERSION
- CPU_SUSPEND
- CPU_OFF
- CPU_ON
- AFFINITY_INFO
- SYSTEM_OFF
- SYSTEM_RESET
- PSCI_FEATURES
and 1 optional to avoid Linux warning
- MIGRATE_INFO_TYPE

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: CITOOLS <smet-aci-reviews@lists.codex.cro.st.com>
6 years agoarm: psci: add a weak function psci_arch_cpu_entry
Patrick Delaunay [Mon, 16 Apr 2018 08:13:23 +0000 (10:13 +0200)]
arm: psci: add a weak function psci_arch_cpu_entry

The added function psci_arch_cpu_entry() is called
during psci_cpu_entry() and can be used by arch to handle
PSCI state transition from ON_PENDING to ON.

The default weak function is empty: not behavior change.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
6 years agoarm: psci: save context id for cpu_on PSCI command
Patrick Delaunay [Mon, 16 Apr 2018 08:13:22 +0000 (10:13 +0200)]
arm: psci: save context id for cpu_on PSCI command

Save and use the 3rd parameter of PSCI CPU_ON request: context_id.

The context_id parameter is only meaningful to the caller.
U-Boot PSCI preserves a copy of the value passed in this parameter.
Following wakeup from a  powerdown state, U-BOOT PSCI places
this value in R0 when it first enters the OS.

NB: this context id is not (yet?) used by Linux but it is mandatory
    to be PSCI compliant.

update armv7 psci functions:
- psci_save_target_pc(): keep for backward compatibility with
  current platform (only save PC and force context id to 0)
  => should be removed when all platform migrate to the new API

- psci_save(): new API to use by ARMv7 platform with PSCI,
  save pc (= entry_point_address) and context_id

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoPrepare v2018.05 v2018.05
Tom Rini [Mon, 7 May 2018 15:32:36 +0000 (11:32 -0400)]
Prepare v2018.05

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agogit-mailrc: Update some addresses and aliases
Tom Rini [Mon, 7 May 2018 15:03:13 +0000 (11:03 -0400)]
git-mailrc: Update some addresses and aliases

- Based on commit 08ae21af9671 ("MAINTAINERS: Switch nxp.com domain")
  update or drop some formerly Freescale addresses.
- Update a few aliases to reflect current custodians

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoSPDX: Convert all of our multiple license tags to Linux Kernel style
Tom Rini [Sun, 6 May 2018 22:27:01 +0000 (18:27 -0400)]
SPDX: Convert all of our multiple license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have multiple licenses (in
these cases, dual license) declared in the SPDX-License-Identifier tag.
In this case we change from listing "LICENSE-A LICENSE-B" or "LICENSE-A
or LICENSE-B" or "(LICENSE-A OR LICENSE-B)" to "LICENSE-A OR LICENSE-B"
as per the Linux Kernel style document.  Note that parenthesis are
allowed so when they were used before we continue to use them.

Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoSPDX: Convert all of our single license tags to Linux Kernel style
Tom Rini [Sun, 6 May 2018 21:58:06 +0000 (17:58 -0400)]
SPDX: Convert all of our single license tags to Linux Kernel style

When U-Boot started using SPDX tags we were among the early adopters and
there weren't a lot of other examples to borrow from.  So we picked the
area of the file that usually had a full license text and replaced it
with an appropriate SPDX-License-Identifier: entry.  Since then, the
Linux Kernel has adopted SPDX tags and they place it as the very first
line in a file (except where shebangs are used, then it's second line)
and with slightly different comment styles than us.

In part due to community overlap, in part due to better tag visibility
and in part for other minor reasons, switch over to that style.

This commit changes all instances where we have a single declared
license in the tag as both the before and after are identical in tag
contents.  There's also a few places where I found we did not have a tag
and have introduced one.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoarm: mach-omap2: cache: Explicitly enable I cache
Lokesh Vutla [Thu, 3 May 2018 15:04:49 +0000 (20:34 +0530)]
arm: mach-omap2: cache: Explicitly enable I cache

omap-common cache enabling sequence relies on cpu_init_cp15()
(inside start.S) for enabling I-caches. But cpu_init_cp15()
can be skipped if CONFIG_SKIP_LOWLEVEL_INIT is defined. So
enable I-caches if not enabled already.

Debugged-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Tested-by: Steve Kipisz <s-kipisz2@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Tested-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoKconfig: Add dependency on HASH to verified boot
Kelvin Cheung [Wed, 2 May 2018 10:07:18 +0000 (18:07 +0800)]
Kconfig: Add dependency on HASH to verified boot

Building with verified boot support requires hash, add that
dependency here. Otherwise the following build error will come out
without crc command.

      LD      u-boot
lib/built-in.o: In function `hash_calculate':
lib/rsa/rsa-checksum.c:29: undefined reference to
`hash_progressive_lookup_algo'
...
make[1]: *** [u-boot] Error 1

Signed-off-by: Kelvin Cheung <keguang.zhang@gmail.com>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
6 years agoboard: ti: am43: Fix DCDC3 voltage for epos-evm
Keerthy [Wed, 2 May 2018 09:36:31 +0000 (15:06 +0530)]
board: ti: am43: Fix DCDC3 voltage for epos-evm

A common voltage of 1.35V was being programmed for all am43 board
versions. EPOS-EVM Needs 1.20V for LPDDR2.

Fixes: fc69d472621b5 (“board: ti: AM43XX: Add ddr voltage rail configuration”)
Reported-by: James Doublesin <doublesin@ti.com>
Signed-off-by: Keerthy <j-keerthy@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agoREADME.sandbox: small typos
Trevor Woerner [Mon, 30 Apr 2018 23:13:05 +0000 (19:13 -0400)]
README.sandbox: small typos

Signed-off-by: Trevor Woerner <twoerner@gmail.com>
6 years agostdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly
Tom Rini [Thu, 3 May 2018 13:12:26 +0000 (09:12 -0400)]
stdio_names: Ensure MAX_NAMES is defined before use, don't use 3 directly

With tighter build flags the fact that <stdio_dev.h> doesn't have a
reference back to MAX_NAMES causes an error.  Include <stdio.h> here and
then in common/console.c use MAX_NAMES rather than 3 when working with
stdio_names.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
6 years agostdio_dev.h: Drop the video section as it is unused
Tom Rini [Thu, 3 May 2018 13:12:25 +0000 (09:12 -0400)]
stdio_dev.h: Drop the video section as it is unused

With tighter build flags the fact that this header referenced
uchar/ushort without including what typedefs it causes an error.  Rather
than add another include here, drop the section in question as it is
unused.

Reported-by: Peter Robinson <pbrobinson@gmail.com>
Tested-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMerge git://git.denx.de/u-boot-usb
Tom Rini [Thu, 3 May 2018 13:20:13 +0000 (09:20 -0400)]
Merge git://git.denx.de/u-boot-usb

6 years agoMerge git://git.denx.de/u-boot-sh
Tom Rini [Thu, 3 May 2018 13:20:02 +0000 (09:20 -0400)]
Merge git://git.denx.de/u-boot-sh

6 years agoARM: rmobile: Zap #undef DEBUG
Marek Vasut [Wed, 2 May 2018 09:55:56 +0000 (11:55 +0200)]
ARM: rmobile: Zap #undef DEBUG

The DEBUG macro is never defined unless explicitly enabled.
Drop useless #undef DEBUG in the board configs so it won't
spread any further.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Contain CONFIG_ARCH_RMOBILE_BOARD_STRING
Marek Vasut [Wed, 2 May 2018 09:51:46 +0000 (11:51 +0200)]
ARM: rmobile: Contain CONFIG_ARCH_RMOBILE_BOARD_STRING

Pull the symbol from the boards and zap struct rmobile_sysinfo as they
are rather useless. The entire purpose of that whole machinery was to
print board name in the CONFIG_ARCH_RMOBILE_BOARD_STRING. Do that in a
far simpler and more contained manner.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Convert CONFIG_ARCH_RMOBILE_BOARD_STRING to Kconfig
Marek Vasut [Wed, 2 May 2018 09:42:22 +0000 (11:42 +0200)]
ARM: rmobile: Convert CONFIG_ARCH_RMOBILE_BOARD_STRING to Kconfig

Convert the symbol to Kconfig, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoARM: rmobile: Fix CONFIG_RMOBILE_BOARD_STRING
Marek Vasut [Wed, 2 May 2018 09:41:17 +0000 (11:41 +0200)]
ARM: rmobile: Fix CONFIG_RMOBILE_BOARD_STRING

Rename CONFIG_RMOBILE_BOARD_STRING to CONFIG_ARCH_RMOBILE_BOARD_STRING
to make things consistent, no functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agodoc: rmobile: Update the README
Marek Vasut [Tue, 1 May 2018 07:28:29 +0000 (09:28 +0200)]
doc: rmobile: Update the README

Synchronize the README with the current state of U-Boot, unify
the build instructions to avoid duplication.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoclk: renesas: Drop USB extal from the R8A7792 clock driver
Marek Vasut [Wed, 2 May 2018 08:48:15 +0000 (10:48 +0200)]
clk: renesas: Drop USB extal from the R8A7792 clock driver

The R8A7792 does not have the USB extal, so drop it.

Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
6 years agoMerge git://git.denx.de/u-boot-mmc
Tom Rini [Wed, 2 May 2018 02:38:18 +0000 (22:38 -0400)]
Merge git://git.denx.de/u-boot-mmc

6 years agoMAINTAINERS: Switch nxp.com domain
Fabio Estevam [Tue, 1 May 2018 18:54:39 +0000 (15:54 -0300)]
MAINTAINERS: Switch nxp.com domain

freescale.com domain is no longer reachable, so switch the
maintainers' emails to nxp.com domain instead.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
6 years agodrivers:power:max77693: remove redundant logical constraint
Heinrich Schuchardt [Sun, 18 Mar 2018 10:52:45 +0000 (11:52 +0100)]
drivers:power:max77693: remove redundant logical constraint

As ret is not set when calling max77693_get_vcell() there is no
need to check ret again.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agommc: zynq_sdhci: use correct quirk if CONFIG_ZYNQ_HISPD_BROKEN is defined
Hannes Schmelzer [Wed, 7 Mar 2018 07:00:57 +0000 (08:00 +0100)]
mmc: zynq_sdhci: use correct quirk if CONFIG_ZYNQ_HISPD_BROKEN is defined

The 'SDHCI_QUIRK_NO_HISPD_BIT' is used wrong here. The purpose of this
quirk is to tell the sdhci-driver that the IP-core doesn't have a "high-
speed-enable" bit in its registers.

With this commit we change this to the correct quirk:
SDHCI_QUIRK_BROKEN_HISPD_MODE

Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
6 years agommc: sdhci: add SDHCI_QUIRK_BROKEN_HISPD_MODE
Hannes Schmelzer [Wed, 7 Mar 2018 07:00:56 +0000 (08:00 +0100)]
mmc: sdhci: add SDHCI_QUIRK_BROKEN_HISPD_MODE

Some IP-core implementations of the SDHCI have different troubles on the
silicon where they are placed.

On ZYNQ platform for example Xilinx doesn't accept the hold timing of an
eMMC chip which operates in High-Speed mode and must be forced to
operate in non high-speed mode. To get rid of this
"SDHCI_QUIRK_BROKEN_HISPD_MODE" is introduced.

For more details about this refer to the Xilinx answer-recor #59999
https://www.xilinx.com/support/answers/59999.html

This commit:
- doesn't set HISPD bit on the host-conroller
- reflects this fact within the host-controller capabilities

Upon this the layer above (mmc-driver) can setup the card correctly.

Otherwise the MMC card will be switched into high-speed mode and causes
possible timing violation on the host-controller side.

Signed-off-by: Hannes Schmelzer <oe5hpm@oevsv.at>
Signed-off-by: Hannes Schmelzer <hannes.schmelzer@br-automation.com>
6 years agommc: fix return value check condition
Peng Fan [Mon, 5 Mar 2018 08:20:40 +0000 (16:20 +0800)]
mmc: fix return value check condition

sd_read_ssr returns 0, means no error.
Fixes: 5b2e72f32721484("mmc: read ssr only if MMC write support is enabled")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Jaehoon Chung <jh80.chung@samsung.com>
Cc: Jean-Jacques Hiblot <jjhiblot@ti.com>
6 years agosamsung: board: init the s2mps11 pmic during booting time
Jaehoon Chung [Mon, 29 Jan 2018 04:53:19 +0000 (13:53 +0900)]
samsung: board: init the s2mps11 pmic during booting time

Exynos5422 board has s2mps11 pmic.
If CONFIG_PMIC_S2MPS11 is enabled, it can initialize PMIC and Regulators
during booting time.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
6 years agoPrepare v2018.05-rc3 v2018.05-rc3
Tom Rini [Tue, 1 May 2018 13:09:31 +0000 (09:09 -0400)]
Prepare v2018.05-rc3

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agousb: f_mass_storage: simplify logical expression
Heinrich Schuchardt [Sun, 18 Mar 2018 12:12:14 +0000 (13:12 +0100)]
usb: f_mass_storage: simplify logical expression

An unsigned int is always >= 0.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agousb: gadget: remove duplicate assignment.
Heinrich Schuchardt [Sun, 18 Mar 2018 12:05:58 +0000 (13:05 +0100)]
usb: gadget: remove duplicate assignment.

We should not make the same assignement twice.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agoMerge git://git.denx.de/u-boot-imx
Tom Rini [Mon, 30 Apr 2018 11:14:05 +0000 (07:14 -0400)]
Merge git://git.denx.de/u-boot-imx

6 years agoMerge git://git.denx.de/u-boot-sunxi
Tom Rini [Mon, 30 Apr 2018 10:52:32 +0000 (06:52 -0400)]
Merge git://git.denx.de/u-boot-sunxi

6 years agotools: mkimage: Check for datafile when type is script
Alex Kiernan [Sun, 22 Apr 2018 05:11:17 +0000 (05:11 +0000)]
tools: mkimage: Check for datafile when type is script

If generating a script image and no datafile has been passed in, mkimage
dies with SIGSEGV:

  #0  __strchr_sse2 () at ../sysdeps/x86_64/multiarch/../strchr.S:32
  #1  0x0000000000403818 in main
      at tools/mkimage.c:503

Add explicit test for datafile to fix this.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agotools: mkenvimage: Fix possible segfault on stdin input
Alexander Dahl [Fri, 20 Apr 2018 13:29:31 +0000 (15:29 +0200)]
tools: mkenvimage: Fix possible segfault on stdin input

The size of 'filebuf' was not increased as more and more bytes are read
from stdin, but 'filebuf' was always reallocated to the same fix size.
This works as long as only less bytes than the initial buffer size come
in, for more input this will segfault. (It actually does, I tested
that.) So for each loop cycle the buffer size has to be increased by the
number of bytes we want to read.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
6 years agotools: mkenvimage: Fix read() stdin error handling
Alexander Dahl [Fri, 20 Apr 2018 13:29:30 +0000 (15:29 +0200)]
tools: mkenvimage: Fix read() stdin error handling

On success read() returns the number of bytes read or zero for EOF. On
error -1 is returned and errno is set, so the right way to test if read
had failed is to test the return value instead of errno.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
6 years agoserial: serial_stm32: Rename status register flags
Patrice Chotard [Fri, 20 Apr 2018 06:59:07 +0000 (08:59 +0200)]
serial: serial_stm32: Rename status register flags

Uart status register is named USART_ISR on STM32F7, STM32H7
and STM32MP1 SoCs family, but USART_SR only on STM32F4 SoCs.

Use USART_ISR_ prefix instead of USART_SR_ .

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agoserial: serial_stm32: Enable overrun
Patrice Chotard [Fri, 20 Apr 2018 06:59:06 +0000 (08:59 +0200)]
serial: serial_stm32: Enable overrun

Enable uart overrun feature which allows to benefits of uart
FIFO usage.

Previously overrun management was disabled, this has to effect
to bypassed the uart FIFO usage even if FIFO was enabled.
In particular configuration, for example when video console is
enabled, copy/pasting a long command line in console results in
corruption. This is due to the fact that a lot of time is consumed
in flushing the cache during frame buffer update, so uart chars are
not read fast enough.

By using uart FIFO and managing overrun, long command line can by
copy/paste in console without being corrupted.

Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
6 years agospl: disk: usb: Add dependencies to sprintf/strto*
Alex Kiernan [Thu, 19 Apr 2018 04:32:57 +0000 (04:32 +0000)]
spl: disk: usb: Add dependencies to sprintf/strto*

If SPL serial support is disabled nothing brings in sprintf, snprintf
or simple_strtoul:

  env/built-in.o: In function `regex_callback':
  env/attr.c:128: undefined reference to `sprintf'
  disk/built-in.o: In function `blk_get_device_by_str':
  disk/part.c:386: undefined reference to `simple_strtoul'
  disk/part.c:395: undefined reference to `simple_strtoul'
  disk/built-in.o: In function `blk_get_device_part_str':
  disk/part.c:522: undefined reference to `simple_strtoul'
  disk/built-in.o: In function `part_set_generic_name':
  disk/part.c:704: undefined reference to `sprintf'
  drivers/built-in.o: In function `init_peripheral_ep':
  drivers/usb/musb-new/musb_gadget.c:1826: undefined reference to `sprintf'
  drivers/built-in.o: In function `musb_core_init':
  drivers/usb/musb-new/musb_core.c:1451: undefined reference to `snprintf'

Add those dependencies here.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoConsolidate __assert_failed into one implementation
Alex Kiernan [Thu, 19 Apr 2018 04:32:56 +0000 (04:32 +0000)]
Consolidate __assert_failed into one implementation

We had two implementations of __assert_failed which were almost identical,
combine them into one.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agospl: Disable printf if not required
Alex Kiernan [Thu, 19 Apr 2018 04:32:55 +0000 (04:32 +0000)]
spl: Disable printf if not required

Now we have a guard for printf, disable it in the build if it's not
selected.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agospl: Split sprintf, strto* from SPL serial in Kconfig
Alex Kiernan [Thu, 19 Apr 2018 04:32:54 +0000 (04:32 +0000)]
spl: Split sprintf, strto* from SPL serial in Kconfig

When SPL serial is disabled, callers who need sprintf or strtoul fail
because their inclusion is guarded by CONFIG_SPL_SERIAL_SUPPORT/
CONFIG_TPL_SERIAL_SUPPORT.

Split printf, sprintf and strto into their own entries and then select
all of them if SERIAL_SUPPORT is enabled to match the current behaviour.

Include panic.o unconditionally as it can be called from anywhere which
uses BUG_ON().

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agospl: ti: Avoid serial calls when serial support is disabled
Alex Kiernan [Thu, 19 Apr 2018 04:32:53 +0000 (04:32 +0000)]
spl: ti: Avoid serial calls when serial support is disabled

If CONFIG_SPL_SERIAL_SUPPORT is not set, then the build will fail:

board/ti/am335x/built-in.o: In function `spl_start_uboot':
board/ti/am335x/board.c:247: undefined reference to `serial_tstc'
board/ti/am335x/board.c:247: undefined reference to `serial_getc'

Avoid the calls to the serial functions in that case.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agospl: Add dependency on serial to Ymodem
Alex Kiernan [Thu, 19 Apr 2018 04:32:52 +0000 (04:32 +0000)]
spl: Add dependency on serial to Ymodem

Building with Ymodem support requires serial in SPL/TPL, add that
dependency here.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agoCleanup CONFIG_SPL_SERIAL_SUPPORT migration
Alex Kiernan [Thu, 19 Apr 2018 04:32:50 +0000 (04:32 +0000)]
Cleanup CONFIG_SPL_SERIAL_SUPPORT migration

CONFIG_SPL_SERIAL_SUPPORT had already been migrated to Kconfig, but
existed in some include files; fix those up here.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agospl: ti: Avoid preloader_console_init if !CONFIG_SPL_SERIAL_SUPPORT
Alex Kiernan [Thu, 19 Apr 2018 04:32:51 +0000 (04:32 +0000)]
spl: ti: Avoid preloader_console_init if !CONFIG_SPL_SERIAL_SUPPORT

If CONFIG_SPL_SERIAL_SUPPORT is disabled then the build fails because
serial_init is undefined. Guard preloader_console_init() appropriately
to fix this.

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
6 years agotest: dm: regmap: fix license header
Masahiro Yamada [Thu, 26 Apr 2018 16:07:21 +0000 (01:07 +0900)]
test: dm: regmap: fix license header

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agoarm: move SYS_ARCH_TIMER to KConfig
Andre Przywara [Thu, 12 Apr 2018 01:24:46 +0000 (04:24 +0300)]
arm: move SYS_ARCH_TIMER to KConfig

SYS_ARCH_TIMER guards the usage of the ARM Generic Timer (aka arch
timer) in U-Boot.
At the moment it is mandatory for ARMv8 and used by a few ARMv7 boards.
Add a proper Kconfig symbol to express this dependency properly,
allowing certain board configuration to later disable arch timer in case
there are any problems with it.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
[tuomas: rebase + fix conflicts and resync with moveconfig & use select]
Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agoARM: qemu-arm: Dynamically determine timer frequency
Tuomas Tynkkynen [Thu, 12 Apr 2018 01:24:45 +0000 (04:24 +0300)]
ARM: qemu-arm: Dynamically determine timer frequency

After commit 46fc679ede5f69 ("arm: timer: get frequency for arch timer
armv7 in cp15 cntfrq") the ARM architected timer driver knows how to
determine the timer frequency at runtime by reading the CNTFRQ register,
so we don't need to hardcode the timer frequency anymore.

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
6 years agoconfigs: Resync with savedefconfig
Tom Rini [Sat, 28 Apr 2018 14:45:55 +0000 (10:45 -0400)]
configs: Resync with savedefconfig

Rsync all defconfig files using moveconfig.py

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agodistro: select CMD_ENV_EXISTS
Masahiro Yamada [Wed, 25 Apr 2018 10:16:48 +0000 (19:16 +0900)]
distro: select CMD_ENV_EXISTS

'env exists' is used for scripting in include/config_distro_bootcmd.h
This command is available only when CONFIG_CMD_ENV_EXISTS is enabled.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Alexander Graf <agraf@suse.de>
6 years agodistro: use imply to enable DISTRO_DEFAULTS as SoC default
Masahiro Yamada [Wed, 25 Apr 2018 09:47:52 +0000 (18:47 +0900)]
distro: use imply to enable DISTRO_DEFAULTS as SoC default

The default of DISTRO_DEFAULTS is messy.  Using the 'imply' keyword
is equivalent and cleaner.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
6 years agopowerpc: fix typo in kgdb.c
Heinrich Schuchardt [Mon, 23 Apr 2018 20:27:41 +0000 (22:27 +0200)]
powerpc: fix typo in kgdb.c

%s/alingment/alignment/

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
6 years agolib/rsa: Kconfig: Remove superfluous 'depends on RSA'
Eugeniu Rosca [Sat, 21 Apr 2018 12:00:10 +0000 (14:00 +0200)]
lib/rsa: Kconfig: Remove superfluous 'depends on RSA'

RSA_SOFTWARE_EXP and RSA_FREESCALE_EXP are wrapped inside:

if RSA
...
endif

So, remove the redundant "depends on RSA" from their depends expression.
In addition, move SPL_RSA into the same "if RSA ... endif" block, since
its only direct dependeny is CONFIG_RSA. This tidies up and simplifies
reading of lib/rsa/Kconfig.

No functional change intended.

Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoMigrate IMAGE_FORMAT_LEGACY to Kconfig
Alex Kiernan [Fri, 20 Apr 2018 21:25:38 +0000 (21:25 +0000)]
Migrate IMAGE_FORMAT_LEGACY to Kconfig

This converts IMAGE_FORMAT_LEGACY to Kconfig

Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
6 years agocmd: CONFIG_CMD_LOG select CONFIG_LOG
Heinrich Schuchardt [Thu, 19 Apr 2018 20:02:46 +0000 (22:02 +0200)]
cmd: CONFIG_CMD_LOG select CONFIG_LOG

CONFIG_CMD_LOG without CONFIG_LOG leads to a build error:
‘gd_t {aka volatile struct global_data}’ has no member named
‘default_log_level’

So CMD_LOG should select LOG.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agolog: CONFIG_LOG should select CONFIG_DM
Heinrich Schuchardt [Thu, 19 Apr 2018 19:59:04 +0000 (21:59 +0200)]
log: CONFIG_LOG should select CONFIG_DM

Compling with CONFIG_LOG and without CONFIG_DM results in
common/log.c:47: undefined reference to `uclass_get_name'

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agokbuild: use -fmacro-prefix-map to make __FILE__ a relative path
Masahiro Yamada [Mon, 16 Apr 2018 04:18:31 +0000 (13:18 +0900)]
kbuild: use -fmacro-prefix-map to make __FILE__ a relative path

The __FILE__ macro is used everywhere in U-Boot to locate the file
printing the log message, such as WARN_ON(), etc.  If U-Boot is
built out of tree, this can be a long absolute path.

This is because Kbuild runs in the objtree instead of the srctree,
then __FILE__ is expanded to a file path prefixed with $(srctree)/.

A brand-new option from GCC, -fmacro-prefix-map, solves this problem.
If your compiler supports it, __FILE__ is the relative path from the
srctree regardless of O= option.  This provides more readable log,
more reproducible builds, and smaller image size.

[ Linux commit: a73619a845d5625079cc1b3b820f44c899618388 ]

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
6 years agoserial: Migrate CONFIG_FSL_LINFLEXUART to Kconfig
Tuomas Tynkkynen [Mon, 9 Apr 2018 01:34:34 +0000 (04:34 +0300)]
serial: Migrate CONFIG_FSL_LINFLEXUART to Kconfig

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoARM: s32v234evb: Set CONFIG_DM & CONFIG_DM_SERIAL in Kconfig
Tuomas Tynkkynen [Mon, 9 Apr 2018 01:34:33 +0000 (04:34 +0300)]
ARM: s32v234evb: Set CONFIG_DM & CONFIG_DM_SERIAL in Kconfig

These symbols are declared in Kconfig, so it's wrong to set them in
header files.

Note that this is not size-neutral - some 'default y' options will now
get turned on by Kconfig, such as CONFIG_CMD_DM=y and CONFIG_DM_STDIO=y.

Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
6 years agoconfigs: Drop CONFIG_NET_MULTI
Tom Rini [Mon, 23 Apr 2018 13:13:09 +0000 (09:13 -0400)]
configs: Drop CONFIG_NET_MULTI

We have not had CONFIG_NET_MULTI be meaningful for quite some time, drop
the last remnants.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoclang: Update documentation
Tom Rini [Sun, 22 Apr 2018 23:15:03 +0000 (19:15 -0400)]
clang: Update documentation

As of clang-5.0, things have changed a bit.  First, we cannot
automatically guess -target values as if we do not pass one with CC then
cc-option will fail.  Second, to disable movt/movw relocations the
argument has become -mno-movt.

Related to the target part, we cannot use arm-none-eabi as that ends up
being too generic of an ARM target for things like say rpi_3_32b to
work.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoMakefile: Update clang warning disables from Linux
Tom Rini [Sun, 22 Apr 2018 14:20:50 +0000 (10:20 -0400)]
Makefile: Update clang warning disables from Linux

Re-sync the logic about which clang warnings to disable from v4.17-rc1.
Note that we don't disable all of the same ones as for now we haven't
run into any cases of warnings from clang in code from upstream Linux.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoRemove unnecessary instances of DECLARE_GLOBAL_DATA_PTR
Tom Rini [Wed, 18 Apr 2018 17:50:47 +0000 (13:50 -0400)]
Remove unnecessary instances of DECLARE_GLOBAL_DATA_PTR

We have a large number of places where while we historically referenced
gd in the code we no longer do, as well as cases where the code added
that line "just in case" during development and never dropped it.

Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoConvert CONFIG_SPI to Kconfig
Adam Ford [Sun, 15 Apr 2018 17:51:26 +0000 (13:51 -0400)]
Convert CONFIG_SPI to Kconfig

This converts the following to Kconfig:
   CONFIG_SPI

This partly involves updating code that assumes that CONFIG_SPI implies
things that are specific to the MPC8xx SPI driver.  For now, just update
the CONFIG tests.  This also involves reworking the default for
CONFIG_SYS_DEF_EEPROM_ADDR so that we don't set it when we cannot make a
reasonable default, as it does not cause any compile failures.

Signed-off-by: Adam Ford <aford173@gmail.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
6 years agoARM: mxs: support full SPL framework
Mans Rullgard [Sat, 21 Apr 2018 15:11:10 +0000 (16:11 +0100)]
ARM: mxs: support full SPL framework

This allows using the full SPL framework on mxs devices.  In this
mode, the u-boot.sb image loaded by the boot ROM contains only the
SPL which then loads U-Boot proper or a kernel in falcon mode.

Signed-off-by: Mans Rullgard <mans@mansr.com>