aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2022-07-05lcd: Remove legacy CONFIG_FB_ADDR codeTom Rini1-4/+0
No platforms set both CONFIG_LCD and CONFIG_FB_ADDR at this time, drop this legacy code. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28Convert CONFIG_SYS_USB_FAT_BOOT_PARTITION to KconfigTom Rini1-0/+7
This converts the following to Kconfig: CONFIG_SYS_USB_FAT_BOOT_PARTITION Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28Convert CONFIG_USB_MAX_CONTROLLER_COUNT to KconfigTom Rini1-4/+0
This converts the following to Kconfig: CONFIG_USB_MAX_CONTROLLER_COUNT Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28common: usb: Update logic for usb.o, usb_hub.o and usb_storage.oTom Rini1-9/+4
Now that we have consistently named symbols to enable USB host or gadget controller support in SPL or full U-Boot, we do not need to unconditionally build USB files nor depend on non-SPL symbols to know when to build these common files. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28vpl: Ensure all VPL symbols in Kconfig have some VPL dependencyTom Rini1-10/+2
Tighten up symbol dependencies in a number of places. Ensure that a VPL specific option has at least a direct dependency on VPL. In places where it's clear that we depend on something more specific, use that dependency instead. Reported-by: Pali Rohár <pali@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28tpl: Ensure all TPL symbols in Kconfig have some TPL dependencyTom Rini1-1/+2
Tighten up symbol dependencies in a number of places. Ensure that a TPL specific option has at least a direct dependency on TPL. In places where it's clear that we depend on something more specific, use that dependency instead. Reported-by: Pali Rohár <pali@kernel.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-28spl: Move SPL_LDSCRIPT defaults to one placeTom Rini1-0/+12
We want to keep all of the default values for SPL_LDSCRIPT in the same place both for overall clarity as well as not polluting unrelated config files. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-27Merge tag 'xilinx-for-v2022.10' of ↵WIP/27Jun2022-nextTom Rini1-0/+2
https://source.denx.de/u-boot/custodians/u-boot-microblaze into next Xilinx changes for v2022.10 cpu: - Add driver for microblaze cpu net: - Add support for DM_ETH_PHY to AXI emac and emaclite xilinx: - Switch platforms to DM_ETH_PHY - DT chagnes in ZynqMP and Zynq - Enable support for SquashFS zynqmp: - Add support for KR260 boards - Move BSS from address 0 - Move platform identification from board code to soc driver - Improve zynqmp_psu_init_minimize versal: - Enable loading app at EL1 serial: - Setup default address and clock rates for DEBUG uarts pinctrl: - Add support for tri state and output enable properties relocate-rela: - Clean relocate-rela implementation for ARM64 - Add support for Microblaze microblaze: - Add support for runtime relocation - Rework cache handling (wiring, Kconfig) based on cpuinfo - Remove interrupt support timer: - Extract axi timer driver from Microblaze to generic location
2022-06-24microblaze: Add support for run time relocationMichal Simek1-0/+2
Microblaze is using NEEDS_MANUAL_RELOC from the beginnging. This is causing issues with function pointer arrays which need to be updated manually after relocation. Building code with -fPIC and linking with -pic will remove this limitation and there is no longer need to run manual update. By default still old option is enabled but by disabling NEEDS_MANUAL_RELOC code will be compiled for full relocation. The patch does couple of things which are connected to each other. - Define STATIC_RELA dependency to call relocate-rela to fill sections. - REMAKE_ELF was already enabled but u-boot file can't be used because sections are empty. relocate-rela will fill them and output file is u-boot.elf which should be used. - Add support for full relocation (u-boot.elf) - Add support for early relocation when u-boot.bin is loaded to different address then CONFIG_SYS_TEXT_BASE - Add rela.dyn and dynsym sections Disabling NEEDS_MANUAL_RELOC U-Boot size increased by 10% of it's original size (550kB to 608kB). Signed-off-by: Michal Simek <michal.simek@amd.com> Link: https://lore.kernel.org/r/a845670b34925859b2e321875f7588a29f6655f9.1655299267.git.michal.simek@amd.com
2022-06-06common/board_r.c: drop legacy and unused bi_enetaddrRasmus Villemoes1-15/+0
The bi_enetaddr field in struct bd_info is write-only; nothing ever reads back the value. Moreover, the value we write is more or less random, and certainly not something one can rely on: If the board has a writable environment and the mac address has been stored there, we fetch that value. But if the board doesn't, this code runs before initr_net() -> eth_initialize(), and thus before the code in eth-uclass which fetches MAC addresses from eeprom, fuses or whatnot and populates the (run-time) environment with those values. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-06-06event: fix static events for CONFIG_NEEDS_MANUAL_RELOCOvidiu Panait2-0/+18
Static events do not currently work post-relocation for boards that enable CONFIG_NEEDS_MANUAL_RELOC. Relocate event handler pointers for all event spies to fix this. Tested on Microblaze. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-06-06event: remove CONFIG_EVENT_DYNAMIC check in event_register()Ovidiu Panait1-2/+0
The whole event_register() function is wrapped in EVENT_DYNAMIC #ifdef checks, so the inner check is not needed: #if CONFIG_IS_ENABLED(EVENT_DYNAMIC) ... int event_register(...) { ... if (!CONFIG_IS_ENABLED(EVENT_DYNAMIC)) return -ENOSYS; } #endif Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-06-06spl: Rework and tighten some dependenciesTom Rini1-31/+24
- In a few places, add missing "depends on" that can be implied from the option name (i.e. SPL_DM_xxx depends on SPL_DM). - Make less use of "if SPL_xxx ... endif" clauses as most of the time this reads better as depends on. In the case of UBI however, move it all to a sub-menu. - Rework SPL_NO_CPU_SUPPORT as it's very specific to the non-SPL_FRAMEWORK implementation used on those platforms, and a tangent to how CONFIG_SPL_START_S_PATH was used. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06spl: Rework Kconfig to be more menu drivenTom Rini1-32/+22
Make it so that all of SPL, TPL and VPL are proper menus hidden behind a gating question. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06spl: Move all VPL, TPL and PowerPC specific CONFIG options to separate filesTom Rini4-658/+650
- Move all PowerPC (and some shared with Layerscape) options to common/spl/Kconfig.nxp - Move all other TPL related options to common/spl/Kconfig.tpl - Move all VPL related options to common/spl/Kconfig.vpl This makes the whole of common/spl/Kconfig slightly more readable. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR et al to KconfigTom Rini2-1/+15
This converts the following to Kconfig: CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTOR CONFIG_SYS_MMCSD_RAW_MODE_ARGS_SECTORS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SYS_NAND_SPL_KERNEL_OFFS to KconfigTom Rini1-0/+4
This converts the following to Kconfig: CONFIG_SYS_NAND_SPL_KERNEL_OFFS Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SYS_SPL_ARGS_ADDR to KconfigTom Rini3-3/+11
This converts the following to Kconfig: CONFIG_SYS_SPL_ARGS_ADDR In doing so, we also consistently use this variable for SPL_OS_BOOT and not CONFIG_SYS_FDT_BASE in some cases. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_TARGET to KconfigTom Rini1-0/+9
This converts the following to Kconfig: CONFIG_SPL_TARGET Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_GD_ADDR to KconfigTom Rini1-0/+8
This converts the following to Kconfig: CONFIG_SPL_GD_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SYS_SPL_MALLOC_SIZE et al to KconfigTom Rini2-3/+20
This converts the following to Kconfig: CONFIG_SYS_SPL_MALLOC_SIZE CONFIG_SYS_SPL_MALLOC_START We introduce a default value here as well, and CONFIG_SYS_SPL_MALLOC to control if we have a malloc pool or not. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_BSS_START_ADDR to KconfigTom Rini1-0/+15
This converts the following to Kconfig: CONFIG_SPL_BSS_START_ADDR Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_RELOC_TEXT_BASE et al to KconfigTom Rini1-2/+57
This converts the following to Kconfig: CONFIG_SPL_RELOC_TEXT_BASE CONFIG_SPL_RELOC_STACK CONFIG_SPL_RELOC_MALLOC_ADDR CONFIG_SPL_RELOC_MALLOC_SIZE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06imx7: Update CONFIG_SPL_STACK defaults in KconfigTom Rini1-1/+2
Update the Kconfig entry to have the correct defaults for i.MX7 platforms, and move the existing large comment from imx7_spl.h to doc/imx/common/imx7.txt so that it's not lost. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06imx6: Update CONFIG_SPL_STACK defaults in KconfigTom Rini1-1/+3
Update the Kconfig entry to have the correct defaults for i.MX6 platforms, and move the existing large comment from imx6_spl.h to doc/imx/common/imx6.txt so that it's not lost. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_STACK to KconfigTom Rini1-0/+18
This converts the following to Kconfig: CONFIG_SPL_STACK Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06ppc / layerscape: Clean up CONFIG_SYS_CCSR_DO_NOT_RELOCATE usageTom Rini1-0/+11
A number of PowerPC platforms define this, for SPL. To move this to Kconfig, it needs to be CONFIG_SPL_SYS_CCSR_DO_NOT_RELOCATE, so use CONFIG_IS_ENABLED() to check for usage. A number of layerscape platforms bring this logic from PowerPC, but only need a small part of it, for the fman driver. Remove their unused portion at least. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_BSS_MAX_SIZE et al to KconfigTom Rini1-0/+38
This converts the following to Kconfig: CONFIG_SPL_BSS_MAX_SIZE CONFIG_SPL_MAX_FOOTPRINT Note that the da850evm platforms were violating the "only use one" rule here, and so now hard-code their BSS limit. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_PAD_TO et al to KconfigTom Rini1-3/+47
This converts the following to Kconfig: CONFIG_SPL_PAD_TO CONFIG_SPL_MAX_SIZE CONFIG_TPL_PAD_TO CONFIG_TPL_MAX_SIZE Note that we need to make TPL_MAX_SIZE be hex, and so move and convert the existing places. Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_FS_LOAD_PAYLOAD_NAME et al to KconfigTom Rini2-4/+25
This converts the following to Kconfig: CONFIG_SPL_FS_LOAD_ARGS_NAME CONFIG_SPL_FS_LOAD_KERNEL_NAME CONFIG_SPL_FS_LOAD_PAYLOAD_NAME Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_NAND_RAW_ONLY et al to KconfigTom Rini1-1/+11
This converts the following to Kconfig: CONFIG_SPL_NAND_RAW_ONLY CONFIG_SPL_NAND_SOFTECC Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SPL_INIT_MINIMAL et al to KconfigTom Rini1-0/+14
This converts the following to Kconfig: CONFIG_SPL_INIT_MINIMAL CONFIG_SPL_FLUSH_IMAGE CONFIG_SPL_SKIP_RELOCATE Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06spl: Remove CONFIG_SPL_SATA_BOOT_DEVICETom Rini1-15/+5
This is only referenced in non-SPL_DM cases, of which there are currently none. Remove this option and slightly re-organize the code is there is now never an if/else at the start of spl_sata_load_image() Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-06Convert CONFIG_SYS_BOOTPARAMS_LEN to KconfigTom Rini2-2/+14
This converts the following to Kconfig: CONFIG_SYS_BOOTPARAMS_LEN Signed-off-by: Tom Rini <trini@konsulko.com>
2022-06-03fdt: Add U-Boot version to chosen nodeFrancesco Dolcini1-0/+10
Add a new device tree property "u-boot,version" in the chosen node to pass the U-Boot version to the operating system. This can be useful to implement a firmware upgrade procedure from the operating system. Signed-off-by: Francesco Dolcini <francesco.dolcini@toradex.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-20spl: spl_nand: Fix bad block handling in fitImageMichael Trimarchi1-4/+1
If the fitImage has some bad block in fit image area, the offset must be recalulcated. This should be done always. After implementing it in mxs now is possible to call the function even for that platform. Cc: Fabio Estevam <festevam@gmail.com> Tested-By: Tim Harvey <tharvey@gateworks.com> Reviewed-by: Tom Rini <trini@konsulko.com> Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com>
2022-05-11board_r: use IS_ENABLED(CONFIG_NEEDS_MANUAL_RELOC) in board_init_r()Ovidiu Panait1-8/+5
Drop CONFIG_NEEDS_MANUAL_RELOC ifdefs in board_init_r() and use IS_ENABLED() instead. Also, use the MANUAL_RELOC() macro to update the initcall pointers. Signed-off-by: Ovidiu Panait <ovidiu.panait@windriver.com>
2022-05-11common/console.c: use CONFIG_VAL() with PRE_CON_BUF_* variablesRasmus Villemoes1-6/+6
There is currently no support for PRE_CONSOLE_BUFFER in SPL, but if and when that gets implemented, one would almost certainly want to use a different address and/or size for the buffer (e.g., U-Boot proper might specify an address in DRAM and a generous buffer, while SPL would be much more constrained). So a prerequisite for adding SPL_PRE_CONSOLE_BUFFER is to make the code use SPL_-specific values. No functional change. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2022-05-11spl: Force disable non-FIT loading for TI secure devicesAndrew Davis1-2/+4
Booting of non-FIT images bypass our chain-of-trust boot flow, these options should not be allowed when high security is set. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-11spl: Rename Kconfig SPL_LEGACY_IMAGE_SUPPORT to SPL_LEGACY_IMAGE_FORMATAndrew Davis3-5/+5
This matches what this support is called in the non-SPL case. The postfix _SUPPORT is redundant as enabling Kconfig options implies support. With this we can use CONFIG_IS_ENABLED() as needed. Signed-off-by: Andrew Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-05-08Merge tag 'efi-2022-07-rc3-2' of ↵WIP/08May2022Tom Rini1-0/+128
https://source.denx.de/u-boot/custodians/u-boot-efi Pull request for efi-2022-07-rc3-2 UEFI: * Fix build errors due to - using sed with non-standard extension for regular expression - target architecture not recognized for CROSS_COMPILE=armv7a-* - CONFIG_EVENT not selected * add sha384/512 on certificate revocation Others: * factor out the user input handling in bootmenu command
2022-05-07bootmenu: factor out the user input handlingMasahisa Kojima1-0/+128
This commit moves the user input handling from cmd/bootmenu.c to common/menu.c to reuse it from other modules. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-06fdt: don't set linux,phandleJohn Keeping1-8/+0
This has been deprecated for over 10 years and everything now uses the plain "phandle" property in preference. There's no need to set linux,phandle when creating phandles for nodes that do not have one. dtc changed the default to creating just phandle in version 1.4.5 released in September 2017 with the justification that the new style had already been supported for 7 years by that point (see dtc commit 0016f8c ("dtc: change default phandles to ePAPR style instead of both")). Signed-off-by: John Keeping <john@metanate.com>
2022-05-03menu: menu_get_choice() return -ENOENT if menu item is emptyMasahisa Kojima1-0/+3
menu_get_choice() needs to handle the case that menu item is empty. In this case, menu_get_choice() returns -ENOENT. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com> Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-03menu: always show the menu regardless of the number of entryMasahisa Kojima1-1/+1
To make user aware of the menu entry selection, menu always appears regardless of the number of entry. Signed-off-by: Masahisa Kojima <masahisa.kojima@linaro.org> Adjust test/py/tests/test_bootmenu.py Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2022-05-02vpl: Add Kconfig options for VPLSimon Glass2-0/+286
Add VPL versions of commonly used Kconfig options. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02Introduce Verifying Program Loader (VPL)Simon Glass2-4/+36
Add support for VPL, a new phase of U-Boot. This runs after TPL. It is responsible for selecting which SPL binary to run, based on a verified-boot process. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02avb: Don't build in SPLSimon Glass1-1/+1
This feature is not used in SPL at present. Update the Makefile to avoid it being built. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-05-02bloblist: Correct Kconfig dependenciesSimon Glass1-2/+2
This feature is not available in SPL unless common/ and lib/ are built. Update the Kconfig to avoid build errors. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-04-29efi_loader: call efi_init_early() earlierHeinrich Schuchardt1-3/+3
efi_init_early() creates an event hook for block device probing. It has to be called before any block device is probed. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>