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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Mon, 7 May 2018 15:32:36 +0000 (11:32 -0400)]
Prepare v2018.05
Signed-off-by: Tom Rini <trini@konsulko.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Thu, 3 May 2018 13:20:13 +0000 (09:20 -0400)]
Merge git://git.denx.de/u-boot-usb
Tom Rini [Thu, 3 May 2018 13:20:02 +0000 (09:20 -0400)]
Merge git://git.denx.de/u-boot-sh
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>
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>
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>
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>
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>
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>
Tom Rini [Wed, 2 May 2018 02:38:18 +0000 (22:38 -0400)]
Merge git://git.denx.de/u-boot-mmc
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>
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>
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>
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>
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>
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>
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>
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>
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>
Tom Rini [Mon, 30 Apr 2018 11:14:05 +0000 (07:14 -0400)]
Merge git://git.denx.de/u-boot-imx
Tom Rini [Mon, 30 Apr 2018 10:52:32 +0000 (06:52 -0400)]
Merge git://git.denx.de/u-boot-sunxi
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Mans Rullgard [Sat, 21 Apr 2018 15:11:09 +0000 (16:11 +0100)]
ARM: mxs: move spl data
With full SPL enabled, the loaded image overwrites the mxs_spl_data
location. Moving it a slightly lower address fixes this.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 21 Apr 2018 15:11:08 +0000 (16:11 +0100)]
ARM: spl: include arm/thumb glue sections
When building in Thumb mode, the linker might generate mode switching
stubs in .glue sections. Include these in the final link.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 21 Apr 2018 15:11:07 +0000 (16:11 +0100)]
ARM: arm926ejs: fix lowlevel_init call
The code attempts to preserve the value of LR by storing it in R12/IP
across the lowevel_init() call. However, this register is not saved
by the callee. Use a register that guaranteed to be preserved instead.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Mans Rullgard [Sat, 21 Apr 2018 15:11:06 +0000 (16:11 +0100)]
ARM: mxs: make lowlevel_init() weak
With the full SPL framework enabled, lowlevel_init() is required.
Make the empty stub weak so boards can override it.
Signed-off-by: Mans Rullgard <mans@mansr.com>
Tom Rini [Fri, 27 Apr 2018 02:09:11 +0000 (22:09 -0400)]
Merge git://git.denx.de/u-boot-usb
Tom Rini [Fri, 27 Apr 2018 02:09:03 +0000 (22:09 -0400)]
Merge git://git.denx.de/u-boot-socfpga
Tom Rini [Fri, 27 Apr 2018 02:08:58 +0000 (22:08 -0400)]
Merge git://git.denx.de/u-boot-sh
Tien Fong Chee [Tue, 5 Dec 2017 07:57:58 +0000 (15:57 +0800)]
arm: socfpga: Fix with the correct polling on bit is set
Commit
2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10")
Polling on wrong cleared bit. Fix with correct polling on bit is set.
Fixes:
2baa997240d ("arm: socfpga: Add FPGA driver support for Arria 10")
Signed-off-by: Tien Fong Chee <tien.fong.chee@intel.com>
Christophe Kerello [Thu, 15 Mar 2018 08:34:17 +0000 (09:34 +0100)]
usb: gadget: composite: fix NULL pointer when a non standard request is received
In case usb configuration is unknown (cdev->config == NULL), non standard
request should not be processed.
Remove also the cdev->config check below which will never happen.
This issue was seen using ums feature.
Signed-off-by: Christophe Kerello <christophe.kerello@st.com>
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Neil Armstrong [Wed, 25 Apr 2018 09:39:08 +0000 (11:39 +0200)]
usb: host: dwc3: fix phys init
When no PHYs are declared in the dwc3 node, the phy init fails.
This patch checks if the "phys" property is presend and reports
the error returned by dev_count_phandle_with_args().
This patchs also fixes the styles issues added in last commit.
This patch should fix the DWC3 support on the UniPhier SoC family.
Fixes:
7c839ea70c49 ("usb: host: dwc3: Add support for multiple PHYs")
Reported-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Marek Vasut [Sun, 22 Apr 2018 02:44:05 +0000 (04:44 +0200)]
ARM: rmobile: Fix PMIC address on E2 Silk
The PMIC is at 0x5a, fix the address.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Mon, 23 Apr 2018 18:24:16 +0000 (20:24 +0200)]
ARM: rmobile: Update E2 Alt
The E2 Alt port was broken since some time. This patch updates
the E2 Alt port to use modern frameworks, DM, DT probing, SPL
for the preloading and puts it on par with the M2 Porter board.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Mon, 23 Apr 2018 18:24:10 +0000 (20:24 +0200)]
ARM: rmobile: Update M2-N Gose
The M2-N Gose port was broken since some time. This patch updates
the M2-N Gose port to use modern frameworks, DM, DT probing, SPL
for the preloading and puts it on par with the M2 Porter board.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Mon, 23 Apr 2018 18:24:06 +0000 (20:24 +0200)]
ARM: rmobile: Update H2 Lager
The H2 Lager port was broken since some time. This patch updates
the H2 Lager port to use modern frameworks, DM, DT probing, SPL
for the preloading and puts it on par with the M2 Porter board.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Tue, 24 Apr 2018 11:00:34 +0000 (13:00 +0200)]
ARM: rmobile: Enable HS200 support on M3N Salvator-X
Enable the HS200 support on M3N Salvator-X .
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tom Rini [Thu, 26 Apr 2018 11:21:41 +0000 (07:21 -0400)]
Merge git://git.denx.de/u-boot-rockchip
Sébastien Szymanski [Tue, 17 Apr 2018 15:29:32 +0000 (17:29 +0200)]
imx6ul: opos6ul: in Serial Downloader boot mode use ymodem
When booting in Serial Downloader mode load the U-Boot image using
ymodem.
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Sébastien Szymanski [Tue, 17 Apr 2018 15:29:31 +0000 (17:29 +0200)]
imx6ul: opos6ul: add SPL_DM support
Since commit commit
152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL
support") the OPOS6UL board doesn't boot anymore. Adding SPL_DM support
makes the board boot again.
Fixes: commit
152038ea1886 ("i.MX6UL: icore: Add SPL_OF_CONTROL support")
Signed-off-by: Sébastien Szymanski <sebastien.szymanski@armadeus.com>