Moti Buskila [Fri, 19 Feb 2021 16:11:18 +0000 (17:11 +0100)]
ddr: marvell: a38x: add 16Gbit memory devices support
commit
994509eb4fe6771d92cd06314c37895098ac48fa upstream.
Signed-off-by: Moti Buskila <motib@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Baruch Siach [Fri, 19 Feb 2021 16:11:17 +0000 (17:11 +0100)]
ddr: marvell: a38x: allow board specific ODT configuration
commit
2d3b9437cf38c06c4330e0de07f29476197f5e04 upstream.
The ODT enable heuristic based on active chip-selects is not always
correct. Some board might use two chip-selects, but have only one ODT
line connected. Allow board specific mv_ddr_topology_map to directly set
the ODT configuration register value.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Moti Buskila <motib@marvell.com>
Reviewed-by: Nadav Haklai <Nadav.Haklai@cavium.com>
Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Marek Behún [Fri, 19 Feb 2021 16:11:16 +0000 (17:11 +0100)]
ddr: marvell: a38x: import header change from upstream
commit
3908e20c6c520339e9bddb566823ae5e065d5218 upstream.
The commit mentioned above changes non-DDR3 stuff in upstream, but it
also changes header ddr_topology_def.h.
Import this header change to remain consistent with upstream.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Moti Buskila [Fri, 19 Feb 2021 16:11:15 +0000 (17:11 +0100)]
ddr: marvell: a38x: fix memory size calculation using 32bit bus width
commit
ab9240402a70cc02496683971779e75eff410ab4 upstream.
- function mv_ddr_spd_die_capacity_user_get() has a bug,
since it insert a user memory enum to it,
instead of SPD memory enum (which are different)
- fix: remove mv_ddr_spd_die_capacity_user_get() function.
- memory size with 64 and 32 bit already calculated correctly
at mv_ddr_mem_sz_per_cs_get() function
Signed-off-by: Moti Buskila <motib@marvell.com>
Reviewed-by: Stefan Chulski <Stefan.Chulski@cavium.com>
Reviewed-by: Alex Leibovich <alexl@marvell.com>
Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Moti Buskila [Fri, 19 Feb 2021 16:11:14 +0000 (17:11 +0100)]
ddr: marvell: a38x: fix 32bit
commit
0b5adedd4ced9b8f528faad1957d4d69e95759ef upstream.
Signed-off-by: Moti Buskila <motib@marvell.com>
Reviewed-by: Alex Leibovich <alexl@marvell.com>
Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Marek Behún [Fri, 19 Feb 2021 16:11:13 +0000 (17:11 +0100)]
ddr: marvell: a38x: import header change from upstream
commit
6c705ebc0d70f67ed7cae83ad1978c3305ef25be upstream.
The commit mentioned above changes non-DDR3 stuff in upstream, but it
also changes header mv_ddr_topology.h.
Import this header change to remain consistent with upstream.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Alex Leibovich [Fri, 19 Feb 2021 16:11:12 +0000 (17:11 +0100)]
ddr: marvell: a38x: add ddr 32bit ECC support
commit
61a8910998d7b553e80f600ebe8147a8b98f0945 upstream.
Required changes made for 32bit ddr support.
An update is made to the topology map, according to
bus_act_mask, set in the dram_port.c
Signed-off-by: Alex Leibovich <alexl@marvell.com>
Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Alex Leibovich [Fri, 19 Feb 2021 16:11:11 +0000 (17:11 +0100)]
ddr: marvell: a38x: add ddr32 support
commit
32800667b375ebd1f82120da0f3479b1cf52d96d upstream.
Required changes made for 32bit ddr support.
An update is made to the topology map, according to
bus_act_mask, set in the dram_port.c
Signed-off-by: Alex Leibovich <alexl@marvell.com>
Reviewed-by: Nadav Haklai <Nadav.Haklai@cavium.com>
Reviewed-by: Kostya Porotchkin <Kostya.Porotchkin@cavium.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Marek Behún [Fri, 19 Feb 2021 16:11:10 +0000 (17:11 +0100)]
ddr: marvell: a38x: import header change from upstream
commit
a165037ec26f301be75e1fabc263643683e85255 upstream.
The commit mentioned above changes non-DDR3 stuff in upstream, but it
also changes header ddr_topology_def.h.
Import this header change to remain consistent with upstream.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Moti Buskila [Fri, 19 Feb 2021 16:11:09 +0000 (17:11 +0100)]
ddr: marvell: a38x: fix write leveling suplementary algo
commit
ce62bef8fac559e27245259882e45f19cdc293ad upstream.
- fix JIRA A7K8K-5056
- remove TEST_PATTERN write at the load patern stage earlier to WL SUP stage
- the WL SUP stage already writes this pattern to the memory, if the pattern exist at the memory
then the algorithm will fail, since it think that there are no phase to correct
Signed-off-by: Moti Buskila <motib@marvell.com>
Reviewed-by: Kostya Porotchkin <kostap@marvell.com>
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Marek Behún [Tue, 9 Feb 2021 02:43:03 +0000 (03:43 +0100)]
ARM: dts: armada-385-turris-omnia: rename node in -u-boot.dtsi file
The SPI NOR flash node name in main device tree for Turris Omnia is
called `spi-nor@0`.
Rename node spi-flash@0 in Turris Omnia's -u-boot.dtsi file to spi-nor@0
so that U-Boot does not try to probe the same SPI NOR device multiple
times.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
Marek Behún [Mon, 8 Feb 2021 22:01:41 +0000 (23:01 +0100)]
pci: pci_mvebu: set local dev to number 1
Linux displays the real PCIe card connected to a mvebu PCIe slot as
device 0, not 1. This is done by setting local dev number to 1, so that
the local "Marvell Memory controller" device is on address 1.
Let's do it also in U-Boot.
With this commit the pci command in U-Boot prints something like:
=> pci
Scanning PCI devices on bus 0
BusDevFun VendorId DeviceId Device Class Sub-Class
_____________________________________________________________
00.00.00 0x168c 0x003c Network controller 0x80
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Mon, 8 Feb 2021 22:01:40 +0000 (23:01 +0100)]
pci: pci_mvebu: refactor validation of addresses for config access
Refactor validation of bdf parameter in mvebu_pcie_read/write_config
functions.
We can simplify the code by putting the validation into separate
function.
Also there are always only two devices visible on local bus:
* on slot configured by function mvebu_pcie_set_local_dev_nr()
(by default this register is set to 0) there is a
"Marvell Memory controller", which isn't useful in root complex
mode,
* on all other slots the real PCIe card connected to the PCIe slot.
We can simplify the code even more by simply allowing access only to
the real PCIe card.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Mon, 8 Feb 2021 22:01:39 +0000 (23:01 +0100)]
pci: pci_mvebu: debug rd/wr config as other drivers do
Other drivers (aardvark, intel_fpga) print "(addr,size,val)" when
debugging is enabled. Print size for pci_mvebu as well.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Mon, 8 Feb 2021 22:01:38 +0000 (23:01 +0100)]
pci: pci_mvebu: cosmetic fix
Write bdf address in a same way in mvebu_pcie_read/write_config.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Mon, 8 Feb 2021 22:01:37 +0000 (23:01 +0100)]
pci: pci_mvebu: use dev_seq instead of static variable
PCI uclass maps PCI bus numbers to the seq member of struct udevice.
Use dev_seq(dev) as the bus number in mvebu_pcie_probe instead of an
incrementing a static variable.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Stefan Roese <sr@denx.de>
Cc: Phil Sutter <phil@nwl.cc>
Cc: Mario Six <mario.six@gdsys.cc>
Cc: Baruch Siach <baruch@tkos.co.il>
Reviewed-by: Stefan Roese <sr@denx.de>
Marek Behún [Fri, 5 Feb 2021 14:32:31 +0000 (15:32 +0100)]
arm: mvebu: turris_mox: Enable NVMe support
NVMe drives can be connected to Turris MOX via MOX B and MOX G
extensions.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Fri, 5 Feb 2021 14:32:30 +0000 (15:32 +0100)]
arm: mvebu: turris_mox: Enable CONFIG_USB_XHCI_PCI
USB devices can be connected to Turris MOX also via MOX F extension which
contains VL805 PCIe based USB 3.0 controller.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Fri, 5 Feb 2021 14:32:29 +0000 (15:32 +0100)]
arm: mvebu: turris_mox: Enable CONFIG_PCI_PNP
PCIe devices do not work in U-Boot without proper initialization and
configuration of PCI config space like the PCI_BASE_ADDRESS_0 register.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Pali Rohár [Fri, 5 Feb 2021 14:32:28 +0000 (15:32 +0100)]
arm: a37xx: pci: Set Max Payload Size and Max Read Request Size to 512 bytes
Fix usage of VL805 XHCI PCIe controller when it is connected via PCIe to
Armada 3720 SOC. Without this U-Boot crashes when trying to access
enumerated USB devices connected to this XHCI PCIe controller.
This should be done according to the PCIe Link Initialization sequence, as
defined in Marvell Armada 3720 Functional Specification.
Linux has this code too.
Signed-off-by: Pali Rohár <pali@kernel.org>
Reviewed-by: Marek Behún <marek.behun@nic.cz>
Reviewed-by: Stefan Roese <sr@denx.de>
Tom Rini [Thu, 25 Feb 2021 18:18:27 +0000 (13:18 -0500)]
Merge branch '2021-02-25-remove-platforms'
- Remove various older platforms that are missing DM migrations and have
had their removal ack'd.
Tom Rini [Sun, 21 Feb 2021 01:06:29 +0000 (20:06 -0500)]
ppc: Remove MPC8569MDS board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it. As this is the last ARCH_MPC8569 board, remove that support
as well.
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Tom Rini [Sun, 21 Feb 2021 01:06:28 +0000 (20:06 -0500)]
ppc: configs: Remove a few non-updated build configurations
In the cases of T2080RDB_SECURE_BOOT, T2080RDB_SRIO_PCIE_BOOT,
P2041RDB_SECURE_BOOT, P2041RDB_SRIO_PCIE_BOOT, P3041DS_SRIO_PCIE_BOOT
and P4080DS_SRIO_PCIE_BOOT while some forms of the board have been
migrated more fully to current build standards, these have not. Remove
them.
Cc: Priyanka Jain <priyanka.jain@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Tom Rini [Sun, 21 Feb 2021 01:06:17 +0000 (20:06 -0500)]
arm: Remove sksimx6 board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Stefano Babic <sbabic@denx.de>
Signed-off-by: Tom Rini <trini@konsulko.com>
Acked-by: Stefano Babic <sbabic@denx.de>
Tom Rini [Sun, 21 Feb 2021 01:06:12 +0000 (20:06 -0500)]
arm: Remove mx53smd board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Tom Rini [Sun, 21 Feb 2021 01:06:10 +0000 (20:06 -0500)]
arm: Remove mx53ard board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Tom Rini [Sun, 21 Feb 2021 01:05:44 +0000 (20:05 -0500)]
arm: Remove mx25pdk board
This board has not been converted to CONFIG_DM_MMC by the deadline.
Remove it.
Cc: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Fabio Estevam <festevam@gmail.com>
Tom Rini [Thu, 25 Feb 2021 13:20:54 +0000 (08:20 -0500)]
Merge branch '2021-02-24-assorted-fixes'
- squashfs, btrfs fixes
- Kconfig CONFIG logic fixes
- hikey DM migration
- Some portability fixes for the build system
- Assorted code cleanups
Siew Chin Lim [Tue, 23 Feb 2021 06:34:37 +0000 (14:34 +0800)]
common: Add "ifndef __ASSEMBLY__" in asm/global_data.h
Commit "common: Drop asm/global_data.h from common header" added
asm/global_data.h into secure.h. However, secure.h will be included
by psci.S. Adding asm/global_data.h has caused compilation failure in
pcsi.S. Add "ifndef __ASSEMBLY__" in asm/global_data.h.
Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Sat, 20 Feb 2021 09:44:04 +0000 (10:44 +0100)]
net: cortina_ni: buffer overrun
When copying to a u32 field we should use sizeof(u32) and not
sizeof(*u32) in memcpy.
On 64bit systems like cortina_presidio-asic-emmc_defconfig using
sizeof(*u32) leads to a buffer overrun.
Fixes:
febe13b438b3 ("net: cortina_ni: Add eth support for Cortina Access CAxxxx SoCs")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-By: Ramon Fried <rfried.dev@gmail.com>
Heinrich Schuchardt [Sat, 20 Feb 2021 09:42:50 +0000 (10:42 +0100)]
mtd: rawnand: cortina_nand: missing initialization
ca_do_bch_correction() takes a random value from the stack and starts
counting bitflips from this value. Initialize the counter.
This passed unnoticed as the value is finally ignored in the call
hierarchy.
Fixes:
161df94b3c43 ("mtd: rawnand: cortina_nand: Add Cortina CAxxxx SoC support")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Sat, 20 Feb 2021 09:40:23 +0000 (10:40 +0100)]
dm: ddr: socfpga: don't assign values that are not used
The values of left_edge[0] and right_edge[0] are overwritten before they
are used. Remove the superfluous assignments.
Fixes:
285b3cb939a8 ("dm: ddr: socfpga: fix gen5 ddr driver to not use bss")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Siew Chin Lim [Fri, 19 Feb 2021 02:32:07 +0000 (10:32 +0800)]
lib: sha512: include "compiler.h"
Include "compiler.h" in sha512.c. This is needed by 'cpu_to_be64' macro
that used in 'sha512_base_do_finalize' function.
Signed-off-by: Siew Chin Lim <elly.siew.chin.lim@intel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Peter Robinson [Thu, 18 Feb 2021 20:06:37 +0000 (20:06 +0000)]
rng: iProc rng200: Rename ..._platdata variables to just ..._plat
In
8a8d24bd Simon dropped data from all the various _platdata calls
but it seems this wasn't caught for the RNG200 driver from when it
was posted to merged. This fixes that issue.
Fixes:
537f0018 (rng: Add iProc RNG200 driver)
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Heinrich Schuchardt [Wed, 17 Feb 2021 11:58:14 +0000 (12:58 +0100)]
test: missing dependency for test/cmd/setexpr.c
test/cmd/setexpr.c cannot be linked with CONFIG_CMD_SETEXPR=n:
ld.bfd: test/built-in.o: in function `setexpr_test_sub':
test/cmd/setexpr.c:227: undefined reference to `setexpr_regex_sub'
ld.bfd: test/built-in.o: in function `setexpr_test_backref':
test/cmd/setexpr.c:267: undefined reference to `setexpr_regex_sub'
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Wed, 17 Feb 2021 11:54:31 +0000 (12:54 +0100)]
lib: rsa: struct udevice build warning
Avoid build warnings observed with gcc 10.2
In file included from lib/rsa/rsa-keyprop.c:16:
include/u-boot/rsa-mod-exp.h:65:24: warning:
‘struct udevice’ declared inside parameter list will not be visible
outside of this definition or declaration
65 | int rsa_mod_exp(struct udevice *dev, const uint8_t *sig,
| uint32_t sig_len,
| ^~~~~~~
include/u-boot/rsa-mod-exp.h:96:24: warning:
‘struct udevice’ declared inside parameter list will not be visible
outside of this definition or declaration
96 | int (*mod_exp)(struct udevice *dev, const uint8_t *sig,
|
by defining struct udevice.
Fixes:
401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Matthias Brugger [Tue, 16 Feb 2021 19:54:07 +0000 (20:54 +0100)]
configs: BPI-R2: Disable EFI Grub workaround
The EFI Grub workaround on BananaPi R2 slows down the boot process to
the point, that the watchdog will trigger a reboot before the kernel can
reset it. Fix this by disabeling the workaround.
Signed-off-by: Matthias Brugger <mbrugger@suse.com>
Sean Anderson [Tue, 16 Feb 2021 16:40:15 +0000 (11:40 -0500)]
lib: rsa: Add debug message on algo mismatch
Currently we fail silently if there is an algorithm mismatch. To help
distinguish this failure condition.
Signed-off-by: Sean Anderson <sean.anderson@seco.com>
Diego Sueiro [Mon, 15 Feb 2021 07:27:57 +0000 (07:27 +0000)]
vexpress64_fvp: Set DRAM to 4G to match with kernel devicetree
Currently, the kernel devicetree is setting the DRAM size to ~4G.
Signed-off-by: Diego Sueiro <diego.sueiro@arm.com>
Vincent Stehlé [Sun, 14 Feb 2021 18:39:04 +0000 (19:39 +0100)]
virtio: fix off by one device id comparison
VIRTIO_ID_MAX_NUM is the largest device ID plus 1. Therefore a device id
cannot be greater or equal to VIRTIO_ID_MAX_NUM. Fix the comparison
accordingly.
Fixes:
8fb49b4c7a82 ("dm: Add a new uclass driver for VirtIO transport devices")
Signed-off-by: Vincent Stehlé <vincent.stehle@laposte.net>
Cc: Simon Glass <sjg@chromium.org>
Cc: Bin Meng <bmeng.cn@gmail.com>
Roger Pau Monne [Sat, 13 Feb 2021 10:06:32 +0000 (11:06 +0100)]
build/DTC: fix sed usage in DTC command
Current sed usage in the DTC command relies on GNU sed specific -i
option which has a slightly different syntax for BSD sed and always
expects an extension to be provided in order to create a backup file.
Instead drop the cat concatenation done before the sed call and use
sed itself to edit and concatenate the files.
No functional change intended.
Signed-off-by: Roger Pau Monné <royger@FreeBSD.org>
Roger Pau Monne [Sat, 13 Feb 2021 10:06:31 +0000 (11:06 +0100)]
scripts/check-config.sh: fix to be compatible with BSD sed
Fist use extended regexp in order to drop the '\' around the
parentheses which is not supported by BSD sed in regular mode.
Secondly use [[:blank:]] instead of \s, as the later is a GNU
extension.
No functional change intended.
Signed-off-by: Roger Pau Monné <royger@FreeBSD.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Wed, 10 Feb 2021 17:59:21 +0000 (18:59 +0100)]
malloc: adjust memcpy() and memset() definitions.
Compiling the sandbox fails on armv7 due to conflicting definitions of
memcpy() and memset() in include/malloc.h and include/linux/string.h.
Use linux/string.h here.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Peter Robinson [Wed, 10 Feb 2021 17:29:16 +0000 (17:29 +0000)]
config: hikey: convert to DM_USB and DM_ETH
Convert the hikey to use DM_USB and DM_ETH.
Conversion based on rpi as it has a similar DWC config.
Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Marek Behún [Tue, 9 Feb 2021 20:23:47 +0000 (21:23 +0100)]
cmd: pinmux: depend on PINCTRL
The pinmux command uses functions pinctrl_get_pin_*(), which are missing
if PINCTRL config option is disabled.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: Simon Glass <sjg@chromium.org>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Klaus Heinrich Kiwi [Tue, 9 Feb 2021 18:41:55 +0000 (15:41 -0300)]
Makefile: Add (default) DEVICE_TREE to SPL FIT
U-boot allows the default device tree to be overridden from
the build environment using the DEVICE_TREE variable.
Make sure that we include it in the SPL FIT mkimage build step.
This also fixes a broken image in case CONFIG_OF_LIST and
CONFIG_OF_OVERLAY_LIST are unset (i.e., expected to be supplied
by the DEVICE_TREE env var).
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Klaus Heinrich Kiwi [Tue, 9 Feb 2021 18:41:54 +0000 (15:41 -0300)]
Kconfig: SPL_FIT_SIGNATURE requires SPL_LOAD_FIT
Having the ability to support firmware FIT signatures on the SPL sounds
not so useful if the SPL is not supporting to load a (U-boot) firmware
as a FIT image.
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Klaus Heinrich Kiwi [Tue, 9 Feb 2021 18:41:53 +0000 (15:41 -0300)]
Kconfig: SPL_FIT_SIGNATURE selects FIT_SIGNATURE
Selecting SPL_FIT_SIGNATURE (without selecting U-boot proper
verified boot first) breaks the build due to
CONFIG_FIT_SIGNATURE_MAX_SIZE being undefined, in addition to Kconfig
warnings on RSA and IMAGE_SIGN_INFO unmet dependencies.
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
Marek Behún [Tue, 9 Feb 2021 18:05:08 +0000 (19:05 +0100)]
fs: btrfs: change directory list output to be aligned as before
Since commit
325dd1f642dd ("fs: btrfs: Use btrfs_iter_dir() to ...")
when btrfs is listing a directory, the output is not aligned:
<SYMLINK> 15 Wed Sep 09 13:20:03 2020 boot.scr -> @/boot/boot.scr
<DIR> 0 Tue Feb 02 12:42:09 2021 @
<FILE> 108 Tue Feb 02 12:54:04 2021 1.info
Return back to how it was displayed previously, i.e.:
<SYM> 15 Wed Sep 09 13:20:03 2020 boot.scr -> @/boot/boot.scr
<DIR> 0 Tue Feb 02 12:42:09 2021 @
< > 108 Tue Feb 02 12:54:04 2021 1.info
Instead of '<FILE>', print '< >', as ext4 driver.
If an unknown directory item type is encountered, we will print the type
number left padded with spaces, enclosed by '?', instead of '<' and '>',
i.e.:
? 30? ............................. name
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Fixes:
325dd1f642dd ("fs: btrfs: Use btrfs_iter_dir() to replace ...")
Cc: David Sterba <dsterba@suse.com>
Cc: Qu Wenruo <wqu@suse.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Marek Behún [Tue, 9 Feb 2021 18:05:07 +0000 (19:05 +0100)]
fs: btrfs: skip xattrs in directory listing
Skip xattrs in directory listing. U-Boot filesystem drivers do not list
xattrs.
Signed-off-by: Marek Behún <marek.behun@nic.cz>
Cc: David Sterba <dsterba@suse.com>
Cc: Qu Wenruo <wqu@suse.com>
Cc: Tom Rini <trini@konsulko.com>
Reviewed-by: Qu Wenruo <wqu@suse.com>
Wasim Khan [Thu, 4 Feb 2021 14:44:04 +0000 (15:44 +0100)]
cmd: fdt: skip board specific fixup using env variable
Sometimes it is useful to boot OS with already fixed-up
device tree. Check for env variable 'skip_board_fixup'
before calling ft_board_setup().
Current behaviour is unchanged, additionally user can
set skip_board_fixup to 1 to skip the fixup.
Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Heinrich Schuchardt [Mon, 1 Feb 2021 02:28:48 +0000 (03:28 +0100)]
fs/squashfs: NULL dereference in sqfs_closedir()
sqfs_opendir() called in sqfs_size(), sqfs_read(), sqfs_exists() may fail
leading to sqfs_closedir(NULL) being called. Do not dereference NULL.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Tom Rini [Tue, 26 Jan 2021 16:44:37 +0000 (11:44 -0500)]
cmd: pwm: Rework argc sanity checking
Currently, we check argc in a number of places to make sure that we have
all of the required arguments for each of the pwm sub-commands.
However, there's at least one place where we've got dead code as we'll
never have argc == 0, due to checking that argc was at least 4 earlier
and having only subtracted 3. Rework things so that when we have
determined our subcommand make sure we have the right number of
arguments for it, or error out. This means we can stop checking against
argc again later.
Reported-by: Coverity (CID: 316601)
Cc: Pragnesh Patel <pragnesh.patel@sifive.com>
Signed-off-by: Tom Rini <trini@konsulko.com>
Tom Rini [Tue, 23 Feb 2021 15:45:55 +0000 (10:45 -0500)]
Merge tag 'xilinx-for-v2021.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-microblaze
Xilinx changes for v2021.04-rc3
qspi:
- Support for dual/quad mode
- Fix speed handling
clk:
- Add clock enable function for zynq/zynqmp/versal
gem:
- Enable clock for Versal
- Fix error path
- Fix mdio deregistration path
fpga:
- Fix buffer alignment for ZynqMP
xilinx:
- Fix reset reason clearing in ZynqMP
- Show silicon version in SPL for Zynq/ZynqMP
- Fix DTB selection for ZynqMP
- Rename zc1275 to zcu1275 to match DT name
Brandon Maier [Wed, 20 Jan 2021 20:28:30 +0000 (14:28 -0600)]
spi: zynqmp_gqspi: fix set_speed bug on multiple runs
If zynqmp_qspi_set_speed() is called multiple times with the same speed,
then on the second call it will skip recalculating the baud_rate_val as
it assumes the speed is already configured correctly. But it will still
write the baud_rate_val to the configuration register and call
zynqmp_gqspi_set_tapdelay(). Because it skipped recalculating the
baud_rate_val, it will use the initial value of 0 . This causes the
driver to run at maximum speed which for many spi flashes is too fast and
causes data corruption.
Instead only write out a new baud_rate_val if we have calculated the
correct baud_rate_val.
This opens up another issue with the "if (speed == 0)", we don't save
off the new plat->speed_hz value when setting the baud rate on the
speed=0 path. Instead mimic what the Linux zynqmp gqspi driver does, and
have speed==0 just use the same calculation as a normal speed. That will
cause the baud_rate_val to use the slowest speed possible, which is the
safest option.
Signed-off-by: Brandon Maier <brandon.maier@rockwellcollins.com>
CC: jagan@amarulasolutions.com
CC: michal.simek@xilinx.com
CC: Ashok Reddy Soma <ashokred@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Wed, 17 Feb 2021 07:55:34 +0000 (08:55 +0100)]
arm64: zynqmp: Rename zc1275/zcu1275 to be aligned with DT name
Folder names corresponds to DT name. These boards have been renamed from
zc1275 to zcu1275 by commit shown below and this should be the part of that
commit.
Fixes:
420d44678119 ("arm64: zynqmp: Rename zc1275 to zcu1275")
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Thu, 11 Feb 2021 18:03:30 +0000 (19:03 +0100)]
net: gem: Fix error path in zynq_gem_probe
Clean up error path in connection where priv->rxbuffers and priv->tx_bd are
allocated.
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Wed, 3 Feb 2021 10:10:48 +0000 (03:10 -0700)]
net: gem: Enable ethernet rx clock for versal
Enable rx clock along with tx clock for versal platform. Use compatible
data to enable/disable clocks in the driver.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
T Karthik Reddy [Wed, 3 Feb 2021 10:10:46 +0000 (03:10 -0700)]
i2c: i2c_cdns: Enable i2c clock
Enable i2c controller clock from driver probe function
by calling clk_enable().
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
T Karthik Reddy [Wed, 3 Feb 2021 10:10:47 +0000 (03:10 -0700)]
clk: versal: Add support to enable clocks
Add clock enable functionality in versal clock driver to enable
clocks from peripheral drivers using clk_ops.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
T Karthik Reddy [Wed, 3 Feb 2021 10:10:45 +0000 (03:10 -0700)]
clk: zynqmp: Add support to enable clocks
Add clock enable functionality in zynqmp clock driver to enable
clocks from peripheral drivers using clk_ops.
Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 9 Feb 2021 14:28:15 +0000 (15:28 +0100)]
clk: zynq: Add dummy clock enable function
A lot of Xilinx drivers are checking -ENOSYS which means that clock driver
doesn't have enable function. Remove this checking from drivers and create
dummy enable function as was done for clk_fixed_rate driver by
commit
6bf6d81c1112 ("clk: fixed_rate: add dummy enable() function").
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michal Simek [Tue, 9 Feb 2021 07:50:22 +0000 (08:50 +0100)]
arm64: zynqmp: Do not clear reset reason
There is no need to clear reset reason register because it is protected by
PMUFW already which is reported when verbose log is enabled as:
pm_core.c@733 APU> No write permission to 0xFF5E0220
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Michael Walle [Wed, 10 Feb 2021 21:42:29 +0000 (22:42 +0100)]
fpga: zynqpl: fix buffer alignment
Due to pointer arithmetic, "sizeof(u32) * ARCH_DMA_MINALIGN" is
subtracted. It seems that the original intention was to just subtract
ARCH_DMA_MINALIGN. Fix it.
Signed-off-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Tom Rini [Mon, 22 Feb 2021 17:37:02 +0000 (12:37 -0500)]
Merge tag 'u-boot-amlogic-
20210222' of https://gitlab.denx.de/u-boot/custodians/u-boot-amlogic
- adds adc-keys button driver
- fix meson-saradc driver to get reference voltage
- add adc-keys test for sandbox
- enable adc-keys for VIM3 & VIM3L boards
- fix button.h build
Tom Rini [Mon, 22 Feb 2021 14:12:04 +0000 (09:12 -0500)]
Merge tag 'ti-v2021.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-ti
- Fix ethernet on J721e
- Sync am335x DT nodes from Linux 5.9-rc7
- Minor Clock fixes
Tom Rini [Mon, 22 Feb 2021 14:11:27 +0000 (09:11 -0500)]
Merge tag 'video-for-v2021.04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-video
- splash_source warning fix when building with 64-bit toolchains
- lq123p1jx31 and nv101wxmn51 compatible in simple panel driver
- remove not used mb862xx driver
- add Himax HX8238D panel driver
- s/video_uc_platdata/video_uc_plat/
Tom Rini [Mon, 22 Feb 2021 14:06:36 +0000 (09:06 -0500)]
Merge branch '2021-02-21-mpc83xx-updates'
- mpc8379erdb DM_MMC conversion
- kmeter1 updates
- qe_uec fixes
Neil Armstrong [Fri, 19 Feb 2021 07:31:47 +0000 (08:31 +0100)]
button: add udevice forward declaration
After
401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
build fails with :
drivers/button/button-uclass.c:13:5: error: conflicting types for 'button_get_by_label'
int button_get_by_label(const char *label, struct udevice **devp)
^~~~~~~~~~~~~~~~~~~
Adding struct udevice forward declaration in button.h solves the build error.
Fixes:
401d1c4f5d2d ("common: Drop asm/global_data.h from common header")
Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dario Binacchi [Sun, 14 Feb 2021 14:17:43 +0000 (15:17 +0100)]
arch: sandbox: fix typo in clk.h
Fix the 'devivce' typo in arch/sandbox/include/asm/clk.h.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dario Binacchi [Sun, 14 Feb 2021 14:17:42 +0000 (15:17 +0100)]
clk: remove a redundant header
The linux/err.h header file was included twice.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Reviewed-by: Simon Glass <sjg@chromium.org>
Dario Binacchi [Sat, 13 Feb 2021 11:09:19 +0000 (12:09 +0100)]
arm: dts: sync am33xx-clocks with Linux 5.9-rc7
The commit
6337d53fdf45 ("arm: dts: sync am33xx with Linux 5.9-rc7")
synchronized the am33xx-clocks.dtsi file with Linux 5.9-rc7 with the
exception of two nodes. I think I was wrong and it is better to keep
the two files similar and possibly make changes to the *-u-boot.dtsi
files.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Dario Binacchi [Sat, 13 Feb 2021 11:02:30 +0000 (12:02 +0100)]
clk: ti: improve debug messages for clkctrl driver
The previous version printed the same debug message for both the enable
and disable routines without highlighting whether you were enabling or
disabling the module. It is now clear whether you are enabling or
disabling the module.
Signed-off-by: Dario Binacchi <dariobin@libero.it>
Rasmus Villemoes [Mon, 5 Oct 2020 13:15:18 +0000 (15:15 +0200)]
uec.h: fix COFIG_DM typo
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Heiko Schocher <hs@denx.de>
Rasmus Villemoes [Mon, 5 Oct 2020 13:15:17 +0000 (15:15 +0200)]
dm_qe_uec.c: fix indentation in uec_set_mac_if_mode()
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Heiko Schocher <hs@denx.de>
Rasmus Villemoes [Mon, 5 Oct 2020 13:15:16 +0000 (15:15 +0200)]
mdio-uclass.c: support fixed-link subnodes
When trying to port our mpc8309-based board to DM_ETH, on top of
Heiko's patches, I found that nothing in mdio-uclass.c seems to
support the use of a fixed-link subnode of the ethernet DT node. That
is, the ethernet node looks like
enet0: ethernet@2000 {
device_type = "network";
compatible = "ucc_geth";
...
fixed-link {
reg = <0xffffffff>;
speed = <100>;
full-duplex;
};
but the current code expects there to be phy-handle property. Adding
that, i.e.
phy-handle = <&enet0phy>;
enet0phy: fixed-link {
just makes the code break a few lines later since a fixed-link node
doesn't have a reg property. Ignoring the dtc complaint and adding a
dummy reg property, we of course hit "can't find MDIO bus for node
ethernet@2000" since indeed, the parent node of the phy node does not
represent an MDIO bus. So that's obviously the wrong path.
Now, in linux, it seems that the fixed link case is treated specially;
in the of_phy_get_and_connect() which roughly corresponds to
dm_eth_connect_phy_handle() we have
if (of_phy_is_fixed_link(np)) {
ret = of_phy_register_fixed_link(np);
...
} else {
phy_np = of_parse_phandle(np, "phy-handle", 0);
...
}
phy = of_phy_connect(dev, phy_np, hndlr, 0, iface);
And U-Boot's phy_connect() does have support for fixed-link
subnodes. Calling phy_connect() directly with NULL bus and a dummy
address does seem to make the ethernet work.
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Heiko Schocher <hs@denx.de>
Heiko Schocher [Fri, 2 Oct 2020 07:23:22 +0000 (09:23 +0200)]
mpc83xx: kmeter1: increase malloc_f space
make malloc space before relocation bigger, set
CONFIG_SYS_MALLOC_F_LEN=0x800
Signed-off-by: Heiko Schocher <hs@denx.de>
Heiko Schocher [Fri, 2 Oct 2020 07:23:21 +0000 (09:23 +0200)]
mpc83xx: kmeter1_defconfig add missing BAT4 config
BAT4 setup missed in defconfig, add it.
Signed-off-by: Heiko Schocher <hs@denx.de>
Sinan Akman [Sat, 4 Apr 2020 05:16:47 +0000 (01:16 -0400)]
mpc8379erdb: Convert to DM_MMC
Signed-off-by: Sinan Akman <sinan@writeme.com>
Sinan Akman [Sat, 4 Apr 2020 05:16:46 +0000 (01:16 -0400)]
mpc8379erdb: Add device tree
Signed-off-by: Sinan Akman <sinan@writeme.com>
Tom Rini [Sun, 21 Feb 2021 16:17:30 +0000 (11:17 -0500)]
Merge tag 'efi-2021-04-rc3' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
Pull request for efi-2021-04-rc3
Bug fixes:
* Let EFI simple file protocol access last block of partition
* Correct conversion of multi-part device paths in
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText()
Documentation:
* booti and qfw man-pages
Tom Rini [Sun, 21 Feb 2021 16:17:07 +0000 (11:17 -0500)]
Merge tag 'for-v2021.04' of https://gitlab.denx.de/u-boot/custodians/u-boot-i2c
i2c changes for v2021.04
new feature:
- Allow disabling driver model for I2C in SPL
fixes:
- i2c-gpio: Fix GPIO output
- at91: fix crash when using 'i2c probe'
Tom Rini [Sun, 21 Feb 2021 16:16:38 +0000 (11:16 -0500)]
Merge branch 'master' of git://git.denx.de/u-boot-sh
- RCar Gen3 updates
Heinrich Schuchardt [Sat, 20 Feb 2021 09:00:19 +0000 (10:00 +0100)]
doc: qfw man-page
Provide a man-page for the qfw command.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Thu, 18 Feb 2021 17:30:43 +0000 (18:30 +0100)]
efi_loader: multi part device paths to text
Our current implementation of
EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText() truncates multi
part device paths after the first part. We should convert all parts.
Render device path instance ends as commas. This is not explicitly
described in the UEFI spec but mimics what EDK II does.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Thu, 18 Feb 2021 17:30:44 +0000 (18:30 +0100)]
efi_selftest: multi part device path to text
Test EFI_DEVICE_PATH_TO_TEXT_PROTOCOL.ConvertDevicePathToText() for a multi
part device path.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Heinrich Schuchardt [Thu, 18 Feb 2021 06:34:44 +0000 (07:34 +0100)]
efi_selftest: compiler flags for dtbdump.o
Fix a typo. Apply the correct compiler flags to dtbdump.o.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Wed, 17 Feb 2021 11:19:35 +0000 (12:19 +0100)]
doc: booti man-page
Provide a man-page for the booti command.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Heinrich Schuchardt [Wed, 17 Feb 2021 07:06:05 +0000 (08:06 +0100)]
doc/README.distro: kernel_comp_addr_r
Add missing articles and preposition.
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Heinrich Schuchardt [Tue, 16 Feb 2021 17:20:54 +0000 (18:20 +0100)]
doc: Add reference to U-Boot project in conf.py
With the last update of conf.py the references to U-Boot where replaced by
references to Linux.
Fix the project references in the generated documentation.
Reported-by: Simon Glass <sjg@chromium.org>
Reported-by: Bin Meng <bmeng.cn@gmail.com>
Fixes:
98f01cf7a22e ("doc: update Kernel documentation build system")
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Jesper Schmitz Mouridsen [Tue, 9 Feb 2021 16:17:17 +0000 (17:17 +0100)]
Allow last block to be read
The last block is of size media->block_size
Signed-off-by: Jesper Schmitz Mouridsen <jesper@schmitz.computer>
Simplify expression.
Apply same change to efi_disk_write_blocks().
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Igor Opaniuk [Tue, 9 Feb 2021 11:52:45 +0000 (13:52 +0200)]
dm: i2c: use CONFIG_IS_ENABLED macro for DM_I2C/DM_I2C_GPIO
Use CONFIG_IS_ENABLED() macro, which provides more convenient
way to check $(SPL)DM_I2C/$(SPL)DM_I2C_GPIO configs
for both SPL and U-Boot proper.
CONFIG_IS_ENABLED(DM_I2C) expands to:
- 1 if CONFIG_SPL_BUILD is undefined and CONFIG_DM_I2C is set to 'y',
- 1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_DM_I2C is set to 'y',
- 0 otherwise.
All occurences were replaced automatically using these bash cmds:
$ find . -type f -exec sed -i
's/ifndef CONFIG_DM_I2C/if !CONFIG_IS_ENABLED(DM_I2C)/g' {} +
$ find . -type f -exec sed -i
's/ifdef CONFIG_DM_I2C/if CONFIG_IS_ENABLED(DM_I2C)/g' {} +
$ find . -type f -exec sed -i
's/defined(CONFIG_DM_I2C)/CONFIG_IS_ENABLED(DM_I2C)/g' {} +
$ find . -type f -exec sed -i
's/ifndef CONFIG_DM_I2C_GPIO/if !CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
$ find . -type f -exec sed -i
's/ifdef CONFIG_DM_I2C_GPIO/if CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
$ find . -type f -exec sed -i
's/defined(CONFIG_DM_I2C_GPIO)/CONFIG_IS_ENABLED(DM_I2C_GPIO)/g' {} +
Reviewed-by: Heiko Schocher <hs@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
Igor Opaniuk [Tue, 9 Feb 2021 11:52:44 +0000 (13:52 +0200)]
board: freescale: drop CONFIG_DM_I2C undefs
Drop CONFIG_DM_I2C undefs from board header files, and make them
disabled on these boards in defconfigs instead.
Disabling on Kconfig symbol was done automatically with this script:
cd configs
files=(*ls1046a*)
files2=(*T104*RDB*)
files3=(ls1021atwr_*)
files4=("imx8mp_evk_defconfig phycore-imx8mp_defconfig")
combine=("${files[@]}" "${files2[@]}" "${files3[@]}" "${files4[@]}")
cd ..
for item in ${combine[*]}
do
echo "Adjusting $item"
echo "# CONFIG_SPL_DM_I2C is not set" >> configs/$item
make $item && make savedefconfig && cp defconfig configs/$item
done
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
Igor Opaniuk [Tue, 9 Feb 2021 11:52:43 +0000 (13:52 +0200)]
dm: i2c: allow disabling driver model in SPL
At present if U-Boot proper uses driver model for I2C, then SPL has to
also. While this is desirable, it places a significant barrier to moving
to driver model in some cases. For example, with a space-constrained SPL
it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves
adjusting some drivers.
This patch introduces a separate Kconfig symbols for enabling DM_I2C and
DM_I2C_GPIO support in SPL.
This will also help to get away from dirty workarounds to
achieve non-DM I2C support for SPL, which is currently used in some
board header files like:
ifdef CONFIG_SPL_BUILD
undef CONFIG_DM_I2C
endif
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Igor Opaniuk <igor.opaniuk@foundries.io>
Reviewed-by: Tom Rini <trini@konsulko.com>
Eugen Hristev [Fri, 4 Dec 2020 16:06:55 +0000 (18:06 +0200)]
i2c: at91: fix crash when using 'i2c probe'
When issuing 'i2c probe', the driver was crashing, because at probe
there is a request with zero length buffer to write to i2c bus.
The xfer_msg function assumes the buffer is always there, and never
checks for the buffer length.
=> i2c dev 0
Setting bus to 0
=> i2c probe
Valid chip addresses:
data abort
pc : [<
7ffa97dc>] lr : [<
7ffa96f8>]
reloc pc : [<
66f277dc>] lr : [<
66f276f8>]
sp :
7fb7c110 ip :
7ff87a28 fp :
7ff99938
r10:
00000002 r9 :
7fb7dec0 r8 :
00000000
r7 :
e181c600 r6 :
7fb88c20 r5 :
00000000 r4 :
7fb7c128
r3 :
00000000 r2 :
00000001 r1 :
00000000 r0 :
00000009
Flags: nZCv IRQs off FIQs off Mode SVC_32
Code:
eb0092f4 e1a00005 e8bd81f0 e594300c (
e5d33000)
Resetting CPU ...
Fixes:
8800e0fa20 ("i2c: atmel: add i2c driver")
Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>
Harm Berntsen [Sun, 29 Nov 2020 09:47:15 +0000 (09:47 +0000)]
i2c: i2c-gpio: Fix GPIO output
The dm_gpio_set_dir_flags function cannot be used to update the
configuration of a GPIO pin because it does a bitwise OR with the
existing flags. Looks like commit
788ea834124b ("gpio: add function
_dm_gpio_set_dir_flags") has introduced this behaviour and the i2c-gpio
driver has been broken since.
Signed-off-by: Harm Berntsen <harm.berntsen@nedap.com>
CC: Heiko Schocher <hs@denx.de>
CC: Patrick Delaunay <patrick.delaunay@st.com>
Marek Vasut [Fri, 15 Jan 2021 23:27:50 +0000 (00:27 +0100)]
ARM: rmobile: Enable CONFIG_PCI_REGION_MULTI_ENTRY on RCar3
R-Car3 can have multiple regions of type memory in DT, enable
CONFIG_PCI_REGION_MULTI_ENTRY to handle those instead of using
just one of the memory regions.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Marek Vasut [Fri, 15 Jan 2021 23:33:17 +0000 (00:33 +0100)]
pci: renesas: Fix BAR mapping on Gen3
Because the first PCIExAR(n) register is configured with the mapping,
It is the second PCIExAR(n) register that must be written with 0, not
the last one. Update the n from 4 to 1 to select the correct register.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Sun, 24 Jan 2021 17:37:11 +0000 (18:37 +0100)]
pci: renesas: Make map address and mask power of two on Gen3
Both the map address and mask must be power of two per documentation,
adjust the code accordingly.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Marek Vasut [Fri, 15 Jan 2021 23:28:18 +0000 (00:28 +0100)]
pci: renesas: Add root bus handling on Gen3
Add code to access the PCIe root bus space and configure it.
Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com>
Cc: Bin Meng <bmeng.cn@gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>