aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-08-11Merge https://source.denx.de/u-boot/custodians/u-boot-riscvWIP/11Aug2022Tom Rini4-9/+25
2022-08-11Merge tag 'dm-pull-9aug22-take2' of ↵Tom Rini7-151/+197
https://source.denx.de/u-boot/custodians/u-boot-dm dtoc fixes with pylint, tests
2022-08-11spl: opensbi: convert scratch options to configNikita Shubin2-1/+9
Convert hardcoded "opensbi_info.options" to config provided value, this allows changing options passed to OpenSBI. SPL_OPENSBI_SCRATCH_OPTIONS is defaulted to SBI_SCRATCH_NO_BOOT_PRINTS. Link: https://github.com/riscv-software-src/opensbi/blob/master/docs/firmware/fw_dynamic.md Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Anup Patel <anup@brainfault.org> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-08-11spl: opensbi: fix typoNikita Shubin1-1/+1
s/obensbi_info/opensbi_info/ Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-08-11riscv: ae350: Fix XIP config boot failureLeo Yu-Chi Liang2-7/+14
The booting flow is SPL -> OpenSBI -> U-Boot. The boot hart may change after OpenSBI and may not always be hart0, so wrap the related branch instruction with M-MODE. Current DTB setup for XIP is not valid. There is no chance for CONFIG_SYS_FDT_BASE, the DTB address used in XIP mode, to be returned. Fix this. Fixes: 2e8d2f88439d ("riscv: Remove OF_PRIOR_STAGE from RISC-V boards") Signed-off-by: Rick Chen <rick@andestech.com> Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-08-11riscv: cpu: set gp before board_init_f_init_reserveNikita Shubin1-0/+1
Restore global pointer before board_init_f_init_reserve call, as "a0" can be set in harts_early_init call and we end up with invalid global pointer. Signed-off-by: Nikita Shubin <n.shubin@yadro.com> Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
2022-08-10Merge branch '2022-08-10-assorted-updates'Tom Rini82-25/+477
- An assortment of bugfixes and minor updates
2022-08-10boot: allow bootmeth-distro without CONFIG_NETJohn Keeping5-7/+13
Remove the dependency on CMD_PXE from BOOTMETH_DISTRO by introducing a new hidden kconfig symbol to control whether pxe_utils is compiled, allowing bootstd's distro method to be compiled without needing networking support enabled. Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Correct build errors when CMD_BOOTM is not enabled: Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-10MAINTAINERS: Update e-mail addressWIP/2022-08-10-assorted-updatesJoao Marcos Costa1-1/+1
Replace former professional address by my personal e-mail. Signed-off-by: Joao Marcos Costa <jmcosta944@gmail.com>
2022-08-10lz4: Fix compile warning comparison of distinct pointer typesPali Rohár1-1/+1
In file included from include/linux/bitops.h:22, from include/log.h:15, from include/linux/printk.h:4, from include/common.h:20, from lib/lz4_wrapper.c:6: lib/lz4_wrapper.c: In function ‘ulz4fn’: include/linux/kernel.h:184:17: warning: comparison of distinct pointer types lacks a cast (void) (&_min1 == &_min2); \ ^~ lib/lz4_wrapper.c:104:18: note: in expansion of macro ‘min’ size_t size = min((ptrdiff_t)block_size, end - out); ^~~ Signed-off-by: Pali Rohár <pali@kernel.org>
2022-08-10scripts/config: pick config script from kernel scriptsMilan P. Stanić1-0/+230
pulled from kernel tag v5.18
2022-08-10Makefile: avoid false positive -Wmaybe-uninitializedHeinrich Schuchardt1-1/+7
When compiling with -Og gcc reports false positive -Wmaybe-uninitialized as reported in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78394. Silence these warnings when building with CONFIG_CC_OPTIMIZE_FOR_DEBUG. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-10common: Drop display_options.h from common headerSimon Glass54-1/+53
Move this out of the common header and include it only where needed. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-10power: regulator: Remove i2c header from gpio regulatorMichal Simek12-12/+0
i2c is not used that's why header is not needed. Signed-off-by: Michal Simek <michal.simek@amd.com>
2022-08-10cmd: inconsistent return type of command_process()Heinrich Schuchardt1-3/+3
The declarations in the header and in the implementation must match. Reported-by: Sergei Antonov <saproj@gmail.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-08-10test: Add some tests for kconfig.hSimon Glass7-2/+174
The macros in this file are a little confusing and we currently have no tests to check that they work as expected. Add some tests which check the macros in C code. Add a few tests which check that the build errors are generated correctly too, using buildman's -a option. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-10lmb: Fix LMB_MEMORY_REGIONS flag usagePatrice Chotard2-2/+2
This patch is fixing a broken boot observed on stm32mp157c-dk2 board. IS_ENABLED macro should be used to check if a compilation flag is set to "y" or "m". LMB_MEMORY_REGIONS is set to a numerical value, IS_ENABLED macro is not suitable in this case. Fixes: 7c1860fce4e3 ("lmb: Fix lmb property's defination under struct lmb") Signed-off-by: Patrice Chotard <patrice.chotard@foss.st.com> Acked-by: Michal Simek <michal.simek@amd.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-08-10Makefile: Correct the rule removing old of-platdata filesSimon Glass1-2/+3
This makes use of makefile variables that don't exist anymore. Fix it and also remove the object files in that directory. Also add FORCE as a dependency as required by the if_changed macro. Fixes 354d2324635 ("Makefile: Remove old of-platdata files before regenerating") Reported-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-10mmc: Do not send status of send_status is falseMarek Vasut1-0/+3
Commit 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") introduced a side effect where CMD13 SEND_STATUS is issued in case mmc_wait_dat0() does not return -ENOSYS and $send_status is not set. This happens on all hardware which does implement .mmc_wait_dat0 callback, e.g. i.MX8M . This leads to lengthy timeout before booting OS in case of eMMC in one of the HS200/HS400 modes, since the card cannot respond to CMD13 while downgrading from HS200/HS400 to regular HS mode. Fix this by adding the missing conditional. Fixes: 44645f87de5 ("mmc: Fix mmc_switch excessive timeout") Signed-off-by: Marek Vasut <marex@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Kirill Kapranov <kirill.kapranov@compulab.co.il> Cc: Marek Behún <marek.behun@nic.cz> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Cc: Ye Li <ye.li@nxp.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
2022-08-09dtoc: Correct remaining pylint problems in test_fdtSimon Glass2-114/+142
Fix various camel-case and other naming problems. Update the pylint base file to avoid regressions. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-09test_fdt: Convert to use argparseSimon Glass1-19/+20
Drop the deprecated OptionParser. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-09dtoc: Move main program into its own functionSimon Glass1-20/+24
Use a function for the main program so everything there doesn't look like a global variable to pylint. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-09dtoc: Fix fdt test coverageSimon Glass1-1/+1
Fix a bug that the --processes option was ignored, thus resulting in no test coverage information being generated. Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: 42ae363ddd9 ("dtoc: Update fdt tests to use test_util")
2022-08-09dtoc: Tidy up fdt_tests RunTests()Simon Glass1-6/+9
Pass the options args in rather than using the global variables. Use snake case, fix up comments and use a ternary operator to make pylint happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-09dtoc: Tidy up fdt_tests RunTestCoverage() argsSimon Glass1-4/+8
Pass the options args in rather than using the global various. Use snake case and fix up comments to make pylint happy. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-08-09Merge https://source.denx.de/u-boot/custodians/u-boot-marvellWIP/09Aug2022Tom Rini44-408/+481
- mvebu/turris_omina: Misc fixes and improvements (Pali & Marek) - mvebu: spl: Always fallback to BootROM boot method (Pali) - mvebu: Cleanup u-boot,dm-pre-reloc code (Pali) - gpio: Remove mvgpio driver (Chris) - SBx81LIFKW/SBx81LIFXCAT disable KIRKWOOD_GPIO (Chris) - misc: atsha204a: Don't check for error when waking up the device (Pali)
2022-08-09Merge tag 'u-boot-amlogic-20220809' of ↵Tom Rini3-6/+138
https://source.denx.de/u-boot/custodians/u-boot-amlogic - fixup error on efuse commands return - add documentation on boot flow
2022-08-09misc: atsha204a: Don't check for error when waking up the devicePali Rohár1-5/+6
The device ignores any levels or transitions on the SCL pin when the device is idle, asleep or during waking up. Linux kernel driver for atsha204a (atmel-sha204a.ko) also ignores return value from i2c wakeup send command, see: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/crypto/atmel-i2c.c?h=v5.19#n174 And also userspace Turris libatsha204 library ignores return value from wakeup send command, see: https://gitlab.nic.cz/turris/libatsha204/-/blob/v29.2/src/libatsha204/layer_ni2c.c#L75-76 U-Boot driver should do same thing. Fixes waking up ATSHA204 on Turris 1.x boards. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Paweł Anikiel <pan@semihalf.com> Reviewed-by: Marek Behún <kabel@kernel.org>
2022-08-09pci: pci_mvebu: Add support for reset-gpiosPali Rohár2-0/+15
Release PERST# signal via GPIO when "reset-gpios" is defined in device tree. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm64: a37xx: pinctrl: Improve description for pinmux commandPali Rohár1-1/+11
In more cases group name consist of function name followed by function number. So if function name is just prefix of group name, show group name. So in 'pinmux status -a' command output would be visible also extended function number, which is useful for debugging. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm64: a37xx: pinctrl: Remove unused macro PIN_GRP()Pali Rohár1-10/+0
Macro PIN_GRP() is not used, remove it. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm64: a37xx: pinctrl: Fix definitions for MPP pins 20-22Pali Rohár1-3/+5
All 3 MPP pins (20, 21 and 22) can be configured individually and also can be configured to GPIO functions. Fix definitions for these MPP pins in existing pin groups. After this change GPIO function can be enabled just for one of these 3 pins. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09gpio: Remove mvgpio driverChris Packham3-151/+0
The last user of this driver was removed in commit dee08b1999e2 ("arm: Remove gplugd board"). Remove the unused driver. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Pali Rohár <pali@kernel.org>
2022-08-09ARM: kirkwood: SBx81LIFXCAT: disable KIRKWOOD_GPIOChris Packham1-1/+0
DM_GPIO was already enabled so the MVEBU_GPIO was already available. Disable KIRKWOOD_GPIO as it was unnecessary. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09ARM: kirkwood: SBx81LIFKW: enable CONFIG_NET_RANDOM_ETHADDRChris Packham1-0/+1
When booting a fresh board having a random Ethernet address enables using the network device to program the board. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09ARM: kirkwood: SBx81LIFKW: disable KIRKWOOD_GPIOChris Packham1-1/+0
DM_GPIO was already enabled so the MVEBU_GPIO was already available. Having updated the board code to use the DM_GPIO APIs the KIRKWOOD_GPIO driver became unnecessary. Disable it for SBx81LIFKW. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09ARM: kirkwood: SBx81LIFKW: enable CMD_GPIOChris Packham1-0/+1
For debugging it is convenient to query/access GPIOs from the command line. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09ARM: kirkwood: SBx81LIFKW: update for DM_GPIOChris Packham1-5/+16
Update mv88e61xx_hw_reset() to use the DM_GPIO API to toggle the reset line for the linkstreet switch. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09ARM: kirkwood: SBx81LIFKW: remove direct access of GPIO registersChris Packham3-39/+27
Replace code that accessed the GPIO registers directly with code that makes use of the LED_GPIO driver. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: armada-38x-controlcenterdc.dts: Move u-boot, dm-pre-reloc to ↵Pali Rohár2-16/+25
-u-boot.dtsi Move U-Boot specific device tree property u-boot,dm-pre-reloc into U-Boot specific device tree include file armada-38x-controlcenterdc-u-boot.dtsi. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: armada-xp-theadorable.dts: Move u-boot, dm-pre-reloc to -u-boot.dtsiPali Rohár2-1/+5
Move U-Boot specific device tree property u-boot,dm-pre-reloc into U-Boot specific device tree include file armada-xp-theadorable-u-boot.dtsi. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: Remove redundant u-boot, dm-pre-reloc from all 32-bit Armada SoCsPali Rohár25-125/+8
Replace it by including of mvebu-u-boot.dtsi file. When board does not use -u-boot.dtsi then mvebu-u-boot.dtsi is included automatically by makefile scripts/Makefile.lib. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: Introduce mvebu-u-boot.dtsi for 32-bit Armada SoCsPali Rohár1-0/+24
Set u-boot,dm-pre-reloc for /soc/, /soc/internal-regs/ and &uart0 nodes as it is required on every 32-bit Armada SoCs. And set also u-boot,dm-pre-reloc for &spi0 when going to boot from SPI because otherwise SPL SPI drivers do not load. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Tested-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: dts: Build only arch-compatible dts filesPali Rohár1-12/+16
64-bit Armada DTS files are not build correctly during compilation of 32-bit Armada boards and vice versa. So fix makefile build system to compile only those dts files which are compatible for the current build (64-bit Armada DTS files only for 64-bit builds and 32-bit Armada DTS files only for 32-bit builds). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: turris_omnia: Add Winbond SPI flash supportMarek Behún1-0/+1
Some new Omnia boards will come with Winbond SPI flash. Add to defconfig. Signed-off-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: spl: Always fallback to BootROM boot methodPali Rohár1-0/+7
BootROM boot method should always work so always add it as fallback method to spl_boot_list. In case U-Boot SPI driver fails it is better to try using BootROM than hanging as by default only one boot method is specified. Signed-off-by: Pali Rohár <pali@kernel.org> Tested-by: Tony Dinh <mibodhi@gmail.com> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: turris_omnia: Remove hardcoded spi-nor device tree pathPali Rohár1-5/+11
Linux kernel DTS files renamed spi-nor@0 node to flash@0 which effectively broke U-Boot to boot new Linux kernel versions correctly. So remove hardcoded spi-nor device tree path from Turris Omnia board code and replace it by searching for mtd node by compatible string. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09gpio: turris_omnia_mcu: Fix usage of CMD_EXT_CONTROLPali Rohár1-30/+26
CMD_GENERAL_CONTROL takes two 8-bit arguments but CMD_EXT_CONTROL takes two 16-bit arguments. Fix this issue and change CMD_EXT_CONTROL arguments to 16-bit. Fixes: 5e4d24ccc115 ("gpio: Add Turris Omnia MCU driver") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-08-09arm: mvebu: turris_omnia: Increase fdt size in fixup_mtd_partitionsPali Rohár1-0/+3
Sometimes fixup_mtd_partitions() prints during booting kernel error "Failed fixing SPI NOR partitions!" because it does not have enough space for creating all paritions nodes. So increase fdt size. Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Marek Behún <kabel@kernel.org>
2022-08-09arm: mvebu: turris_omnia: Do not fail in fixup_mtd_partitions when ↵Pali Rohár1-5/+4
partitions do not exist All partitions are created by fixup_mtd_partitions() function, so they do not have to exist just for their removal need. Fixes: 92f36c8e74c1 ("arm: mvebu: turris_omnia: fixup MTD partitions in Linux' DTB") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Marek Behún <kabel@kernel.org>