summaryrefslogtreecommitdiffstats
path: root/include
Commit message (Collapse)AuthorAgeFilesLines
* log: Add an implementation of loggingSimon Glass2017-12-072-0/+247
| | | | | | | Add the logging header file and implementation with some configuration options to control it. Signed-off-by: Simon Glass <sjg@chromium.org>
* Drop the log bufferSimon Glass2017-12-073-52/+3
| | | | | | | | This does not appear to be used by any boards. Before introducing a new log system, remove this old one. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Move debug and logging support to a separate headerSimon Glass2017-12-072-45/+60
| | | | | | | | Before adding new features, move these definitions to a separate header to avoid further cluttering common.h. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Revert "sandbox: remove os_putc() and os_puts()"Simon Glass2017-12-071-0/+20
| | | | | | | | | | | | | While sandbox works OK without the special-case code, it does result in console output being stored in the pre-console buffer while sandbox starts up. If there is a crash or a problem then there is no indication of what is going on. For ease of debugging it seems better to revert this change. This reverts commit 47b98ad0f6779485d0f0c14f337c3eece273eb54. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini2017-12-055-48/+108
|\ | | | | | | | | | | | | | | | | | | Patch queue for efi - 2017-12-05 Highlights for this release: - Dynamic EFI object creation (lists instead of static arrays) - EFI selftest improvements - Minor fixes
| * efi_loader: helper function to add EFI object to listHeinrich Schuchardt2017-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid duplicate coding provide a helper function that initializes an EFI object and adds it to the EFI object list. efi_exit() is the only place where we dereference a handle to obtain a protocol interface. Add a comment to the function. Suggested-by: Alexander Graf <agraf@suse.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: manage protocols in a linked listHeinrich Schuchardt2017-12-011-2/+4
| | | | | | | | | | | | Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: efi_console: use helper functionsHeinrich Schuchardt2017-12-011-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use helper functions efi_created_handle and efi_add_protocol for creating the console handles and instaling the respective protocols. This change is needed if we want to move from an array of protocols to a linked list of protocols. Eliminate EFI_PROTOCOL_OBJECT which is not used anymore. Currently we have not defined protocol interfaces to be const. So efi_con_out and efi_console_control cannot be defined as const. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: helper functions for protocol managementHeinrich Schuchardt2017-12-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | This patch provides helper functions to manage protocols. efi_search_protocol - find a protocol on a handle efi_add_protocol - install a protocol on a handle efi_remove_protocol - remove a protocol from a handle efi_remove_all_protocols - remove all protocols from a handle Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: efi_gop: use correct types for parametersHeinrich Schuchardt2017-12-011-5/+5
| | | | | | | | | | | | | | | | | | | | Use efi_uintn_t instead of unsigned long. EFI_GRAPHICS_OUTPUT_BLT_OPERATION is an enum. If we don't define an enum we have to pass it as u32. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: argument of efi_search_obj should be constHeinrich Schuchardt2017-12-011-1/+1
| | | | | | | | | | | | | | | | The argument of efi_search_obj is not changed so it should be marked as const. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: make efi_create_handle non-staticHeinrich Schuchardt2017-12-011-0/+2
| | | | | | | | | | | | | | Export function efi_create_handle. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: efi_dp_match should have const argumentsHeinrich Schuchardt2017-12-011-1/+2
| | | | | | | | | | | | | | | | efi_dp_match does not change its arguments. So they should be marked as const. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: rework efi_search_objHeinrich Schuchardt2017-12-011-0/+2
| | | | | | | | | | | | | | | | | | | | | | EFI_HANDLEs are used both in boottime and in runtime services. efi_search_obj is a function that can be used to validate handles. So let's make it accessible via efi_loader.h. We can simplify the coding using list_for_each_entry. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: consistently use efi_uintn_t in boot servicesHeinrich Schuchardt2017-12-012-19/+22
| | | | | | | | | | | | | | | | Consistenly use efi_uintn_t wherever the UEFI spec uses UINTN in boot services interfaces. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: replace UINTN by efi_uintn_tHeinrich Schuchardt2017-12-012-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | UINTN is used in the UEFI specification for unsigned integers matching the bitness of the CPU. Types in U-Boot should be lower case. The patch replaces it by efi_uintn_t. Suggested-by: Simon Glass <sjg@chromium.org> Suggested-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: remove unused typedef for INTNHeinrich Schuchardt2017-12-011-1/+0
| | | | | | | | | | | | | | | | INTN is not used in the coding. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_selftest: test protocol managementHeinrich Schuchardt2017-12-011-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This unit test checks the following protocol services: InstallProtocolInterface, UninstallProtocolInterface, InstallMultipleProtocolsInterfaces, UninstallMultipleProtocolsInterfaces, HandleProtocol, ProtocolsPerHandle, LocateHandle, LocateHandleBuffer. As UninstallProtocolInterface and UninstallMultipleProtocolsInterfaces are not completely implemented a TODO message will shown for their failure. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: capitalize EFI_LOCATE_SEARCH_TYPE valuesHeinrich Schuchardt2017-12-011-3/+3
| | | | | | | | | | | | | | | | | | Constants should be capitalized. So rename the values of enum efi_locate_search_type. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_selftest: allow to select a single test for executionHeinrich Schuchardt2017-12-011-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Environment variable efi_selftest is passed as load options to the selftest application. It is used to select a single test to be executed. The load options are an UTF8 string. Yet I decided to keep the name propertiy of the tests as char[] to reduce code size. Special value 'list' displays a list of all available tests. Tests get an on_request property. If this property is set the tests are only executed if explicitly requested. The invocation of efi_selftest is changed to reflect that bootefi selftest with efi_selftest = 'list' will call the Exit bootservice. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: guard against double inclusion of efi_loader.hHeinrich Schuchardt2017-12-011-1/+6
| | | | | | | | | | | | | | Use a define to detect double inclusion of efi_loader.h. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: new function utf8_to_utf16Heinrich Schuchardt2017-12-011-0/+15
| | | | | | | | | | | | | | | | | | | | Provide a conversion function from utf8 to utf16. Add missing #include <linux/types.h> in include/charset.h. Remove superfluous #include <common.h> in lib/charset.c. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
| * efi_loader: implement SetWatchdogTimerHeinrich Schuchardt2017-12-011-0/+4
| | | | | | | | | | | | | | | | | | The watchdog is initialized with a 5 minute timeout period. It can be reset by SetWatchdogTimer. It is stopped by ExitBoottimeServices. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
* | Merge git://git.denx.de/u-boot-uniphierTom Rini2017-12-044-9/+7
|\ \
| * | mtd: nand: include <asm/cache.h> from include/linux/mtd/rawnand.hMasahiro Yamada2017-12-041-0/+1
| | | | | | | | | | | | | | | | | | This is needed for ARCH_DMA_MINALIGN. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * | mtd: nand: Rename nand.h into rawnand.hMasahiro Yamada2017-12-044-9/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This header was renamed to rawnand.h in Linux. The following is the corresponding commit in Linux. commit d4092d76a4a4e57b65910899948a83cc8646c5a5 Author: Boris Brezillon <boris.brezillon@free-electrons.com> Date: Fri Aug 4 17:29:10 2017 +0200 mtd: nand: Rename nand.h into rawnand.h We are planning to share more code between different NAND based devices (SPI NAND, OneNAND and raw NANDs), but before doing that we need to move the existing include/linux/mtd/nand.h file into include/linux/mtd/rawnand.h so we can later create a nand.h header containing all common structure and function prototypes. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | | omap3: evm: Explicitly use DISTRO_DEFAULTS features at startupDerald D. Woods2017-12-041-27/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [primary] Check MMC 0:1 for /extlinux/extlinux.conf and boot [fallback 1] Check MMC 0:1 zImage and run mmcbootz [fallback 2] Check MMC 0:1 uImage and run mmcboot [fallback 3] Check NAND partitions and run nandboot If 'extlinux.conf' is not found on MMC 0, the previous boot behavior is followed. Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
* | | ARM: arch-meson: build memory banks using reported memory from registersNeil Armstrong2017-12-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As discussed at [1], the Amlogic Meson GX SoCs can embed a BL31 firmware and a secondary BL32 firmware. Since mid-2017, the reserved memory address of the BL31 firmware was moved and grown for security reasons. But mainline U-Boot and Linux has the old address and size fixed. These SoCs have a register interface to get the two firmware reserved memory start and sizes. This patch adds a dynamic reservation of the memory zones in the device tree bootmem reserved memory zone used by the kernel in early boot. To be complete, the memory zones are also added to the EFI reserved zones. Depends on patchset "Add support for Amlogic GXL Based SBCs" at [2]. [1] http://lists.infradead.org/pipermail/linux-amlogic/2017-October/004860.html [2] http://lists.infradead.org/pipermail/linux-amlogic/2017-November/005410.html Changes since v1: - switched the #if to if(IS_ENABLED()) to compile all code paths - renamed function to meson_board_add_reserved_memory() - added a mem.h header with comment - updated all boards ft_board_setup() Changes since RFC v2: - reduced preprocessor load - kept Odroid-C2 static memory mapping as exception Changes since RFC v1: - switch to fdt rsv mem table and efi reserve memory - replaced in_le32 by readl() Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com> [trini: Fix warning on khadas-vim over missing <asm/arch/mem.h> Signed-off-by: Tom Rini <trini@konsulko.com>
* | | arm: Add Khadas VIM support based on Meson GXL familyNeil Armstrong2017-12-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds platform code for the Khadas VIM board based on a Meson GXL (S905X) SoC with the Meson GXL configuration. This initial submission supports UART, MMC/SDCard and Ethernet with the Internal RMII PHY. The meson-gxl-s905x-khadas-vim.dts is synchronised from the linux 4.13 stable tree as of 4.13.8. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
* | | arm: Add LibreTech CC support based on Meson GXL familyNeil Armstrong2017-12-041-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This adds platform code for the Libre Computer CC "Le Potato" board based on a Meson GXL (S905X) SoC with the Meson GXL configuration. This initial submission supports UART, MMC/SDCard and Ethernet with the Internal RMII PHY. The meson-gxl-s905x-libretech-cc.dts is synchronised from the linux 4.13 stable tree as of 4.13.8. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
* | | add support for Raspberry Pi Zero WDmitry Korunov2017-12-041-1/+1
| | | | | | | | | | | | Signed-off-by: Dmitry Korunov <dessel.k@gmail.com>
* | | test: compression: Convert to unit test frameworkSimon Glass2017-12-042-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adjust this test to use the unit test framework. Drop the two existing commands for running the tests and replace them with a single 'ut compression' command, with sub-commands. Signed-off-by: Simon Glass <sjg@chromium.org> [trini: Continue to have ret = run_test_internal(...) in run_test so ret is always initialized] Signed-off-by: Tom Rini <trini@konsulko.com>
* | | test: Add a command function for test executionSimon Glass2017-12-021-0/+16
|/ / | | | | | | | | | | | | | | The logic to either iterate through a list of tests or pick a named test is common to at lest two test suits. Move this logic into a new function and call it from the environment tests. Signed-off-by: Simon Glass <sjg@chromium.org>
* | rockchip: rk3128: add evb-rk3128 supportKever Yang2017-11-301-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | evb-rk3128 is an evb from Rockchip based on rk3128 SoC: - 2 USB2.0 Host port; - 1 HDMI port; - 2 10/100M eth port; - 2GB ddr; - 16GB eMMC; - UART to USB debug port; Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | rockchip: rk3128: add soc basic supportKever Yang2017-11-301-0/+70
| | | | | | | | | | | | | | | | | | | | RK3128 is a SoC from Rockchip with quad-core Cortex-A7 CPU and mali400 GPU. Support Nand flash, eMMC, SD card, USB 2.0 host and device, HDMI/LVDS/MIPI display. Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* | rockchip: rk3128: add device tree fileKever Yang2017-11-301-0/+190
|/ | | | | | | | | | | | | | Add dts binding header for rk3128, files origin from kernel. Series-Changes: 2 - fix i2c address - add saradc and usb phy node - emmc using fifo mode for there is no dma support in rk3128 emmc - add some clock id in cru.h Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
* Merge branch 'rmobile-mx' of git://git.denx.de/u-boot-shTom Rini2017-11-303-149/+10
|\
| * ARM: rmobile: Rework the ULCB CPLD driverMarek Vasut2017-11-301-13/+0
| | | | | | | | | | | | | | | | Rework the ULCB CPLD driver and make it into a sysreset driver, since that is what the ULCB CPLD driver is mostly for. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Migrate boards to RCar IIC driversMarek Vasut2017-11-302-24/+0
| | | | | | | | | | | | | | | | | | Stop using the old ad-hoc SH I2C driver and use the new RCar IIC driver instead. The SH I2C driver should be deprecated and removed eventually. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Remove SCIF configsMarek Vasut2017-11-302-14/+0
| | | | | | | | | | | | | | | | Since we use DM and DT, these SCIF configuration options are useless. Remove them. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Clean up ad-hoc clock macrosMarek Vasut2017-11-302-24/+2
| | | | | | | | | | | | | | | | As we have a proper clock framework driver, these macros are not needed, so drop them and clean up the whitelist. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Zap ad-hoc DRAM configuration macrosMarek Vasut2017-11-302-29/+3
| | | | | | | | | | | | | | | | These macros are no longer needed since the DRAM configuration is parsed from the DT. Drop them all. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Zap rmobile_sysinfo on Gen3Marek Vasut2017-11-302-4/+0
| | | | | | | | | | | | | | | | Since checkboard() is gone, rmobile_sysinfo is also pointless on Gen3. Furthermore, nuke ad-hoc CONFIG_RCAR_BOARD_STRING which is also dead. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Stop using rcar-common/common.c on Gen3Marek Vasut2017-11-302-16/+0
| | | | | | | | | | | | | | | | | | | | Since the Gen3 clock driver now has a .remove callback, it is no longer necessary to shut the clock down before booting Linux in the arch_preboot_os hook. Stop using it and while doing so, remove all the ad-hoc config options which this hook used. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Clean up GIC macrosMarek Vasut2017-11-303-10/+5
| | | | | | | | | | | | | | | | | | Pull out the GIC macros from the board configuration files into the common Gen3 configuration file since these macros are the same for all Gen3 systems. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Drop CONFIG_USB_MAX_CONTROLLER_COUNT on Gen3 boardsMarek Vasut2017-11-302-14/+0
| | | | | | | | | | | | | | | | The USB support has been switched to DM, so this macro is no longer meaningful, drop it. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
| * ARM: rmobile: Enable Micrel KSZ90x1 PHY driver on ULCBMarek Vasut2017-11-301-1/+0
| | | | | | | | | | | | | | | | Enable the Micrel KSZ90x1 driver on ULCB, since the board is populated with KSZ9031 and without this driver, the PHY cannot be operated. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
* | Merge git://git.denx.de/u-boot-marvellTom Rini2017-11-301-5/+0
|\ \
| * | arm64: mvebu: armada-7k/8k: drop useless #ifdefBaruch Siach2017-11-301-5/+0
| |/ | | | | | | | | | | | | | | | | | | | | CONFIG_ENV_IS_IN_NAND has been removed in commit 2be296538e2e (Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to Kconfig). CONFIG_ENV_IS_IN_SPI_FLASH has been removed in commit 91c868fe7cd (Convert CONFIG_ENV_IS_IN_SPI_FLASH to Kconfig). The environment #ifdef is now empty. Remove it. Signed-off-by: Baruch Siach <baruch@tkos.co.il> Signed-off-by: Stefan Roese <sr@denx.de>
* | Merge git://git.denx.de/u-boot-x86Tom Rini2017-11-301-0/+4
|\ \