summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)Author
2024-08-27sandbox: Fix pinmux warnings with non-test devicetreesSean Anderson
The sandbox pinmux driver is used in the non-test devicetree as well as the test one. I didn't realize this when I modified the driver for tests, and so broke the regular use case (which only resulted in warnings). First, making the pinmux and the UART group available pre-relocation to avoid ENODEV errors. Then, convert the pin groups and functions to the new style, adding onewire group as well. Fixes: 7f0f1806e3a ("test: pinmux: Add test for pin muxing") Closes: https://source.denx.de/u-boot/u-boot/-/issues/2 Signed-off-by: Sean Anderson <[email protected]> Reviewed-by: Simon Glass <[email protected]>
2024-08-26Merge patch series "Tidy up console recording in tests"Tom Rini
Simon Glass <[email protected]> says: This series started as a small fix for checking for an empty line, but in the process several other problems were found and fixed: - fix tests which use console recording but don't set the flag - drop unnecessary resetting of the console in tests - drop unnecessary blank line before MMC output - update the docs a little - fix buildman test failure on newer Pythons - a few other minor things This series also renames the confusing flag names, so that they are easier to remember - just a UTF_ (unit-test flags) prefix.
2024-08-26test: log: Use UTF_CONSOLE in testsSimon Glass
Set this flag rather than doing things manually in the test. Signed-off-by: Simon Glass <[email protected]>
2024-08-26test: Rename UTF_CONSOLE_REC to UTF_CONSOLESimon Glass
The _REC suffix doesn't add much. Really what we want to know is whether the test uses the console, so rename this flag. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]>
2024-08-26test: Rename unit-test flagsSimon Glass
The UT_TESTF_ macros read as 'unit test test flags' which is not right. Rename to UTF ('unit test flags'). This has the benefit of being shorter, which helps keep UNIT_TEST() declarations on a single line. Give the enum a name and reference it from the UNIT_TEST() macros while we are here. Signed-off-by: Simon Glass <[email protected]>
2024-08-26test: Fail when an empty line is expected but not presentSimon Glass
The existing implementation of ut_assert_nextline_empty() cannot distinguish between an empty line and no line at all. It can in fact be called at the end of the recorded output and will happily return success. Adjust the logic so that this condition is detected. Show a failure message in this case. Fix the one test which falls foul of this fix. Signed-off-by: Simon Glass <[email protected]> Fixes: 400175b0a7d ("test: Add a way to check each line of console...") Reviewed-by: Mattijs Korpershoek <[email protected]>
2024-08-26global_data: Remove environment members if not usedSimon Glass
If the environment is not enabled we don't need these fields in global_data. Make them conditional. Make these fields conditional. Move env_buf up one so it can share an #ifdef. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Remove jump table in SPLSimon Glass
SPL builds don't use the jump table since they cannot run apps. Drop it, moving it together with boardf. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move pointer members togetherSimon Glass
Collect the pointer members near the top of global_data to help with alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move ulong fields togetherSimon Glass
Move all the always-present ulong fields next to the others at the top of global_data Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Put phys_addr fields near the topSimon Glass
Put these fields near the top and together, since they have the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move env_addr field higherSimon Glass
Move this field to be with others of the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move baud_rate field lowerSimon Glass
Move this field to be with others of the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Reduce size of early-malloc varsSimon Glass
The early malloc region is normally quite small and is certainly less than 4GB, so use a 32-bit value for the limit and pointer. Update the comments for clarity while we are here. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop fb_baseSimon Glass
This value mirrors information recorded by driver model video drivers, so can be removed to save space. Drop it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: log: Reorder and shrink fieldsSimon Glass
Some of the logging fields are larger than they need to be. Shrink them and adjust the ordering to improve alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Reduce the size of mon_lenSimon Glass
This is the length of the U-Boot binary, which is typically 200-800KB and certainly not larger than 4GB. Use a 32-bit value to save space in global_data and move it up to be with fields of the same alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Reduce the size of bus_clk and mem_clkSimon Glass
The bus clock and memory clock are unlikely to go above 4GHz for now, so reduce the field size to 32 bits. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Collect common fields at the topSimon Glass
Move all the fields which are always present to the top of the struct, so we can potentially save some space by taking note of alignment. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop spl_handoffSimon Glass
Provide a function to locate this information, rather than doing it automatically on startup, to save space in global_data. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Move new_bloblist to boardfSimon Glass
This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Move new_bootstage to boardfSimon Glass
This value is only used before relocation. Move it to the new boardf struct. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Move fdt_size to boardSimon Glass
This value is only really used before relocation. There is not much use to showing its value in bdinfo, so drop it. Move it to the new boardf struct. Signed-off-by: Simon Glass <[email protected]>
2024-08-26board_f: Add a new struct to hold pre-relocation infoSimon Glass
Quite a few of the members of struct global_data are only used before reloction, or have little meaning afterwards, yet they hang around in struct global_data for the lifetime of U-Boot. This uses up precious pre-relocation SRAM on many boards. To help with this, start a new struct which exists only before relocation. Move new_fdt into this new struct. Drop the display of it in the 'bdinfo' command as it is probably not very useful. Note that the field does not exist in SPL builds. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Use less space for environment fieldsSimon Glass
Use shorter types for some of these fields to save space. Reorder to put fields with like alignment together. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop pci_bootdelaySimon Glass
This is not used. Drop the field and the environment code which uses it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Drop global_data hoseSimon Glass
This is set on one x86 boards, but is not used anymore. Drop it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Remove pci_ram_topSimon Glass
This field is set but not used. Drop it. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Convert have_console into a flagSimon Glass
We don't need a full word for this boolean value. Convert it into a flag to save space in global_data. Reviewed-by: Alexander Sverdlin <[email protected]> Signed-off-by: Simon Glass <[email protected]>
2024-08-26video: Add a function to obtain the framebuffer addressSimon Glass
Add a new function which returns the framebuffer address of the first video device. This will allow the global_data field top be dropped. Signed-off-by: Simon Glass <[email protected]>
2024-08-26global_data: Move pci_clk to m68k and powerpcSimon Glass
Only m68k and powerpc use this field, so move it to the arch-specific info, to reduce the size for other archs. Signed-off-by: Simon Glass <[email protected]>
2024-08-23Merge patch series "spl: mmc: Some tweaks for SPL, particularly with MMC"Tom Rini
Simon Glass <[email protected]> says: This series includes various minor fixes and tweaks found when trying to reduce the size of MMC code in SPL.
2024-08-23blk: Correct comment for blk_get_devnum_by_uclass_idname()Simon Glass
Update the comment to match the function. Fix the indentation while we are here. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2024-08-23spl: Create a function to init spl_load_infoSimon Glass
Rather than having every caller set this up individually, create a common init function. This allows new fields to be added without the risk of them being left uninited. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Michael Trimarchi <[email protected]>
2024-08-23spl: Use unified inline functions for spl_load_infoSimon Glass
Rather than declaring completely separate functions, put the code for each case into the same function. This makes it easier to read. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Sean Anderson <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2024-08-23log: Avoid including function names by defaultSimon Glass
Unless function names are requested, the logging system should not compile these into the code. Adjust the macros to handle this. This means that turning on function names at runtime won't work unless CONFIG_LOGF_FUNC is enabled. We could perhaps split this into a separate option if that is a problem. Enable CONFIG_LOGF_FUNC logging for sandbox since the tests expect the function names to be included. Fix up the pinmux test which checks a logging statement. Signed-off-by: Simon Glass <[email protected]> Reviewed-by: Quentin Schulz <[email protected]>
2024-08-23gw_ventana: Remove unneeded commentsFabio Estevam
Remove several comments that do not apply anymore to the current file content. While at it, write 'PMIC' into a single line for consistency. Signed-off-by: Fabio Estevam <[email protected]>
2024-08-23config: Add 'update_bootimg' command to update flash.bin on Phytec's imx8mmLukasz Majewski
This command allows easy update on SD card or eMMC of the flash.bin generated (with binman) during u-boot build. Signed-off-by: Lukasz Majewski <[email protected]> Reviewed-by: Benjamin Hahn <[email protected]> Tested-by: Teresa Remmet <[email protected]> Reviewed-by: Fabio Estevam <[email protected]>
2024-08-22Merge branch 'master' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-samsung into next
2024-08-22boot: android: fix booting without a ramdiskMichael Walle
android_image_get_ramdisk() will return an error if there is no ramdisk. Using the android image without a ramdisk worked until commit 1ce8e10f3b4b ("image: Fix up ANDROID_BOOT_IMAGE ramdisk code") because the return code wasn't checked until then. Return -ENOENT in case there is no ramdisk and translate that into -ENOPKG in the calling code, which will then indicate "no ramdisk" to its caller (boot_get_ramdisk()). This way, we can get rid of the "*rd_data = *rd_len = 0;" in the error path, too. With this, I'm able to boot a linux kernel using fastboot again: fastboot --base 0x41000000 --header-version 2 --dtb /path/to/dtb \ --cmdline "root=/dev/mmcblk0p1 rootwait" boot path/to/Image Signed-off-by: Michael Walle <[email protected]> Reviewed-by: Mattijs Korpershoek <[email protected]> Reviewed-by: Simon Glass <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mattijs Korpershoek <[email protected]>
2024-08-20Merge tag 'u-boot-dfu-next-20240820' of ↵Tom Rini
https://source.denx.de/u-boot/custodians/u-boot-dfu into next u-boot-dfu-next-20240820 - Migrate Atmel usb gadget to DM_USB_GADGET - More small cleanups/improvements on the atmel UDC driver - Change udc uclass name from "usb" -> "usb_gadget"
2024-08-19Merge tag 'v2024.10-rc3' into nextTom Rini
Prepare v2024.10-rc3
2024-08-19Merge patch series "clk: mediatek: mt7622: clk migration for OF_UPSTREAM"Tom Rini
Christian Marangi <[email protected]> says: These are all the required patches to migrate clk and correctly support OF_UPSTREAM. This will align the clk index to upstream to support the same clk implementation with downstream and upstream DTS.
2024-08-19clk: mediatek: mt7622: add missing A1/2SYS clock IDChristian Marangi
Add missing A1/2SYS clock ID just as a reference for OF_UPSTREAM support. These clocks are not defined and are not usable as current clock topckgen OPs doesn't support gates. These special node won't ever be used by uboot hence just add them for reference. Signed-off-by: Christian Marangi <[email protected]> Tested-by: Frank Wunderlich <[email protected]>
2024-08-19clk: mediatek: mt7622: add missing clock PERIBUS_SEL clockChristian Marangi
Add missing PERIBUS_SEL clock to match upstream linux clk ID order. Also convert pericfg to mux + gate implementation as now we have also mux on top of gates. Signed-off-by: Christian Marangi <[email protected]>
2024-08-19clk: mediatek: mt7622: add missing clock PERI_UART4_PDChristian Marangi
Add missing clock PERI_UART4_PD for peri clock gates. This is needed to match upstream linux clk ID in preparation for OF_UPSTREAM. Also convert infracfg to mux + gate implementation as now we have mux on top of gates. Signed-off-by: Christian Marangi <[email protected]>
2024-08-19clk: mediatek: mt7622: add missing clock MUX1_SELChristian Marangi
Add missing infra clock MUX1_SEL needed for CPU clock. This is needed to match the upstream clk ID order in preparation for OF_UPSTREAM. Signed-off-by: Christian Marangi <[email protected]>
2024-08-19clk: mediatek: mt7622: add missing clock define for MAIN_CORE_ENChristian Marangi
Add missing clock for MAIN_CORE_EN. This is a special clock as it's a gate for the APMIXED clocks required as a parent for CPU clocks. Signed-off-by: Christian Marangi <[email protected]>
2024-08-19clk: mediatek: mt7622: move INFRA_TRNG to the bottomChristian Marangi
Move INFRA_TRNG clock to the bottom of the clk ID to match upstream linux order. This is in preparation of OF_UPSTREAM. Signed-off-by: Christian Marangi <[email protected]>
2024-08-19clk: mediatek: mt7622: rename AUDIO_AWB3 to AUDIO_AWB2Christian Marangi
Rename AUDIO_AWB3 to AUDIO_AWB2 to match upstream linux naming in preparation for OF_UPSTREAM support. Signed-off-by: Christian Marangi <[email protected]>