aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2023-03-15Merge branch 'master' of ↵WIP/15Mar2023Tom Rini49-77/+134
https://source.denx.de/u-boot/custodians/u-boot-coldfire
2023-03-15Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini12-19/+461
Per Andre: [T]hese two patches containing just devicetree updates for Allwinner boards. I was still hoping for a review, since we cannot import the files from the Linux tree verbatim, but managed to write some filter script that convinced me that the changes are fine. The files are from Linux v6.2-rc2, but are identical to the v6.2 release.
2023-03-15board: m5253demo: remove floating point flash size calculationAngelo Dureghello1-18/+2
This board is using floating point arithmetic to display the SST39VF6401B flash size. This actually generates errors with toolchains without appropriate sw fp math functions available. SST39VF6401B is the only flash for wich the size is displayed, it's size is 8192KB and floating point calculation seems not needed. Removing it. Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
2023-03-15m68k: add private libgcc ashrdi3Angelo Dureghello2-1/+49
Add ashrdi3.c to private libgcc. Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
2023-03-15board: amcore: fix config options namespaceAngelo Dureghello2-11/+5
Remove CONFIG_ namespace options from .h, moving them to defconfig, while changing non-defconfig options to CFG_ namespace. Signed-off-by: Angelo Durgehello <angelo@kernel-space.org>
2023-03-15m68k: rename CONFIG_MCFTMR to CFG_MCFTMRAngelo Dureghello41-44/+55
This is not a Kconfig option so changing to _CFG. Signed-off-by: Angelo Durgehello <angelo@kernel-space.org>
2023-03-15m68k: dts: stmark2: set correct compatible field for spi norAngelo Dureghello1-1/+1
Fix error: Invalid chip select 0:1 (err=-19) update spi nor "compatible" property with "jedec,spi-nor" to have spi nor properly bound as a child device. Signed-off-by: Angelo Durgehello <angelo@kernel-space.org>
2023-03-15arch: enable private libgcc for m68kAngelo Dureghello1-0/+1
This patch fixes u-boot hanging on the first printf("%x", val). Some toolchains built without multilib enabled may produce u-boot freezing on first u64 shift operation, as in lib/vsprintf.c number() function. Using our private libgcc solves the issue. Setting private libgcc enabled at architecture level to avoid similar issues, it should not harm. Signed-off-by: Angelo Durgehello <angelo@kernel-space.org>
2023-03-15board: stmark2: fix clock valueAngelo Dureghello1-1/+1
Fix totally blank console at boot, clock value must be decimal, as for the 30Mhz external crystal. Fixes: 26e5944ec90c ("stmark2: Migrate CONFIG_SYS_EXTRA_OPTIONS to Kconfig") Signed-off-by: Angelo Dureghello <angelo@kernel-space.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2023-03-15m68k: add global variable sdhc_per_clk for m68kAngelo Dureghello1-0/+3
The FSL eSDHC controller supports two reference clocks. They are platform clock and periperhal clock. The global variable sdhc_clk has already been used for platform clock. ColdFire also uses eSHDC controller, as in arm and powerpc, so adding sdhc_per_clk to arch_global_data. Signed-off-by: Angelo Durgehello <angelo@kernel-space.org>
2023-03-15m68k: use longword-based jumpsAngelo Dureghello1-6/+12
Increasing of binary size requires longword-based jumps. Signed-off-by: Angelo Durgehello <angelo.dureghello@timesys.com>
2023-03-15board: amcore: fix u-boot mtd partitionAngelo Dureghello1-5/+15
Signed-off-by: Angelo Dureghello <angelo@kernel-space.org>
2023-03-13Prepare v2023.04-rc4v2023.04-rc4Tom Rini2-2/+2
Signed-off-by: Tom Rini <trini@konsulko.com>
2023-03-13Merge tag 'efi-2023-04-rc4' of ↵WIP/13Mar2023Tom Rini8-9/+101
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2023-04-rc4 Documentation: * man-page for panic command UEFI: * Correct parameter check for SetVariable() Other: * Provide unit test for crc8
2023-03-13efi_loader: describe term_get_char()Heinrich Schuchardt1-0/+8
Add a function description. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
2023-03-13efi_loader: update SetVariable attribute checkMasahisa Kojima1-6/+25
UEFI specification v2.10 says that EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS is deprecated and EFI_UNSUPPORTED should be returned in SetVariable variable service. Current implementation returns EFI_INVALID_PARAMETER, let's fix the return value. Together with above change, this commit also updates the SetVariable attribute check to be aligned with the EDK2 reference implementation. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-03-13doc: man-page for panic commandHeinrich Schuchardt2-0/+34
Provide a man-page for the panic command. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-13doc: uefi: fix linksVincent Stehlé2-3/+4
Fix a couple of links so that they are rendered correctly with sphinx. Signed-off-by: Vincent Stehlé <vincent.stehle@arm.com> Cc: Heinrich Schuchardt <xypron.glpk@gmx.de> Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-03-13test: unit test for crc8Heinrich Schuchardt2-0/+30
Add a unit test for the crc8() function. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-10Merge https://source.denx.de/u-boot/custodians/u-boot-usbWIP/10Mar2023Tom Rini3-13/+12
Two minimal Kconfig/Makefile fixes for USB.
2023-03-10Merge https://source.denx.de/u-boot/custodians/u-boot-shTom Rini8-24/+87
Assorted Renesas fixes below, namely MMC clocking breakage fix, clock Kconfig fix, pin control unused symbols removal, and sysinfo fix and enablement on now fixed platforms.
2023-03-10Merge tag 'dm-pull-10mar23' of ↵Tom Rini3-65/+852
https://source.denx.de/u-boot/custodians/u-boot-dm fixes and tests for the fdt command
2023-03-10ARM: dts: renesas: Enable sysinfo on R-Car D3 DraakTam Nguyen2-0/+24
Enable support for sysinfo on R-Car D3 Draak board. The sysinfo is used e.g. to access and decode board-specific information and then in turn used by board-info to print those information. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Drop compatible from I2C node, this is in r8a77995.dtsi already. Drop status = "okay" from EEPROM node. Add dts: tag. Fix Kconfig EEPROM address to be 0x50 and match the DT, sync config.]
2023-03-10ARM: dts: renesas: Enable sysinfo on R-Car V3H Condor/Condor-ITam Nguyen3-0/+37
Add new sysinfo IDs for R-Car V3H Condor/Condor-I . Enable support for sysinfo on R-Car V3H Condor/Condor-I. The sysinfo is used e.g. to access and decode board-specific information and then in turn used by board-info to print those information. Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> [Marek: Drop compatible from I2C node, this is in r8a77980.dtsi already. Drop status = "okay" from EEPROM node. Add dts: tag. Update the commit message, note the new sysinfo IDs. Fix Kconfig EEPROM address to be 0x50 and match the DT, sync config.]
2023-03-10sysinfo: rcar3: Fix Draak and Eagle board codeTam Nguyen1-2/+2
Correct the board code ID based on the hardware documentation Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Signed-off-by: Tam Nguyen <tam.nguyen.xa@renesas.com> Signed-off-by: Hai Pham <hai.pham.ud@renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-10pinctrl: renesas: Drop non-existent PFC info table entriesMarek Vasut1-15/+0
Remove PFC info table entries which are never instantiated, since there are no drivers for those. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-10clk: renesas: Always select DM_RESET to prevent inobvious failure of ↵Marek Vasut1-0/+1
rst_gen3 subdriver The CLK_RCAR_GEN3 registers two subdrivers, clk_gen3 and rst_gen3. The former depends on the clock framework, which is always enabled in this context of clock framework driver, while the later depends on reset framework which may not always be enabled. Ensure the reset framework is also always enabled to prevent inobvious early boot time bind failure of the CPG driver, which leads to system showing no activity and is difficult to debug. Note that one possible approach to debug this is to use CONFIG_DEBUG_UART and add debug printascii()s into the drivers/clk/renesas/clk-rcar-gen3.c . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-10mmc: renesas-sdhi: Add proper probe error fail pathMarek Vasut1-9/+17
In case one of the calls in probe fail, trigger a fail path and undo all the steps done in probe until the point of failure. The current implementation failed to stop controller clock and free claimed clock, so fix that. Furthermore, print return code in error prints for easier debugging. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-10mmc: renesas-sdhi: Always configure default SDnH clock rate to 800 MHzMarek Vasut1-1/+9
The prior stage bootloader might have left the SDnCKCR register in completely arbitrary state before passing control to U-Boot, which includes the register being populated with incorrect values. Currently the SDHI driver will attempt to use clock framework to configure SDn clock, which may fail in case SDnCKCR contains invalid values for the SDnH clock, because the clock framework would not be able to determine SDnH clock rate and would get -EINVAL instead, which in turn would not allow the clock framework to determine the correct SDn clock divider ratio. This failure occurs specifically in case SDnCKCR reads back 0x209 . Correct the problem by first setting default SDnH clock rate to 800 MHz, thus assuring the SDnCKCR SDnH bits are correct, and only afterward set up the SDn clock rate to default 200 MHz. Note that the SDHI driver may reconfigure SDnH clock later based on IOS settings obtained from the attached card, the 800 MHz set up here is only the default value. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
2023-03-10usb: move CONFIG_USB_HUB_DEBOUNCE_TIMEOUT to USBHeinrich Schuchardt2-12/+11
This configuration setting is only relevant if the board supports USB. It should not be in the main menu but in the USB menu. The setting is only relevant in USB host mode. Fixes: 5454dea3137d ("usb: hub: allow to increase HUB_DEBOUNCE_TIMEOUT") Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
2023-03-10usb: USB hubs require host modeHeinrich Schuchardt1-1/+1
USB hubs run in host mode not in gadget mode. Hence, compiling usb_hub.c should not be selected by CONFIG_USB_GADGET. Suggested-by: Marek Vasut <marex@denx.de> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Reviewed-by: Marek Vasut <marex@denx.de>
2023-03-09test: cmd: fdt: Test fdt bootcpuMarek Vasut1-0/+33
Add 'fdt bootcpu' test which works as follows: - Create basic FDT, map it to sysmem - Print the FDT bootcpu - Set the FDT bootcpu and read the value back using 'fdt header get' - Perform the previous step twice to validate bootcpu overwrite The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt rmMarek Vasut1-0/+84
Add 'fdt rm' test which works as follows: - Create fuller FDT, map it to sysmem - Selectively delete nodes or properties by both path and aliases - Verify created nodes or properties using fdt print command The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt mknodeMarek Vasut1-0/+68
Add 'fdt mknode' test which works as follows: - Create fuller FDT, map it to sysmem - Create node either in / or subnode - Attempt to create node over existing node, which fails - Attempt to create subnodes in non-existing nodes or aliases - Verify created nodes using fdt list command The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt setMarek Vasut1-0/+144
Add 'fdt set' test which works as follows: - Create fuller FDT, map it to sysmem - Set either existing property to overwrite it, or new property - Test setting both single properties as well as string and integer arrays - Test setting to non-existent nodes and aliases - Verify set values using 'fdt get value' The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt get sizeMarek Vasut1-0/+87
Add 'fdt get size' test which works as follows: - Create fuller FDT, map it to sysmem - Get size of various properties - Get node count of available nodes - Test non-existent nodes and properties The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt get addrMarek Vasut1-0/+67
Add 'fdt get addr' test which works as follows: - Create fuller FDT, map it to sysmem - Get address of various properties - Compare addresses calculated by UT and fdt command This test is special in that it has to go through gruesome remapping scheme where the test calculates: - pointer offsets of the generated FDT root and the property being tested - map_sysmem() result of environment variable "fdtaddr" and the one set by the test matching address of property being tested - difference between the later and the former, to obtain offset of the DT property from start of DT The offsets must match in both the UT and the tested U-Boot, if they do not, the test fails. The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt get nameMarek Vasut1-0/+79
Add 'fdt get name' test which works as follows: - Create fuller FDT, map it to sysmem - Get name of / node 0, 1 and /clk-test node 0 - Compare output and validate the node name - Get name of / node 2 and /clk-test node 1 - Compare output and validate the node is not present - Get name of / node -1 and /clk-test node -1 - Compare output and validate the node name equals node 0 name - Check nonexistent node, verify the command errors out The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt resizeMarek Vasut1-0/+24
Add 'fdt resize' test which works as follows: - Create simple FDT with extra size 0, map it to sysmem - 'resize' the FDT by 0x2000 bytes - Verify the new space has been added to the FDT The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test fdt moveMarek Vasut1-0/+34
Add 'fdt move' test which works as follows: - Create simple FDT, map it to sysmem - 'move' the FDT into new zeroed out sysmem location - Verify newly active FDT is in the new location - Compare both locations The test case can be triggered using: " ./u-boot -Dc 'ut fdt' " To dump the full output from commands used during test, add '-v' flag. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test both string and integer arrays in 'fdt get value'Marek Vasut1-16/+42
The 'fdt get value' subcommand now supports extraction of integer value from integer arrays, add test for it, including a test for special case unindexed integer array read, which is handled as hash and treated as a long string instead of integer. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Test alias resolution in 'fdt get value'Marek Vasut1-20/+45
The 'fdt' command help contains the following note: " Dereference aliases by omitting the leading '/', e.g. fdt print ethernet0. " Add test for it. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Generate fuller DT internally and switch fdt get value to itMarek Vasut1-13/+111
Implement function to generate internal test DT fragment and switch the 'fdt get value' test to this instead of depending on the sandbox DT. Rename clk-test node to test-node node. This FDT fragment will be reused by other tests. No functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Rename fdt_test_get() to fdt_test_get_value()Marek Vasut1-3/+3
The 'fdt get' command has a 'get value' subcommand, rename the fdt_test_get() to fdt_test_get_value() to avoid confusion about what it is testing. There is currently no get 'get name', 'get addr', 'get size' subcommand test. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: cmd: fdt: Rename fdt_test_resize() to fdt_test_addr_resize()Marek Vasut1-2/+2
The 'fdt' command has a 'resize' subcommand, rename the fdt_test_resize() to fdt_test_addr_resize() to avoid confusion about what it is testing. There is currently no resize test. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09test: Add ut_assert_nextline_empty() empty line helperMarek Vasut1-0/+4
Add helper macro to test for empty lines, which is an inobvious wrapper around ut_assert_nextline("%s", "") . Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09cmd: fdt: Add support for integer arrays in fdt get value with indexMarek Vasut1-2/+12
Currently any integer array value is set as long up-to-40 character hexadecimal string into environment variable when extracted from an FDT using 'fdt get value path prop index', because the support for handling integer arrays is not implemented, and fdt_value_env_set() code falls back into the hash handling behavior instead. Implement this support simply by checking whether user supplied any index. If index is set and the property length is multiple of four, then this is an integer array, and the code would extract value at specified index. There is a subtle change where default index is set to -1 instead of 0. This is OK, since the only place which checks for index to be less or equal zero is the string array handling code in fdt_value_env_set() and that code would work perfectly well with index -1 too. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09cmd: fdt: Map address returned from fdt get addr to sysmemMarek Vasut1-1/+2
The address returned from 'fdt get addr' command must be mapped into sysmem, as this is a working FDT. Access to this address without mapping it would lead to crash e.g. in sandbox. The following command triggers the crash: " ./u-boot -Dc 'fdt addr $fdtcontroladdr ; fdt get addr var / compatible ; md $var' " Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09cmd: fdt: Handle 64bit pointers in fdt get addrMarek Vasut1-2/+2
The command assumed 32bit pointers so far, with 64bit pointer the command would overwrite a piece of stack. Fix it by extending the array size to cater for 64bit pointer, and use snprintf() to avoid writing past the end of the array ever again. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2023-03-09cmd: fdt: Align checksign parameter names in help textMarek Vasut1-2/+2
The help text references 'addr' as an optional key start address, but the explanation references the same as 'start', make sure they both read as 'addr'. Also update the abbreviated 'addr' in the explanation to 'address'. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Simon Glass <sjg@chromium.org>