summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Kconfig8
-rw-r--r--Makefile5
-rw-r--r--arch/arc/Kconfig12
-rw-r--r--arch/arc/cpu/arcv2/ivt.S31
-rw-r--r--arch/arc/cpu/u-boot.lds51
-rw-r--r--arch/arc/dts/Makefile4
-rw-r--r--arch/arc/dts/nsim.dts (renamed from arch/arc/dts/arcangel4.dts)2
-rw-r--r--arch/arc/include/asm/sections.h2
-rw-r--r--arch/arc/lib/Makefile1
-rw-r--r--arch/arc/lib/interrupts.c26
-rw-r--r--arch/arc/lib/ints_low.S28
-rw-r--r--arch/arc/lib/relocate.c12
-rw-r--r--arch/arc/lib/sections.c23
-rw-r--r--arch/arm/Kconfig4
-rw-r--r--arch/arm/Makefile8
-rw-r--r--arch/arm/cpu/armv7/cache_v7.c10
-rw-r--r--arch/arm/cpu/armv7/omap3/Kconfig25
-rw-r--r--arch/arm/cpu/armv7/omap5/Kconfig1
-rw-r--r--arch/arm/cpu/armv7/psci-common.c2
-rw-r--r--arch/arm/cpu/armv7/sunxi/psci.c12
-rw-r--r--arch/arm/cpu/armv8/cache_v8.c4
-rw-r--r--arch/arm/include/asm/barriers.h11
-rw-r--r--arch/arm/include/asm/config.h1
-rw-r--r--arch/arm/include/asm/io.h4
-rw-r--r--arch/arm/include/asm/system.h8
-rw-r--r--arch/arm/lib/Makefile5
-rw-r--r--arch/arm/mach-exynos/include/mach/system.h10
-rw-r--r--arch/arm/mach-sunxi/dram_helpers.c2
-rw-r--r--arch/arm/mach-tegra/tegra20/Makefile3
-rw-r--r--arch/powerpc/cpu/mpc85xx/Kconfig18
-rw-r--r--arch/powerpc/cpu/ppc4xx/Kconfig1
-rw-r--r--board/synopsys/Kconfig4
-rw-r--r--board/synopsys/MAINTAINERS8
-rw-r--r--board/synopsys/axs101/Makefile8
-rw-r--r--board/synopsys/axs10x/Kconfig (renamed from board/synopsys/axs101/Kconfig)6
-rw-r--r--board/synopsys/axs10x/MAINTAINERS (renamed from board/synopsys/axs101/MAINTAINERS)6
-rw-r--r--board/synopsys/axs10x/Makefile8
-rw-r--r--board/synopsys/axs10x/axs10x.c (renamed from board/synopsys/axs101/axs101.c)0
-rw-r--r--board/synopsys/axs10x/axs10x.h (renamed from board/synopsys/axs101/axs10x.h)0
-rw-r--r--board/synopsys/axs10x/nand.c (renamed from board/synopsys/axs101/nand.c)0
-rw-r--r--board/ti/evm/Kconfig26
-rw-r--r--board/ti/evm/MAINTAINERS4
-rw-r--r--cmd/bdinfo.c328
-rw-r--r--cmd/gpt.c4
-rw-r--r--configs/C29XPCIE_NAND_defconfig2
-rw-r--r--configs/C29XPCIE_NOR_SECBOOT_defconfig2
-rw-r--r--configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig2
-rw-r--r--configs/C29XPCIE_SPIFLASH_defconfig2
-rw-r--r--configs/C29XPCIE_defconfig2
-rw-r--r--configs/MPC8536DS_36BIT_defconfig2
-rw-r--r--configs/MPC8548CDS_36BIT_defconfig2
-rw-r--r--configs/MPC8572DS_36BIT_defconfig2
-rw-r--r--configs/MPC8641HPCN_36BIT_defconfig2
-rw-r--r--configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig5
-rw-r--r--configs/P1010RDB-PA_36BIT_NAND_defconfig3
-rw-r--r--configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig5
-rw-r--r--configs/P1010RDB-PA_36BIT_NOR_defconfig3
-rw-r--r--configs/P1010RDB-PA_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig5
-rw-r--r--configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig3
-rw-r--r--configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig5
-rw-r--r--configs/P1010RDB-PB_36BIT_NAND_defconfig3
-rw-r--r--configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig5
-rw-r--r--configs/P1010RDB-PB_36BIT_NOR_defconfig3
-rw-r--r--configs/P1010RDB-PB_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig5
-rw-r--r--configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig3
-rw-r--r--configs/P1020MBG-PC_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1020MBG-PC_36BIT_defconfig3
-rw-r--r--configs/P1020RDB-PC_36BIT_NAND_defconfig3
-rw-r--r--configs/P1020RDB-PC_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig3
-rw-r--r--configs/P1020RDB-PC_36BIT_defconfig3
-rw-r--r--configs/P1020UTM-PC_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1020UTM-PC_36BIT_defconfig3
-rw-r--r--configs/P1021RDB-PC_36BIT_NAND_defconfig3
-rw-r--r--configs/P1021RDB-PC_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig3
-rw-r--r--configs/P1021RDB-PC_36BIT_defconfig3
-rw-r--r--configs/P1022DS_36BIT_NAND_defconfig3
-rw-r--r--configs/P1022DS_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P1022DS_36BIT_SPIFLASH_defconfig3
-rw-r--r--configs/P1022DS_36BIT_defconfig2
-rw-r--r--configs/P1024RDB_36BIT_defconfig3
-rw-r--r--configs/P1025RDB_36BIT_defconfig3
-rw-r--r--configs/P2020RDB-PC_36BIT_NAND_defconfig3
-rw-r--r--configs/P2020RDB-PC_36BIT_SDCARD_defconfig3
-rw-r--r--configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig3
-rw-r--r--configs/P2020RDB-PC_36BIT_defconfig3
-rw-r--r--configs/axs101_defconfig2
-rw-r--r--configs/axs103_defconfig2
-rw-r--r--configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig3
-rw-r--r--configs/controlcenterd_36BIT_SDCARD_defconfig3
-rw-r--r--configs/nsim_700_defconfig (renamed from configs/arcangel4_defconfig)8
-rw-r--r--configs/nsim_700be_defconfig (renamed from configs/arcangel4-be_defconfig)7
-rw-r--r--configs/nsim_hs38_defconfig16
-rw-r--r--configs/nsim_hs38be_defconfig17
-rw-r--r--configs/omap3_evm_quick_mmc_defconfig30
-rw-r--r--configs/omap3_evm_quick_nand_defconfig28
-rw-r--r--disk/part_efi.c4
-rw-r--r--drivers/mmc/arm_pl180_mmci.c2
-rw-r--r--drivers/mmc/bfin_sdh.c10
-rw-r--r--drivers/mmc/davinci_mmc.c11
-rw-r--r--drivers/mmc/dw_mmc.c12
-rw-r--r--drivers/mmc/exynos_dw_mmc.c2
-rw-r--r--drivers/mmc/fsl_esdhc.c14
-rw-r--r--drivers/mmc/ftsdc010_mci.c10
-rw-r--r--drivers/mmc/gen_atmel_mci.c10
-rw-r--r--drivers/mmc/mmc-uclass.c2
-rw-r--r--drivers/mmc/mmc.c18
-rw-r--r--drivers/mmc/mmc_spi.c11
-rw-r--r--drivers/mmc/msm_sdhci.c4
-rw-r--r--drivers/mmc/mvebu_mmc.c9
-rw-r--r--drivers/mmc/mxcmmc.c6
-rw-r--r--drivers/mmc/mxsmmc.c18
-rw-r--r--drivers/mmc/omap_hsmmc.c18
-rw-r--r--drivers/mmc/rockchip_sdhci.c8
-rw-r--r--drivers/mmc/s3c_sdi.c4
-rw-r--r--drivers/mmc/s5p_sdhci.c2
-rw-r--r--drivers/mmc/sdhci.c58
-rw-r--r--drivers/mmc/sh_mmcif.c8
-rw-r--r--drivers/mmc/sh_sdhi.c6
-rw-r--r--drivers/mmc/sunxi_mmc.c6
-rw-r--r--drivers/mmc/tegra_mmc.c7
-rw-r--r--drivers/mmc/uniphier-sd.c2
-rw-r--r--drivers/mmc/zynq_sdhci.c6
-rw-r--r--fs/ext4/ext4_common.c10
-rw-r--r--include/configs/B4860QDS.h1
-rw-r--r--include/configs/C29XPCIE.h1
-rw-r--r--include/configs/MPC8536DS.h4
-rw-r--r--include/configs/MPC8548CDS.h4
-rw-r--r--include/configs/MPC8572DS.h4
-rw-r--r--include/configs/MPC8641HPCN.h1
-rw-r--r--include/configs/P1010RDB.h3
-rw-r--r--include/configs/P1022DS.h4
-rw-r--r--include/configs/P2041RDB.h1
-rw-r--r--include/configs/P3041DS.h1
-rw-r--r--include/configs/P4080DS.h1
-rw-r--r--include/configs/P5020DS.h1
-rw-r--r--include/configs/P5040DS.h1
-rw-r--r--include/configs/T102xQDS.h1
-rw-r--r--include/configs/T102xRDB.h1
-rw-r--r--include/configs/T1040QDS.h1
-rw-r--r--include/configs/T104xRDB.h1
-rw-r--r--include/configs/T208xQDS.h1
-rw-r--r--include/configs/T208xRDB.h1
-rw-r--r--include/configs/T4240QDS.h1
-rw-r--r--include/configs/T4240RDB.h1
-rw-r--r--include/configs/axs10x.h (renamed from include/configs/axs101.h)19
-rw-r--r--include/configs/controlcenterd.h4
-rw-r--r--include/configs/cyrus.h2
-rw-r--r--include/configs/dra7xx_evm.h1
-rw-r--r--include/configs/katmai.h1
-rw-r--r--include/configs/km/kmp204x-common.h1
-rw-r--r--include/configs/nsim.h (renamed from include/configs/arcangel4.h)20
-rw-r--r--include/configs/omap3_evm.h272
-rw-r--r--include/configs/omap3_evm_common.h286
-rw-r--r--include/configs/omap3_evm_quick_mmc.h89
-rw-r--r--include/configs/omap3_evm_quick_nand.h91
-rw-r--r--include/configs/omapl138_lcdk.h2
-rw-r--r--include/configs/p1_p2_rdb_pc.h4
-rw-r--r--include/configs/qemu-ppce500.h2
-rw-r--r--include/dwmmc.h2
-rw-r--r--include/ext4fs.h1
-rw-r--r--include/mmc.h6
-rw-r--r--include/sdhci.h13
-rw-r--r--test/README8
-rw-r--r--test/py/multiplexed_log.py2
-rw-r--r--test/py/tests/test_vboot.py108
-rw-r--r--test/py/u_boot_console_base.py14
-rw-r--r--test/py/u_boot_utils.py27
-rw-r--r--tools/mkimage.c2
-rwxr-xr-xtools/moveconfig.py231
173 files changed, 1214 insertions, 1296 deletions
diff --git a/Kconfig b/Kconfig
index 626e82f..1119b19 100644
--- a/Kconfig
+++ b/Kconfig
@@ -124,6 +124,14 @@ config TOOLS_DEBUG
debug through the source code, etc.
endif
+
+config PHYS_64BIT
+ bool "64bit physical address support"
+ help
+ Say Y here to support 64bit physical memory address.
+ This can be used not only for 64bit SoCs, but also for
+ large physical address extention on 32bit SoCs.
+
endmenu # General setup
menu "Boot images"
diff --git a/Makefile b/Makefile
index 99cc8cf..91634d5 100644
--- a/Makefile
+++ b/Makefile
@@ -425,7 +425,7 @@ timestamp_h := include/generated/timestamp_autogenerated.h
no-dot-config-targets := clean clobber mrproper distclean \
help %docs check% coccicheck \
- ubootversion backup
+ ubootversion backup tests
config-targets := 0
mixed-targets := 0
@@ -1489,6 +1489,7 @@ help:
@echo ''
@echo 'Other generic targets:'
@echo ' all - Build all necessary images depending on configuration'
+ @echo ' tests - Build U-Boot for sandbox and run tests'
@echo '* u-boot - Build the bare u-boot'
@echo ' dir/ - Build all files in dir and below'
@echo ' dir/file.[oisS] - Build specified target only'
@@ -1521,6 +1522,8 @@ help:
@echo 'Execute "make" or "make all" to build all targets marked with [*] '
@echo 'For further info see the ./README file'
+tests:
+ $(srctree)/test/run
# Documentation targets
# ---------------------------------------------------------------------------
diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
index f1dc6c8..4c5696b 100644
--- a/arch/arc/Kconfig
+++ b/arch/arc/Kconfig
@@ -118,21 +118,21 @@ config SYS_DCACHE_OFF
choice
prompt "Target select"
- default TARGET_AXS101
+ default TARGET_AXS10X
config TARGET_TB100
bool "Support tb100"
-config TARGET_ARCANGEL4
- bool "Support arcangel4"
+config TARGET_NSIM
+ bool "Support standalone nSIM & Free nSIM"
-config TARGET_AXS101
- bool "Support axs101"
+config TARGET_AXS10X
+ bool "Support Synopsys Designware SDP board (AXS101 & AXS103)"
endchoice
source "board/abilis/tb100/Kconfig"
source "board/synopsys/Kconfig"
-source "board/synopsys/axs101/Kconfig"
+source "board/synopsys/axs10x/Kconfig"
endmenu
diff --git a/arch/arc/cpu/arcv2/ivt.S b/arch/arc/cpu/arcv2/ivt.S
index d110b5b..7924375 100644
--- a/arch/arc/cpu/arcv2/ivt.S
+++ b/arch/arc/cpu/arcv2/ivt.S
@@ -7,21 +7,26 @@
.section .ivt, "a",@progbits
.align 4
/* Critical system events */
-.word _start /* 0 - 0x000 */
-.word memory_error /* 1 - 0x008 */
-.word instruction_error /* 2 - 0x010 */
+.word _start /* 0x00 - Reset */
+.word memory_error /* 0x01 - Memory Error */
+.word instruction_error /* 0x02 - Instruction Error */
/* Exceptions */
-.word EV_MachineCheck /* 0x100, Fatal Machine check (0x20) */
-.word EV_TLBMissI /* 0x108, Intruction TLB miss (0x21) */
-.word EV_TLBMissD /* 0x110, Data TLB miss (0x22) */
-.word EV_TLBProtV /* 0x118, Protection Violation (0x23)
- or Misaligned Access */
-.word EV_PrivilegeV /* 0x120, Privilege Violation (0x24) */
-.word EV_Trap /* 0x128, Trap exception (0x25) */
-.word EV_Extension /* 0x130, Extn Intruction Excp (0x26) */
+.word EV_MachineCheck /* 0x03 - Fatal Machine check */
+.word EV_TLBMissI /* 0x04 - Intruction TLB miss */
+.word EV_TLBMissD /* 0x05 - Data TLB miss */
+.word EV_TLBProtV /* 0x06 - Protection Violation or Misaligned Access */
+.word EV_PrivilegeV /* 0x07 - Privilege Violation */
+.word EV_SWI /* 0x08 - Software Interrupt */
+.word EV_Trap /* 0x09 - Trap */
+.word EV_Extension /* 0x0A - Extension Intruction Exception */
+.word EV_DivZero /* 0x0B - Division by Zero */
+.word EV_DCError /* 0x0C - Data cache consistency error */
+.word EV_Maligned /* 0x0D - Misaligned data access */
+.word 0 /* 0x0E - Unused */
+.word 0 /* 0x0F - Unused */
/* Device interrupts */
-.rept 29
- j interrupt_handler /* 3:31 - 0x018:0xF8 */
+.rept 240
+.word interrupt_handler /* 0x10 - 0xFF */
.endr
diff --git a/arch/arc/cpu/u-boot.lds b/arch/arc/cpu/u-boot.lds
index 693df74..d3d0a53 100644
--- a/arch/arc/cpu/u-boot.lds
+++ b/arch/arc/cpu/u-boot.lds
@@ -4,38 +4,29 @@
* SPDX-License-Identifier: GPL-2.0+
*/
+#include <config.h>
+
OUTPUT_FORMAT("elf32-littlearc", "elf32-littlearc", "elf32-littlearc")
OUTPUT_ARCH(arc)
ENTRY(_start)
SECTIONS
{
- . = ALIGN(4);
+ . = CONFIG_SYS_TEXT_BASE;
+ __image_copy_start = .;
+ __text_start = .;
.text : {
- *(.__text_start)
- *(.__image_copy_start)
arch/arc/lib/start.o (.text*)
*(.text*)
}
-
- . = ALIGN(4);
- .text_end :
- {
- *(.__text_end)
- }
+ __text_end = .;
. = ALIGN(1024);
- .ivt_start : {
- *(.__ivt_start)
- }
-
+ __ivt_start = .;
.ivt :
{
*(.ivt)
}
-
- .ivt_end : {
- *(.__ivt_end)
- }
+ __ivt_end = .;
. = ALIGN(4);
.rodata : {
@@ -53,34 +44,20 @@ SECTIONS
}
. = ALIGN(4);
- .rel_dyn_start : {
- *(.__rel_dyn_start)
- }
-
+ __rel_dyn_start = .;
.rela.dyn : {
*(.rela.dyn)
}
-
- .rel_dyn_end : {
- *(.__rel_dyn_end)
- }
+ __rel_dyn_end = .;
. = ALIGN(4);
- .bss_start : {
- *(.__bss_start);
- }
-
+ __bss_start = .;
.bss : {
*(.bss*)
}
-
- .bss_end : {
- *(.__bss_end);
- }
+ __bss_end = .;
. = ALIGN(4);
- .image_copy_end : {
- *(.__image_copy_end)
- *(.__init_end)
- }
+ __image_copy_end = .;
+ __init_end = .;
}
diff --git a/arch/arc/dts/Makefile b/arch/arc/dts/Makefile
index d4772ec..1d94c08 100644
--- a/arch/arc/dts/Makefile
+++ b/arch/arc/dts/Makefile
@@ -2,8 +2,8 @@
# SPDX-License-Identifier: GPL-2.0+
#
-dtb-$(CONFIG_TARGET_AXS101) += axs10x.dtb
-dtb-$(CONFIG_TARGET_ARCANGEL4) += arcangel4.dtb
+dtb-$(CONFIG_TARGET_AXS10X) += axs10x.dtb
+dtb-$(CONFIG_TARGET_NSIM) += nsim.dtb
dtb-$(CONFIG_TARGET_TB100) += abilis_tb100.dtb
targets += $(dtb-y)
diff --git a/arch/arc/dts/arcangel4.dts b/arch/arc/dts/nsim.dts
index bfcb9d8..69e16c2 100644
--- a/arch/arc/dts/arcangel4.dts
+++ b/arch/arc/dts/nsim.dts
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2015 Synopsys, Inc. (www.synopsys.com)
+ * Copyright (C) 2015-2016 Synopsys, Inc. (www.synopsys.com)
*
* SPDX-License-Identifier: GPL-2.0+
*/
diff --git a/arch/arc/include/asm/sections.h b/arch/arc/include/asm/sections.h
index b8f2a85..00f1217 100644
--- a/arch/arc/include/asm/sections.h
+++ b/arch/arc/include/asm/sections.h
@@ -9,9 +9,7 @@
#include <asm-generic/sections.h>
-extern ulong __text_end;
extern ulong __ivt_start;
extern ulong __ivt_end;
-extern ulong __image_copy_start;
#endif /* __ASM_ARC_SECTIONS_H */
diff --git a/arch/arc/lib/Makefile b/arch/arc/lib/Makefile
index e592802..eb62b3c 100644
--- a/arch/arc/lib/Makefile
+++ b/arch/arc/lib/Makefile
@@ -9,7 +9,6 @@ head-y := start.o
obj-y += cache.o
obj-y += cpu.o
obj-y += interrupts.o
-obj-y += sections.o
obj-y += relocate.o
obj-y += strchr-700.o
obj-y += strcmp.o
diff --git a/arch/arc/lib/interrupts.c b/arch/arc/lib/interrupts.c
index d7cab3b..ee638d5 100644
--- a/arch/arc/lib/interrupts.c
+++ b/arch/arc/lib/interrupts.c
@@ -141,3 +141,29 @@ void do_extension(struct pt_regs *regs)
printf("Extension instruction exception\n");
bad_mode(regs);
}
+
+#ifdef CONFIG_ISA_ARCV2
+void do_swi(struct pt_regs *regs)
+{
+ printf("Software Interrupt exception\n");
+ bad_mode(regs);
+}
+
+void do_divzero(unsigned long address, struct pt_regs *regs)
+{
+ printf("Division by zero exception @ 0x%lx\n", address);
+ bad_mode(regs);
+}
+
+void do_dcerror(struct pt_regs *regs)
+{
+ printf("Data cache consistency error exception\n");
+ bad_mode(regs);
+}
+
+void do_maligned(unsigned long address, struct pt_regs *regs)
+{
+ printf("Misaligned data access exception @ 0x%lx\n", address);
+ bad_mode(regs);
+}
+#endif
diff --git a/arch/arc/lib/ints_low.S b/arch/arc/lib/ints_low.S
index 161cf37..e377884 100644
--- a/arch/arc/lib/ints_low.S
+++ b/arch/arc/lib/ints_low.S
@@ -149,3 +149,31 @@ ENTRY(EV_Extension)
mov %r0, %sp
j do_extension
ENDPROC(EV_Extension)
+
+#ifdef CONFIG_ISA_ARCV2
+ENTRY(EV_SWI)
+ SAVE_ALL_SYS
+ mov %r0, %sp
+ j do_swi
+ENDPROC(EV_SWI)
+
+ENTRY(EV_DivZero)
+ SAVE_ALL_SYS
+ SAVE_EXCEPTION_SOURCE
+ mov %r1, %sp
+ j do_divzero
+ENDPROC(EV_DivZero)
+
+ENTRY(EV_DCError)
+ SAVE_ALL_SYS
+ mov %r0, %sp
+ j do_dcerror
+ENDPROC(EV_DCError)
+
+ENTRY(EV_Maligned)
+ SAVE_ALL_SYS
+ SAVE_EXCEPTION_SOURCE
+ mov %r1, %sp
+ j do_maligned
+ENDPROC(EV_Maligned)
+#endif
diff --git a/arch/arc/lib/relocate.c b/arch/arc/lib/relocate.c
index 5c2c2d1..7802f40 100644
--- a/arch/arc/lib/relocate.c
+++ b/arch/arc/lib/relocate.c
@@ -6,7 +6,10 @@
#include <common.h>
#include <elf.h>
-#include <asm/sections.h>
+#include <asm-generic/sections.h>
+
+extern ulong __image_copy_start;
+extern ulong __ivt_end;
DECLARE_GLOBAL_DATA_PTR;
@@ -37,6 +40,9 @@ int do_elf_reloc_fixups(void)
Elf32_Rela *re_src = (Elf32_Rela *)(&__rel_dyn_start);
Elf32_Rela *re_end = (Elf32_Rela *)(&__rel_dyn_end);
+ debug("Section .rela.dyn is located at %08x-%08x\n",
+ (unsigned int)re_src, (unsigned int)re_end);
+
Elf32_Addr *offset_ptr_rom, *last_offset = NULL;
Elf32_Addr *offset_ptr_ram;
@@ -52,6 +58,10 @@ int do_elf_reloc_fixups(void)
offset_ptr_ram = (Elf32_Addr *)((ulong)offset_ptr_rom +
gd->reloc_off);
+ debug("Patching value @ %08x (relocated to %08x)\n",
+ (unsigned int)offset_ptr_rom,
+ (unsigned int)offset_ptr_ram);
+
/*
* Use "memcpy" because target location might be
* 16-bit aligned on ARC so we may need to read
diff --git a/arch/arc/lib/sections.c b/arch/arc/lib/sections.c
deleted file mode 100644
index a72c694..0000000
--- a/arch/arc/lib/sections.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/*
- * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-/*
- * For some reason linker sets linker-generated symbols to zero in PIE mode.
- * A work-around is substitution of linker-generated symbols with
- * compiler-generated symbols which are properly handled by linker in PAE mode.
- */
-
-char __bss_start[0] __attribute__((section(".__bss_start")));
-char __bss_end[0] __attribute__((section(".__bss_end")));
-char __image_copy_start[0] __attribute__((section(".__image_copy_start")));
-char __image_copy_end[0] __attribute__((section(".__image_copy_end")));
-char __rel_dyn_start[0] __attribute__((section(".__rel_dyn_start")));
-char __rel_dyn_end[0] __attribute__((section(".__rel_dyn_end")));
-char __text_start[0] __attribute__((section(".__text_start")));
-char __text_end[0] __attribute__((section(".__text_end")));
-char __init_end[0] __attribute__((section(".__init_end")));
-char __ivt_start[0] __attribute__((section(".__ivt_start")));
-char __ivt_end[0] __attribute__((section(".__ivt_end")));
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index a0a866e..5ac9401 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -6,6 +6,7 @@ config SYS_ARCH
config ARM64
bool
+ select PHYS_64BIT
config DMA_ADDR_T_64BIT
bool
@@ -553,11 +554,14 @@ config TARGET_MX53SMD
config OMAP34XX
bool "OMAP34XX SoC"
select CPU_V7
+ select SUPPORT_SPL
+ select USE_TINY_PRINTF
config OMAP44XX
bool "OMAP44XX SoC"
select CPU_V7
select SUPPORT_SPL
+ select USE_TINY_PRINTF
config OMAP54XX
bool "OMAP54XX SoC"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 6a07cd1..82f2fd0 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -20,6 +20,14 @@ arch-$(CONFIG_CPU_V7) =$(call cc-option, -march=armv7-a, \
$(call cc-option, -march=armv7, -march=armv5))
arch-$(CONFIG_ARM64) =-march=armv8-a
+# On Tegra systems we must build SPL for the armv4 core on the device
+# but otherwise we can use the value in CONFIG_SYS_ARM_ARCH
+ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TEGRA),yy)
+arch-y += -D__LINUX_ARM_ARCH__=4
+else
+arch-y += -D__LINUX_ARM_ARCH__=$(CONFIG_SYS_ARM_ARCH)
+endif
+
# Evaluate arch cc-option calls now
arch-y := $(arch-y)
diff --git a/arch/arm/cpu/armv7/cache_v7.c b/arch/arm/cpu/armv7/cache_v7.c
index 52f1856..c4bbcc3 100644
--- a/arch/arm/cpu/armv7/cache_v7.c
+++ b/arch/arm/cpu/armv7/cache_v7.c
@@ -75,7 +75,7 @@ static void v7_dcache_maint_range(u32 start, u32 stop, u32 range_op)
}
/* DSB to make sure the operation is complete */
- DSB;
+ dsb();
}
/* Invalidate TLB */
@@ -88,9 +88,9 @@ static void v7_inval_tlb(void)
/* Invalidate entire instruction TLB */
asm volatile ("mcr p15, 0, %0, c8, c5, 0" : : "r" (0));
/* Full system DSB - make sure that the invalidation is complete */
- DSB;
+ dsb();
/* Full system ISB - make sure the instruction stream sees it */
- ISB;
+ isb();
}
void invalidate_dcache_all(void)
@@ -194,10 +194,10 @@ void invalidate_icache_all(void)
asm volatile ("mcr p15, 0, %0, c7, c5, 6" : : "r" (0));
/* Full system DSB - make sure that the invalidation is complete */
- DSB;
+ dsb();
/* ISB - make sure the instruction stream sees it */
- ISB;
+ isb();
}
#else
void invalidate_icache_all(void)
diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig
index 85d6436..99a25f9 100644
--- a/arch/arm/cpu/armv7/omap3/Kconfig
+++ b/arch/arm/cpu/armv7/omap3/Kconfig
@@ -6,55 +6,39 @@ choice
config TARGET_AM3517_EVM
bool "AM3517 EVM"
- select SUPPORT_SPL
config TARGET_MT_VENTOUX
bool "TeeJet Mt.Ventoux"
- select SUPPORT_SPL
config TARGET_OMAP3_BEAGLE
bool "TI OMAP3 BeagleBoard"
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_CM_T35
bool "CompuLab CM-T3530 and CM-T3730 boards"
- select SUPPORT_SPL
config TARGET_CM_T3517
bool "CompuLab CM-T3517 boards"
config TARGET_DEVKIT8000
bool "TimLL OMAP3 Devkit8000"
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_OMAP3_EVM
bool "TI OMAP3 EVM"
- select SUPPORT_SPL
-
-config TARGET_OMAP3_EVM_QUICK_MMC
- bool "TI OMAP3 EVM Quick MMC"
- select SUPPORT_SPL
-
-config TARGET_OMAP3_EVM_QUICK_NAND
- bool "TI OMAP3 EVM Quick NAND"
- select SUPPORT_SPL
config TARGET_OMAP3_IGEP00X0
bool "IGEP"
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_OMAP3_OVERO
bool "OMAP35xx Gumstix Overo"
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
@@ -67,51 +51,42 @@ config TARGET_OMAP3_ZOOM1
config TARGET_AM3517_CRANE
bool "am3517_crane"
- select SUPPORT_SPL
config TARGET_OMAP3_PANDORA
bool "OMAP3 Pandora"
config TARGET_ECO5PK
bool "ECO5PK"
- select SUPPORT_SPL
config TARGET_TRICORDER
bool "Tricorder"
- select SUPPORT_SPL
config TARGET_MCX
bool "MCX"
- select SUPPORT_SPL
config TARGET_OMAP3_LOGIC
bool "OMAP3 Logic"
select DM
select DM_SERIAL
select DM_GPIO
- select SUPPORT_SPL
config TARGET_NOKIA_RX51
bool "Nokia RX51"
config TARGET_TAO3530
bool "TAO3530"
- select SUPPORT_SPL
config TARGET_TWISTER
bool "Twister"
- select SUPPORT_SPL
config TARGET_OMAP3_CAIRO
bool "QUIPOS CAIRO"
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
config TARGET_SNIPER
bool "LG Optimus Black"
- select SUPPORT_SPL
select DM
select DM_SERIAL
select DM_GPIO
diff --git a/arch/arm/cpu/armv7/omap5/Kconfig b/arch/arm/cpu/armv7/omap5/Kconfig
index 4fb5ef9..a8600b1 100644
--- a/arch/arm/cpu/armv7/omap5/Kconfig
+++ b/arch/arm/cpu/armv7/omap5/Kconfig
@@ -13,6 +13,7 @@ config TARGET_OMAP5_UEVM
config TARGET_DRA7XX_EVM
bool "TI DRA7XX"
select TI_I2C_BOARD_DETECT
+ select PHYS_64BIT
config TARGET_AM57XX_EVM
bool "AM57XX"
diff --git a/arch/arm/cpu/armv7/psci-common.c b/arch/arm/cpu/armv7/psci-common.c
index d14b693..8cb4107 100644
--- a/arch/arm/cpu/armv7/psci-common.c
+++ b/arch/arm/cpu/armv7/psci-common.c
@@ -29,7 +29,7 @@ static u32 psci_target_pc[CONFIG_ARMV7_PSCI_NR_CPUS] __secure_data = { 0 };
void __secure psci_save_target_pc(int cpu, u32 pc)
{
psci_target_pc[cpu] = pc;
- DSB;
+ dsb();
}
u32 __secure psci_get_target_pc(int cpu)
diff --git a/arch/arm/cpu/armv7/sunxi/psci.c b/arch/arm/cpu/armv7/sunxi/psci.c
index 7ac8406..766b8c7 100644
--- a/arch/arm/cpu/armv7/sunxi/psci.c
+++ b/arch/arm/cpu/armv7/sunxi/psci.c
@@ -53,16 +53,16 @@ static void __secure __mdelay(u32 ms)
u32 reg = ONE_MS * ms;
cp15_write_cntp_tval(reg);
- ISB;
+ isb();
cp15_write_cntp_ctl(3);
do {
- ISB;
+ isb();
reg = cp15_read_cntp_ctl();
} while (!(reg & BIT(2)));
cp15_write_cntp_ctl(0);
- ISB;
+ isb();
}
static void __secure clamp_release(u32 __maybe_unused *clamp)
@@ -164,7 +164,7 @@ static u32 __secure cp15_read_scr(void)
static void __secure cp15_write_scr(u32 scr)
{
asm volatile ("mcr p15, 0, %0, c1, c1, 0" : : "r" (scr));
- ISB;
+ isb();
}
/*
@@ -190,7 +190,7 @@ void __secure __irq psci_fiq_enter(void)
/* End of interrupt */
writel(reg, GICC_BASE + GICC_EOIR);
- DSB;
+ dsb();
/* Get CPU number */
cpu = (reg >> 10) & 0x7;
@@ -242,7 +242,7 @@ void __secure psci_cpu_off(void)
/* Ask CPU0 via SGI15 to pull the rug... */
writel(BIT(16) | 15, GICD_BASE + GICD_SGIR);
- DSB;
+ dsb();
/* Wait to be turned off */
while (1)
diff --git a/arch/arm/cpu/armv8/cache_v8.c b/arch/arm/cpu/armv8/cache_v8.c
index ac909a1..cd3f6c1 100644
--- a/arch/arm/cpu/armv8/cache_v8.c
+++ b/arch/arm/cpu/armv8/cache_v8.c
@@ -380,6 +380,7 @@ void setup_pgtables(void)
static void setup_all_pgtables(void)
{
u64 tlb_addr = gd->arch.tlb_addr;
+ u64 tlb_size = gd->arch.tlb_size;
/* Reset the fill ptr */
gd->arch.tlb_fillptr = tlb_addr;
@@ -388,10 +389,13 @@ static void setup_all_pgtables(void)
setup_pgtables();
/* Create emergency page tables */
+ gd->arch.tlb_size -= (uintptr_t)gd->arch.tlb_fillptr -
+ (uintptr_t)gd->arch.tlb_addr;
gd->arch.tlb_addr = gd->arch.tlb_fillptr;
setup_pgtables();
gd->arch.tlb_emerg = gd->arch.tlb_addr;
gd->arch.tlb_addr = tlb_addr;
+ gd->arch.tlb_size = tlb_size;
}
/* to activate the MMU we need to set up virtual memory */
diff --git a/arch/arm/include/asm/barriers.h b/arch/arm/include/asm/barriers.h
index 37870f9..04784b7 100644
--- a/arch/arm/include/asm/barriers.h
+++ b/arch/arm/include/asm/barriers.h
@@ -30,15 +30,22 @@
#endif /* !CONFIG_ARM64 */
-#if defined(__ARM_ARCH_7A__) || defined(CONFIG_ARM64)
+#if __LINUX_ARM_ARCH__ >= 7
#define ISB asm volatile ("isb sy" : : : "memory")
#define DSB asm volatile ("dsb sy" : : : "memory")
#define DMB asm volatile ("dmb sy" : : : "memory")
-#else
+#elif __LINUX_ARM_ARCH__ == 6
#define ISB CP15ISB
#define DSB CP15DSB
#define DMB CP15DMB
+#else
+#define ISB asm volatile ("" : : : "memory")
+#define DSB CP15DSB
+#define DMB asm volatile ("" : : : "memory")
#endif
+#define isb() ISB
+#define dsb() DSB
+#define dmb() DMB
#endif /* __ASSEMBLY__ */
#endif /* __BARRIERS_H__ */
diff --git a/arch/arm/include/asm/config.h b/arch/arm/include/asm/config.h
index 435fc45..1ad221a 100644
--- a/arch/arm/include/asm/config.h
+++ b/arch/arm/include/asm/config.h
@@ -11,7 +11,6 @@
#define CONFIG_SYS_BOOT_RAMDISK_HIGH
#ifdef CONFIG_ARM64
-#define CONFIG_PHYS_64BIT
#define CONFIG_STATIC_RELA
#endif
diff --git a/arch/arm/include/asm/io.h b/arch/arm/include/asm/io.h
index 6121f1d..5834f5b 100644
--- a/arch/arm/include/asm/io.h
+++ b/arch/arm/include/asm/io.h
@@ -25,6 +25,7 @@
#include <linux/types.h>
#include <asm/byteorder.h>
#include <asm/memory.h>
+#include <asm/barriers.h>
#if 0 /* XXX###XXX */
#include <asm/arch/hardware.h>
#endif /* XXX###XXX */
@@ -136,8 +137,7 @@ static inline void __raw_readsl(unsigned long addr, void *data, int longlen)
* TODO: The kernel offers some more advanced versions of barriers, it might
* have some advantages to use them instead of the simple one here.
*/
-#define mb() asm volatile("dsb sy" : : : "memory")
-#define dmb() __asm__ __volatile__ ("" : : : "memory")
+#define mb() dsb()
#define __iormb() dmb()
#define __iowmb() dmb()
diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h
index 2bdc0be..7b7b867 100644
--- a/arch/arm/include/asm/system.h
+++ b/arch/arm/include/asm/system.h
@@ -3,6 +3,7 @@
#include <common.h>
#include <linux/compiler.h>
+#include <asm/barriers.h>
#ifdef CONFIG_ARM64
@@ -34,11 +35,6 @@ enum dcache_option {
DCACHE_WRITEALLOC = 4 << 2,
};
-#define isb() \
- ({asm volatile( \
- "isb" : : : "memory"); \
- })
-
#define wfi() \
({asm volatile( \
"wfi" : : : "memory"); \
@@ -227,8 +223,6 @@ void __noreturn psci_system_reset(bool smc);
*/
void save_boot_params_ret(void);
-#define isb() __asm__ __volatile__ ("" : : : "memory")
-
#define nop() __asm__ __volatile__("mov\tr0,r0\t@ nop\n\t");
#ifdef __ARM_ARCH_7A__
diff --git a/arch/arm/lib/Makefile b/arch/arm/lib/Makefile
index 9f71376..a8d1557 100644
--- a/arch/arm/lib/Makefile
+++ b/arch/arm/lib/Makefile
@@ -67,11 +67,6 @@ extra-y += eabi_compat.o
endif
asflags-y += -DCONFIG_ARM_ASM_UNIFIED
-ifeq ($(CONFIG_SPL_BUILD)$(CONFIG_TEGRA),yy)
-asflags-y += -D__LINUX_ARM_ARCH__=4
-else
-asflags-y += -D__LINUX_ARM_ARCH__=$(CONFIG_SYS_ARM_ARCH)
-endif
# some files can only build in ARM or THUMB2, not THUMB1
diff --git a/arch/arm/mach-exynos/include/mach/system.h b/arch/arm/mach-exynos/include/mach/system.h
index 3ffb296..2c94a6b 100644
--- a/arch/arm/mach-exynos/include/mach/system.h
+++ b/arch/arm/mach-exynos/include/mach/system.h
@@ -38,16 +38,6 @@ struct exynos5_sysreg {
#define USB20_PHY_CFG_HOST_LINK_EN (1 << 0)
/*
- * Data Synchronization Barrier acts as a special kind of memory barrier.
- * No instruction in program order after this instruction executes until
- * this instruction completes. This instruction completes when:
- * - All explicit memory accesses before this instruction complete.
- * - All Cache, Branch predictor and TLB maintenance operations before
- * this instruction complete.
- */
-#define dsb() __asm__ __volatile__ ("dsb\n\t" : : );
-
-/*
* This instruction causes an event to be signaled to all cores
* within a multiprocessor system. If SEV is implemented,
* WFE must also be implemented.
diff --git a/arch/arm/mach-sunxi/dram_helpers.c b/arch/arm/mach-sunxi/dram_helpers.c
index 20b430f..95143d1 100644
--- a/arch/arm/mach-sunxi/dram_helpers.c
+++ b/arch/arm/mach-sunxi/dram_helpers.c
@@ -32,7 +32,7 @@ bool mctl_mem_matches(u32 offset)
/* Try to write different values to RAM at two addresses */
writel(0, CONFIG_SYS_SDRAM_BASE);
writel(0xaa55aa55, (ulong)CONFIG_SYS_SDRAM_BASE + offset);
- DSB;
+ dsb();
/* Check if the same value is actually observed when reading back */
return readl(CONFIG_SYS_SDRAM_BASE) ==
readl((ulong)CONFIG_SYS_SDRAM_BASE + offset);
diff --git a/arch/arm/mach-tegra/tegra20/Makefile b/arch/arm/mach-tegra/tegra20/Makefile
index 17c1990..72d82a5 100644
--- a/arch/arm/mach-tegra/tegra20/Makefile
+++ b/arch/arm/mach-tegra/tegra20/Makefile
@@ -10,7 +10,8 @@ endif
# The AVP is ARMv4T architecture so we must use special compiler
# flags for any startup files it might use.
-CFLAGS_warmboot_avp.o += -march=armv4t
+CFLAGS_warmboot_avp.o = -march=armv4t -U__LINUX_ARM_ARCH__ \
+ -D__LINUX_ARM_ARCH__=4
obj-y += clock.o funcmux.o pinmux.o
obj-$(CONFIG_TEGRA_LP0) += warmboot.o crypto.o warmboot_avp.o
diff --git a/arch/powerpc/cpu/mpc85xx/Kconfig b/arch/powerpc/cpu/mpc85xx/Kconfig
index 0b89157..9bcbda0 100644
--- a/arch/powerpc/cpu/mpc85xx/Kconfig
+++ b/arch/powerpc/cpu/mpc85xx/Kconfig
@@ -17,6 +17,7 @@ config TARGET_SOCRATES
config TARGET_B4860QDS
bool "Support B4860QDS"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_BSC9131RDB
bool "Support BSC9131RDB"
@@ -30,18 +31,23 @@ config TARGET_C29XPCIE
bool "Support C29XPCIE"
select SUPPORT_SPL
select SUPPORT_TPL
+ select PHYS_64BIT
config TARGET_P3041DS
bool "Support P3041DS"
+ select PHYS_64BIT
config TARGET_P4080DS
bool "Support P4080DS"
+ select PHYS_64BIT
config TARGET_P5020DS
bool "Support P5020DS"
+ select PHYS_64BIT
config TARGET_P5040DS
bool "Support P5040DS"
+ select PHYS_64BIT
config TARGET_MPC8536DS
bool "Support MPC8536DS"
@@ -96,46 +102,57 @@ config TARGET_P1_TWR
config TARGET_P2041RDB
bool "Support P2041RDB"
+ select PHYS_64BIT
config TARGET_QEMU_PPCE500
bool "Support qemu-ppce500"
+ select PHYS_64BIT
config TARGET_T102XQDS
bool "Support T102xQDS"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_T102XRDB
bool "Support T102xRDB"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_T1040QDS
bool "Support T1040QDS"
+ select PHYS_64BIT
config TARGET_T104XRDB
bool "Support T104xRDB"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_T208XQDS
bool "Support T208xQDS"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_T208XRDB
bool "Support T208xRDB"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_T4240QDS
bool "Support T4240QDS"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_T4240RDB
bool "Support T4240RDB"
select SUPPORT_SPL
+ select PHYS_64BIT
config TARGET_CONTROLCENTERD
bool "Support controlcenterd"
config TARGET_KMP204X
bool "Support kmp204x"
+ select PHYS_64BIT
config TARGET_XPEDITE520X
bool "Support xpedite520x"
@@ -151,6 +168,7 @@ config TARGET_UCP1020
config TARGET_CYRUS
bool "Support Varisys Cyrus"
+ select PHYS_64BIT
endchoice
diff --git a/arch/powerpc/cpu/ppc4xx/Kconfig b/arch/powerpc/cpu/ppc4xx/Kconfig
index 36af1b9..92a330d 100644
--- a/arch/powerpc/cpu/ppc4xx/Kconfig
+++ b/arch/powerpc/cpu/ppc4xx/Kconfig
@@ -30,6 +30,7 @@ config TARGET_CANYONLANDS
config TARGET_KATMAI
bool "Support katmai"
+ select PHYS_64BIT
config TARGET_KILAUEA
bool "Support kilauea"
diff --git a/board/synopsys/Kconfig b/board/synopsys/Kconfig
index 8ab48cd..27e5509 100644
--- a/board/synopsys/Kconfig
+++ b/board/synopsys/Kconfig
@@ -1,9 +1,9 @@
-if TARGET_ARCANGEL4
+if TARGET_NSIM
config SYS_VENDOR
default "synopsys"
config SYS_CONFIG_NAME
- default "arcangel4"
+ default "nsim"
endif
diff --git a/board/synopsys/MAINTAINERS b/board/synopsys/MAINTAINERS
index 43114ce..b9bfd3c 100644
--- a/board/synopsys/MAINTAINERS
+++ b/board/synopsys/MAINTAINERS
@@ -1,6 +1,8 @@
- BOARD
M: Alexey Brodkin <abrodkin@synopsys.com>
S: Maintained
-F: include/configs/arcangel4.h
-F: configs/arcangel4_defconfig
-F: configs/arcangel4-be_defconfig
+F: include/configs/nsim.h
+F: configs/nsim_700_defconfig
+F: configs/nsim_700be_defconfig
+F: configs/nsim_hs38_defconfig
+F: configs/nsim_hs38be_defconfig
diff --git a/board/synopsys/axs101/Makefile b/board/synopsys/axs101/Makefile
deleted file mode 100644
index f0965f7..0000000
--- a/board/synopsys/axs101/Makefile
+++ /dev/null
@@ -1,8 +0,0 @@
-#
-# Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
-#
-# SPDX-License-Identifier: GPL-2.0+
-#
-
-obj-y += axs101.o
-obj-$(CONFIG_CMD_NAND) += nand.o
diff --git a/board/synopsys/axs101/Kconfig b/board/synopsys/axs10x/Kconfig
index 79e5400..c60b6a2 100644
--- a/board/synopsys/axs101/Kconfig
+++ b/board/synopsys/axs10x/Kconfig
@@ -1,12 +1,12 @@
-if TARGET_AXS101
+if TARGET_AXS10X
config SYS_BOARD
- default "axs101"
+ default "axs10x"
config SYS_VENDOR
default "synopsys"
config SYS_CONFIG_NAME
- default "axs101"
+ default "axs10x"
endif
diff --git a/board/synopsys/axs101/MAINTAINERS b/board/synopsys/axs10x/MAINTAINERS
index 79fff8e..abb890b 100644
--- a/board/synopsys/axs101/MAINTAINERS
+++ b/board/synopsys/axs10x/MAINTAINERS
@@ -1,7 +1,7 @@
-AXS101 BOARD
+AXS10X BOARD
M: Alexey Brodkin <abrodkin@synopsys.com>
S: Maintained
-F: board/synopsys/axs101/
-F: include/configs/axs101.h
+F: board/synopsys/axs10x/
+F: include/configs/axs10x.h
F: configs/axs101_defconfig
F: configs/axs103_defconfig
diff --git a/board/synopsys/axs10x/Makefile b/board/synopsys/axs10x/Makefile
new file mode 100644
index 0000000..e29d520
--- /dev/null
+++ b/board/synopsys/axs10x/Makefile
@@ -0,0 +1,8 @@
+#
+# Copyright (C) 2013-2016 Synopsys, Inc. All rights reserved.
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y += axs10x.o
+obj-$(CONFIG_CMD_NAND) += nand.o
diff --git a/board/synopsys/axs101/axs101.c b/board/synopsys/axs10x/axs10x.c
index a5e774b..a5e774b 100644
--- a/board/synopsys/axs101/axs101.c
+++ b/board/synopsys/axs10x/axs10x.c
diff --git a/board/synopsys/axs101/axs10x.h b/board/synopsys/axs10x/axs10x.h
index 8e8c41f..8e8c41f 100644
--- a/board/synopsys/axs101/axs10x.h
+++ b/board/synopsys/axs10x/axs10x.h
diff --git a/board/synopsys/axs101/nand.c b/board/synopsys/axs10x/nand.c
index 4be52e2..4be52e2 100644
--- a/board/synopsys/axs101/nand.c
+++ b/board/synopsys/axs10x/nand.c
diff --git a/board/ti/evm/Kconfig b/board/ti/evm/Kconfig
index f02aa31..4f490dd 100644
--- a/board/ti/evm/Kconfig
+++ b/board/ti/evm/Kconfig
@@ -10,29 +10,3 @@ config SYS_CONFIG_NAME
default "omap3_evm"
endif
-
-if TARGET_OMAP3_EVM_QUICK_MMC
-
-config SYS_BOARD
- default "evm"
-
-config SYS_VENDOR
- default "ti"
-
-config SYS_CONFIG_NAME
- default "omap3_evm_quick_mmc"
-
-endif
-
-if TARGET_OMAP3_EVM_QUICK_NAND
-
-config SYS_BOARD
- default "evm"
-
-config SYS_VENDOR
- default "ti"
-
-config SYS_CONFIG_NAME
- default "omap3_evm_quick_nand"
-
-endif
diff --git a/board/ti/evm/MAINTAINERS b/board/ti/evm/MAINTAINERS
index 90c3f6b..612a08a 100644
--- a/board/ti/evm/MAINTAINERS
+++ b/board/ti/evm/MAINTAINERS
@@ -3,8 +3,4 @@ M: Tom Rini <trini@konsulko.com>
S: Maintained
F: board/ti/evm/
F: include/configs/omap3_evm.h
-F: include/configs/omap3_evm_quick_mmc.h
-F: include/configs/omap3_evm_quick_nand.h
F: configs/omap3_evm_defconfig
-F: configs/omap3_evm_quick_mmc_defconfig
-F: configs/omap3_evm_quick_nand_defconfig
diff --git a/cmd/bdinfo.c b/cmd/bdinfo.c
index 1fb66c4..637463e 100644
--- a/cmd/bdinfo.c
+++ b/cmd/bdinfo.c
@@ -69,6 +69,103 @@ static void print_mhz(const char *name, unsigned long hz)
printf("%-12s= %6s MHz\n", name, strmhz(buf, hz));
}
+
+static inline void print_bi_boot_params(const bd_t *bd)
+{
+ print_num("boot_params", (ulong)bd->bi_boot_params);
+}
+
+static inline void print_bi_mem(const bd_t *bd)
+{
+#if defined(CONFIG_SH)
+ print_num("mem start ", (ulong)bd->bi_memstart);
+ print_lnum("mem size ", (u64)bd->bi_memsize);
+#elif defined(CONFIG_ARC)
+ print_num("mem start", (ulong)bd->bi_memstart);
+ print_lnum("mem size", (u64)bd->bi_memsize);
+#elif defined(CONFIG_AVR32)
+ print_num("memstart", (ulong)bd->bi_dram[0].start);
+ print_lnum("memsize", (u64)bd->bi_dram[0].size);
+#else
+ print_num("memstart", (ulong)bd->bi_memstart);
+ print_lnum("memsize", (u64)bd->bi_memsize);
+#endif
+}
+
+static inline void print_bi_dram(const bd_t *bd)
+{
+#ifdef CONFIG_NR_DRAM_BANKS
+ int i;
+
+ for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
+ print_num("DRAM bank", i);
+ print_num("-> start", bd->bi_dram[i].start);
+ print_num("-> size", bd->bi_dram[i].size);
+ }
+#endif
+}
+
+static inline void print_bi_flash(const bd_t *bd)
+{
+#if defined(CONFIG_MICROBLAZE) || defined(CONFIG_SH)
+ print_num("flash start ", (ulong)bd->bi_flashstart);
+ print_num("flash size ", (ulong)bd->bi_flashsize);
+ print_num("flash offset ", (ulong)bd->bi_flashoffset);
+
+#elif defined(CONFIG_NIOS2) || defined(CONFIG_OPENRISC)
+ print_num("flash start", (ulong)bd->bi_flashstart);
+ print_num("flash size", (ulong)bd->bi_flashsize);
+ print_num("flash offset", (ulong)bd->bi_flashoffset);
+#else
+ print_num("flashstart", (ulong)bd->bi_flashstart);
+ print_num("flashsize", (ulong)bd->bi_flashsize);
+ print_num("flashoffset", (ulong)bd->bi_flashoffset);
+#endif
+}
+
+static inline void print_eth_ip_addr(void)
+{
+#if defined(CONFIG_CMD_NET)
+ print_eth(0);
+#if defined(CONFIG_HAS_ETH1)
+ print_eth(1);
+#endif
+#if defined(CONFIG_HAS_ETH2)
+ print_eth(2);
+#endif
+#if defined(CONFIG_HAS_ETH3)
+ print_eth(3);
+#endif
+#if defined(CONFIG_HAS_ETH4)
+ print_eth(4);
+#endif
+#if defined(CONFIG_HAS_ETH5)
+ print_eth(5);
+#endif
+ printf("IP addr = %s\n", getenv("ipaddr"));
+#endif
+}
+
+static inline void print_baudrate(void)
+{
+#if defined(CONFIG_PPC)
+ printf("baudrate = %6u bps\n", gd->baudrate);
+#elif defined(CONFIG_SPARC)
+ printf("baudrate = %6u bps\n", gd->baudrate);
+#else
+ printf("baudrate = %u bps\n", gd->baudrate);
+#endif
+}
+
+static inline void print_std_bdinfo(const bd_t *bd)
+{
+ print_bi_boot_params(bd);
+ print_bi_mem(bd);
+ print_bi_flash(bd);
+ print_eth_ip_addr();
+ print_baudrate();
+}
+
#if defined(CONFIG_PPC)
void __weak board_detail(void)
{
@@ -82,11 +179,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#ifdef DEBUG
print_num("bd address", (ulong)bd);
#endif
- print_num("memstart", bd->bi_memstart);
- print_lnum("memsize", bd->bi_memsize);
- print_num("flashstart", bd->bi_flashstart);
- print_num("flashsize", bd->bi_flashsize);
- print_num("flashoffset", bd->bi_flashoffset);
+ print_bi_mem(bd);
+ print_bi_flash(bd);
print_num("sramstart", bd->bi_sramstart);
print_num("sramsize", bd->bi_sramsize);
#if defined(CONFIG_5xx) || defined(CONFIG_8xx) || \
@@ -129,25 +223,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#endif
#endif
- print_eth(0);
-#if defined(CONFIG_HAS_ETH1)
- print_eth(1);
-#endif
-#if defined(CONFIG_HAS_ETH2)
- print_eth(2);
-#endif
-#if defined(CONFIG_HAS_ETH3)
- print_eth(3);
-#endif
-#if defined(CONFIG_HAS_ETH4)
- print_eth(4);
-#endif
-#if defined(CONFIG_HAS_ETH5)
- print_eth(5);
-#endif
-
- printf("IP addr = %s\n", getenv("ipaddr"));
- printf("baudrate = %6u bps\n", gd->baudrate);
+ print_eth_ip_addr();
+ print_baudrate();
print_num("relocaddr", gd->relocaddr);
board_detail();
return 0;
@@ -157,30 +234,18 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- int i;
bd_t *bd = gd->bd;
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- print_num("DRAM bank", i);
- print_num("-> start", bd->bi_dram[i].start);
- print_num("-> size", bd->bi_dram[i].size);
- }
-
- print_num("flash start", (ulong)bd->bi_flashstart);
- print_num("flash size", (ulong)bd->bi_flashsize);
- print_num("flash offset", (ulong)bd->bi_flashoffset);
+ print_bi_dram(bd);
+ print_bi_flash(bd);
#if defined(CONFIG_SYS_SRAM_BASE)
print_num ("sram start", (ulong)bd->bi_sramstart);
print_num ("sram size", (ulong)bd->bi_sramsize);
#endif
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
-
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
@@ -190,17 +255,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
- int i;
-
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- print_num("DRAM bank", i);
- print_num("-> start", bd->bi_dram[i].start);
- print_num("-> size", bd->bi_dram[i].size);
- }
- print_num("flash start ", (ulong)bd->bi_flashstart);
- print_num("flash size ", (ulong)bd->bi_flashsize);
- print_num("flash offset ", (ulong)bd->bi_flashoffset);
+ print_bi_dram(bd);
+ print_bi_flash(bd);
#if defined(CONFIG_SYS_SRAM_BASE)
print_num("sram start ", (ulong)bd->bi_sramstart);
print_num("sram size ", (ulong)bd->bi_sramsize);
@@ -208,7 +265,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
#if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH)
print_eths();
#endif
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_baudrate();
print_num("relocaddr", gd->relocaddr);
print_num("reloc off", gd->reloc_off);
print_num("fdt_blob", (ulong)gd->fdt_blob);
@@ -243,11 +300,8 @@ int do_bdinfo(cmd_tbl_t * cmdtp, int flag, int argc, char * const argv[])
printf("CONFIG_SYS_GBL_DATA_OFFSET = 0x%x (%d)\n", CONFIG_SYS_GBL_DATA_OFFSET,
GENERATED_GBL_DATA_SIZE);
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
- printf("baudrate = %6u bps\n", gd->baudrate);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
@@ -257,11 +311,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
- print_num("memstart", (ulong)bd->bi_memstart);
- print_lnum("memsize", (u64)bd->bi_memsize);
- print_num("flashstart", (ulong)bd->bi_flashstart);
- print_num("flashsize", (ulong)bd->bi_flashsize);
- print_num("flashoffset", (ulong)bd->bi_flashoffset);
+ print_bi_mem(bd);
+ print_bi_flash(bd);
#if defined(CONFIG_SYS_INIT_RAM_ADDR)
print_num("sramstart", (ulong)bd->bi_sramstart);
print_num("sramsize", (ulong)bd->bi_sramsize);
@@ -279,21 +330,8 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_mhz("inpfreq", bd->bi_inpfreq);
print_mhz("vcofreq", bd->bi_vcofreq);
#endif
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
-#if defined(CONFIG_HAS_ETH1)
- print_eth(1);
-#endif
-#if defined(CONFIG_HAS_ETH2)
- print_eth(2);
-#endif
-#if defined(CONFIG_HAS_ETH3)
- print_eth(3);
-#endif
-
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
@@ -311,16 +349,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_mhz("CCLK", bd->bi_cclk);
print_mhz("SCLK", bd->bi_sclk);
- print_num("boot_params", (ulong)bd->bi_boot_params);
- print_num("memstart", (ulong)bd->bi_memstart);
- print_lnum("memsize", (u64)bd->bi_memsize);
- print_num("flashstart", (ulong)bd->bi_flashstart);
- print_num("flashsize", (ulong)bd->bi_flashsize);
- print_num("flashoffset", (ulong)bd->bi_flashoffset);
-
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_std_bdinfo(bd);
return 0;
}
@@ -329,18 +358,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- bd_t *bd = gd->bd;
-
- print_num("boot_params", (ulong)bd->bi_boot_params);
- print_num("memstart", (ulong)bd->bi_memstart);
- print_lnum("memsize", (u64)bd->bi_memsize);
- print_num("flashstart", (ulong)bd->bi_flashstart);
- print_num("flashsize", (ulong)bd->bi_flashsize);
- print_num("flashoffset", (ulong)bd->bi_flashoffset);
-
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_std_bdinfo(gd->bd);
print_num("relocaddr", gd->relocaddr);
print_num("reloc off", gd->reloc_off);
@@ -351,19 +369,7 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- bd_t *bd = gd->bd;
-
- print_num("boot_params", (ulong)bd->bi_boot_params);
- print_num("memstart", (ulong)bd->bi_dram[0].start);
- print_lnum("memsize", (u64)bd->bi_dram[0].size);
- print_num("flashstart", (ulong)bd->bi_flashstart);
- print_num("flashsize", (ulong)bd->bi_flashsize);
- print_num("flashoffset", (ulong)bd->bi_flashoffset);
-
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
- printf("baudrate = %u bps\n", gd->baudrate);
-
+ print_std_bdinfo(gd->bd);
return 0;
}
@@ -372,17 +378,11 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
char * const argv[])
{
- int i;
bd_t *bd = gd->bd;
print_num("arch_number", bd->bi_arch_number);
- print_num("boot_params", (ulong)bd->bi_boot_params);
-
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- print_num("DRAM bank", i);
- print_num("-> start", bd->bi_dram[i].start);
- print_num("-> size", bd->bi_dram[i].size);
- }
+ print_bi_boot_params(bd);
+ print_bi_dram(bd);
#ifdef CONFIG_SYS_MEM_RESERVE_SECURE
if (gd->arch.secure_ram & MEM_RESERVE_SECURE_SECURED) {
@@ -393,7 +393,7 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
#if defined(CONFIG_CMD_NET) && !defined(CONFIG_DM_ETH)
print_eths();
#endif
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_baudrate();
#if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF))
print_num("TLB addr", gd->arch.tlb_addr);
#endif
@@ -429,17 +429,11 @@ static int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc,
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
- print_num("mem start ", (ulong)bd->bi_memstart);
- print_lnum("mem size ", (u64)bd->bi_memsize);
- print_num("flash start ", (ulong)bd->bi_flashstart);
- print_num("flash size ", (ulong)bd->bi_flashsize);
- print_num("flash offset ", (ulong)bd->bi_flashoffset);
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_bi_mem(bd);
+ print_bi_flash(bd);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
@@ -447,10 +441,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- int i;
bd_t *bd = gd->bd;
- print_num("boot_params", (ulong)bd->bi_boot_params);
+ print_bi_boot_params(bd);
print_num("bi_memstart", bd->bi_memstart);
print_num("bi_memsize", bd->bi_memsize);
print_num("bi_flashstart", bd->bi_flashstart);
@@ -462,18 +455,13 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
print_mhz("cpufreq", bd->bi_intfreq);
print_mhz("busfreq", bd->bi_busfreq);
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- print_num("DRAM bank", i);
- print_num("-> start", bd->bi_dram[i].start);
- print_num("-> size", bd->bi_dram[i].size);
- }
+ print_bi_dram(bd);
#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
+ print_eth_ip_addr();
print_mhz("ethspeed", bd->bi_ethspeed);
#endif
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_baudrate();
return 0;
}
@@ -482,21 +470,12 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- int i;
bd_t *bd = gd->bd;
- print_num("boot_params", (ulong)bd->bi_boot_params);
-
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- print_num("DRAM bank", i);
- print_num("-> start", bd->bi_dram[i].start);
- print_num("-> size", bd->bi_dram[i].size);
- }
+ print_bi_boot_params(bd);
+ print_bi_dram(bd);
+ print_eth_ip_addr();
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
#if defined(CONFIG_LCD) || defined(CONFIG_VIDEO)
print_num("FB base ", gd->fb_base);
#endif
@@ -507,23 +486,13 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
- int i;
bd_t *bd = gd->bd;
print_num("arch_number", bd->bi_arch_number);
- print_num("boot_params", (ulong)bd->bi_boot_params);
-
- for (i = 0; i < CONFIG_NR_DRAM_BANKS; ++i) {
- print_num("DRAM bank", i);
- print_num("-> start", bd->bi_dram[i].start);
- print_num("-> size", bd->bi_dram[i].size);
- }
-
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_bi_boot_params(bd);
+ print_bi_dram(bd);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
@@ -534,18 +503,10 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
- print_num("mem start", (ulong)bd->bi_memstart);
- print_lnum("mem size", (u64)bd->bi_memsize);
- print_num("flash start", (ulong)bd->bi_flashstart);
- print_num("flash size", (ulong)bd->bi_flashsize);
- print_num("flash offset", (ulong)bd->bi_flashoffset);
-
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
-
- printf("baudrate = %u bps\n", gd->baudrate);
+ print_bi_mem(bd);
+ print_bi_flash(bd);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
@@ -556,14 +517,9 @@ int do_bdinfo(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
{
bd_t *bd = gd->bd;
- print_num("mem start", bd->bi_memstart);
- print_lnum("mem size", bd->bi_memsize);
-
-#if defined(CONFIG_CMD_NET)
- print_eth(0);
- printf("ip_addr = %s\n", getenv("ipaddr"));
-#endif
- printf("baudrate = %d bps\n", gd->baudrate);
+ print_bi_mem(bd);
+ print_eth_ip_addr();
+ print_baudrate();
return 0;
}
diff --git a/cmd/gpt.c b/cmd/gpt.c
index 3d9706b..897596a 100644
--- a/cmd/gpt.c
+++ b/cmd/gpt.c
@@ -298,8 +298,8 @@ static int set_gpt_info(struct blk_desc *dev_desc,
if (extract_env(val, &p))
p = val;
if ((strcmp(p, "-") == 0)) {
- /* remove first usable lba and last block */
- parts[i].size = dev_desc->lba - 34 - 1 - offset;
+ /* Let part efi module to auto extend the size */
+ parts[i].size = 0;
} else {
size_ll = ustrtoull(p, &p, 0);
parts[i].size = lldiv(size_ll, dev_desc->blksz);
diff --git a/configs/C29XPCIE_NAND_defconfig b/configs/C29XPCIE_NAND_defconfig
index bc2ddca..7db345e 100644
--- a/configs/C29XPCIE_NAND_defconfig
+++ b/configs/C29XPCIE_NAND_defconfig
@@ -7,7 +7,7 @@ CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,NAND"
CONFIG_BOOTDELAY=-1
CONFIG_HUSH_PARSER=y
CONFIG_CMD_SF=y
diff --git a/configs/C29XPCIE_NOR_SECBOOT_defconfig b/configs/C29XPCIE_NOR_SECBOOT_defconfig
index 99b437a..8b81f9f 100644
--- a/configs/C29XPCIE_NOR_SECBOOT_defconfig
+++ b/configs/C29XPCIE_NOR_SECBOOT_defconfig
@@ -6,7 +6,7 @@ CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,SECURE_BOOT"
CONFIG_BOOTDELAY=-1
CONFIG_HUSH_PARSER=y
CONFIG_CMD_SF=y
diff --git a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
index 491fba2..bc3ba82 100644
--- a/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_SECBOOT_defconfig
@@ -6,7 +6,7 @@ CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SPIFLASH,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,SPIFLASH,SECURE_BOOT"
CONFIG_BOOTDELAY=-1
CONFIG_HUSH_PARSER=y
CONFIG_CMD_SF=y
diff --git a/configs/C29XPCIE_SPIFLASH_defconfig b/configs/C29XPCIE_SPIFLASH_defconfig
index f2d9772..ff16c7a 100644
--- a/configs/C29XPCIE_SPIFLASH_defconfig
+++ b/configs/C29XPCIE_SPIFLASH_defconfig
@@ -5,7 +5,7 @@ CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,SPIFLASH"
CONFIG_BOOTDELAY=-1
CONFIG_HUSH_PARSER=y
CONFIG_CMD_SF=y
diff --git a/configs/C29XPCIE_defconfig b/configs/C29XPCIE_defconfig
index 9ccf0e8..8dd57d2 100644
--- a/configs/C29XPCIE_defconfig
+++ b/configs/C29XPCIE_defconfig
@@ -5,7 +5,7 @@ CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="C29XPCIE"
CONFIG_BOOTDELAY=-1
CONFIG_HUSH_PARSER=y
CONFIG_CMD_SF=y
diff --git a/configs/MPC8536DS_36BIT_defconfig b/configs/MPC8536DS_36BIT_defconfig
index 2ffc647..7e221bb 100644
--- a/configs/MPC8536DS_36BIT_defconfig
+++ b/configs/MPC8536DS_36BIT_defconfig
@@ -1,9 +1,9 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_MPC8536DS=y
+CONFIG_PHYS_64BIT=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/MPC8548CDS_36BIT_defconfig b/configs/MPC8548CDS_36BIT_defconfig
index 066eaf2..5d834e6 100644
--- a/configs/MPC8548CDS_36BIT_defconfig
+++ b/configs/MPC8548CDS_36BIT_defconfig
@@ -1,9 +1,9 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_MPC8548CDS=y
+CONFIG_PHYS_64BIT=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_I2C=y
diff --git a/configs/MPC8572DS_36BIT_defconfig b/configs/MPC8572DS_36BIT_defconfig
index 8218ef6..4ca98ab 100644
--- a/configs/MPC8572DS_36BIT_defconfig
+++ b/configs/MPC8572DS_36BIT_defconfig
@@ -1,11 +1,11 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_MPC8572DS=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_I2C=y
diff --git a/configs/MPC8641HPCN_36BIT_defconfig b/configs/MPC8641HPCN_36BIT_defconfig
index b90e6ea..2292360 100644
--- a/configs/MPC8641HPCN_36BIT_defconfig
+++ b/configs/MPC8641HPCN_36BIT_defconfig
@@ -1,9 +1,9 @@
CONFIG_PPC=y
CONFIG_MPC86xx=y
CONFIG_TARGET_MPC8641HPCN=y
+CONFIG_PHYS_64BIT=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="PHYS_64BIT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_I2C=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
index 5e05795..e750ab2 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_SECBOOT_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,NAND_SECBOOT,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,NAND_SECBOOT,SECURE_BOOT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig
index 5e12add..cdc140d 100644
--- a/configs/P1010RDB-PA_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig
@@ -1,13 +1,14 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_TPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,NAND"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
index b63475c..a9b6c58 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_SECBOOT_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SECURE_BOOT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PA_36BIT_NOR_defconfig b/configs/P1010RDB-PA_36BIT_NOR_defconfig
index 74168da..22231ab 100644
--- a/configs/P1010RDB-PA_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PA_36BIT_NOR_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
index 2e34a10..f41535b 100644
--- a/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
index d5bf946..536eeff 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SPIFLASH,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SPIFLASH,SECURE_BOOT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
index aa08a59..fbadc0a 100644
--- a/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PA_36BIT_SPIFLASH_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PA,SPIFLASH"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
index e8564f9..2e97f06 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_SECBOOT_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,NAND_SECBOOT,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,NAND_SECBOOT,SECURE_BOOT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig
index 425344b..14ba390 100644
--- a/configs/P1010RDB-PB_36BIT_NAND_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig
@@ -1,13 +1,14 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_TPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,NAND"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
index dce2a1a..c31a152 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_SECBOOT_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SECURE_BOOT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_NOR_defconfig b/configs/P1010RDB-PB_36BIT_NOR_defconfig
index 883de6f..5929f00 100644
--- a/configs/P1010RDB-PB_36BIT_NOR_defconfig
+++ b/configs/P1010RDB-PB_36BIT_NOR_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
index 381caad..e6bba19 100644
--- a/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
index 293a945..a8aff01 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_SECBOOT_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
-# CONFIG_SYS_MALLOC_F is not set
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+# CONFIG_SYS_MALLOC_F is not set
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SPIFLASH,SECURE_BOOT"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SPIFLASH,SECURE_BOOT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
index 0c8ae44..d7fe891 100644
--- a/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
+++ b/configs/P1010RDB-PB_36BIT_SPIFLASH_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1010RDB=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="P1010RDB_PB,SPIFLASH"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020MBG-PC_36BIT_SDCARD_defconfig b/configs/P1020MBG-PC_36BIT_SDCARD_defconfig
index bb27831..ecd189f 100644
--- a/configs/P1020MBG-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020MBG-PC_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020MBG,SDCARD,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1020MBG,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020MBG-PC_36BIT_defconfig b/configs/P1020MBG-PC_36BIT_defconfig
index 79a4282..69ccc3e 100644
--- a/configs/P1020MBG-PC_36BIT_defconfig
+++ b/configs/P1020MBG-PC_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020MBG,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1020MBG"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig
index 1c98b55..c1937e4 100644
--- a/configs/P1020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig
@@ -1,13 +1,14 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_TPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,NAND"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
index e5bff61..8d99c18 100644
--- a/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
index dda50fb..4a2a213 100644
--- a/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,SPIFLASH"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020RDB-PC_36BIT_defconfig b/configs/P1020RDB-PC_36BIT_defconfig
index b693705..aea06d0 100644
--- a/configs/P1020RDB-PC_36BIT_defconfig
+++ b/configs/P1020RDB-PC_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1020RDB_PC"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020UTM-PC_36BIT_SDCARD_defconfig b/configs/P1020UTM-PC_36BIT_SDCARD_defconfig
index 6dfe195..5807c80 100644
--- a/configs/P1020UTM-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1020UTM-PC_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020UTM,36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="P1020UTM,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1020UTM-PC_36BIT_defconfig b/configs/P1020UTM-PC_36BIT_defconfig
index 98f9285..f0ca548 100644
--- a/configs/P1020UTM-PC_36BIT_defconfig
+++ b/configs/P1020UTM-PC_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1020UTM,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1020UTM"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1021RDB-PC_36BIT_NAND_defconfig b/configs/P1021RDB-PC_36BIT_NAND_defconfig
index eeb232d..1dc9170 100644
--- a/configs/P1021RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P1021RDB-PC_36BIT_NAND_defconfig
@@ -1,13 +1,14 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_TPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,NAND"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
index d2f83fa..e26d221 100644
--- a/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
index 09ba6ea..af880fd 100644
--- a/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P1021RDB-PC_36BIT_SPIFLASH_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,SPIFLASH"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1021RDB-PC_36BIT_defconfig b/configs/P1021RDB-PC_36BIT_defconfig
index 7652d29..2e1d165 100644
--- a/configs/P1021RDB-PC_36BIT_defconfig
+++ b/configs/P1021RDB-PC_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1021RDB,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1021RDB"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1022DS_36BIT_NAND_defconfig b/configs/P1022DS_36BIT_NAND_defconfig
index 352305d..65e46e1 100644
--- a/configs/P1022DS_36BIT_NAND_defconfig
+++ b/configs/P1022DS_36BIT_NAND_defconfig
@@ -1,13 +1,14 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1022DS=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_TPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="NAND"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1022DS_36BIT_SDCARD_defconfig b/configs/P1022DS_36BIT_SDCARD_defconfig
index 68a6c11..13e3cd5 100644
--- a/configs/P1022DS_36BIT_SDCARD_defconfig
+++ b/configs/P1022DS_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1022DS=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1022DS_36BIT_SPIFLASH_defconfig b/configs/P1022DS_36BIT_SPIFLASH_defconfig
index 21300da..b01781c 100644
--- a/configs/P1022DS_36BIT_SPIFLASH_defconfig
+++ b/configs/P1022DS_36BIT_SPIFLASH_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1022DS=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="SPIFLASH"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1022DS_36BIT_defconfig b/configs/P1022DS_36BIT_defconfig
index c63abc3..7ad8ec0 100644
--- a/configs/P1022DS_36BIT_defconfig
+++ b/configs/P1022DS_36BIT_defconfig
@@ -1,11 +1,11 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1022DS=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1024RDB_36BIT_defconfig b/configs/P1024RDB_36BIT_defconfig
index d3731a8..42a3e35 100644
--- a/configs/P1024RDB_36BIT_defconfig
+++ b/configs/P1024RDB_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1024RDB,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1024RDB"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P1025RDB_36BIT_defconfig b/configs/P1025RDB_36BIT_defconfig
index 9864486..0da4178 100644
--- a/configs/P1025RDB_36BIT_defconfig
+++ b/configs/P1025RDB_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P1025RDB,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P1025RDB"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig
index 2421a73..1e163f5 100644
--- a/configs/P2020RDB-PC_36BIT_NAND_defconfig
+++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig
@@ -1,13 +1,14 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_TPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT,NAND"
+CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,NAND"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
index fce023b..d6e287c 100644
--- a/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SDCARD_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
index a316264..d3082bf 100644
--- a/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
+++ b/configs/P2020RDB-PC_36BIT_SPIFLASH_defconfig
@@ -1,12 +1,13 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_SPL=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT,SPIFLASH"
+CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,SPIFLASH"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/P2020RDB-PC_36BIT_defconfig b/configs/P2020RDB-PC_36BIT_defconfig
index 0bc2d1a..59edb0e 100644
--- a/configs/P2020RDB-PC_36BIT_defconfig
+++ b/configs/P2020RDB-PC_36BIT_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_P1_P2_RDB_PC=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="P2020RDB,36BIT"
+CONFIG_SYS_EXTRA_OPTIONS="P2020RDB"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
CONFIG_CMD_MMC=y
diff --git a/configs/axs101_defconfig b/configs/axs101_defconfig
index 10e802d..dd82581 100644
--- a/configs/axs101_defconfig
+++ b/configs/axs101_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARC=y
CONFIG_SYS_DCACHE_OFF=y
-CONFIG_DM_SERIAL=y
CONFIG_SYS_CLK_FREQ=750000000
+CONFIG_DM_SERIAL=y
CONFIG_SYS_TEXT_BASE=0x81000000
CONFIG_DEFAULT_DEVICE_TREE="axs10x"
CONFIG_BOOTDELAY=3
diff --git a/configs/axs103_defconfig b/configs/axs103_defconfig
index c8474de..8977f81 100644
--- a/configs/axs103_defconfig
+++ b/configs/axs103_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARC=y
CONFIG_ISA_ARCV2=y
-CONFIG_DM_SERIAL=y
CONFIG_SYS_CLK_FREQ=100000000
+CONFIG_DM_SERIAL=y
CONFIG_SYS_TEXT_BASE=0x81000000
CONFIG_DEFAULT_DEVICE_TREE="axs10x"
CONFIG_BOOTDELAY=3
diff --git a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
index aff6328..70a051a 100644
--- a/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_DEVELOP_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_CONTROLCENTERD=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD,DEVELOP"
+CONFIG_SYS_EXTRA_OPTIONS="SDCARD,DEVELOP"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
# CONFIG_CMD_IMLS is not set
diff --git a/configs/controlcenterd_36BIT_SDCARD_defconfig b/configs/controlcenterd_36BIT_SDCARD_defconfig
index 74b67f7..fe7b463 100644
--- a/configs/controlcenterd_36BIT_SDCARD_defconfig
+++ b/configs/controlcenterd_36BIT_SDCARD_defconfig
@@ -1,11 +1,12 @@
CONFIG_PPC=y
CONFIG_MPC85xx=y
CONFIG_TARGET_CONTROLCENTERD=y
+CONFIG_PHYS_64BIT=y
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_OF_BOARD_SETUP=y
CONFIG_OF_STDOUT_VIA_ALIAS=y
-CONFIG_SYS_EXTRA_OPTIONS="36BIT,SDCARD"
+CONFIG_SYS_EXTRA_OPTIONS="SDCARD"
CONFIG_BOOTDELAY=10
CONFIG_HUSH_PARSER=y
# CONFIG_CMD_IMLS is not set
diff --git a/configs/arcangel4_defconfig b/configs/nsim_700_defconfig
index efa55d0..202f77c 100644
--- a/configs/arcangel4_defconfig
+++ b/configs/nsim_700_defconfig
@@ -1,11 +1,11 @@
CONFIG_ARC=y
-CONFIG_TARGET_ARCANGEL4=y
-CONFIG_DM_SERIAL=y
+CONFIG_TARGET_NSIM=y
CONFIG_SYS_CLK_FREQ=70000000
+CONFIG_DM_SERIAL=y
CONFIG_SYS_TEXT_BASE=0x81000000
-CONFIG_DEFAULT_DEVICE_TREE="arcangel4"
+CONFIG_DEFAULT_DEVICE_TREE="nsim"
CONFIG_BOOTDELAY=3
-CONFIG_SYS_PROMPT="arcangel4# "
+CONFIG_SYS_PROMPT="nsim# "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/arcangel4-be_defconfig b/configs/nsim_700be_defconfig
index c0c2e4b..b7f7924 100644
--- a/configs/arcangel4-be_defconfig
+++ b/configs/nsim_700be_defconfig
@@ -1,11 +1,12 @@
CONFIG_ARC=y
CONFIG_CPU_BIG_ENDIAN=y
-CONFIG_TARGET_ARCANGEL4=y
-CONFIG_DM_SERIAL=y
+CONFIG_TARGET_NSIM=y
CONFIG_SYS_CLK_FREQ=70000000
+CONFIG_DM_SERIAL=y
CONFIG_SYS_TEXT_BASE=0x81000000
-CONFIG_DEFAULT_DEVICE_TREE="arcangel4"
+CONFIG_DEFAULT_DEVICE_TREE="nsim"
CONFIG_BOOTDELAY=3
+CONFIG_SYS_PROMPT="nsim# "
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_FLASH is not set
# CONFIG_CMD_SETEXPR is not set
diff --git a/configs/nsim_hs38_defconfig b/configs/nsim_hs38_defconfig
new file mode 100644
index 0000000..6b448ef
--- /dev/null
+++ b/configs/nsim_hs38_defconfig
@@ -0,0 +1,16 @@
+CONFIG_ARC=y
+CONFIG_ISA_ARCV2=y
+CONFIG_TARGET_NSIM=y
+CONFIG_SYS_CLK_FREQ=70000000
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_TEXT_BASE=0x81000000
+CONFIG_DEFAULT_DEVICE_TREE="nsim"
+CONFIG_BOOTDELAY=3
+CONFIG_SYS_PROMPT="nsim# "
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_DM=y
+CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/nsim_hs38be_defconfig b/configs/nsim_hs38be_defconfig
new file mode 100644
index 0000000..3e1c599
--- /dev/null
+++ b/configs/nsim_hs38be_defconfig
@@ -0,0 +1,17 @@
+CONFIG_ARC=y
+CONFIG_ISA_ARCV2=y
+CONFIG_CPU_BIG_ENDIAN=y
+CONFIG_TARGET_NSIM=y
+CONFIG_SYS_CLK_FREQ=70000000
+CONFIG_DM_SERIAL=y
+CONFIG_SYS_TEXT_BASE=0x81000000
+CONFIG_DEFAULT_DEVICE_TREE="nsim"
+CONFIG_BOOTDELAY=3
+CONFIG_SYS_PROMPT="nsim# "
+# CONFIG_CMD_IMLS is not set
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_SETEXPR is not set
+CONFIG_OF_CONTROL=y
+CONFIG_OF_EMBED=y
+CONFIG_DM=y
+CONFIG_USE_PRIVATE_LIBGCC=y
diff --git a/configs/omap3_evm_quick_mmc_defconfig b/configs/omap3_evm_quick_mmc_defconfig
deleted file mode 100644
index ebdc105..0000000
--- a/configs/omap3_evm_quick_mmc_defconfig
+++ /dev/null
@@ -1,30 +0,0 @@
-CONFIG_ARM=y
-CONFIG_OMAP34XX=y
-CONFIG_TARGET_OMAP3_EVM_QUICK_MMC=y
-CONFIG_SPL=y
-CONFIG_BOOTDELAY=-2
-CONFIG_SYS_PROMPT="OMAP3_EVM # "
-# CONFIG_CMD_BDI is not set
-# CONFIG_CMD_CONSOLE is not set
-# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_RUN is not set
-# CONFIG_CMD_IMI is not set
-# CONFIG_CMD_IMLS is not set
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_SAVEENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-# CONFIG_CMD_MEMORY is not set
-# CONFIG_CMD_LOADB is not set
-# CONFIG_CMD_LOADS is not set
-# CONFIG_CMD_FLASH is not set
-CONFIG_CMD_MMC=y
-# CONFIG_CMD_FPGA is not set
-# CONFIG_CMD_ECHO is not set
-# CONFIG_CMD_ITEST is not set
-# CONFIG_CMD_SOURCE is not set
-# CONFIG_CMD_SETEXPR is not set
-# CONFIG_CMD_NFS is not set
-# CONFIG_CMD_MISC is not set
-CONFIG_CMD_FAT=y
-CONFIG_SYS_NS16550=y
diff --git a/configs/omap3_evm_quick_nand_defconfig b/configs/omap3_evm_quick_nand_defconfig
deleted file mode 100644
index 52b08b8..0000000
--- a/configs/omap3_evm_quick_nand_defconfig
+++ /dev/null
@@ -1,28 +0,0 @@
-CONFIG_ARM=y
-CONFIG_OMAP34XX=y
-CONFIG_TARGET_OMAP3_EVM_QUICK_NAND=y
-CONFIG_SPL=y
-CONFIG_BOOTDELAY=-2
-CONFIG_SYS_PROMPT="OMAP3_EVM # "
-# CONFIG_CMD_BDI is not set
-# CONFIG_CMD_CONSOLE is not set
-# CONFIG_CMD_BOOTD is not set
-# CONFIG_CMD_RUN is not set
-# CONFIG_CMD_IMI is not set
-# CONFIG_CMD_IMLS is not set
-# CONFIG_CMD_XIMG is not set
-# CONFIG_CMD_EDITENV is not set
-# CONFIG_CMD_SAVEENV is not set
-# CONFIG_CMD_ENV_EXISTS is not set
-# CONFIG_CMD_MEMORY is not set
-# CONFIG_CMD_LOADB is not set
-# CONFIG_CMD_LOADS is not set
-# CONFIG_CMD_FLASH is not set
-# CONFIG_CMD_FPGA is not set
-# CONFIG_CMD_ECHO is not set
-# CONFIG_CMD_ITEST is not set
-# CONFIG_CMD_SOURCE is not set
-# CONFIG_CMD_SETEXPR is not set
-# CONFIG_CMD_NFS is not set
-# CONFIG_CMD_MISC is not set
-CONFIG_SYS_NS16550=y
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 01f71be..8d67c09 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -655,6 +655,10 @@ int gpt_verify_partitions(struct blk_desc *dev_desc,
(unsigned long long)partitions[i].size);
if (le64_to_cpu(gpt_part_size) != partitions[i].size) {
+ /* We do not check the extend partition size */
+ if ((i == parts - 1) && (partitions[i].size == 0))
+ continue;
+
error("Partition %s size: %llu does not match %llu!\n",
efi_str, (unsigned long long)gpt_part_size,
(unsigned long long)partitions[i].size);
diff --git a/drivers/mmc/arm_pl180_mmci.c b/drivers/mmc/arm_pl180_mmci.c
index 8f2694f..e64ac3c 100644
--- a/drivers/mmc/arm_pl180_mmci.c
+++ b/drivers/mmc/arm_pl180_mmci.c
@@ -37,7 +37,7 @@ static int wait_for_command_end(struct mmc *dev, struct mmc_cmd *cmd)
writel(statusmask, &host->base->status_clear);
if (hoststatus & SDI_STA_CTIMEOUT) {
debug("CMD%d time out\n", cmd->cmdidx);
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if ((hoststatus & SDI_STA_CCRCFAIL) &&
(cmd->resp_type & MMC_RSP_CRC)) {
printf("CMD%d CRC error\n", cmd->cmdidx);
diff --git a/drivers/mmc/bfin_sdh.c b/drivers/mmc/bfin_sdh.c
index 9bdfbbc..0e493da 100644
--- a/drivers/mmc/bfin_sdh.c
+++ b/drivers/mmc/bfin_sdh.c
@@ -109,9 +109,9 @@ sdh_send_cmd(struct mmc *mmc, struct mmc_cmd *mmc_cmd)
}
if (status & CMD_TIME_OUT)
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
else if (status & CMD_CRC_FAIL && flags & MMC_RSP_CRC)
- ret = COMM_ERR;
+ ret = -ECOMM;
else
ret = 0;
@@ -136,7 +136,7 @@ static int sdh_setup_data(struct mmc *mmc, struct mmc_data *data)
/* Don't support write yet. */
if (data->flags & MMC_DATA_WRITE)
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
#ifndef RSI_BLKSZ
data_ctl |= ((ffs(data->blocksize) - 1) << 4);
#else
@@ -194,10 +194,10 @@ static int bfin_sdh_request(struct mmc *mmc, struct mmc_cmd *cmd,
if (status & DAT_TIME_OUT) {
bfin_write_SDH_STATUS_CLR(DAT_TIMEOUT_STAT);
- ret |= TIMEOUT;
+ ret = -ETIMEDOUT;
} else if (status & (DAT_CRC_FAIL | RX_OVERRUN)) {
bfin_write_SDH_STATUS_CLR(DAT_CRC_FAIL_STAT | RX_OVERRUN_STAT);
- ret |= COMM_ERR;
+ ret = -ECOMM;
} else
bfin_write_SDH_STATUS_CLR(DAT_BLK_END_STAT | DAT_END_STAT);
diff --git a/drivers/mmc/davinci_mmc.c b/drivers/mmc/davinci_mmc.c
index aae00e9..b495c75 100644
--- a/drivers/mmc/davinci_mmc.c
+++ b/drivers/mmc/davinci_mmc.c
@@ -9,6 +9,7 @@
#include <config.h>
#include <common.h>
#include <command.h>
+#include <errno.h>
#include <mmc.h>
#include <part.h>
#include <malloc.h>
@@ -66,7 +67,7 @@ dmmc_wait_fifo_status(volatile struct davinci_mmc_regs *regs, uint status)
udelay(100);
if (wdog == 0)
- return COMM_ERR;
+ return -ECOMM;
return 0;
}
@@ -80,7 +81,7 @@ static int dmmc_busy_wait(volatile struct davinci_mmc_regs *regs)
udelay(10);
if (wdog == 0)
- return COMM_ERR;
+ return -ECOMM;
return 0;
}
@@ -99,7 +100,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
return 0;
} else if (mmcstatus & st_error) {
if (mmcstatus & MMCST0_TOUTRS)
- return TIMEOUT;
+ return -ETIMEDOUT;
printf("[ ST0 ERROR %x]\n", mmcstatus);
/*
* Ignore CRC errors as some MMC cards fail to
@@ -107,7 +108,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
*/
if (mmcstatus & MMCST0_CRCRS)
return 0;
- return COMM_ERR;
+ return -ECOMM;
}
udelay(10);
@@ -116,7 +117,7 @@ static int dmmc_check_status(volatile struct davinci_mmc_regs *regs,
printf("Status %x Timeout ST0:%x ST1:%x\n", st_ready, mmcstatus,
get_val(&regs->mmcst1));
- return COMM_ERR;
+ return -ECOMM;
}
/*
diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index b58c282..afc674d 100644
--- a/drivers/mmc/dw_mmc.c
+++ b/drivers/mmc/dw_mmc.c
@@ -13,7 +13,6 @@
#include <memalign.h>
#include <mmc.h>
#include <dwmmc.h>
-#include <asm-generic/errno.h>
#define PAGE_SIZE 4096
@@ -120,12 +119,14 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
}
if (host->fifo_mode && size) {
+ len = 0;
if (data->flags == MMC_DATA_READ) {
if ((dwmci_readl(host, DWMCI_RINTSTS) &
DWMCI_INTMSK_RXDR)) {
len = dwmci_readl(host, DWMCI_STATUS);
len = (len >> DWMCI_FIFO_SHIFT) &
DWMCI_FIFO_MASK;
+ len = min(size, len);
for (i = 0; i < len; i++)
*buf++ =
dwmci_readl(host, DWMCI_DATA);
@@ -139,6 +140,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
len = fifo_depth - ((len >>
DWMCI_FIFO_SHIFT) &
DWMCI_FIFO_MASK);
+ len = min(size, len);
for (i = 0; i < len; i++)
dwmci_writel(host, DWMCI_DATA,
*buf++);
@@ -159,7 +161,7 @@ static int dwmci_data_transfer(struct dwmci_host *host, struct mmc_data *data)
if (get_timer(start) > timeout) {
debug("%s: Timeout waiting for data!\n",
__func__);
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
break;
}
}
@@ -204,7 +206,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
while (dwmci_readl(host, DWMCI_STATUS) & DWMCI_BUSY) {
if (get_timer(start) > timeout) {
debug("%s: Timeout on data busy\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
@@ -270,7 +272,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (i == retry) {
debug("%s: Timeout.\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
if (mask & DWMCI_INTMSK_RTO) {
@@ -283,7 +285,7 @@ static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
* CMD8, please keep that in mind.
*/
debug("%s: Response Timeout.\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if (mask & DWMCI_INTMSK_RE) {
debug("%s: Response Error.\n", __func__);
return -EIO;
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index 283befc..57271f1 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -10,12 +10,12 @@
#include <fdtdec.h>
#include <libfdt.h>
#include <malloc.h>
+#include <errno.h>
#include <asm/arch/dwmmc.h>
#include <asm/arch/clk.h>
#include <asm/arch/pinmux.h>
#include <asm/arch/power.h>
#include <asm/gpio.h>
-#include <asm-generic/errno.h>
#define DWMMC_MAX_CH_NUM 4
#define DWMMC_MAX_FREQ 52000000
diff --git a/drivers/mmc/fsl_esdhc.c b/drivers/mmc/fsl_esdhc.c
index a865c7b..103b32e 100644
--- a/drivers/mmc/fsl_esdhc.c
+++ b/drivers/mmc/fsl_esdhc.c
@@ -12,11 +12,11 @@
#include <config.h>
#include <common.h>
#include <command.h>
+#include <errno.h>
#include <hwconfig.h>
#include <mmc.h>
#include <part.h>
#include <malloc.h>
-#include <mmc.h>
#include <fsl_esdhc.h>
#include <fdt_support.h>
#include <asm/io.h>
@@ -253,7 +253,7 @@ static int esdhc_setup_data(struct mmc *mmc, struct mmc_data *data)
if ((esdhc_read32(&regs->prsstat) &
PRSSTAT_WPSPL) == 0) {
printf("\nThe SD card is locked. Can not write to a locked card.\n\n");
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
@@ -411,12 +411,12 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
irqstat = esdhc_read32(&regs->irqstat);
if (irqstat & CMD_ERR) {
- err = COMM_ERR;
+ err = -ECOMM;
goto out;
}
if (irqstat & IRQSTAT_CTOE) {
- err = TIMEOUT;
+ err = -ETIMEDOUT;
goto out;
}
@@ -442,7 +442,7 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (timeout <= 0) {
printf("Timeout waiting for DAT0 to go high!\n");
- err = TIMEOUT;
+ err = -ETIMEDOUT;
goto out;
}
}
@@ -471,12 +471,12 @@ esdhc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
irqstat = esdhc_read32(&regs->irqstat);
if (irqstat & IRQSTAT_DTOE) {
- err = TIMEOUT;
+ err = -ETIMEDOUT;
goto out;
}
if (irqstat & DATA_ERR) {
- err = COMM_ERR;
+ err = -ECOMM;
goto out;
}
} while ((irqstat & DATA_COMPLETE) != DATA_COMPLETE);
diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c
index a620678..c02740f 100644
--- a/drivers/mmc/ftsdc010_mci.c
+++ b/drivers/mmc/ftsdc010_mci.c
@@ -34,7 +34,7 @@ static inline int ftsdc010_send_cmd(struct mmc *mmc, struct mmc_cmd *mmc_cmd)
{
struct ftsdc010_chip *chip = mmc->priv;
struct ftsdc010_mmc __iomem *regs = chip->regs;
- int ret = TIMEOUT;
+ int ret = -ETIMEDOUT;
uint32_t ts, st;
uint32_t cmd = FTSDC010_CMD_IDX(mmc_cmd->cmdidx);
uint32_t arg = mmc_cmd->cmdarg;
@@ -126,7 +126,7 @@ static void ftsdc010_clkset(struct mmc *mmc, uint32_t rate)
static int ftsdc010_wait(struct ftsdc010_mmc __iomem *regs, uint32_t mask)
{
- int ret = TIMEOUT;
+ int ret = -ETIMEDOUT;
uint32_t st, ts;
for (ts = get_timer(0); get_timer(ts) < CFG_CMD_TIMEOUT; ) {
@@ -151,7 +151,7 @@ static int ftsdc010_wait(struct ftsdc010_mmc __iomem *regs, uint32_t mask)
static int ftsdc010_request(struct mmc *mmc, struct mmc_cmd *cmd,
struct mmc_data *data)
{
- int ret = UNUSABLE_ERR;
+ int ret = -EOPNOTSUPP;
uint32_t len = 0;
struct ftsdc010_chip *chip = mmc->priv;
struct ftsdc010_mmc __iomem *regs = chip->regs;
@@ -279,7 +279,7 @@ static int ftsdc010_init(struct mmc *mmc)
uint32_t ts;
if (readl(&regs->status) & FTSDC010_STATUS_CARD_DETECT)
- return NO_CARD_ERR;
+ return -ENOMEDIUM;
if (readl(&regs->status) & FTSDC010_STATUS_WRITE_PROT) {
printf("ftsdc010: write protected\n");
@@ -297,7 +297,7 @@ static int ftsdc010_init(struct mmc *mmc)
}
if (readl(&regs->cmd) & FTSDC010_CMD_SDC_RST) {
printf("ftsdc010: reset failed\n");
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
}
/* 2. enter low speed mode (400k card detection) */
diff --git a/drivers/mmc/gen_atmel_mci.c b/drivers/mmc/gen_atmel_mci.c
index 0474a15..69770df 100644
--- a/drivers/mmc/gen_atmel_mci.c
+++ b/drivers/mmc/gen_atmel_mci.c
@@ -213,7 +213,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (!priv->initialized) {
puts ("MCI not initialized!\n");
- return COMM_ERR;
+ return -ECOMM;
}
/* Figure out the transfer arguments */
@@ -238,10 +238,10 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if ((status & error_flags) & MMCI_BIT(RTOE)) {
dump_cmd(cmdr, cmd->cmdarg, status, "Command Time Out");
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if (status & error_flags) {
dump_cmd(cmdr, cmd->cmdarg, status, "Command Failed");
- return COMM_ERR;
+ return -ECOMM;
}
/* Copy the response to the response buffer */
@@ -303,7 +303,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (status) {
dump_cmd(cmdr, cmd->cmdarg, status,
"Data Transfer Failed");
- return COMM_ERR;
+ return -ECOMM;
}
}
@@ -315,7 +315,7 @@ mci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (status & error_flags) {
dump_cmd(cmdr, cmd->cmdarg, status,
"DTIP Wait Failed");
- return COMM_ERR;
+ return -ECOMM;
}
i++;
} while ((status & MMCI_BIT(DTIP)) && i < 10000);
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index f262c6e..425abb1 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -169,7 +169,7 @@ void print_mmc_devices(char separator)
for (uclass_first_device(UCLASS_MMC, &dev);
dev;
- uclass_next_device(&dev)) {
+ uclass_next_device(&dev), first = false) {
struct mmc *m = mmc_get_mmc_dev(dev);
if (!first) {
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index f8e5f7a..3daa748 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -152,7 +152,7 @@ int mmc_send_status(struct mmc *mmc, int timeout)
printf("Status Error: 0x%08X\n",
cmd.response[0]);
#endif
- return COMM_ERR;
+ return -ECOMM;
}
} else if (--retries < 0)
return err;
@@ -168,7 +168,7 @@ int mmc_send_status(struct mmc *mmc, int timeout)
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
printf("Timeout waiting card ready\n");
#endif
- return TIMEOUT;
+ return -ETIMEDOUT;
}
return 0;
@@ -344,7 +344,7 @@ static int sd_send_op_cond(struct mmc *mmc)
break;
if (timeout-- <= 0)
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
udelay(1000);
}
@@ -430,7 +430,7 @@ static int mmc_complete_op_cond(struct mmc *mmc)
if (mmc->ocr & OCR_BUSY)
break;
if (get_timer(start) > timeout)
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
udelay(100);
}
}
@@ -1429,7 +1429,7 @@ static int mmc_startup(struct mmc *mmc)
&test_csd[EXT_CSD_SEC_CNT], 4) == 0)
break;
else
- err = SWITCH_ERR;
+ err = -EBADMSG;
}
if (err)
@@ -1499,7 +1499,7 @@ static int mmc_send_if_cond(struct mmc *mmc)
return err;
if ((cmd.response[0] & 0xff) != 0xaa)
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
else
mmc->version = SD_VERSION_2;
@@ -1526,7 +1526,7 @@ int mmc_start_init(struct mmc *mmc)
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
printf("MMC: no card present\n");
#endif
- return NO_CARD_ERR;
+ return -ENOMEDIUM;
}
if (mmc->has_init)
@@ -1565,14 +1565,14 @@ int mmc_start_init(struct mmc *mmc)
err = sd_send_op_cond(mmc);
/* If the command timed out, we check for an MMC card */
- if (err == TIMEOUT) {
+ if (err == -ETIMEDOUT) {
err = mmc_send_op_cond(mmc);
if (err) {
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
printf("Card did not respond to voltage select!\n");
#endif
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
}
}
diff --git a/drivers/mmc/mmc_spi.c b/drivers/mmc/mmc_spi.c
index 7547e1a..2510117 100644
--- a/drivers/mmc/mmc_spi.c
+++ b/drivers/mmc/mmc_spi.c
@@ -5,6 +5,7 @@
* Licensed under the GPL-2 or later.
*/
#include <common.h>
+#include <errno.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
@@ -182,13 +183,13 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd,
spi_cs_activate(spi);
r1 = mmc_spi_sendcmd(mmc, cmd->cmdidx, cmd->cmdarg);
if (r1 == 0xff) { /* no response */
- ret = NO_CARD_ERR;
+ ret = -ENOMEDIUM;
goto done;
} else if (r1 & R1_SPI_COM_CRC) {
- ret = COMM_ERR;
+ ret = -ECOMM;
goto done;
} else if (r1 & ~R1_SPI_IDLE) { /* other errors */
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
goto done;
} else if (cmd->resp_type == MMC_RSP_R2) {
r1 = mmc_spi_readdata(mmc, cmd->response, 1, 16);
@@ -225,9 +226,9 @@ static int mmc_spi_request(struct mmc *mmc, struct mmc_cmd *cmd,
data->blocks, data->blocksize,
(cmd->cmdidx == MMC_CMD_WRITE_MULTIPLE_BLOCK));
if (r1 & R1_SPI_COM_CRC)
- ret = COMM_ERR;
+ ret = -ECOMM;
else if (r1) /* other errors */
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
}
done:
spi_cs_deactivate(spi);
diff --git a/drivers/mmc/msm_sdhci.c b/drivers/mmc/msm_sdhci.c
index 70a8d96..a8cb9e2 100644
--- a/drivers/mmc/msm_sdhci.c
+++ b/drivers/mmc/msm_sdhci.c
@@ -143,9 +143,7 @@ static int msm_sdc_probe(struct udevice *dev)
/* Set host controller version */
host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
- caps = sdhci_readl(host, SDHCI_CAPABILITIES);
- ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width,
- caps, 0, 0, host->version, host->quirks, 0);
+ ret = sdhci_setup_cfg(&plat->cfg, host, 0, 0);
host->mmc = &plat->mmc;
if (ret)
return ret;
diff --git a/drivers/mmc/mvebu_mmc.c b/drivers/mmc/mvebu_mmc.c
index 056aef5..a2792ac 100644
--- a/drivers/mmc/mvebu_mmc.c
+++ b/drivers/mmc/mvebu_mmc.c
@@ -9,6 +9,7 @@
*/
#include <common.h>
+#include <errno.h>
#include <malloc.h>
#include <part.h>
#include <mmc.h>
@@ -172,15 +173,15 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
(SDIO_ERR_CMD_TIMEOUT | SDIO_ERR_DATA_TIMEOUT)) {
debug("%s: command READ timed out\n",
DRIVER_NAME);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
debug("%s: command READ error\n", DRIVER_NAME);
- return COMM_ERR;
+ return -ECOMM;
}
if ((get_timer(0) - start) > TIMEOUT_DELAY) {
debug("%s: command timed out\n", DRIVER_NAME);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
@@ -232,7 +233,7 @@ static int mvebu_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (mvebu_mmc_read(SDIO_ERR_INTR_STATUS) &
(SDIO_ERR_CMD_TIMEOUT | SDIO_ERR_DATA_TIMEOUT))
- return TIMEOUT;
+ return -ETIMEDOUT;
return 0;
}
diff --git a/drivers/mmc/mxcmmc.c b/drivers/mmc/mxcmmc.c
index 561b204..8038f90 100644
--- a/drivers/mmc/mxcmmc.c
+++ b/drivers/mmc/mxcmmc.c
@@ -211,11 +211,11 @@ static int mxcmci_finish_data(struct mxcmci_host *host, unsigned int stat)
} else if (stat & STATUS_CRC_WRITE_ERR) {
u32 err_code = (stat >> 9) & 0x3;
if (err_code == 2) /* No CRC response */
- data_error = TIMEOUT;
+ data_error = -ETIMEDOUT;
else
data_error = -EILSEQ;
} else if (stat & STATUS_TIME_OUT_READ) {
- data_error = TIMEOUT;
+ data_error = -ETIMEDOUT;
} else {
data_error = -EIO;
}
@@ -238,7 +238,7 @@ static int mxcmci_read_response(struct mxcmci_host *host, unsigned int stat)
if (stat & STATUS_TIME_OUT_RESP) {
printf("CMD TIMEOUT\n");
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if (stat & STATUS_RESP_CRC_ERR && cmd->resp_type & MMC_RSP_CRC) {
printf("cmd crc error\n");
return -EILSEQ;
diff --git a/drivers/mmc/mxsmmc.c b/drivers/mmc/mxsmmc.c
index 9fa87d5..40f3eaa 100644
--- a/drivers/mmc/mxsmmc.c
+++ b/drivers/mmc/mxsmmc.c
@@ -84,7 +84,7 @@ static int mxsmmc_send_cmd_pio(struct mxsmmc_priv *priv, struct mmc_data *data)
}
}
- return timeout ? 0 : COMM_ERR;
+ return timeout ? 0 : -ECOMM;
}
static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
@@ -120,7 +120,7 @@ static int mxsmmc_send_cmd_dma(struct mxsmmc_priv *priv, struct mmc_data *data)
mxs_dma_desc_append(dmach, priv->desc);
if (mxs_dma_go(dmach)) {
bounce_buffer_stop(&bbstate);
- return COMM_ERR;
+ return -ECOMM;
}
bounce_buffer_stop(&bbstate);
@@ -158,13 +158,13 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (!timeout) {
printf("MMC%d: Bus busy timeout!\n", mmc->block_dev.devnum);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
/* See if card is present */
if (!mxsmmc_cd(priv)) {
printf("MMC%d: No card detected!\n", mmc->block_dev.devnum);
- return NO_CARD_ERR;
+ return -ENOMEDIUM;
}
/* Start building CTRL0 contents */
@@ -203,7 +203,7 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
priv->mmc_is_wp(mmc->block_dev.devnum)) {
printf("MMC%d: Can not write a locked card!\n",
mmc->block_dev.devnum);
- return UNUSABLE_ERR;
+ return -EOPNOTSUPP;
}
ctrl0 |= SSP_CTRL0_DATA_XFER;
@@ -244,21 +244,21 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (!timeout) {
printf("MMC%d: Command %d busy\n",
mmc->block_dev.devnum, cmd->cmdidx);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
/* Check command timeout */
if (reg & SSP_STATUS_RESP_TIMEOUT) {
printf("MMC%d: Command %d timeout (status 0x%08x)\n",
mmc->block_dev.devnum, cmd->cmdidx, reg);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
/* Check command errors */
if (reg & (SSP_STATUS_RESP_CRC_ERR | SSP_STATUS_RESP_ERR)) {
printf("MMC%d: Command %d error (status 0x%08x)!\n",
mmc->block_dev.devnum, cmd->cmdidx, reg);
- return COMM_ERR;
+ return -ECOMM;
}
/* Copy response to response buffer */
@@ -298,7 +298,7 @@ mxsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
SSP_STATUS_FIFO_OVRFLW | SSP_STATUS_FIFO_UNDRFLW)) {
printf("MMC%d: Data error with command %d (status 0x%08x)!\n",
mmc->block_dev.devnum, cmd->cmdidx, reg);
- return COMM_ERR;
+ return -ECOMM;
}
return 0;
diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c
index d007b56..e80ac3d 100644
--- a/drivers/mmc/omap_hsmmc.c
+++ b/drivers/mmc/omap_hsmmc.c
@@ -231,7 +231,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc)
while ((readl(&mmc_base->sysstatus) & RESETDONE) == 0) {
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting for cc2!\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
writel(readl(&mmc_base->sysctl) | SOFTRESETALL, &mmc_base->sysctl);
@@ -240,7 +240,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc)
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting for softresetall!\n",
__func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
writel(DTW_1_BITMODE | SDBP_PWROFF | SDVS_3V0, &mmc_base->hctl);
@@ -262,7 +262,7 @@ static int omap_hsmmc_init_setup(struct mmc *mmc)
while ((readl(&mmc_base->sysctl) & ICS_MASK) == ICS_NOTREADY) {
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting for ics!\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
writel(readl(&mmc_base->sysctl) | CEN_ENABLE, &mmc_base->sysctl);
@@ -337,7 +337,7 @@ static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting on cmd inhibit to clear\n",
__func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
writel(0xFFFFFFFF, &mmc_base->stat);
@@ -346,7 +346,7 @@ static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting for STAT (%x) to clear\n",
__func__, readl(&mmc_base->stat));
- return TIMEOUT;
+ return -ETIMEDOUT;
}
}
/*
@@ -410,13 +410,13 @@ static int omap_hsmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
mmc_stat = readl(&mmc_base->stat);
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s : timeout: No status update\n", __func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
} while (!mmc_stat);
if ((mmc_stat & IE_CTO) != 0) {
mmc_reset_controller_fsm(mmc_base, SYSCTL_SRC);
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if ((mmc_stat & ERRI_MASK) != 0)
return -1;
@@ -464,7 +464,7 @@ static int mmc_read_data(struct hsmmc *mmc_base, char *buf, unsigned int size)
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting for status!\n",
__func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
} while (mmc_stat == 0);
@@ -519,7 +519,7 @@ static int mmc_write_data(struct hsmmc *mmc_base, const char *buf,
if (get_timer(0) - start > MAX_RETRY_MS) {
printf("%s: timedout waiting for status!\n",
__func__);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
} while (mmc_stat == 0);
diff --git a/drivers/mmc/rockchip_sdhci.c b/drivers/mmc/rockchip_sdhci.c
index 023c29b..624029b 100644
--- a/drivers/mmc/rockchip_sdhci.c
+++ b/drivers/mmc/rockchip_sdhci.c
@@ -33,15 +33,11 @@ static int arasan_sdhci_probe(struct udevice *dev)
struct rockchip_sdhc *prv = dev_get_priv(dev);
struct sdhci_host *host = &prv->host;
int ret;
- u32 caps;
- host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD;
- caps = sdhci_readl(host, SDHCI_CAPABILITIES);
- ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width,
- caps, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ, EMMC_MIN_FREQ,
- host->version, host->quirks, 0);
+ ret = sdhci_setup_cfg(&plat->cfg, host, CONFIG_ROCKCHIP_SDHCI_MAX_FREQ,
+ EMMC_MIN_FREQ);
host->mmc = &plat->mmc;
if (ret)
diff --git a/drivers/mmc/s3c_sdi.c b/drivers/mmc/s3c_sdi.c
index 02d1138..1b8358a 100644
--- a/drivers/mmc/s3c_sdi.c
+++ b/drivers/mmc/s3c_sdi.c
@@ -133,7 +133,7 @@ s3cmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (!timeout) {
puts("S3C SDI: Command timed out!\n");
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
goto error;
}
@@ -196,7 +196,7 @@ s3cmmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd, struct mmc_data *data)
if (!timeout) {
puts("S3C SDI: Command timed out!\n");
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
goto error;
}
diff --git a/drivers/mmc/s5p_sdhci.c b/drivers/mmc/s5p_sdhci.c
index 44353c7..3bace21 100644
--- a/drivers/mmc/s5p_sdhci.c
+++ b/drivers/mmc/s5p_sdhci.c
@@ -68,7 +68,7 @@ static int s5p_sdhci_core_init(struct sdhci_host *host)
host->name = S5P_NAME;
host->quirks = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_BROKEN_VOLTAGE |
- SDHCI_QUIRK_BROKEN_R1B | SDHCI_QUIRK_32BIT_DMA_ADDR |
+ SDHCI_QUIRK_32BIT_DMA_ADDR |
SDHCI_QUIRK_WAIT_SEND_CMD | SDHCI_QUIRK_USE_WIDE8;
host->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index 9fdbed8..7ddb549 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -170,7 +170,7 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
cmd_timeout);
} else {
puts("timeout.\n");
- return COMM_ERR;
+ return -ECOMM;
}
}
time++;
@@ -184,7 +184,8 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
flags = SDHCI_CMD_RESP_LONG;
else if (cmd->resp_type & MMC_RSP_BUSY) {
flags = SDHCI_CMD_RESP_SHORT_BUSY;
- mask |= SDHCI_INT_DATA_END;
+ if (data)
+ mask |= SDHCI_INT_DATA_END;
} else
flags = SDHCI_CMD_RESP_SHORT;
@@ -252,17 +253,17 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
stat = sdhci_readl(host, SDHCI_INT_STATUS);
if (stat & SDHCI_INT_ERROR)
break;
- } while (((stat & mask) != mask) &&
- (get_timer(start) < SDHCI_READ_STATUS_TIMEOUT));
- if (get_timer(start) >= SDHCI_READ_STATUS_TIMEOUT) {
- if (host->quirks & SDHCI_QUIRK_BROKEN_R1B)
- return 0;
- else {
- printf("%s: Timeout for status update!\n", __func__);
- return TIMEOUT;
+ if (get_timer(start) >= SDHCI_READ_STATUS_TIMEOUT) {
+ if (host->quirks & SDHCI_QUIRK_BROKEN_R1B) {
+ return 0;
+ } else {
+ printf("%s: Timeout for status update!\n",
+ __func__);
+ return -ETIMEDOUT;
+ }
}
- }
+ } while ((stat & mask) != mask);
if ((stat & (SDHCI_INT_ERROR | mask)) == mask) {
sdhci_cmd_done(host, cmd);
@@ -288,9 +289,9 @@ static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
sdhci_reset(host, SDHCI_RESET_CMD);
sdhci_reset(host, SDHCI_RESET_DATA);
if (stat & SDHCI_INT_TIMEOUT)
- return TIMEOUT;
+ return -ETIMEDOUT;
else
- return COMM_ERR;
+ return -ECOMM;
}
static int sdhci_set_clock(struct mmc *mmc, unsigned int clock)
@@ -510,18 +511,22 @@ static const struct mmc_ops sdhci_ops = {
};
#endif
-int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth,
- uint caps, u32 max_clk, u32 min_clk, uint version,
- uint quirks, uint host_caps)
+int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
+ u32 max_clk, u32 min_clk)
{
- cfg->name = name;
+ u32 caps;
+
+ caps = sdhci_readl(host, SDHCI_CAPABILITIES);
+ host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
+
+ cfg->name = host->name;
#ifndef CONFIG_DM_MMC_OPS
cfg->ops = &sdhci_ops;
#endif
if (max_clk)
cfg->f_max = max_clk;
else {
- if (version >= SDHCI_SPEC_300)
+ if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300)
cfg->f_max = (caps & SDHCI_CLOCK_V3_BASE_MASK) >>
SDHCI_CLOCK_BASE_SHIFT;
else
@@ -534,7 +539,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth,
if (min_clk)
cfg->f_min = min_clk;
else {
- if (version >= SDHCI_SPEC_300)
+ if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300)
cfg->f_min = cfg->f_max / SDHCI_MAX_DIV_SPEC_300;
else
cfg->f_min = cfg->f_max / SDHCI_MAX_DIV_SPEC_200;
@@ -548,16 +553,13 @@ int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth,
cfg->voltages |= MMC_VDD_165_195;
cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
- if (version >= SDHCI_SPEC_300) {
+ if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
if (caps & SDHCI_CAN_DO_8BIT)
cfg->host_caps |= MMC_MODE_8BIT;
}
- if (quirks & SDHCI_QUIRK_NO_HISPD_BIT)
- cfg->host_caps &= ~(MMC_MODE_HS | MMC_MODE_HS_52MHz);
-
- if (host_caps)
- cfg->host_caps |= host_caps;
+ if (host->host_caps)
+ cfg->host_caps |= host->host_caps;
cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
@@ -573,10 +575,10 @@ int sdhci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg)
#else
int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
{
+#ifdef CONFIG_MMC_SDMA
unsigned int caps;
caps = sdhci_readl(host, SDHCI_CAPABILITIES);
-#ifdef CONFIG_MMC_SDMA
if (!(caps & SDHCI_CAN_DO_SDMA)) {
printf("%s: Your controller doesn't support SDMA!!\n",
__func__);
@@ -584,9 +586,7 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
}
#endif
- if (sdhci_setup_cfg(&host->cfg, host->name, host->bus_width, caps,
- max_clk, min_clk, SDHCI_GET_VERSION(host),
- host->quirks, host->host_caps)) {
+ if (sdhci_setup_cfg(&host->cfg, host, max_clk, min_clk)) {
printf("%s: Hardware doesn't specify base clock frequency\n",
__func__);
return -EINVAL;
diff --git a/drivers/mmc/sh_mmcif.c b/drivers/mmc/sh_mmcif.c
index 001bf18..bc4b344 100644
--- a/drivers/mmc/sh_mmcif.c
+++ b/drivers/mmc/sh_mmcif.c
@@ -168,7 +168,7 @@ static int sh_mmcif_error_manage(struct sh_mmcif_host *host)
if (state2 & STS2_CRC_ERR)
ret = -EILSEQ;
else if (state2 & STS2_TIMEOUT_ERR)
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
else
ret = -EILSEQ;
return ret;
@@ -483,7 +483,7 @@ static int sh_mmcif_start_cmd(struct sh_mmcif_host *host,
case MMC_CMD_ALL_SEND_CID:
case MMC_CMD_SELECT_CARD:
case MMC_CMD_APP_CMD:
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
break;
default:
printf(DRIVER_NAME": Cmd(d'%d) err\n", cmd->cmdidx);
@@ -520,14 +520,14 @@ static int sh_mmcif_request(struct mmc *mmc, struct mmc_cmd *cmd,
switch (cmd->cmdidx) {
case MMC_CMD_APP_CMD:
- return TIMEOUT;
+ return -ETIMEDOUT;
case MMC_CMD_SEND_EXT_CSD: /* = SD_SEND_IF_COND (8) */
if (data)
/* ext_csd */
break;
else
/* send_if_cond cmd (not support) */
- return TIMEOUT;
+ return -ETIMEDOUT;
default:
break;
}
diff --git a/drivers/mmc/sh_sdhi.c b/drivers/mmc/sh_sdhi.c
index 30e538c..be6aeb1 100644
--- a/drivers/mmc/sh_sdhi.c
+++ b/drivers/mmc/sh_sdhi.c
@@ -232,7 +232,7 @@ static int sh_sdhi_error_manage(struct sh_sdhi_host *host)
e_state2 = sh_sdhi_readw(host, SDHI_ERR_STS2);
if (e_state2 & ERR_STS2_SYS_ERROR) {
if (e_state2 & ERR_STS2_RES_STOP_TIMEOUT)
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
else
ret = -EILSEQ;
debug("%s: ERR_STS2 = %04x\n",
@@ -246,7 +246,7 @@ static int sh_sdhi_error_manage(struct sh_sdhi_host *host)
if (e_state1 & ERR_STS1_CRC_ERROR || e_state1 & ERR_STS1_CMD_ERROR)
ret = -EILSEQ;
else
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
debug("%s: ERR_STS1 = %04x\n",
DRIVER_NAME, sh_sdhi_readw(host, SDHI_ERR_STS1));
@@ -566,7 +566,7 @@ static int sh_sdhi_start_cmd(struct sh_sdhi_host *host,
case MMC_CMD_SELECT_CARD:
case SD_CMD_SEND_IF_COND:
case MMC_CMD_APP_CMD:
- ret = TIMEOUT;
+ ret = -ETIMEDOUT;
break;
default:
debug(DRIVER_NAME": Cmd(d'%d) err\n", opc);
diff --git a/drivers/mmc/sunxi_mmc.c b/drivers/mmc/sunxi_mmc.c
index 5d8abdc..6953acc 100644
--- a/drivers/mmc/sunxi_mmc.c
+++ b/drivers/mmc/sunxi_mmc.c
@@ -304,7 +304,7 @@ static int mmc_rint_wait(struct mmc *mmc, unsigned int timeout_msecs,
(status & SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT)) {
debug("%s timeout %x\n", what,
status & SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
udelay(1000);
} while (!(status & done_bit));
@@ -375,7 +375,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
if (ret) {
error = readl(&mmchost->reg->rint) & \
SUNXI_MMC_RINT_INTERRUPT_ERROR_BIT;
- error = TIMEOUT;
+ error = -ETIMEDOUT;
goto out;
}
}
@@ -402,7 +402,7 @@ static int sunxi_mmc_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
status = readl(&mmchost->reg->status);
if (!timeout_msecs--) {
debug("busy timeout\n");
- error = TIMEOUT;
+ error = -ETIMEDOUT;
goto out;
}
udelay(1000);
diff --git a/drivers/mmc/tegra_mmc.c b/drivers/mmc/tegra_mmc.c
index c9d9432..023ba3c 100644
--- a/drivers/mmc/tegra_mmc.c
+++ b/drivers/mmc/tegra_mmc.c
@@ -9,6 +9,7 @@
#include <bouncebuf.h>
#include <common.h>
+#include <errno.h>
#include <asm/gpio.h>
#include <asm/io.h>
#ifndef CONFIG_TEGRA186
@@ -216,14 +217,14 @@ static int mmc_send_cmd_bounced(struct mmc *mmc, struct mmc_cmd *cmd,
if (i == retry) {
printf("%s: waiting for status update\n", __func__);
writel(mask, &host->reg->norintsts);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
if (mask & TEGRA_MMC_NORINTSTS_CMD_TIMEOUT) {
/* Timeout Error */
debug("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
writel(mask, &host->reg->norintsts);
- return TIMEOUT;
+ return -ETIMEDOUT;
} else if (mask & TEGRA_MMC_NORINTSTS_ERR_INTERRUPT) {
/* Error Interrupt */
debug("error: %08x cmd %d\n", mask, cmd->cmdidx);
@@ -257,7 +258,7 @@ static int mmc_send_cmd_bounced(struct mmc *mmc, struct mmc_cmd *cmd,
if (i == retry) {
printf("%s: card is still busy\n", __func__);
writel(mask, &host->reg->norintsts);
- return TIMEOUT;
+ return -ETIMEDOUT;
}
cmd->response[0] = readl(&host->reg->rspreg0);
diff --git a/drivers/mmc/uniphier-sd.c b/drivers/mmc/uniphier-sd.c
index 02df809..2a48378 100644
--- a/drivers/mmc/uniphier-sd.c
+++ b/drivers/mmc/uniphier-sd.c
@@ -162,7 +162,7 @@ static int uniphier_sd_check_error(struct uniphier_sd_priv *priv)
* display error log since this might be a part of sequence to
* distinguish between SD and MMC.
*/
- return TIMEOUT;
+ return -ETIMEDOUT;
}
if (info2 & UNIPHIER_SD_INFO2_ERR_TO) {
diff --git a/drivers/mmc/zynq_sdhci.c b/drivers/mmc/zynq_sdhci.c
index bcd154a..bf54219 100644
--- a/drivers/mmc/zynq_sdhci.c
+++ b/drivers/mmc/zynq_sdhci.c
@@ -40,10 +40,8 @@ static int arasan_sdhci_probe(struct udevice *dev)
host->version = sdhci_readw(host, SDHCI_HOST_VERSION);
caps = sdhci_readl(host, SDHCI_CAPABILITIES);
- ret = sdhci_setup_cfg(&plat->cfg, dev->name, host->bus_width,
- caps, CONFIG_ZYNQ_SDHCI_MAX_FREQ,
- CONFIG_ZYNQ_SDHCI_MIN_FREQ, host->version,
- host->quirks, 0);
+ ret = sdhci_setup_cfg(&plat->cfg, host, CONFIG_ZYNQ_SDHCI_MAX_FREQ,
+ CONFIG_ZYNQ_SDHCI_MIN_FREQ);
host->mmc = &plat->mmc;
if (ret)
return ret;
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index 40b798a..eb49fce 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -2229,6 +2229,16 @@ int ext4fs_mount(unsigned part_length)
if (__le16_to_cpu(data->sblock.magic) != EXT2_MAGIC)
goto fail;
+ /*
+ * The 64bit feature was enabled when metadata_csum was enabled
+ * and we do not support metadata_csum (and cannot reliably find
+ * files when it is set. Refuse to mount.
+ */
+ if (data->sblock.feature_incompat & EXT4_FEATURE_INCOMPAT_64BIT) {
+ printf("Unsupported feature found (64bit, possibly metadata_csum), not mounting\n");
+ goto fail;
+ }
+
if (__le32_to_cpu(data->sblock.revision_level == 0))
fs->inodesz = 128;
else
diff --git a/include/configs/B4860QDS.h b/include/configs/B4860QDS.h
index 5de9bb7..7d9619e 100644
--- a/include/configs/B4860QDS.h
+++ b/include/configs/B4860QDS.h
@@ -13,7 +13,6 @@
* B4860 QDS board configuration file
*/
#define CONFIG_B4860QDS
-#define CONFIG_PHYS_64BIT
#ifdef CONFIG_RAMBOOT_PBL
#define CONFIG_SYS_FSL_PBL_PBI $(SRCTREE)/board/freescale/b4860qds/b4_pbi.cfg
diff --git a/include/configs/C29XPCIE.h b/include/configs/C29XPCIE.h
index cc5359f..f75919d 100644
--- a/include/configs/C29XPCIE.h
+++ b/include/configs/C29XPCIE.h
@@ -11,7 +11,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#define CONFIG_PHYS_64BIT
#define CONFIG_DISPLAY_BOARDINFO
#ifdef CONFIG_C29XPCIE
diff --git a/include/configs/MPC8536DS.h b/include/configs/MPC8536DS.h
index 874261a..b536f67 100644
--- a/include/configs/MPC8536DS.h
+++ b/include/configs/MPC8536DS.h
@@ -14,10 +14,6 @@
#define CONFIG_DISPLAY_BOARDINFO
#include "../board/freescale/common/ics307_clk.h"
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT 1
-#endif
-
#ifdef CONFIG_SDCARD
#define CONFIG_RAMBOOT_SDCARD 1
#define CONFIG_SYS_TEXT_BASE 0xf8f40000
diff --git a/include/configs/MPC8548CDS.h b/include/configs/MPC8548CDS.h
index b81a4ed..789c62b 100644
--- a/include/configs/MPC8548CDS.h
+++ b/include/configs/MPC8548CDS.h
@@ -15,10 +15,6 @@
#define CONFIG_DISPLAY_BOARDINFO
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT
-#endif
-
/* High Level Configuration Options */
#define CONFIG_BOOKE 1 /* BOOKE */
#define CONFIG_E500 1 /* BOOKE e500 family */
diff --git a/include/configs/MPC8572DS.h b/include/configs/MPC8572DS.h
index 390b1ef..26cf8d6 100644
--- a/include/configs/MPC8572DS.h
+++ b/include/configs/MPC8572DS.h
@@ -15,10 +15,6 @@
#include "../board/freescale/common/ics307_clk.h"
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT
-#endif
-
#ifndef CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_TEXT_BASE 0xeff40000
#endif
diff --git a/include/configs/MPC8641HPCN.h b/include/configs/MPC8641HPCN.h
index d79bb40..1885124 100644
--- a/include/configs/MPC8641HPCN.h
+++ b/include/configs/MPC8641HPCN.h
@@ -23,7 +23,6 @@
#define CONFIG_MPC8641HPCN 1 /* MPC8641HPCN board specific */
#define CONFIG_MP 1 /* support multiple processors */
#define CONFIG_LINUX_RESET_VEC 0x100 /* Reset vector used by Linux */
-/*#define CONFIG_PHYS_64BIT 1*/ /* Place devices in 36-bit space */
#define CONFIG_ADDR_MAP 1 /* Use addr map */
/*
diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h
index 5b6b4bd..5ab6602 100644
--- a/include/configs/P1010RDB.h
+++ b/include/configs/P1010RDB.h
@@ -11,9 +11,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT
-#endif
#define CONFIG_DISPLAY_BOARDINFO
#define CONFIG_P1010
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index fe19957..5d572b4 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -13,10 +13,6 @@
#define CONFIG_DISPLAY_BOARDINFO
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT
-#endif
-
#ifdef CONFIG_SDCARD
#define CONFIG_SPL_MPC8XXX_INIT_DDR_SUPPORT
#define CONFIG_SPL_ENV_SUPPORT
diff --git a/include/configs/P2041RDB.h b/include/configs/P2041RDB.h
index 8479410..e6057f9 100644
--- a/include/configs/P2041RDB.h
+++ b/include/configs/P2041RDB.h
@@ -12,7 +12,6 @@
#define __CONFIG_H
#define CONFIG_P2041RDB
-#define CONFIG_PHYS_64BIT
#define CONFIG_DISPLAY_BOARDINFO
#define CONFIG_PPC_P2041
diff --git a/include/configs/P3041DS.h b/include/configs/P3041DS.h
index e05dd75..c901fe2 100644
--- a/include/configs/P3041DS.h
+++ b/include/configs/P3041DS.h
@@ -9,7 +9,6 @@
*
*/
#define CONFIG_P3041DS
-#define CONFIG_PHYS_64BIT
#define CONFIG_PPC_P3041
#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */
diff --git a/include/configs/P4080DS.h b/include/configs/P4080DS.h
index 2f89008..0d44c00 100644
--- a/include/configs/P4080DS.h
+++ b/include/configs/P4080DS.h
@@ -9,7 +9,6 @@
* Also supports P4040 DS
*/
#define CONFIG_P4080DS
-#define CONFIG_PHYS_64BIT
#define CONFIG_PPC_P4080
#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */
diff --git a/include/configs/P5020DS.h b/include/configs/P5020DS.h
index 588df80..d2cedfe 100644
--- a/include/configs/P5020DS.h
+++ b/include/configs/P5020DS.h
@@ -9,7 +9,6 @@
* Also supports P5010 DS
*/
#define CONFIG_P5020DS
-#define CONFIG_PHYS_64BIT
#define CONFIG_PPC_P5020
#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */
diff --git a/include/configs/P5040DS.h b/include/configs/P5040DS.h
index e4a031a..dc82721 100644
--- a/include/configs/P5040DS.h
+++ b/include/configs/P5040DS.h
@@ -9,7 +9,6 @@
*
*/
#define CONFIG_P5040DS
-#define CONFIG_PHYS_64BIT
#define CONFIG_PPC_P5040
#define CONFIG_FSL_NGPIXIS /* use common ngPIXIS code */
diff --git a/include/configs/T102xQDS.h b/include/configs/T102xQDS.h
index b151963..2f18f52 100644
--- a/include/configs/T102xQDS.h
+++ b/include/configs/T102xQDS.h
@@ -18,7 +18,6 @@
#define CONFIG_E500MC /* BOOKE e500mc family */
#define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */
#define CONFIG_MP /* support multiple processors */
-#define CONFIG_PHYS_64BIT
#define CONFIG_ENABLE_36BIT_PHYS
#ifdef CONFIG_PHYS_64BIT
diff --git a/include/configs/T102xRDB.h b/include/configs/T102xRDB.h
index 25a0652..8029ca8 100644
--- a/include/configs/T102xRDB.h
+++ b/include/configs/T102xRDB.h
@@ -18,7 +18,6 @@
#define CONFIG_E500MC /* BOOKE e500mc family */
#define CONFIG_SYS_BOOK3E_HV /* Category E.HV supported */
#define CONFIG_MP /* support multiple processors */
-#define CONFIG_PHYS_64BIT
#define CONFIG_ENABLE_36BIT_PHYS
#ifdef CONFIG_PHYS_64BIT
diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h
index 7ce6420..b8c6e89 100644
--- a/include/configs/T1040QDS.h
+++ b/include/configs/T1040QDS.h
@@ -27,7 +27,6 @@
* T1040 QDS board configuration file
*/
#define CONFIG_T1040QDS
-#define CONFIG_PHYS_64BIT
#define CONFIG_DISPLAY_BOARDINFO
#ifdef CONFIG_RAMBOOT_PBL
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index ae1acbd..e583def 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -11,7 +11,6 @@
* T104x RDB board configuration file
*/
#define CONFIG_T104xRDB
-#define CONFIG_PHYS_64BIT
#define CONFIG_DISPLAY_BOARDINFO
#define CONFIG_E500 /* BOOKE e500 family */
diff --git a/include/configs/T208xQDS.h b/include/configs/T208xQDS.h
index 6217555..3f28549 100644
--- a/include/configs/T208xQDS.h
+++ b/include/configs/T208xQDS.h
@@ -26,7 +26,6 @@
#endif
/* High Level Configuration Options */
-#define CONFIG_PHYS_64BIT
#define CONFIG_BOOKE
#define CONFIG_E500 /* BOOKE e500 family */
#define CONFIG_E500MC /* BOOKE e500mc family */
diff --git a/include/configs/T208xRDB.h b/include/configs/T208xRDB.h
index 7a7de97..37d16ae 100644
--- a/include/configs/T208xRDB.h
+++ b/include/configs/T208xRDB.h
@@ -19,7 +19,6 @@
#define CONFIG_FSL_SATA_V2
/* High Level Configuration Options */
-#define CONFIG_PHYS_64BIT
#define CONFIG_BOOKE
#define CONFIG_E500 /* BOOKE e500 family */
#define CONFIG_E500MC /* BOOKE e500mc family */
diff --git a/include/configs/T4240QDS.h b/include/configs/T4240QDS.h
index 85aab18..8fffffe 100644
--- a/include/configs/T4240QDS.h
+++ b/include/configs/T4240QDS.h
@@ -11,7 +11,6 @@
#define __CONFIG_H
#define CONFIG_T4240QDS
-#define CONFIG_PHYS_64BIT
#define CONFIG_FSL_SATA_V2
#define CONFIG_PCIE4
diff --git a/include/configs/T4240RDB.h b/include/configs/T4240RDB.h
index 4133165..15b8219 100644
--- a/include/configs/T4240RDB.h
+++ b/include/configs/T4240RDB.h
@@ -11,7 +11,6 @@
#define __CONFIG_H
#define CONFIG_T4240RDB
-#define CONFIG_PHYS_64BIT
#define CONFIG_DISPLAY_BOARDINFO
#define CONFIG_FSL_SATA_V2
diff --git a/include/configs/axs101.h b/include/configs/axs10x.h
index c0b68e2..b99248e 100644
--- a/include/configs/axs101.h
+++ b/include/configs/axs10x.h
@@ -1,12 +1,13 @@
/*
- * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
-#ifndef _CONFIG_AXS101_H_
-#define _CONFIG_AXS101_H_
+#ifndef _CONFIG_AXS10X_H_
+#define _CONFIG_AXS10X_H_
+#include <linux/sizes.h>
/*
* CPU configuration
*/
@@ -24,13 +25,13 @@
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
-#define CONFIG_SYS_SDRAM_SIZE 0x20000000 /* 512 Mb */
+#define CONFIG_SYS_SDRAM_SIZE SZ_512M
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_MALLOC_LEN 0x200000 /* 2 MB */
-#define CONFIG_SYS_BOOTM_LEN 0x2000000 /* 32 MB */
+#define CONFIG_SYS_MALLOC_LEN SZ_2M
+#define CONFIG_SYS_BOOTM_LEN SZ_32M
#define CONFIG_SYS_LOAD_ADDR 0x82000000
/*
@@ -113,7 +114,7 @@
* Environment settings
*/
#define CONFIG_ENV_IS_IN_EEPROM
-#define CONFIG_ENV_SIZE 0x00200 /* 512 bytes */
+#define CONFIG_ENV_SIZE SZ_512
#define CONFIG_ENV_OFFSET 0
/*
@@ -127,7 +128,7 @@
* Console configuration
*/
#define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_CBSIZE 256
+#define CONFIG_SYS_CBSIZE SZ_256
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
@@ -137,4 +138,4 @@
*/
#define CONFIG_BOUNCE_BUFFER
-#endif /* _CONFIG_AXS101_H_ */
+#endif /* _CONFIG_AXS10X_H_ */
diff --git a/include/configs/controlcenterd.h b/include/configs/controlcenterd.h
index 44e115d..1a63d03 100644
--- a/include/configs/controlcenterd.h
+++ b/include/configs/controlcenterd.h
@@ -26,10 +26,6 @@
#ifndef __CONFIG_H
#define __CONFIG_H
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT
-#endif
-
#ifdef CONFIG_SDCARD
#define CONFIG_RAMBOOT_SDCARD
#endif
diff --git a/include/configs/cyrus.h b/include/configs/cyrus.h
index da38709..8e0ed06 100644
--- a/include/configs/cyrus.h
+++ b/include/configs/cyrus.h
@@ -11,8 +11,6 @@
#define CONFIG_CYRUS
-#define CONFIG_PHYS_64BIT
-
#if !defined(CONFIG_PPC_P5020) && !defined(CONFIG_PPC_P5040)
#error Must call Cyrus CONFIG with a specific CPU enabled.
#endif
diff --git a/include/configs/dra7xx_evm.h b/include/configs/dra7xx_evm.h
index 0b78ada..10f6039 100644
--- a/include/configs/dra7xx_evm.h
+++ b/include/configs/dra7xx_evm.h
@@ -20,7 +20,6 @@
#endif
#define CONFIG_VERY_BIG_RAM
-#define CONFIG_PHYS_64BIT
#define CONFIG_NR_DRAM_BANKS 2
#define CONFIG_MAX_MEM_MAPPED 0x80000000
diff --git a/include/configs/katmai.h b/include/configs/katmai.h
index 9513c6d..e3fede5 100644
--- a/include/configs/katmai.h
+++ b/include/configs/katmai.h
@@ -29,7 +29,6 @@
/*
* Enable this board for more than 2GB of SDRAM
*/
-#define CONFIG_PHYS_64BIT
#define CONFIG_VERY_BIG_RAM
/*
diff --git a/include/configs/km/kmp204x-common.h b/include/configs/km/kmp204x-common.h
index 5bdda22..8166c86 100644
--- a/include/configs/km/kmp204x-common.h
+++ b/include/configs/km/kmp204x-common.h
@@ -8,7 +8,6 @@
#ifndef _CONFIG_KMP204X_H
#define _CONFIG_KMP204X_H
-#define CONFIG_PHYS_64BIT
#define CONFIG_PPC_P2041
#define CONFIG_SYS_TEXT_BASE 0xfff40000
diff --git a/include/configs/arcangel4.h b/include/configs/nsim.h
index d608104..1edc560 100644
--- a/include/configs/arcangel4.h
+++ b/include/configs/nsim.h
@@ -1,11 +1,13 @@
/*
- * Copyright (C) 2013-2014 Synopsys, Inc. All rights reserved.
+ * Copyright (C) 2013-2016 Synopsys, Inc. All rights reserved.
*
* SPDX-License-Identifier: GPL-2.0+
*/
-#ifndef _CONFIG_ARCANGEL4_H_
-#define _CONFIG_ARCANGEL4_H_
+#ifndef _CONFIG_NSIM_H_
+#define _CONFIG_NSIM_H_
+
+#include <linux/sizes.h>
/*
* CPU configuration
@@ -19,13 +21,13 @@
#define CONFIG_SYS_DDR_SDRAM_BASE 0x80000000
#define CONFIG_SYS_SDRAM_BASE CONFIG_SYS_DDR_SDRAM_BASE
-#define CONFIG_SYS_SDRAM_SIZE 0x10000000 /* 256 Mb */
+#define CONFIG_SYS_SDRAM_SIZE SZ_256M
#define CONFIG_SYS_INIT_SP_ADDR \
(CONFIG_SYS_SDRAM_BASE + 0x1000 - GENERATED_GBL_DATA_SIZE)
-#define CONFIG_SYS_MALLOC_LEN 0x200000 /* 2 MB */
-#define CONFIG_SYS_BOOTM_LEN 0x2000000 /* 32 MB */
+#define CONFIG_SYS_MALLOC_LEN SZ_2M
+#define CONFIG_SYS_BOOTM_LEN SZ_32M
#define CONFIG_SYS_LOAD_ADDR 0x82000000
#define CONFIG_SYS_NO_FLASH
@@ -48,7 +50,7 @@
* Environment settings
*/
#define CONFIG_ENV_IS_NOWHERE
-#define CONFIG_ENV_SIZE 0x00200 /* 512 bytes */
+#define CONFIG_ENV_SIZE SZ_512
#define CONFIG_ENV_OFFSET 0
/*
@@ -62,9 +64,9 @@
* Console configuration
*/
#define CONFIG_SYS_LONGHELP
-#define CONFIG_SYS_CBSIZE 256
+#define CONFIG_SYS_CBSIZE SZ_256
#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
sizeof(CONFIG_SYS_PROMPT) + 16)
-#endif /* _CONFIG_ARCANGEL4_H_ */
+#endif /* _CONFIG_NSIM_H_ */
diff --git a/include/configs/omap3_evm.h b/include/configs/omap3_evm.h
index 1726a3e..52a24d3 100644
--- a/include/configs/omap3_evm.h
+++ b/include/configs/omap3_evm.h
@@ -96,11 +96,279 @@
#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
+/*
+ * High level configuration options
+ */
+#define CONFIG_OMAP /* This is TI OMAP core */
+#define CONFIG_OMAP_GPIO
+#define CONFIG_OMAP_COMMON
+/* Common ARM Erratas */
+#define CONFIG_ARM_ERRATA_454179
+#define CONFIG_ARM_ERRATA_430973
+#define CONFIG_ARM_ERRATA_621766
+
+#define CONFIG_SDRC /* The chip has SDRC controller */
+
+#define CONFIG_OMAP3_EVM /* This is a OMAP3 EVM */
+#define CONFIG_TWL4030_POWER /* with TWL4030 PMIC */
+
+/*
+ * Clock related definitions
+ */
+#define V_OSCK 26000000 /* Clock output from T2 */
+#define V_SCLK (V_OSCK >> 1)
+
+/*
+ * OMAP3 has 12 GP timers, they can be driven by the system clock
+ * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
+ * This rate is divided by a local divisor.
+ */
+#define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2
+#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
+
+/* Size of environment - 128KB */
+#define CONFIG_ENV_SIZE (128 << 10)
+
+/* Size of malloc pool */
+#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
+
+/*
+ * Physical Memory Map
+ * Note 1: CS1 may or may not be populated
+ * Note 2: SDRAM size is expected to be at least 32MB
+ */
+#define CONFIG_NR_DRAM_BANKS 2
+#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
+#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
+
+/* Limits for memtest */
+#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
+#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
+ 0x01F00000) /* 31MB */
+
+/* Default load address */
+#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
+
/* -----------------------------------------------------------------------------
- * Include common board configuration
+ * Hardware drivers
* -----------------------------------------------------------------------------
*/
-#include "omap3_evm_common.h"
+
+/*
+ * NS16550 Configuration
+ */
+#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
+
+#define CONFIG_SYS_NS16550_SERIAL
+#define CONFIG_SYS_NS16550_REG_SIZE (-4)
+#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
+
+/*
+ * select serial console configuration
+ */
+#define CONFIG_CONS_INDEX 1
+#define CONFIG_SERIAL1 1 /* UART1 on OMAP3 EVM */
+#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
+#define CONFIG_BAUDRATE 115200
+#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
+ 115200}
+
+/*
+ * I2C
+ */
+#define CONFIG_SYS_I2C
+#define CONFIG_SYS_OMAP24_I2C_SPEED 100000
+#define CONFIG_SYS_OMAP24_I2C_SLAVE 1
+#define CONFIG_SYS_I2C_OMAP34XX
+
+/*
+ * PISMO support
+ */
+/* Monitor at start of flash - Reserve 2 sectors */
+#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
+
+#define CONFIG_SYS_MONITOR_LEN (256 << 10)
+
+/* Start location & size of environment */
+#define ONENAND_ENV_OFFSET 0x260000
+#define SMNAND_ENV_OFFSET 0x260000
+
+#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
+
+/*
+ * NAND
+ */
+/* Physical address to access NAND */
+#define CONFIG_SYS_NAND_ADDR NAND_BASE
+
+/* Physical address to access NAND at CS0 */
+#define CONFIG_SYS_NAND_BASE NAND_BASE
+
+/* Max number of NAND devices */
+#define CONFIG_SYS_MAX_NAND_DEVICE 1
+#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
+/* Timeout values (in ticks) */
+#define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)
+#define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ)
+
+/* Flash banks JFFS2 should use */
+#define CONFIG_SYS_MAX_MTD_BANKS (CONFIG_SYS_MAX_FLASH_BANKS + \
+ CONFIG_SYS_MAX_NAND_DEVICE)
+
+#define CONFIG_SYS_JFFS2_MEM_NAND
+#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS
+#define CONFIG_SYS_JFFS2_NUM_BANKS 1
+
+#define CONFIG_JFFS2_NAND
+/* nand device jffs2 lives on */
+#define CONFIG_JFFS2_DEV "nand0"
+/* Start of jffs2 partition */
+#define CONFIG_JFFS2_PART_OFFSET 0x680000
+/* Size of jffs2 partition */
+#define CONFIG_JFFS2_PART_SIZE 0xf980000
+
+/*
+ * USB
+ */
+#ifdef CONFIG_USB_OMAP3
+
+#ifdef CONFIG_USB_MUSB_HCD
+
+#define CONFIG_USB_STORAGE
+#define CONGIG_CMD_STORAGE
+
+#ifdef CONFIG_USB_KEYBOARD
+#define CONFIG_SYS_USB_EVENT_POLL
+#define CONFIG_PREBOOT "usb start"
+#endif /* CONFIG_USB_KEYBOARD */
+
+#endif /* CONFIG_USB_MUSB_HCD */
+
+#ifdef CONFIG_USB_MUSB_UDC
+/* USB device configuration */
+#define CONFIG_USB_DEVICE
+#define CONFIG_USB_TTY
+#define CONFIG_SYS_CONSOLE_IS_IN_ENV
+
+/* Change these to suit your needs */
+#define CONFIG_USBD_VENDORID 0x0451
+#define CONFIG_USBD_PRODUCTID 0x5678
+#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
+#define CONFIG_USBD_PRODUCT_NAME "EVM"
+#endif /* CONFIG_USB_MUSB_UDC */
+
+#endif /* CONFIG_USB_OMAP3 */
+
+/* ----------------------------------------------------------------------------
+ * U-Boot features
+ * ----------------------------------------------------------------------------
+ */
+#define CONFIG_SYS_MAXARGS 16 /* max args for a command */
+
+#define CONFIG_MISC_INIT_R
+
+#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
+#define CONFIG_SETUP_MEMORY_TAGS
+#define CONFIG_INITRD_TAG
+#define CONFIG_REVISION_TAG
+
+/* Size of Console IO buffer */
+#define CONFIG_SYS_CBSIZE 512
+
+/* Size of print buffer */
+#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
+ sizeof(CONFIG_SYS_PROMPT) + 16)
+
+/* Size of bootarg buffer */
+#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
+
+#define CONFIG_BOOTFILE "uImage"
+
+/*
+ * NAND / OneNAND
+ */
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_SYS_FLASH_BASE NAND_BASE
+
+#define CONFIG_NAND_OMAP_GPMC
+#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
+#elif defined(CONFIG_CMD_ONENAND)
+#define CONFIG_SYS_FLASH_BASE ONENAND_MAP
+#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
+#endif
+
+#if !defined(CONFIG_ENV_IS_NOWHERE)
+#if defined(CONFIG_CMD_NAND)
+#define CONFIG_ENV_IS_IN_NAND
+#elif defined(CONFIG_CMD_ONENAND)
+#define CONFIG_ENV_IS_IN_ONENAND
+#define CONFIG_ENV_OFFSET ONENAND_ENV_OFFSET
+#endif
+#endif /* CONFIG_ENV_IS_NOWHERE */
+
+#define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
+
+#if defined(CONFIG_CMD_NET)
+
+/* Ethernet (SMSC9115 from SMSC9118 family) */
+#define CONFIG_SMC911X
+#define CONFIG_SMC911X_32_BIT
+#define CONFIG_SMC911X_BASE 0x2C000000
+
+/* BOOTP fields */
+#define CONFIG_BOOTP_SUBNETMASK 0x00000001
+#define CONFIG_BOOTP_GATEWAY 0x00000002
+#define CONFIG_BOOTP_HOSTNAME 0x00000004
+#define CONFIG_BOOTP_BOOTPATH 0x00000010
+
+#endif /* CONFIG_CMD_NET */
+
+/* Support for relocation */
+#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
+#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
+#define CONFIG_SYS_INIT_RAM_SIZE 0x800
+#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
+ CONFIG_SYS_INIT_RAM_SIZE - \
+ GENERATED_GBL_DATA_SIZE)
+
+/* -----------------------------------------------------------------------------
+ * Board specific
+ * -----------------------------------------------------------------------------
+ */
+#define CONFIG_SYS_NO_FLASH
+
+/* Uncomment to define the board revision statically */
+/* #define CONFIG_STATIC_BOARD_REV OMAP3EVM_BOARD_GEN_2 */
+
+#define CONFIG_SYS_CACHELINE_SIZE 64
+
+/* Defines for SPL */
+#define CONFIG_SPL_FRAMEWORK
+#define CONFIG_SPL_TEXT_BASE 0x40200800
+#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */
+
+#define CONFIG_SPL_BSS_START_ADDR 0x80000000
+#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
+
+#define CONFIG_SPL_BOARD_INIT
+#define CONFIG_SPL_LIBCOMMON_SUPPORT
+#define CONFIG_SPL_LIBDISK_SUPPORT
+#define CONFIG_SPL_I2C_SUPPORT
+#define CONFIG_SPL_LIBGENERIC_SUPPORT
+#define CONFIG_SPL_SERIAL_SUPPORT
+#define CONFIG_SPL_POWER_SUPPORT
+#define CONFIG_SPL_OMAP3_ID_NAND
+#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
+
+/*
+ * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
+ * 64 bytes before this address should be set aside for u-boot.img's
+ * header. That is 0x800FFFC0--0x80100000 should not be used for any
+ * other needs.
+ */
+#define CONFIG_SYS_TEXT_BASE 0x80100000
+#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
+#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
/* -----------------------------------------------------------------------------
* Default environment
diff --git a/include/configs/omap3_evm_common.h b/include/configs/omap3_evm_common.h
deleted file mode 100644
index 01336ff..0000000
--- a/include/configs/omap3_evm_common.h
+++ /dev/null
@@ -1,286 +0,0 @@
-/*
- * Common configuration settings for the TI OMAP3 EVM board.
- *
- * Copyright (C) 2006-2011 Texas Instruments Incorporated - http://www.ti.com/
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef __OMAP3_EVM_COMMON_H
-#define __OMAP3_EVM_COMMON_H
-
-/*
- * High level configuration options
- */
-#define CONFIG_OMAP /* This is TI OMAP core */
-#define CONFIG_OMAP_GPIO
-#define CONFIG_OMAP_COMMON
-/* Common ARM Erratas */
-#define CONFIG_ARM_ERRATA_454179
-#define CONFIG_ARM_ERRATA_430973
-#define CONFIG_ARM_ERRATA_621766
-
-#define CONFIG_SDRC /* The chip has SDRC controller */
-
-#define CONFIG_OMAP3_EVM /* This is a OMAP3 EVM */
-#define CONFIG_TWL4030_POWER /* with TWL4030 PMIC */
-
-/*
- * Clock related definitions
- */
-#define V_OSCK 26000000 /* Clock output from T2 */
-#define V_SCLK (V_OSCK >> 1)
-
-/*
- * OMAP3 has 12 GP timers, they can be driven by the system clock
- * (12/13/16.8/19.2/38.4MHz) or by 32KHz clock. We use 13MHz (V_SCLK).
- * This rate is divided by a local divisor.
- */
-#define CONFIG_SYS_TIMERBASE OMAP34XX_GPT2
-#define CONFIG_SYS_PTV 2 /* Divisor: 2^(PTV+1) => 8 */
-
-/* Size of environment - 128KB */
-#define CONFIG_ENV_SIZE (128 << 10)
-
-/* Size of malloc pool */
-#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10))
-
-/*
- * Physical Memory Map
- * Note 1: CS1 may or may not be populated
- * Note 2: SDRAM size is expected to be at least 32MB
- */
-#define CONFIG_NR_DRAM_BANKS 2
-#define PHYS_SDRAM_1 OMAP34XX_SDRC_CS0
-#define PHYS_SDRAM_2 OMAP34XX_SDRC_CS1
-
-/* Limits for memtest */
-#define CONFIG_SYS_MEMTEST_START (OMAP34XX_SDRC_CS0)
-#define CONFIG_SYS_MEMTEST_END (OMAP34XX_SDRC_CS0 + \
- 0x01F00000) /* 31MB */
-
-/* Default load address */
-#define CONFIG_SYS_LOAD_ADDR (OMAP34XX_SDRC_CS0)
-
-/* -----------------------------------------------------------------------------
- * Hardware drivers
- * -----------------------------------------------------------------------------
- */
-
-/*
- * NS16550 Configuration
- */
-#define V_NS16550_CLK 48000000 /* 48MHz (APLL96/2) */
-
-#define CONFIG_SYS_NS16550_SERIAL
-#define CONFIG_SYS_NS16550_REG_SIZE (-4)
-#define CONFIG_SYS_NS16550_CLK V_NS16550_CLK
-
-/*
- * select serial console configuration
- */
-#define CONFIG_CONS_INDEX 1
-#define CONFIG_SERIAL1 1 /* UART1 on OMAP3 EVM */
-#define CONFIG_SYS_NS16550_COM1 OMAP34XX_UART1
-#define CONFIG_BAUDRATE 115200
-#define CONFIG_SYS_BAUDRATE_TABLE {4800, 9600, 19200, 38400, 57600,\
- 115200}
-
-/*
- * I2C
- */
-#define CONFIG_SYS_I2C
-#define CONFIG_SYS_OMAP24_I2C_SPEED 100000
-#define CONFIG_SYS_OMAP24_I2C_SLAVE 1
-#define CONFIG_SYS_I2C_OMAP34XX
-
-/*
- * PISMO support
- */
-/* Monitor at start of flash - Reserve 2 sectors */
-#define CONFIG_SYS_MONITOR_BASE CONFIG_SYS_FLASH_BASE
-
-#define CONFIG_SYS_MONITOR_LEN (256 << 10)
-
-/* Start location & size of environment */
-#define ONENAND_ENV_OFFSET 0x260000
-#define SMNAND_ENV_OFFSET 0x260000
-
-#define CONFIG_SYS_ENV_SECT_SIZE (128 << 10) /* 128 KiB */
-
-/*
- * NAND
- */
-/* Physical address to access NAND */
-#define CONFIG_SYS_NAND_ADDR NAND_BASE
-
-/* Physical address to access NAND at CS0 */
-#define CONFIG_SYS_NAND_BASE NAND_BASE
-
-/* Max number of NAND devices */
-#define CONFIG_SYS_MAX_NAND_DEVICE 1
-#define CONFIG_SYS_NAND_BUSWIDTH_16BIT
-/* Timeout values (in ticks) */
-#define CONFIG_SYS_FLASH_ERASE_TOUT (100 * CONFIG_SYS_HZ)
-#define CONFIG_SYS_FLASH_WRITE_TOUT (100 * CONFIG_SYS_HZ)
-
-/* Flash banks JFFS2 should use */
-#define CONFIG_SYS_MAX_MTD_BANKS (CONFIG_SYS_MAX_FLASH_BANKS + \
- CONFIG_SYS_MAX_NAND_DEVICE)
-
-#define CONFIG_SYS_JFFS2_MEM_NAND
-#define CONFIG_SYS_JFFS2_FIRST_BANK CONFIG_SYS_MAX_FLASH_BANKS
-#define CONFIG_SYS_JFFS2_NUM_BANKS 1
-
-#define CONFIG_JFFS2_NAND
-/* nand device jffs2 lives on */
-#define CONFIG_JFFS2_DEV "nand0"
-/* Start of jffs2 partition */
-#define CONFIG_JFFS2_PART_OFFSET 0x680000
-/* Size of jffs2 partition */
-#define CONFIG_JFFS2_PART_SIZE 0xf980000
-
-/*
- * USB
- */
-#ifdef CONFIG_USB_OMAP3
-
-#ifdef CONFIG_USB_MUSB_HCD
-
-#define CONFIG_USB_STORAGE
-#define CONGIG_CMD_STORAGE
-
-#ifdef CONFIG_USB_KEYBOARD
-#define CONFIG_SYS_USB_EVENT_POLL
-#define CONFIG_PREBOOT "usb start"
-#endif /* CONFIG_USB_KEYBOARD */
-
-#endif /* CONFIG_USB_MUSB_HCD */
-
-#ifdef CONFIG_USB_MUSB_UDC
-/* USB device configuration */
-#define CONFIG_USB_DEVICE
-#define CONFIG_USB_TTY
-#define CONFIG_SYS_CONSOLE_IS_IN_ENV
-
-/* Change these to suit your needs */
-#define CONFIG_USBD_VENDORID 0x0451
-#define CONFIG_USBD_PRODUCTID 0x5678
-#define CONFIG_USBD_MANUFACTURER "Texas Instruments"
-#define CONFIG_USBD_PRODUCT_NAME "EVM"
-#endif /* CONFIG_USB_MUSB_UDC */
-
-#endif /* CONFIG_USB_OMAP3 */
-
-/* ----------------------------------------------------------------------------
- * U-Boot features
- * ----------------------------------------------------------------------------
- */
-#define CONFIG_SYS_MAXARGS 16 /* max args for a command */
-
-#define CONFIG_MISC_INIT_R
-
-#define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */
-#define CONFIG_SETUP_MEMORY_TAGS
-#define CONFIG_INITRD_TAG
-#define CONFIG_REVISION_TAG
-
-/* Size of Console IO buffer */
-#define CONFIG_SYS_CBSIZE 512
-
-/* Size of print buffer */
-#define CONFIG_SYS_PBSIZE (CONFIG_SYS_CBSIZE + \
- sizeof(CONFIG_SYS_PROMPT) + 16)
-
-/* Size of bootarg buffer */
-#define CONFIG_SYS_BARGSIZE (CONFIG_SYS_CBSIZE)
-
-#define CONFIG_BOOTFILE "uImage"
-
-/*
- * NAND / OneNAND
- */
-#if defined(CONFIG_CMD_NAND)
-#define CONFIG_SYS_FLASH_BASE NAND_BASE
-
-#define CONFIG_NAND_OMAP_GPMC
-#define CONFIG_ENV_OFFSET SMNAND_ENV_OFFSET
-#elif defined(CONFIG_CMD_ONENAND)
-#define CONFIG_SYS_FLASH_BASE ONENAND_MAP
-#define CONFIG_SYS_ONENAND_BASE ONENAND_MAP
-#endif
-
-#if !defined(CONFIG_ENV_IS_NOWHERE)
-#if defined(CONFIG_CMD_NAND)
-#define CONFIG_ENV_IS_IN_NAND
-#elif defined(CONFIG_CMD_ONENAND)
-#define CONFIG_ENV_IS_IN_ONENAND
-#define CONFIG_ENV_OFFSET ONENAND_ENV_OFFSET
-#endif
-#endif /* CONFIG_ENV_IS_NOWHERE */
-
-#define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET
-
-#if defined(CONFIG_CMD_NET)
-
-/* Ethernet (SMSC9115 from SMSC9118 family) */
-#define CONFIG_SMC911X
-#define CONFIG_SMC911X_32_BIT
-#define CONFIG_SMC911X_BASE 0x2C000000
-
-/* BOOTP fields */
-#define CONFIG_BOOTP_SUBNETMASK 0x00000001
-#define CONFIG_BOOTP_GATEWAY 0x00000002
-#define CONFIG_BOOTP_HOSTNAME 0x00000004
-#define CONFIG_BOOTP_BOOTPATH 0x00000010
-
-#endif /* CONFIG_CMD_NET */
-
-/* Support for relocation */
-#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
-#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
-#define CONFIG_SYS_INIT_RAM_SIZE 0x800
-#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_INIT_RAM_ADDR + \
- CONFIG_SYS_INIT_RAM_SIZE - \
- GENERATED_GBL_DATA_SIZE)
-
-/* -----------------------------------------------------------------------------
- * Board specific
- * -----------------------------------------------------------------------------
- */
-#define CONFIG_SYS_NO_FLASH
-
-/* Uncomment to define the board revision statically */
-/* #define CONFIG_STATIC_BOARD_REV OMAP3EVM_BOARD_GEN_2 */
-
-#define CONFIG_SYS_CACHELINE_SIZE 64
-
-/* Defines for SPL */
-#define CONFIG_SPL_FRAMEWORK
-#define CONFIG_SPL_TEXT_BASE 0x40200800
-#define CONFIG_SPL_MAX_SIZE (54 * 1024) /* 8 KB for stack */
-
-#define CONFIG_SPL_BSS_START_ADDR 0x80000000
-#define CONFIG_SPL_BSS_MAX_SIZE 0x80000 /* 512 KB */
-
-#define CONFIG_SPL_BOARD_INIT
-#define CONFIG_SPL_LIBCOMMON_SUPPORT
-#define CONFIG_SPL_LIBDISK_SUPPORT
-#define CONFIG_SPL_I2C_SUPPORT
-#define CONFIG_SPL_LIBGENERIC_SUPPORT
-#define CONFIG_SPL_SERIAL_SUPPORT
-#define CONFIG_SPL_POWER_SUPPORT
-#define CONFIG_SPL_OMAP3_ID_NAND
-#define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/omap-common/u-boot-spl.lds"
-
-/*
- * 1MB into the SDRAM to allow for SPL's bss at the beginning of SDRAM
- * 64 bytes before this address should be set aside for u-boot.img's
- * header. That is 0x800FFFC0--0x80100000 should not be used for any
- * other needs.
- */
-#define CONFIG_SYS_TEXT_BASE 0x80100000
-#define CONFIG_SYS_SPL_MALLOC_START 0x80208000
-#define CONFIG_SYS_SPL_MALLOC_SIZE 0x100000
-
-#endif /* __OMAP3_EVM_COMMON_H */
diff --git a/include/configs/omap3_evm_quick_mmc.h b/include/configs/omap3_evm_quick_mmc.h
deleted file mode 100644
index b7d8765..0000000
--- a/include/configs/omap3_evm_quick_mmc.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * Configuration settings for quick boot from MMC on OMAP3 EVM.
- *
- * Copyright (C) 2006-2010 Texas Instruments Incorporated - http://www.ti.com/
- *
- * Author :
- * Sanjeev Premi <premi@ti.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef __OMAP3_EVM_QUICK_MMC_H
-#define __OMAP3_EVM_QUICK_MMC_H
-
-#include <asm/arch/cpu.h>
-#include <asm/arch/omap.h>
-
-/* ----------------------------------------------------------------------------
- * Supported U-Boot commands
- * ----------------------------------------------------------------------------
- */
-
-/*
- * Board revision is detected by probing the Ethernet chip.
- *
- * When revision is statically configured via CONFIG_STATIC_BOARD_REV,
- * this option can be removed. Generated binary is leaner by ~16Kbytes.
- */
-
-/* ----------------------------------------------------------------------------
- * Supported U-Boot features
- * ----------------------------------------------------------------------------
- */
-#define CONFIG_SILENT_CONSOLE
-#define CONFIG_ENV_IS_NOWHERE
-
-/* ----------------------------------------------------------------------------
- * Supported hardware
- * ----------------------------------------------------------------------------
- */
-
-/* MMC */
-#define CONFIG_MMC
-#define CONFIG_GENERIC_MMC
-#define CONFIG_OMAP_HSMMC
-#define CONFIG_DOS_PARTITION
-
-/* -----------------------------------------------------------------------------
- * Include common board configuration
- * -----------------------------------------------------------------------------
- */
-#include "omap3_evm_common.h"
-
-/* -----------------------------------------------------------------------------
- * Default environment
- * -----------------------------------------------------------------------------
- */
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "verify=no\0" \
- "silent=1"
-
-#define CONFIG_BOOTCOMMAND \
- "mmc rescan 0; " \
- "fatload mmc 0 0x82000000 uImage; " \
- "bootm 0x82000000;"
-
-/*
- * Update the bootargs as necessary e.g. size of memory, partition and fstype
- */
-#define CONFIG_BOOTARGS \
- "quiet " \
- "console=ttyO0,115200n8 " \
- "mem=128M " \
- "noinitrd " \
- "root=/dev/mmcblk0p2 rw " \
- "rootfstype=ext3 rootwait"
-
-/*
- * SPL
- */
-#define CONFIG_SPL_MMC_SUPPORT
-#define CONFIG_SPL_FAT_SUPPORT
-#define CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR 0x300 /* address 0x60000 */
-#define CONFIG_SYS_U_BOOT_MAX_SIZE_SECTORS 0x200 /* 256 KB */
-#define CONFIG_SYS_MMCSD_FS_BOOT_PARTITION 1
-#define CONFIG_SPL_FS_LOAD_PAYLOAD_NAME "u-boot.img"
-
-#endif /* __OMAP3_EVM_QUICK_MMC_H */
diff --git a/include/configs/omap3_evm_quick_nand.h b/include/configs/omap3_evm_quick_nand.h
deleted file mode 100644
index da5d325..0000000
--- a/include/configs/omap3_evm_quick_nand.h
+++ /dev/null
@@ -1,91 +0,0 @@
-/*
- * Configuration settings for quick boot from NAND on OMAP3 EVM.
- *
- * Copyright (C) 2006-2010 Texas Instruments Incorporated - http://www.ti.com/
- *
- * Author :
- * Sanjeev Premi <premi@ti.com>
- *
- * SPDX-License-Identifier: GPL-2.0+
- */
-
-#ifndef __OMAP3_EVM_QUICK_NAND_H
-#define __OMAP3_EVM_QUICK_NAND_H
-
-#include <asm/arch/cpu.h>
-#include <asm/arch/omap.h>
-
-/* ----------------------------------------------------------------------------
- * Supported U-Boot commands
- * ----------------------------------------------------------------------------
- */
-#define CONFIG_CMD_NAND
-
-/*
- * Board revision is detected by probing the Ethernet chip.
- *
- * When revision is statically configured via CONFIG_STATIC_BOARD_REV,
- * this option can be removed. Generated binary is leaner by ~16Kbytes.
- */
-
-/* ----------------------------------------------------------------------------
- * Supported U-Boot features
- * ----------------------------------------------------------------------------
- */
-#define CONFIG_SILENT_CONSOLE
-#define CONFIG_ENV_IS_NOWHERE
-
-/* -----------------------------------------------------------------------------
- * Include common board configuration
- * -----------------------------------------------------------------------------
- */
-#include "omap3_evm_common.h"
-
-/* -----------------------------------------------------------------------------
- * Default environment
- * -----------------------------------------------------------------------------
- */
-
-#define CONFIG_EXTRA_ENV_SETTINGS \
- "verify=no\0" \
- "silent=1"
-
-#define CONFIG_BOOTCOMMAND \
- "nandecc hw; " \
- "nand read.i 0x80000000 280000 300000; " \
- "bootm 0x80000000;"
-
-/*
- * Update the bootargs as necessary e.g. size of memory, partition and fstype
- */
-#define CONFIG_BOOTARGS \
- "quiet " \
- "console=ttyO0,115200n8 " \
- "mem=128M " \
- "noinitrd " \
- "root=/dev/mtdblock4 rw " \
- "rootfstype=jffs2 "
-
-/*
- * SPL
- */
-#define CONFIG_SPL_NAND_SIMPLE
-#define CONFIG_SPL_NAND_SUPPORT
-#define CONFIG_SPL_NAND_BASE
-#define CONFIG_SPL_NAND_DRIVERS
-#define CONFIG_SPL_NAND_ECC
-#define CONFIG_SYS_NAND_5_ADDR_CYCLE
-#define CONFIG_SYS_NAND_PAGE_COUNT 64
-#define CONFIG_SYS_NAND_PAGE_SIZE 2048
-#define CONFIG_SYS_NAND_OOBSIZE 64
-#define CONFIG_SYS_NAND_BLOCK_SIZE (128*1024)
-#define CONFIG_SYS_NAND_BAD_BLOCK_POS 0
-#define CONFIG_SYS_NAND_ECCPOS {2, 3, 4, 5, 6, 7, 8, 9,\
- 10, 11, 12, 13}
-#define CONFIG_SYS_NAND_ECCSIZE 512
-#define CONFIG_SYS_NAND_ECCBYTES 3
-#define CONFIG_NAND_OMAP_ECCSCHEME OMAP_ECC_HAM1_CODE_HW
-#define CONFIG_SYS_NAND_U_BOOT_START CONFIG_SYS_TEXT_BASE
-#define CONFIG_SYS_NAND_U_BOOT_OFFS 0x80000
-
-#endif /* __OMAP3_EVM_QUICK_NAND_H */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index 1f36d36..d00cf50 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -203,7 +203,7 @@
#define CONFIG_REVISION_TAG
#define CONFIG_SETUP_MEMORY_TAGS
#define CONFIG_BOOTARGS "console=ttyS2,115200n8 root=/dev/mmcblk0p2 rw rootwait ip=off"
-#define CONFIG_BOOTCOMMAND "if mmc rescan 0; then if fatload mmc 0 0xc0600000 boot.scr; then source 0xc0600000; else fatload mmc 0 0xc0700000 uImage; bootm c0700000; fi; else sf probe 0; sf read 0xc0700000 0x80000 0x220000; bootm 0xc0700000; fi"
+#define CONFIG_BOOTCOMMAND "if mmc rescan; then if fatload mmc 0 0xc0600000 boot.scr; then source 0xc0600000; else fatload mmc 0 0xc0700000 uImage; bootm c0700000; fi; else sf probe 0; sf read 0xc0700000 0x80000 0x220000; bootm 0xc0700000; fi"
/*
* U-Boot commands
diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h
index 3d33421..5d0a570 100644
--- a/include/configs/p1_p2_rdb_pc.h
+++ b/include/configs/p1_p2_rdb_pc.h
@@ -12,10 +12,6 @@
#define CONFIG_DISPLAY_BOARDINFO
-#ifdef CONFIG_36BIT
-#define CONFIG_PHYS_64BIT
-#endif
-
#if defined(CONFIG_P1020MBG)
#define CONFIG_BOARDNAME "P1020MBG-PC"
#define CONFIG_P1020
diff --git a/include/configs/qemu-ppce500.h b/include/configs/qemu-ppce500.h
index 0b86402..072859e 100644
--- a/include/configs/qemu-ppce500.h
+++ b/include/configs/qemu-ppce500.h
@@ -56,8 +56,6 @@ extern unsigned long long get_phys_ccsrbar_addr_early(void);
#define CONFIG_SYS_CCSRBAR_PHYS_LOW CONFIG_SYS_CCSRBAR
#endif
-#define CONFIG_PHYS_64BIT
-
/* Virtual address range for PCI region maps */
#define CONFIG_SYS_PCI_MAP_START 0x80000000
#define CONFIG_SYS_PCI_MAP_END 0xe8000000
diff --git a/include/dwmmc.h b/include/dwmmc.h
index d18ec84..5b9602c 100644
--- a/include/dwmmc.h
+++ b/include/dwmmc.h
@@ -105,7 +105,7 @@
/* Status Register */
#define DWMCI_BUSY (1 << 9)
-#define DWMCI_FIFO_MASK 0x1ff
+#define DWMCI_FIFO_MASK 0x1fff
#define DWMCI_FIFO_SHIFT 17
/* FIFOTH Register */
diff --git a/include/ext4fs.h b/include/ext4fs.h
index cc765ae..13d2c56 100644
--- a/include/ext4fs.h
+++ b/include/ext4fs.h
@@ -32,6 +32,7 @@
#define EXT4_EXT_MAGIC 0xf30a
#define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010
#define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040
+#define EXT4_FEATURE_INCOMPAT_64BIT 0x0080
#define EXT4_INDIRECT_BLOCKS 12
#define EXT4_BG_INODE_UNINIT 0x0001
diff --git a/include/mmc.h b/include/mmc.h
index dd47f34..aa6d5d1 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -66,12 +66,6 @@
#define MMC_DATA_READ 1
#define MMC_DATA_WRITE 2
-#define NO_CARD_ERR -16 /* No SD/MMC card inserted */
-#define UNUSABLE_ERR -17 /* Unusable Card */
-#define COMM_ERR -18 /* Communications Error */
-#define TIMEOUT -19
-#define SWITCH_ERR -20 /* Card reports failure to switch mode */
-
#define MMC_CMD_GO_IDLE_STATE 0
#define MMC_CMD_SEND_OP_COND 1
#define MMC_CMD_ALL_SEND_CID 2
diff --git a/include/sdhci.h b/include/sdhci.h
index c4d3b55..fcef4dc 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -367,19 +367,12 @@ static inline u8 sdhci_readb(struct sdhci_host *host, int reg)
* See msm_sdhci.c for an example.
*
* @cfg: Configuration structure to fill in (generally &plat->mmc)
- * @name: Device name (normally dev->name)
- * @buswidth: Bus width (in bits, such as 4 or 8)
- * @caps: Host capabilities (MMC_MODE_...)
+ * @host: SDHCI host structure
* @max_clk: Maximum supported clock speed in HZ (0 for default)
* @min_clk: Minimum supported clock speed in HZ (0 for default)
- * @version: Host controller version (generally read from the
- * SDHCI_HOST_VERSION register)
- * @quirks: Quick flags (SDHCI_QUIRK_...)
- * @host_caps: Additional host capabilities (0 if none)
*/
-int sdhci_setup_cfg(struct mmc_config *cfg, const char *name, int buswidth,
- uint caps, u32 max_clk, u32 min_clk, uint version,
- uint quirks, uint host_caps);
+int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
+ u32 max_clk, u32 min_clk);
/**
* sdhci_bind() - Set up a new MMC block device
diff --git a/test/README b/test/README
index ee55972..1142e9c 100644
--- a/test/README
+++ b/test/README
@@ -13,7 +13,7 @@ To run most tests on sandbox, type this:
test/run
in the U-Boot directory. Note that only the pytest suite is run using this
-comment.
+command.
Sandbox
@@ -29,7 +29,7 @@ Pytest Suite
Many tests are available using the pytest suite, in test/py. This can run
either on sandbox or on real hardware. It relies on the U-Boot console to
inject test commands and check the result. It is slower to run than C code,
-but provides the ability to unify lots of test and summarise their results.
+but provides the ability to unify lots of tests and summarise their results.
You can run the tests on sandbox with:
@@ -55,11 +55,11 @@ Ad-hoc tests
There are several ad-hoc tests which run outside the pytest environment:
test/fs - File system test (shell script)
- test/image - FIT and lagacy image tests (shell script and Python)
+ test/image - FIT and legacy image tests (shell script and Python)
test/stdint - A test that stdint.h can be used in U-Boot (shell script)
trace - Test for the tracing feature (shell script)
-The above should be converted to run as part of the pytest suite.
+TODO: Move these into pytest.
When to write tests
diff --git a/test/py/multiplexed_log.py b/test/py/multiplexed_log.py
index 35a32fb..bf926c3 100644
--- a/test/py/multiplexed_log.py
+++ b/test/py/multiplexed_log.py
@@ -102,6 +102,7 @@ class RunAndLog(object):
self.name = name
self.chained_file = chained_file
self.output = None
+ self.exit_status = None
def close(self):
"""Clean up any resources managed by this object."""
@@ -166,6 +167,7 @@ class RunAndLog(object):
# Store the output so it can be accessed if we raise an exception.
self.output = output
+ self.exit_status = exit_status
if exception:
raise exception
return output
diff --git a/test/py/tests/test_vboot.py b/test/py/tests/test_vboot.py
index 14ec85b..021892b 100644
--- a/test/py/tests/test_vboot.py
+++ b/test/py/tests/test_vboot.py
@@ -1,4 +1,4 @@
-# Copyright (c) 2013, Google Inc.
+# Copyright (c) 2016, Google Inc.
#
# SPDX-License-Identifier: GPL-2.0+
#
@@ -16,7 +16,7 @@ For image verification:
For configuration verification:
- Corrupt signature and check for failure
- Create FIT (with unsigned configuration) with mkimage
-- Check that image veriication works
+- Check that image verification works
- Sign the FIT and mark the key as 'required' for verification
- Check that image verification works
- Corrupt the signature
@@ -41,7 +41,7 @@ def test_vboot(u_boot_console):
key-generation process is quite slow and we want to avoid doing it twice.
"""
def dtc(dts):
- """Run the device-tree compiler to compile a .dts file
+ """Run the device tree compiler to compile a .dts file
The output file will be the same as the input file but with a .dtb
extension.
@@ -50,102 +50,108 @@ def test_vboot(u_boot_console):
dts: Device tree file to compile.
"""
dtb = dts.replace('.dts', '.dtb')
- util.cmd(cons, 'dtc %s %s%s -O dtb '
- '-o %s%s' % (dtc_args, datadir, dts, tmpdir, dtb))
+ util.run_and_log(cons, 'dtc %s %s%s -O dtb '
+ '-o %s%s' % (dtc_args, datadir, dts, tmpdir, dtb))
- def run_bootm(test_type, expect_string):
+ def run_bootm(sha_algo, test_type, expect_string):
"""Run a 'bootm' command U-Boot.
This always starts a fresh U-Boot instance since the device tree may
contain a new public key.
Args:
- test_type: A string identifying the test type
- expect_string: A string which is expected in the output
+ test_type: A string identifying the test type.
+ expect_string: A string which is expected in the output.
+ sha_algo: Either 'sha1' or 'sha256', to select the algorithm to
+ use.
"""
- cons.cleanup_spawn()
- cons.ensure_spawned()
- cons.log.action('%s: Test Verified Boot Run: %s' % (algo, test_type))
- output = cons.run_command_list(
- ['sb load hostfs - 100 %stest.fit' % tmpdir,
- 'fdt addr 100',
- 'bootm 100'])
- assert(expect_string in output)
+ cons.restart_uboot()
+ with cons.log.section('Verified boot %s %s' % (sha_algo, test_type)):
+ output = cons.run_command_list(
+ ['sb load hostfs - 100 %stest.fit' % tmpdir,
+ 'fdt addr 100',
+ 'bootm 100'])
+ assert(expect_string in ''.join(output))
def make_fit(its):
- """Make a new FIT from the .its source file
+ """Make a new FIT from the .its source file.
This runs 'mkimage -f' to create a new FIT.
Args:
- its: Filename containing .its source
+ its: Filename containing .its source.
"""
util.run_and_log(cons, [mkimage, '-D', dtc_args, '-f',
'%s%s' % (datadir, its), fit])
- def sign_fit():
+ def sign_fit(sha_algo):
"""Sign the FIT
Signs the FIT and writes the signature into it. It also writes the
public key into the dtb.
+
+ Args:
+ sha_algo: Either 'sha1' or 'sha256', to select the algorithm to
+ use.
"""
- cons.log.action('%s: Sign images' % algo)
+ cons.log.action('%s: Sign images' % sha_algo)
util.run_and_log(cons, [mkimage, '-F', '-k', tmpdir, '-K', dtb,
'-r', fit])
- def test_with_algo(sha):
- """Test verified boot with the given hash algorithm
+ def test_with_algo(sha_algo):
+ """Test verified boot with the given hash algorithm.
This is the main part of the test code. The same procedure is followed
for both hashing algorithms.
Args:
- sha: Either 'sha1' or 'sha256', to select the algorithm to use
+ sha_algo: Either 'sha1' or 'sha256', to select the algorithm to
+ use.
"""
- global algo
-
- algo = sha
-
- # Compile our device tree files for kernel and U-Boot
+ # Compile our device tree files for kernel and U-Boot. These are
+ # regenerated here since mkimage will modify them (by adding a
+ # public key) below.
dtc('sandbox-kernel.dts')
dtc('sandbox-u-boot.dts')
# Build the FIT, but don't sign anything yet
- cons.log.action('%s: Test FIT with signed images' % algo)
- make_fit('sign-images-%s.its' % algo)
- run_bootm('unsigned images', 'dev-')
+ cons.log.action('%s: Test FIT with signed images' % sha_algo)
+ make_fit('sign-images-%s.its' % sha_algo)
+ run_bootm(sha_algo, 'unsigned images', 'dev-')
# Sign images with our dev keys
- sign_fit()
- run_bootm('signed images', 'dev+')
+ sign_fit(sha_algo)
+ run_bootm(sha_algo, 'signed images', 'dev+')
# Create a fresh .dtb without the public keys
dtc('sandbox-u-boot.dts')
- cons.log.action('%s: Test FIT with signed configuration' % algo)
- make_fit('sign-configs-%s.its' % algo)
- run_bootm('unsigned config', '%s+ OK' % algo)
+ cons.log.action('%s: Test FIT with signed configuration' % sha_algo)
+ make_fit('sign-configs-%s.its' % sha_algo)
+ run_bootm(sha_algo, 'unsigned config', '%s+ OK' % sha_algo)
# Sign images with our dev keys
- sign_fit()
- run_bootm('signed config', 'dev+')
+ sign_fit(sha_algo)
+ run_bootm(sha_algo, 'signed config', 'dev+')
- cons.log.action('%s: Check signed config on the host' % algo)
+ cons.log.action('%s: Check signed config on the host' % sha_algo)
util.run_and_log(cons, [fit_check_sign, '-f', fit, '-k', tmpdir,
'-k', dtb])
# Increment the first byte of the signature, which should cause failure
- sig = util.cmd(cons, 'fdtget -t bx %s %s value' % (fit, sig_node))
+ sig = util.run_and_log(cons, 'fdtget -t bx %s %s value' %
+ (fit, sig_node))
byte_list = sig.split()
byte = int(byte_list[0], 16)
- byte_list = ['%x' % (byte + 1)] + byte_list[1:]
+ byte_list[0] = '%x' % (byte + 1)
sig = ' '.join(byte_list)
- util.cmd(cons, 'fdtput -t bx %s %s value %s' % (fit, sig_node, sig))
+ util.run_and_log(cons, 'fdtput -t bx %s %s value %s' %
+ (fit, sig_node, sig))
- run_bootm('Signed config with bad hash', 'Bad Data Hash')
+ run_bootm(sha_algo, 'Signed config with bad hash', 'Bad Data Hash')
- cons.log.action('%s: Check bad config on the host' % algo)
+ cons.log.action('%s: Check bad config on the host' % sha_algo)
util.run_and_log_expect_exception(cons, [fit_check_sign, '-f', fit,
'-k', dtb], 1, 'Failed to verify required signature')
@@ -162,14 +168,14 @@ def test_vboot(u_boot_console):
# Create an RSA key pair
public_exponent = 65537
- util.cmd(cons, 'openssl genpkey -algorithm RSA -out %sdev.key '
- '-pkeyopt rsa_keygen_bits:2048 '
- '-pkeyopt rsa_keygen_pubexp:%d '
- '2>/dev/null' % (tmpdir, public_exponent))
+ util.run_and_log(cons, 'openssl genpkey -algorithm RSA -out %sdev.key '
+ '-pkeyopt rsa_keygen_bits:2048 '
+ '-pkeyopt rsa_keygen_pubexp:%d '
+ '2>/dev/null' % (tmpdir, public_exponent))
# Create a certificate containing the public key
- util.cmd(cons, 'openssl req -batch -new -x509 -key %sdev.key -out '
- '%sdev.crt' % (tmpdir, tmpdir))
+ util.run_and_log(cons, 'openssl req -batch -new -x509 -key %sdev.key -out '
+ '%sdev.crt' % (tmpdir, tmpdir))
# Create a number kernel image with zeroes
with open('%stest-kernel.bin' % tmpdir, 'w') as fd:
@@ -183,4 +189,6 @@ def test_vboot(u_boot_console):
test_with_algo('sha1')
test_with_algo('sha256')
finally:
+ # Go back to the original U-Boot with the correct dtb.
cons.config.dtb = old_dtb
+ cons.restart_uboot()
diff --git a/test/py/u_boot_console_base.py b/test/py/u_boot_console_base.py
index 4606ad4..ee9b928 100644
--- a/test/py/u_boot_console_base.py
+++ b/test/py/u_boot_console_base.py
@@ -223,13 +223,14 @@ class ConsoleBase(object):
for each command in a list.
Args:
- cmd: List of commands (each a string)
+ cmd: List of commands (each a string).
Returns:
- Combined output of all commands, as a string
+ A list of output strings from each command, one element for each
+ command.
"""
- output = ''
+ output = []
for cmd in cmds:
- output += self.run_command(cmd)
+ output.append(self.run_command(cmd))
return output
def ctrlc(self):
@@ -393,6 +394,11 @@ class ConsoleBase(object):
pass
self.p = None
+ def restart_uboot(self):
+ """Shut down and restart U-Boot."""
+ self.cleanup_spawn()
+ self.ensure_spawned()
+
def get_spawn_output(self):
"""Return the start-up output from U-Boot
diff --git a/test/py/u_boot_utils.py b/test/py/u_boot_utils.py
index e358c58..2ba4bae 100644
--- a/test/py/u_boot_utils.py
+++ b/test/py/u_boot_utils.py
@@ -158,7 +158,9 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False):
Args:
u_boot_console: A console connection to U-Boot.
- cmd: The command to run, as an array of argv[].
+ cmd: The command to run, as an array of argv[], or a string.
+ If a string, note that it is split up so that quoted spaces
+ will not be preserved. E.g. "fred and" becomes ['"fred', 'and"']
ignore_errors: Indicate whether to ignore errors. If True, the function
will simply return if the command cannot be executed or exits with
an error code, otherwise an exception will be raised if such
@@ -167,26 +169,15 @@ def run_and_log(u_boot_console, cmd, ignore_errors=False):
Returns:
The output as a string.
"""
-
+ if isinstance(cmd, str):
+ cmd = cmd.split()
runner = u_boot_console.log.get_runner(cmd[0], sys.stdout)
output = runner.run(cmd, ignore_errors=ignore_errors)
runner.close()
return output
-def cmd(u_boot_console, cmd_str):
- """Run a single command string and log its output.
-
- Args:
- u_boot_console: A console connection to U-Boot.
- cmd: The command to run, as a string.
-
- Returns:
- The output as a string.
- """
- return run_and_log(u_boot_console, cmd_str.split())
-
def run_and_log_expect_exception(u_boot_console, cmd, retcode, msg):
- """Run a command which is expected to fail.
+ """Run a command that is expected to fail.
This runs a command and checks that it fails with the expected return code
and exception method. If not, an exception is raised.
@@ -195,15 +186,17 @@ def run_and_log_expect_exception(u_boot_console, cmd, retcode, msg):
u_boot_console: A console connection to U-Boot.
cmd: The command to run, as an array of argv[].
retcode: Expected non-zero return code from the command.
- msg: String which should be contained within the command's output.
+ msg: String that should be contained within the command's output.
"""
try:
runner = u_boot_console.log.get_runner(cmd[0], sys.stdout)
runner.run(cmd)
except Exception as e:
+ assert(retcode == runner.exit_status)
assert(msg in runner.output)
else:
- raise Exception('Expected exception, but not raised')
+ raise Exception("Expected an exception with retcode %d message '%s',"
+ "but it was not raised" % (retcode, msg))
finally:
runner.close()
diff --git a/tools/mkimage.c b/tools/mkimage.c
index d993958..3c594a0 100644
--- a/tools/mkimage.c
+++ b/tools/mkimage.c
@@ -140,7 +140,7 @@ static void process_args(int argc, char **argv)
int opt;
while ((opt = getopt(argc, argv,
- "a:A:b:cC:d:D:e:Ef:Fk:K:ln:p:O:rR:qsT:vVx")) != -1) {
+ "a:A:b:c:C:d:D:e:Ef:Fk:K:ln:p:O:rR:qsT:vVx")) != -1) {
switch (opt) {
case 'a':
params.addr = strtoull(optarg, &ptr, 16);
diff --git a/tools/moveconfig.py b/tools/moveconfig.py
index d362923..aaa8e96 100755
--- a/tools/moveconfig.py
+++ b/tools/moveconfig.py
@@ -160,6 +160,8 @@ To see the complete list of supported options, run
"""
+import copy
+import difflib
import filecmp
import fnmatch
import multiprocessing
@@ -264,6 +266,16 @@ def get_make_cmd():
sys.exit('GNU Make not found')
return ret[0].rstrip()
+def get_all_defconfigs():
+ """Get all the defconfig files under the configs/ directory."""
+ defconfigs = []
+ for (dirpath, dirnames, filenames) in os.walk('configs'):
+ dirpath = dirpath[len('configs') + 1:]
+ for filename in fnmatch.filter(filenames, '*_defconfig'):
+ defconfigs.append(os.path.join(dirpath, filename))
+
+ return defconfigs
+
def color_text(color_enabled, color, string):
"""Return colored string."""
if color_enabled:
@@ -274,6 +286,28 @@ def color_text(color_enabled, color, string):
else:
return string
+def show_diff(a, b, file_path, color_enabled):
+ """Show unidified diff.
+
+ Arguments:
+ a: A list of lines (before)
+ b: A list of lines (after)
+ file_path: Path to the file
+ color_enabled: Display the diff in color
+ """
+
+ diff = difflib.unified_diff(a, b,
+ fromfile=os.path.join('a', file_path),
+ tofile=os.path.join('b', file_path))
+
+ for line in diff:
+ if line[0] == '-' and line[1] != '-':
+ print color_text(color_enabled, COLOR_RED, line),
+ elif line[0] == '+' and line[1] != '+':
+ print color_text(color_enabled, COLOR_GREEN, line),
+ else:
+ print line,
+
def update_cross_compile(color_enabled):
"""Update per-arch CROSS_COMPILE via environment variables
@@ -319,41 +353,123 @@ def update_cross_compile(color_enabled):
CROSS_COMPILE[arch] = cross_compile
-def cleanup_one_header(header_path, patterns, dry_run):
+def extend_matched_lines(lines, matched, pre_patterns, post_patterns, extend_pre,
+ extend_post):
+ """Extend matched lines if desired patterns are found before/after already
+ matched lines.
+
+ Arguments:
+ lines: A list of lines handled.
+ matched: A list of line numbers that have been already matched.
+ (will be updated by this function)
+ pre_patterns: A list of regular expression that should be matched as
+ preamble.
+ post_patterns: A list of regular expression that should be matched as
+ postamble.
+ extend_pre: Add the line number of matched preamble to the matched list.
+ extend_post: Add the line number of matched postamble to the matched list.
+ """
+ extended_matched = []
+
+ j = matched[0]
+
+ for i in matched:
+ if i == 0 or i < j:
+ continue
+ j = i
+ while j in matched:
+ j += 1
+ if j >= len(lines):
+ break
+
+ for p in pre_patterns:
+ if p.search(lines[i - 1]):
+ break
+ else:
+ # not matched
+ continue
+
+ for p in post_patterns:
+ if p.search(lines[j]):
+ break
+ else:
+ # not matched
+ continue
+
+ if extend_pre:
+ extended_matched.append(i - 1)
+ if extend_post:
+ extended_matched.append(j)
+
+ matched += extended_matched
+ matched.sort()
+
+def cleanup_one_header(header_path, patterns, options):
"""Clean regex-matched lines away from a file.
Arguments:
header_path: path to the cleaned file.
patterns: list of regex patterns. Any lines matching to these
patterns are deleted.
- dry_run: make no changes, but still display log.
+ options: option flags.
"""
with open(header_path) as f:
lines = f.readlines()
matched = []
for i, line in enumerate(lines):
+ if i - 1 in matched and lines[i - 1][-2:] == '\\\n':
+ matched.append(i)
+ continue
for pattern in patterns:
- m = pattern.search(line)
- if m:
- print '%s: %s: %s' % (header_path, i + 1, line),
+ if pattern.search(line):
matched.append(i)
break
- if dry_run or not matched:
+ if not matched:
+ return
+
+ # remove empty #ifdef ... #endif, successive blank lines
+ pattern_if = re.compile(r'#\s*if(def|ndef)?\W') # #if, #ifdef, #ifndef
+ pattern_elif = re.compile(r'#\s*el(if|se)\W') # #elif, #else
+ pattern_endif = re.compile(r'#\s*endif\W') # #endif
+ pattern_blank = re.compile(r'^\s*$') # empty line
+
+ while True:
+ old_matched = copy.copy(matched)
+ extend_matched_lines(lines, matched, [pattern_if],
+ [pattern_endif], True, True)
+ extend_matched_lines(lines, matched, [pattern_elif],
+ [pattern_elif, pattern_endif], True, False)
+ extend_matched_lines(lines, matched, [pattern_if, pattern_elif],
+ [pattern_blank], False, True)
+ extend_matched_lines(lines, matched, [pattern_blank],
+ [pattern_elif, pattern_endif], True, False)
+ extend_matched_lines(lines, matched, [pattern_blank],
+ [pattern_blank], True, False)
+ if matched == old_matched:
+ break
+
+ tolines = copy.copy(lines)
+
+ for i in reversed(matched):
+ tolines.pop(i)
+
+ show_diff(lines, tolines, header_path, options.color)
+
+ if options.dry_run:
return
with open(header_path, 'w') as f:
- for i, line in enumerate(lines):
- if not i in matched:
- f.write(line)
+ for line in tolines:
+ f.write(line)
-def cleanup_headers(configs, dry_run):
+def cleanup_headers(configs, options):
"""Delete config defines from board headers.
Arguments:
configs: A list of CONFIGs to remove.
- dry_run: make no changes, but still display log.
+ options: option flags.
"""
while True:
choice = raw_input('Clean up headers? [y/n]: ').lower()
@@ -371,10 +487,85 @@ def cleanup_headers(configs, dry_run):
for dir in 'include', 'arch', 'board':
for (dirpath, dirnames, filenames) in os.walk(dir):
+ if dirpath == os.path.join('include', 'generated'):
+ continue
for filename in filenames:
if not fnmatch.fnmatch(filename, '*~'):
cleanup_one_header(os.path.join(dirpath, filename),
- patterns, dry_run)
+ patterns, options)
+
+def cleanup_one_extra_option(defconfig_path, configs, options):
+ """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in one defconfig file.
+
+ Arguments:
+ defconfig_path: path to the cleaned defconfig file.
+ configs: A list of CONFIGs to remove.
+ options: option flags.
+ """
+
+ start = 'CONFIG_SYS_EXTRA_OPTIONS="'
+ end = '"\n'
+
+ with open(defconfig_path) as f:
+ lines = f.readlines()
+
+ for i, line in enumerate(lines):
+ if line.startswith(start) and line.endswith(end):
+ break
+ else:
+ # CONFIG_SYS_EXTRA_OPTIONS was not found in this defconfig
+ return
+
+ old_tokens = line[len(start):-len(end)].split(',')
+ new_tokens = []
+
+ for token in old_tokens:
+ pos = token.find('=')
+ if not (token[:pos] if pos >= 0 else token) in configs:
+ new_tokens.append(token)
+
+ if new_tokens == old_tokens:
+ return
+
+ tolines = copy.copy(lines)
+
+ if new_tokens:
+ tolines[i] = start + ','.join(new_tokens) + end
+ else:
+ tolines.pop(i)
+
+ show_diff(lines, tolines, defconfig_path, options.color)
+
+ if options.dry_run:
+ return
+
+ with open(defconfig_path, 'w') as f:
+ for line in tolines:
+ f.write(line)
+
+def cleanup_extra_options(configs, options):
+ """Delete config defines in CONFIG_SYS_EXTRA_OPTIONS in defconfig files.
+
+ Arguments:
+ configs: A list of CONFIGs to remove.
+ options: option flags.
+ """
+ while True:
+ choice = raw_input('Clean up CONFIG_SYS_EXTRA_OPTIONS? [y/n]: ').lower()
+ print choice
+ if choice == 'y' or choice == 'n':
+ break
+
+ if choice == 'n':
+ return
+
+ configs = [ config[len('CONFIG_'):] for config in configs ]
+
+ defconfigs = get_all_defconfigs()
+
+ for defconfig in defconfigs:
+ cleanup_one_extra_option(os.path.join('configs', defconfig), configs,
+ options)
### classes ###
class Progress:
@@ -971,12 +1162,7 @@ def move_config(configs, options):
sys.exit('%s - defconfig does not exist. Stopping.' %
defconfigs[i])
else:
- # All the defconfig files to be processed
- defconfigs = []
- for (dirpath, dirnames, filenames) in os.walk('configs'):
- dirpath = dirpath[len('configs') + 1:]
- for filename in fnmatch.filter(filenames, '*_defconfig'):
- defconfigs.append(os.path.join(dirpath, filename))
+ defconfigs = get_all_defconfigs()
progress = Progress(len(defconfigs))
slots = Slots(configs, options, progress, reference_src_dir)
@@ -1040,15 +1226,14 @@ def main():
check_top_directory()
- check_clean_directory()
-
- update_cross_compile(options.color)
-
if not options.cleanup_headers_only:
+ check_clean_directory()
+ update_cross_compile(options.color)
move_config(configs, options)
if configs:
- cleanup_headers(configs, options.dry_run)
+ cleanup_headers(configs, options)
+ cleanup_extra_options(configs, options)
if __name__ == '__main__':
main()