summaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)AuthorFilesLines
2022-10-30fdt: Drop support for LCD fixup in simplefbSimon Glass1-8/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop remaining references to CONFIG_LCDSimon Glass1-3/+0
These rely on the old LCD implementation which is to be removed. Drop it all. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: cmd: Drop old LCD codeSimon Glass2-45/+11
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop VCXK video controllerSimon Glass1-2/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30Drop CONFIG_LCD_LOGOSimon Glass2-74/+0
This relies on the old LCD implementation which is to be removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_INFOSimon Glass1-5/+0
This option is not used anymore since the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_INFO_BELOW_LOGOSimon Glass2-6/+2
This option is not used anymore since the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: Drop CONFIG_LCD_ALIGNMENTSimon Glass1-8/+0
This option is not needed now that the LCD implementation is being removed. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30video: lcd: Drop console rotationSimon Glass2-195/+0
This option is not used in U-Boot anymore. Drop it option and the associated implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-10-30splash: get devpart from environment variableJulien Masson1-0/+5
By default several types of splash locations are supported and the user can select one of them through environment var (splashsource). However the devpart is still hardcoded and we cannot change it from the environment. This patch add the support of "splashdevpart" which allow the user to set the devpart though this environment variable. Example: image located in splashscreen partition (MMC as raw) ``` splashsource=mmc_raw splashdevpart=0#splashscreen ``` Signed-off-by: Julien Masson <jmasson@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-30splash: support raw image from MMCJulien Masson2-0/+32
The user has now the choice to specify the splash location in the MMC as a raw storage. Signed-off-by: Julien Masson <jmasson@baylibre.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26scripts: Makefile.spl: Enable memory drivers to be built for SPLRoger Quadros1-0/+7
Introduce CONFIG_SPL_MEMORY to allow Memory drivers to be built for SPL. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-26spl: spl_legacy: Fix NAND boot on OMAP3 BeagleBoardRoger Quadros3-13/+14
OMAP3 BeagleBoard NAND boot hangs when spl_load_legacy_img() tries to read the header into 'struct hdr' which is allocated on the stack. As the header has already been read once before by spl_nand.c, we can avoid the extra header allocation and read here by simply passing around the pointer to the header. This fixes NAND boot on OMAP3 BeagleBoard. Signed-off-by: Roger Quadros <rogerq@kernel.org> Reviewed-By: Michael Trimarchi <michael@amarulasolutions.com>
2022-10-26Merge https://source.denx.de/u-boot/custodians/u-boot-watchdogTom Rini1-4/+8
- nuvoton: add expire function for generic reset (Jim) - handle watchdogs during keyed autoboot (Rasmus) - cyclic: Don't disable cylic function upon exceeding CPU time (Stefan) - ulp wdog: Updates to support iMX93 and DM (Alice)
2022-10-24cyclic: Don't disable cylic function upon exceeding CPU timeStefan Roese1-4/+8
With the migration of the watchdog infrastructure to cyclic functions it's been noticed, that at least one watchdog driver is broken now. As the execution time of it's watchdog reset function is quite long. In general it's not really necessary (right now) to disable the cyclic function upon exceeding CPU time usage. So instead of disabling the cylic function in this case, let's just print a warning once to show this potential problem to the user. Signed-off-by: Stefan Roese <sr@denx.de> Suggested-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Cc: Tom Rini <trini@konsulko.com> Cc: Pali Rohár <pali@kernel.org>
2022-10-21common: board_f: Print information for all sysresetsMichal Suchanek1-11/+18
Boards can have multiple sysresets, iterate all when printing sysreset info. Fixes: 23471aed5c ("board_f: Add reset status printing") Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-21input: Remove legacy KEYBOARD optionTom Rini1-3/+0
There are no platforms that have not migrated to using DM_KEYBOARD, remove the legacy option. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-20Merge branch 'master' of https://source.denx.de/u-boot/custodians/u-boot-sunxiTom Rini1-0/+6
Beside some rather unexciting sync of the DTs from the kernel tree, and some Kconfig cleanup, there are some improvements for the ARMv5 Allwinner family, to support boards with the F1C200s (64MB DRAM) better. We will get actual board support as soon as the DTs have passed the Linux review process. There is also support for the X96 Mate TV Box, featuring the H616 SoC and a full 4GB of DRAM. Also we found the secret to enable SPI booting on the H616 (pin PC5 must be pulled to GND), so the SPI boot support patch is now good to go. Passed the gitlab CI, plus briefly tested on Pine64-LTS, LicheePi Nano, X96 Mate and OrangePi Zero.
2022-10-18sunxi: Kconfig: use SoC-wide values for some symbolsAndre Przywara1-0/+6
Some configuration symbols formerly defined in header files were recently converted to Kconfig symbols. This moved their value definition into *every* defconfig file, even though those values are hardly board choices. Use the new Kconfig option to define per-SoC default values, in just one place, which makes the definition in each defconfig file redundant. We refrain from setting a sunxi specific value for CONFIG_SYS_BOOTM_LEN, so this defaults to a much better 64MB for uncompressed arm64 kernels. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-18stdio: Fix class iteration in stdio_add_devices()Michal Suchanek1-19/+13
There is a complaint in the code that iterates keyboards that we don't have the _check variant of class iterator but we in fact do, use it. In the code that iterates video devices there is an attempt to print errors but the simple iterator does not return a device when there is an error. Use the _check variant of the iterator as well. Also format error messages consistently. Signed-off-by: Michal Suchanek <msuchanek@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-10-11spl: atf: Fix clang -Wasm-operand-widths warningAlistair Delva1-1/+1
common/spl/spl_atf.c:187:51: warning: value size does not match register size specified by the constraint and modifier [-Wasm-operand-widths] __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); ^ common/spl/spl_atf.c:187:34: note: use constraint modifier "w" __asm__ __volatile__("msr DAIF, %0\n\t" : : "r" (daif) : "memory"); ^~ %w0 Use %x0 to match what Linux does in <asm/sysreg.h> write_sysreg(). Signed-off-by: Alistair Delva <adelva@google.com> Cc: Kever Yang <kever.yang@rock-chips.com> Cc: Michael Walle <michael@walle.cc> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@konsulko.com> Cc: Nick Desaulniers <ndesaulniers@google.com>
2022-10-10usb: Add missing guard around env_get() in usb_hubMarek Vasut1-1/+3
The env_get() might be undefined in case ENV_SUPPORT is disabled, which may happen e.g. in SPL. Add missing ifdef guard around the env_get() to prevent build failure. Signed-off-by: Marek Vasut <marex@denx.de> Tested-by: Fabio Estevam <festevam@denx.de>
2022-10-07common/board_f: drop ifdefs around header includesOvidiu Panait1-2/+0
Drop the remaining ifdef around spl.h include. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-10-07common/board_f: introduce arch_setup_dest_addr()Ovidiu Panait1-14/+7
In order to move ppc-specific code out of setup_dest_addr(), provide an arch-specific variant arch_setup_dest_addr(), that can be used by architecture code to fix up the initial reloc address. It is called at the end of setup_dest_addr() initcall and the default implementation is a nop stub. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-10-07common/board_f: move CONFIG_MACH_TYPE logic to arch/arm/lib/bdinfo.cOvidiu Panait1-7/+0
asm/mach_type.h header and CONFIG_MACH_TYPE macro are arm-specific, so move related bdinfo logic to arch_setup_bdinfo() in arch/arm/lib/bdinfo.c. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Ovidiu Panait <ovpanait@gmail.com>
2022-10-07common/board_f: remove XTRN_DECLARE_GLOBAL_DATA_PTR dead codeOvidiu Panait1-11/+0
The XTRN_DECLARE_GLOBAL_DATA_PTR declarations in ppc code are permanently commented out, so there are no users for this macro: #if 1 #define DECLARE_GLOBAL_DATA_PTR register volatile gd_t *gd asm ("r2") #else /* We could use plain global data, but the resulting code is bigger */ #define XTRN_DECLARE_GLOBAL_DATA_PTR extern #define DECLARE_GLOBAL_DATA_PTR XTRN_DECLARE_GLOBAL_DATA_PTR \ gd_t *gd #endif Remove all references to this macro, but add a documentation note regarding the possibility of using plain global data for the GD pointer. Signed-off-by: Ovidiu Panait <ovpanait@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
2022-10-03Merge branch 'next'Tom Rini36-87/+490
2022-09-30dm: core: Provide a way to reset the device treeSimon Glass1-0/+2
At present there is only one device tree used by the ofnode functions, except for some esoteric use of live tree. In preparation for supporting more than one, add a way to reset the list of device trees. For now this does nothing. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29test: Support testing malloc() failuresSimon Glass1-0/+19
It is helpful to test that out-of-memory checks work correctly in code that calls malloc(). Add a simple way to force failure after a given number of malloc() calls. Fix a header guard to avoid a build error on sandbox_vpl. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Sean Anderson <seanga2@gmail.com>
2022-09-29event: Fix a typo in the EVENT helpSimon Glass1-1/+1
Fix the help message. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29treewide: Drop image_header_t typedefSimon Glass17-46/+46
This is not needed and we should avoid typedefs. Use the struct instead and rename it to indicate that it really is a legacy struct. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29treewide: Drop bootm_headers_t typedefSimon Glass1-1/+1
This is not needed and we should avoid typedefs. Use the struct instead. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-29board_r: Relocate OF_EMBED if NEEDS_MANUAL_RELOC onlyPierre-Clément Tosi1-3/+3
When the embedded device tree is pointed to by the __dtb_dt_*begin symbols, it seems to be covered by the early relocation code and doesn't need to be manually patched. Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
2022-09-27autoboot: make sure watchdog device(s) are handled with keyed autobootRasmus Villemoes1-0/+3
Currently, AUTOBOOT_KEYED and its variant AUTOBOOT_ENCRYPTION are broken when one has an external always-running watchdog device with a timeout shorter than the configured boot delay (in my case, I have a gpio-wdt one with a timeout of 1 second), because we fail to call WATCHDOG_RESET() in the loops where we wait for the bootdelay to elapse. This is done implicitly in the !AUTOBOOT_KEYED case, i.e. abortboot_single_key(), because that loop contains a udelay(10000), and udelay() does a WATCHDOG_RESET(). To fix this, simply add similar udelay() calls in the other loops. Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-25blk: Rename if_type to uclass_idSimon Glass3-5/+5
Use the word 'uclass' instead of 'if_type' to complete the conversion. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-24serial: Implement serial_flush() function for console flush() fallbackPali Rohár2-0/+11
Like in all other console functions, implement also serial_flush() function as a fallback int console flush() function. Flush support is available only when config option CONSOLE_FLUSH_SUPPORT is enabled. So when it is disabled then provides just empty static inline function serial_flush(). Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-24console: Implement flush() functionPali Rohár2-0/+67
On certain places it is required to flush output print buffers to ensure that text strings were sent to console or serial devices. For example when printing message that U-Boot is going to boot kernel or when U-Boot is going to change baudrate of terminal device. Therefore introduce a new flush() and fflush() functions into console code. These functions will call .flush callback of associated stdio_dev device. As this function may increase U-Boot side, allow to compile U-Boot without this function. For this purpose there is a new config CONSOLE_FLUSH_SUPPORT which is enabled by default and can be disabled. It is a good idea to have this option enabled for all boards which have enough space for it. When option is disabled when U-Boot defines just empty static inline function fflush() to avoid ifdefs in other code. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-23board_f: show_dram_config: Print also real DRAM sizePali Rohár1-1/+36
32-bit U-Boot builds cannot use more than around 2 GB of DDR memory. But on some platforms/boards it is possible to connect also 4 GB SODIMM DDR memory. U-Boot currently prints only effective size of RAM which can use, which may be misleading as somebody would expect that this line prints total size of connected DDR modules. So change show_dram_config code to prints both real and effective DRAM size if they are different. If they are same then print just one number like before. It is possible that effective size is just few bytes smaller than the real size, so print both numbers only in case function print_size() prints formats them differently. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-23board_f: Fix printing gd->ram_size and gd->ram_topPali Rohár1-2/+2
Members gd->ram_size and gd->ram_top are of type phys_addr_t which does not have to fit into ulong type. So cast them into unsigned long long. Fixes: 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-23board_f: Fix types for board_get_usable_ram_top()Pali Rohár1-1/+1
Commit 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") changed type of ram_top member from ulong to phys_addr_t but did not changed types in board_get_usable_ram_top() function which returns value for ram_top. So change ulong to phys_addr_t type also in board_get_usable_ram_top() signature and implementations. Fixes: 37dc958947ed ("global_data.h: Change ram_top type to phys_addr_t") Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2022-09-23common/memsize.c: Fix get_effective_memsize() to check for overflowPali Rohár1-3/+15
Ensure that top of RAM can be represented by phys_size_t type. If RAM is too large or RAM base address is too upper then limit RAM size to prevent address space overflow. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-23common/memsize.c: Fix get_effective_memsize() to always check for ↵Pali Rohár1-1/+1
CONFIG_MAX_MEM_MAPPED CONFIG_MAX_MEM_MAPPED when defined specifies upper memory mapped limit. So check for it always, and not only when CONFIG_VERY_BIG_RAM is defined. Signed-off-by: Pali Rohár <pali@kernel.org>
2022-09-20arm: mvebu: Add default SPL_SIZE_LIMIT for 32-bit SoCsPali Rohár1-0/+1
32-bit Marvell Armada BootROMs limit maximal size of SPL image to 192 kB. So define 192 kB (= 0x30000) limit as default value for SPL_SIZE_LIMIT. Signed-off-by: Pali Rohár <pali@kernel.org> Reviewed-by: Marek Behún <kabel@kernel.org> Reviewed-by: Stefan Roese <sr@denx.de>
2022-09-19Merge branch 'master' into nextTom Rini3-1/+36
Signed-off-by: Tom Rini <trini@konsulko.com>
2022-09-18cyclic: Use schedule() instead of WATCHDOG_RESET()Stefan Roese9-17/+17
Globally replace all occurances of WATCHDOG_RESET() with schedule(), which handles the HW_WATCHDOG functionality and the cyclic infrastructure. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-18cyclic: Introduce schedule() functionStefan Roese1-0/+16
This patch introduces a schedule() function, which shall be used instead of the old WATCHDOG_RESET. Follow-up patches will make sure, that this new function is used. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Tested-by: Tom Rini <trini@konsulko.com> [am335x_evm, mx6cuboxi, rpi_3,dra7xx_evm, pine64_plus, am65x_evm, j721e_evm]
2022-09-16blk: Switch over to using uclass IDsSimon Glass3-6/+6
We currently have an if_type (interface type) and a uclass id. These are closely related and we don't need to have both. Drop the if_type values and use the uclass ones instead. Maintain the existing, subtle, one-way conversion between UCLASS_USB and UCLASS_MASS_STORAGE for now, and add a comment. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Select SPL_LEGACY_BLOCK automaticallySimon Glass1-2/+0
Selecting this option can be handled in the Kconfig option itself, as it is with BLK. Update this an drop the various 'select' clauses. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-16blk: Rename HAVE_BLOCK_DEVICESimon Glass1-2/+2
This option is fact really related to SPL. For U-Boot proper we always use driver model for block devices, so CONFIG_BLK is enabled if block devices are in use. It is only for SPL that we have two cases: - SPL_BLK is enabled, in which case we use driver model and blk-uclass.c - SPL_BLK is not enabled, in which case (if we need block devices) we must use blk_legacy.c Rename the symbol to SPL_LEGACY_BLOCK to make this clear. This is different enough from BLK and SPL_BLK that there should be no confusion. Signed-off-by: Simon Glass <sjg@chromium.org>
2022-09-15cli: Reduce size of readline buffers in SPLSean Anderson1-0/+5
Normally, readline is not used int SPL. However, it may be useful to enable the Freescale DDR interactive mode in SPL, while U-Boot is still executing from SRAM. The default settings for readline result in a large buffer being allocated. Reduce the size of the maximum input line, and the number of lines of scrollback when building for SPL. Signed-off-by: Sean Anderson <sean.anderson@seco.com> Reviewed-by: Simon Glass <sjg@chromium.org>