aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-07-26Merge git://git.denx.de/u-boot-uniphierHEADmasterTom Rini
2017-07-26Merge git://git.denx.de/u-boot-mipsTom Rini
2017-07-26MAINTAINERS: Update maintainer for x86Bin Meng
This adds myself as one of the x86 maintainers. Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2017-07-26FIT: List kernel_noload in the list of typesTom Rini
In the source_file_format.txt file we talk about how to construct a valid FIT image. While it already says to look at the source for the full list, add kernel_noload to the explicit list of types. This is arguably the most important type to use as most often we are including a kernel that will run from wherever it is loaded into memory and execute. This for example, allows you to create a single FIT image for Linux that can be used on both OMAP and i.MX devices as the kernel will not need to be moved in memory. Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-26ram: stm32: add stm32h7 supportPatrice Chotard
STM32F7 and H7 shared the same SDRAM control block. On STM32H7 few control bits has been added. The current driver need some minor adaptation as FMC block enable/disable for H7. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-07-26ARM: DTS: stm32: remove useless mr-nbanks propertyPatrice Chotard
FMC driver is now able to discover the bank number by parsing bank subnodes. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26ram: stm32: add second SDRAM bank managementPatrice Chotard
FMC is able to manage 2 SDRAM banks, but the current driver implementation is only able to manage the first SDRAM bank. Even if only bank2 is used, some bank1 registers must be configured. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26ram: stm32: replace fdtdec_get by ofnode callsPatrice Chotard
Replace all fdtdec_get..() calls by ofnode_read...() or dev_read..(). This will allow drivers to support a live device tree. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26ram: stm32: get base address from DTPatrice Chotard
Retrieve RAM base address from DT instead of using STM32_SDRAM_FMC For STM32F7, FMC block base address is 0xA0000000, but SDRAM registers are located at offset 0x140 inside FMC block. Update the stm32_fmc_regs fields with all FMC registers to map SDRAM registers at the right address. These additionals registers will be used later. Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2017-07-26ram: stm32: migrate fmc defines in driver filePatrice Chotard
Migrate all FMC defines from arch/arm/include/asm/arch-stm32f7/fmc.h to drivers/ram/stm32_sdram.c This will avoid to add an additionnal arch-stm32xx/fmc.h file when a new stm32 family soc will be introduced. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Vikas Manocha <vikas.manocha@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26clk: stm32f7: remove clock_get()Patrice Chotard
All drivers which was using clock_get() are now using clk_get_rate() from clock framework, now it's safe to remove clock_get(). Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26spi: stm32_qspi: add clk_get_rate() supportPatrice Chotard
Replace proprietary clock_get() by clk_get_rate() The stm32_qspi is now "generic" and can be used by other STM32 SoCs. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26serial: stm32x7: add clk_get_rate() supportPatrice Chotard
Replace proprietary clock_get() by clk_get_rate() The stm32x7 serial driver is now "generic" and can be used by other STM32 SoCs. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26serial: stm32x7: migrate serial struct to driverPatrice Chotard
This allow to remove include/dm/platform_data/serial_stm32x7.h which was included in the past by stm32x7 driver and by stm32f746-disco.c board file. Since patch 42bf5e7c27 "serial: stm32f7: add device tree support" this file is no more needed in board file. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26clk: stm32f7: cleanup clocks unused definitionsPatrice Chotard
clean the code by removing unused enums, structs and defines related to clocks Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26clk: stm32f7: add clock .get_rate() callbackPatrice Chotard
Add clock framework .get_rate callback. This step will allow to convert all drivers which was using proprietary clock_get() to use clock framework .get_rate(). Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26clk: stm32f7: get RCC base address from DTPatrice Chotard
Retrieve RCC base address from DT, this will prepare the ground for future STM32 SoCs support. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26clk: stm32f7: add static for configure_clocks()Patrice Chotard
Also remove its declaration from stm32.h which is no more needed. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26ARM: DTS: stm32: align DT clock declaration with kernelPatrice Chotard
Use the same clocks macro than the one used by kernel DT. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Acked-by: Vikas MANOCHA <vikas.manocha@st.com>
2017-07-26arm: mach-keystone: Fixes issue with return values in inline assemblySrinivas, Madan
The inline assembly functions in mon.c assume that the caller will check for the return value in r0 according to regular ARM calling conventions. However, this assumption breaks down if the compiler inlines the functions. The caller is then under no obligation to use r0 for the result. To fix this disconnect, we must explicitly move the return value from the smc/bl call to the variable that the function returns. Signed-off-by: Madan Srinivas <madans@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26configs: ti: armv7: Fixes bug in fit_loadaddr for ramfs bootMadan Srinivas
The load address of ramdisk, rdaddr is 0x88080000 and fit_loadaddr is defined as 0x88000000. This leaves only 512Kbytes for the fit image. When the FIT images are larger than this, it will overwite the ramdisk and cause the boot to fail. For eg, The K2 HS fit images are a few MB and end up overwriting the ramdsk. This patch moves the fit_loadaddr to 0x87000000, leaving a 16MB window for the fit image. This memory can be reclaimed once the kernel starts running. Signed-off-by: Madan Srinivas <madans@ti.com>
2017-07-26arm: mach-keystone: Updates mon_install for K2G HSMadan Srinivas
On early K2 devices (eg. K2HK) the secure ROM code does not support loading secure code to firewall protected memory, before decrypting, authenticating and executing it. To load the boot monitor on these devices, it is necessary to first authenticate and run a copy loop from non-secure memory that copies the boot monitor behind firewall protected memory, before decrypting and executing it. On K2G, the secure ROM does not allow secure code executing from unprotected memory. Further, ROM first copies the signed and encrypted image into firewall protected memory, then decrypts, authenticates and executes it. As a result of this, we cannot use the copy loop for K2G. The mon_install has to be modified to pass the address the signed and encrypted secure boot monitor image to the authentication API. For backward compatibility with other K2 devices and K2G GP, the mon_install API still supports a single argument. In this case the second argument is set to 0 by u-boot and is ignored by ROM Signed-off-by: Thanh Tran <thanh-tran@ti.com> Signed-off-by: Madan Srinivas <madans@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26configs: k2x_evm: Reorder default boot commandAndrew F. Davis
We first split the CONFIG_BOOTCOMMAND into its components to improve readability. We then make the following order changes: - Run findfdt first so the fdt name can be used in envboot like OMAP - Install the boot monitor before running the PMMC so we can make any needed secure changes before PMMC, do this on both HS and non-HS - Move set_name_pmmc to just before get_pmmc_${boot} Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26configs: k2x_evm: Adds environment variables for secure devicesMadan Srinivas
Updates the default u-boot environment variables to support secure boot. On secure devices, a secure boot monitor (sec-bm) needs to be installed by u-boot. Signed-off-by: Madan Srinivas <madans@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26configs: k2x_evm: Adds FIT loading environment variablesAndrew F. Davis
Updates the default u-boot environment variables to support FIT image loading. Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26board: ti: x15: Add support for beagle_X15 revCLokesh Vutla
BeagleBoard X15 revC board is similar to X15 revB1 except with a SR2.0 where revB1 uses a SR1.1. Add board detection support for revC. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26board: ti: am57xx: Fix detection of board versionLokesh Vutla
board_is*("rev", board_ti_get_rev()) uses strncmp() for revison detection and assumes it is success if return value is <= 0. This will fail in case of multiple versions, as revb will be true for board_is_*revb() and board_is_*reva(). Fix it by looking for exact match of the string. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2017-07-26odroid-c2: enable GPIOBeniamino Galvani
GPIOs are now supported on Meson GXBB, enable driver and command in the config. Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26pinctrl: meson: add GPIO supportBeniamino Galvani
This commit adds GPIO support to the Amlogic Meson pin controller driver, based on code from Linux kernel. Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
2017-07-26arm: dts: meson: import dts files from Linux 4.12Beniamino Galvani
Import Amlogic Meson DTS files from Linux kernel version 4.12 Signed-off-by: Beniamino Galvani <b.galvani@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2017-07-26ARM: uniphier: enable CONFIG_CMD_FS_GENERICMasahiro Yamada
Enable file system commands such as load, ls. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-07-26ARM: uniphier: remove part number info from the boot logMasahiro Yamada
As is often the case with SoC development, slightly different products (i.e. different part number) are developed based on the same silicon-die. Such fine grained information is unmaintainable. Also, "SoC:" is a better fit that "CPU:". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-07-26doc: uniphier: rework README.uniphierMasahiro Yamada
Rework the readme to reflect the latest boot mechanism on ARMv8 SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-07-26ARM: uniphier: remove SPL support for ARMv8 SoCsMasahiro Yamada
It has been a while since ARM Trusted Firmware supported UniPhier SoC family. U-Boot SPL was intended as a temporary loader that runs in secure world. It is a maintenance headache to support two different boot mechanisms. Secure firmware is realm of ARM Trusted Firmware and now U-Boot only serves as a non-secure boot loader for UniPhier ARMv8 SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2017-07-25Convert CONFIG_ENV_IS_IN_ONENAND to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_ONENAND Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_FAT to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_FAT Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_REMOTE to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_REMOTE Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_SPI_FLASH to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_SPI_FLASH Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_DATAFLASH to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_DATAFLASH Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_EEPROM to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_EEPROM Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_NVRAM to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_NVRAM Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_FLASH to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_FLASH Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25env: Move help from README to KconfigSimon Glass
The CONFIG_ENV_IS_IN_... options which have already been converted to Kconfig only have a small amount of help. Move the rest of it over from the README. Signed-off-by: Simon Glass <sjg@chromium.org>
2017-07-25Convert CONFIG_ENV_IS_IN_MMC/NAND/UBI and NOWHERE to KconfigSimon Glass
This converts the following to Kconfig: CONFIG_ENV_IS_IN_MMC CONFIG_ENV_IS_IN_NAND CONFIG_ENV_IS_IN_UBI CONFIG_ENV_IS_NOWHERE In fact this already exists for sunxi as a 'choice' config. However not all the choices are available in Kconfig yet so we cannot use that. It would lead to more than one option being set. In addition, one purpose of this series is to allow the environment to be stored in more than one place. So the existing choice is converted to a normal config allowing each option to be set independently. There are not many opportunities for Kconfig updates to reduce the size of this patch. This was tested with ./tools/moveconfig.py -i CONFIG_ENV_IS_IN_MMC And then manual updates. This is because for CHAIN_OF_TRUST boards they can only have ENV_IS_NOWHERE set, so we enforce that via Kconfig logic now. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-25mips-relocs: Fix warning from gcc 6.3Paul Burton
It seems that gcc 6.3 at least is smart enough to warn about the _val variable being unassigned in the default case in the set_hdr_field() macro, but not smart enough to figure out that the default case is never taken. This results in warnings such as the following: pfx##hdr32[idx].field = _val; \ ^ ../tools/mips-relocs.c:51:11: note: _val was declared here uint64_t _val; \ ^ ../tools/mips-relocs.c:88:2: note: in expansion of macro set_hdr_field set_hdr_field(p, idx, field, val) ^~~~~~~~~~~~~ ../tools/mips-relocs.c:408:3: note: in expansion of macro set_phdr_field set_phdr_field(i, p_filesz, load_sz); ^~~~~~~~~~~~~~ ../tools/mips-relocs.c: In function main: ../tools/mips-relocs.c:77:25: warning: _val may be used uninitialized in this function [-Wmaybe-uninitialized] Avoid this by assigning _val = 0 in the default case, and asserting that we didn't actually hit it for good measure. For reference gcc 7.1.1 seems to be smart enough to not hit the above warning without this patch. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Fixes: 011dd93ca97a ("MIPS: Stop building position independent code") Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Tom Rini <trini@konsulko.com> Cc: u-boot@lists.denx.de
2017-07-25MIPS: bootm: Fix broken boot_env_legacy codepathZubair Lutfullah Kakakhel
This patch fixes 2 bugs introduced by the following commit 2bb5b63 MIPS: bootm: rework and fix broken bootm code The CONFIG_IS_ENABLED macro prepends 'CONFIG_' Hence, remove CONFIG_ from CONFIG_MIPS_BOOT_ENV_LEGACY usage. Also, 2bb5b63 reworks bootm so that linux_env_legacy runs before linux_cmdline_legacy. However, linux_env_legacy depends on linux_cmdline_legacy running first as linux_cmdline_init initialilzes linux_argp which linux_env_legacy later depends on during its initialization. Reorder the code so that linux_cmdline_legacy runs before linux_env_legacy. Signed-off-by: Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com>
2017-07-25MIPS: Stop building position independent codePaul Burton
U-Boot has up until now built with -fpic for the MIPS architecture, producing position independent code which uses indirection through a global offset table, making relocation fairly straightforward as it simply involves patching up GOT entries. Using -fpic does however have some downsides. The biggest of these is that generated code is bloated in various ways. For example, function calls are indirected through the GOT & the t9 register: 8f998064 lw t9,-32668(gp) 0320f809 jalr t9 Without -fpic the call is simply: 0f803f01 jal be00fc04 <puts> This is more compact & faster (due to the lack of the load & the dependency the jump has on its result). It is also easier to read & debug because the disassembly shows what function is being called, rather than just an offset from gp which would then have to be looked up in the ELF to discover the target function. Another disadvantage of -fpic is that each function begins with a sequence to calculate the value of the gp register, for example: 3c1c0004 lui gp,0x4 279c3384 addiu gp,gp,13188 0399e021 addu gp,gp,t9 Without using -fpic this sequence no longer appears at the start of each function, reducing code size considerably. This patch switches U-Boot from building with -fpic to building with -fno-pic, in order to gain the benefits described above. The cost of this is an extra step during the build process to extract relocation data from the ELF & write it into a new .rel section in a compact format, plus the added complexity of dealing with multiple types of relocation rather than the single type that applied to the GOT. The benefit is smaller, cleaner, more debuggable code. The relocate_code() function is reimplemented in C to handle the new relocation scheme, which also makes it easier to read & debug. Taking maltael_defconfig as an example the size of u-boot.bin built using the Codescape MIPS 2016.05-06 toolchain (gcc 4.9.2, binutils 2.24.90) shrinks from 254KiB to 224KiB. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: u-boot@lists.denx.de Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2017-07-25Makefile: Allow arch post-link hookPaul Burton
This commit allows an architecture to provide a Makefile.postlink whose u-boot target gets invoked after the u-boot ELF is linked. This will be of use for MIPS in a following commit. This mirrors Linux commit fbe6e37dab97 ("kbuild: add arch specific post-link Makefile"). Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Simon Glass <sjg@chromium.org> Cc: u-boot@lists.denx.de Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Tested-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
2017-07-25configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2017-07-24configs: Migrate RBTREE, LZO, CMD_MTDPARTS, CMD_UBI and CMD_UBIFSTom Rini
The above CONFIG options are in Kconfig, and now have correct depends and inter-dependencies. Migrate these to configs/ from include/configs/. In the case of CMD_UBIFS also change it to be a default y if CMD_UBI. Signed-off-by: Tom Rini <trini@konsulko.com>