Merge tag 'signed-efi-next' of git://github.com/agraf/u-boot
Patch queue for efi - 2018-07-25
Highlights this time:
- Many small fixes to improve spec compatibility (found by SCT)
- Almost enough to run with sandbox target
- GetTime() improvements
- Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y
diff --git a/.mailmap b/.mailmap
index bd72672..d297030 100644
--- a/.mailmap
+++ b/.mailmap
@@ -34,3 +34,4 @@
York Sun <yorksun@freescale.com>
York Sun <york.sun@nxp.com>
Ćukasz Majewski <l.majewski@samsung.com>
+Mirza <Taimoor_Mirza@mentor.com>
diff --git a/Kconfig b/Kconfig
index c8b86cd..62235ca 100644
--- a/Kconfig
+++ b/Kconfig
@@ -68,25 +68,25 @@
config DISTRO_DEFAULTS
bool "Select defaults suitable for booting general purpose Linux distributions"
- imply USE_BOOTCOMMAND
- select CMD_BOOTZ if ARM && !ARM64
+ select AUTO_COMPLETE
+ select CMDLINE_EDITING
select CMD_BOOTI if ARM64
+ select CMD_BOOTZ if ARM && !ARM64
select CMD_DHCP if CMD_NET
- select CMD_PING if CMD_NET
- select CMD_PXE if NET
select CMD_ENV_EXISTS
select CMD_EXT2
select CMD_EXT4
select CMD_FAT
select CMD_FS_GENERIC
- imply CMD_MII if NET
select CMD_PART if PARTITIONS
+ select CMD_PING if CMD_NET
+ select CMD_PXE if NET
+ select ENV_VARS_UBOOT_CONFIG
select HUSH_PARSER
- select CMDLINE_EDITING
- select AUTO_COMPLETE
- select SYS_LONGHELP
select SUPPORT_RAW_INITRD
- select ENV_VARS_UBOOT_CONFIG
+ select SYS_LONGHELP
+ imply CMD_MII if NET
+ imply USE_BOOTCOMMAND
help
Select this to enable various options and commands which are suitable
for building u-boot for booting general purpose Linux distributions.
@@ -237,8 +237,8 @@
config FIT_ENABLE_SHA256_SUPPORT
bool "Support SHA256 checksum of FIT image contents"
- select SHA256
default y
+ select SHA256
help
Enable this to support SHA256 checksum of FIT image contents. A
SHA256 checksum is a 256-bit (32-byte) hash value used to check that
@@ -252,8 +252,8 @@
config FIT_SIGNATURE
bool "Enable signature verification of FIT uImages"
depends on DM
- select RSA
select HASH
+ select RSA
help
This option enables signature verification of FIT uImages,
using a hash signed and verified using RSA. If
diff --git a/MAINTAINERS b/MAINTAINERS
index 988fb1a..fe84235 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -438,8 +438,8 @@
F: drivers/mmc/
NAND FLASH
-M: Scott Wood <oss@buserror.net>
-S: Maintained
+#M: Scott Wood <oss@buserror.net>
+S: Orphaned (Since 2018-07)
T: git git://git.denx.de/u-boot-nand-flash.git
F: drivers/mtd/nand/
diff --git a/Makefile b/Makefile
index d1246e0..675d011 100644
--- a/Makefile
+++ b/Makefile
@@ -1111,8 +1111,8 @@
u-boot.dis: u-boot
$(OBJDUMP) -d $< > $@
-ifdef CONFIG_TPL
-SPL_PAYLOAD := tpl/u-boot-with-tpl.bin
+ifneq ($(CONFIG_SPL_PAYLOAD),)
+SPL_PAYLOAD := $(CONFIG_SPL_PAYLOAD:"%"=%)
else
SPL_PAYLOAD := u-boot.bin
endif
@@ -1234,8 +1234,9 @@
ifneq ($(CONFIG_TEGRA),)
ifneq ($(CONFIG_BINMAN),)
-u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin: \
- spl/u-boot-spl u-boot.bin FORCE
+# Makes u-boot-dtb-tegra.bin u-boot-tegra.bin u-boot-nodtb-tegra.bin
+%-dtb-tegra.bin %-tegra.bin %-nodtb-tegra.bin: \
+ spl/%-spl %.bin FORCE
$(call if_changed,binman)
else
OBJCOPYFLAGS_u-boot-nodtb-tegra.bin = -O binary --pad-to=$(CONFIG_SYS_TEXT_BASE)
@@ -1603,7 +1604,7 @@
clean-dirs := $(foreach f,$(u-boot-alldirs),$(if $(wildcard $(srctree)/$f/Makefile),$f))
-clean-dirs := $(addprefix _clean_, $(clean-dirs) doc/DocBook)
+clean-dirs := $(addprefix _clean_, $(clean-dirs))
PHONY += $(clean-dirs) clean archclean
$(clean-dirs):
@@ -1685,7 +1686,7 @@
@echo ' coccicheck - Execute static code analysis with Coccinelle'
@echo ''
@echo 'Documentation targets:'
- @$(MAKE) -f $(srctree)/doc/DocBook/Makefile dochelp
+ @$(MAKE) -f $(srctree)/Documentation/Makefile dochelp
@echo ''
@echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build'
@echo ' make V=2 [targets] 2 => give reason for rebuild of target'
diff --git a/arch/Kconfig b/arch/Kconfig
index cbeb9f6..bf1b4a9 100644
--- a/arch/Kconfig
+++ b/arch/Kconfig
@@ -10,12 +10,12 @@
config ARC
bool "ARC architecture"
- select HAVE_PRIVATE_LIBGCC
- select SUPPORT_OF_CONTROL
select ARCH_EARLY_INIT_R
+ select ARC_TIMER
select CLK
+ select HAVE_PRIVATE_LIBGCC
+ select SUPPORT_OF_CONTROL
select TIMER
- select ARC_TIMER
config ARM
bool "ARM architecture"
@@ -46,10 +46,11 @@
config NIOS2
bool "Nios II architecture"
- select SUPPORT_OF_CONTROL
- select OF_CONTROL
- select DM
select CPU
+ select DM
+ select OF_CONTROL
+ select SUPPORT_OF_CONTROL
+ imply CMD_DM
config PPC
bool "PowerPC architecture"
@@ -65,30 +66,31 @@
config SANDBOX
bool "Sandbox"
select BOARD_LATE_INIT
- select SUPPORT_OF_CONTROL
select DM
+ select DM_GPIO
+ select DM_I2C
select DM_KEYBOARD
- select DM_SPI_FLASH
+ select DM_MMC
select DM_SERIAL
- select DM_I2C
select DM_SPI
- select DM_GPIO
- select DM_MMC
+ select DM_SPI_FLASH
select HAVE_BLOCK_DEVICE
- select SPI
select LZO
+ select SPI
+ select SUPPORT_OF_CONTROL
+ imply CMD_DM
imply CMD_GETTIME
imply CMD_HASH
imply CMD_IO
imply CMD_IOTRACE
imply CMD_LZMADEC
+ imply CMD_SATA
+ imply CMD_SF_TEST
imply CRC32_VERIFY
imply FAT_WRITE
imply HASH_VERIFY
imply LZMA
imply SCSI
- imply CMD_SATA
- imply CMD_SF_TEST
config SH
bool "SuperH architecture"
@@ -97,39 +99,40 @@
config X86
bool "x86 architecture"
select CREATE_ARCH_SYMLINK
- select HAVE_PRIVATE_LIBGCC
- select USE_PRIVATE_LIBGCC
- select SUPPORT_OF_CONTROL
- select OF_CONTROL
select DM
select DM_PCI
+ select HAVE_PRIVATE_LIBGCC
+ select OF_CONTROL
select PCI
+ select SUPPORT_OF_CONTROL
select TIMER
+ select USE_PRIVATE_LIBGCC
select X86_TSC_TIMER
imply BLK
+ imply CMD_DM
+ imply CMD_FPGA_LOADMK
+ imply CMD_GETTIME
+ imply CMD_IO
+ imply CMD_IRQ
+ imply CMD_PCI
+ imply CMD_SF_TEST
+ imply CMD_ZBOOT
imply DM_ETH
imply DM_GPIO
imply DM_KEYBOARD
imply DM_MMC
imply DM_RTC
- imply DM_SERIAL
imply DM_SCSI
+ imply DM_SERIAL
imply DM_SPI
imply DM_SPI_FLASH
imply DM_USB
imply DM_VIDEO
imply SYSRESET
imply SYSRESET_X86
- imply CMD_FPGA_LOADMK
- imply CMD_GETTIME
- imply CMD_IO
- imply CMD_IRQ
- imply CMD_PCI
- imply CMD_SF_TEST
- imply CMD_ZBOOT
- imply USB_HOST_ETHER
imply USB_ETHER_ASIX
imply USB_ETHER_SMSC95XX
+ imply USB_HOST_ETHER
config XTENSA
bool "Xtensa architecture"
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index 6f139d5..d59aa3a 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -31,36 +31,36 @@
config CPU_ARC750D
bool "ARC 750D"
- select ARC_MMU_V2
depends on ISA_ARCOMPACT
+ select ARC_MMU_V2
help
Choose this option to build an U-Boot for ARC750D CPU.
config CPU_ARC770D
bool "ARC 770D"
- select ARC_MMU_V3
depends on ISA_ARCOMPACT
+ select ARC_MMU_V3
help
Choose this option to build an U-Boot for ARC770D CPU.
config CPU_ARCEM6
bool "ARC EM6"
- select ARC_MMU_ABSENT
depends on ISA_ARCV2
+ select ARC_MMU_ABSENT
help
Next Generation ARC Core based on ISA-v2 ISA without MMU.
config CPU_ARCHS36
bool "ARC HS36"
- select ARC_MMU_ABSENT
depends on ISA_ARCV2
+ select ARC_MMU_ABSENT
help
Next Generation ARC Core based on ISA-v2 ISA without MMU.
config CPU_ARCHS38
bool "ARC HS38"
- select ARC_MMU_V4
depends on ISA_ARCV2
+ select ARC_MMU_V4
help
Next Generation ARC Core based on ISA-v2 ISA with MMU.
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 376851e..a047552 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -169,7 +169,7 @@
bool
config ARM_ERRATA_845369
- bool
+ bool
config ARM_ERRATA_852421
bool
@@ -219,25 +219,25 @@
config CPU_V7A
bool
- select HAS_VBAR
select HAS_THUMB2
+ select HAS_VBAR
select SYS_CACHE_SHIFT_6
imply SYS_ARM_MMU
config CPU_V7M
bool
select HAS_THUMB2
- select THUMB2_KERNEL
- select SYS_CACHE_SHIFT_5
select SYS_ARM_MPU
+ select SYS_CACHE_SHIFT_5
select SYS_THUMB_BUILD
+ select THUMB2_KERNEL
config CPU_V7R
bool
select HAS_THUMB2
- select SYS_CACHE_SHIFT_6
- select SYS_ARM_MPU
select SYS_ARM_CACHE_CP15
+ select SYS_ARM_MPU
+ select SYS_CACHE_SHIFT_6
config CPU_PXA
bool
@@ -427,20 +427,21 @@
config KIRKWOOD
bool "Marvell Kirkwood"
- select CPU_ARM926EJS
- select BOARD_EARLY_INIT_F
select ARCH_MISC_INIT
+ select BOARD_EARLY_INIT_F
+ select CPU_ARM926EJS
config ARCH_MVEBU
bool "Marvell MVEBU family (Armada XP/375/38x/3700/7K/8K)"
- select OF_CONTROL
- select OF_SEPARATE
select DM
select DM_ETH
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select OF_CONTROL
+ select OF_SEPARATE
select SPI
+ imply CMD_DM
config TARGET_DEVKIT3250
bool "Support devkit3250"
@@ -463,31 +464,31 @@
config TARGET_SPEAR300
bool "Support spear300"
- select CPU_ARM926EJS
select BOARD_EARLY_INIT_F
- imply CMD_SAVES
+ select CPU_ARM926EJS
select PL011_SERIAL
+ imply CMD_SAVES
config TARGET_SPEAR310
bool "Support spear310"
- select CPU_ARM926EJS
select BOARD_EARLY_INIT_F
- imply CMD_SAVES
+ select CPU_ARM926EJS
select PL011_SERIAL
+ imply CMD_SAVES
config TARGET_SPEAR320
bool "Support spear320"
- select CPU_ARM926EJS
select BOARD_EARLY_INIT_F
- imply CMD_SAVES
+ select CPU_ARM926EJS
select PL011_SERIAL
+ imply CMD_SAVES
config TARGET_SPEAR600
bool "Support spear600"
- select CPU_ARM926EJS
select BOARD_EARLY_INIT_F
- imply CMD_SAVES
+ select CPU_ARM926EJS
select PL011_SERIAL
+ imply CMD_SAVES
config TARGET_STV0991
bool "Support stv0991"
@@ -496,16 +497,17 @@
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
+ select PL01X_SERIAL
select SPI
select SPI_FLASH
- select PL01X_SERIAL
+ imply CMD_DM
config TARGET_X600
bool "Support x600"
select BOARD_LATE_INIT
select CPU_ARM926EJS
- select SUPPORT_SPL
select PL011_SERIAL
+ select SUPPORT_SPL
config TARGET_WOODBURN
bool "Support woodburn"
@@ -528,11 +530,12 @@
config ARCH_BCM283X
bool "Broadcom BCM283X family"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OF_CONTROL
select PL01X_SERIAL
select SERIAL_SEARCH_ALL
+ imply CMD_DM
imply FAT_WRITE
config TARGET_VEXPRESS_CA15_TC2
@@ -548,6 +551,7 @@
select DM
select OF_CONTROL
select OF_PRIOR_STAGE
+ imply CMD_DM
help
This enables support for Broadcom ARM-based set-top box
chipsets, including the 7445 family of chips.
@@ -577,13 +581,13 @@
config TARGET_BCMCYGNUS
bool "Support bcmcygnus"
select CPU_V7A
- imply CRC32_VERIFY
+ imply BCM_SF2_ETH
+ imply BCM_SF2_ETH_GMAC
imply CMD_HASH
+ imply CRC32_VERIFY
imply FAT_WRITE
imply HASH_VERIFY
imply NETDEVICES
- imply BCM_SF2_ETH
- imply BCM_SF2_ETH_GMAC
config TARGET_BCMNSP
bool "Support bcmnsp"
@@ -600,22 +604,24 @@
config ARCH_EXYNOS
bool "Samsung EXYNOS"
select DM
+ select DM_GPIO
select DM_I2C
- select DM_SPI_FLASH
+ select DM_KEYBOARD
select DM_SERIAL
select DM_SPI
- select DM_GPIO
- select DM_KEYBOARD
+ select DM_SPI_FLASH
select SPI
+ imply CMD_DM
imply FAT_WRITE
config ARCH_S5PC1XX
bool "Samsung S5PC1XX"
select CPU_V7A
select DM
- select DM_SERIAL
select DM_GPIO
select DM_I2C
+ select DM_SERIAL
+ imply CMD_DM
config ARCH_HIGHBANK
bool "Calxeda Highbank"
@@ -627,17 +633,18 @@
select DM
select DM_SERIAL
select PL01X_SERIAL
+ imply CMD_DM
config ARCH_KEYSTONE
bool "TI Keystone"
+ select CMD_POWEROFF
select CPU_V7A
select SUPPORT_SPL
- select SYS_THUMB_BUILD
- select CMD_POWEROFF
select SYS_ARCH_TIMER
+ select SYS_THUMB_BUILD
imply CMD_MTDPARTS
- imply FIT
imply CMD_SAVES
+ imply FIT
config ARCH_OMAP2PLUS
bool "TI OMAP2+"
@@ -660,6 +667,7 @@
select ARM64
select DM
select SUPPORT_SPL
+ imply CMD_DM
config ARCH_MX23
bool "NXP i.MX23 family"
@@ -683,19 +691,19 @@
select CPU_ARM1136
config ARCH_MX7ULP
- bool "NXP MX7ULP"
+ bool "NXP MX7ULP"
select CPU_V7A
select ROM_UNIFIED_SECTIONS
imply MXC_GPIO
config ARCH_MX7
bool "Freescale MX7"
+ select ARCH_MISC_INIT
+ select BOARD_EARLY_INIT_F
select CPU_V7A
select SYS_FSL_HAS_SEC if SECURE_BOOT
select SYS_FSL_SEC_COMPAT_4
select SYS_FSL_SEC_LE
- select BOARD_EARLY_INIT_F
- select ARCH_MISC_INIT
imply MXC_GPIO
config ARCH_MX6
@@ -709,13 +717,13 @@
if ARCH_MX6
config SPL_LDSCRIPT
- default "arch/arm/mach-omap2/u-boot-spl.lds"
+ default "arch/arm/mach-omap2/u-boot-spl.lds"
endif
config ARCH_MX5
bool "Freescale MX5"
- select CPU_V7A
select BOARD_EARLY_INIT_F
+ select CPU_V7A
imply MXC_GPIO
config ARCH_OWL
@@ -724,6 +732,7 @@
select DM
select DM_SERIAL
select OF_CONTROL
+ imply CMD_DM
config ARCH_QEMU
bool "QEMU Virtual Platform"
@@ -731,12 +740,14 @@
select DM_SERIAL
select OF_CONTROL
select PL01X_SERIAL
+ imply CMD_DM
config ARCH_RMOBILE
bool "Renesas ARM SoCs"
+ select BOARD_EARLY_INIT_F
select DM
select DM_SERIAL
- select BOARD_EARLY_INIT_F
+ imply CMD_DM
imply FAT_WRITE
imply SYS_THUMB_BUILD
@@ -751,30 +762,33 @@
select DM
select DM_GPIO
select DM_SERIAL
- select SPMI
+ select MSM_SMEM
select OF_CONTROL
select OF_SEPARATE
select SMEM
- select MSM_SMEM
+ select SPMI
+ imply CMD_DM
config ARCH_SOCFPGA
bool "Altera SOCFPGA family"
select ARCH_EARLY_INIT_R
select ARCH_MISC_INIT
+ select ARM64 if TARGET_SOCFPGA_STRATIX10
select CPU_V7A if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
select DM
select DM_SERIAL
select ENABLE_ARM_SOC_BOOT0_HOOK if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
select OF_CONTROL
+ select SPL_DM_RESET if DM_RESET
+ select SPL_DM_SERIAL
select SPL_LIBCOMMON_SUPPORT
select SPL_LIBDISK_SUPPORT
select SPL_LIBGENERIC_SUPPORT
select SPL_MMC_SUPPORT if DM_MMC
select SPL_NAND_SUPPORT if SPL_NAND_DENALI
select SPL_OF_CONTROL
+ select SPL_SEPARATE_BSS if TARGET_SOCFPGA_STRATIX10
select SPL_SERIAL_SUPPORT
- select SPL_DM_SERIAL
- select SPL_RESET_SUPPORT
select SPL_SPI_FLASH_SUPPORT if SPL_SPI_SUPPORT
select SPL_SPI_SUPPORT if DM_SPI
select SPL_WATCHDOG_SUPPORT
@@ -782,14 +796,13 @@
select SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION_TYPE
select SYS_NS16550
select SYS_THUMB_BUILD if TARGET_SOCFPGA_GEN5 || TARGET_SOCFPGA_ARRIA10
- select ARM64 if TARGET_SOCFPGA_STRATIX10
+ imply CMD_DM
imply CMD_MTDPARTS
imply CRC32_VERIFY
imply DM_SPI
imply DM_SPI_FLASH
imply FAT_WRITE
imply SYS_MMCSD_RAW_MODE_U_BOOT_USE_PARTITION
- select SPL_SEPARATE_BSS if TARGET_SOCFPGA_STRATIX10
config ARCH_SUNXI
bool "Support sunxi (Allwinner) SoCs"
@@ -809,13 +822,14 @@
select SPECIFY_CONSOLE_INDEX
select SPL_STACK_R if SPL
select SPL_SYS_MALLOC_SIMPLE if SPL
- select SYS_NS16550
select SPL_SYS_THUMB_BUILD if !ARM64
+ select SYS_NS16550
select SYS_THUMB_BUILD if !ARM64
select USB if DISTRO_DEFAULTS
- select USB_STORAGE if DISTRO_DEFAULTS
select USB_KEYBOARD if DISTRO_DEFAULTS
+ select USB_STORAGE if DISTRO_DEFAULTS
select USE_TINY_PRINTF
+ imply CMD_DM
imply CMD_GPT
imply DISTRO_DEFAULTS
imply FAT_WRITE
@@ -839,51 +853,54 @@
config ARCH_ZYNQ
bool "Xilinx Zynq based platform"
+ select BOARD_EARLY_INIT_F if WDT
select BOARD_LATE_INIT
+ select CLK
+ select CLK_ZYNQ
select CPU_V7A
- select SUPPORT_SPL
- select OF_CONTROL
- select SPL_BOARD_INIT if SPL
- select BOARD_EARLY_INIT_F if WDT
- select SPL_OF_CONTROL if SPL
select DM
select DM_ETH if NET
- select SPL_DM if SPL
select DM_MMC if MMC
- select DM_SPI
select DM_SERIAL
+ select DM_SPI
select DM_SPI_FLASH
- select SPL_SEPARATE_BSS if SPL
select DM_USB if USB
- select CLK
- select SPL_CLK if SPL
- select CLK_ZYNQ
+ select OF_CONTROL
select SPI
+ select SPL_BOARD_INIT if SPL
+ select SPL_CLK if SPL
+ select SPL_DM if SPL
+ select SPL_OF_CONTROL if SPL
+ select SPL_SEPARATE_BSS if SPL
+ select SUPPORT_SPL
+ imply ARCH_EARLY_INIT_R
imply CMD_CLK
- imply FAT_WRITE
+ imply CMD_DM
imply CMD_SPL
- imply ARCH_EARLY_INIT_R
+ imply FAT_WRITE
config ARCH_ZYNQMP_R5
bool "Xilinx ZynqMP R5 based platform"
+ select CLK
select CPU_V7R
- select OF_CONTROL
select DM
select DM_SERIAL
- select CLK
+ select OF_CONTROL
+ imply CMD_DM
config ARCH_ZYNQMP
bool "Xilinx ZynqMP based platform"
select ARM64
select BOARD_LATE_INIT
+ select CLK
select DM
- select OF_CONTROL
select DM_SERIAL
- select SUPPORT_SPL
- select CLK
+ select DM_USB if USB
+ select OF_CONTROL
select SPL_BOARD_INIT if SPL
select SPL_CLK if SPL
- select DM_USB if USB
+ select SUPPORT_SPL
+ imply CMD_DM
imply FAT_WRITE
config TEGRA
@@ -899,8 +916,8 @@
config TARGET_VEXPRESS64_BASE_FVP
bool "Support Versatile Express ARMv8a FVP BASE model"
select ARM64
- select SEMIHOSTING
select PL01X_SERIAL
+ select SEMIHOSTING
config TARGET_VEXPRESS64_BASE_FVP_DRAM
bool "Support Versatile Express ARMv8a FVP BASE model booting from DRAM"
@@ -920,9 +937,9 @@
config TARGET_LS2080A_EMU
bool "Support ls2080a_emu"
select ARCH_LS2080A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
- select ARCH_MISC_INIT
help
Support for Freescale LS2080A_EMU platform
The LS2080A Development System (EMULATOR) is a pre silicon
@@ -932,9 +949,9 @@
config TARGET_LS2080A_SIMU
bool "Support ls2080a_simu"
select ARCH_LS2080A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
- select ARCH_MISC_INIT
help
Support for Freescale LS2080A_SIMU platform
The LS2080A Development System (QDS) is a pre silicon
@@ -944,9 +961,9 @@
config TARGET_LS1088AQDS
bool "Support ls1088aqds"
select ARCH_LS1088A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
- select ARCH_MISC_INIT
select BOARD_LATE_INIT
select SUPPORT_SPL
help
@@ -958,11 +975,11 @@
config TARGET_LS2080AQDS
bool "Support ls2080aqds"
select ARCH_LS2080A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
select BOARD_LATE_INIT
select SUPPORT_SPL
- select ARCH_MISC_INIT
imply SCSI
imply SCSI_AHCI
help
@@ -974,11 +991,11 @@
config TARGET_LS2080ARDB
bool "Support ls2080ardb"
select ARCH_LS2080A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
select BOARD_LATE_INIT
select SUPPORT_SPL
- select ARCH_MISC_INIT
imply SCSI
imply SCSI_AHCI
help
@@ -990,11 +1007,11 @@
config TARGET_LS2081ARDB
bool "Support ls2081ardb"
select ARCH_LS2080A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
select BOARD_LATE_INIT
select SUPPORT_SPL
- select ARCH_MISC_INIT
help
Support for Freescale LS2081ARDB platform.
The LS2081A Reference design board (RDB) is a high-performance
@@ -1010,6 +1027,7 @@
select OF_CONTROL
select PL01X_SERIAL
select SPECIFY_CONSOLE_INDEX
+ imply CMD_DM
help
Support for HiKey 96boards platform. It features a HI6220
SoC, with 8xA53 CPU, mali450 gpu, and 1GB RAM.
@@ -1018,10 +1036,11 @@
bool "Support Poplar 96boards Enterprise Edition Platform"
select ARM64
select DM
- select OF_CONTROL
select DM_SERIAL
select DM_USB
+ select OF_CONTROL
select PL01X_SERIAL
+ imply CMD_DM
help
Support for Poplar 96boards EE platform. It features a HI3798cv200
SoC, with 4xA53 CPU, 1GB RAM and the high performance Mali T720 GPU
@@ -1067,8 +1086,8 @@
config TARGET_LS1012AFRWY
bool "Support ls1012afrwy"
select ARCH_LS1012A
- select BOARD_LATE_INIT
select ARM64
+ select BOARD_LATE_INIT
imply SCSI
imply SCSI_AHCI
help
@@ -1090,9 +1109,9 @@
config TARGET_LS1088ARDB
bool "Support ls1088ardb"
select ARCH_LS1088A
+ select ARCH_MISC_INIT
select ARM64
select ARMV8_MULTIENTRY
- select ARCH_MISC_INIT
select BOARD_LATE_INIT
select SUPPORT_SPL
help
@@ -1103,40 +1122,40 @@
config TARGET_LS1021AQDS
bool "Support ls1021aqds"
+ select ARCH_LS1021A
+ select ARCH_SUPPORT_PSCI
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select CPU_V7A
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
- select SUPPORT_SPL
- select ARCH_LS1021A
- select ARCH_SUPPORT_PSCI
select LS1_DEEP_SLEEP
+ select SUPPORT_SPL
select SYS_FSL_DDR
- select BOARD_EARLY_INIT_F
imply SCSI
config TARGET_LS1021ATWR
bool "Support ls1021atwr"
+ select ARCH_LS1021A
+ select ARCH_SUPPORT_PSCI
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select CPU_V7A
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
- select SUPPORT_SPL
- select ARCH_LS1021A
- select ARCH_SUPPORT_PSCI
select LS1_DEEP_SLEEP
- select BOARD_EARLY_INIT_F
+ select SUPPORT_SPL
imply SCSI
config TARGET_LS1021AIOT
bool "Support ls1021aiot"
+ select ARCH_LS1021A
+ select ARCH_SUPPORT_PSCI
select BOARD_LATE_INIT
select CPU_V7A
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
select SUPPORT_SPL
- select ARCH_LS1021A
- select ARCH_SUPPORT_PSCI
imply SCSI
help
Support for Freescale LS1021AIOT platform.
@@ -1149,9 +1168,9 @@
select ARCH_LS1043A
select ARM64
select ARMV8_MULTIENTRY
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select SUPPORT_SPL
- select BOARD_EARLY_INIT_F
imply SCSI
help
Support for Freescale LS1043AQDS platform.
@@ -1161,9 +1180,9 @@
select ARCH_LS1043A
select ARM64
select ARMV8_MULTIENTRY
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select SUPPORT_SPL
- select BOARD_EARLY_INIT_F
imply SCSI
help
Support for Freescale LS1043ARDB platform.
@@ -1173,10 +1192,10 @@
select ARCH_LS1046A
select ARM64
select ARMV8_MULTIENTRY
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM_SPI_FLASH if DM_SPI
- select BOARD_EARLY_INIT_F
+ select SUPPORT_SPL
imply SCSI
help
Support for Freescale LS1046AQDS platform.
@@ -1189,11 +1208,11 @@
select ARCH_LS1046A
select ARM64
select ARMV8_MULTIENTRY
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM_SPI_FLASH if DM_SPI
select POWER_MC34VR500
- select BOARD_EARLY_INIT_F
+ select SUPPORT_SPL
imply SCSI
help
Support for Freescale LS1046ARDB platform.
@@ -1223,6 +1242,7 @@
select DM_RESET
select DM_SERIAL
select DM_USB
+ select OF_BOARD_SETUP
select OF_CONTROL
select OF_LIBFDT
select PINCTRL
@@ -1233,6 +1253,8 @@
select SPL_OF_CONTROL if SPL
select SPL_PINCTRL if SPL
select SUPPORT_SPL
+ imply CMD_DM
+ imply DISTRO_DEFAULTS
imply FAT_WRITE
help
Support for UniPhier SoC family developed by Socionext Inc.
@@ -1244,15 +1266,17 @@
select DM
select DM_SERIAL
select SYS_THUMB_BUILD
+ imply CMD_DM
config ARCH_STI
bool "Support STMicrolectronics SoCs"
+ select BLK
select CPU_V7A
select DM
- select DM_SERIAL
- select BLK
select DM_MMC
select DM_RESET
+ select DM_SERIAL
+ imply CMD_DM
help
Support for STMicroelectronics STiH407/10 SoC family.
This SoC is used on Linaro 96Board STiH410-B2260
@@ -1266,15 +1290,16 @@
select DM_GPIO
select DM_RESET
select DM_SERIAL
+ select MISC
select OF_CONTROL
select OF_LIBFDT
- select MISC
select PINCTRL
select REGMAP
select SUPPORT_SPL
select SYSCON
select SYSRESET
select SYS_THUMB_BUILD
+ imply CMD_DM
help
Support for STM32MP SoC family developed by STMicroelectronics,
MPUs based on ARM cortex A core
@@ -1283,44 +1308,46 @@
config ARCH_ROCKCHIP
bool "Support Rockchip SoCs"
- select OF_CONTROL
select BLK
select DM
- select SPL_DM if SPL
- select SYS_MALLOC_F
- select SYS_THUMB_BUILD if !ARM64
- select SPL_SYS_MALLOC_SIMPLE if SPL
select DM_GPIO
select DM_I2C
select DM_MMC
+ select DM_PWM
+ select DM_REGULATOR
select DM_SERIAL
select DM_SPI
select DM_SPI_FLASH
select DM_USB if USB
- select DM_PWM
- select DM_REGULATOR
select ENABLE_ARM_SOC_BOOT0_HOOK
+ select OF_CONTROL
select SPI
+ select SPL_DM if SPL
+ select SPL_SYS_MALLOC_SIMPLE if SPL
+ select SYS_MALLOC_F
+ select SYS_THUMB_BUILD if !ARM64
+ imply ADC
+ imply CMD_DM
imply DISTRO_DEFAULTS
imply FAT_WRITE
- imply USB_FUNCTION_FASTBOOT
- imply SPL_SYSRESET
- imply TPL_SYSRESET
- imply ADC
imply SARADC_ROCKCHIP
+ imply SPL_SYSRESET
imply SYS_NS16550
+ imply TPL_SYSRESET
+ imply USB_FUNCTION_FASTBOOT
config TARGET_THUNDERX_88XX
bool "Support ThunderX 88xx"
select ARM64
select OF_CONTROL
- select SYS_CACHE_SHIFT_7
select PL01X_SERIAL
+ select SYS_CACHE_SHIFT_7
config ARCH_ASPEED
bool "Support Aspeed SoCs"
- select OF_CONTROL
select DM
+ select OF_CONTROL
+ imply CMD_DM
endchoice
@@ -1486,8 +1513,8 @@
endmenu
config SPL_LDSCRIPT
- default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
- default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
+ default "arch/arm/cpu/arm926ejs/mxs/u-boot-spl.lds" if (ARCH_MX23 || ARCH_MX28) && !SPL_FRAMEWORK
+ default "arch/arm/cpu/arm1136/u-boot-spl.lds" if CPU_ARM1136
default "arch/arm/cpu/armv8/u-boot-spl.lds" if ARM64
diff --git a/arch/arm/cpu/armv7/ls102xa/Kconfig b/arch/arm/cpu/armv7/ls102xa/Kconfig
index 635358e..5d6a711 100644
--- a/arch/arm/cpu/armv7/ls102xa/Kconfig
+++ b/arch/arm/cpu/armv7/ls102xa/Kconfig
@@ -1,5 +1,7 @@
config ARCH_LS1021A
bool
+ select SYS_FSL_DDR_BE if SYS_FSL_DDR
+ select SYS_FSL_DDR_VER_50 if SYS_FSL_DDR
select SYS_FSL_ERRATUM_A008378
select SYS_FSL_ERRATUM_A008407
select SYS_FSL_ERRATUM_A008997
@@ -10,18 +12,16 @@
select SYS_FSL_ERRATUM_A009942
select SYS_FSL_ERRATUM_A010315
select SYS_FSL_HAS_CCI400
- select SYS_FSL_SRDS_1
- select SYS_HAS_SERDES
- select SYS_FSL_DDR_BE if SYS_FSL_DDR
- select SYS_FSL_DDR_VER_50 if SYS_FSL_DDR
select SYS_FSL_HAS_DDR3 if SYS_FSL_DDR
select SYS_FSL_HAS_DDR4 if SYS_FSL_DDR
select SYS_FSL_HAS_SEC
select SYS_FSL_SEC_COMPAT_5
select SYS_FSL_SEC_LE
+ select SYS_FSL_SRDS_1
+ select SYS_HAS_SERDES
+ imply CMD_PCI
imply SCSI
imply SCSI_AHCI
- imply CMD_PCI
menu "LS102xA architecture"
depends on ARCH_LS1021A
diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig
index 22d2f29..741e15c 100644
--- a/arch/arm/cpu/armv8/Kconfig
+++ b/arch/arm/cpu/armv8/Kconfig
@@ -44,8 +44,8 @@
menu "ARMv8 secure monitor firmware"
config ARMV8_SEC_FIRMWARE_SUPPORT
bool "Enable ARMv8 secure monitor firmware framework support"
- select OF_LIBFDT
select FIT
+ select OF_LIBFDT
help
This framework is aimed at making secure monitor firmware load
process brief.
@@ -60,8 +60,8 @@
config SPL_ARMV8_SEC_FIRMWARE_SUPPORT
bool "Enable ARMv8 secure monitor firmware framework support for SPL"
- select SPL_OF_LIBFDT
select SPL_FIT
+ select SPL_OF_LIBFDT
help
Say Y here to support this framework in SPL phase.
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
index 40c2c3a..052e070 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c
@@ -9,6 +9,7 @@
#include <asm/io.h>
#include <linux/errno.h>
#include <asm/system.h>
+#include <fm_eth.h>
#include <asm/armv8/mmu.h>
#include <asm/io.h>
#include <asm/arch/fsl_serdes.h>
@@ -18,7 +19,6 @@
#include <fsl_immap.h>
#include <asm/arch/mp.h>
#include <efi_loader.h>
-#include <fm_eth.h>
#include <fsl-mc/fsl_mc.h>
#ifdef CONFIG_FSL_ESDHC
#include <fsl_esdhc.h>
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon
index a00b5bc..7dae9f0 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon
+++ b/arch/arm/cpu/armv8/fsl-layerscape/doc/README.falcon
@@ -129,6 +129,16 @@
The "loadables" is not optional. It tells SPL which images to load into memory.
+Falcon mode with QSPI boot
+--------------------------
+To use falcon mode with QSPI boot, SPL needs to be enabled. Similar to SD or
+NAND boot, a RAM version full feature U-Boot is needed. Unlike SD or NAND boot,
+SPL with QSPI doesn't need to combine SPL image with RAM version image. Two
+separated images are used, u-boot-spl.pbl and u-boot.img. The former is SPL
+image with RCW and PBI commands to load the SPL payload into On-Chip RAM. The
+latter is RAM version U-Boot in FIT format (or legacy format if FIT is not
+used).
+
Other things to consider
-----------------------
Falcon boot skips a lot of initialization in U-Boot. If Linux expects the
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index bfd6639..8028d52 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -6,8 +6,6 @@
#include <common.h>
#include <fsl_immap.h>
#include <fsl_ifc.h>
-#include <ahci.h>
-#include <scsi.h>
#include <asm/arch/fsl_serdes.h>
#include <asm/arch/soc.h>
#include <asm/io.h>
@@ -330,36 +328,6 @@
#endif
}
-#ifdef CONFIG_SCSI_AHCI_PLAT
-int sata_init(void)
-{
- struct ccsr_ahci __iomem *ccsr_ahci;
-
-#ifdef CONFIG_SYS_SATA2
- ccsr_ahci = (void *)CONFIG_SYS_SATA2;
- out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
- out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY2_CFG);
- out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY3_CFG);
- out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
- out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
-#endif
-
-#ifdef CONFIG_SYS_SATA1
- ccsr_ahci = (void *)CONFIG_SYS_SATA1;
- out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
- out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY2_CFG);
- out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY3_CFG);
- out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
- out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
-
- ahci_init((void __iomem *)CONFIG_SYS_SATA1);
- scsi_scan(false);
-#endif
-
- return 0;
-}
-#endif
-
/* Get VDD in the unit mV from voltage ID */
int get_core_volt_from_fuse(void)
{
@@ -400,25 +368,6 @@
}
#elif defined(CONFIG_FSL_LSCH2)
-#ifdef CONFIG_SCSI_AHCI_PLAT
-int sata_init(void)
-{
- struct ccsr_ahci __iomem *ccsr_ahci = (void *)CONFIG_SYS_SATA;
-
- /* Disable SATA ECC */
- out_le32((void *)CONFIG_SYS_DCSR_DCFG_ADDR + 0x520, 0x80000000);
- out_le32(&ccsr_ahci->ppcfg, AHCI_PORT_PHY_1_CFG);
- out_le32(&ccsr_ahci->pp2c, AHCI_PORT_PHY2_CFG);
- out_le32(&ccsr_ahci->pp3c, AHCI_PORT_PHY3_CFG);
- out_le32(&ccsr_ahci->ptc, AHCI_PORT_TRANS_CFG);
- out_le32(&ccsr_ahci->axicc, AHCI_PORT_AXICC_CFG);
-
- ahci_init((void __iomem *)CONFIG_SYS_SATA);
- scsi_scan(false);
-
- return 0;
-}
-#endif
static void erratum_a009929(void)
{
@@ -719,9 +668,6 @@
#ifdef CONFIG_BOARD_LATE_INIT
int board_late_init(void)
{
-#ifdef CONFIG_SCSI_AHCI_PLAT
- sata_init();
-#endif
#ifdef CONFIG_CHAIN_OF_TRUST
fsl_setenv_chain_of_trust();
#endif
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/spl.c b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
index dba4b40..3e53084 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/spl.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/spl.c
@@ -11,6 +11,7 @@
#include <fsl_csu.h>
#include <asm/arch/fdt.h>
#include <asm/arch/ppa.h>
+#include <asm/arch/soc.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -22,6 +23,9 @@
#ifdef CONFIG_SPL_NAND_SUPPORT
return BOOT_DEVICE_NAND;
#endif
+#ifdef CONFIG_QSPI_BOOT
+ return BOOT_DEVICE_NOR;
+#endif
return 0;
}
@@ -52,6 +56,7 @@
void board_init_f(ulong dummy)
{
+ icache_enable();
/* Clear global data */
memset((void *)gd, 0, sizeof(gd_t));
board_early_init_f();
@@ -101,6 +106,9 @@
gd->arch.tlb_addr = (gd->ram_top - gd->arch.tlb_size) & ~(0x10000 - 1);
gd->arch.tlb_allocated = gd->arch.tlb_addr;
#endif /* CONFIG_SPL_FSL_LS_PPA */
+#if defined(CONFIG_QSPI_AHB_INIT) && defined(CONFIG_QSPI_BOOT)
+ qspi_ahb_init();
+#endif
}
#ifdef CONFIG_SPL_OS_BOOT
diff --git a/arch/arm/dts/fsl-ls1012a-2g5rdb.dts b/arch/arm/dts/fsl-ls1012a-2g5rdb.dts
index db23cf8..cdd4ce4 100644
--- a/arch/arm/dts/fsl-ls1012a-2g5rdb.dts
+++ b/arch/arm/dts/fsl-ls1012a-2g5rdb.dts
@@ -40,3 +40,7 @@
&duart0 {
status = "okay";
};
+
+&sata {
+ status = "okay";
+};
diff --git a/arch/arm/dts/fsl-ls1012a-qds.dtsi b/arch/arm/dts/fsl-ls1012a-qds.dtsi
index d069b60..661af0e 100644
--- a/arch/arm/dts/fsl-ls1012a-qds.dtsi
+++ b/arch/arm/dts/fsl-ls1012a-qds.dtsi
@@ -125,3 +125,7 @@
status = "okay";
phy_type = "ulpi";
};
+
+&sata {
+ status = "okay";
+};
diff --git a/arch/arm/dts/fsl-ls1012a-rdb.dtsi b/arch/arm/dts/fsl-ls1012a-rdb.dtsi
index 201e5fa..757e2eb 100644
--- a/arch/arm/dts/fsl-ls1012a-rdb.dtsi
+++ b/arch/arm/dts/fsl-ls1012a-rdb.dtsi
@@ -34,3 +34,7 @@
&duart0 {
status = "okay";
};
+
+&sata {
+ status = "okay";
+};
diff --git a/arch/arm/dts/fsl-ls1012a.dtsi b/arch/arm/dts/fsl-ls1012a.dtsi
index be99076..f22cbf4 100644
--- a/arch/arm/dts/fsl-ls1012a.dtsi
+++ b/arch/arm/dts/fsl-ls1012a.dtsi
@@ -134,6 +134,14 @@
0x82000000 0x0 0x40000000 0x40 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
};
+ sata: sata@3200000 {
+ compatible = "fsl,ls1012a-ahci";
+ reg = <0x0 0x3200000 0x0 0x10000>;
+ interrupts = <0 69 4>;
+ clocks = <&clockgen 4 0>;
+ status = "disabled";
+ };
+
usb0: usb2@8600000 {
compatible = "fsl-usb2-dr-v2.5", "fsl-usb2-dr";
reg = <0x0 0x8600000 0x0 0x1000>;
diff --git a/arch/arm/dts/socfpga_arria10.dtsi b/arch/arm/dts/socfpga_arria10.dtsi
index b51febd..2f935a2 100644
--- a/arch/arm/dts/socfpga_arria10.dtsi
+++ b/arch/arm/dts/socfpga_arria10.dtsi
@@ -637,8 +637,8 @@
#address-cells = <1>;
#size-cells = <1>;
compatible = "denali,denali-nand-dt", "altr,socfpga-denali-nand";
- reg = <0xffb90000 0x72000>,
- <0xffb80000 0x10000>;
+ reg = <0xffb90000 0x20>,
+ <0xffb80000 0x1000>;
reg-names = "nand_data", "denali_reg";
interrupts = <0 99 4>;
dma-mask = <0xffffffff>;
diff --git a/arch/arm/dts/tegra30-apalis.dts b/arch/arm/dts/tegra30-apalis.dts
index 0852d8d..1a9ce27 100644
--- a/arch/arm/dts/tegra30-apalis.dts
+++ b/arch/arm/dts/tegra30-apalis.dts
@@ -119,9 +119,6 @@
vccio-supply = <&sys_3v3_reg>;
regulators {
- #address-cells = <1>;
- #size-cells = <0>;
-
/* SW1: +V1.35_VDDIO_DDR */
vdd1_reg: vdd1 {
regulator-name = "vddio_ddr_1v35";
diff --git a/arch/arm/dts/tegra30-beaver.dts b/arch/arm/dts/tegra30-beaver.dts
index c1a15bb..f5fbbe8 100644
--- a/arch/arm/dts/tegra30-beaver.dts
+++ b/arch/arm/dts/tegra30-beaver.dts
@@ -102,9 +102,6 @@
vccio-supply = <&vdd_5v_in_reg>;
regulators {
- #address-cells = <1>;
- #size-cells = <0>;
-
vdd1_reg: vdd1 {
regulator-name = "vddio_ddr_1v2";
regulator-min-microvolt = <1200000>;
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/soc.h b/arch/arm/include/asm/arch-fsl-layerscape/soc.h
index 9a219a6..61b6e4b 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/soc.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/soc.h
@@ -85,39 +85,7 @@
#define SVR_DEV(svr) ((svr) >> 8)
#define IS_SVR_DEV(svr, dev) (((svr) >> 16) == (dev))
-/* ahci port register default value */
-#define AHCI_PORT_PHY_1_CFG 0xa003fffe
-#define AHCI_PORT_PHY2_CFG 0x28184d1f
-#define AHCI_PORT_PHY3_CFG 0x0e081509
-#define AHCI_PORT_TRANS_CFG 0x08000029
-#define AHCI_PORT_AXICC_CFG 0x3fffffff
-
#ifndef __ASSEMBLY__
-/* AHCI (sata) register map */
-struct ccsr_ahci {
- u32 res1[0xa4/4]; /* 0x0 - 0xa4 */
- u32 pcfg; /* port config */
- u32 ppcfg; /* port phy1 config */
- u32 pp2c; /* port phy2 config */
- u32 pp3c; /* port phy3 config */
- u32 pp4c; /* port phy4 config */
- u32 pp5c; /* port phy5 config */
- u32 axicc; /* AXI cache control */
- u32 paxic; /* port AXI config */
- u32 axipc; /* AXI PROT control */
- u32 ptc; /* port Trans Config */
- u32 pts; /* port Trans Status */
- u32 plc; /* port link config */
- u32 plc1; /* port link config1 */
- u32 plc2; /* port link config2 */
- u32 pls; /* port link status */
- u32 pls1; /* port link status1 */
- u32 pcmdc; /* port CMD config */
- u32 ppcs; /* port phy control status */
- u32 pberr; /* port 0/1 BIST error */
- u32 cmds; /* port 0/1 CMD status error */
-};
-
#ifdef CONFIG_FSL_LSCH3
void fsl_lsch3_early_init_f(void);
int get_core_volt_from_fuse(void);
@@ -130,6 +98,9 @@
void init_pfe_scfg_dcfg_regs(void);
#endif
#endif
+#ifdef CONFIG_QSPI_AHB_INIT
+int qspi_ahb_init(void);
+#endif
void cpu_name(char *name);
#ifdef CONFIG_SYS_FSL_ERRATUM_A009635
diff --git a/arch/arm/include/asm/arch-tegra124/flow.h b/arch/arm/include/asm/arch-tegra124/flow.h
index a544256..62947bf 100644
--- a/arch/arm/include/asm/arch-tegra124/flow.h
+++ b/arch/arm/include/asm/arch-tegra124/flow.h
@@ -29,7 +29,7 @@
u32 flow_dbg_cnt0; /* offset 0x48 */
u32 flow_dbg_cnt1; /* offset 0x4c */
u32 flow_dbg_qual; /* offset 0x50 */
- u32 flow_ctlr_spare; /* offset 0x54 */
+ u32 flow_ctrl_spare; /* offset 0x54 */
u32 ram_repair_cluster1;/* offset 0x58 */
};
@@ -48,10 +48,8 @@
#define CSR_WAIT_WFI_SHIFT 8
#define CSR_PWR_OFF_STS (1 << 16)
-/* RAM_REPAIR, 0x40, 0x58 */
-enum {
- RAM_REPAIR_REQ = 0x1 << 0,
- RAM_REPAIR_STS = 0x1 << 1,
-};
+#define RAM_REPAIR_REQ BIT(0)
+#define RAM_REPAIR_STS BIT(1)
+#define RAM_REPAIR_BYPASS_EN BIT(2)
#endif /* _TEGRA124_FLOW_H_ */
diff --git a/arch/arm/include/asm/proc-armv/ptrace.h b/arch/arm/include/asm/proc-armv/ptrace.h
index 71df5a9..183b00a 100644
--- a/arch/arm/include/asm/proc-armv/ptrace.h
+++ b/arch/arm/include/asm/proc-armv/ptrace.h
@@ -37,6 +37,7 @@
#define FIQ_MODE 0x11
#define IRQ_MODE 0x12
#define SVC_MODE 0x13
+#define MON_MODE 0x16
#define ABT_MODE 0x17
#define HYP_MODE 0x1a
#define UND_MODE 0x1b
diff --git a/arch/arm/lib/psci-dt.c b/arch/arm/lib/psci-dt.c
index 825fe1e..246f3c7 100644
--- a/arch/arm/lib/psci-dt.c
+++ b/arch/arm/lib/psci-dt.c
@@ -67,6 +67,8 @@
psci_ver = sec_firmware_support_psci_version();
#elif defined(CONFIG_ARMV7_PSCI_1_0) || defined(CONFIG_ARMV8_PSCI)
psci_ver = ARM_PSCI_VER_1_0;
+#elif defined(CONFIG_ARMV7_PSCI_0_2)
+ psci_ver = ARM_PSCI_VER_0_2;
#endif
if (psci_ver >= ARM_PSCI_VER_1_0) {
tmp = fdt_setprop_string(fdt, nodeoff,
@@ -114,6 +116,10 @@
if (tmp)
return tmp;
+ tmp = fdt_setprop_string(fdt, nodeoff, "status", "okay");
+ if (tmp)
+ return tmp;
+
#endif
return 0;
}
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index ce6be38..69856c8 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -76,19 +76,21 @@
bool "Support snapper9260"
select AT91SAM9260
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_GURNARD
bool "Support gurnard"
select AT91SAM9G45
select BOARD_LATE_INIT
select DM
+ select DM_ETH
+ select DM_GPIO
select DM_SERIAL
select DM_SPI
- select DM_GPIO
- select DM_ETH
select SPI
+ imply CMD_DM
config TARGET_AT91SAM9261EK
bool "Atmel at91sam9261 reference board"
@@ -115,8 +117,8 @@
config TARGET_AT91SAM9M10G45EK
bool "Atmel AT91SAM9M10G45-EK board"
select AT91SAM9M10G45
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
+ select SUPPORT_SPL
config TARGET_PM9G45
bool "Ronetix pm9g45 board"
@@ -130,8 +132,8 @@
config TARGET_AT91SAM9N12EK
bool "Atmel AT91SAM9N12-EK board"
select AT91SAM9N12
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
+ select SUPPORT_SPL
config TARGET_AT91SAM9RLEK
bool "Atmel at91sam9rl reference board"
@@ -141,28 +143,28 @@
config TARGET_AT91SAM9X5EK
bool "Atmel AT91SAM9X5-EK board"
select AT91SAM9X5
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select SUPPORT_SPL
config TARGET_SAMA5D2_PTC_EK
bool "SAMA5D2 PTC EK board"
- select SAMA5D2
select BOARD_EARLY_INIT_F
+ select SAMA5D2
config TARGET_SAMA5D2_XPLAINED
bool "SAMA5D2 Xplained board"
- select SAMA5D2
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select SAMA5D2
+ select SUPPORT_SPL
config TARGET_SAMA5D27_SOM1_EK
bool "SAMA5D27 SOM1 EK board"
- select CPU_V7A
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select CPU_V7A
+ select SUPPORT_SPL
help
The SAMA5D27 SOM1 embeds SAMA5D2 SiP(System in Package),
a 64Mbit QSPI flash, KSZ8081 Phy and a Mac-address EEPROM
@@ -172,30 +174,30 @@
config TARGET_SAMA5D3_XPLAINED
bool "SAMA5D3 Xplained board"
+ select BOARD_EARLY_INIT_F
select SAMA5D3
select SUPPORT_SPL
- select BOARD_EARLY_INIT_F
config TARGET_SAMA5D3XEK
bool "SAMA5D3X-EK board"
- select SAMA5D3
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select SAMA5D3
select SUPPORT_SPL
- select BOARD_EARLY_INIT_F
config TARGET_SAMA5D4_XPLAINED
bool "SAMA5D4 Xplained board"
- select SAMA5D4
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select SAMA5D4
+ select SUPPORT_SPL
config TARGET_SAMA5D4EK
bool "SAMA5D4 Evaluation Kit"
- select SAMA5D4
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select SAMA5D4
+ select SUPPORT_SPL
config TARGET_MEESC
bool "Support meesc"
@@ -204,39 +206,43 @@
config TARGET_CORVUS
bool "Support corvus"
select AT91SAM9M10G45
- select SUPPORT_SPL
select DM
- select DM_SERIAL
- select DM_GPIO
select DM_ETH
+ select DM_GPIO
+ select DM_SERIAL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_TAURUS
bool "Support taurus"
select AT91SAM9G20
- select SUPPORT_SPL
select DM
+ select DM_ETH
+ select DM_GPIO
select DM_SERIAL
select DM_SPI
- select DM_GPIO
- select DM_ETH
select SPI
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_SMARTWEB
bool "Support smartweb"
select AT91SAM9260
- select SUPPORT_SPL
select DM
- select DM_SERIAL
- select DM_GPIO
select DM_ETH
+ select DM_GPIO
+ select DM_SERIAL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_VINCO
bool "Support VINCO"
- select SAMA5D4
- select SUPPORT_SPL
select DM
select DM_SPI
+ select SAMA5D4
select SPI
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_WB45N
bool "Support Laird WB45N"
@@ -245,10 +251,10 @@
config TARGET_WB50N
bool "Support Laird WB50N"
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select CPU_V7A
select SUPPORT_SPL
- select BOARD_EARLY_INIT_F
endchoice
diff --git a/arch/arm/mach-davinci/Kconfig b/arch/arm/mach-davinci/Kconfig
index 5e7baba..12b1e68 100644
--- a/arch/arm/mach-davinci/Kconfig
+++ b/arch/arm/mach-davinci/Kconfig
@@ -18,9 +18,9 @@
config TARGET_EA20
bool "EA20 board"
+ select BOARD_LATE_INIT
select MACH_DAVINCI_DA850_EVM
select SOC_DA850
- select BOARD_LATE_INIT
config TARGET_OMAPL138_LCDK
bool "OMAPL138 LCDK"
@@ -57,8 +57,8 @@
config SOC_DA8XX
bool
- select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL
select SYS_DA850_DDR_INIT if SUPPORT_SPL || DA850_LOWLEVEL
+ select SYS_DA850_PLL_INIT if SUPPORT_SPL || DA850_LOWLEVEL
config MACH_DAVINCI_DA850_EVM
bool
diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index 65d9168..ed04369 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -6,8 +6,8 @@
config ARCH_EXYNOS4
bool "Exynos4 SoC family"
- select CPU_V7A
select BOARD_EARLY_INIT_F
+ select CPU_V7A
help
Samsung Exynos4 SoC family are based on ARM Cortex-A9 CPU. There
are multiple SoCs in this family including Exynos4210, Exynos4412,
@@ -15,14 +15,14 @@
config ARCH_EXYNOS5
bool "Exynos5 SoC family"
- select CPU_V7A
select BOARD_EARLY_INIT_F
+ select CPU_V7A
select SHA_HW_ACCEL
- imply CRC32_VERIFY
imply CMD_HASH
+ imply CRC32_VERIFY
imply HASH_VERIFY
- imply USB_ETHER_RTL8152
imply USB_ETHER_ASIX
+ imply USB_ETHER_RTL8152
imply USB_ETHER_SMSC95XX
help
Samsung Exynos5 SoC family are based on ARM Cortex-A15 CPU (and
@@ -46,9 +46,9 @@
prompt "EXYNOS4 board select"
config TARGET_SMDKV310
- select SUPPORT_SPL
bool "Exynos4210 SMDKV310 board"
select OF_CONTROL
+ select SUPPORT_SPL
config TARGET_TRATS
bool "Exynos4210 Trats board"
@@ -93,39 +93,39 @@
select ARM_ERRATA_774769
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
- select SUPPORT_SPL
select OF_CONTROL
+ select SUPPORT_SPL
config TARGET_SMDK5250
bool "SMDK5250 board"
- select SUPPORT_SPL
select OF_CONTROL
+ select SUPPORT_SPL
config TARGET_SNOW
bool "Snow board"
- select SUPPORT_SPL
select OF_CONTROL
+ select SUPPORT_SPL
config TARGET_SPRING
bool "Spring board"
- select SUPPORT_SPL
select OF_CONTROL
select SPL_DISABLE_OF_CONTROL
+ select SUPPORT_SPL
config TARGET_SMDK5420
bool "SMDK5420 board"
- select SUPPORT_SPL
select OF_CONTROL
+ select SUPPORT_SPL
config TARGET_PEACH_PI
bool "Peach Pi board"
- select SUPPORT_SPL
select OF_CONTROL
+ select SUPPORT_SPL
config TARGET_PEACH_PIT
bool "Peach Pit board"
- select SUPPORT_SPL
select OF_CONTROL
+ select SUPPORT_SPL
endchoice
endif
@@ -139,12 +139,12 @@
bool "ESPRESSO7420 board"
select ARM64
select ARMV8_MULTIENTRY
- select SUPPORT_SPL
+ select CLK_EXYNOS
select OF_CONTROL
- select SPL_DISABLE_OF_CONTROL
select PINCTRL
select PINCTRL_EXYNOS7420
- select CLK_EXYNOS
+ select SPL_DISABLE_OF_CONTROL
+ select SUPPORT_SPL
endchoice
endif
diff --git a/arch/arm/mach-imx/mx3/Kconfig b/arch/arm/mach-imx/mx3/Kconfig
index 6cc970f..5028d5e 100644
--- a/arch/arm/mach-imx/mx3/Kconfig
+++ b/arch/arm/mach-imx/mx3/Kconfig
@@ -9,9 +9,9 @@
config TARGET_MX31PDK
bool "Support the i.MX31 PDK board from Freescale/NXP"
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
select SUPPORT_SPL
- select BOARD_EARLY_INIT_F
endchoice
diff --git a/arch/arm/mach-imx/mx5/Kconfig b/arch/arm/mach-imx/mx5/Kconfig
index 3654670..051b15d 100644
--- a/arch/arm/mach-imx/mx5/Kconfig
+++ b/arch/arm/mach-imx/mx5/Kconfig
@@ -1,14 +1,14 @@
if ARCH_MX5
config MX5
- select GPT_TIMER
bool
default y
+ select GPT_TIMER
config MX51
bool
- select SYS_FSL_ERRATUM_ESDHC_A001
select ARM_CORTEX_A8_CVE_2017_5715
+ select SYS_FSL_ERRATUM_ESDHC_A001
config MX53
bool
@@ -21,13 +21,14 @@
config TARGET_KP_IMX53
bool "Support K+P imx53 board"
select BOARD_LATE_INIT
- select MX53
select DM
- select DM_SERIAL
select DM_ETH
- select DM_I2C
select DM_GPIO
+ select DM_I2C
select DM_PMIC
+ select DM_SERIAL
+ select MX53
+ imply CMD_DM
config TARGET_MX51EVK
bool "Support mx51evk"
@@ -41,9 +42,10 @@
config TARGET_MX53CX9020
bool "Support CX9020"
select BOARD_LATE_INIT
- select MX53
select DM
select DM_SERIAL
+ select MX53
+ imply CMD_DM
config TARGET_MX53EVK
bool "Support mx53evk"
diff --git a/arch/arm/mach-imx/mx6/Kconfig b/arch/arm/mach-imx/mx6/Kconfig
index d4bc60a..a2799c4 100644
--- a/arch/arm/mach-imx/mx6/Kconfig
+++ b/arch/arm/mach-imx/mx6/Kconfig
@@ -1,89 +1,91 @@
if ARCH_MX6
config MX6_SMP
+ bool
select ARM_ERRATA_751472
select ARM_ERRATA_761320
select ARM_ERRATA_794072
select ARM_ERRATA_845369
select MP
- bool
config MX6
- select ARM_ERRATA_743622 if !MX6UL && !MX6ULL
- select GPT_TIMER if !MX6UL && !MX6ULL
bool
default y
+ select ARM_ERRATA_743622 if !MX6UL && !MX6ULL
+ select GPT_TIMER if !MX6UL && !MX6ULL
imply CMD_FUSE
config MX6D
+ bool
select HAS_CAAM
select MX6_SMP
- bool
config MX6DL
+ bool
select HAS_CAAM
select MX6_SMP
- bool
config MX6Q
+ bool
select HAS_CAAM
select MX6_SMP
- bool
config MX6QDL
+ bool
select HAS_CAAM
select MX6_SMP
- bool
config MX6S
- select HAS_CAAM
bool
+ select HAS_CAAM
config MX6SL
bool
config MX6SX
+ bool
select HAS_CAAM
select ROM_UNIFIED_SECTIONS
- bool
config MX6SLL
- select ROM_UNIFIED_SECTIONS
bool
+ select ROM_UNIFIED_SECTIONS
config MX6UL
+ bool
select HAS_CAAM
- select SYS_L2CACHE_OFF
select ROM_UNIFIED_SECTIONS
select SYSCOUNTER_TIMER
- bool
+ select SYS_L2CACHE_OFF
config MX6UL_LITESOM
bool
- select MX6UL
select DM
select DM_THERMAL
+ select MX6UL
select SUPPORT_SPL
+ imply CMD_DM
config MX6UL_OPOS6UL
bool
- select MX6UL
select BOARD_LATE_INIT
select DM
select DM_GPIO
select DM_MMC
select DM_THERMAL
- select SUPPORT_SPL
+ select MX6UL
select SPL_DM if SPL
select SPL_OF_CONTROL if SPL
- select SPL_SEPARATE_BSS if SPL
select SPL_PINCTRL if SPL
+ select SPL_SEPARATE_BSS if SPL
+ select SUPPORT_SPL
+ imply CMD_DM
config MX6ULL
- select SYS_L2CACHE_OFF
+ bool
select ROM_UNIFIED_SECTIONS
select SYSCOUNTER_TIMER
- bool
+ select SYS_L2CACHE_OFF
config MX6_DDRCAL
bool "Include dynamic DDR calibration routines"
@@ -106,10 +108,11 @@
config TARGET_APALIS_IMX6
bool "Toradex Apalis iMX6 board"
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_THERMAL
+ select SUPPORT_SPL
+ imply CMD_DM
imply CMD_SATA
config TARGET_ARISTAINETOS
@@ -125,28 +128,31 @@
config TARGET_CGTQMX6EVAL
bool "cgtqmx6eval"
- select MX6QDL
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_THERMAL
+ select MX6QDL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_CM_FX6
bool "CM-FX6"
- select SUPPORT_SPL
- select MX6QDL
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ select MX6QDL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_COLIBRI_IMX6
bool "Toradex Colibri iMX6 board"
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_THERMAL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_COLIBRI_IMX6ULL
bool "Toradex Colibri iMX6ULL"
@@ -157,19 +163,21 @@
config TARGET_DHCOMIMX6
bool "dh_imx6"
- select MX6QDL
- select BOARD_LATE_INIT
select BOARD_EARLY_INIT_F
- select SUPPORT_SPL
+ select BOARD_LATE_INIT
select DM
select DM_THERMAL
+ select MX6QDL
+ select SUPPORT_SPL
+ imply CMD_DM
imply CMD_SPL
config TARGET_DISPLAY5
bool "LWN DISPLAY5 board"
- select SUPPORT_SPL
select DM
select DM_SERIAL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_EMBESTMX6BOARDS
bool "embestmx6boards"
@@ -199,8 +207,8 @@
config TARGET_MX6CUBOXI
bool "Solid-run mx6 boards"
- select MX6QDL
select BOARD_LATE_INIT
+ select MX6QDL
select SUPPORT_SPL
config TARGET_MX6LOGICPD
@@ -216,6 +224,7 @@
select DM_MMC
select DM_PMIC
select OF_CONTROL
+ imply CMD_DM
config TARGET_MX6MEMCAL
bool "mx6memcal"
@@ -230,9 +239,6 @@
config TARGET_MX6DL_MAMOJ
bool "Support BTicino Mamoj"
- select MX6QDL
- select OF_CONTROL
- select PINCTRL
select DM
select DM_ETH
select DM_GPIO
@@ -241,59 +247,66 @@
select DM_PMIC
select DM_PMIC_PFUZE100
select DM_THERMAL
+ select MX6QDL
+ select OF_CONTROL
+ select PINCTRL
select SPL
- select SUPPORT_SPL
select SPL_DM if SPL
- select SPL_OF_LIBFDT if SPL
- select SPL_OF_CONTROL if SPL
- select SPL_PINCTRL if SPL
- select SPL_SEPARATE_BSS if SPL
select SPL_GPIO_SUPPORT if SPL
select SPL_LIBCOMMON_SUPPORT if SPL
select SPL_LIBDISK_SUPPORT if SPL
select SPL_LIBGENERIC_SUPPORT if SPL
select SPL_MMC_SUPPORT if SPL
+ select SPL_OF_CONTROL if SPL
+ select SPL_OF_LIBFDT if SPL
+ select SPL_PINCTRL if SPL
+ select SPL_SEPARATE_BSS if SPL
select SPL_SERIAL_SUPPORT if SPL
- select SPL_USB_HOST_SUPPORT if SPL
select SPL_USB_GADGET_SUPPORT if SPL
+ select SPL_USB_HOST_SUPPORT if SPL
select SPL_USB_SDP_SUPPORT if SPL
select SPL_WATCHDOG_SUPPORT if SPL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6Q_ENGICAM
bool "Support Engicam i.Core(RQS)"
select BOARD_LATE_INIT
- select MX6QDL
- select OF_CONTROL
- select SPL_OF_LIBFDT
select DM
select DM_ETH
select DM_GPIO
select DM_I2C
select DM_MMC
select DM_THERMAL
- select SUPPORT_SPL
+ select MX6QDL
+ select OF_CONTROL
select SPL_DM if SPL
select SPL_OF_CONTROL if SPL
- select SPL_SEPARATE_BSS if SPL
+ select SPL_OF_LIBFDT
select SPL_PINCTRL if SPL
+ select SPL_SEPARATE_BSS if SPL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6SABREAUTO
bool "mx6sabreauto"
- select MX6QDL
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_THERMAL
- select BOARD_EARLY_INIT_F
+ select MX6QDL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6SABRESD
bool "mx6sabresd"
- select MX6QDL
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_THERMAL
- select BOARD_EARLY_INIT_F
+ select MX6QDL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6SLEVK
bool "mx6slevk"
@@ -301,75 +314,81 @@
select SUPPORT_SPL
config TARGET_MX6SLLEVK
- bool "mx6sll evk"
+ bool "mx6sll evk"
select BOARD_LATE_INIT
- select MX6SLL
- select DM
- select DM_THERMAL
+ select DM
+ select DM_THERMAL
+ select MX6SLL
+ imply CMD_DM
config TARGET_MX6SXSABRESD
bool "mx6sxsabresd"
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
- select MX6SX
- select SUPPORT_SPL
select DM
select DM_THERMAL
- select BOARD_EARLY_INIT_F
+ select MX6SX
+ select SUPPORT_SPL
config TARGET_MX6SXSABREAUTO
- bool "mx6sxsabreauto"
+ bool "mx6sxsabreauto"
+ select BOARD_EARLY_INIT_F
select BOARD_LATE_INIT
+ select DM
+ select DM_THERMAL
select MX6SX
- select DM
- select DM_THERMAL
- select BOARD_EARLY_INIT_F
+ imply CMD_DM
config TARGET_MX6UL_9X9_EVK
bool "mx6ul_9x9_evk"
select BOARD_LATE_INIT
- select MX6UL
select DM
select DM_THERMAL
+ select MX6UL
select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6UL_14X14_EVK
- select BOARD_LATE_INIT
bool "mx6ul_14x14_evk"
- select MX6UL
+ select BOARD_LATE_INIT
select DM
select DM_THERMAL
+ select MX6UL
select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6UL_ENGICAM
bool "Support Engicam GEAM6UL/Is.IoT"
select BOARD_LATE_INIT
- select MX6UL
- select OF_CONTROL
select DM
select DM_ETH
select DM_GPIO
select DM_I2C
select DM_MMC
select DM_THERMAL
- select SUPPORT_SPL
+ select MX6UL
+ select OF_CONTROL
select SPL_DM if SPL
select SPL_OF_CONTROL if SPL
- select SPL_SEPARATE_BSS if SPL
select SPL_PINCTRL if SPL
+ select SPL_SEPARATE_BSS if SPL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX6ULL_14X14_EVK
bool "Support mx6ull_14x14_evk"
select BOARD_LATE_INIT
- select MX6ULL
select DM
select DM_THERMAL
+ select MX6ULL
+ imply CMD_DM
config TARGET_NITROGEN6X
bool "nitrogen6x"
- imply USB_HOST_ETHER
imply USB_ETHER_ASIX
- imply USB_ETHER_SMSC95XX
imply USB_ETHER_MCS7830
+ imply USB_ETHER_SMSC95XX
+ imply USB_HOST_ETHER
config TARGET_OPOS6ULDEV
bool "Armadeus OPOS6ULDev board"
@@ -404,8 +423,8 @@
config TARGET_PFLA02
bool "Phytec PFLA02 (PhyFlex) i.MX6 Quad"
- select MX6QDL
select BOARD_LATE_INIT
+ select MX6QDL
select SUPPORT_SPL
config TARGET_SECOMX6
@@ -423,12 +442,13 @@
config TARGET_KP_IMX6Q_TPC
bool "K+P KP_IMX6Q_TPC i.MX6 Quad"
- select MX6QDL
- select BOARD_LATE_INIT
select BOARD_EARLY_INIT_F
- select SUPPORT_SPL
+ select BOARD_LATE_INIT
select DM
select DM_THERMAL
+ select MX6QDL
+ select SUPPORT_SPL
+ imply CMD_DM
imply CMD_SPL
config TARGET_TQMA6
@@ -437,57 +457,62 @@
config TARGET_UDOO
bool "udoo"
- select MX6QDL
select BOARD_LATE_INIT
+ select MX6QDL
select SUPPORT_SPL
config TARGET_UDOO_NEO
bool "UDOO Neo"
select BOARD_LATE_INIT
- select SUPPORT_SPL
- select MX6SX
select DM
select DM_THERMAL
+ select MX6SX
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_SAMTEC_VINING_2000
bool "samtec VIN|ING 2000"
select BOARD_LATE_INIT
- select MX6SX
select DM
select DM_THERMAL
+ select MX6SX
+ imply CMD_DM
config TARGET_WANDBOARD
bool "wandboard"
- select MX6QDL
select BOARD_LATE_INIT
+ select MX6QDL
select SUPPORT_SPL
config TARGET_WARP
bool "WaRP"
- select MX6SL
select BOARD_LATE_INIT
+ select MX6SL
config TARGET_XPRESS
bool "CCV xPress"
select BOARD_LATE_INIT
- select MX6UL
select DM
select DM_THERMAL
+ select MX6UL
select SUPPORT_SPL
+ imply CMD_DM
config TARGET_ZC5202
bool "zc5202"
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_THERMAL
+ select SUPPORT_SPL
+ imply CMD_DM
config TARGET_ZC5601
bool "zc5601"
select BOARD_LATE_INIT
- select SUPPORT_SPL
select DM
select DM_THERMAL
+ select SUPPORT_SPL
+ imply CMD_DM
endchoice
diff --git a/arch/arm/mach-imx/mx7/Kconfig b/arch/arm/mach-imx/mx7/Kconfig
index 944585b..1acd7f3 100644
--- a/arch/arm/mach-imx/mx7/Kconfig
+++ b/arch/arm/mach-imx/mx7/Kconfig
@@ -2,19 +2,19 @@
config MX7
bool
+ default y
+ select ARCH_SUPPORT_PSCI
+ select CPU_V7_HAS_NONSEC
+ select CPU_V7_HAS_VIRT
select ROM_UNIFIED_SECTIONS
select SYSCOUNTER_TIMER
- select CPU_V7_HAS_VIRT
- select CPU_V7_HAS_NONSEC
- select ARCH_SUPPORT_PSCI
imply CMD_FUSE
- default y
config MX7D
+ bool
select HAS_CAAM
select ROM_UNIFIED_SECTIONS
imply CMD_FUSE
- bool
choice
prompt "MX7 board select"
@@ -22,38 +22,43 @@
config TARGET_CL_SOM_IMX7
bool "CL-SOM-iMX7"
- select MX7D
select DM
select DM_THERMAL
+ select MX7D
select SUPPORT_SPL
+ imply CMD_DM
config TARGET_MX7DSABRESD
bool "mx7dsabresd"
select BOARD_LATE_INIT
- select MX7D
select DM
select DM_THERMAL
+ select MX7D
+ imply CMD_DM
config TARGET_PICO_IMX7D
bool "pico-imx7d"
select BOARD_LATE_INIT
- select MX7D
select DM
select DM_THERMAL
+ select MX7D
select SUPPORT_SPL
config TARGET_WARP7
bool "warp7"
select BOARD_LATE_INIT
- select MX7D
select DM
select DM_THERMAL
+ select MX7D
+ imply CMD_DM
+ imply CMD_DM
config TARGET_COLIBRI_IMX7
bool "Support Colibri iMX7S/iMX7D modules"
select DM
select DM_SERIAL
select DM_THERMAL
+ imply CMD_DM
endchoice
diff --git a/arch/arm/mach-meson/Kconfig b/arch/arm/mach-meson/Kconfig
index 7662256..ee8b1cd 100644
--- a/arch/arm/mach-meson/Kconfig
+++ b/arch/arm/mach-meson/Kconfig
@@ -6,6 +6,7 @@
select CLK
select DM
select DM_SERIAL
+ imply CMD_DM
help
The Amlogic Meson GXBaby (S905) is an ARM SoC with a
quad-core Cortex-A53 CPU and a Mali-450 GPU.
@@ -16,6 +17,7 @@
select CLK
select DM
select DM_SERIAL
+ imply CMD_DM
help
The Amlogic Meson GXL (S905X and S905D) is an ARM SoC with a
quad-core Cortex-A53 CPU and a Mali-450 GPU.
diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
index 5415b5a..3df124c 100644
--- a/arch/arm/mach-mvebu/Kconfig
+++ b/arch/arm/mach-mvebu/Kconfig
@@ -6,14 +6,14 @@
config ARMADA_32BIT
bool
+ select ARCH_MISC_INIT
+ select BOARD_EARLY_INIT_F
select CPU_V7A
- select SUPPORT_SPL
select SPL_DM
select SPL_DM_SEQ_ALIAS
select SPL_OF_CONTROL
select SPL_SIMPLE_BUS
- select BOARD_EARLY_INIT_F
- select ARCH_MISC_INIT
+ select SUPPORT_SPL
config ARMADA_64BIT
bool
diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
index f4babc8..76a1906 100644
--- a/arch/arm/mach-omap2/Kconfig
+++ b/arch/arm/mach-omap2/Kconfig
@@ -6,11 +6,11 @@
config OMAP34XX
bool "OMAP34XX SoC"
+ select ARM_CORTEX_A8_CVE_2017_5715
select ARM_ERRATA_430973
select ARM_ERRATA_454179
select ARM_ERRATA_621766
select ARM_ERRATA_725233
- select ARM_CORTEX_A8_CVE_2017_5715
select USE_TINY_PRINTF
imply NAND_OMAP_GPMC
imply SPL_EXT_SUPPORT
@@ -52,9 +52,9 @@
config OMAP54XX
bool "OMAP54XX SoC"
+ select ARM_CORTEX_A15_CVE_2017_5715
select ARM_ERRATA_798870
select SYS_THUMB_BUILD
- select ARM_CORTEX_A15_CVE_2017_5715
imply NAND_OMAP_ELM
imply NAND_OMAP_GPMC
imply SPL_DISPLAY_PRINT
@@ -116,8 +116,8 @@
config AM33XX
bool "AM33XX SoC"
- select SPECIFY_CONSOLE_INDEX
select ARM_CORTEX_A8_CVE_2017_5715
+ select SPECIFY_CONSOLE_INDEX
imply NAND_OMAP_ELM
imply NAND_OMAP_GPMC
imply SPL_NAND_AM33XX_BCH
diff --git a/arch/arm/mach-omap2/am33xx/Kconfig b/arch/arm/mach-omap2/am33xx/Kconfig
index 76da6d9..3529607 100644
--- a/arch/arm/mach-omap2/am33xx/Kconfig
+++ b/arch/arm/mach-omap2/am33xx/Kconfig
@@ -31,9 +31,12 @@
bool "Support am335x_evm"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select TI_I2C_BOARD_DETECT
+ imply CMD_DM
+ imply SPL_DM
+ imply SPL_DM_SEQ_ALIAS
imply SPL_ENV_SUPPORT
imply SPL_EXT_SUPPORT
imply SPL_FAT_SUPPORT
@@ -44,15 +47,13 @@
imply SPL_LIBGENERIC_SUPPORT
imply SPL_MMC_SUPPORT
imply SPL_NAND_SUPPORT
+ imply SPL_OF_LIBFDT
imply SPL_POWER_SUPPORT
+ imply SPL_SEPARATE_BSS
imply SPL_SERIAL_SUPPORT
+ imply SPL_SYS_MALLOC_SIMPLE
imply SPL_WATCHDOG_SUPPORT
imply SPL_YMODEM_SUPPORT
- imply SPL_SYS_MALLOC_SIMPLE
- imply SPL_SEPARATE_BSS
- imply SPL_DM
- imply SPL_DM_SEQ_ALIAS
- imply SPL_OF_LIBFDT
help
This option specifies support for the AM335x
GP and HS EVM development platforms. The AM335x
@@ -65,36 +66,41 @@
bool "Support am335x_baltos"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_AM335X_IGEP003X
bool "Support am335x_igep003x"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_AM335X_SHC
bool "Support am335x based shc board from bosch"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
imply CMD_SPL
config TARGET_AM335X_SL50
bool "Support am335x_sl50"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_BAV335X
bool "Support bav335x"
select BOARD_LATE_INIT
select DM
select DM_SERIAL
+ imply CMD_DM
help
The BAV335x OEM Network Processor integrates all the functions of an
embedded network computer in a small, easy to use SODIMM module which
@@ -118,77 +124,89 @@
select BOARD_LATE_INIT
select DM
select DM_SERIAL
+ imply CMD_DM
config TARGET_CM_T335
bool "Support cm_t335"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_DRACO
bool "Support draco"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_ETAMIN
bool "Support etamin"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_PCM051
bool "Support pcm051"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_PENGWYN
bool "Support pengwyn"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_PEPPER
bool "Support pepper"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_PXM2
bool "Support pxm2"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_RASTABAN
bool "Support rastaban"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_RUT
bool "Support rut"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_THUBAN
bool "Support thuban"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_PDU001
bool "Support PDU001"
select DM
select DM_SERIAL
+ imply CMD_DM
help
Support for PDU001 platform developed by EETS GmbH.
The PDU001 is a processor and display unit developed around
@@ -258,6 +276,8 @@
if AM43XX || AM33XX
config ISW_ENTRY_ADDR
hex "Address in memory or XIP flash of bootloader entry point"
+ default 0x402F4000 if AM43XX
+ default 0x402F0400 if AM33XX
help
After any reset, the boot ROM on the AM43XX SOC
searches the boot media for a valid boot image.
@@ -268,11 +288,10 @@
point address depending on the device type
(secure/non-secure), boot media (xip/non-xip) and
image headers.
- default 0x402F4000 if AM43XX
- default 0x402F0400 if AM33XX
config PUB_ROM_DATA_SIZE
hex "Size in bytes of the L3 SRAM reserved by ROM to store data"
+ default 0x8400
help
During the device boot, the public ROM uses the top of
the public L3 OCMC RAM to store r/w data like stack,
@@ -283,5 +302,4 @@
boot image. Once the ROM transfers control to the boot
image, this area is no longer used, and can be reclaimed
for run time use by the boot image.
- default 0x8400
endif
diff --git a/arch/arm/mach-omap2/omap3/Kconfig b/arch/arm/mach-omap2/omap3/Kconfig
index 6d714f6..e0d02fb 100644
--- a/arch/arm/mach-omap2/omap3/Kconfig
+++ b/arch/arm/mach-omap2/omap3/Kconfig
@@ -23,10 +23,11 @@
config TARGET_AM3517_EVM
bool "AM3517 EVM"
select DM
- select DM_SERIAL
select DM_GPIO
select DM_I2C
select DM_MMC
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_MT_VENTOUX
bool "TeeJet Mt.Ventoux"
@@ -36,10 +37,11 @@
config TARGET_OMAP3_BEAGLE
bool "TI OMAP3 BeagleBoard"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OMAP3_GPIO_5
select OMAP3_GPIO_6
+ imply CMD_DM
config TARGET_CM_T35
bool "CompuLab CM-T3530 and CM-T3730 boards"
@@ -56,41 +58,46 @@
config TARGET_DEVKIT8000
bool "TimLL OMAP3 Devkit8000"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_OMAP3_EVM
bool "TI OMAP3 EVM"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OMAP3_GPIO_3
+ imply CMD_DM
config TARGET_OMAP3_IGEP00X0
bool "IGEP"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OMAP3_GPIO_3
select OMAP3_GPIO_5
select OMAP3_GPIO_6
+ imply CMD_DM
config TARGET_OMAP3_OVERO
bool "OMAP35xx Gumstix Overo"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OMAP3_GPIO_2
select OMAP3_GPIO_3
select OMAP3_GPIO_4
select OMAP3_GPIO_5
select OMAP3_GPIO_6
+ imply CMD_DM
config TARGET_OMAP3_ZOOM1
bool "TI Zoom1"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_AM3517_CRANE
bool "am3517_crane"
@@ -118,11 +125,12 @@
bool "OMAP3 Logic"
select BOARD_LATE_INIT
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OMAP3_GPIO_3
select OMAP3_GPIO_4
select OMAP3_GPIO_6
+ imply CMD_DM
config TARGET_NOKIA_RX51
bool "Nokia RX51"
@@ -143,19 +151,21 @@
config TARGET_OMAP3_CAIRO
bool "QUIPOS CAIRO"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
+ imply CMD_DM
config TARGET_SNIPER
bool "LG Optimus Black"
select DM
- select DM_SERIAL
select DM_GPIO
+ select DM_SERIAL
select OMAP3_GPIO_2
select OMAP3_GPIO_3
select OMAP3_GPIO_4
select OMAP3_GPIO_5
select OMAP3_GPIO_6
+ imply CMD_DM
endchoice
diff --git a/arch/arm/mach-omap2/omap5/Kconfig b/arch/arm/mach-omap2/omap5/Kconfig
index deb9873..f083a4a 100644
--- a/arch/arm/mach-omap2/omap5/Kconfig
+++ b/arch/arm/mach-omap2/omap5/Kconfig
@@ -23,26 +23,26 @@
bool "TI DRA7XX"
select BOARD_LATE_INIT
select DRA7XX
- select TI_I2C_BOARD_DETECT
select PHYS_64BIT
- imply SCSI
+ select TI_I2C_BOARD_DETECT
imply DM_PMIC
- imply PMIC_LP87565
imply DM_REGULATOR
imply DM_REGULATOR_LP87565
- imply SPL_THERMAL
imply DM_THERMAL
+ imply PMIC_LP87565
+ imply SCSI
+ imply SPL_THERMAL
imply TI_DRA7_THERMAL
config TARGET_AM57XX_EVM
bool "AM57XX"
select BOARD_LATE_INIT
+ select CMD_DDR3
select DRA7XX
select TI_I2C_BOARD_DETECT
- select CMD_DDR3
+ imply DM_THERMAL
imply SCSI
imply SPL_THERMAL
- imply DM_THERMAL
imply TI_DRA7_THERMAL
endchoice
diff --git a/arch/arm/mach-qemu/Kconfig b/arch/arm/mach-qemu/Kconfig
index 726f8a7..a2e4b98 100644
--- a/arch/arm/mach-qemu/Kconfig
+++ b/arch/arm/mach-qemu/Kconfig
@@ -14,8 +14,8 @@
config TARGET_QEMU_ARM_32BIT
bool "Support qemu_arm"
depends on ARCH_QEMU
- select CPU_V7A
select ARCH_SUPPORT_PSCI
+ select CPU_V7A
select SYS_ARCH_TIMER
config TARGET_QEMU_ARM_64BIT
diff --git a/arch/arm/mach-rmobile/Kconfig.32 b/arch/arm/mach-rmobile/Kconfig.32
index c0b5b24..bdca9bb 100644
--- a/arch/arm/mach-rmobile/Kconfig.32
+++ b/arch/arm/mach-rmobile/Kconfig.32
@@ -13,18 +13,22 @@
config R8A7790
bool "Renesas SoC R8A7790"
select RCAR_GEN2
+ select ARM_CORTEX_A15_CVE_2017_5715
config R8A7791
bool "Renesas SoC R8A7791"
select RCAR_GEN2
+ select ARM_CORTEX_A15_CVE_2017_5715
config R8A7792
bool "Renesas SoC R8A7792"
select RCAR_GEN2
+ select ARM_CORTEX_A15_CVE_2017_5715
config R8A7793
bool "Renesas SoC R8A7793"
select RCAR_GEN2
+ select ARM_CORTEX_A15_CVE_2017_5715
config R8A7794
bool "Renesas SoC R8A7794"
@@ -42,30 +46,34 @@
select DM
select DM_SERIAL
select USE_TINY_PRINTF
+ imply CMD_DM
config TARGET_GOSE
bool "Gose board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
config TARGET_KOELSCH
bool "Koelsch board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
config TARGET_LAGER
bool "Lager board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
config TARGET_KZM9G
bool "KZM9D board"
@@ -74,33 +82,37 @@
bool "Alt board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
config TARGET_SILK
bool "Silk board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
config TARGET_PORTER
bool "Porter board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
config TARGET_STOUT
bool "Stout board"
select DM
select DM_SERIAL
+ select SPL_TINY_MEMSET
select SUPPORT_SPL
select USE_TINY_PRINTF
- select SPL_TINY_MEMSET
+ imply CMD_DM
endchoice
diff --git a/arch/arm/mach-rockchip/rk3288/Kconfig b/arch/arm/mach-rockchip/rk3288/Kconfig
index 6beb26f..b5447e5 100644
--- a/arch/arm/mach-rockchip/rk3288/Kconfig
+++ b/arch/arm/mach-rockchip/rk3288/Kconfig
@@ -87,22 +87,22 @@
config TARGET_VYASA_RK3288
bool "Vyasa-RK3288"
select BOARD_LATE_INIT
- select TPL
+ select ROCKCHIP_BROM_HELPER
select SUPPORT_TPL
- select TPL_DM
- select TPL_REGMAP
- select TPL_SYSCON
- select TPL_CLK
- select TPL_RAM
- select TPL_OF_PLATDATA
- select TPL_OF_CONTROL
+ select TPL
select TPL_BOOTROM_SUPPORT
- select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL
- select ROCKCHIP_BROM_HELPER
+ select TPL_CLK
+ select TPL_DM
select TPL_DRIVERS_MISC_SUPPORT
select TPL_LIBCOMMON_SUPPORT
select TPL_LIBGENERIC_SUPPORT
+ select TPL_NEEDS_SEPARATE_TEXT_BASE if SPL
+ select TPL_OF_CONTROL
+ select TPL_OF_PLATDATA
+ select TPL_RAM
+ select TPL_REGMAP
select TPL_SERIAL_SUPPORT
+ select TPL_SYSCON
help
Vyasa is a RK3288-based development board with 2 USB ports,
HDMI, VGA, micro-SD card, audio, WiFi and Gigabit Ethernet, It
diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
index 91ea742..5c1df2c 100644
--- a/arch/arm/mach-socfpga/Kconfig
+++ b/arch/arm/mach-socfpga/Kconfig
@@ -9,8 +9,8 @@
config TARGET_SOCFPGA_ARRIA10
bool
- select SPL_BOARD_INIT if SPL
select ALTERA_SDRAM
+ select SPL_BOARD_INIT if SPL
config TARGET_SOCFPGA_CYCLONE5
bool
@@ -23,8 +23,8 @@
config TARGET_SOCFPGA_STRATIX10
bool
select ARMV8_MULTIENTRY
- select ARMV8_SPIN_TABLE
select ARMV8_SET_SMPEN
+ select ARMV8_SPIN_TABLE
choice
prompt "Altera SOCFPGA board select"
diff --git a/arch/arm/mach-socfpga/board.c b/arch/arm/mach-socfpga/board.c
index 26d84be..e8c7503 100644
--- a/arch/arm/mach-socfpga/board.c
+++ b/arch/arm/mach-socfpga/board.c
@@ -21,12 +21,14 @@
void s_init(void) {
#ifndef CONFIG_ARM64
/*
- * Preconfigure ACTLR, make sure Write Full Line of Zeroes is disabled.
+ * Preconfigure ACTLR and CPACR, make sure Write Full Line of Zeroes
+ * is disabled in ACTLR.
* This is optional on CycloneV / ArriaV.
* This is mandatory on Arria10, otherwise Linux refuses to boot.
*/
asm volatile(
"mcr p15, 0, %0, c1, c0, 1\n"
+ "mcr p15, 0, %0, c1, c0, 2\n"
"isb\n"
"dsb\n"
::"r"(0x0));
diff --git a/arch/arm/mach-socfpga/misc_arria10.c b/arch/arm/mach-socfpga/misc_arria10.c
index a75cbc4..80bf2f0 100644
--- a/arch/arm/mach-socfpga/misc_arria10.c
+++ b/arch/arm/mach-socfpga/misc_arria10.c
@@ -93,6 +93,19 @@
/* Put OCRAM in non-secure */
writel(0x003f0000, &noc_fw_ocram_base->region0);
writel(0x1, &noc_fw_ocram_base->enable);
+
+ /* Put DDR in non-secure */
+ writel(0xffff0000, SOCFPGA_SDR_FIREWALL_L3_ADDRESS + 0xc);
+ writel(0x1, SOCFPGA_SDR_FIREWALL_L3_ADDRESS);
+
+ /* Enable priviledged and non-priviledged access to L4 peripherals */
+ writel(~0, SOCFPGA_NOC_L4_PRIV_FLT_OFST);
+
+ /* Enable secure and non-secure transactions to bridges */
+ writel(~0, SOCFPGA_NOC_FW_H2F_SCR_OFST);
+ writel(~0, SOCFPGA_NOC_FW_H2F_SCR_OFST + 4);
+
+ writel(0x0007FFFF, &sysmgr_regs->ecc_intmask_set);
}
int arch_early_init_r(void)
diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
index a45f3fd..cea5ee2 100644
--- a/arch/arm/mach-stm32/Kconfig
+++ b/arch/arm/mach-stm32/Kconfig
@@ -9,9 +9,9 @@
select PINCTRL
select PINCTRL_STM32
select RAM
- select STM32_SDRAM
select STM32_RCC
select STM32_RESET
+ select STM32_SDRAM
select STM32_SERIAL
select STM32_TIMER
select TIMER
@@ -25,13 +25,6 @@
select PINCTRL
select PINCTRL_STM32
select RAM
- select STM32_SDRAM
- select STM32_RCC
- select STM32_RESET
- select STM32_SERIAL
- select STM32_TIMER
- select TIMER
- select SUPPORT_SPL
select SPL
select SPL_BOARD_INIT
select SPL_CLK
@@ -46,13 +39,20 @@
select SPL_OF_CONTROL
select SPL_OF_LIBFDT
select SPL_OF_TRANSLATE
- imply SPL_OS_BOOT
select SPL_PINCTRL
select SPL_RAM
select SPL_SERIAL_SUPPORT
select SPL_SYS_MALLOC_SIMPLE
select SPL_TIMER
select SPL_XIP_SUPPORT
+ select STM32_RCC
+ select STM32_RESET
+ select STM32_SDRAM
+ select STM32_SERIAL
+ select STM32_TIMER
+ select SUPPORT_SPL
+ select TIMER
+ imply SPL_OS_BOOT
config STM32H7
bool "stm32h7 family"
@@ -64,9 +64,9 @@
select PINCTRL_STM32
select RAM
select REGMAP
- select STM32_SDRAM
select STM32_RCC
select STM32_RESET
+ select STM32_SDRAM
select STM32_SERIAL
select STM32_TIMER
select SYSCON
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
index 0fb0c63..86b1cd1 100644
--- a/arch/arm/mach-tegra/Kconfig
+++ b/arch/arm/mach-tegra/Kconfig
@@ -22,6 +22,8 @@
config TEGRA_COMMON
bool "Tegra common options"
+ select BINMAN
+ select BOARD_EARLY_INIT_F
select CLK
select DM
select DM_ETH
@@ -35,11 +37,10 @@
select DM_SPI
select DM_SPI_FLASH
select MISC
- select SPI
select OF_CONTROL
+ select SPI
select VIDCONSOLE_AS_LCD if DM_VIDEO
- select BOARD_EARLY_INIT_F
- select BINMAN
+ imply CMD_DM
imply CRC32_VERIFY
config TEGRA_NO_BPMP
@@ -98,8 +99,8 @@
config TEGRA210
bool "Tegra210 family"
- select TEGRA_GPIO
select TEGRA_ARMV8_COMMON
+ select TEGRA_GPIO
select TEGRA_NO_BPMP
config TEGRA186
diff --git a/arch/arm/mach-tegra/board2.c b/arch/arm/mach-tegra/board2.c
index 25da771..5ecadf7 100644
--- a/arch/arm/mach-tegra/board2.c
+++ b/arch/arm/mach-tegra/board2.c
@@ -249,6 +249,10 @@
{
#ifdef CONFIG_ARM64
return SZ_512M;
+#elif defined(CONFIG_ARMV7_SECURE_RESERVE_SIZE)
+ // BASE+SIZE might not == 4GB. If so, we want the carveout to cover
+ // from BASE to 4GB, not BASE to BASE+SIZE.
+ return (0 - CONFIG_ARMV7_SECURE_BASE);
#else
return 0;
#endif
diff --git a/arch/arm/mach-tegra/powergate.c b/arch/arm/mach-tegra/powergate.c
index d32d559..e45f096 100644
--- a/arch/arm/mach-tegra/powergate.c
+++ b/arch/arm/mach-tegra/powergate.c
@@ -8,7 +8,7 @@
#include <asm/io.h>
#include <asm/types.h>
-#include <asm/arch/flow.h>
+
#include <asm/arch/powergate.h>
#include <asm/arch/tegra.h>
@@ -74,29 +74,11 @@
return 0;
}
-static void tegra_powergate_ram_repair(void)
-{
-#ifdef CONFIG_TEGRA124
- struct flow_ctlr *flow = (struct flow_ctlr *)NV_PA_FLOW_BASE;
-
- /* Request RAM repair for cluster 0 and wait until complete */
- setbits_le32(&flow->ram_repair, RAM_REPAIR_REQ);
- while (!(readl(&flow->ram_repair) & RAM_REPAIR_STS))
- ;
-
- /* Same for cluster 1 */
- setbits_le32(&flow->ram_repair_cluster1, RAM_REPAIR_REQ);
- while (!(readl(&flow->ram_repair_cluster1) & RAM_REPAIR_STS))
- ;
-#endif
-}
-
int tegra_powergate_sequence_power_up(enum tegra_powergate id,
enum periph_id periph)
{
int err;
- tegra_powergate_ram_repair();
reset_set_enable(periph, 1);
err = tegra_powergate_power_on(id);
diff --git a/arch/arm/mach-tegra/tegra124/Kconfig b/arch/arm/mach-tegra/tegra124/Kconfig
index a07add6..6fa31ea 100644
--- a/arch/arm/mach-tegra/tegra124/Kconfig
+++ b/arch/arm/mach-tegra/tegra124/Kconfig
@@ -6,16 +6,16 @@
config TARGET_APALIS_TK1
bool "Toradex Apalis TK1 module"
+ select ARCH_SUPPORT_PSCI
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
- select ARCH_SUPPORT_PSCI
config TARGET_JETSON_TK1
bool "NVIDIA Tegra124 Jetson TK1 board"
+ select ARCH_SUPPORT_PSCI
select BOARD_LATE_INIT
select CPU_V7_HAS_NONSEC
select CPU_V7_HAS_VIRT
- select ARCH_SUPPORT_PSCI
config TARGET_CEI_TK1_SOM
bool "Colorado Engineering Inc Tegra124 TK1-som board"
diff --git a/arch/arm/mach-tegra/tegra124/cpu.c b/arch/arm/mach-tegra/tegra124/cpu.c
index 204d6e9..992c0be 100644
--- a/arch/arm/mach-tegra/tegra124/cpu.c
+++ b/arch/arm/mach-tegra/tegra124/cpu.c
@@ -104,6 +104,43 @@
writel(reg, &clkrst->crc_rst_cpug_cmplx_clr);
}
+static void tegra124_ram_repair(void)
+{
+ struct flow_ctlr *flow = (struct flow_ctlr *)NV_PA_FLOW_BASE;
+ u32 ram_repair_timeout; /*usec*/
+ u32 val;
+
+ /*
+ * Request the Flow Controller perform RAM repair whenever it turns on
+ * a power rail that requires RAM repair.
+ */
+ clrbits_le32(&flow->ram_repair, RAM_REPAIR_BYPASS_EN);
+
+ /* Request SW trigerred RAM repair by setting req bit */
+ /* cluster 0 */
+ setbits_le32(&flow->ram_repair, RAM_REPAIR_REQ);
+ /* Wait for completion (status == 0) */
+ ram_repair_timeout = 500;
+ do {
+ udelay(1);
+ val = readl(&flow->ram_repair);
+ } while (!(val & RAM_REPAIR_STS) && ram_repair_timeout--);
+ if (!ram_repair_timeout)
+ debug("Ram Repair cluster0 failed\n");
+
+ /* cluster 1 */
+ setbits_le32(&flow->ram_repair_cluster1, RAM_REPAIR_REQ);
+ /* Wait for completion (status == 0) */
+ ram_repair_timeout = 500;
+ do {
+ udelay(1);
+ val = readl(&flow->ram_repair_cluster1);
+ } while (!(val & RAM_REPAIR_STS) && ram_repair_timeout--);
+
+ if (!ram_repair_timeout)
+ debug("Ram Repair cluster1 failed\n");
+}
+
/**
* Tegra124 requires some special clock initialization, including setting up
* the DVC I2C, turning on MSELECT and selecting the G CPU cluster
@@ -254,10 +291,11 @@
&pmc->pmc_pwrgate_timer_mult);
enable_cpu_power_rail();
+ powerup_cpus();
+ tegra124_ram_repair();
enable_cpu_clocks();
clock_enable_coresight(1);
- remove_cpu_resets();
writel(reset_vector, EXCEP_VECTOR_CPU_RESET_VECTOR);
- powerup_cpus();
+ remove_cpu_resets();
debug("%s exit, should continue @ reset_vector\n", __func__);
}
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig
index 91bea77..bfb445a 100644
--- a/arch/arm/mach-uniphier/Kconfig
+++ b/arch/arm/mach-uniphier/Kconfig
@@ -5,10 +5,10 @@
config ARCH_UNIPHIER_32BIT
bool
+ select ARCH_SUPPORT_PSCI
+ select ARMV7_NONSEC
select CPU_V7A
select CPU_V7_HAS_NONSEC
- select ARMV7_NONSEC
- select ARCH_SUPPORT_PSCI
choice
prompt "UniPhier SoC select"
@@ -68,8 +68,8 @@
config ARCH_UNIPHIER_LD20
bool "Enable UniPhier LD20 SoC support"
depends on ARCH_UNIPHIER_V8_MULTI
- select OF_BOARD_SETUP
default y
+ select OF_BOARD_SETUP
config ARCH_UNIPHIER_PXS3
bool "Enable UniPhier PXs3 SoC support"
@@ -79,8 +79,8 @@
config CACHE_UNIPHIER
bool "Enable the UniPhier L2 cache controller"
depends on ARCH_UNIPHIER_32BIT
- select SYS_CACHE_SHIFT_7
default y
+ select SYS_CACHE_SHIFT_7
help
This option allows to use the UniPhier System Cache as L2 cache.
diff --git a/arch/arm/mach-uniphier/Makefile b/arch/arm/mach-uniphier/Makefile
index 269c51b..d0c39d42 100644
--- a/arch/arm/mach-uniphier/Makefile
+++ b/arch/arm/mach-uniphier/Makefile
@@ -21,6 +21,7 @@
obj-$(CONFIG_MICRO_SUPPORT_CARD) += sbc/ micro-support-card.o
obj-y += pinctrl-glue.o
obj-$(CONFIG_MMC) += mmc-first-dev.o
+obj-y += fdt-fixup.o
endif
diff --git a/arch/arm/mach-uniphier/board_late_init.c b/arch/arm/mach-uniphier/board_late_init.c
index 6a99572..8ffb9a8 100644
--- a/arch/arm/mach-uniphier/board_late_init.c
+++ b/arch/arm/mach-uniphier/board_late_init.c
@@ -66,20 +66,20 @@
switch (uniphier_boot_device_raw()) {
case BOOT_DEVICE_MMC1:
printf("eMMC Boot");
- env_set("bootmode", "emmcboot");
+ env_set("bootcmd", "run bootcmd_mmc0; run distro_bootcmd");
break;
case BOOT_DEVICE_NAND:
printf("NAND Boot");
- env_set("bootmode", "nandboot");
+ env_set("bootcmd", "run bootcmd_ubifs0; run distro_bootcmd");
nand_denali_wp_disable();
break;
case BOOT_DEVICE_NOR:
printf("NOR Boot");
- env_set("bootmode", "norboot");
+ env_set("bootcmd", "run tftpboot; run distro_bootcmd");
break;
case BOOT_DEVICE_USB:
printf("USB Boot");
- env_set("bootmode", "usbboot");
+ env_set("bootcmd", "run bootcmd_usb0; run distro_bootcmd");
break;
default:
printf("Unknown");
diff --git a/arch/arm/mach-uniphier/dram_init.c b/arch/arm/mach-uniphier/dram_init.c
index 2eb4836..7e7c1d9 100644
--- a/arch/arm/mach-uniphier/dram_init.c
+++ b/arch/arm/mach-uniphier/dram_init.c
@@ -6,8 +6,6 @@
*/
#include <common.h>
-#include <fdt_support.h>
-#include <fdtdec.h>
#include <linux/errno.h>
#include <linux/kernel.h>
#include <linux/printk.h>
@@ -264,36 +262,3 @@
return 0;
}
-
-#ifdef CONFIG_OF_BOARD_SETUP
-/*
- * The DRAM PHY requires 64 byte scratch area in each DRAM channel
- * for its dynamic PHY training feature.
- */
-int ft_board_setup(void *fdt, bd_t *bd)
-{
- unsigned long rsv_addr;
- const unsigned long rsv_size = 64;
- int i, ret;
-
- if (uniphier_get_soc_id() != UNIPHIER_LD20_ID)
- return 0;
-
- for (i = 0; i < ARRAY_SIZE(gd->bd->bi_dram); i++) {
- if (!gd->bd->bi_dram[i].size)
- continue;
-
- rsv_addr = gd->bd->bi_dram[i].start + gd->bd->bi_dram[i].size;
- rsv_addr -= rsv_size;
-
- ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size);
- if (ret)
- return -ENOSPC;
-
- pr_notice(" Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n",
- rsv_addr, rsv_size);
- }
-
- return 0;
-}
-#endif
diff --git a/arch/arm/mach-uniphier/fdt-fixup.c b/arch/arm/mach-uniphier/fdt-fixup.c
new file mode 100644
index 0000000..6f3c29d
--- /dev/null
+++ b/arch/arm/mach-uniphier/fdt-fixup.c
@@ -0,0 +1,64 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2016-2018 Socionext Inc.
+ * Author: Masahiro Yamada <yamada.masahiro@socionext.com>
+ */
+
+#include <common.h>
+#include <fdt_support.h>
+#include <fdtdec.h>
+#include <jffs2/load_kernel.h>
+#include <mtd_node.h>
+#include <linux/kernel.h>
+#include <linux/printk.h>
+
+#include "soc-info.h"
+
+/*
+ * The DRAM PHY requires 64 byte scratch area in each DRAM channel
+ * for its dynamic PHY training feature.
+ */
+static int uniphier_ld20_fdt_mem_rsv(void *fdt, bd_t *bd)
+{
+ unsigned long rsv_addr;
+ const unsigned long rsv_size = 64;
+ int i, ret;
+
+ if (!IS_ENABLED(CONFIG_ARCH_UNIPHIER_LD20) ||
+ uniphier_get_soc_id() != UNIPHIER_LD20_ID)
+ return 0;
+
+ for (i = 0; i < ARRAY_SIZE(bd->bi_dram); i++) {
+ if (!bd->bi_dram[i].size)
+ continue;
+
+ rsv_addr = bd->bi_dram[i].start + bd->bi_dram[i].size;
+ rsv_addr -= rsv_size;
+
+ ret = fdt_add_mem_rsv(fdt, rsv_addr, rsv_size);
+ if (ret)
+ return -ENOSPC;
+
+ pr_notice(" Reserved memory region for DRAM PHY training: addr=%lx size=%lx\n",
+ rsv_addr, rsv_size);
+ }
+
+ return 0;
+}
+
+int ft_board_setup(void *fdt, bd_t *bd)
+{
+ static const struct node_info nodes[] = {
+ { "socionext,uniphier-denali-nand-v5a", MTD_DEV_TYPE_NAND },
+ { "socionext,uniphier-denali-nand-v5b", MTD_DEV_TYPE_NAND },
+ };
+ int ret;
+
+ fdt_fixup_mtdparts(fdt, nodes, ARRAY_SIZE(nodes));
+
+ ret = uniphier_ld20_fdt_mem_rsv(fdt, bd);
+ if (ret)
+ return ret;
+
+ return 0;
+}
diff --git a/arch/microblaze/Kconfig b/arch/microblaze/Kconfig
index c564593..5cc68d6 100644
--- a/arch/microblaze/Kconfig
+++ b/arch/microblaze/Kconfig
@@ -11,11 +11,12 @@
config TARGET_MICROBLAZE_GENERIC
bool "Support microblaze-generic"
select BOARD_LATE_INIT
- select SUPPORT_SPL
- select OF_CONTROL
select DM
select DM_SERIAL
+ select OF_CONTROL
+ select SUPPORT_SPL
select SYSRESET
+ imply CMD_DM
endchoice
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index d07b92d..31b622f 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -14,13 +14,13 @@
config TARGET_QEMU_MIPS
bool "Support qemu-mips"
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
- select SUPPORTS_LITTLE_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
select SUPPORTS_CPU_MIPS64_R1
select SUPPORTS_CPU_MIPS64_R2
- select ROM_EXCEPTION_VECTORS
+ select SUPPORTS_LITTLE_ENDIAN
config TARGET_MALTA
bool "Support malta"
@@ -28,98 +28,104 @@
select DM_SERIAL
select DYNAMIC_IO_PORT_BASE
select MIPS_CM
+ select MIPS_L1_CACHE_SHIFT_6
select MIPS_L2_CACHE
select OF_CONTROL
select OF_ISA_BUS
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
- select SUPPORTS_LITTLE_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
select SUPPORTS_CPU_MIPS32_R6
select SUPPORTS_CPU_MIPS64_R1
select SUPPORTS_CPU_MIPS64_R2
select SUPPORTS_CPU_MIPS64_R6
+ select SUPPORTS_LITTLE_ENDIAN
select SWAP_IO_SPACE
- select MIPS_L1_CACHE_SHIFT_6
- select ROM_EXCEPTION_VECTORS
+ imply CMD_DM
config TARGET_VCT
bool "Support vct"
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
select SYS_MIPS_CACHE_INIT_RAM_LOAD
- select ROM_EXCEPTION_VECTORS
config TARGET_DBAU1X00
bool "Support dbau1x00"
+ select MIPS_TUNE_4KC
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
- select SUPPORTS_LITTLE_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
+ select SUPPORTS_LITTLE_ENDIAN
select SYS_MIPS_CACHE_INIT_RAM_LOAD
- select ROM_EXCEPTION_VECTORS
- select MIPS_TUNE_4KC
config TARGET_PB1X00
bool "Support pb1x00"
- select SUPPORTS_LITTLE_ENDIAN
+ select MIPS_TUNE_4KC
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
+ select SUPPORTS_LITTLE_ENDIAN
select SYS_MIPS_CACHE_INIT_RAM_LOAD
- select ROM_EXCEPTION_VECTORS
- select MIPS_TUNE_4KC
config ARCH_ATH79
bool "Support QCA/Atheros ath79"
- select OF_CONTROL
select DM
+ select OF_CONTROL
+ imply CMD_DM
config ARCH_BMIPS
bool "Support BMIPS SoCs"
- select OF_CONTROL
- select DM
select CLK
select CPU
+ select DM
+ select OF_CONTROL
select RAM
select SYSRESET
+ imply CMD_DM
config MACH_PIC32
bool "Support Microchip PIC32"
- select OF_CONTROL
select DM
+ select OF_CONTROL
+ imply CMD_DM
config TARGET_BOSTON
bool "Support Boston"
select DM
select DM_SERIAL
- select OF_CONTROL
select MIPS_CM
select MIPS_L1_CACHE_SHIFT_6
select MIPS_L2_CACHE
select OF_BOARD_SETUP
+ select OF_CONTROL
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
- select SUPPORTS_LITTLE_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
select SUPPORTS_CPU_MIPS32_R6
select SUPPORTS_CPU_MIPS64_R1
select SUPPORTS_CPU_MIPS64_R2
select SUPPORTS_CPU_MIPS64_R6
- select ROM_EXCEPTION_VECTORS
+ select SUPPORTS_LITTLE_ENDIAN
+ imply CMD_DM
config TARGET_XILFPGA
bool "Support Imagination Xilfpga"
- select OF_CONTROL
select DM
- select DM_SERIAL
- select DM_GPIO
select DM_ETH
- select SUPPORTS_LITTLE_ENDIAN
- select SUPPORTS_CPU_MIPS32_R1
- select SUPPORTS_CPU_MIPS32_R2
+ select DM_GPIO
+ select DM_SERIAL
select MIPS_L1_CACHE_SHIFT_4
+ select OF_CONTROL
select ROM_EXCEPTION_VECTORS
+ select SUPPORTS_CPU_MIPS32_R1
+ select SUPPORTS_CPU_MIPS32_R2
+ select SUPPORTS_LITTLE_ENDIAN
+ imply CMD_DM
help
This supports IMGTEC MIPSfpga platform
diff --git a/arch/mips/mach-ath79/Kconfig b/arch/mips/mach-ath79/Kconfig
index d982b0f..bc86f59 100644
--- a/arch/mips/mach-ath79/Kconfig
+++ b/arch/mips/mach-ath79/Kconfig
@@ -6,30 +6,30 @@
config SOC_AR933X
bool
+ select MIPS_TUNE_24KC
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
- select ROM_EXCEPTION_VECTORS
- select MIPS_TUNE_24KC
help
This supports QCA/Atheros ar933x family SOCs.
config SOC_AR934X
bool
+ select MIPS_TUNE_74KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
- select MIPS_TUNE_74KC
help
This supports QCA/Atheros ar934x family SOCs.
config SOC_QCA953X
bool
+ select MIPS_TUNE_24KC
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
- select ROM_EXCEPTION_VECTORS
- select MIPS_TUNE_24KC
help
This supports QCA/Atheros qca953x family SOCs.
diff --git a/arch/mips/mach-bmips/Kconfig b/arch/mips/mach-bmips/Kconfig
index 10900bf..5968d53 100644
--- a/arch/mips/mach-bmips/Kconfig
+++ b/arch/mips/mach-bmips/Kconfig
@@ -20,10 +20,10 @@
config SOC_BMIPS_BCM3380
bool "BMIPS BCM3380 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_WATCHDOG
help
@@ -31,10 +31,10 @@
config SOC_BMIPS_BCM6318
bool "BMIPS BCM6318 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
@@ -42,10 +42,10 @@
config SOC_BMIPS_BCM6328
bool "BMIPS BCM6328 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
@@ -53,10 +53,10 @@
config SOC_BMIPS_BCM6338
bool "BMIPS BCM6338 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
@@ -64,10 +64,10 @@
config SOC_BMIPS_BCM6348
bool "BMIPS BCM6348 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_WATCHDOG
help
@@ -75,10 +75,10 @@
config SOC_BMIPS_BCM6358
bool "BMIPS BCM6358 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
@@ -86,10 +86,10 @@
config SOC_BMIPS_BCM6368
bool "BMIPS BCM6368 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
@@ -97,10 +97,10 @@
config SOC_BMIPS_BCM6362
bool "BMIPS BCM6362 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
@@ -108,10 +108,10 @@
config SOC_BMIPS_BCM63268
bool "BMIPS BCM63268 family"
+ select MIPS_L1_CACHE_SHIFT_4
+ select MIPS_TUNE_4KC
select SUPPORTS_BIG_ENDIAN
select SUPPORTS_CPU_MIPS32_R1
- select MIPS_TUNE_4KC
- select MIPS_L1_CACHE_SHIFT_4
select SWAP_IO_SPACE
select SYSRESET_SYSCON
help
diff --git a/arch/mips/mach-pic32/Kconfig b/arch/mips/mach-pic32/Kconfig
index 8fad4cf..5f13bf1 100644
--- a/arch/mips/mach-pic32/Kconfig
+++ b/arch/mips/mach-pic32/Kconfig
@@ -9,12 +9,12 @@
config SOC_PIC32MZDA
bool "Microchip PIC32MZ[DA] family"
- select SUPPORTS_LITTLE_ENDIAN
+ select MIPS_L1_CACHE_SHIFT_4
+ select ROM_EXCEPTION_VECTORS
select SUPPORTS_CPU_MIPS32_R1
select SUPPORTS_CPU_MIPS32_R2
- select MIPS_L1_CACHE_SHIFT_4
+ select SUPPORTS_LITTLE_ENDIAN
select SYS_MIPS_CACHE_INIT_RAM_LOAD
- select ROM_EXCEPTION_VECTORS
help
This supports Microchip PIC32MZ[DA] family of microcontrollers.
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 13a7956..8faef0b 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -20,9 +20,9 @@
select CREATE_ARCH_SYMLINK
select SYS_FSL_DDR
select SYS_FSL_DDR_BE
- imply USB_EHCI_HCD if USB
imply CMD_HASH
imply CMD_IRQ
+ imply USB_EHCI_HCD if USB
config MPC86xx
bool "MPC86xx"
diff --git a/arch/powerpc/cpu/mpc83xx/Kconfig b/arch/powerpc/cpu/mpc83xx/Kconfig
index 05d29d2..571cf8f 100644
--- a/arch/powerpc/cpu/mpc83xx/Kconfig
+++ b/arch/powerpc/cpu/mpc83xx/Kconfig
@@ -26,8 +26,8 @@
config TARGET_MPC8313ERDB
bool "Support MPC8313ERDB"
- select SUPPORT_SPL
select BOARD_EARLY_INIT_F
+ select SUPPORT_SPL
config TARGET_MPC8315ERDB
bool "Support MPC8315ERDB"
@@ -42,10 +42,10 @@
config TARGET_MPC8349EMDS
bool "Support MPC8349EMDS"
+ select BOARD_EARLY_INIT_F
select SYS_FSL_DDR
- select SYS_FSL_HAS_DDR2
select SYS_FSL_DDR_BE
- select BOARD_EARLY_INIT_F
+ select SYS_FSL_HAS_DDR2
config TARGET_MPC8349ITX
bool "Support MPC8349ITX"
@@ -64,6 +64,7 @@
config TARGET_IDS8313
bool "Support ids8313"
select DM
+ imply CMD_DM
config TARGET_KM8360
bool "Support km8360"
diff --git a/arch/sandbox/cpu/eth-raw-os.c b/arch/sandbox/cpu/eth-raw-os.c
index e054a07..75bfaa4 100644
--- a/arch/sandbox/cpu/eth-raw-os.c
+++ b/arch/sandbox/cpu/eth-raw-os.c
@@ -1,9 +1,7 @@
// SPDX-License-Identifier: GPL-2.0
/*
- * Copyright (c) 2015 National Instruments
- *
- * (C) Copyright 2015
- * Joe Hershberger <joe.hershberger@ni.com>
+ * Copyright (c) 2015-2018 National Instruments
+ * Copyright (c) 2015-2018 Joe Hershberger <joe.hershberger@ni.com>
*/
#include <asm/eth-raw-os.h>
@@ -25,8 +23,46 @@
#include <linux/if_ether.h>
#include <linux/if_packet.h>
-static int _raw_packet_start(const char *ifname, unsigned char *ethmac,
- struct eth_sandbox_raw_priv *priv)
+struct sandbox_eth_raw_if_nameindex *sandbox_eth_raw_if_nameindex(void)
+{
+ return (struct sandbox_eth_raw_if_nameindex *)if_nameindex();
+}
+
+void sandbox_eth_raw_if_freenameindex(struct sandbox_eth_raw_if_nameindex *ptr)
+{
+ if_freenameindex((struct if_nameindex *)ptr);
+}
+
+int sandbox_eth_raw_os_is_local(const char *ifname)
+{
+ int fd = socket(AF_INET, SOCK_DGRAM, 0);
+ struct ifreq ifr;
+ int ret = 0;
+
+ if (fd < 0)
+ return -errno;
+ memset(&ifr, 0, sizeof(ifr));
+ strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+ ret = ioctl(fd, SIOCGIFFLAGS, &ifr);
+ if (ret < 0) {
+ ret = -errno;
+ goto out;
+ }
+ ret = !!(ifr.ifr_flags & IFF_LOOPBACK);
+out:
+ close(fd);
+ return ret;
+}
+
+int sandbox_eth_raw_os_idx_to_name(struct eth_sandbox_raw_priv *priv)
+{
+ if (!if_indextoname(priv->host_ifindex, priv->host_ifname))
+ return -errno;
+ return 0;
+}
+
+static int _raw_packet_start(struct eth_sandbox_raw_priv *priv,
+ unsigned char *ethmac)
{
struct sockaddr_ll *device;
struct packet_mreq mr;
@@ -34,12 +70,14 @@
int flags;
/* Prepare device struct */
+ priv->local_bind_sd = -1;
priv->device = malloc(sizeof(struct sockaddr_ll));
if (priv->device == NULL)
return -ENOMEM;
device = priv->device;
memset(device, 0, sizeof(struct sockaddr_ll));
- device->sll_ifindex = if_nametoindex(ifname);
+ device->sll_ifindex = if_nametoindex(priv->host_ifname);
+ priv->host_ifindex = device->sll_ifindex;
device->sll_family = AF_PACKET;
memcpy(device->sll_addr, ethmac, 6);
device->sll_halen = htons(6);
@@ -52,11 +90,11 @@
return -errno;
}
/* Bind to the specified interface */
- ret = setsockopt(priv->sd, SOL_SOCKET, SO_BINDTODEVICE, ifname,
- strlen(ifname) + 1);
+ ret = setsockopt(priv->sd, SOL_SOCKET, SO_BINDTODEVICE,
+ priv->host_ifname, strlen(priv->host_ifname) + 1);
if (ret < 0) {
- printf("Failed to bind to '%s': %d %s\n", ifname, errno,
- strerror(errno));
+ printf("Failed to bind to '%s': %d %s\n", priv->host_ifname,
+ errno, strerror(errno));
return -errno;
}
@@ -75,11 +113,12 @@
printf("Failed to set promiscuous mode: %d %s\n"
"Falling back to the old \"flags\" way...\n",
errno, strerror(errno));
- if (strlen(ifname) >= IFNAMSIZ) {
- printf("Interface name %s is too long.\n", ifname);
+ if (strlen(priv->host_ifname) >= IFNAMSIZ) {
+ printf("Interface name %s is too long.\n",
+ priv->host_ifname);
return -EINVAL;
}
- strncpy(ifr.ifr_name, ifname, IFNAMSIZ);
+ strncpy(ifr.ifr_name, priv->host_ifname, IFNAMSIZ);
if (ioctl(priv->sd, SIOCGIFFLAGS, &ifr) < 0) {
printf("Failed to read flags: %d %s\n", errno,
strerror(errno));
@@ -103,6 +142,8 @@
int one = 1;
/* Prepare device struct */
+ priv->local_bind_sd = -1;
+ priv->local_bind_udp_port = 0;
priv->device = malloc(sizeof(struct sockaddr_in));
if (priv->device == NULL)
return -ENOMEM;
@@ -136,18 +177,16 @@
strerror(errno));
return -errno;
}
- priv->local_bind_sd = -1;
- priv->local_bind_udp_port = 0;
return 0;
}
-int sandbox_eth_raw_os_start(const char *ifname, unsigned char *ethmac,
- struct eth_sandbox_raw_priv *priv)
+int sandbox_eth_raw_os_start(struct eth_sandbox_raw_priv *priv,
+ unsigned char *ethmac)
{
if (priv->local)
return _local_inet_start(priv);
else
- return _raw_packet_start(ifname, ethmac, priv);
+ return _raw_packet_start(priv, ethmac);
}
int sandbox_eth_raw_os_send(void *packet, int length,
@@ -156,7 +195,7 @@
int retval;
struct udphdr *udph = packet + sizeof(struct iphdr);
- if (!priv->sd || !priv->device)
+ if (priv->sd < 0 || !priv->device)
return -EINVAL;
/*
@@ -221,7 +260,7 @@
int retval;
int saddr_size;
- if (!priv->sd || !priv->device)
+ if (priv->sd < 0 || !priv->device)
return -EINVAL;
saddr_size = sizeof(struct sockaddr);
retval = recvfrom(priv->sd, packet, 1536, 0,
diff --git a/arch/sandbox/dts/sandbox.dts b/arch/sandbox/dts/sandbox.dts
index 0ea2452..9f444c9 100644
--- a/arch/sandbox/dts/sandbox.dts
+++ b/arch/sandbox/dts/sandbox.dts
@@ -8,7 +8,6 @@
model = "sandbox";
aliases {
- eth5 = "/eth@90000000";
i2c0 = &i2c_0;
pci0 = &pci;
rtc0 = &rtc_0;
@@ -47,24 +46,17 @@
};
};
+ ethrawbus {
+ compatible = "sandbox,eth-raw-bus";
+ skip-localhost = <0>;
+ };
+
eth@10002000 {
compatible = "sandbox,eth";
reg = <0x10002000 0x1000>;
fake-host-hwaddr = [00 00 66 44 22 00];
};
- eth@80000000 {
- compatible = "sandbox,eth-raw";
- reg = <0x80000000 0x1000>;
- host-raw-interface = "eth0";
- };
-
- eth@90000000 {
- compatible = "sandbox,eth-raw";
- reg = <0x90000000 0x1000>;
- host-raw-interface = "lo";
- };
-
gpio_a: gpios@0 {
gpio-controller;
compatible = "sandbox,gpio";
diff --git a/arch/sandbox/dts/sandbox64.dts b/arch/sandbox/dts/sandbox64.dts
index 48e420e..9e65d2f 100644
--- a/arch/sandbox/dts/sandbox64.dts
+++ b/arch/sandbox/dts/sandbox64.dts
@@ -8,7 +8,6 @@
model = "sandbox";
aliases {
- eth5 = "/eth@90000000";
i2c0 = &i2c_0;
pci0 = &pci;
rtc0 = &rtc_0;
@@ -47,24 +46,17 @@
};
};
+ ethrawbus {
+ compatible = "sandbox,eth-raw-bus";
+ skip-localhost = <1>;
+ };
+
eth@10002000 {
compatible = "sandbox,eth";
reg = <0x0 0x10002000 0x0 0x1000>;
fake-host-hwaddr = [00 00 66 44 22 00];
};
- eth@80000000 {
- compatible = "sandbox,eth-raw";
- reg = <0x0 0x80000000 0x0 0x1000>;
- host-raw-interface = "eth0";
- };
-
- eth@90000000 {
- compatible = "sandbox,eth-raw";
- reg = <0x0 0x90000000 0x0 0x1000>;
- host-raw-interface = "lo";
- };
-
gpio_a: gpios@0 {
gpio-controller;
compatible = "sandbox,gpio";
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 01e6bc0..137679a 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -155,25 +155,25 @@
eth@10002000 {
compatible = "sandbox,eth";
reg = <0x10002000 0x1000>;
- fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x00>;
+ fake-host-hwaddr = [00 00 66 44 22 00];
};
eth_5: eth@10003000 {
compatible = "sandbox,eth";
reg = <0x10003000 0x1000>;
- fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x11>;
+ fake-host-hwaddr = [00 00 66 44 22 11];
};
eth_3: sbe5 {
compatible = "sandbox,eth";
reg = <0x10005000 0x1000>;
- fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x33>;
+ fake-host-hwaddr = [00 00 66 44 22 33];
};
eth@10004000 {
compatible = "sandbox,eth";
reg = <0x10004000 0x1000>;
- fake-host-hwaddr = <0x00 0x00 0x66 0x44 0x22 0x22>;
+ fake-host-hwaddr = [00 00 66 44 22 22];
};
gpio_a: base-gpios {
diff --git a/arch/sandbox/include/asm/eth-raw-os.h b/arch/sandbox/include/asm/eth-raw-os.h
index f986d31..0b511db 100644
--- a/arch/sandbox/include/asm/eth-raw-os.h
+++ b/arch/sandbox/include/asm/eth-raw-os.h
@@ -9,10 +9,14 @@
#ifndef __ETH_RAW_OS_H
#define __ETH_RAW_OS_H
+#define IFNAMSIZ 16
+
/**
* struct eth_sandbox_raw_priv - raw socket session
*
* sd: socket descriptor - the open socket during a session
+ * host_ifname: interface name on the host to use for sending our packets
+ * host_ifindex: interface index number on the host
* device: struct sockaddr_ll - the host interface packets move to/from
* local: 1 or 0 to select the local interface ('lo') or not
* local_bindsd: socket descriptor to prevent the kernel from sending
@@ -22,14 +26,44 @@
*/
struct eth_sandbox_raw_priv {
int sd;
+ char host_ifname[IFNAMSIZ];
+ unsigned int host_ifindex;
void *device;
int local;
int local_bind_sd;
unsigned short local_bind_udp_port;
};
+/* A struct to mimic if_nameindex but that does not depend on Linux headers */
+struct sandbox_eth_raw_if_nameindex {
+ unsigned int if_index; /* Index of interface (1, 2, ...) */
+ char *if_name; /* Null-terminated name ("eth0", etc.) */
+};
+
+/* Enumerate host network interfaces */
+struct sandbox_eth_raw_if_nameindex *sandbox_eth_raw_if_nameindex(void);
+/* Free the data structure of enumerated network interfaces */
+void sandbox_eth_raw_if_freenameindex(struct sandbox_eth_raw_if_nameindex *ptr);
+
+/*
+ * Check if the interface named "ifname" is a localhost interface or not.
+ * ifname - the interface name on the host to check
+ *
+ * returns - 0 if real interface, 1 if local, negative if error
+ */
+int sandbox_eth_raw_os_is_local(const char *ifname);
+
+/*
+ * Look up the name of the interface based on the ifindex populated in priv.
+ *
+ * Overwrite the host_ifname member in priv based on looking up host_ifindex
+ *
+ * returns - 0 if success, negative if error
+ */
+int sandbox_eth_raw_os_idx_to_name(struct eth_sandbox_raw_priv *priv);
+
-int sandbox_eth_raw_os_start(const char *ifname, unsigned char *ethmac,
- struct eth_sandbox_raw_priv *priv);
+int sandbox_eth_raw_os_start(struct eth_sandbox_raw_priv *priv,
+ unsigned char *ethmac);
int sandbox_eth_raw_os_send(void *packet, int length,
struct eth_sandbox_raw_priv *priv);
int sandbox_eth_raw_os_recv(void *packet, int *length,
diff --git a/board/CarMediaLab/flea3/flea3.c b/board/CarMediaLab/flea3/flea3.c
index c0f33b8..9eec1b7 100644
--- a/board/CarMediaLab/flea3/flea3.c
+++ b/board/CarMediaLab/flea3/flea3.c
@@ -205,7 +205,7 @@
*/
int ft_board_setup(void *blob, bd_t *bd)
{
- struct node_info nodes[] = {
+ static const struct node_info nodes[] = {
{ "physmap-flash.0", MTD_DEV_TYPE_NOR, }, /* NOR flash */
{ "mxc_nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
};
diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c
index c114cdc..d42f57d 100644
--- a/board/compulab/cm_fx6/cm_fx6.c
+++ b/board/compulab/cm_fx6/cm_fx6.c
@@ -519,7 +519,7 @@
#ifdef CONFIG_OF_BOARD_SETUP
#define USDHC3_PATH "/soc/aips-bus@02100000/usdhc@02198000/"
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
/*
* Both entries target the same flash chip. The st,m25p compatible
* is used in the vendor device trees, while upstream uses (the
diff --git a/board/freescale/bsc9131rdb/bsc9131rdb.c b/board/freescale/bsc9131rdb/bsc9131rdb.c
index 367152f..9d9c83f 100644
--- a/board/freescale/bsc9131rdb/bsc9131rdb.c
+++ b/board/freescale/bsc9131rdb/bsc9131rdb.c
@@ -53,7 +53,7 @@
#if defined(CONFIG_OF_BOARD_SETUP)
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
{ "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
};
#endif
diff --git a/board/freescale/bsc9132qds/bsc9132qds.c b/board/freescale/bsc9132qds/bsc9132qds.c
index 6885668..36a5528 100644
--- a/board/freescale/bsc9132qds/bsc9132qds.c
+++ b/board/freescale/bsc9132qds/bsc9132qds.c
@@ -357,7 +357,7 @@
#if defined(CONFIG_OF_BOARD_SETUP)
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
-struct node_info nodes[] = {
+static const struct node_info nodes[] = {
{ "cfi-flash", MTD_DEV_TYPE_NOR, },
{ "fsl,ifc-nand", MTD_DEV_TYPE_NAND, },
};
diff --git a/board/freescale/ls1046ardb/ls1046ardb_qspi_pbi.cfg b/board/freescale/ls1046ardb/ls1046ardb_qspi_pbi.cfg
new file mode 100644
index 0000000..735d46c
--- /dev/null
+++ b/board/freescale/ls1046ardb/ls1046ardb_qspi_pbi.cfg
@@ -0,0 +1,26 @@
+#QSPI clk
+0957015c 40100000
+#Configure Scratch register
+09570600 00000000
+09570604 10000000
+#Disable CCI barrier tranaction
+09570178 0000e010
+09180000 00000008
+#USB PHY frequency sel
+09570418 0000009e
+0957041c 0000009e
+09570420 0000009e
+#Serdes SATA
+09eb1300 80104e20
+09eb08dc 00502880
+#PEX gen3 link
+09570158 00000300
+89400890 01048000
+89500890 01048000
+89600890 01048000
+#Alt base register
+09570158 00001000
+#flush PBI data
+096100c0 000fffff
+#Change endianness
+09550000 000f400c
diff --git a/board/freescale/ls1046ardb/ls1046ardb_rcw_qspi.cfg b/board/freescale/ls1046ardb/ls1046ardb_rcw_qspi.cfg
new file mode 100644
index 0000000..7b9be0a
--- /dev/null
+++ b/board/freescale/ls1046ardb/ls1046ardb_rcw_qspi.cfg
@@ -0,0 +1,7 @@
+#PBL preamble and RCW header
+aa55aa55 01ee0100
+# RCW
+0c150010 0e000000 00000000 00000000
+11335559 40005012 40025000 c1000000
+00000000 00000000 00000000 00238800
+20124000 00003101 00000096 00000001
diff --git a/board/freescale/ls2080ardb/ls2080ardb.c b/board/freescale/ls2080ardb/ls2080ardb.c
index 683fe44..46b18cf 100644
--- a/board/freescale/ls2080ardb/ls2080ardb.c
+++ b/board/freescale/ls2080ardb/ls2080ardb.c
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: GPL-2.0+
/*
- * Copyright (C) 2017 NXP Semiconductors
* Copyright 2015 Freescale Semiconductor
+ * Copyright 2017 NXP
*/
#include <common.h>
#include <malloc.h>
diff --git a/board/gateworks/gw_ventana/gw_ventana.c b/board/gateworks/gw_ventana/gw_ventana.c
index b86924e..c4ec974 100644
--- a/board/gateworks/gw_ventana/gw_ventana.c
+++ b/board/gateworks/gw_ventana/gw_ventana.c
@@ -1114,7 +1114,7 @@
{
struct ventana_board_info *info = &ventana_info;
struct ventana_eeprom_config *cfg;
- struct node_info nodes[] = {
+ static const struct node_info nodes[] = {
{ "sst,w25q256", MTD_DEV_TYPE_NOR, }, /* SPI flash */
{ "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
};
diff --git a/board/isee/igep003x/board.c b/board/isee/igep003x/board.c
index cc55bcc..965a009 100644
--- a/board/isee/igep003x/board.c
+++ b/board/isee/igep003x/board.c
@@ -211,7 +211,7 @@
int ft_board_setup(void *blob, bd_t *bd)
{
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
- static struct node_info nodes[] = {
+ static const struct node_info nodes[] = {
{ "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
};
diff --git a/board/isee/igep00x0/igep00x0.c b/board/isee/igep00x0/igep00x0.c
index 45a414c..367af82 100644
--- a/board/isee/igep00x0/igep00x0.c
+++ b/board/isee/igep00x0/igep00x0.c
@@ -157,7 +157,7 @@
int ft_board_setup(void *blob, bd_t *bd)
{
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
- static struct node_info nodes[] = {
+ static const struct node_info nodes[] = {
{ "ti,omap2-nand", MTD_DEV_TYPE_NAND, },
{ "ti,omap2-onenand", MTD_DEV_TYPE_ONENAND, },
};
diff --git a/board/logicpd/am3517evm/MAINTAINERS b/board/logicpd/am3517evm/MAINTAINERS
index 7f03ac1..198023f 100644
--- a/board/logicpd/am3517evm/MAINTAINERS
+++ b/board/logicpd/am3517evm/MAINTAINERS
@@ -1,5 +1,5 @@
AM3517EVM BOARD
-M: Vaibhav Hiremath <hvaibhav@ti.com>
+M: Adam Ford <aford173@gmail.com>
S: Maintained
F: board/logicpd/am3517evm/
F: include/configs/am3517_evm.h
diff --git a/board/toradex/colibri_imx7/colibri_imx7.c b/board/toradex/colibri_imx7/colibri_imx7.c
index f9f488d..2210095 100644
--- a/board/toradex/colibri_imx7/colibri_imx7.c
+++ b/board/toradex/colibri_imx7/colibri_imx7.c
@@ -389,7 +389,7 @@
int ft_board_setup(void *blob, bd_t *bd)
{
#if defined(CONFIG_FDT_FIXUP_PARTITIONS)
- static struct node_info nodes[] = {
+ static const struct node_info nodes[] = {
{ "fsl,imx7d-gpmi-nand", MTD_DEV_TYPE_NAND, }, /* NAND flash */
{ "fsl,imx6q-gpmi-nand", MTD_DEV_TYPE_NAND, },
};
diff --git a/board/toradex/colibri_vf/colibri_vf.c b/board/toradex/colibri_vf/colibri_vf.c
index 83c3503..4db1757 100644
--- a/board/toradex/colibri_vf/colibri_vf.c
+++ b/board/toradex/colibri_vf/colibri_vf.c
@@ -580,7 +580,7 @@
{
int ret = 0;
#ifdef CONFIG_FDT_FIXUP_PARTITIONS
- static struct node_info nodes[] = {
+ static const struct node_info nodes[] = {
{ "fsl,vf610-nfc", MTD_DEV_TYPE_NAND, }, /* NAND flash */
};
diff --git a/cmd/Kconfig b/cmd/Kconfig
index c5a7a3c..ef43ed8 100644
--- a/cmd/Kconfig
+++ b/cmd/Kconfig
@@ -152,8 +152,8 @@
config CMD_CONFIG
bool "config"
- select BUILD_BIN2C
default SANDBOX
+ select BUILD_BIN2C
help
Print ".config" contents.
@@ -429,8 +429,8 @@
config CMD_CRC32
bool "crc32"
- select HASH
default y
+ select HASH
help
Compute CRC32.
@@ -640,7 +640,6 @@
config CMD_DM
bool "dm - Access to driver model information"
depends on DM
- default y
help
Provides access to driver model data structures and information,
such as a list of devices, list of uclasses and the state of each
@@ -737,9 +736,9 @@
config CMD_GPT
bool "GPT (GUID Partition Table) command"
- select PARTITION_UUIDS
select EFI_PARTITION
select HAVE_BLOCK_DEVICE
+ select PARTITION_UUIDS
imply RANDOM_UUID
help
Enable the 'gpt' command to ready and write GPT style partition
@@ -899,8 +898,8 @@
config CMD_PART
bool "part"
- select PARTITION_UUIDS
select HAVE_BLOCK_DEVICE
+ select PARTITION_UUIDS
help
Read and display information about the partition table on
various media.
@@ -1012,11 +1011,12 @@
help
Enables the command "sdp" which is used to have U-Boot emulating the
Serial Download Protocol (SDP) via USB.
+
config CMD_ROCKUSB
bool "rockusb"
depends on USB_FUNCTION_ROCKUSB
help
- Rockusb protocol is widely used by Rockchip SoC based devices. It can
+ Rockusb protocol is widely used by Rockchip SoC based devices. It can
read/write info, image to/from devices. This enable rockusb command
support to communication with rockusb device. for more detail about
this command, please read doc/README.rockusb.
@@ -1489,7 +1489,7 @@
the original data.
Sub-commands:
- blob enc - encapsulating data as a cryptgraphic blob
+ blob enc - encapsulating data as a cryptgraphic blob
blob dec - decapsulating cryptgraphic blob to get the data
Syntax:
@@ -1544,6 +1544,7 @@
config CMD_TPM_V2
bool
+ select CMD_LOG
config CMD_TPM
bool "Enable the 'tpm' command"
@@ -1779,7 +1780,7 @@
config CMD_AVB
bool "avb - Android Verified Boot 2.0 operations"
- depends on LIBAVB
+ depends on AVB_VERIFY
default n
help
Enables a "avb" command to perform verification of partitions using
@@ -1797,10 +1798,10 @@
config CMD_UBI
tristate "Enable UBI - Unsorted block images commands"
+ default y if NAND_SUNXI
+ select CMD_MTDPARTS
select CRC32
select MTD_UBI
- select CMD_MTDPARTS
- default y if NAND_SUNXI
help
UBI is a software layer above MTD layer which admits use of LVM-like
logical volumes on top of MTD devices, hides some complexities of
@@ -1812,9 +1813,9 @@
config CMD_UBIFS
tristate "Enable UBIFS - Unsorted block images filesystem commands"
depends on CMD_UBI
+ default y if CMD_UBI
select CRC32
select LZO
- default y if CMD_UBI
help
UBIFS is a file system for flash devices which works on top of UBI.
diff --git a/cmd/mtdparts.c b/cmd/mtdparts.c
index c401009..0da3afd 100644
--- a/cmd/mtdparts.c
+++ b/cmd/mtdparts.c
@@ -690,7 +690,7 @@
part->auto_name = 0;
} else {
/* auto generated name in form of size@offset */
- sprintf(part->name, "0x%08llx@0x%08llx", size, offset);
+ snprintf(part->name, name_len, "0x%08llx@0x%08llx", size, offset);
part->auto_name = 1;
}
diff --git a/cmd/net.c b/cmd/net.c
index eca6dd8..89721b8 100644
--- a/cmd/net.c
+++ b/cmd/net.c
@@ -192,6 +192,9 @@
switch (argc) {
case 1:
+ /* refresh bootfile name from env */
+ copy_filename(net_boot_file_name, env_get("bootfile"),
+ sizeof(net_boot_file_name));
break;
case 2: /*
@@ -203,6 +206,9 @@
addr = simple_strtoul(argv[1], &end, 16);
if (end == (argv[1] + strlen(argv[1]))) {
load_addr = addr;
+ /* refresh bootfile name from env */
+ copy_filename(net_boot_file_name, env_get("bootfile"),
+ sizeof(net_boot_file_name));
} else {
net_boot_file_name_explicit = true;
copy_filename(net_boot_file_name, argv[1],
diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c
index 6cf9fcc..5644386 100644
--- a/cmd/tpm-common.c
+++ b/cmd/tpm-common.c
@@ -273,12 +273,34 @@
int do_tpm(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
cmd_tbl_t *tpm_commands, *cmd;
+ struct tpm_chip_priv *priv;
+ struct udevice *dev;
unsigned int size;
+ int ret;
if (argc < 2)
return CMD_RET_USAGE;
- tpm_commands = get_tpm_commands(&size);
+ ret = get_tpm(&dev);
+ if (ret)
+ return ret;
+
+ priv = dev_get_uclass_priv(dev);
+
+ /* Below getters return NULL if the desired stack is not built */
+ switch (priv->version) {
+ case TPM_V1:
+ tpm_commands = get_tpm1_commands(&size);
+ break;
+ case TPM_V2:
+ tpm_commands = get_tpm2_commands(&size);
+ break;
+ default:
+ tpm_commands = NULL;
+ }
+
+ if (!tpm_commands)
+ return CMD_RET_USAGE;
cmd = find_cmd_tbl(argv[1], tpm_commands, size);
if (!cmd)
diff --git a/cmd/tpm-v1.c b/cmd/tpm-v1.c
index 0874c4d..6987000 100644
--- a/cmd/tpm-v1.c
+++ b/cmd/tpm-v1.c
@@ -608,7 +608,7 @@
#endif /* CONFIG_TPM_LIST_RESOURCES */
};
-cmd_tbl_t *get_tpm_commands(unsigned int *size)
+cmd_tbl_t *get_tpm1_commands(unsigned int *size)
{
*size = ARRAY_SIZE(tpm1_commands);
diff --git a/cmd/tpm-v2.c b/cmd/tpm-v2.c
index 38add4f..ffbf35a 100644
--- a/cmd/tpm-v2.c
+++ b/cmd/tpm-v2.c
@@ -319,14 +319,14 @@
do_tpm_pcr_setauthvalue, "", ""),
};
-cmd_tbl_t *get_tpm_commands(unsigned int *size)
+cmd_tbl_t *get_tpm2_commands(unsigned int *size)
{
*size = ARRAY_SIZE(tpm2_commands);
return tpm2_commands;
}
-U_BOOT_CMD(tpm, CONFIG_SYS_MAXARGS, 1, do_tpm, "Issue a TPMv2.x command",
+U_BOOT_CMD(tpm2, CONFIG_SYS_MAXARGS, 1, do_tpm, "Issue a TPMv2.x command",
"<command> [<arguments>]\n"
"\n"
"info\n"
diff --git a/cmd/ubi.c b/cmd/ubi.c
index 0e935e3..913f0f7 100644
--- a/cmd/ubi.c
+++ b/cmd/ubi.c
@@ -356,7 +356,7 @@
size = vol->used_bytes;
}
- printf("Read %u bytes from volume %s to %p\n", size, volume, buf);
+ printf("Read %zu bytes from volume %s to %p\n", size, volume, buf);
if (vol->corrupted)
printf("read from corrupted volume %d", vol->vol_id);
diff --git a/common/Kconfig b/common/Kconfig
index dc2e1c2..4d7215a 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -430,7 +430,7 @@
config LOG
bool "Enable logging support"
- select DM
+ depends on DM
help
This enables support for logging of status and debug messages. These
can be displayed on the console, recorded in a memory buffer, or
@@ -637,6 +637,16 @@
and the algorithms it supports are defined in common/hash.c. See
also CMD_HASH for command-line access.
+config AVB_VERIFY
+ bool "Build Android Verified Boot operations"
+ depends on LIBAVB && FASTBOOT
+ help
+ This option enables compilation of bootloader-dependent operations,
+ used by Android Verified Boot 2.0 library (libavb). Includes:
+ * Helpers to process strings in order to build OS bootargs.
+ * Helpers to access MMC, similar to drivers/fastboot/fb_mmc.c.
+ * Helpers to alloc/init/free avb ops.
+
endmenu
menu "Update support"
diff --git a/common/Makefile b/common/Makefile
index 66584f8..7100541 100644
--- a/common/Makefile
+++ b/common/Makefile
@@ -121,4 +121,4 @@
obj-y += s_record.o
obj-y += xyzModem.o
-obj-$(CONFIG_LIBAVB) += avb_verify.o
+obj-$(CONFIG_AVB_VERIFY) += avb_verify.o
diff --git a/common/avb_verify.c b/common/avb_verify.c
index f9a00f8..20e35ad 100644
--- a/common/avb_verify.c
+++ b/common/avb_verify.c
@@ -5,6 +5,7 @@
*/
#include <avb_verify.h>
+#include <blk.h>
#include <fastboot.h>
#include <image.h>
#include <malloc.h>
@@ -288,8 +289,8 @@
tmp_buf = buffer;
}
- blks = part->mmc->block_dev.block_read(part->mmc_blk,
- start, sectors, tmp_buf);
+ blks = blk_dread(part->mmc_blk,
+ start, sectors, tmp_buf);
/* flush cache after read */
flush_cache((ulong)tmp_buf, sectors * part->info.blksz);
@@ -327,8 +328,8 @@
tmp_buf = buffer;
}
- return part->mmc->block_dev.block_write(part->mmc_blk,
- start, sectors, tmp_buf);
+ return blk_dwrite(part->mmc_blk,
+ start, sectors, tmp_buf);
}
static struct mmc_part *get_partition(AvbOps *ops, const char *partition)
diff --git a/common/console.c b/common/console.c
index 2ba33dc..7aa58d0 100644
--- a/common/console.c
+++ b/common/console.c
@@ -196,20 +196,21 @@
{
int i, ret;
struct stdio_dev *dev;
+ int prev;
- disable_ctrlc(1);
+ prev = disable_ctrlc(1);
for (i = 0; i < cd_count[file]; i++) {
dev = console_devices[file][i];
if (dev->tstc != NULL) {
ret = dev->tstc(dev);
if (ret > 0) {
tstcdev = dev;
- disable_ctrlc(0);
+ disable_ctrlc(prev);
return ret;
}
}
}
- disable_ctrlc(0);
+ disable_ctrlc(prev);
return 0;
}
@@ -603,7 +604,6 @@
static int ctrlc_was_pressed = 0;
int ctrlc(void)
{
-#ifndef CONFIG_SANDBOX
if (!ctrlc_disabled && gd->have_console) {
if (tstc()) {
switch (getc()) {
@@ -615,7 +615,6 @@
}
}
}
-#endif
return 0;
}
diff --git a/common/fdt_support.c b/common/fdt_support.c
index 812eca8..1bdd03f 100644
--- a/common/fdt_support.c
+++ b/common/fdt_support.c
@@ -409,11 +409,7 @@
return p - (char *)buf;
}
-#ifdef CONFIG_NR_DRAM_BANKS
-#define MEMORY_BANKS_MAX CONFIG_NR_DRAM_BANKS
-#else
#define MEMORY_BANKS_MAX 4
-#endif
int fdt_fixup_memory_banks(void *blob, u64 start[], u64 size[], int banks)
{
int err, nodeoffset;
@@ -893,9 +889,9 @@
*
* fdt_fixup_mtdparts(blob, nodes, ARRAY_SIZE(nodes));
*/
-void fdt_fixup_mtdparts(void *blob, void *node_info, int node_info_size)
+void fdt_fixup_mtdparts(void *blob, const struct node_info *node_info,
+ int node_info_size)
{
- struct node_info *ni = node_info;
struct mtd_device *dev;
int i, idx;
int noff;
@@ -905,12 +901,13 @@
for (i = 0; i < node_info_size; i++) {
idx = 0;
- noff = fdt_node_offset_by_compatible(blob, -1, ni[i].compat);
+ noff = fdt_node_offset_by_compatible(blob, -1,
+ node_info[i].compat);
while (noff != -FDT_ERR_NOTFOUND) {
debug("%s: %s, mtd dev type %d\n",
fdt_get_name(blob, noff, 0),
- ni[i].compat, ni[i].type);
- dev = device_find(ni[i].type, idx++);
+ node_info[i].compat, node_info[i].type);
+ dev = device_find(node_info[i].type, idx++);
if (dev) {
if (fdt_node_set_part_info(blob, noff, dev))
return; /* return on error */
@@ -918,7 +915,7 @@
/* Jump to next flash node */
noff = fdt_node_offset_by_compatible(blob, noff,
- ni[i].compat);
+ node_info[i].compat);
}
}
}
diff --git a/common/spl/Kconfig b/common/spl/Kconfig
index 99c9053..2af26a8 100644
--- a/common/spl/Kconfig
+++ b/common/spl/Kconfig
@@ -553,6 +553,16 @@
endif # SPL_OS_BOOT
+config SPL_PAYLOAD
+ string "SPL payload"
+ default "tpl/u-boot-with-tpl.bin" if TPL
+ default "u-boot.bin"
+ help
+ Payload for SPL boot. For backward compability, default to
+ u-boot.bin, i.e. RAW image without any header. In case of
+ TPL, tpl/u-boot-with-tpl.bin. For new boards, suggest to
+ use u-boot.img.
+
config SPL_PCI_SUPPORT
bool "Support PCI drivers"
help
diff --git a/common/spl/spl_ymodem.c b/common/spl/spl_ymodem.c
index 35f8f80..3b1bd71 100644
--- a/common/spl/spl_ymodem.c
+++ b/common/spl/spl_ymodem.c
@@ -12,7 +12,6 @@
#include <spl.h>
#include <xyzModem.h>
#include <asm/u-boot.h>
-#include <asm/utils.h>
#include <linux/libfdt.h>
#define BUF_SIZE 1024
diff --git a/configs/am3517_evm_defconfig b/configs/am3517_evm_defconfig
index 3b8e290..41ab3fd 100644
--- a/configs/am3517_evm_defconfig
+++ b/configs/am3517_evm_defconfig
@@ -18,6 +18,9 @@
CONFIG_SPL_MTD_SUPPORT=y
CONFIG_SYS_PROMPT="AM3517_EVM # "
# CONFIG_CMD_IMI is not set
+CONFIG_CMD_SPL=y
+CONFIG_CMD_SPL_NAND_OFS=0xaa0000
+CONFIG_CMD_SPL_WRITE_SIZE=0x20000
# CONFIG_CMD_EEPROM is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_GPT is not set
@@ -37,6 +40,8 @@
CONFIG_MMC_OMAP_HS=y
CONFIG_NAND=y
CONFIG_SYS_NAND_BUSWIDTH_16BIT=y
+CONFIG_SYS_NAND_U_BOOT_LOCATIONS=y
+CONFIG_SYS_NAND_U_BOOT_OFFS=0x80000
CONFIG_SPL_NAND_SIMPLE=y
CONFIG_CONS_INDEX=3
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1012a2g5rdb_qspi_defconfig b/configs/ls1012a2g5rdb_qspi_defconfig
index 37b63ff..3b0b42f 100644
--- a/configs/ls1012a2g5rdb_qspi_defconfig
+++ b/configs/ls1012a2g5rdb_qspi_defconfig
@@ -29,11 +29,12 @@
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
-# CONFIG_BLK is not set
+CONFIG_BLK=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_FSL_PFE=y
CONFIG_DM_ETH=y
CONFIG_SYS_NS16550=y
@@ -44,3 +45,7 @@
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_DM_SCSI=y
+CONFIG_SATA_CEVA=y
+CONFIG_SCSI=y
+CONFIG_AHCI=y
diff --git a/configs/ls1012afrdm_qspi_defconfig b/configs/ls1012afrdm_qspi_defconfig
index 2bc13be..b5f5d01 100644
--- a/configs/ls1012afrdm_qspi_defconfig
+++ b/configs/ls1012afrdm_qspi_defconfig
@@ -31,6 +31,7 @@
# CONFIG_MMC is not set
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_FSL_PFE=y
CONFIG_DM_ETH=y
CONFIG_E1000=y
diff --git a/configs/ls1012aqds_qspi_defconfig b/configs/ls1012aqds_qspi_defconfig
index 1f9b76a..09c301b 100644
--- a/configs/ls1012aqds_qspi_defconfig
+++ b/configs/ls1012aqds_qspi_defconfig
@@ -34,11 +34,12 @@
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
CONFIG_SCSI_AHCI=y
-# CONFIG_BLK is not set
+CONFIG_BLK=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_FSL_PFE=y
CONFIG_DM_ETH=y
CONFIG_E1000=y
@@ -56,3 +57,8 @@
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_DM_SCSI=y
+CONFIG_SATA_CEVA=y
+CONFIG_SCSI_AHCI=y
+CONFIG_SCSI=y
+CONFIG_AHCI=y
diff --git a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
index 7dcfaae..c444127 100644
--- a/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1012ardb_qspi_SECURE_BOOT_defconfig
@@ -31,11 +31,12 @@
CONFIG_OF_CONTROL=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
-# CONFIG_BLK is not set
+CONFIG_BLK=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
@@ -53,3 +54,8 @@
CONFIG_USB_STORAGE=y
CONFIG_RSA=y
CONFIG_RSA_SOFTWARE_EXP=y
+CONFIG_DM_SCSI=y
+CONFIG_SATA_CEVA=y
+CONFIG_SCSI_AHCI=y
+CONFIG_SCSI=y
+CONFIG_AHCI=y
diff --git a/configs/ls1012ardb_qspi_defconfig b/configs/ls1012ardb_qspi_defconfig
index 6a8485c..ee9f606 100644
--- a/configs/ls1012ardb_qspi_defconfig
+++ b/configs/ls1012ardb_qspi_defconfig
@@ -30,11 +30,12 @@
CONFIG_ENV_IS_IN_SPI_FLASH=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_DM=y
-# CONFIG_BLK is not set
+CONFIG_BLK=y
CONFIG_DM_MMC=y
CONFIG_FSL_ESDHC=y
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_FSL_PFE=y
CONFIG_DM_ETH=y
CONFIG_E1000=y
@@ -51,3 +52,8 @@
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_STORAGE=y
+CONFIG_DM_SCSI=y
+CONFIG_SATA_CEVA=y
+CONFIG_SCSI_AHCI=y
+CONFIG_SCSI=y
+CONFIG_AHCI=y
diff --git a/configs/ls1043ardb_sdcard_defconfig b/configs/ls1043ardb_sdcard_defconfig
index 64b5bb6..09ff4c3 100644
--- a/configs/ls1043ardb_sdcard_defconfig
+++ b/configs/ls1043ardb_sdcard_defconfig
@@ -4,7 +4,6 @@
CONFIG_SPL_LIBCOMMON_SUPPORT=y
CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_FSL_LS_PPA=y
-CONFIG_SPL_FSL_LS_PPA=y
CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
diff --git a/configs/ls1046aqds_qspi_defconfig b/configs/ls1046aqds_qspi_defconfig
index f89c554..b2c1885 100644
--- a/configs/ls1046aqds_qspi_defconfig
+++ b/configs/ls1046aqds_qspi_defconfig
@@ -30,6 +30,7 @@
CONFIG_FSL_CAAM=y
CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/ls1046aqds_sdcard_ifc_defconfig b/configs/ls1046aqds_sdcard_ifc_defconfig
index 2cee133..b0538c1 100644
--- a/configs/ls1046aqds_sdcard_ifc_defconfig
+++ b/configs/ls1046aqds_sdcard_ifc_defconfig
@@ -1,8 +1,12 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1046AQDS=y
CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
CONFIG_DISTRO_DEFAULTS=y
@@ -17,6 +21,10 @@
CONFIG_SPL_BOARD_INIT=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_IMLS=y
CONFIG_CMD_GREPENV=y
diff --git a/configs/ls1046aqds_sdcard_qspi_defconfig b/configs/ls1046aqds_sdcard_qspi_defconfig
index e3b2fcc..d067ba9 100644
--- a/configs/ls1046aqds_sdcard_qspi_defconfig
+++ b/configs/ls1046aqds_sdcard_qspi_defconfig
@@ -1,8 +1,12 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1046AQDS=y
CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-qds-duart"
CONFIG_DISTRO_DEFAULTS=y
@@ -17,6 +21,10 @@
CONFIG_SPL_BOARD_INIT=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_CMD_BOOTZ=y
CONFIG_CMD_GREPENV=y
CONFIG_CMD_MEMINFO=y
@@ -37,6 +45,7 @@
CONFIG_FSL_CAAM=y
CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_E1000=y
diff --git a/configs/ls1046ardb_emmc_defconfig b/configs/ls1046ardb_emmc_defconfig
index 3dfc164..9e4f275 100644
--- a/configs/ls1046ardb_emmc_defconfig
+++ b/configs/ls1046ardb_emmc_defconfig
@@ -1,8 +1,12 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1046ARDB=y
CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
CONFIG_DISTRO_DEFAULTS=y
@@ -17,6 +21,10 @@
CONFIG_SPL_BOARD_INIT=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
diff --git a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
index 7405c87..139e1ab 100644
--- a/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_qspi_SECURE_BOOT_defconfig
@@ -26,6 +26,7 @@
CONFIG_DM=y
CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
diff --git a/configs/ls1046ardb_qspi_defconfig b/configs/ls1046ardb_qspi_defconfig
index feab749..45bef3d 100644
--- a/configs/ls1046ardb_qspi_defconfig
+++ b/configs/ls1046ardb_qspi_defconfig
@@ -27,6 +27,7 @@
CONFIG_FSL_CAAM=y
CONFIG_FSL_ESDHC=y
CONFIG_SPI_FLASH=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_PHYLIB=y
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
diff --git a/configs/ls1046ardb_qspi_spl_defconfig b/configs/ls1046ardb_qspi_spl_defconfig
new file mode 100644
index 0000000..5a5ae3a
--- /dev/null
+++ b/configs/ls1046ardb_qspi_spl_defconfig
@@ -0,0 +1,65 @@
+CONFIG_ARM=y
+CONFIG_TARGET_LS1046ARDB=y
+CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
+CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_FSL_LS_PPA=y
+CONFIG_QSPI_AHB_INIT=y
+CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
+CONFIG_SPL=y
+CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
+CONFIG_DISTRO_DEFAULTS=y
+CONFIG_FIT_VERBOSE=y
+CONFIG_SPL_LOAD_FIT=y
+CONFIG_OF_BOARD_SETUP=y
+CONFIG_QSPI_BOOT=y
+CONFIG_BOOTDELAY=10
+CONFIG_USE_BOOTARGS=y
+CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.quadspi:1m(rcw),15m(u-boot),48m(kernel.itb);7e800000.flash:16m(nand_uboot),48m(nand_kernel),448m(nand_free)"
+CONFIG_SPL_BOARD_INIT=y
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_SPL_NOR_SUPPORT=y
+CONFIG_SPL_OS_BOOT=y
+CONFIG_SYS_OS_BASE=0x40980000
+CONFIG_SPL_WATCHDOG_SUPPORT=y
+CONFIG_CMD_SPL=y
+CONFIG_CMD_GPT=y
+CONFIG_CMD_I2C=y
+CONFIG_CMD_MMC=y
+CONFIG_CMD_NAND=y
+CONFIG_CMD_PCI=y
+CONFIG_CMD_SF=y
+CONFIG_CMD_USB=y
+CONFIG_CMD_CACHE=y
+CONFIG_MP=y
+CONFIG_MTDPARTS_DEFAULT="mtdparts=1550000.quadspi:1m(rcw),15m(u-boot),48m(kernel.itb);7e800000.flash:16m(nand_uboot),48m(nand_kernel),448m(nand_free)"
+# CONFIG_SPL_EFI_PARTITION is not set
+CONFIG_OF_CONTROL=y
+CONFIG_ENV_IS_IN_SPI_FLASH=y
+CONFIG_SPL_ENV_IS_NOWHERE=y
+CONFIG_DM=y
+CONFIG_FSL_CAAM=y
+CONFIG_FSL_ESDHC=y
+CONFIG_SPI_FLASH=y
+CONFIG_PHYLIB=y
+CONFIG_NETDEVICES=y
+CONFIG_PHY_GIGE=y
+CONFIG_E1000=y
+CONFIG_PCI=y
+CONFIG_DM_PCI=y
+CONFIG_DM_PCI_COMPAT=y
+CONFIG_PCIE_LAYERSCAPE=y
+CONFIG_SYS_NS16550=y
+CONFIG_SPI=y
+CONFIG_DM_SPI=y
+CONFIG_FSL_QSPI=y
+CONFIG_USB=y
+CONFIG_DM_USB=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_DWC3=y
+CONFIG_USB_STORAGE=y
+CONFIG_SPL_GZIP=y
diff --git a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
index 67467df..5c1ab6e 100644
--- a/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
+++ b/configs/ls1046ardb_sdcard_SECURE_BOOT_defconfig
@@ -1,9 +1,13 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1046ARDB=y
CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_SECURE_BOOT=y
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
CONFIG_DISTRO_DEFAULTS=y
@@ -16,6 +20,10 @@
CONFIG_BOOTARGS="console=ttyS0,115200 root=/dev/ram0 earlycon=uart8250,mmio,0x21c0500 mtdparts=1550000.quadspi:1m(rcw),15m(u-boot),48m(kernel.itb);7e800000.flash:16m(nand_uboot),48m(nand_kernel),448m(nand_free)"
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_SPL_CRYPTO_SUPPORT=y
CONFIG_SPL_HASH_SUPPORT=y
CONFIG_CMD_GPT=y
diff --git a/configs/ls1046ardb_sdcard_defconfig b/configs/ls1046ardb_sdcard_defconfig
index e8a0155..e82d389 100644
--- a/configs/ls1046ardb_sdcard_defconfig
+++ b/configs/ls1046ardb_sdcard_defconfig
@@ -1,8 +1,12 @@
CONFIG_ARM=y
CONFIG_TARGET_LS1046ARDB=y
CONFIG_SYS_TEXT_BASE=0x82000000
+CONFIG_SPL_LIBCOMMON_SUPPORT=y
+CONFIG_SPL_LIBGENERIC_SUPPORT=y
CONFIG_FSL_LS_PPA=y
+CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
+CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DEFAULT_DEVICE_TREE="fsl-ls1046a-rdb"
CONFIG_DISTRO_DEFAULTS=y
@@ -16,6 +20,10 @@
CONFIG_SPL_BOARD_INIT=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_USE_SECTOR=y
CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR=0x110
+CONFIG_SPL_ENV_SUPPORT=y
+CONFIG_SPL_I2C_SUPPORT=y
+CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT=y
+CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_CMD_GPT=y
CONFIG_CMD_I2C=y
CONFIG_CMD_MMC=y
diff --git a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
index 6c2ed9a..c761102 100644
--- a/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088aqds_qspi_SECURE_BOOT_defconfig
@@ -32,6 +32,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
diff --git a/configs/ls1088aqds_qspi_defconfig b/configs/ls1088aqds_qspi_defconfig
index f066412..a7bed8c 100644
--- a/configs/ls1088aqds_qspi_defconfig
+++ b/configs/ls1088aqds_qspi_defconfig
@@ -32,6 +32,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
diff --git a/configs/ls1088aqds_sdcard_qspi_defconfig b/configs/ls1088aqds_sdcard_qspi_defconfig
index e4724c7..f724bd3 100644
--- a/configs/ls1088aqds_sdcard_qspi_defconfig
+++ b/configs/ls1088aqds_sdcard_qspi_defconfig
@@ -42,6 +42,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
diff --git a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
index 3212704..d0334a2 100644
--- a/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_qspi_SECURE_BOOT_defconfig
@@ -32,6 +32,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
diff --git a/configs/ls1088ardb_qspi_defconfig b/configs/ls1088ardb_qspi_defconfig
index cb8a107..d806966 100644
--- a/configs/ls1088ardb_qspi_defconfig
+++ b/configs/ls1088ardb_qspi_defconfig
@@ -32,6 +32,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
diff --git a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
index 62db1c1..5935609 100644
--- a/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_SECURE_BOOT_defconfig
@@ -45,6 +45,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_SYS_NS16550=y
diff --git a/configs/ls1088ardb_sdcard_qspi_defconfig b/configs/ls1088ardb_sdcard_qspi_defconfig
index 8ae3fae..bf1c0a2 100644
--- a/configs/ls1088ardb_sdcard_qspi_defconfig
+++ b/configs/ls1088ardb_sdcard_qspi_defconfig
@@ -42,6 +42,7 @@
CONFIG_DM_SPI_FLASH=y
CONFIG_SPI_FLASH=y
CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_E1000=y
CONFIG_PCI=y
diff --git a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
index 24bcd57..9a9c33a 100644
--- a/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
+++ b/configs/ls2088ardb_qspi_SECURE_BOOT_defconfig
@@ -27,6 +27,9 @@
CONFIG_FSL_ESDHC=y
CONFIG_DM_SPI_FLASH=y
CONFIG_PHYLIB=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
diff --git a/configs/ls2088ardb_qspi_defconfig b/configs/ls2088ardb_qspi_defconfig
index 18a9634..1384768 100644
--- a/configs/ls2088ardb_qspi_defconfig
+++ b/configs/ls2088ardb_qspi_defconfig
@@ -31,6 +31,9 @@
CONFIG_FSL_ESDHC=y
CONFIG_DM_SPI_FLASH=y
CONFIG_PHYLIB=y
+CONFIG_SPI_FLASH=y
+CONFIG_SPI_FLASH_SPANSION=y
+# CONFIG_SPI_FLASH_USE_4K_SECTORS is not set
CONFIG_NETDEVICES=y
CONFIG_PHY_GIGE=y
CONFIG_E1000=y
diff --git a/configs/omap3_beagle_defconfig b/configs/omap3_beagle_defconfig
index a37a38f..1e1a391 100644
--- a/configs/omap3_beagle_defconfig
+++ b/configs/omap3_beagle_defconfig
@@ -32,8 +32,6 @@
CONFIG_MTDPARTS_DEFAULT="mtdparts=omap2-nand.0:512k(spl),1920k(u-boot),128k(u-boot-env),128k(dtb),6m(kernel),-(rootfs)"
CONFIG_CMD_UBI=y
# CONFIG_ISO_PARTITION is not set
-# CONFIG_EFI_PARTITION is not set
-CONFIG_SPL_PARTITION_UUIDS=y
CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_NAND=y
CONFIG_SPL_DM=y
@@ -79,4 +77,3 @@
CONFIG_FAT_WRITE=y
CONFIG_BCH=y
CONFIG_SPL_OF_LIBFDT=y
-# CONFIG_EFI_LOADER is not set
diff --git a/configs/omap3_logic_defconfig b/configs/omap3_logic_defconfig
index ed9f454..df1b42f 100644
--- a/configs/omap3_logic_defconfig
+++ b/configs/omap3_logic_defconfig
@@ -30,7 +30,6 @@
CONFIG_SPL_OF_PLATDATA=y
# CONFIG_ENV_IS_IN_FAT is not set
CONFIG_ENV_IS_IN_NAND=y
-# CONFIG_BLK is not set
CONFIG_USB_FUNCTION_FASTBOOT=y
CONFIG_FASTBOOT_BUF_ADDR=0x82000000
CONFIG_DM_I2C=y
@@ -56,7 +55,6 @@
CONFIG_USB_MUSB_GADGET=y
CONFIG_USB_MUSB_OMAP2PLUS=y
CONFIG_TWL4030_USB=y
-CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="TI"
CONFIG_USB_GADGET_VENDOR_NUM=0x0451
diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig
index 47f6bfd..6130290 100644
--- a/configs/sandbox_defconfig
+++ b/configs/sandbox_defconfig
@@ -176,6 +176,7 @@
CONFIG_TIMER_EARLY=y
CONFIG_SANDBOX_TIMER=y
CONFIG_TPM_TIS_SANDBOX=y
+CONFIG_TPM2_TIS_SANDBOX=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EMUL=y
@@ -192,6 +193,8 @@
CONFIG_FS_CRAMFS=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_TPM=y
+CONFIG_TPM_V1=y
+CONFIG_TPM_V2=y
CONFIG_LZ4=y
CONFIG_ERRNO_STR=y
CONFIG_OF_LIBFDT_OVERLAY=y
diff --git a/configs/uniphier_ld4_sld8_defconfig b/configs/uniphier_ld4_sld8_defconfig
index 610035a..7dfc88f 100644
--- a/configs/uniphier_ld4_sld8_defconfig
+++ b/configs/uniphier_ld4_sld8_defconfig
@@ -31,6 +31,9 @@
# CONFIG_CMD_MISC is not set
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_NET_RANDOM_ETHADDR=y
@@ -39,7 +42,7 @@
CONFIG_I2C_EEPROM=y
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
CONFIG_MMC_UNIPHIER=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD_PARTITIONS=y
CONFIG_NAND=y
CONFIG_NAND_DENALI_DT=y
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
@@ -53,3 +56,4 @@
CONFIG_USB_EHCI_GENERIC=y
CONFIG_USB_STORAGE=y
CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/uniphier_v7_defconfig b/configs/uniphier_v7_defconfig
index 8dae587..ccd80c0 100644
--- a/configs/uniphier_v7_defconfig
+++ b/configs/uniphier_v7_defconfig
@@ -30,6 +30,9 @@
# CONFIG_CMD_MISC is not set
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_CMD_MTDPARTS=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
# CONFIG_SPL_DOS_PARTITION is not set
# CONFIG_SPL_EFI_PARTITION is not set
CONFIG_NET_RANDOM_ETHADDR=y
@@ -38,7 +41,7 @@
CONFIG_I2C_EEPROM=y
CONFIG_SYS_EEPROM_PAGE_WRITE_DELAY_MS=10
CONFIG_MMC_UNIPHIER=y
-CONFIG_MTD_DEVICE=y
+CONFIG_MTD_PARTITIONS=y
CONFIG_NAND=y
CONFIG_NAND_DENALI_DT=y
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
@@ -54,3 +57,4 @@
CONFIG_USB_DWC3_UNIPHIER=y
CONFIG_USB_STORAGE=y
CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/configs/uniphier_v8_defconfig b/configs/uniphier_v8_defconfig
index 235d1f5..67ebde7 100644
--- a/configs/uniphier_v8_defconfig
+++ b/configs/uniphier_v8_defconfig
@@ -26,6 +26,9 @@
# CONFIG_CMD_MISC is not set
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
+CONFIG_MTDIDS_DEFAULT="nand0=uniphier-nand.0"
+CONFIG_MTDPARTS_DEFAULT="mtdparts=uniphier-nand.0:1m(firmware),-(UBI)"
+CONFIG_CMD_UBI=y
CONFIG_NET_RANDOM_ETHADDR=y
CONFIG_GPIO_UNIPHIER=y
CONFIG_MISC=y
@@ -36,7 +39,6 @@
CONFIG_MMC_SDHCI=y
CONFIG_MMC_SDHCI_SDMA=y
CONFIG_MMC_SDHCI_CADENCE=y
-CONFIG_MTD_DEVICE=y
CONFIG_NAND=y
CONFIG_NAND_DENALI_DT=y
CONFIG_NAND_DENALI_SPARE_AREA_SKIP_BYTES=8
@@ -54,3 +56,4 @@
CONFIG_USB_DWC3_UNIPHIER=y
CONFIG_USB_STORAGE=y
CONFIG_PANIC_HANG=y
+CONFIG_FDT_FIXUP_PARTITIONS=y
diff --git a/doc/README.avb2 b/doc/README.avb2
index 67784b5..120279f 100644
--- a/doc/README.avb2
+++ b/doc/README.avb2
@@ -58,6 +58,7 @@
-----------------------------------
The following options must be enabled:
CONFIG_LIBAVB=y
+CONFIG_AVB_VERIFY=y
CONFIG_CMD_AVB=y
diff --git a/doc/README.uniphier b/doc/README.uniphier
index 990806a..badfacd 100644
--- a/doc/README.uniphier
+++ b/doc/README.uniphier
@@ -332,6 +332,61 @@
If they are not displayed, the Verified Boot is not working.
+Deployment for Distro Boot
+--------------------------
+
+UniPhier SoC family boot the kernel in a generic manner as described in
+doc/README.distro .
+
+To boot the kernel, you need to deploy necesssary components to a file
+system on one of your block devices (eMMC, NAND, USB drive, etc.).
+
+The components depend on the kernel image format.
+
+[1] Bare images
+
+ - kernel
+ - init ramdisk
+ - device tree blob
+ - boot configuration file (extlinux.conf)
+
+Here is an exmple of the configuration file.
+
+-------------------->8--------------------
+menu title UniPhier Boot Options.
+
+timeout 50
+default UniPhier
+
+label UniPhier
+ kernel ../Image
+ initrd ../rootfs.cpio.gz
+ fdtdir ..
+-------------------->8--------------------
+
+Then, write 'Image', 'rootfs.cpio.gz', 'uniphier-ld20-ref.dtb' (DTB depends on
+your board), and 'extlinux/extlinux.conf' to the file system.
+
+[2] FIT
+
+ - FIT blob
+ - boot configuration file (extlinux.conf)
+
+-------------------->8--------------------
+menu title UniPhier Boot Options.
+
+timeout 50
+default UniPhier
+
+label UniPhier
+ kernel ../fitImage
+-------------------->8--------------------
+
+Since the init ramdisk and DTB are contained in the FIT blob,
+you do not need to describe them in the configuration file.
+Write 'fitImage' and 'extlinux/extlinux.conf' to the file system.
+
+
UniPhier specific commands
--------------------------
diff --git a/Documentation/devicetree/bindings/phy/no-op.txt b/doc/device-tree-bindings/phy/no-op.txt
similarity index 100%
rename from Documentation/devicetree/bindings/phy/no-op.txt
rename to doc/device-tree-bindings/phy/no-op.txt
diff --git a/Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.txt b/doc/device-tree-bindings/phy/phy-stm32-usbphyc.txt
similarity index 100%
rename from Documentation/devicetree/bindings/phy/phy-stm32-usbphyc.txt
rename to doc/device-tree-bindings/phy/phy-stm32-usbphyc.txt
diff --git a/Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt b/doc/device-tree-bindings/rtc/brcm,brcmstb-waketimer.txt
similarity index 100%
rename from Documentation/devicetree/bindings/rtc/brcm,brcmstb-waketimer.txt
rename to doc/device-tree-bindings/rtc/brcm,brcmstb-waketimer.txt
diff --git a/doc/driver-model/README.txt b/doc/driver-model/README.txt
index 0853477..d6fa5c4 100644
--- a/doc/driver-model/README.txt
+++ b/doc/driver-model/README.txt
@@ -695,7 +695,7 @@
allocate it yourself in ofdata_to_platdata(). Note that it is preferable
to do all the device tree decoding in ofdata_to_platdata() rather than
in probe(). (Apart from the ugliness of mixing configuration and run-time
- data, one day it is possible that U-Boot will cache platformat data for
+ data, one day it is possible that U-Boot will cache platform data for
devices which are regularly de/activated).
h. The device's probe() method is called. This should do anything that
diff --git a/doc/git-mailrc b/doc/git-mailrc
index af8e335..bf8f2a5 100644
--- a/doc/git-mailrc
+++ b/doc/git-mailrc
@@ -20,7 +20,7 @@
alias angelo_ts Angelo Dureghello <angelo@sysam.it>
alias bmeng Bin Meng <bmeng.cn@gmail.com>
alias danielschwierzeck Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
-alias dinh Dinh Nguyen <dinguyen@kernel.org>
+alias dinh Dinh Nguyen <dinguyen@kernel.org>
alias hs Heiko Schocher <hs@denx.de>
alias iwamatsu Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
alias jaehoon Jaehoon Chung <jh80.chung@samsung.com>
@@ -33,13 +33,12 @@
alias mariosix Mario Six <mario.six@gdsys.cc>
alias masahiro Masahiro Yamada <yamada.masahiro@socionext.com>
alias mateusz Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
-alias maxime Maxime Ripard <maxime.ripard@free-electrons.com>
+alias maxime Maxime Ripard <maxime.ripard@free-electrons.com>
alias monstr Michal Simek <monstr@monstr.eu>
alias prafulla Prafulla Wadaskar <prafulla@marvell.com>
alias prom Minkyu Kang <mk7.kang@samsung.com>
alias ptomsich Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
alias sbabic Stefano Babic <sbabic@denx.de>
-alias scottwood Scott Wood <oss@buserror.net>
alias sjg Simon Glass <sjg@chromium.org>
alias smcnutt Scott McNutt <smcnutt@psyent.com>
alias stroese Stefan Roese <sr@denx.de>
@@ -113,7 +112,7 @@
alias i2c uboot, hs
alias kconfig uboot, masahiro
alias mmc uboot, jaehoon
-alias nand uboot, scottwood
+alias nand uboot
alias net uboot, jhersh
alias phy uboot, jhersh
alias spi uboot, jagan
diff --git a/drivers/ata/sata_ceva.c b/drivers/ata/sata_ceva.c
index a7d45e8..047cff7 100644
--- a/drivers/ata/sata_ceva.c
+++ b/drivers/ata/sata_ceva.c
@@ -7,8 +7,6 @@
#include <dm.h>
#include <ahci.h>
#include <scsi.h>
-#include <asm/arch/hardware.h>
-
#include <asm/io.h>
/* Vendor Specific Register Offsets */
@@ -18,6 +16,7 @@
#define AHCI_VEND_PP3C 0xB0
#define AHCI_VEND_PP4C 0xB4
#define AHCI_VEND_PP5C 0xB8
+#define AHCI_VEND_AXICC 0xBc
#define AHCI_VEND_PAXIC 0xC0
#define AHCI_VEND_PTC 0xC8
@@ -72,45 +71,57 @@
#define DRV_NAME "ahci-ceva"
#define CEVA_FLAG_BROKEN_GEN2 1
+/* flag bit definition */
+#define FLAG_COHERENT 1
+
+/* register config value */
+#define CEVA_PHY1_CFG 0xa003fffe
+#define CEVA_PHY2_CFG 0x28184d1f
+#define CEVA_PHY3_CFG 0x0e081509
+#define CEVA_TRANS_CFG 0x08000029
+#define CEVA_AXICC_CFG 0x3fffffff
+
+/* ecc addr-val pair */
+#define ECC_DIS_ADDR_CH2 0x80000000
+#define ECC_DIS_VAL_CH2 0x20140520
+
+enum ceva_soc {
+ CEVA_1V84,
+ CEVA_LS1012A,
+};
+
struct ceva_sata_priv {
ulong base;
+ enum ceva_soc soc;
+ ulong flag;
};
-static int ceva_init_sata(ulong mmio)
+static int ceva_init_sata(struct ceva_sata_priv *priv)
{
+ ulong base = priv->base;
ulong tmp;
- int i;
- /*
- * AXI Data bus width to 64
- * Set Mem Addr Read, Write ID for data transfers
- * Transfer limit to 72 DWord
- */
- tmp = PAXIC_ADBW_BW64 | PAXIC_MAWIDD | PAXIC_MARIDD | PAXIC_OTL;
- writel(tmp, mmio + AHCI_VEND_PAXIC);
-
- /* Set AHCI Enable */
- tmp = readl(mmio + HOST_CTL);
- tmp |= HOST_AHCI_EN;
- writel(tmp, mmio + HOST_CTL);
-
- for (i = 0; i < NR_PORTS; i++) {
- /* TPSS TPRS scalars, CISE and Port Addr */
- tmp = PCFG_TPSS_VAL | PCFG_TPRS_VAL | (PCFG_PAD_VAL + i);
- writel(tmp, mmio + AHCI_VEND_PCFG);
-
- /* Port Phy Cfg register enables */
+ switch (priv->soc) {
+ case CEVA_1V84:
+ tmp = PAXIC_ADBW_BW64 | PAXIC_MAWIDD | PAXIC_MARIDD | PAXIC_OTL;
+ writel(tmp, base + AHCI_VEND_PAXIC);
+ tmp = PCFG_TPSS_VAL | PCFG_TPRS_VAL | PCFG_PAD_VAL;
+ writel(tmp, base + AHCI_VEND_PCFG);
tmp = PPCFG_TTA | PPCFG_PSS_EN | PPCFG_ESDF_EN;
- writel(tmp, mmio + AHCI_VEND_PPCFG);
-
- /* Rx Watermark setting */
+ writel(tmp, base + AHCI_VEND_PPCFG);
tmp = PTC_RX_WM_VAL | PTC_RSVD;
- writel(tmp, mmio + AHCI_VEND_PTC);
+ writel(tmp, base + AHCI_VEND_PTC);
+ break;
- /* Default to Gen 2 Speed and Gen 1 if Gen2 is broken */
- tmp = PORT_SCTL_SPD_GEN3 | PORT_SCTL_IPM;
- writel(tmp, mmio + PORT_SCR_CTL + PORT_BASE + PORT_OFFSET * i);
+ case CEVA_LS1012A:
+ writel(ECC_DIS_ADDR_CH2, ECC_DIS_VAL_CH2);
+ writel(CEVA_PHY1_CFG, base + AHCI_VEND_PPCFG);
+ writel(CEVA_TRANS_CFG, base + AHCI_VEND_PTC);
+ if (priv->flag & FLAG_COHERENT)
+ writel(CEVA_AXICC_CFG, base + AHCI_VEND_AXICC);
+ break;
}
+
return 0;
}
@@ -125,13 +136,14 @@
{
struct ceva_sata_priv *priv = dev_get_priv(dev);
- ceva_init_sata(priv->base);
+ ceva_init_sata(priv);
return ahci_probe_scsi(dev, priv->base);
}
static const struct udevice_id sata_ceva_ids[] = {
- { .compatible = "ceva,ahci-1v84" },
+ { .compatible = "ceva,ahci-1v84", .data = CEVA_1V84 },
+ { .compatible = "fsl,ls1012a-ahci", .data = CEVA_LS1012A },
{ }
};
@@ -139,10 +151,15 @@
{
struct ceva_sata_priv *priv = dev_get_priv(dev);
- priv->base = devfdt_get_addr(dev);
+ if (dev_read_bool(dev, "dma-coherent"))
+ priv->flag |= FLAG_COHERENT;
+
+ priv->base = dev_read_addr(dev);
if (priv->base == FDT_ADDR_T_NONE)
return -EINVAL;
+ priv->soc = dev_get_driver_data(dev);
+
return 0;
}
diff --git a/drivers/ddr/fsl/options.c b/drivers/ddr/fsl/options.c
index 5f2acb1..7639a8b 100644
--- a/drivers/ddr/fsl/options.c
+++ b/drivers/ddr/fsl/options.c
@@ -742,8 +742,7 @@
unsigned int ctrl_num)
{
unsigned int i;
- char buffer[HWCONFIG_BUFFER_SIZE];
- char *buf = NULL;
+ char buf[HWCONFIG_BUFFER_SIZE];
#if defined(CONFIG_SYS_FSL_DDR3) || \
defined(CONFIG_SYS_FSL_DDR2) || \
defined(CONFIG_SYS_FSL_DDR4)
@@ -757,8 +756,8 @@
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
- if (env_get_f("hwconfig", buffer, sizeof(buffer)) > 0)
- buf = buffer;
+ if (env_get_f("hwconfig", buf, sizeof(buf)) < 0)
+ buf[0] = '\0';
#if defined(CONFIG_SYS_FSL_DDR3) || \
defined(CONFIG_SYS_FSL_DDR2) || \
@@ -1398,15 +1397,14 @@
int use_spd = 0;
#ifdef CONFIG_DDR_SPD
- char buffer[HWCONFIG_BUFFER_SIZE];
- char *buf = NULL;
+ char buf[HWCONFIG_BUFFER_SIZE];
/*
* Extract hwconfig from environment since we have not properly setup
* the environment but need it for ddr config params
*/
- if (env_get_f("hwconfig", buffer, sizeof(buffer)) > 0)
- buf = buffer;
+ if (env_get_f("hwconfig", buf, sizeof(buf)) < 0)
+ buf[0] = '\0';
/* if hwconfig is not enabled, or "sdram" is not defined, use spd */
if (hwconfig_sub_f("fsl_ddr", "sdram", buf)) {
diff --git a/drivers/mtd/nand/denali.c b/drivers/mtd/nand/denali.c
index 6266c8a..7302c37 100644
--- a/drivers/mtd/nand/denali.c
+++ b/drivers/mtd/nand/denali.c
@@ -1270,7 +1270,7 @@
denali->dma_avail = 1;
if (denali->dma_avail) {
- chip->buf_align = 16;
+ chip->buf_align = ARCH_DMA_MINALIGN;
if (denali->caps & DENALI_CAP_DMA_64BIT)
denali->setup_dma = denali_setup_dma64;
else
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index e88f056..f762b08 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -7,8 +7,8 @@
help
Enable driver model for Ethernet.
- The eth_*() interface will be implemented by the UC_ETH class
- This is currently implemented in net/eth.c
+ The eth_*() interface will be implemented by the UCLASS_ETH class
+ This is currently implemented in net/eth-uclass.c
Look in include/net.h for details.
config DRIVER_TI_CPSW
@@ -181,6 +181,7 @@
config MVGBE
bool "Marvell Orion5x/Kirkwood network interface support"
depends on KIRKWOOD || ORION5X
+ select PHYLIB if DM_ETH
help
This driver supports the network interface units in the
Marvell Orion5x and Kirkwood SoCs
diff --git a/drivers/net/Makefile b/drivers/net/Makefile
index 058dd00..c1ed44e 100644
--- a/drivers/net/Makefile
+++ b/drivers/net/Makefile
@@ -50,6 +50,7 @@
obj-$(CONFIG_RTL8169) += rtl8169.o
obj-$(CONFIG_ETH_SANDBOX) += sandbox.o
obj-$(CONFIG_ETH_SANDBOX_RAW) += sandbox-raw.o
+obj-$(CONFIG_ETH_SANDBOX_RAW) += sandbox-raw-bus.o
obj-$(CONFIG_SH_ETHER) += sh_eth.o
obj-$(CONFIG_RENESAS_RAVB) += ravb.o
obj-$(CONFIG_SMC91111) += smc91111.o
diff --git a/drivers/net/cpsw.c b/drivers/net/cpsw.c
index 9919d39..c31695e 100644
--- a/drivers/net/cpsw.c
+++ b/drivers/net/cpsw.c
@@ -999,7 +999,7 @@
#ifdef CONFIG_DM_ETH
if (slave->data->phy_of_handle)
- dev_set_of_offset(phydev->dev, slave->data->phy_of_handle);
+ phydev->node = offset_to_ofnode(slave->data->phy_of_handle);
#endif
priv->phydev = phydev;
diff --git a/drivers/net/mvgbe.c b/drivers/net/mvgbe.c
index e6585ef..74fed7a 100644
--- a/drivers/net/mvgbe.c
+++ b/drivers/net/mvgbe.c
@@ -12,6 +12,7 @@
*/
#include <common.h>
+#include <dm.h>
#include <net.h>
#include <malloc.h>
#include <miiphy.h>
@@ -55,20 +56,13 @@
return 0;
}
-/*
- * smi_reg_read - miiphy_read callback function.
- *
- * Returns 16bit phy register value, or -EFAULT on error
- */
-static int smi_reg_read(struct mii_dev *bus, int phy_adr, int devad,
- int reg_ofs)
+static int __mvgbe_mdio_read(struct mvgbe_device *dmvgbe, int phy_adr,
+ int devad, int reg_ofs)
{
- u16 data = 0;
- struct eth_device *dev = eth_get_dev_by_name(bus->name);
- struct mvgbe_device *dmvgbe = to_mvgbe(dev);
struct mvgbe_registers *regs = dmvgbe->regs;
u32 smi_reg;
u32 timeout;
+ u16 data = 0;
/* Phyadr read request */
if (phy_adr == MV_PHY_ADR_REQUEST &&
@@ -127,15 +121,26 @@
}
/*
- * smi_reg_write - miiphy_write callback function.
+ * smi_reg_read - miiphy_read callback function.
*
- * Returns 0 if write succeed, -EFAULT on error
+ * Returns 16bit phy register value, or -EFAULT on error
*/
-static int smi_reg_write(struct mii_dev *bus, int phy_adr, int devad,
- int reg_ofs, u16 data)
+static int smi_reg_read(struct mii_dev *bus, int phy_adr, int devad,
+ int reg_ofs)
{
+#ifdef CONFIG_DM_ETH
+ struct mvgbe_device *dmvgbe = bus->priv;
+#else
struct eth_device *dev = eth_get_dev_by_name(bus->name);
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+#endif
+
+ return __mvgbe_mdio_read(dmvgbe, phy_adr, devad, reg_ofs);
+}
+
+static int __mvgbe_mdio_write(struct mvgbe_device *dmvgbe, int phy_adr,
+ int devad, int reg_ofs, u16 data)
+{
struct mvgbe_registers *regs = dmvgbe->regs;
u32 smi_reg;
@@ -171,6 +176,24 @@
return 0;
}
+
+/*
+ * smi_reg_write - miiphy_write callback function.
+ *
+ * Returns 0 if write succeed, -EFAULT on error
+ */
+static int smi_reg_write(struct mii_dev *bus, int phy_adr, int devad,
+ int reg_ofs, u16 data)
+{
+#ifdef CONFIG_DM_ETH
+ struct mvgbe_device *dmvgbe = bus->priv;
+#else
+ struct eth_device *dev = eth_get_dev_by_name(bus->name);
+ struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+#endif
+
+ return __mvgbe_mdio_write(dmvgbe, phy_adr, devad, reg_ofs, data);
+}
#endif
/* Stop and checks all queues */
@@ -357,8 +380,9 @@
/*
* port_uc_addr_set - This function Set the port Unicast address.
*/
-static void port_uc_addr_set(struct mvgbe_registers *regs, u8 * p_addr)
+static void port_uc_addr_set(struct mvgbe_device *dmvgbe, u8 *p_addr)
{
+ struct mvgbe_registers *regs = dmvgbe->regs;
u32 mac_h;
u32 mac_l;
@@ -400,12 +424,13 @@
dmvgbe->p_rxdesc_curr = dmvgbe->p_rxdesc;
}
-static int mvgbe_init(struct eth_device *dev)
+static int __mvgbe_init(struct mvgbe_device *dmvgbe, u8 *enetaddr,
+ const char *name)
{
- struct mvgbe_device *dmvgbe = to_mvgbe(dev);
struct mvgbe_registers *regs = dmvgbe->regs;
#if (defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \
!defined(CONFIG_PHYLIB) && \
+ !defined(CONFIG_DM_ETH) && \
defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)
int i;
#endif
@@ -422,7 +447,7 @@
set_dram_access(regs);
port_init_mac_tables(regs);
- port_uc_addr_set(regs, dmvgbe->dev.enetaddr);
+ port_uc_addr_set(dmvgbe, enetaddr);
/* Assign port configuration and command. */
MVGBE_REG_WR(regs->pxc, PRT_CFG_VAL);
@@ -459,28 +484,37 @@
#if (defined(CONFIG_MII) || defined(CONFIG_CMD_MII)) && \
!defined(CONFIG_PHYLIB) && \
+ !defined(CONFIG_DM_ETH) && \
defined(CONFIG_SYS_FAULT_ECHO_LINK_DOWN)
/* Wait up to 5s for the link status */
for (i = 0; i < 5; i++) {
u16 phyadr;
- miiphy_read(dev->name, MV_PHY_ADR_REQUEST,
+ miiphy_read(name, MV_PHY_ADR_REQUEST,
MV_PHY_ADR_REQUEST, &phyadr);
/* Return if we get link up */
- if (miiphy_link(dev->name, phyadr))
+ if (miiphy_link(name, phyadr))
return 0;
udelay(1000000);
}
- printf("No link on %s\n", dev->name);
+ printf("No link on %s\n", name);
return -1;
#endif
return 0;
}
-static int mvgbe_halt(struct eth_device *dev)
+#ifndef CONFIG_DM_ETH
+static int mvgbe_init(struct eth_device *dev)
{
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+
+ return __mvgbe_init(dmvgbe, dmvgbe->dev.enetaddr, dmvgbe->dev.name);
+}
+#endif
+
+static void __mvgbe_halt(struct mvgbe_device *dmvgbe)
+{
struct mvgbe_registers *regs = dmvgbe->regs;
/* Disable all gigE address decoder */
@@ -502,23 +536,42 @@
MVGBE_REG_WR(regs->ice, 0);
MVGBE_REG_WR(regs->pim, 0);
MVGBE_REG_WR(regs->peim, 0);
+}
+
+#ifndef CONFIG_DM_ETH
+static int mvgbe_halt(struct eth_device *dev)
+{
+ struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+
+ __mvgbe_halt(dmvgbe);
return 0;
}
+#endif
+#ifdef CONFIG_DM_ETH
+static int mvgbe_write_hwaddr(struct udevice *dev)
+{
+ struct eth_pdata *pdata = dev_get_platdata(dev);
+
+ port_uc_addr_set(dev_get_priv(dev), pdata->enetaddr);
+
+ return 0;
+}
+#else
static int mvgbe_write_hwaddr(struct eth_device *dev)
{
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
- struct mvgbe_registers *regs = dmvgbe->regs;
/* Programs net device MAC address after initialization */
- port_uc_addr_set(regs, dmvgbe->dev.enetaddr);
+ port_uc_addr_set(dmvgbe, dmvgbe->dev.enetaddr);
return 0;
}
+#endif
-static int mvgbe_send(struct eth_device *dev, void *dataptr, int datasize)
+static int __mvgbe_send(struct mvgbe_device *dmvgbe, void *dataptr,
+ int datasize)
{
- struct mvgbe_device *dmvgbe = to_mvgbe(dev);
struct mvgbe_registers *regs = dmvgbe->regs;
struct mvgbe_txdesc *p_txdesc = dmvgbe->p_txdesc;
void *p = (void *)dataptr;
@@ -571,13 +624,25 @@
return 0;
}
-static int mvgbe_recv(struct eth_device *dev)
+#ifndef CONFIG_DM_ETH
+static int mvgbe_send(struct eth_device *dev, void *dataptr, int datasize)
{
struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+
+ return __mvgbe_send(dmvgbe, dataptr, datasize);
+}
+#endif
+
+static int __mvgbe_recv(struct mvgbe_device *dmvgbe, uchar **packetp)
+{
struct mvgbe_rxdesc *p_rxdesc_curr = dmvgbe->p_rxdesc_curr;
u32 cmd_sts;
u32 timeout = 0;
u32 rxdesc_curr_addr;
+ unsigned char *data;
+ int rx_bytes = 0;
+
+ *packetp = NULL;
/* wait untill rx packet available or timeout */
do {
@@ -621,11 +686,11 @@
" upper layer (net_process_received_packet)\n",
__func__);
+ data = (p_rxdesc_curr->buf_ptr + RX_BUF_OFFSET);
+ rx_bytes = (int)(p_rxdesc_curr->byte_cnt -
+ RX_BUF_OFFSET);
+
- /* let the upper layer handle the packet */
- net_process_received_packet((p_rxdesc_curr->buf_ptr +
- RX_BUF_OFFSET),
- (int)(p_rxdesc_curr->byte_cnt -
- RX_BUF_OFFSET));
+ *packetp = data;
}
/*
* free these descriptors and point next in the ring
@@ -638,10 +703,59 @@
rxdesc_curr_addr = (u32)&dmvgbe->p_rxdesc_curr;
writel((unsigned)p_rxdesc_curr->nxtdesc_p, rxdesc_curr_addr);
+ return rx_bytes;
+}
+
+#ifndef CONFIG_DM_ETH
+static int mvgbe_recv(struct eth_device *dev)
+{
+ struct mvgbe_device *dmvgbe = to_mvgbe(dev);
+ uchar *packet;
+ int ret;
+
+ ret = __mvgbe_recv(dmvgbe, &packet);
+ if (ret < 0)
+ return ret;
+
+ net_process_received_packet(packet, ret);
+
return 0;
}
+#endif
-#if defined(CONFIG_PHYLIB)
+#if defined(CONFIG_PHYLIB) || defined(CONFIG_DM_ETH)
+#if defined(CONFIG_DM_ETH)
+static struct phy_device *__mvgbe_phy_init(struct udevice *dev,
+ struct mii_dev *bus,
+ phy_interface_t phy_interface,
+ int phyid)
+#else
+static struct phy_device *__mvgbe_phy_init(struct eth_device *dev,
+ struct mii_dev *bus,
+ phy_interface_t phy_interface,
+ int phyid)
+#endif
+{
+ struct phy_device *phydev;
+
+ /* Set phy address of the port */
+ miiphy_write(dev->name, MV_PHY_ADR_REQUEST, MV_PHY_ADR_REQUEST,
+ phyid);
+
+ phydev = phy_connect(bus, phyid, dev, phy_interface);
+ if (!phydev) {
+ printf("phy_connect failed\n");
+ return NULL;
+ }
+
+ phy_config(phydev);
+ phy_startup(phydev);
+
+ return phydev;
+}
+#endif /* CONFIG_PHYLIB || CONFIG_DM_ETH */
+
+#if defined(CONFIG_PHYLIB) && !defined(CONFIG_DM_ETH)
int mvgbe_phylib_init(struct eth_device *dev, int phyid)
{
struct mii_dev *bus;
@@ -664,27 +778,53 @@
return -ENOMEM;
}
- /* Set phy address of the port */
- smi_reg_write(bus, MV_PHY_ADR_REQUEST, 0, MV_PHY_ADR_REQUEST, phyid);
-
- phydev = phy_connect(bus, phyid, dev, PHY_INTERFACE_MODE_RGMII);
- if (!phydev) {
- printf("phy_connect failed\n");
+ phydev = __mvgbe_phy_init(dev, bus, PHY_INTERFACE_MODE_RGMII, phyid);
+ if (!phydev)
return -ENODEV;
- }
-
- phy_config(phydev);
- phy_startup(phydev);
return 0;
}
#endif
+static int mvgbe_alloc_buffers(struct mvgbe_device *dmvgbe)
+{
+ dmvgbe->p_rxdesc = memalign(PKTALIGN,
+ MV_RXQ_DESC_ALIGNED_SIZE * RINGSZ + 1);
+ if (!dmvgbe->p_rxdesc)
+ goto error1;
+
+ dmvgbe->p_rxbuf = memalign(PKTALIGN,
+ RINGSZ * PKTSIZE_ALIGN + 1);
+ if (!dmvgbe->p_rxbuf)
+ goto error2;
+
+ dmvgbe->p_aligned_txbuf = memalign(8, PKTSIZE_ALIGN);
+ if (!dmvgbe->p_aligned_txbuf)
+ goto error3;
+
+ dmvgbe->p_txdesc = memalign(PKTALIGN, sizeof(struct mvgbe_txdesc) + 1);
+ if (!dmvgbe->p_txdesc)
+ goto error4;
+
+ return 0;
+
+error4:
+ free(dmvgbe->p_aligned_txbuf);
+error3:
+ free(dmvgbe->p_rxbuf);
+error2:
+ free(dmvgbe->p_rxdesc);
+error1:
+ return -ENOMEM;
+}
+
+#ifndef CONFIG_DM_ETH
int mvgbe_initialize(bd_t *bis)
{
struct mvgbe_device *dmvgbe;
struct eth_device *dev;
int devnum;
+ int ret;
u8 used_ports[MAX_MVGBE_DEVS] = CONFIG_MVGBE_PORTS;
for (devnum = 0; devnum < MAX_MVGBE_DEVS; devnum++) {
@@ -693,45 +833,16 @@
continue;
dmvgbe = malloc(sizeof(struct mvgbe_device));
-
if (!dmvgbe)
- goto error1;
+ return -ENOMEM;
memset(dmvgbe, 0, sizeof(struct mvgbe_device));
-
- dmvgbe->p_rxdesc =
- (struct mvgbe_rxdesc *)memalign(PKTALIGN,
- MV_RXQ_DESC_ALIGNED_SIZE*RINGSZ + 1);
-
- if (!dmvgbe->p_rxdesc)
- goto error2;
-
- dmvgbe->p_rxbuf = (u8 *) memalign(PKTALIGN,
- RINGSZ*PKTSIZE_ALIGN + 1);
-
- if (!dmvgbe->p_rxbuf)
- goto error3;
-
- dmvgbe->p_aligned_txbuf = memalign(8, PKTSIZE_ALIGN);
-
- if (!dmvgbe->p_aligned_txbuf)
- goto error4;
-
- dmvgbe->p_txdesc = (struct mvgbe_txdesc *) memalign(
- PKTALIGN, sizeof(struct mvgbe_txdesc) + 1);
-
- if (!dmvgbe->p_txdesc) {
- free(dmvgbe->p_aligned_txbuf);
-error4:
- free(dmvgbe->p_rxbuf);
-error3:
- free(dmvgbe->p_rxdesc);
-error2:
- free(dmvgbe);
-error1:
+ ret = mvgbe_alloc_buffers(dmvgbe);
+ if (ret) {
printf("Err.. %s Failed to allocate memory\n",
__func__);
- return -1;
+ free(dmvgbe);
+ return ret;
}
dev = &dmvgbe->dev;
@@ -783,3 +894,154 @@
}
return 0;
}
+#endif
+
+#ifdef CONFIG_DM_ETH
+static int mvgbe_port_is_fixed_link(struct mvgbe_device *dmvgbe)
+{
+ return dmvgbe->phyaddr > PHY_MAX_ADDR;
+}
+
+static int mvgbe_start(struct udevice *dev)
+{
+ struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct mvgbe_device *dmvgbe = dev_get_priv(dev);
+ int ret;
+
+ ret = __mvgbe_init(dmvgbe, pdata->enetaddr, dev->name);
+ if (ret)
+ return ret;
+
+ if (!mvgbe_port_is_fixed_link(dmvgbe)) {
+ dmvgbe->phydev = __mvgbe_phy_init(dev, dmvgbe->bus,
+ dmvgbe->phy_interface,
+ dmvgbe->phyaddr);
+ if (!dmvgbe->phydev)
+ return -ENODEV;
+ }
+
+ return 0;
+}
+
+static int mvgbe_send(struct udevice *dev, void *packet, int length)
+{
+ struct mvgbe_device *dmvgbe = dev_get_priv(dev);
+
+ return __mvgbe_send(dmvgbe, packet, length);
+}
+
+static int mvgbe_recv(struct udevice *dev, int flags, uchar **packetp)
+{
+ struct mvgbe_device *dmvgbe = dev_get_priv(dev);
+
+ return __mvgbe_recv(dmvgbe, packetp);
+}
+
+static void mvgbe_stop(struct udevice *dev)
+{
+ struct mvgbe_device *dmvgbe = dev_get_priv(dev);
+
+ __mvgbe_halt(dmvgbe);
+}
+
+static int mvgbe_probe(struct udevice *dev)
+{
+ struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct mvgbe_device *dmvgbe = dev_get_priv(dev);
+ struct mii_dev *bus;
+ int ret;
+
+ ret = mvgbe_alloc_buffers(dmvgbe);
+ if (ret)
+ return ret;
+
+ dmvgbe->regs = (void __iomem *)pdata->iobase;
+
+ bus = mdio_alloc();
+ if (!bus) {
+ printf("Failed to allocate MDIO bus\n");
+ return -ENOMEM;
+ }
+
+ bus->read = smi_reg_read;
+ bus->write = smi_reg_write;
+ snprintf(bus->name, sizeof(bus->name), dev->name);
+ bus->priv = dmvgbe;
+ dmvgbe->bus = bus;
+
+ ret = mdio_register(bus);
+ if (ret < 0)
+ return ret;
+
+ return 0;
+}
+
+static const struct eth_ops mvgbe_ops = {
+ .start = mvgbe_start,
+ .send = mvgbe_send,
+ .recv = mvgbe_recv,
+ .stop = mvgbe_stop,
+ .write_hwaddr = mvgbe_write_hwaddr,
+};
+
+static int mvgbe_ofdata_to_platdata(struct udevice *dev)
+{
+ struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct mvgbe_device *dmvgbe = dev_get_priv(dev);
+ void *blob = (void *)gd->fdt_blob;
+ int node = dev_of_offset(dev);
+ const char *phy_mode;
+ int fl_node;
+ int pnode;
+ unsigned long addr;
+
+ pdata->iobase = devfdt_get_addr(dev);
+ pdata->phy_interface = -1;
+
+ pnode = fdt_node_offset_by_compatible(blob, node,
+ "marvell,kirkwood-eth-port");
+
+ /* Get phy-mode / phy_interface from DT */
+ phy_mode = fdt_getprop(gd->fdt_blob, pnode, "phy-mode", NULL);
+ if (phy_mode)
+ pdata->phy_interface = phy_get_interface_by_name(phy_mode);
+ if (pdata->phy_interface == -1) {
+ debug("%s: Invalid PHY interface '%s'\n", __func__, phy_mode);
+ return -EINVAL;
+ }
+
+ dmvgbe->phy_interface = pdata->phy_interface;
+
+ /* fetch 'fixed-link' property */
+ fl_node = fdt_subnode_offset(blob, pnode, "fixed-link");
+ if (fl_node != -FDT_ERR_NOTFOUND) {
+ /* set phy_addr to invalid value for fixed link */
+ dmvgbe->phyaddr = PHY_MAX_ADDR + 1;
+ dmvgbe->duplex = fdtdec_get_bool(blob, fl_node, "full-duplex");
+ dmvgbe->speed = fdtdec_get_int(blob, fl_node, "speed", 0);
+ } else {
+ /* Now read phyaddr from DT */
+ addr = fdtdec_lookup_phandle(blob, pnode, "phy-handle");
+ if (addr > 0)
+ dmvgbe->phyaddr = fdtdec_get_int(blob, addr, "reg", 0);
+ }
+
+ return 0;
+}
+
+static const struct udevice_id mvgbe_ids[] = {
+ { .compatible = "marvell,kirkwood-eth" },
+ { }
+};
+
+U_BOOT_DRIVER(mvgbe) = {
+ .name = "mvgbe",
+ .id = UCLASS_ETH,
+ .of_match = mvgbe_ids,
+ .ofdata_to_platdata = mvgbe_ofdata_to_platdata,
+ .probe = mvgbe_probe,
+ .ops = &mvgbe_ops,
+ .priv_auto_alloc_size = sizeof(struct mvgbe_device),
+ .platdata_auto_alloc_size = sizeof(struct eth_pdata),
+};
+#endif /* CONFIG_DM_ETH */
diff --git a/drivers/net/mvgbe.h b/drivers/net/mvgbe.h
index 1dc9bbe..44541c0 100644
--- a/drivers/net/mvgbe.h
+++ b/drivers/net/mvgbe.h
@@ -30,7 +30,9 @@
#define RXUQ 0 /* Used Rx queue */
#define TXUQ 0 /* Used Rx queue */
+#ifndef CONFIG_DM_ETH
#define to_mvgbe(_d) container_of(_d, struct mvgbe_device, dev)
+#endif
#define MVGBE_REG_WR(adr, val) writel(val, &adr)
#define MVGBE_REG_RD(adr) readl(&adr)
#define MVGBE_REG_BITS_RESET(adr, val) writel(readl(&adr) & ~(val), &adr)
@@ -479,13 +481,27 @@
/* port device data struct */
struct mvgbe_device {
+#ifndef CONFIG_DM_ETH
struct eth_device dev;
+#endif
struct mvgbe_registers *regs;
struct mvgbe_txdesc *p_txdesc;
struct mvgbe_rxdesc *p_rxdesc;
struct mvgbe_rxdesc *p_rxdesc_curr;
u8 *p_rxbuf;
u8 *p_aligned_txbuf;
+
+#ifdef CONFIG_DM_ETH
+ phy_interface_t phy_interface;
+ unsigned int link;
+ unsigned int duplex;
+ unsigned int speed;
+
+ int init;
+ int phyaddr;
+ struct phy_device *phydev;
+ struct mii_dev *bus;
+#endif
};
#endif /* __MVGBE_H__ */
diff --git a/drivers/net/phy/atheros.c b/drivers/net/phy/atheros.c
index 79f68af..3783d15 100644
--- a/drivers/net/phy/atheros.c
+++ b/drivers/net/phy/atheros.c
@@ -5,6 +5,7 @@
* Copyright 2011, 2013 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
+#include <common.h>
#include <phy.h>
#define AR803x_PHY_DEBUG_ADDR_REG 0x1d
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 202e3dd..3399fd2 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -5,7 +5,6 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
-#include <config.h>
#include <common.h>
#include <phy.h>
diff --git a/drivers/net/phy/davicom.c b/drivers/net/phy/davicom.c
index 27c7788..4666497 100644
--- a/drivers/net/phy/davicom.c
+++ b/drivers/net/phy/davicom.c
@@ -5,6 +5,7 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
+#include <common.h>
#include <phy.h>
#define MIIM_DM9161_SCR 0x10
diff --git a/drivers/net/phy/generic_10g.c b/drivers/net/phy/generic_10g.c
index 1024d7d..b4384e1 100644
--- a/drivers/net/phy/generic_10g.c
+++ b/drivers/net/phy/generic_10g.c
@@ -7,8 +7,6 @@
*
* Based loosely off of Linux's PHY Lib
*/
-
-#include <config.h>
#include <common.h>
#include <miiphy.h>
#include <phy.h>
diff --git a/drivers/net/phy/lxt.c b/drivers/net/phy/lxt.c
index 5942664..2618deb 100644
--- a/drivers/net/phy/lxt.c
+++ b/drivers/net/phy/lxt.c
@@ -5,6 +5,7 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
+#include <common.h>
#include <phy.h>
/* LXT971 Status 2 registers */
diff --git a/drivers/net/phy/marvell.c b/drivers/net/phy/marvell.c
index 436ff57..efbbd31 100644
--- a/drivers/net/phy/marvell.c
+++ b/drivers/net/phy/marvell.c
@@ -5,7 +5,6 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
-#include <config.h>
#include <common.h>
#include <errno.h>
#include <phy.h>
diff --git a/drivers/net/phy/micrel_ksz8xxx.c b/drivers/net/phy/micrel_ksz8xxx.c
index c70c036..3411150 100644
--- a/drivers/net/phy/micrel_ksz8xxx.c
+++ b/drivers/net/phy/micrel_ksz8xxx.c
@@ -6,7 +6,6 @@
* author Andy Fleming
* (C) 2012 NetModule AG, David Andrey, added KSZ9031
*/
-#include <config.h>
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/net/phy/micrel_ksz90x1.c b/drivers/net/phy/micrel_ksz90x1.c
index 5462532..3951535 100644
--- a/drivers/net/phy/micrel_ksz90x1.c
+++ b/drivers/net/phy/micrel_ksz90x1.c
@@ -8,8 +8,6 @@
* (C) Copyright 2017 Adaptrum, Inc.
* Written by Alexandru Gagniuc <alex.g@adaptrum.com> for Adaptrum, Inc.
*/
-
-#include <config.h>
#include <common.h>
#include <dm.h>
#include <errno.h>
diff --git a/drivers/net/phy/natsemi.c b/drivers/net/phy/natsemi.c
index 05c7e7c..efde457 100644
--- a/drivers/net/phy/natsemi.c
+++ b/drivers/net/phy/natsemi.c
@@ -5,6 +5,7 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
+#include <common.h>
#include <phy.h>
/* NatSemi DP83630 */
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 4e610bf..e837eb7 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -7,8 +7,6 @@
*
* Based loosely off of Linux's PHY Lib
*/
-
-#include <config.h>
#include <common.h>
#include <console.h>
#include <dm.h>
@@ -644,6 +642,10 @@
dev->link = 0;
dev->interface = interface;
+#ifdef CONFIG_DM_ETH
+ dev->node = ofnode_null();
+#endif
+
dev->autoneg = AUTONEG_ENABLE;
dev->addr = addr;
diff --git a/drivers/net/phy/realtek.c b/drivers/net/phy/realtek.c
index b0867af..b3e6578 100644
--- a/drivers/net/phy/realtek.c
+++ b/drivers/net/phy/realtek.c
@@ -6,7 +6,6 @@
* author Andy Fleming
* Copyright 2016 Karsten Merker <merker@debian.org>
*/
-#include <config.h>
#include <common.h>
#include <linux/bitops.h>
#include <phy.h>
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index 2f92957..7740a25 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -9,6 +9,7 @@
* Some code copied from linux kernel
* Copyright (c) 2006 Herbert Valerio Riedel <hvr@gnu.org>
*/
+#include <common.h>
#include <miiphy.h>
/* This code does not check the partner abilities. */
diff --git a/drivers/net/phy/teranetics.c b/drivers/net/phy/teranetics.c
index d674e8f..49d6a1a 100644
--- a/drivers/net/phy/teranetics.c
+++ b/drivers/net/phy/teranetics.c
@@ -5,7 +5,6 @@
* Copyright 2010-2011 Freescale Semiconductor, Inc.
* author Andy Fleming
*/
-#include <config.h>
#include <common.h>
#include <phy.h>
diff --git a/drivers/net/phy/ti.c b/drivers/net/phy/ti.c
index 8f3ed8a..f870e6d 100644
--- a/drivers/net/phy/ti.c
+++ b/drivers/net/phy/ti.c
@@ -8,11 +8,9 @@
#include <linux/compat.h>
#include <malloc.h>
-#include <fdtdec.h>
#include <dm.h>
#include <dt-bindings/net/ti-dp83867.h>
-DECLARE_GLOBAL_DATA_PTR;
/* TI DP83867 */
#define DP83867_DEVADDR 0x1f
@@ -24,6 +22,7 @@
#define DP83867_CTRL 0x1f
/* Extended Registers */
+#define DP83867_CFG4 0x0031
#define DP83867_RGMIICTL 0x0032
#define DP83867_RGMIIDCTL 0x0086
#define DP83867_IO_MUX_CFG 0x0170
@@ -95,6 +94,7 @@
int tx_id_delay;
int fifo_depth;
int io_impedance;
+ bool rxctrl_strap_quirk;
};
/**
@@ -172,25 +172,31 @@
static int dp83867_of_init(struct phy_device *phydev)
{
struct dp83867_private *dp83867 = phydev->priv;
- struct udevice *dev = phydev->dev;
- int node = dev_of_offset(dev);
- const void *fdt = gd->fdt_blob;
+ ofnode node;
- if (fdtdec_get_bool(fdt, node, "ti,max-output-impedance"))
+ node = phy_get_ofnode(phydev);
+ if (!ofnode_valid(node))
+ return -EINVAL;
+
+ if (ofnode_read_bool(node, "ti,max-output-impedance"))
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MAX;
- else if (fdtdec_get_bool(fdt, node, "ti,min-output-impedance"))
+ else if (ofnode_read_bool(node, "ti,min-output-impedance"))
dp83867->io_impedance = DP83867_IO_MUX_CFG_IO_IMPEDANCE_MIN;
else
dp83867->io_impedance = -EINVAL;
- dp83867->rx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
- "ti,rx-internal-delay", -1);
+ if (ofnode_read_bool(node, "ti,dp83867-rxctrl-strap-quirk"))
+ dp83867->rxctrl_strap_quirk = true;
+ dp83867->rx_id_delay = ofnode_read_u32_default(node,
+ "ti,rx-internal-delay",
+ -1);
- dp83867->tx_id_delay = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
- "ti,tx-internal-delay", -1);
+ dp83867->tx_id_delay = ofnode_read_u32_default(node,
+ "ti,tx-internal-delay",
+ -1);
- dp83867->fifo_depth = fdtdec_get_uint(gd->fdt_blob, dev_of_offset(dev),
- "ti,fifo-depth", -1);
+ dp83867->fifo_depth = ofnode_read_u32_default(node, "ti,fifo-depth",
+ -1);
return 0;
}
@@ -232,6 +238,15 @@
phy_write(phydev, MDIO_DEVAD_NONE, DP83867_CTRL,
val | DP83867_SW_RESTART);
+ /* Mode 1 or 2 workaround */
+ if (dp83867->rxctrl_strap_quirk) {
+ val = phy_read_mmd_indirect(phydev, DP83867_CFG4,
+ DP83867_DEVADDR, phydev->addr);
+ val &= ~BIT(7);
+ phy_write_mmd_indirect(phydev, DP83867_CFG4,
+ DP83867_DEVADDR, phydev->addr, val);
+ }
+
if (phy_interface_is_rgmii(phydev)) {
ret = phy_write(phydev, MDIO_DEVAD_NONE, MII_DP83867_PHYCTRL,
(DP83867_MDI_CROSSOVER_AUTO << DP83867_MDI_CROSSOVER) |
diff --git a/drivers/net/phy/vitesse.c b/drivers/net/phy/vitesse.c
index 9df4a3f..eca26c9 100644
--- a/drivers/net/phy/vitesse.c
+++ b/drivers/net/phy/vitesse.c
@@ -6,6 +6,7 @@
* Original Author: Andy Fleming
* Add vsc8662 phy support - Priyanka Jain
*/
+#include <common.h>
#include <miiphy.h>
/* Cicada Auxiliary Control/Status Register */
diff --git a/drivers/net/phy/xilinx_phy.c b/drivers/net/phy/xilinx_phy.c
index 004cfcf..3aa8891 100644
--- a/drivers/net/phy/xilinx_phy.c
+++ b/drivers/net/phy/xilinx_phy.c
@@ -10,8 +10,6 @@
#include <phy.h>
#include <dm.h>
-DECLARE_GLOBAL_DATA_PTR;
-
#define MII_PHY_STATUS_SPD_MASK 0x0C00
#define MII_PHY_STATUS_FULLDUPLEX 0x1000
#define MII_PHY_STATUS_1000 0x0800
@@ -101,10 +99,14 @@
static int xilinxphy_of_init(struct phy_device *phydev)
{
u32 phytype;
+ ofnode node;
debug("%s\n", __func__);
- phytype = fdtdec_get_int(gd->fdt_blob, dev_of_offset(phydev->dev),
- "xlnx,phy-type", -1);
+ node = phy_get_ofnode(phydev);
+ if (!ofnode_valid(node))
+ return -EINVAL;
+
+ phytype = ofnode_read_u32_default(node, "xlnx,phy-type", -1);
if (phytype == XAE_PHY_TYPE_1000BASE_X)
phydev->flags |= XAE_PHY_TYPE_1000BASE_X;
diff --git a/drivers/net/sandbox-raw-bus.c b/drivers/net/sandbox-raw-bus.c
new file mode 100644
index 0000000..76d65af
--- /dev/null
+++ b/drivers/net/sandbox-raw-bus.c
@@ -0,0 +1,66 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (c) 2018 National Instruments
+ * Copyright (c) 2018 Joe Hershberger <joe.hershberger@ni.com>
+ */
+
+#include <common.h>
+#include <asm/eth-raw-os.h>
+#include <dm.h>
+#include <errno.h>
+#include <dm/device-internal.h>
+#include <dm/lists.h>
+
+static int eth_raw_bus_post_bind(struct udevice *dev)
+{
+ struct sandbox_eth_raw_if_nameindex *ni, *i;
+ struct udevice *child;
+ struct eth_sandbox_raw_priv *priv;
+ char *ub_ifname;
+ static const char ub_ifname_pfx[] = "host_";
+ u32 skip_localhost = 0;
+
+ ni = sandbox_eth_raw_if_nameindex();
+ if (!ni)
+ return -EINVAL;
+
+ dev_read_u32(dev, "skip-localhost", &skip_localhost);
+ for (i = ni; !(i->if_index == 0 && !i->if_name); i++) {
+ int local = sandbox_eth_raw_os_is_local(i->if_name);
+
+ if (local < 0)
+ continue;
+ if (skip_localhost && local)
+ continue;
+
+ ub_ifname = calloc(IFNAMSIZ + sizeof(ub_ifname_pfx), 1);
+ strcpy(ub_ifname, ub_ifname_pfx);
+ strncat(ub_ifname, i->if_name, IFNAMSIZ);
+ device_bind_driver(dev, "eth_sandbox_raw", ub_ifname, &child);
+
+ device_set_name_alloced(child);
+ device_probe(child);
+ priv = dev_get_priv(child);
+ if (priv) {
+ memcpy(priv->host_ifname, i->if_name, IFNAMSIZ);
+ priv->host_ifindex = i->if_index;
+ priv->local = local;
+ }
+ }
+
+ sandbox_eth_raw_if_freenameindex(ni);
+
+ return 0;
+}
+
+static const struct udevice_id sandbox_eth_raw_bus_ids[] = {
+ { .compatible = "sandbox,eth-raw-bus" },
+ { }
+};
+
+U_BOOT_DRIVER(sandbox_eth_raw_bus) = {
+ .name = "sb_eth_raw_bus",
+ .id = UCLASS_SIMPLE_BUS,
+ .of_match = sandbox_eth_raw_bus_ids,
+ .bind = eth_raw_bus_post_bind,
+};
diff --git a/drivers/net/sandbox-raw.c b/drivers/net/sandbox-raw.c
index 3f8020f..09cc678 100644
--- a/drivers/net/sandbox-raw.c
+++ b/drivers/net/sandbox-raw.c
@@ -21,21 +21,18 @@
{
struct eth_sandbox_raw_priv *priv = dev_get_priv(dev);
struct eth_pdata *pdata = dev_get_platdata(dev);
- const char *interface;
+ int ret;
debug("eth_sandbox_raw: Start\n");
- interface = fdt_getprop(gd->fdt_blob, dev_of_offset(dev),
- "host-raw-interface", NULL);
- if (interface == NULL)
- return -EINVAL;
-
- if (strcmp(interface, "lo") == 0) {
- priv->local = 1;
+ ret = sandbox_eth_raw_os_start(priv, pdata->enetaddr);
+ if (priv->local) {
env_set("ipaddr", "127.0.0.1");
env_set("serverip", "127.0.0.1");
+ net_ip = string_to_ip("127.0.0.1");
+ net_server_ip = net_ip;
}
- return sandbox_eth_raw_os_start(interface, pdata->enetaddr, priv);
+ return ret;
}
static int sb_eth_raw_send(struct udevice *dev, void *packet, int length)
@@ -133,18 +130,54 @@
sandbox_eth_raw_os_stop(priv);
}
+static int sb_eth_raw_read_rom_hwaddr(struct udevice *dev)
+{
+ struct eth_pdata *pdata = dev_get_platdata(dev);
+
+ net_random_ethaddr(pdata->enetaddr);
+
+ return 0;
+}
+
static const struct eth_ops sb_eth_raw_ops = {
.start = sb_eth_raw_start,
.send = sb_eth_raw_send,
.recv = sb_eth_raw_recv,
.stop = sb_eth_raw_stop,
+ .read_rom_hwaddr = sb_eth_raw_read_rom_hwaddr,
};
static int sb_eth_raw_ofdata_to_platdata(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_sandbox_raw_priv *priv = dev_get_priv(dev);
+ const char *ifname;
+ u32 local;
+ int ret;
+
+ pdata->iobase = dev_read_addr(dev);
+
+ ifname = dev_read_string(dev, "host-raw-interface");
+ if (ifname) {
+ strncpy(priv->host_ifname, ifname, IFNAMSIZ);
+ printf(": Using %s from DT\n", priv->host_ifname);
+ }
+ if (dev_read_u32(dev, "host-raw-interface-idx",
+ &priv->host_ifindex) < 0) {
+ priv->host_ifindex = 0;
+ } else {
+ ret = sandbox_eth_raw_os_idx_to_name(priv);
+ if (ret < 0)
+ return ret;
+ printf(": Using interface index %d from DT (%s)\n",
+ priv->host_ifindex, priv->host_ifname);
+ }
+
+ local = sandbox_eth_raw_os_is_local(priv->host_ifname);
+ if (local < 0)
+ return local;
+ priv->local = local;
- pdata->iobase = devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/net/sandbox.c b/drivers/net/sandbox.c
index b34712b..b71c8f8 100644
--- a/drivers/net/sandbox.c
+++ b/drivers/net/sandbox.c
@@ -59,10 +59,8 @@
debug("eth_sandbox: Start\n");
- fdtdec_get_byte_array(gd->fdt_blob, dev_of_offset(dev),
- "fake-host-hwaddr", priv->fake_host_hwaddr,
- ARP_HLEN);
priv->recv_packet_buffer = net_rx_packets[0];
+
return 0;
}
@@ -203,8 +201,18 @@
static int sb_eth_ofdata_to_platdata(struct udevice *dev)
{
struct eth_pdata *pdata = dev_get_platdata(dev);
+ struct eth_sandbox_priv *priv = dev_get_priv(dev);
+ const u8 *mac;
+
+ pdata->iobase = dev_read_addr(dev);
+
+ mac = dev_read_u8_array_ptr(dev, "fake-host-hwaddr", ARP_HLEN);
+ if (!mac) {
+ printf("'fake-host-hwaddr' is missing from the DT\n");
+ return -EINVAL;
+ }
+ memcpy(priv->fake_host_hwaddr, mac, ARP_HLEN);
- pdata->iobase = devfdt_get_addr(dev);
return 0;
}
diff --git a/drivers/net/zynq_gem.c b/drivers/net/zynq_gem.c
index d1138fe..68d1c2f 100644
--- a/drivers/net/zynq_gem.c
+++ b/drivers/net/zynq_gem.c
@@ -178,7 +178,7 @@
struct zynq_gem_regs *iobase;
phy_interface_t interface;
struct phy_device *phydev;
- int phy_of_handle;
+ ofnode phy_of_node;
struct mii_dev *bus;
struct clk clk;
u32 max_speed;
@@ -348,9 +348,7 @@
}
priv->phydev->advertising = priv->phydev->supported;
-
- if (priv->phy_of_handle > 0)
- dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle);
+ priv->phydev->node = priv->phy_of_node;
return phy_config(priv->phydev);
}
@@ -693,21 +691,23 @@
{
struct eth_pdata *pdata = dev_get_platdata(dev);
struct zynq_gem_priv *priv = dev_get_priv(dev);
- int node = dev_of_offset(dev);
+ struct ofnode_phandle_args phandle_args;
const char *phy_mode;
- pdata->iobase = (phys_addr_t)devfdt_get_addr(dev);
+ pdata->iobase = (phys_addr_t)dev_read_addr(dev);
priv->iobase = (struct zynq_gem_regs *)pdata->iobase;
/* Hardcode for now */
priv->phyaddr = -1;
- priv->phy_of_handle = fdtdec_lookup_phandle(gd->fdt_blob, node,
- "phy-handle");
- if (priv->phy_of_handle > 0)
- priv->phyaddr = fdtdec_get_int(gd->fdt_blob,
- priv->phy_of_handle, "reg", -1);
+ if (dev_read_phandle_with_args(dev, "phy-handle", NULL, 0, 0,
+ &phandle_args)) {
+ debug("phy-handle does not exist %s\n", dev->name);
+ return -ENOENT;
+ }
- phy_mode = fdt_getprop(gd->fdt_blob, node, "phy-mode", NULL);
+ priv->phyaddr = ofnode_read_u32_default(phandle_args.node, "reg", -1);
+ priv->phy_of_node = phandle_args.node;
+ phy_mode = dev_read_prop(dev, "phy-mode", NULL);
if (phy_mode)
pdata->phy_interface = phy_get_interface_by_name(phy_mode);
if (pdata->phy_interface == -1) {
@@ -716,10 +716,8 @@
}
priv->interface = pdata->phy_interface;
- priv->max_speed = fdtdec_get_uint(gd->fdt_blob, priv->phy_of_handle,
- "max-speed", SPEED_1000);
- priv->int_pcs = fdtdec_get_bool(gd->fdt_blob, node,
- "is-internal-pcspma");
+ priv->max_speed = dev_read_u32_default(dev, "max-speed", SPEED_1000);
+ priv->int_pcs = dev_read_bool(dev, "is-internal-pcspma");
printf("ZYNQ GEM: %lx, phyaddr %x, interface %s\n", (ulong)priv->iobase,
priv->phyaddr, phy_string_for_interface(priv->interface));
diff --git a/drivers/power/pmic/Kconfig b/drivers/power/pmic/Kconfig
index d504c28..cba48e1 100644
--- a/drivers/power/pmic/Kconfig
+++ b/drivers/power/pmic/Kconfig
@@ -131,7 +131,7 @@
Binding info: doc/device-tree-bindings/pmic/s2mps11.txt
config DM_PMIC_SANDBOX
- bool "Enable Driver Model for emulated Sandbox PMIC "
+ bool "Enable Driver Model for emulated Sandbox PMIC"
depends on DM_PMIC
---help---
Enable the driver for Sandbox PMIC emulation. The emulated PMIC device
diff --git a/drivers/rtc/date.c b/drivers/rtc/date.c
index f2568cf..c57317d 100644
--- a/drivers/rtc/date.c
+++ b/drivers/rtc/date.c
@@ -9,7 +9,8 @@
#include <errno.h>
#include <rtc.h>
-#if defined(CONFIG_CMD_DATE) || defined(CONFIG_TIMESTAMP)
+#if defined(CONFIG_CMD_DATE) || defined(CONFIG_DM_RTC) || \
+ defined(CONFIG_TIMESTAMP)
#define FEBRUARY 2
#define STARTOFTIME 1970
diff --git a/drivers/rtc/mc146818.c b/drivers/rtc/mc146818.c
index 744c0f4..b98c39d 100644
--- a/drivers/rtc/mc146818.c
+++ b/drivers/rtc/mc146818.c
@@ -143,7 +143,8 @@
mc146818_write8(RTC_YEAR, bin2bcd(tmp->tm_year % 100));
mc146818_write8(RTC_MONTH, bin2bcd(tmp->tm_mon));
- mc146818_write8(RTC_DAY_OF_WEEK, bin2bcd(tmp->tm_wday));
+ /* Sunday = 1, Saturday = 7 */
+ mc146818_write8(RTC_DAY_OF_WEEK, bin2bcd(tmp->tm_wday + 1));
mc146818_write8(RTC_DATE_OF_MONTH, bin2bcd(tmp->tm_mday));
mc146818_write8(RTC_HOURS, bin2bcd(tmp->tm_hour));
mc146818_write8(RTC_MINUTES, bin2bcd(tmp->tm_min));
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index d2e0072..a60dabe 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -10,6 +10,7 @@
*/
#include <common.h>
+#include <console.h>
#include <dm.h>
#include <fdtdec.h>
#include <lcd.h>
@@ -69,6 +70,9 @@
os_tty_raw(0, state->term_raw == STATE_TERM_RAW_WITH_SIGS);
priv->start_of_line = 0;
+ if (state->term_raw != STATE_TERM_RAW)
+ disable_ctrlc(1);
+
return 0;
}
diff --git a/drivers/tpm/Kconfig b/drivers/tpm/Kconfig
index 93264dd..94629df 100644
--- a/drivers/tpm/Kconfig
+++ b/drivers/tpm/Kconfig
@@ -4,9 +4,6 @@
menu "TPM support"
-comment "Please select only one TPM revision"
- depends on TPM_V1 && TPM_V2
-
config TPM_V1
bool "TPMv1.x support"
depends on TPM
@@ -15,11 +12,12 @@
Major TPM versions are not compatible at all, choose either
one or the other. This option enables TPMv1.x drivers/commands.
-if TPM_V1 && !TPM_V2
+if TPM_V1
config TPM_TIS_SANDBOX
bool "Enable sandbox TPM driver"
depends on TPM_V1 && SANDBOX
+ default y
help
This driver emulates a TPMv1.x, providing access to base functions
such as reading and writing TPM private data. This is enough to
@@ -62,7 +60,6 @@
config TPM_TIS_LPC
bool "Enable support for Infineon SLB9635/45 TPMs on LPC"
depends on TPM_V1 && X86
- select TPM_DRIVER_SELECTED
help
This driver supports Infineon TPM devices connected on the LPC bus.
The usual tpm operations and the 'tpm' command can be used to talk
@@ -123,16 +120,17 @@
config TPM_V2
bool "TPMv2.x support"
depends on TPM
+ default y
help
Major TPM versions are not compatible at all, choose either
one or the other. This option enables TPMv2.x drivers/commands.
-if TPM_V2 && !TPM_V1
+if TPM_V2
config TPM2_TIS_SANDBOX
bool "Enable sandbox TPMv2.x driver"
depends on TPM_V2 && SANDBOX
- select TPM_DRIVER_SELECTED
+ default y
help
This driver emulates a TPMv2.x, providing access to base functions
such as basic configuration, PCR extension and PCR read. Extended
@@ -141,7 +139,6 @@
config TPM2_TIS_SPI
bool "Enable support for TPMv2.x SPI chips"
depends on TPM_V2 && DM_SPI
- select TPM_DRIVER_SELECTED
help
This driver supports TPMv2.x devices connected on the SPI bus.
The usual TPM operations and the 'tpm' command can be used to talk
diff --git a/drivers/tpm/tpm-uclass.c b/drivers/tpm/tpm-uclass.c
index 412697e..c83f53a 100644
--- a/drivers/tpm/tpm-uclass.c
+++ b/drivers/tpm/tpm-uclass.c
@@ -7,11 +7,8 @@
#include <common.h>
#include <dm.h>
#include <linux/unaligned/be_byteshift.h>
-#if defined(CONFIG_TPM_V1)
#include <tpm-v1.h>
-#elif defined(CONFIG_TPM_V2)
#include <tpm-v2.h>
-#endif
#include "tpm_internal.h"
int tpm_open(struct udevice *dev)
diff --git a/drivers/tpm/tpm2_tis_sandbox.c b/drivers/tpm/tpm2_tis_sandbox.c
index 3240cc5..66f6c9b 100644
--- a/drivers/tpm/tpm2_tis_sandbox.c
+++ b/drivers/tpm/tpm2_tis_sandbox.c
@@ -232,7 +232,7 @@
*recv += sizeof(rc);
/* Add trailing \0 */
- *recv = '\0';
+ *recv = NULL;
return 0;
}
@@ -590,6 +590,9 @@
struct sandbox_tpm2 *tpm = dev_get_priv(dev);
struct tpm_chip_priv *priv = dev_get_uclass_priv(dev);
+ /* Use the TPM v2 stack */
+ priv->version = TPM_V2;
+
memset(tpm, 0, sizeof(*tpm));
priv->pcr_count = 32;
diff --git a/drivers/tpm/tpm2_tis_spi.c b/drivers/tpm/tpm2_tis_spi.c
index c5d17a6..8878130 100644
--- a/drivers/tpm/tpm2_tis_spi.c
+++ b/drivers/tpm/tpm2_tis_spi.c
@@ -510,6 +510,7 @@
static int tpm_tis_spi_open(struct udevice *dev)
{
struct tpm_chip *chip = dev_get_priv(dev);
+ struct tpm_chip_priv *priv = dev_get_uclass_priv(dev);
if (chip->is_open)
return -EBUSY;
@@ -575,6 +576,9 @@
struct tpm_chip *chip = dev_get_priv(dev);
int ret;
+ /* Use the TPM v2 stack */
+ priv->version = TPM_V2;
+
if (IS_ENABLED(CONFIG_DM_GPIO)) {
struct gpio_desc reset_gpio;
diff --git a/dts/Kconfig b/dts/Kconfig
index a1a92f2..43f85c2 100644
--- a/dts/Kconfig
+++ b/dts/Kconfig
@@ -202,7 +202,7 @@
endchoice
choice
- prompt "Location of uncompressed DTBs "
+ prompt "Location of uncompressed DTBs"
depends on (SPL_MULTI_DTB_FIT_GZIP || SPL_MULTI_DTB_FIT_LZO)
default SPL_MULTI_DTB_FIT_DYN_ALLOC if SYS_MALLOC_F
diff --git a/env/env.c b/env/env.c
index 5c0842a..e033b46 100644
--- a/env/env.c
+++ b/env/env.c
@@ -119,21 +119,12 @@
*/
__weak enum env_location env_get_location(enum env_operation op, int prio)
{
- switch (op) {
- case ENVOP_GET_CHAR:
- case ENVOP_INIT:
- case ENVOP_LOAD:
- if (prio >= ARRAY_SIZE(env_locations))
- return ENVL_UNKNOWN;
+ if (prio >= ARRAY_SIZE(env_locations))
+ return ENVL_UNKNOWN;
- gd->env_load_location = env_locations[prio];
- return gd->env_load_location;
+ gd->env_load_prio = prio;
- case ENVOP_SAVE:
- return gd->env_load_location;
- }
-
- return ENVL_UNKNOWN;
+ return env_locations[prio];
}
@@ -205,22 +196,29 @@
return 0;
}
+ /*
+ * In case of invalid environment, we set the 'default' env location
+ * to the highest priority. In this way, next calls to env_save()
+ * will restore the environment at the right place.
+ */
+ env_get_location(ENVOP_LOAD, 0);
+
return -ENODEV;
}
int env_save(void)
{
struct env_driver *drv;
- int prio;
- for (prio = 0; (drv = env_driver_lookup(ENVOP_SAVE, prio)); prio++) {
+ drv = env_driver_lookup(ENVOP_SAVE, gd->env_load_prio);
+ if (drv) {
int ret;
if (!drv->save)
- continue;
+ return -ENODEV;
if (!env_has_inited(drv->location))
- continue;
+ return -ENODEV;
printf("Saving Environment to %s... ", drv->name);
ret = drv->save();
diff --git a/include/asm-generic/global_data.h b/include/asm-generic/global_data.h
index 0fd4900..c83fc01 100644
--- a/include/asm-generic/global_data.h
+++ b/include/asm-generic/global_data.h
@@ -50,7 +50,7 @@
unsigned long env_addr; /* Address of Environment struct */
unsigned long env_valid; /* Environment valid? enum env_valid */
unsigned long env_has_init; /* Bitmask of boolean of struct env_location offsets */
- int env_load_location;
+ int env_load_prio; /* Priority of the loaded environment */
unsigned long ram_base; /* Base address of RAM used by U-Boot */
unsigned long ram_top; /* Top address of RAM used by U-Boot */
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 9aa082b..9dd560e 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -17,7 +17,6 @@
#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
#else
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -178,7 +177,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (30 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#ifdef CONFIG_PHYS_64BIT
#define CONFIG_SYS_DCSRBAR 0xf0000000
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index 0ae43fa..4de25a3 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -303,7 +303,6 @@
#define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
#define CONFIG_SPL_RELOC_TEXT_BASE 0xf8f81000
#define CONFIG_SPL_RELOC_STACK (CONFIG_SYS_INIT_L2_ADDR + 128 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (32 << 10)
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SYS_INIT_L2_ADDR + 160 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (96 << 10)
#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 61ab0cc..6024cce 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -497,7 +497,6 @@
#define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
#define CONFIG_SPL_RELOC_TEXT_BASE 0xD0001000
#define CONFIG_SPL_RELOC_STACK (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (16 << 10)
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SYS_INIT_L2_ADDR + 128 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (128 << 10)
#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L2_ADDR + 96 * 1024)
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index 7c0afb4..3110cb1 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -306,7 +306,6 @@
#define CONFIG_SYS_INIT_L2_END (CONFIG_SYS_INIT_L2_ADDR + CONFIG_SYS_L2_SIZE)
#define CONFIG_SPL_RELOC_TEXT_BASE 0xf8f81000
#define CONFIG_SPL_RELOC_STACK (CONFIG_SYS_INIT_L2_ADDR + 116 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (32 << 10)
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SYS_INIT_L2_ADDR + 148 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (108 << 10)
#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index c91781f..d88c967 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -29,7 +29,6 @@
#ifdef CONFIG_RAMBOOT_PBL
#define CONFIG_SYS_FSL_PBL_PBI board/freescale/t102xqds/t1024_pbi.cfg
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -200,7 +199,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (30 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#ifdef CONFIG_PHYS_64BIT
#define CONFIG_SYS_DCSRBAR 0xf0000000
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index fc35d66..27948ba 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -32,7 +32,6 @@
#ifdef CONFIG_RAMBOOT_PBL
#define CONFIG_SYS_FSL_PBL_PBI board/freescale/t102xrdb/t1024_pbi.cfg
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -223,7 +222,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (30 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#ifdef CONFIG_PHYS_64BIT
#define CONFIG_SYS_DCSRBAR 0xf0000000
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 4d2e969..4d09774 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -21,7 +21,6 @@
#endif
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -236,7 +235,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (30 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#define CONFIG_SYS_DCSRBAR 0xf0000000
#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index b0a1a0a..68ce7aa 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -36,7 +36,6 @@
#define CONFIG_SYS_FSL_PBL_PBI board/freescale/t208xqds/t208x_pbi.cfg
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -180,7 +179,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#define CONFIG_SYS_DCSRBAR 0xf0000000
#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 9179858..90043ee 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -30,7 +30,6 @@
#define CONFIG_SYS_FSL_PBL_PBI board/freescale/t208xrdb/t2080_pbi.cfg
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -165,7 +164,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#define CONFIG_SYS_DCSRBAR 0xf0000000
#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index 9714e44..804d41b 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -21,7 +21,6 @@
#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
#else
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 2399a5a..4abe554 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -21,7 +21,6 @@
#define CONFIG_RESET_VECTOR_ADDRESS 0xfffffffc
#else
#define CONFIG_SPL_FLUSH_IMAGE
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0xFFFD8000
#define CONFIG_SPL_PAD_TO 0x40000
#define CONFIG_SPL_MAX_SIZE 0x28000
@@ -100,7 +99,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#define CONFIG_SYS_DCSRBAR 0xf0000000
#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index 73f23a6..656d10d 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -60,7 +60,6 @@
/* SD boot SPL */
#ifdef CONFIG_SD_BOOT
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0x10000000
#define CONFIG_SPL_MAX_SIZE 0x17000
@@ -90,7 +89,6 @@
/* NAND SPL */
#ifdef CONFIG_NAND_BOOT
#define CONFIG_SPL_PBL_PAD
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0x10000000
#define CONFIG_SPL_MAX_SIZE 0x1a000
#define CONFIG_SPL_STACK 0x1001d000
diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index 65ce098..cdb73f6 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -16,10 +16,12 @@
#define SPL_NO_USB
#define SPL_NO_SATA
#endif
-#if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_NAND_BOOT))
+#if defined(CONFIG_SPL_BUILD) && \
+ (defined(CONFIG_NAND_BOOT) || defined(CONFIG_QSPI_BOOT))
#define SPL_NO_MMC
#endif
-#if (defined(CONFIG_SPL_BUILD) && defined(CONFIG_SD_BOOT))
+#if defined(CONFIG_SPL_BUILD) && \
+ !defined(CONFIG_SPL_FSL_LS_PPA)
#define SPL_NO_IFC
#endif
@@ -58,16 +60,6 @@
/* SD boot SPL */
#ifdef CONFIG_SD_BOOT
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
-#define CONFIG_SPL_LIBCOMMON_SUPPORT
-#define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_ENV_SUPPORT
-#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
-#define CONFIG_SPL_WATCHDOG_SUPPORT
-#define CONFIG_SPL_I2C_SUPPORT
-#define CONFIG_SPL_DRIVERS_MISC_SUPPORT
-
-#define CONFIG_SPL_MMC_SUPPORT
#define CONFIG_SPL_TEXT_BASE 0x10000000
#define CONFIG_SPL_MAX_SIZE 0x1f000 /* 124 KiB */
#define CONFIG_SPL_STACK 0x10020000
@@ -92,10 +84,24 @@
#endif /* ifdef CONFIG_SECURE_BOOT */
#endif
+#if defined(CONFIG_QSPI_BOOT) && defined(CONFIG_SPL)
+#define CONFIG_SPL_TARGET "spl/u-boot-spl.pbl"
+#define CONFIG_SPL_TEXT_BASE 0x10000000
+#define CONFIG_SPL_MAX_SIZE 0x1f000
+#define CONFIG_SPL_STACK 0x10020000
+#define CONFIG_SPL_PAD_TO 0x20000
+#define CONFIG_SPL_BSS_START_ADDR 0x8f000000
+#define CONFIG_SPL_BSS_MAX_SIZE 0x80000
+#define CONFIG_SYS_SPL_MALLOC_START (CONFIG_SPL_BSS_START_ADDR + \
+ CONFIG_SPL_BSS_MAX_SIZE)
+#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
+#define CONFIG_SYS_MONITOR_LEN 0x100000
+#define CONFIG_SYS_UBOOT_START CONFIG_SYS_TEXT_BASE
+#endif
+
/* NAND SPL */
#ifdef CONFIG_NAND_BOOT
#define CONFIG_SPL_PBL_PAD
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_LIBCOMMON_SUPPORT
#define CONFIG_SPL_LIBGENERIC_SUPPORT
#define CONFIG_SPL_ENV_SUPPORT
diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h
index 2d45bbc..87d8cf5 100644
--- a/include/configs/ls1046ardb.h
+++ b/include/configs/ls1046ardb.h
@@ -31,17 +31,21 @@
#define CONFIG_FSL_DDR_INTERACTIVE /* Interactive debugging */
#endif
-#ifdef CONFIG_RAMBOOT_PBL
-#define CONFIG_SYS_FSL_PBL_PBI board/freescale/ls1046ardb/ls1046ardb_pbi.cfg
-#endif
-
#ifdef CONFIG_SD_BOOT
+#define CONFIG_SYS_FSL_PBL_PBI board/freescale/ls1046ardb/ls1046ardb_pbi.cfg
#ifdef CONFIG_EMMC_BOOT
#define CONFIG_SYS_FSL_PBL_RCW \
board/freescale/ls1046ardb/ls1046ardb_rcw_emmc.cfg
#else
#define CONFIG_SYS_FSL_PBL_RCW board/freescale/ls1046ardb/ls1046ardb_rcw_sd.cfg
#endif
+#elif defined(CONFIG_QSPI_BOOT)
+#define CONFIG_SYS_FSL_PBL_RCW \
+ board/freescale/ls1046ardb/ls1046ardb_rcw_qspi.cfg
+#define CONFIG_SYS_FSL_PBL_PBI \
+ board/freescale/ls1046ardb/ls1046ardb_qspi_pbi.cfg
+#define CONFIG_SYS_UBOOT_BASE 0x40100000
+#define CONFIG_SYS_SPL_ARGS_ADDR 0x90000000
#endif
#ifndef SPL_NO_IFC
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index 137a181..031c311 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -195,17 +195,17 @@
#if defined(CONFIG_QSPI_BOOT)
#define CONFIG_BOOTCOMMAND "sf probe 0:0;" \
- "sf read 0x80200000 0xd00000 0x100000;"\
- " fsl_mc apply dpl 0x80200000 &&" \
+ "sf read 0x80001000 0xd00000 0x100000;"\
+ " fsl_mc lazyapply dpl 0x80001000 &&" \
" sf read $kernel_load $kernel_start" \
" $kernel_size && bootm $kernel_load"
#elif defined(CONFIG_SD_BOOT)
-#define CONFIG_BOOTCOMMAND "mmcinfo;mmc read 0x80200000 0x6800 0x800;"\
- " fsl_mc apply dpl 0x80200000 &&" \
+#define CONFIG_BOOTCOMMAND "mmcinfo;mmc read 0x80001000 0x6800 0x800;"\
+ " fsl_mc lazyapply dpl 0x80001000 &&" \
" mmc read $kernel_load $kernel_start" \
" $kernel_size && bootm $kernel_load"
#else /* NOR BOOT*/
-#define CONFIG_BOOTCOMMAND "fsl_mc apply dpl 0x580d00000 &&" \
+#define CONFIG_BOOTCOMMAND "fsl_mc lazyapply dpl 0x580d00000 &&" \
" cp.b $kernel_start $kernel_load" \
" $kernel_size && bootm $kernel_load"
#endif
@@ -224,7 +224,6 @@
#define CONFIG_SPL_LDSCRIPT "arch/arm/cpu/armv8/u-boot-spl.lds"
#define CONFIG_SPL_MAX_SIZE 0x16000
#define CONFIG_SPL_STACK (CONFIG_SYS_FSL_OCRAM_BASE + 0x9ff0)
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0x1800a000
#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00100000
diff --git a/include/configs/ls1088ardb.h b/include/configs/ls1088ardb.h
index 4459994..36243f9 100644
--- a/include/configs/ls1088ardb.h
+++ b/include/configs/ls1088ardb.h
@@ -381,8 +381,8 @@
"installer=load mmc 0:2 $load_addr " \
"/flex_installer_arm64.itb; " \
"env exists mcinitcmd && run mcinitcmd && " \
- "mmc read 0x80200000 0x6800 0x800;" \
- "fsl_mc apply dpl 0x80200000;" \
+ "mmc read 0x80001000 0x6800 0x800;" \
+ "fsl_mc lazyapply dpl 0x80001000;" \
"bootm $load_addr#ls1088ardb\0" \
"qspi_bootcmd=echo Trying load from qspi..;" \
"sf probe && sf read $load_addr " \
@@ -402,11 +402,11 @@
#if defined(CONFIG_QSPI_BOOT)
/* Try to boot an on-QSPI kernel first, then do normal distro boot */
#define CONFIG_BOOTCOMMAND \
- "sf read 0x80200000 0xd00000 0x100000;" \
+ "sf read 0x80001000 0xd00000 0x100000;" \
"env exists mcinitcmd && env exists secureboot " \
" && sf read 0x80780000 0x780000 0x100000 " \
"&& esbc_validate 0x80780000;env exists mcinitcmd " \
- "&& fsl_mc apply dpl 0x80200000;" \
+ "&& fsl_mc lazyapply dpl 0x80001000;" \
"run distro_bootcmd;run qspi_bootcmd;" \
"env exists secureboot && esbc_halt;"
@@ -414,11 +414,11 @@
#elif defined(CONFIG_SD_BOOT)
#define CONFIG_BOOTCOMMAND \
"env exists mcinitcmd && mmcinfo; " \
- "mmc read 0x80200000 0x6800 0x800; " \
+ "mmc read 0x80001000 0x6800 0x800; " \
"env exists mcinitcmd && env exists secureboot " \
- " && mmc read 0x80780000 0x3800 0x10 " \
+ " && mmc read 0x80780000 0x3C00 0x10 " \
"&& esbc_validate 0x80780000;env exists mcinitcmd " \
- "&& fsl_mc apply dpl 0x80200000;" \
+ "&& fsl_mc lazyapply dpl 0x80001000;" \
"run distro_bootcmd;run sd_bootcmd;" \
"env exists secureboot && esbc_halt;"
#endif
diff --git a/include/configs/ls2080a_common.h b/include/configs/ls2080a_common.h
index cc101fd..5024f97 100644
--- a/include/configs/ls2080a_common.h
+++ b/include/configs/ls2080a_common.h
@@ -206,7 +206,6 @@
#define CONFIG_SPL_BSS_MAX_SIZE 0x00100000
#define CONFIG_SPL_MAX_SIZE 0x16000
#define CONFIG_SPL_STACK (CONFIG_SYS_FSL_OCRAM_BASE + 0x9ff0)
-#define CONFIG_SPL_TARGET "u-boot-with-spl.bin"
#define CONFIG_SPL_TEXT_BASE 0x1800a000
#ifdef CONFIG_NAND_BOOT
diff --git a/include/configs/ls2080ardb.h b/include/configs/ls2080ardb.h
index 73a405f..84c6b7b 100644
--- a/include/configs/ls2080ardb.h
+++ b/include/configs/ls2080ardb.h
@@ -281,13 +281,9 @@
/* SPI */
#if defined(CONFIG_FSL_QSPI) || defined(CONFIG_FSL_DSPI)
-#define CONFIG_SPI_FLASH
#ifdef CONFIG_FSL_DSPI
#define CONFIG_SPI_FLASH_STMICRO
#endif
-#ifdef CONFIG_FSL_QSPI
-#define CONFIG_SPI_FLASH_SPANSION
-#endif
#define FSL_QSPI_FLASH_SIZE SZ_64M /* 64MB */
#define FSL_QSPI_FLASH_NUM 2
#endif
diff --git a/include/configs/mv-common.h b/include/configs/mv-common.h
index 79d61c5..8ae521f 100644
--- a/include/configs/mv-common.h
+++ b/include/configs/mv-common.h
@@ -38,14 +38,6 @@
#define CONFIG_SYS_NS16550_COM1 MV_UART_CONSOLE_BASE
#endif
-/*
- * Serial Port configuration
- * The following definitions let you select what serial you want to use
- * for your console driver.
- */
-
-#define CONFIG_SYS_BAUDRATE_TABLE { 9600, 19200, 38400, 57600, \
- 115200,230400, 460800, 921600 }
/* auto boot */
#define CONFIG_PREBOOT
diff --git a/include/configs/openrd.h b/include/configs/openrd.h
index 2b21003..17611bc 100644
--- a/include/configs/openrd.h
+++ b/include/configs/openrd.h
@@ -60,9 +60,7 @@
CONFIG_MTDPARTS_DEFAULT " rw ubi.mtd=2,2048\0" \
"x_bootcmd_kernel=nand read 0x6400000 0x100000 0x300000\0" \
"x_bootcmd_usb=usb start\0" \
- "x_bootargs_root=root=ubi0:rootfs rootfstype=ubifs\0" \
- "mtdids="CONFIG_MTDIDS_DEFAULT"\0" \
- "mtdparts="CONFIG_MTDPARTS_DEFAULT"\0"
+ "x_bootargs_root=root=ubi0:rootfs rootfstype=ubifs\0"
/*
* Ethernet Driver configuration
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 0b9ab72..32104c2 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -511,7 +511,6 @@
#define CONFIG_SPL_RELOC_TEXT_BASE 0xf8f81000
#define CONFIG_SPL_GD_ADDR (CONFIG_SYS_INIT_L2_ADDR + 112 * 1024)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SYS_INIT_L2_ADDR + 116 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (32 << 10)
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SYS_INIT_L2_ADDR + 148 * 1024)
#if defined(CONFIG_TARGET_P2020RDB)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (364 << 10)
diff --git a/include/configs/stih410-b2260.h b/include/configs/stih410-b2260.h
index d8bf3b6..9ce31f4 100644
--- a/include/configs/stih410-b2260.h
+++ b/include/configs/stih410-b2260.h
@@ -7,6 +7,8 @@
#ifndef __CONFIG_H
#define __CONFIG_H
+#include <linux/sizes.h>
+
/* ram memory-related information */
#define CONFIG_NR_DRAM_BANKS 1
#define PHYS_SDRAM_1 0x40000000
@@ -19,6 +21,7 @@
/* Environment */
#define CONFIG_LOADADDR CONFIG_SYS_LOAD_ADDR
+#define CONFIG_SYS_BOOTM_LEN SZ_16M
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
diff --git a/include/configs/t4qds.h b/include/configs/t4qds.h
index 92f8111..b65b633 100644
--- a/include/configs/t4qds.h
+++ b/include/configs/t4qds.h
@@ -60,7 +60,6 @@
#define CONFIG_SPL_RELOC_MALLOC_ADDR (CONFIG_SPL_GD_ADDR + 12 * 1024)
#define CONFIG_SPL_RELOC_MALLOC_SIZE (50 << 10)
#define CONFIG_SPL_RELOC_STACK (CONFIG_SPL_GD_ADDR + 64 * 1024)
-#define CONFIG_SPL_RELOC_STACK_SIZE (22 << 10)
#define CONFIG_SYS_DCSRBAR 0xf0000000
#define CONFIG_SYS_DCSRBAR_PHYS 0xf00000000ull
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 31dfd23..43add0e 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -10,6 +10,35 @@
#ifndef __CONFIG_UNIPHIER_COMMON_H__
#define __CONFIG_UNIPHIER_COMMON_H__
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_bootcmd.h>
+
+#ifdef CONFIG_CMD_MMC
+#define BOOT_TARGET_DEVICE_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1)
+#else
+#define BOOT_TARGET_DEVICE_MMC(func)
+#endif
+
+#ifdef CONFIG_CMD_UBIFS
+#define BOOT_TARGET_DEVICE_UBIFS(func) func(UBIFS, ubifs, 0)
+#else
+#define BOOT_TARGET_DEVICE_UBIFS(func)
+#endif
+
+#ifdef CONFIG_CMD_USB
+#define BOOT_TARGET_DEVICE_USB(func) func(USB, usb, 0)
+#else
+#define BOOT_TARGET_DEVICE_USB(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ BOOT_TARGET_DEVICE_MMC(func) \
+ BOOT_TARGET_DEVICE_UBIFS(func) \
+ BOOT_TARGET_DEVICE_USB(func)
+#else
+#define BOOTENV
+#endif
+
#define CONFIG_ARMV7_PSCI_1_0
/*-----------------------------------------------------------------------
@@ -98,8 +127,6 @@
"third_image=u-boot.bin\0"
#endif
-#define CONFIG_BOOTCOMMAND "run $bootmode"
-
#define CONFIG_ROOTPATH "/nfs/root/path"
#define CONFIG_NFSBOOTCOMMAND \
"setenv bootargs $bootargs root=/dev/nfs rw " \
@@ -110,64 +137,31 @@
#ifdef CONFIG_FIT
#define CONFIG_BOOTFILE "fitImage"
#define LINUXBOOT_ENV_SETTINGS \
- "fit_addr=0x00100000\0" \
- "fit_addr_r=0x85100000\0" \
- "fit_size=0x00f00000\0" \
- "norboot=setexpr fit_addr $nor_base + $fit_addr &&" \
- "bootm $fit_addr\0" \
- "nandboot=nand read $fit_addr_r $fit_addr $fit_size &&" \
- "bootm $fit_addr_r\0" \
- "tftpboot=tftpboot $fit_addr_r $bootfile &&" \
- "bootm $fit_addr_r\0" \
+ "kernel_addr_r=0x85100000\0" \
+ "tftpboot=tftpboot $kernel_addr_r $bootfile &&" \
+ "bootm $kernel_addr_r\0" \
"__nfsboot=run tftpboot\0"
#else
#ifdef CONFIG_ARM64
-#define CONFIG_BOOTFILE "Image.gz"
+#define CONFIG_BOOTFILE "Image"
#define LINUXBOOT_CMD "booti"
-#define KERNEL_ADDR_LOAD "kernel_addr_load=0x85200000\0"
#define KERNEL_ADDR_R "kernel_addr_r=0x82080000\0"
#else
#define CONFIG_BOOTFILE "zImage"
#define LINUXBOOT_CMD "bootz"
-#define KERNEL_ADDR_LOAD "kernel_addr_load=0x80208000\0"
#define KERNEL_ADDR_R "kernel_addr_r=0x80208000\0"
#endif
#define LINUXBOOT_ENV_SETTINGS \
- "fdt_addr=0x00100000\0" \
"fdt_addr_r=0x85100000\0" \
- "fdt_size=0x00008000\0" \
- "kernel_addr=0x00200000\0" \
- KERNEL_ADDR_LOAD \
KERNEL_ADDR_R \
- "kernel_size=0x00e00000\0" \
- "ramdisk_addr=0x01000000\0" \
"ramdisk_addr_r=0x86000000\0" \
- "ramdisk_size=0x00800000\0" \
- "ramdisk_file=rootfs.cpio.uboot\0" \
+ "ramdisk_file=rootfs.cpio.gz\0" \
"boot_common=setexpr bootm_low $kernel_addr_r '&' fe000000 && " \
- "if test $kernel_addr_load = $kernel_addr_r; then " \
- "true; " \
- "else " \
- "unzip $kernel_addr_load $kernel_addr_r; " \
- "fi && " \
LINUXBOOT_CMD " $kernel_addr_r $ramdisk_addr_r $fdt_addr_r\0" \
- "norboot=setexpr kernel_addr_nor $nor_base + $kernel_addr && " \
- "setexpr kernel_size_div4 $kernel_size / 4 && " \
- "cp $kernel_addr_nor $kernel_addr_load $kernel_size_div4 && " \
- "setexpr ramdisk_addr_nor $nor_base + $ramdisk_addr && " \
- "setexpr ramdisk_size_div4 $ramdisk_size / 4 && " \
- "cp $ramdisk_addr_nor $ramdisk_addr_r $ramdisk_size_div4 && " \
- "setexpr fdt_addr_nor $nor_base + $fdt_addr && " \
- "setexpr fdt_size_div4 $fdt_size / 4 && " \
- "cp $fdt_addr_nor $fdt_addr_r $fdt_size_div4 && " \
- "run boot_common\0" \
- "nandboot=nand read $kernel_addr_load $kernel_addr $kernel_size && " \
- "nand read $ramdisk_addr_r $ramdisk_addr $ramdisk_size &&" \
- "nand read $fdt_addr_r $fdt_addr $fdt_size &&" \
- "run boot_common\0" \
- "tftpboot=tftpboot $kernel_addr_load $bootfile && " \
- "tftpboot $ramdisk_addr_r $ramdisk_file &&" \
+ "tftpboot=tftpboot $kernel_addr_r $bootfile && " \
"tftpboot $fdt_addr_r $fdtfile &&" \
+ "tftpboot $ramdisk_addr_r $ramdisk_file &&" \
+ "setenv ramdisk_addr_r $ramdisk_addr_r:$filesize &&" \
"run boot_common\0" \
"__nfsboot=tftpboot $kernel_addr_load $bootfile && " \
"tftpboot $fdt_addr_r $fdtfile &&" \
@@ -178,6 +172,7 @@
#define CONFIG_EXTRA_ENV_SETTINGS \
"netdev=eth0\0" \
"initrd_high=0xffffffffffffffff\0" \
+ "scriptaddr=0x85000000\0" \
"nor_base=0x42000000\0" \
"sramupdate=setexpr tmp_addr $nor_base + 0x50000 &&" \
"tftpboot $tmp_addr $second_image && " \
@@ -201,7 +196,8 @@
"tftpboot $third_image && " \
"usb write $loadaddr 100 f00\0" \
BOOT_IMAGES \
- LINUXBOOT_ENV_SETTINGS
+ LINUXBOOT_ENV_SETTINGS \
+ BOOTENV
#define CONFIG_SYS_BOOTMAPSZ 0x20000000
diff --git a/include/exports.h b/include/exports.h
index ebe81d9..a4b862f 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -3,8 +3,7 @@
#ifndef __ASSEMBLY__
#ifdef CONFIG_PHY_AQUANTIA
-#include <miiphy.h>
-#include <phy.h>
+#include <phy_interface.h>
#endif
struct spi_slave;
diff --git a/include/fdt_support.h b/include/fdt_support.h
index a9a0078..27fe564 100644
--- a/include/fdt_support.h
+++ b/include/fdt_support.h
@@ -205,11 +205,16 @@
int fdt_fixup_nor_flash_size(void *blob);
+struct node_info;
#if defined(CONFIG_FDT_FIXUP_PARTITIONS)
-void fdt_fixup_mtdparts(void *fdt, void *node_info, int node_info_size);
+void fdt_fixup_mtdparts(void *fdt, const struct node_info *node_info,
+ int node_info_size);
#else
-static inline void fdt_fixup_mtdparts(void *fdt, void *node_info,
- int node_info_size) {}
+static inline void fdt_fixup_mtdparts(void *fdt,
+ const struct node_info *node_info,
+ int node_info_size)
+{
+}
#endif
void fdt_del_node_and_alias(void *blob, const char *alias);
diff --git a/include/linux/mtd/mtd.h b/include/linux/mtd/mtd.h
index 0c41140..823e535 100644
--- a/include/linux/mtd/mtd.h
+++ b/include/linux/mtd/mtd.h
@@ -75,10 +75,6 @@
* mode = MTD_OPS_PLACE_OOB or MTD_OPS_RAW)
* @datbuf: data buffer - if NULL only oob data are read/written
* @oobbuf: oob data buffer
- *
- * Note, it is allowed to read more than one OOB area at one go, but not write.
- * The interface assumes that the OOB write requests program only one page's
- * OOB area.
*/
struct mtd_oob_ops {
unsigned int mode;
diff --git a/include/net.h b/include/net.h
index f9984ae..62f82c4 100644
--- a/include/net.h
+++ b/include/net.h
@@ -839,6 +839,20 @@
/* copy a filename (allow for "..." notation, limit length) */
void copy_filename(char *dst, const char *src, int size);
+/* check if serverip is specified in filename from the command line */
+int is_serverip_in_cmd(void);
+
+/**
+ * net_parse_bootfile - Parse the bootfile env var / cmd line param
+ *
+ * @param ipaddr - a pointer to the ipaddr to populate if included in bootfile
+ * @param filename - a pointer to the string to save the filename part
+ * @param max_len - The longest - 1 that the filename part can be
+ *
+ * return 1 if parsed, 0 if bootfile is empty
+ */
+int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len);
+
/* get a random source port */
unsigned int random_port(void);
diff --git a/include/phy.h b/include/phy.h
index 7c3fc5c..d6a8315 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -9,10 +9,12 @@
#ifndef _PHY_H
#define _PHY_H
+#include <dm.h>
#include <linux/list.h>
#include <linux/mii.h>
#include <linux/ethtool.h>
#include <linux/mdio.h>
+#include <phy_interface.h>
#define PHY_FIXED_ID 0xa5a55a5a
@@ -48,60 +50,6 @@
#endif
-typedef enum {
- PHY_INTERFACE_MODE_MII,
- PHY_INTERFACE_MODE_GMII,
- PHY_INTERFACE_MODE_SGMII,
- PHY_INTERFACE_MODE_SGMII_2500,
- PHY_INTERFACE_MODE_QSGMII,
- PHY_INTERFACE_MODE_TBI,
- PHY_INTERFACE_MODE_RMII,
- PHY_INTERFACE_MODE_RGMII,
- PHY_INTERFACE_MODE_RGMII_ID,
- PHY_INTERFACE_MODE_RGMII_RXID,
- PHY_INTERFACE_MODE_RGMII_TXID,
- PHY_INTERFACE_MODE_RTBI,
- PHY_INTERFACE_MODE_XGMII,
- PHY_INTERFACE_MODE_XAUI,
- PHY_INTERFACE_MODE_RXAUI,
- PHY_INTERFACE_MODE_SFI,
- PHY_INTERFACE_MODE_INTERNAL,
- PHY_INTERFACE_MODE_NONE, /* Must be last */
-
- PHY_INTERFACE_MODE_COUNT,
-} phy_interface_t;
-
-static const char *phy_interface_strings[] = {
- [PHY_INTERFACE_MODE_MII] = "mii",
- [PHY_INTERFACE_MODE_GMII] = "gmii",
- [PHY_INTERFACE_MODE_SGMII] = "sgmii",
- [PHY_INTERFACE_MODE_SGMII_2500] = "sgmii-2500",
- [PHY_INTERFACE_MODE_QSGMII] = "qsgmii",
- [PHY_INTERFACE_MODE_TBI] = "tbi",
- [PHY_INTERFACE_MODE_RMII] = "rmii",
- [PHY_INTERFACE_MODE_RGMII] = "rgmii",
- [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
- [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
- [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
- [PHY_INTERFACE_MODE_RTBI] = "rtbi",
- [PHY_INTERFACE_MODE_XGMII] = "xgmii",
- [PHY_INTERFACE_MODE_XAUI] = "xaui",
- [PHY_INTERFACE_MODE_RXAUI] = "rxaui",
- [PHY_INTERFACE_MODE_SFI] = "sfi",
- [PHY_INTERFACE_MODE_INTERNAL] = "internal",
- [PHY_INTERFACE_MODE_NONE] = "",
-};
-
-static inline const char *phy_string_for_interface(phy_interface_t i)
-{
- /* Default to unknown */
- if (i > PHY_INTERFACE_MODE_NONE)
- i = PHY_INTERFACE_MODE_NONE;
-
- return phy_interface_strings[i];
-}
-
-
struct phy_device;
#define MDIO_NAME_LEN 32
@@ -165,6 +113,7 @@
#ifdef CONFIG_DM_ETH
struct udevice *dev;
+ ofnode node;
#else
struct eth_device *dev;
#endif
@@ -235,11 +184,22 @@
struct phy_device *phy_connect(struct mii_dev *bus, int addr,
struct udevice *dev,
phy_interface_t interface);
+static inline ofnode phy_get_ofnode(struct phy_device *phydev)
+{
+ if (ofnode_valid(phydev->node))
+ return phydev->node;
+ else
+ return dev_ofnode(phydev->dev);
+}
#else
void phy_connect_dev(struct phy_device *phydev, struct eth_device *dev);
struct phy_device *phy_connect(struct mii_dev *bus, int addr,
struct eth_device *dev,
phy_interface_t interface);
+static inline ofnode phy_get_ofnode(struct phy_device *phydev)
+{
+ return ofnode_null();
+}
#endif
int phy_startup(struct phy_device *phydev);
int phy_config(struct phy_device *phydev);
diff --git a/include/phy_interface.h b/include/phy_interface.h
new file mode 100644
index 0000000..0760d65
--- /dev/null
+++ b/include/phy_interface.h
@@ -0,0 +1,65 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2011 Freescale Semiconductor, Inc.
+ * Andy Fleming <afleming@gmail.com>
+ *
+ * This file pretty much stolen from Linux's mii.h/ethtool.h/phy.h
+ */
+
+#ifndef _PHY_INTERFACE_H
+#define _PHY_INTERFACE_H
+
+typedef enum {
+ PHY_INTERFACE_MODE_MII,
+ PHY_INTERFACE_MODE_GMII,
+ PHY_INTERFACE_MODE_SGMII,
+ PHY_INTERFACE_MODE_SGMII_2500,
+ PHY_INTERFACE_MODE_QSGMII,
+ PHY_INTERFACE_MODE_TBI,
+ PHY_INTERFACE_MODE_RMII,
+ PHY_INTERFACE_MODE_RGMII,
+ PHY_INTERFACE_MODE_RGMII_ID,
+ PHY_INTERFACE_MODE_RGMII_RXID,
+ PHY_INTERFACE_MODE_RGMII_TXID,
+ PHY_INTERFACE_MODE_RTBI,
+ PHY_INTERFACE_MODE_XGMII,
+ PHY_INTERFACE_MODE_XAUI,
+ PHY_INTERFACE_MODE_RXAUI,
+ PHY_INTERFACE_MODE_SFI,
+ PHY_INTERFACE_MODE_INTERNAL,
+ PHY_INTERFACE_MODE_NONE, /* Must be last */
+
+ PHY_INTERFACE_MODE_COUNT,
+} phy_interface_t;
+
+static const char * const phy_interface_strings[] = {
+ [PHY_INTERFACE_MODE_MII] = "mii",
+ [PHY_INTERFACE_MODE_GMII] = "gmii",
+ [PHY_INTERFACE_MODE_SGMII] = "sgmii",
+ [PHY_INTERFACE_MODE_SGMII_2500] = "sgmii-2500",
+ [PHY_INTERFACE_MODE_QSGMII] = "qsgmii",
+ [PHY_INTERFACE_MODE_TBI] = "tbi",
+ [PHY_INTERFACE_MODE_RMII] = "rmii",
+ [PHY_INTERFACE_MODE_RGMII] = "rgmii",
+ [PHY_INTERFACE_MODE_RGMII_ID] = "rgmii-id",
+ [PHY_INTERFACE_MODE_RGMII_RXID] = "rgmii-rxid",
+ [PHY_INTERFACE_MODE_RGMII_TXID] = "rgmii-txid",
+ [PHY_INTERFACE_MODE_RTBI] = "rtbi",
+ [PHY_INTERFACE_MODE_XGMII] = "xgmii",
+ [PHY_INTERFACE_MODE_XAUI] = "xaui",
+ [PHY_INTERFACE_MODE_RXAUI] = "rxaui",
+ [PHY_INTERFACE_MODE_SFI] = "sfi",
+ [PHY_INTERFACE_MODE_INTERNAL] = "internal",
+ [PHY_INTERFACE_MODE_NONE] = "",
+};
+
+static inline const char *phy_string_for_interface(phy_interface_t i)
+{
+ /* Default to unknown */
+ if (i > PHY_INTERFACE_MODE_NONE)
+ i = PHY_INTERFACE_MODE_NONE;
+
+ return phy_interface_strings[i];
+}
+
+#endif /* _PHY_INTERFACE_H */
diff --git a/include/tpm-common.h b/include/tpm-common.h
index 734c2c9..5f8bc6b 100644
--- a/include/tpm-common.h
+++ b/include/tpm-common.h
@@ -27,26 +27,39 @@
#define TPM_DEV_BUFSIZE 1260
/**
+ * enum tpm_version - The version of the TPM stack to be used
+ * @TPM_V1: Use TPM v1.x stack
+ * @TPM_V2: Use TPM v2.x stack
+ */
+enum tpm_version {
+ TPM_V1 = 0,
+ TPM_V2,
+};
+
+/**
* struct tpm_chip_priv - Information about a TPM, stored by the uclass
*
* These values must be set up by the device's probe() method before
* communcation is attempted. If the device has an xfer() method, this is
* not needed. There is no need to set up @buf.
*
+ * @version: TPM stack to be used
* @duration_ms: Length of each duration type in milliseconds
* @retry_time_ms: Time to wait before retrying receive
+ * @buf: Buffer used during the exchanges with the chip
* @pcr_count: Number of PCR per bank
* @pcr_select_min: Minimum size in bytes of the pcrSelect array
- * @buf: Buffer used during the exchanges with the chip
*/
struct tpm_chip_priv {
+ enum tpm_version version;
+
uint duration_ms[TPM_DURATION_COUNT];
uint retry_time_ms;
-#if defined(CONFIG_TPM_V2)
+ u8 buf[TPM_DEV_BUFSIZE + sizeof(u8)]; /* Max buffer size + addr */
+
+ /* TPM v2 specific data */
uint pcr_count;
uint pcr_select_min;
-#endif
- u8 buf[TPM_DEV_BUFSIZE + sizeof(u8)]; /* Max buffer size + addr */
};
/**
@@ -71,7 +84,7 @@
* After all commands have been completed the caller should call
* close().
*
- * @dev: Device to close
+ * @dev: Device to open
* @return 0 ok OK, -ve on error
*/
int (*open)(struct udevice *dev);
@@ -208,10 +221,25 @@
int tpm_init(void);
/**
- * Retrieve the array containing all the commands.
+ * Retrieve the array containing all the v1 (resp. v2) commands.
*
* @return a cmd_tbl_t array.
*/
-cmd_tbl_t *get_tpm_commands(unsigned int *size);
+#if defined(CONFIG_TPM_V1)
+cmd_tbl_t *get_tpm1_commands(unsigned int *size);
+#else
+static inline cmd_tbl_t *get_tpm1_commands(unsigned int *size)
+{
+ return NULL;
+}
+#endif
+#if defined(CONFIG_TPM_V2)
+cmd_tbl_t *get_tpm2_commands(unsigned int *size);
+#else
+static inline cmd_tbl_t *get_tpm2_commands(unsigned int *size)
+{
+ return NULL;
+}
+#endif
#endif /* __TPM_COMMON_H */
diff --git a/lib/Kconfig b/lib/Kconfig
index a77bf1c..622f3c2 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -334,7 +334,7 @@
config FDT_FIXUP_PARTITIONS
bool "overwrite MTD partitions in DTS through defined in 'mtdparts'"
depends on OF_LIBFDT
- default n
+ depends on CMD_MTDPARTS
help
Allow overwriting defined partitions in the device tree blob
using partition info defined in the 'mtdparts' environment
diff --git a/lib/efi_loader/efi_net.c b/lib/efi_loader/efi_net.c
index e113950..5a3d7be 100644
--- a/lib/efi_loader/efi_net.c
+++ b/lib/efi_loader/efi_net.c
@@ -361,6 +361,7 @@
memcpy(netobj->net_mode.current_address.mac_addr, eth_get_ethaddr(), 6);
netobj->net_mode.hwaddr_size = ARP_HLEN;
netobj->net_mode.max_packet_size = PKTSIZE;
+ netobj->net_mode.if_type = ARP_ETHER;
netobj->pxe.mode = &netobj->pxe_mode;
if (dhcp_ack)
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index c373dde..a208589 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1181,13 +1181,25 @@
}
#if defined(CONFIG_NR_DRAM_BANKS)
+
+static int get_next_memory_node(const void *blob, int startoffset)
+{
+ int mem = -1;
+
+ do {
+ mem = fdt_node_offset_by_prop_value(gd->fdt_blob, mem,
+ "device_type", "memory", 7);
+ } while (!fdtdec_get_is_enabled(blob, mem));
+
+ return mem;
+}
+
int fdtdec_setup_memory_banksize(void)
{
int bank, ret, mem, reg = 0;
struct fdt_resource res;
- mem = fdt_node_offset_by_prop_value(gd->fdt_blob, -1, "device_type",
- "memory", 7);
+ mem = get_next_memory_node(gd->fdt_blob, -1);
if (mem < 0) {
debug("%s: Missing /memory node\n", __func__);
return -EINVAL;
@@ -1197,9 +1209,7 @@
ret = fdt_get_resource(gd->fdt_blob, mem, "reg", reg++, &res);
if (ret == -FDT_ERR_NOTFOUND) {
reg = 0;
- mem = fdt_node_offset_by_prop_value(gd->fdt_blob, mem,
- "device_type",
- "memory", 7);
+ mem = get_next_memory_node(gd->fdt_blob, mem);
if (mem == -FDT_ERR_NOTFOUND)
break;
diff --git a/lib/hashtable.c b/lib/hashtable.c
index ffaa5b6..1c48692 100644
--- a/lib/hashtable.c
+++ b/lib/hashtable.c
@@ -622,7 +622,7 @@
list[n++] = ep;
- totlen += strlen(ep->key) + 2;
+ totlen += strlen(ep->key);
if (sep == '\0') {
totlen += strlen(ep->data);
@@ -662,7 +662,7 @@
return (-1);
}
} else {
- size = totlen + 1;
+ size = totlen;
}
/* Check if the user provided a buffer */
diff --git a/net/eth-uclass.c b/net/eth-uclass.c
index e4b4922..fa3f549 100644
--- a/net/eth-uclass.c
+++ b/net/eth-uclass.c
@@ -307,7 +307,7 @@
struct eth_device_priv *priv;
current = eth_get_dev();
- if (!current || !device_active(current))
+ if (!current || !eth_is_active(current))
return;
eth_get_ops(current)->stop(current);
diff --git a/net/net.c b/net/net.c
index f35695b..31cf306 100644
--- a/net/net.c
+++ b/net/net.c
@@ -216,26 +216,6 @@
/**********************************************************************/
-static int on_bootfile(const char *name, const char *value, enum env_op op,
- int flags)
-{
- if (flags & H_PROGRAMMATIC)
- return 0;
-
- switch (op) {
- case env_op_create:
- case env_op_overwrite:
- copy_filename(net_boot_file_name, value,
- sizeof(net_boot_file_name));
- break;
- default:
- break;
- }
-
- return 0;
-}
-U_BOOT_ENV_CALLBACK(bootfile, on_bootfile);
-
static int on_ipaddr(const char *name, const char *value, enum env_op op,
int flags)
{
@@ -332,6 +312,16 @@
const char *s = env_get("autoload");
if (s != NULL && strcmp(s, "NFS") == 0) {
+ if (net_check_prereq(NFS)) {
+/* We aren't expecting to get a serverip, so just accept the assigned IP */
+#ifdef CONFIG_BOOTP_SERVERIP
+ net_set_state(NETLOOP_SUCCESS);
+#else
+ printf("Cannot autoload with NFS\n");
+ net_set_state(NETLOOP_FAIL);
+#endif
+ return;
+ }
/*
* Use NFS to load the bootfile.
*/
@@ -347,6 +337,16 @@
net_set_state(NETLOOP_SUCCESS);
return;
}
+ if (net_check_prereq(TFTPGET)) {
+/* We aren't expecting to get a serverip, so just accept the assigned IP */
+#ifdef CONFIG_BOOTP_SERVERIP
+ net_set_state(NETLOOP_SUCCESS);
+#else
+ printf("Cannot autoload with TFTPGET\n");
+ net_set_state(NETLOOP_FAIL);
+#endif
+ return;
+ }
tftp_start(TFTPGET);
}
@@ -1341,7 +1341,7 @@
/* Fall through */
case TFTPGET:
case TFTPPUT:
- if (net_server_ip.s_addr == 0) {
+ if (net_server_ip.s_addr == 0 && !is_serverip_in_cmd()) {
puts("*** ERROR: `serverip' not set\n");
return 1;
}
@@ -1502,16 +1502,41 @@
void copy_filename(char *dst, const char *src, int size)
{
- if (*src && (*src == '"')) {
+ if (src && *src && (*src == '"')) {
++src;
--size;
}
- while ((--size > 0) && *src && (*src != '"'))
+ while ((--size > 0) && src && *src && (*src != '"'))
*dst++ = *src++;
*dst = '\0';
}
+int is_serverip_in_cmd(void)
+{
+ return !!strchr(net_boot_file_name, ':');
+}
+
+int net_parse_bootfile(struct in_addr *ipaddr, char *filename, int max_len)
+{
+ char *colon;
+
+ if (net_boot_file_name[0] == '\0')
+ return 0;
+
+ colon = strchr(net_boot_file_name, ':');
+ if (colon) {
+ if (ipaddr)
+ *ipaddr = string_to_ip(net_boot_file_name);
+ strncpy(filename, colon + 1, max_len);
+ } else {
+ strncpy(filename, net_boot_file_name, max_len);
+ }
+ filename[max_len - 1] = '\0';
+
+ return 1;
+}
+
#if defined(CONFIG_CMD_NFS) || \
defined(CONFIG_CMD_SNTP) || \
defined(CONFIG_CMD_DNS)
diff --git a/net/nfs.c b/net/nfs.c
index 9a16765..d6a7f8e 100644
--- a/net/nfs.c
+++ b/net/nfs.c
@@ -533,7 +533,7 @@
switch (ntohl(rpc_pkt.u.reply.data[0])) {
/* Minimal supported NFS version */
case 3:
- debug("*** Waring: NFS version not supported: Requested: V%d, accepted: min V%d - max V%d\n",
+ debug("*** Warning: NFS version not supported: Requested: V%d, accepted: min V%d - max V%d\n",
(supported_nfs_versions & NFSV2_FLAG) ?
2 : 3,
ntohl(rpc_pkt.u.reply.data[0]),
@@ -855,40 +855,29 @@
if (nfs_path == NULL) {
net_set_state(NETLOOP_FAIL);
- debug("*** ERROR: Fail allocate memory\n");
+ printf("*** ERROR: Fail allocate memory\n");
return;
}
- if (net_boot_file_name[0] == '\0') {
+ if (!net_parse_bootfile(&nfs_server_ip, nfs_path,
+ sizeof(nfs_path_buff))) {
sprintf(nfs_path, "/nfsroot/%02X%02X%02X%02X.img",
net_ip.s_addr & 0xFF,
(net_ip.s_addr >> 8) & 0xFF,
(net_ip.s_addr >> 16) & 0xFF,
(net_ip.s_addr >> 24) & 0xFF);
- debug("*** Warning: no boot file name; using '%s'\n",
- nfs_path);
- } else {
- char *p = net_boot_file_name;
-
- p = strchr(p, ':');
-
- if (p != NULL) {
- nfs_server_ip = string_to_ip(net_boot_file_name);
- ++p;
- strcpy(nfs_path, p);
- } else {
- strcpy(nfs_path, net_boot_file_name);
- }
+ printf("*** Warning: no boot file name; using '%s'\n",
+ nfs_path);
}
nfs_filename = basename(nfs_path);
nfs_path = dirname(nfs_path);
- debug("Using %s device\n", eth_get_name());
+ printf("Using %s device\n", eth_get_name());
- debug("File transfer via NFS from server %pI4; our IP address is %pI4",
- &nfs_server_ip, &net_ip);
+ printf("File transfer via NFS from server %pI4; our IP address is %pI4",
+ &nfs_server_ip, &net_ip);
/* Check if we need to send across this subnet */
if (net_gateway.s_addr && net_netmask.s_addr) {
@@ -896,19 +885,19 @@
struct in_addr server_net;
our_net.s_addr = net_ip.s_addr & net_netmask.s_addr;
- server_net.s_addr = net_server_ip.s_addr & net_netmask.s_addr;
+ server_net.s_addr = nfs_server_ip.s_addr & net_netmask.s_addr;
if (our_net.s_addr != server_net.s_addr)
- debug("; sending through gateway %pI4",
- &net_gateway);
+ printf("; sending through gateway %pI4",
+ &net_gateway);
}
- debug("\nFilename '%s/%s'.", nfs_path, nfs_filename);
+ printf("\nFilename '%s/%s'.", nfs_path, nfs_filename);
if (net_boot_file_expected_size_in_blocks) {
- debug(" Size is 0x%x Bytes = ",
- net_boot_file_expected_size_in_blocks << 9);
+ printf(" Size is 0x%x Bytes = ",
+ net_boot_file_expected_size_in_blocks << 9);
print_size(net_boot_file_expected_size_in_blocks << 9, "");
}
- debug("\nLoad address: 0x%lx\nLoading: *\b", load_addr);
+ printf("\nLoad address: 0x%lx\nLoading: *\b", load_addr);
net_set_timeout_handler(nfs_timeout, nfs_timeout_handler);
net_set_udp_handler(nfs_handler);
diff --git a/net/nfs.h b/net/nfs.h
index 6359cd2..a377c90 100644
--- a/net/nfs.h
+++ b/net/nfs.h
@@ -42,6 +42,7 @@
* case, most NFS servers are optimized for a power of 2.
*/
#define NFS_READ_SIZE 1024 /* biggest power of two that fits Ether frame */
+#define NFS_MAX_ATTRS 26
/* Values for Accept State flag on RPC answers (See: rfc1831) */
enum rpc_accept_stat {
@@ -55,7 +56,8 @@
struct rpc_t {
union {
- uint8_t data[2048];
+ uint8_t data[NFS_READ_SIZE + (6 + NFS_MAX_ATTRS) *
+ sizeof(uint32_t)];
struct {
uint32_t id;
uint32_t type;
@@ -72,7 +74,8 @@
uint32_t verifier;
uint32_t v2;
uint32_t astatus;
- uint32_t data[NFS_READ_SIZE];
+ uint32_t data[NFS_READ_SIZE / sizeof(uint32_t) +
+ NFS_MAX_ATTRS];
} reply;
} u;
} __attribute__((packed));
diff --git a/net/tftp.c b/net/tftp.c
index 6671b1f..68ffd81 100644
--- a/net/tftp.c
+++ b/net/tftp.c
@@ -735,7 +735,7 @@
tftp_block_size_option, timeout_ms);
tftp_remote_ip = net_server_ip;
- if (net_boot_file_name[0] == '\0') {
+ if (!net_parse_bootfile(&tftp_remote_ip, tftp_filename, MAX_LEN)) {
sprintf(default_filename, "%02X%02X%02X%02X.img",
net_ip.s_addr & 0xFF,
(net_ip.s_addr >> 8) & 0xFF,
@@ -747,17 +747,6 @@
printf("*** Warning: no boot file name; using '%s'\n",
tftp_filename);
- } else {
- char *p = strchr(net_boot_file_name, ':');
-
- if (p == NULL) {
- strncpy(tftp_filename, net_boot_file_name, MAX_LEN);
- tftp_filename[MAX_LEN - 1] = 0;
- } else {
- tftp_remote_ip = string_to_ip(net_boot_file_name);
- strncpy(tftp_filename, p + 1, MAX_LEN);
- tftp_filename[MAX_LEN - 1] = 0;
- }
}
printf("Using %s device\n", eth_get_name());
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 80c7f3c..7ced409 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -51,6 +51,7 @@
CONFIG_ARMADA100_FEC
CONFIG_ARMADA168
CONFIG_ARMADA_39X
+CONFIG_ARMV7_PSCI_0_2
CONFIG_ARMV7_PSCI_1_0
CONFIG_ARMV7_SECURE_BASE
CONFIG_ARMV7_SECURE_MAX_SIZE
@@ -1942,7 +1943,6 @@
CONFIG_SPL_RELOC_MALLOC_ADDR
CONFIG_SPL_RELOC_MALLOC_SIZE
CONFIG_SPL_RELOC_STACK
-CONFIG_SPL_RELOC_STACK_SIZE
CONFIG_SPL_RELOC_TEXT_BASE
CONFIG_SPL_SATA_BOOT_DEVICE
CONFIG_SPL_SIZE
diff --git a/scripts/kconfig/confdata.c b/scripts/kconfig/confdata.c
index e4cbb87..a04bb26 100644
--- a/scripts/kconfig/confdata.c
+++ b/scripts/kconfig/confdata.c
@@ -743,7 +743,7 @@
struct menu *menu;
const char *basename;
const char *str;
- char dirname[PATH_MAX+1], tmpname[PATH_MAX+1], newname[PATH_MAX+1];
+ char dirname[PATH_MAX+1], tmpname[PATH_MAX+22], newname[PATH_MAX+8];
char *env;
dirname[0] = 0;
diff --git a/test/py/tests/test_tpm2.py b/test/py/tests/test_tpm2.py
index ef7b86a..70f906d 100644
--- a/test/py/tests/test_tpm2.py
+++ b/test/py/tests/test_tpm2.py
@@ -29,22 +29,22 @@
twice will spawn an error used to detect that the TPM was not reset and no
initialization code should be run.
"""
- output = u_boot_console.run_command('tpm init')
+ output = u_boot_console.run_command('tpm2 init')
if force or not 'Error' in output:
u_boot_console.run_command('echo --- start of init ---')
- u_boot_console.run_command('tpm startup TPM2_SU_CLEAR')
- u_boot_console.run_command('tpm self_test full')
- u_boot_console.run_command('tpm clear TPM2_RH_LOCKOUT')
+ u_boot_console.run_command('tpm2 startup TPM2_SU_CLEAR')
+ u_boot_console.run_command('tpm2 self_test full')
+ u_boot_console.run_command('tpm2 clear TPM2_RH_LOCKOUT')
output = u_boot_console.run_command('echo $?')
if not output.endswith('0'):
- u_boot_console.run_command('tpm clear TPM2_RH_PLATFORM')
+ u_boot_console.run_command('tpm2 clear TPM2_RH_PLATFORM')
u_boot_console.run_command('echo --- end of init ---')
@pytest.mark.buildconfigspec('cmd_tpm_v2')
def test_tpm2_init(u_boot_console):
"""Init the software stack to use TPMv2 commands."""
- u_boot_console.run_command('tpm init')
+ u_boot_console.run_command('tpm2 init')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -55,7 +55,7 @@
Initiate the TPM internal state machine.
"""
- u_boot_console.run_command('tpm startup TPM2_SU_CLEAR')
+ u_boot_console.run_command('tpm2 startup TPM2_SU_CLEAR')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -66,7 +66,7 @@
Ask the TPM to perform all self tests to also enable full capabilities.
"""
- u_boot_console.run_command('tpm self_test full')
+ u_boot_console.run_command('tpm2 self_test full')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -78,7 +78,7 @@
to enter a fully operational state.
"""
- u_boot_console.run_command('tpm self_test continue')
+ u_boot_console.run_command('tpm2 self_test continue')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -95,11 +95,11 @@
PLATFORM hierarchies are also available.
"""
- u_boot_console.run_command('tpm clear TPM2_RH_LOCKOUT')
+ u_boot_console.run_command('tpm2 clear TPM2_RH_LOCKOUT')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
- u_boot_console.run_command('tpm clear TPM2_RH_PLATFORM')
+ u_boot_console.run_command('tpm2 clear TPM2_RH_PLATFORM')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -115,13 +115,13 @@
force_init(u_boot_console)
- u_boot_console.run_command('tpm change_auth TPM2_RH_LOCKOUT unicorn')
+ u_boot_console.run_command('tpm2 change_auth TPM2_RH_LOCKOUT unicorn')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
- u_boot_console.run_command('tpm clear TPM2_RH_LOCKOUT unicorn')
+ u_boot_console.run_command('tpm2 clear TPM2_RH_LOCKOUT unicorn')
output = u_boot_console.run_command('echo $?')
- u_boot_console.run_command('tpm clear TPM2_RH_PLATFORM')
+ u_boot_console.run_command('tpm2 clear TPM2_RH_PLATFORM')
assert output.endswith('0')
@pytest.mark.buildconfigspec('cmd_tpm_v2')
@@ -140,7 +140,7 @@
force_init(u_boot_console)
ram = u_boot_utils.find_ram_base(u_boot_console)
- read_cap = u_boot_console.run_command('tpm get_capability 0x6 0x20e 0x200 1') #0x%x 1' % ram)
+ read_cap = u_boot_console.run_command('tpm2 get_capability 0x6 0x20e 0x200 1') #0x%x 1' % ram)
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
assert 'Property 0x0000020e: 0x00000000' in read_cap
@@ -163,12 +163,12 @@
ram = u_boot_utils.find_ram_base(u_boot_console)
# Set the DAM parameters to known values
- u_boot_console.run_command('tpm dam_parameters 3 10 0')
+ u_boot_console.run_command('tpm2 dam_parameters 3 10 0')
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
# Check the values have been saved
- read_cap = u_boot_console.run_command('tpm get_capability 0x6 0x20f 0x%x 3' % ram)
+ read_cap = u_boot_console.run_command('tpm2 get_capability 0x6 0x20f 0x%x 3' % ram)
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
assert 'Property 0x0000020f: 0x00000003' in read_cap
@@ -185,7 +185,7 @@
force_init(u_boot_console)
ram = u_boot_utils.find_ram_base(u_boot_console)
- read_pcr = u_boot_console.run_command('tpm pcr_read 0 0x%x' % ram)
+ read_pcr = u_boot_console.run_command('tpm2 pcr_read 0 0x%x' % ram)
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
@@ -212,11 +212,11 @@
force_init(u_boot_console)
ram = u_boot_utils.find_ram_base(u_boot_console)
- u_boot_console.run_command('tpm pcr_extend 0 0x%x' % ram)
+ u_boot_console.run_command('tpm2 pcr_extend 0 0x%x' % ram)
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
- read_pcr = u_boot_console.run_command('tpm pcr_read 0 0x%x' % ram)
+ read_pcr = u_boot_console.run_command('tpm2 pcr_read 0 0x%x' % ram)
output = u_boot_console.run_command('echo $?')
assert output.endswith('0')
assert 'f5 a5 fd 42 d1 6a 20 30 27 98 ef 6e d3 09 97 9b' in read_pcr
diff --git a/tools/fit_image.c b/tools/fit_image.c
index 3c26535..4b62635 100644
--- a/tools/fit_image.c
+++ b/tools/fit_image.c
@@ -202,21 +202,22 @@
typename = genimg_get_type_short_name(params->fit_image_type);
snprintf(str, sizeof(str), "%s-1", typename);
fdt_begin_node(fdt, str);
- fdt_property_string(fdt, "description", params->imagename);
- fdt_property_string(fdt, "type", typename);
- fdt_property_string(fdt, "arch",
+ fdt_property_string(fdt, FIT_DESC_PROP, params->imagename);
+ fdt_property_string(fdt, FIT_TYPE_PROP, typename);
+ fdt_property_string(fdt, FIT_ARCH_PROP,
genimg_get_arch_short_name(params->arch));
- fdt_property_string(fdt, "os", genimg_get_os_short_name(params->os));
- fdt_property_string(fdt, "compression",
+ fdt_property_string(fdt, FIT_OS_PROP,
+ genimg_get_os_short_name(params->os));
+ fdt_property_string(fdt, FIT_COMP_PROP,
genimg_get_comp_short_name(params->comp));
- fdt_property_u32(fdt, "load", params->addr);
- fdt_property_u32(fdt, "entry", params->ep);
+ fdt_property_u32(fdt, FIT_LOAD_PROP, params->addr);
+ fdt_property_u32(fdt, FIT_ENTRY_PROP, params->ep);
/*
* Put data last since it is large. SPL may only load the first part
* of the DT, so this way it can access all the above fields.
*/
- ret = fdt_property_file(params, fdt, "data", params->datafile);
+ ret = fdt_property_file(params, fdt, FIT_DATA_PROP, params->datafile);
if (ret)
return ret;
fdt_end_node(fdt);
@@ -230,14 +231,15 @@
fdt_begin_node(fdt, str);
get_basename(str, sizeof(str), cont->fname);
- fdt_property_string(fdt, "description", str);
- ret = fdt_property_file(params, fdt, "data", cont->fname);
+ fdt_property_string(fdt, FIT_DESC_PROP, str);
+ ret = fdt_property_file(params, fdt, FIT_DATA_PROP,
+ cont->fname);
if (ret)
return ret;
- fdt_property_string(fdt, "type", typename);
- fdt_property_string(fdt, "arch",
+ fdt_property_string(fdt, FIT_TYPE_PROP, typename);
+ fdt_property_string(fdt, FIT_ARCH_PROP,
genimg_get_arch_short_name(params->arch));
- fdt_property_string(fdt, "compression",
+ fdt_property_string(fdt, FIT_COMP_PROP,
genimg_get_comp_short_name(IH_COMP_NONE));
fdt_end_node(fdt);
}
@@ -246,10 +248,12 @@
if (params->fit_ramdisk) {
fdt_begin_node(fdt, FIT_RAMDISK_PROP "-1");
- fdt_property_string(fdt, "type", FIT_RAMDISK_PROP);
- fdt_property_string(fdt, "os", genimg_get_os_short_name(params->os));
+ fdt_property_string(fdt, FIT_TYPE_PROP, FIT_RAMDISK_PROP);
+ fdt_property_string(fdt, FIT_OS_PROP,
+ genimg_get_os_short_name(params->os));
- ret = fdt_property_file(params, fdt, "data", params->fit_ramdisk);
+ ret = fdt_property_file(params, fdt, FIT_DATA_PROP,
+ params->fit_ramdisk);
if (ret)
return ret;
@@ -278,7 +282,7 @@
int upto;
fdt_begin_node(fdt, "configurations");
- fdt_property_string(fdt, "default", "conf-1");
+ fdt_property_string(fdt, FIT_DEFAULT_PROP, "conf-1");
upto = 0;
for (cont = params->content_head; cont; cont = cont->next) {
@@ -289,7 +293,7 @@
fdt_begin_node(fdt, str);
get_basename(str, sizeof(str), cont->fname);
- fdt_property_string(fdt, "description", str);
+ fdt_property_string(fdt, FIT_DESC_PROP, str);
typename = genimg_get_type_short_name(params->fit_image_type);
snprintf(str, sizeof(str), "%s-1", typename);
@@ -329,7 +333,7 @@
return ret;
fdt_finish_reservemap(fdt);
fdt_begin_node(fdt, "");
- fdt_property_strf(fdt, "description",
+ fdt_property_strf(fdt, FIT_DESC_PROP,
"%s image with one or more FDT blobs",
genimg_get_type_name(params->fit_image_type));
fdt_property_strf(fdt, "creator", "U-Boot mkimage %s", PLAIN_VERSION);
@@ -441,25 +445,26 @@
const char *data;
int len;
- data = fdt_getprop(fdt, node, "data", &len);
+ data = fdt_getprop(fdt, node, FIT_DATA_PROP, &len);
if (!data)
continue;
memcpy(buf + buf_ptr, data, len);
debug("Extracting data size %x\n", len);
- ret = fdt_delprop(fdt, node, "data");
+ ret = fdt_delprop(fdt, node, FIT_DATA_PROP);
if (ret) {
ret = -EPERM;
goto err_munmap;
}
if (params->external_offset > 0) {
/* An external offset positions the data absolutely. */
- fdt_setprop_u32(fdt, node, "data-position",
+ fdt_setprop_u32(fdt, node, FIT_DATA_POSITION_PROP,
params->external_offset + buf_ptr);
} else {
- fdt_setprop_u32(fdt, node, "data-offset", buf_ptr);
+ fdt_setprop_u32(fdt, node, FIT_DATA_OFFSET_PROP,
+ buf_ptr);
}
- fdt_setprop_u32(fdt, node, "data-size", len);
+ fdt_setprop_u32(fdt, node, FIT_DATA_SIZE_PROP, len);
buf_ptr += (len + 3) & ~3;
}
diff --git a/tools/genboardscfg.py b/tools/genboardscfg.py
index 0648472..e9bbd15 100755
--- a/tools/genboardscfg.py
+++ b/tools/genboardscfg.py
@@ -24,7 +24,7 @@
import tempfile
import time
-sys.path.append(os.path.join(os.path.dirname(__file__), 'buildman'))
+sys.path.insert(1, os.path.join(os.path.dirname(__file__), 'buildman'))
import kconfiglib
### constant variables ###
diff --git a/tools/patman/settings.py b/tools/patman/settings.py
index 94ea5b5..ca43344 100644
--- a/tools/patman/settings.py
+++ b/tools/patman/settings.py
@@ -263,7 +263,7 @@
line = line.strip()
if not line or line.startswith('#'):
continue
- words = line.split(' ', 2)
+ words = line.split(None, 2)
if len(words) < 3 or words[0] != 'alias':
if not bad_line:
bad_line = "%s:%d:Invalid line '%s'" % (fname, linenum,