summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-04-08net: Move enetaddr env access code to env config instead of net configAlex Kiernan
In order that we can use eth_env_* even when CONFIG_NET isn't set, move these functions to environment code from net code. This fixes failures such as: board/ti/am335x/built-in.o: In function `board_late_init': board/ti/am335x/board.c:752: undefined reference to `eth_env_set_enetaddr' u-boot/board/ti/am335x/board.c:766: undefined reference to `eth_env_set_enetaddr' which caters for use cases such as: commit f411b5cca48f ("board: am335x: Always set eth/eth1addr environment variable") when Ethernet is required in Linux, but not U-Boot. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-04-08ti: am335x: Fix build when networking is disabledAlex Kiernan
When compiling without CONFIG_CLOCK_SYNTHESIZER (which is implied by CONFIG_DRIVER_TI_CPSW for am335x_evm), exclude the network setup for AM335x-ICEv2 to avoid link time failures: board/ti/am335x/board.c:683: undefined reference to `setup_clock_synthesizer' Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
2018-04-08usb: gadget: USB_ETHER requires network supportAlex Kiernan
In order to compile the USB Ethernet gadget support we require that NET is enabled, add that dependency here. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-08ti: am335x: Fix bootargs when building without NETAlex Kiernan
If DHCP/PXE commands are disabled then the compilation fails due to bootargs attempting to use them: include/config_distro_bootcmd.h:319:2: error: expected ‘}’ before ‘BOOT_TARGET_DEVICES_references_PXE_without_CONFIG_CMD_DHCP_or_PXE’ Ensure that if the command aren't enabled, we don't try and use them. Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-08Migrate CONFIG_DRIVER_TI_CPSW to KconfigAlex Kiernan
This converts CONFIG_DRIVER_TI_CPSW to Kconfig Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-04-08treewide: Convert CONFIG_HOSTNAME to a string optionMario Six
CONFIG_HOSTNAME is defined as a "plain" preprocessor string, but every use is couched by __stringify(...). Hence, convert it to a proper string option. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-08treewide: Migrate CONFIG_FSL_ESDHC to KconfigMario Six
Migrate the CONFIG_FSL_ESDHC option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-08treewide: Migrate CONFIG_TSEC_ENET to KconfigMario Six
Migrate the CONFIG_TSEC_ENET option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-08treewide: Migrate CONFIG_DISPLAY_BOARDINFO_LATE to KconfigMario Six
Migrate the CONFIG_DISPLAY_BOARDINFO_LATE option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc> [trini: Re-run migration] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-08treewide: Migrate CONFIG_LAST_STAGE_INIT to KconfigMario Six
Migrate the CONFIG_LAST_STAGE_INIT option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-08treewide: Migrate CONFIG_BOARD_EARLY_INIT_R to KconfigMario Six
Migrate the CONFIG_BOARD_EARLY_INIT_R option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-08treewide: Migrate CONFIG_SYS_ALT_MEMTEST to KconfigMario Six
Migrate the CONFIG_SYS_ALT_MEMTEST option to Kconfig. Signed-off-by: Mario Six <mario.six@gdsys.cc> [trini: Re-run migration after also including CMD_MEMTEST] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-07configs: Resync with savedefconfigTom Rini
Rsync all defconfig files using moveconfig.py Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-07configs: Finish migration of CONFIG_ATMEL_SPITom Rini
With the previous temporary reverts, we need to re-complete the migration of CONFIG_ATMEL_SPI here now. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-07Revert "spi: atmel: Drop non-dm code"Tom Rini
As we aren't quite able to convert some platforms with a very small size limit in SPL yet, we need to revert this for now. This reverts commit 7b0947787358c6b277431d6b76ce043d8bec641d. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-07Revert "spi: atmel: Drop atmel_spi.h"Tom Rini
As we aren't quite able to convert some platforms with a very small size limit in SPL yet, we need to revert this for now. This reverts commit 37434db29be495ef41f204a97b8bf13b1418f97d. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-04-06cmd: Add command for calculating binary operationsMario Six
This patch adds a command that enables the calculation of bit operations (AND, OR, XOR) on binary data from the command line. Memory locations as well as the contents of environment variables are eligible as sources and destination of the binary data used in the operations. The possible applications are manifold: Setting specific bits in registers using the regular read-OR-write pattern, masking out bits in bit values, implementation of simple OTP encryption using the XOR operation, etc. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-06cmd: ximg: Respect cache line size for flushingMario Six
Make sure that the cache line size if respected when flushing the cache. Signed-off-by: Mario Six <mario.six@gdsys.cc>
2018-04-06gpio: uclass: Fix debug stringMario Six
A debug string still has the old name of a function being called; update it. Signed-off-by: Mario Six <mario.six@gdsys.cc> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06watchdog: Fix Kconfig alignment for WDT_SANDBOXMichal Simek
Fix Kconfig alignment which should be <tab><space><space>. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06image: fit: Show information about OS type in firwmare case tooMichal Simek
SPL ATF implementation requires FIT image with partitions where the one is Firmware/ATF and another one Firmware/U-Boot. OS field is used for recording that difference that's why make sense to show values there for Firmware types. For example: Image 0 (atf) Description: ATF bl31.bin Created: Mon Mar 26 15:58:14 2018 Type: Firmware Compression: uncompressed Data Size: 51152 Bytes = 49.95 KiB = 0.05 MiB Architecture: ARM OS: ARM Trusted Firmware Load Address: 0xfffe0000 Hash algo: md5 Hash value: 36a4212bbb698126bf5a248f0f4b5336 Image 1 (uboot) Description: u-boot.bin Created: Mon Mar 26 15:58:14 2018 Type: Firmware Compression: uncompressed Data Size: 761216 Bytes = 743.38 KiB = 0.73 MiB Architecture: ARM OS: U-Boot Load Address: 0x08000000 Hash algo: md5 Hash value: f22960fe429be72296dc8dc59a47d566 Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jun Nie <jun.nie@linaro.org>
2018-04-06image: fit: Show firmware configuration property if presentMichal Simek
SPL ATF support requires to have firmware property which should be also listed by mkimage -l when images is created. The patch is also using this macro in spl_fit to match keyword. When image is created: Default Configuration: 'config' Configuration 0 (config) Description: ATF with full u-boot Kernel: unavailable Firmware: atf FDT: dtb Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Jun Nie <jun.nie@linaro.org> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-04-06configs: am43xx_evm_qspiboot_defconfig: Move to DMVignesh R
Move am43xx_evm_qspiboot_defconfig to DM. This is required as SPI core and TI QSPI driver no longer supports non DM interfaces. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-04-06ARM: dts: Add new "generic" am4372 device tree file.Vignesh R
With U-boot runtime board detect for DTB selection a "default" dtb needs to be created. This will be used temporarily until the "proper" dtb is selected. Also, add -u-boot.dtsi for AM437x SK and IDK to enable I2C for board detection via DM_I2C. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-04-06board: ti: am43xx: Define embedded_dtb_select for runtime DTB selection in ↵Vignesh R
U-boot AM437x QSPI boot is a single stage boot and hence needs runtime DTB selection to support AM437x-SK and AM437x-IDK with DM enabled. This is required to move am43xx_evm_qspiboot_defconfig to use DM/DT. Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-04-06env: Properly check for BLK supportSjoerd Simons
Use CONFIG_IS_ENABLED to see if CONFIG_BLK is enabled. Otherwise SPL compilation breaks on boards which do have CONFIG_BLK enabled but not DM_MMC for the SPL as follows: env/mmc.c: In function ‘init_mmc_for_env’: env/mmc.c:164:6: warning: implicit declaration of function ‘blk_get_from_parent’; did you mean ‘efi_get_ram_base’? [-Wimplicit-function-declaration] if (blk_get_from_parent(mmc->dev, &dev)) ^~~~~~~~~~~~~~~~~~~ efi_get_ram_base env/mmc.c:164:29: error: ‘struct mmc’ has no member named ‘dev’ if (blk_get_from_parent(mmc->dev, &dev)) ^~ Signed-off-by: Sjoerd Simons <sjoerd.simons@collabora.co.uk> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06configs: k2hk_hs_evm: Resync defconfig with non-HS defconfigAndrew F. Davis
Signed-off-by: Andrew F. Davis <afd@ti.com> Reviewed-by: Lokesh vutla <lokeshvutla@ti.com>
2018-04-06configs: k2e_hs_evm: Resync defconfig with non-HS defconfigAndrew F. Davis
Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-04-06configs: k2g_hs_evm: Resync defconfig with non-HS defconfigAndrew F. Davis
Signed-off-by: Andrew F. Davis <afd@ti.com>
2018-04-06rtc: rx8025: remove redundant code in rtc_resetChris Packham
As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the command "date reset" will set the date/time to 2000-01-01 0:00:00 after calling rtc_reset(). This means that the rx8025 implementation of rtc_reset() does not need to call rtc_set(). Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06rtc: rs5c372: remove redundant code in rtc_resetChris Packham
As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the command "date reset" will set the date/time to 2000-01-01 0:00:00 after calling rtc_reset(). This means that the rs5c372 implementation of rtc_reset() does not need to call rtc_set(). Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06rtc: mx27rtc: remove redundant code in rtc_resetChris Packham
As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the command "date reset" will set the date/time to 2000-01-01 0:00:00 after calling rtc_reset(). This means that the mx27rtc implementation of rtc_reset() can be an empty stub function. Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06rtc: ds1374: remove redundant code in rtc_resetChris Packham
As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the command "date reset" will set the date/time to 2000-01-01 0:00:00 after calling rtc_reset(). This means that the ds1374 implementation of rtc_reset() doesn't need to call rtc_set(). Signed-off-by: Chris Packham <judge.packham@gmail.com>
2018-04-06rtc: ds1307: remove redundant code in rtc_resetChris Packham
As of commit 1a1fa2406689 ("rtc: Set valid date after reset") the command "date reset" will set the date/time to 2000-01-01 0:00:00 after calling rtc_reset(). This means that the ds1307 implementation of rtc_reset() doesn't need to call rtc_set(). Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06bootvx: use program header for loadingChristian Gmeiner
The section header address is a VMA whereas the address found in the program header is a physical one. With this change it is possible to load and start a vx7 intel generic based image. $ readelf -l /tmp/vx7 Elf file type is EXEC (Executable file) Entry point 0x408000 There are 2 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x001000 0x00408000 0x00408000 0x04000 0x04000 RWE 0x1000 LOAD 0x005000 0xe040c000 0x0040c000 0x583a84 0x5ccc70 RWE 0x1000 Section to Segment mapping: Segment Sections... 00 .text.locore .data.locore 01 .text .eh_frame .wrs_build_vars .data .tls_data .tls_vars .bss $ readelf -S /tmp/vx7 There are 13 section headers, starting at offset 0x588af8: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text.locore PROGBITS 00408000 001000 00011e 00 AX 0 0 16 [ 2] .data.locore PROGBITS 00409000 002000 003000 00 WA 0 0 4096 [ 3] .text PROGBITS e040c000 005000 4802a0 00 WAX 0 0 32 [ 4] .eh_frame PROGBITS e088c2a0 4852a0 0a1ed0 00 A 0 0 4 [ 5] .wrs_build_vars PROGBITS e092e170 527170 000190 00 Ax 0 0 1 [ 6] .data PROGBITS e092f000 528000 060a70 00 WA 0 0 4096 [ 7] .tls_data PROGBITS e098fa70 588a70 000004 00 A 0 0 4 [ 8] .tls_vars PROGBITS e098fa78 588a78 00000c 00 WA 0 0 4 [ 9] .bss NOBITS e098faa0 588a84 0491d0 00 WA 0 0 32 [10] .shstrtab STRTAB 00000000 588a84 000074 00 0 0 1 [11] .symtab SYMTAB 00000000 588d00 056ee0 10 12 9758 4 [12] .strtab STRTAB 00000000 5dfbe0 05f48a 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) For completeness here are the same information for an old vx5 based image. After this change it is possible to boot vx5 and vx7 (intel generic) images. $ readelf -l /tmp/vx5 Elf file type is EXEC (Executable file) Entry point 0x308000 There are 1 program headers, starting at offset 52 Program Headers: Type Offset VirtAddr PhysAddr FileSiz MemSiz Flg Align LOAD 0x000060 0x00308000 0x00308000 0x3513a0 0x757860 RWE 0x20 Section to Segment mapping: Segment Sections... 00 .text .data .bss [christian@chgm-pc ~]$ readelf -S /tmp/vx5 There are 12 section headers, starting at offset 0x356580: Section Headers: [Nr] Name Type Addr Off Size ES Flg Lk Inf Al [ 0] NULL 00000000 000000 000000 00 0 0 0 [ 1] .text PROGBITS 00308000 000060 319b10 00 WAX 0 0 32 [ 2] .data PROGBITS 00621b20 319b80 037880 00 WA 0 0 32 [ 3] .bss NOBITS 006593a0 351400 4064c0 00 WA 0 0 16 [ 4] .debug_aranges PROGBITS 00000000 351400 000060 00 0 0 1 [ 5] .debug_pubnames PROGBITS 00000000 351460 00018b 00 0 0 1 [ 6] .debug_info PROGBITS 00000000 3515eb 003429 00 0 0 1 [ 7] .debug_abbrev PROGBITS 00000000 354a14 000454 00 0 0 1 [ 8] .debug_line PROGBITS 00000000 354e68 0016a4 00 0 0 1 [ 9] .shstrtab STRTAB 00000000 35650c 000071 00 0 0 1 [10] .symtab SYMTAB 00000000 356760 0440e0 10 11 8574 4 [11] .strtab STRTAB 00000000 39a840 03e66c 00 0 0 1 Key to Flags: W (write), A (alloc), X (execute), M (merge), S (strings) I (info), L (link order), G (group), T (TLS), E (exclude), x (unknown) O (extra OS processing required) o (OS specific), p (processor specific) Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2018-04-06stm32mp: handle SYSRESETPatrick Delaunay
Add support of sysreset with generic driver "syscon-reboot" provided by RCC, for U-boot and for SPL. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp: add syscon for STGENPatrick Delaunay
Add STGEN as SYSCON device: allow access to device address defined in device tree Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp1: change STGEN clock source to HSEPatrick Delaunay
No more use static frequency HSI = 64MHz for STGEN clock but HSE (with higher accurency) by default. Need to remove CONFIG_SYS_HZ_CLOCK as arch timer frequency is provided at boot by BootRom and cp15 cntfrq and modified during clock tree initialization if needed. When HSI is no more used by any device, this internal oscillator can be switched off to reduce consumption. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06clock: stm32mp1: add stgen clock source change supportPatrick Delaunay
The STGEN is the clock source for the Cortex A7 arch timer. So after modification of its frequency, CP15 cntfreq is updated and a new timer init is performed. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06arm: timer: get frequency for arch timer armv7 in cp15 cntfrqPatrick Delaunay
Manage dynamic value for armv7 arch clock timer, when CONFIG_SYS_HZ_CLOCK is not defined. Get frequency from CP15 cntfrq information, initialized for example by first boot stage, clock driver or by BootRom. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06Allow providing default environment from fileRasmus Villemoes
Modifying the default environment via CONFIG_EXTRA_ENV_SETTINGS is somewhat inflexible, partly because the cpp language does not allow appending to an existing macro. This prevents reuse of "environment fragments" for different boards, which in turn makes maintaining that environment consistently tedious and error-prone. This implements a Kconfig option for allowing one to define the entire default environment in an external file, which can then, for example, be generated programmatically as part of a Yocto recipe, or simply be kept in version control separately from the U-boot repository. Tested-by: Sean Nyekjaer <sean.nyekjaer@prevas.dk> Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2018-04-06stm32mp1: select boot device and partitionPatrick Delaunay
Bootrom loads SPL from SDCARD or eMMC according BootPin selection. Then SPL loads U-Boot on the same mmc device with the following predefined GPT partitioning: on SDCARD: gpt partitioning 1: SPL 2: SPL#2 3: U-Boot 4: bootable partition on eMMC: The 2 boot partitions are used for SPL (2 copy) boot1: SPL boot2: SPL#2 The user partition use gpt partitioning 1: U-Boot 2: bootable partition This patch select the correct SPL partition (3 for SDCARD on mmc0 and 1 for eMMC on mmc1) according the BootRom information saved in TAMP register and based on configuration flasg: - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION => for BOOT_DEVICE_MMC1 or mmc 0 in U-Boot - CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION_MMC2 (new) => for BOOT_DEVICE_MMC2 or mmc 1 in U-Boot And the correct boot_targets is selected according the environment variables boot_device and boot_instance, with preboot command, to search the bootable partition with kernel on this device (generic distro support). Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp1: get boot mode from BootRomPatrick Delaunay
SPL copy BootRom boot mode information in TAMP register 21. This TAMP register information is used after relocation to set 2 env variables - boot_device - boot_instance Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp1: add eMMC support for ED1Patrick Delaunay
Add command GPT support Add EMMC boot support Add the 2 other SDMMC instances for ED1: - SDMMC2 = mmc 1, eMMC on the ED1 board - SDMMC3 = extension connector, deactivated by default Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06spl: spl_mmc: provide one weak function spl_boot_partitionPatrick Delaunay
The spl_boot_partition function has been added in order to have the possibility to boot on a same binary from different mmc devices with different partitions. By default keep the current behavior, SPL use the partition defined by CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Christophe KERELLO <christophe.kerello@st.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Lukasz Majewski <lukma@denx.de>
2018-04-06rtc: rewrite isl1208 to support DMKlaus Goger
Adds devicemodel support to the ISL1208 driver. This patch drops the non-dm API as no board was using it anyway. Also add it to Kconfig. Signed-off-by: Klaus Goger <klaus.goger@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-04-06stm32mp: add check of cpu identifierPatrick Delaunay
Add support of DBGMCU_IDC for cpu identifier and revision Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06stm32mp: cleanup cpu.cPatrick Delaunay
Move all defines at the beginning of the file Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-04-06tools/mxsimage: Support building with LibreSSLHauke Mehrtens
The mxsimage utility fails to compile against LibreSSL version < 2.7.0 because LibreSSL says it is OpenSSL 2.0, but it does not support the complete OpenSSL 1.1 interface. LibreSSL defines OPENSSL_VERSION_NUMBER with 0x20000000L and therefor claims to have an API compatible with OpenSSL 2.0, but it implements EVP_MD_CTX_new(), EVP_MD_CTX_free() and EVP_CIPHER_CTX_reset() only starting with version 2.7.0, which is not yet released. OpenSSL implements this function since version 1.1.0. This commit will activate the compatibility code meant for OpenSSL < 1.1.0 also for LibreSSL version < 2.7.0. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Reviewed-by: Jonathan Gray <jsg@jsg.id.au>
2018-04-06regulator: pbias: don't evaluate variable before assignmentHeinrich Schuchardt
We should not evaluate the value of reg before its value is set. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>