[U-Boot] [PATCH v2 0/7] Some improvements related to build system

- Move GENERIC_BOARD CONFIGs - Remove arch/m68k/lib/board.c - Clean ups CONFIG_SYS_MALLOC_F and CONFIG_SYS_MALLOC_F_LEN - Move BCM283x code into arch/arm/mach-bcm283x
Masahiro Yamada (7): generic-board: move __HAVE_ARCH_GENERIC_BOARD to Kconfig generic-board: select SYS_GENERIC_BOARD for some architectures m68k: remove arch/m68k/lib/board.c malloc_f: remove redundant defalut values of CONFIG_SYS_MALLOC_F_LEN malloc_f: enable SYS_MALLOC_F by default if DM is on ARM: bcm283x: merge BCM2835/BCM2836 directories into mach-bcm283x ARM: bcm283x: move SoC headers to mach-bcm283x/include/mach
Kconfig | 2 +- Makefile | 2 +- README | 6 +- arch/Kconfig | 26 + arch/arc/config.mk | 3 - arch/arc/include/asm/config.h | 1 - arch/arm/Kconfig | 15 +- arch/arm/Makefile | 1 + arch/arm/config.mk | 3 - arch/arm/cpu/arm1176/Makefile | 2 - arch/arm/cpu/arm1176/bcm2835/Kconfig | 12 - arch/arm/cpu/armv7/Makefile | 1 - arch/arm/cpu/armv7/bcm2835/Makefile | 13 - arch/arm/cpu/armv7/exynos/Kconfig | 6 - arch/arm/cpu/armv7/omap3/Kconfig | 6 - arch/arm/mach-bcm283x/Kconfig | 40 ++ .../{cpu/arm1176/bcm2835 => mach-bcm283x}/Makefile | 2 +- .../include/mach}/gpio.h | 0 .../include/mach}/mbox.h | 0 .../include/mach}/sdhci.h | 0 .../include/mach}/timer.h | 0 .../include/mach}/wdog.h | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/init.c | 0 .../bcm2835 => mach-bcm283x}/lowlevel_init.S | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/mbox.c | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/reset.c | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/timer.c | 0 arch/arm/mach-tegra/Kconfig | 3 - arch/arm/mach-uniphier/Kconfig | 6 - arch/avr32/config.mk | 3 - arch/blackfin/config.mk | 3 - arch/blackfin/include/asm/config.h | 1 - arch/m68k/config.mk | 3 - arch/m68k/include/asm/config.h | 1 - arch/m68k/lib/Makefile | 3 - arch/m68k/lib/board.c | 642 --------------------- arch/microblaze/config.mk | 1 - arch/microblaze/include/asm/config.h | 1 - arch/mips/config.mk | 2 - arch/nios2/config.mk | 2 - arch/nios2/include/asm/config.h | 1 - arch/powerpc/config.mk | 3 - arch/sandbox/config.mk | 5 +- arch/x86/Kconfig | 3 - arch/x86/config.mk | 3 - arch/x86/include/asm/config.h | 1 - board/amcc/canyonlands/Kconfig | 8 - board/raspberrypi/rpi/Kconfig | 15 - board/raspberrypi/rpi_2/Kconfig | 15 - board/ti/am335x/Kconfig | 6 - configs/Linksprite_pcDuino3_fdt_defconfig | 2 - configs/am335x_igep0033_defconfig | 2 - configs/cm_fx6_defconfig | 2 - configs/cm_t335_defconfig | 2 - configs/gwventana_defconfig | 1 - configs/mx6dlsabreauto_defconfig | 2 - configs/mx6qsabreauto_defconfig | 2 - configs/mx6qsabresd_defconfig | 2 - configs/mx6sxsabresd_defconfig | 2 - configs/nokia_rx51_defconfig | 2 - configs/pcm051_rev1_defconfig | 2 - configs/pcm051_rev3_defconfig | 2 - configs/pengwyn_defconfig | 2 - configs/pepper_defconfig | 2 - configs/rpi_2_defconfig | 3 +- configs/rpi_defconfig | 3 +- configs/s5p_goni_defconfig | 2 - configs/sandbox_defconfig | 2 - configs/smdkc100_defconfig | 2 - configs/snapper9260_defconfig | 2 - configs/snapper9g20_defconfig | 2 - configs/stv0991_defconfig | 1 - doc/README.generic-board | 12 +- drivers/mmc/bcm2835_sdhci.c | 4 +- include/configs/amcore.h | 2 - include/configs/dbau1x00.h | 1 - include/configs/malta.h | 1 - include/configs/pb1x00.h | 1 - include/configs/qemu-mips.h | 1 - include/configs/qemu-mips64.h | 1 - include/configs/rcar-gen2-common.h | 2 - include/configs/vct.h | 1 - 82 files changed, 89 insertions(+), 853 deletions(-) delete mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig delete mode 100644 arch/arm/cpu/armv7/bcm2835/Makefile create mode 100644 arch/arm/mach-bcm283x/Kconfig rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/Makefile (72%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/gpio.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/mbox.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/sdhci.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/timer.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/wdog.h (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/init.c (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/lowlevel_init.S (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/mbox.c (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/reset.c (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/timer.c (100%) delete mode 100644 arch/m68k/lib/board.c delete mode 100644 board/raspberrypi/rpi/Kconfig delete mode 100644 board/raspberrypi/rpi_2/Kconfig

Move the option to Kconfig renaming it to CONFIG_HAVE_GENERIC_BOARD.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
Changes in v2: None
Makefile | 2 +- README | 6 +++--- arch/Kconfig | 14 ++++++++++++++ arch/arc/config.mk | 3 --- arch/arm/config.mk | 3 --- arch/avr32/config.mk | 3 --- arch/blackfin/config.mk | 3 --- arch/m68k/config.mk | 3 --- arch/microblaze/config.mk | 1 - arch/mips/config.mk | 2 -- arch/nios2/config.mk | 2 -- arch/powerpc/config.mk | 3 --- arch/sandbox/config.mk | 3 --- arch/x86/config.mk | 3 --- doc/README.generic-board | 12 +++++++----- 15 files changed, 25 insertions(+), 38 deletions(-)
diff --git a/Makefile b/Makefile index 73e1362..f63748a 100644 --- a/Makefile +++ b/Makefile @@ -1163,7 +1163,7 @@ prepare2: prepare3 outputmakefile
prepare1: prepare2 $(version_h) $(timestamp_h) \ include/config/auto.conf -ifeq ($(__HAVE_ARCH_GENERIC_BOARD),) +ifeq ($(CONFIG_HAVE_GENERIC_BOARD),) ifeq ($(CONFIG_SYS_GENERIC_BOARD),y) @echo >&2 " Your architecture does not support generic board." @echo >&2 " Please undefine CONFIG_SYS_GENERIC_BOARD in your board config file." diff --git a/README b/README index b0124d6..5d57eb9 100644 --- a/README +++ b/README @@ -4190,9 +4190,9 @@ Configuration Settings: to this new framework over time. Defining this will disable the arch/foo/lib/board.c file and use common/board_f.c and common/board_r.c instead. To use this option your architecture - must support it (i.e. must define __HAVE_ARCH_GENERIC_BOARD in - its config.mk file). If you find problems enabling this option on - your board please report the problem and send patches! + must support it (i.e. must select HAVE_GENERIC_BOARD in arch/Kconfig). + If you find problems enabling this option on your board please report + the problem and send patches!
- CONFIG_OMAP_PLATFORM_RESET_TIME_MAX_USEC (OMAP only) This is set by OMAP boards for the max time that reset should diff --git a/arch/Kconfig b/arch/Kconfig index 3d419bc..cdd1662 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1,3 +1,6 @@ +config HAVE_GENERIC_BOARD + bool + choice prompt "Architecture select" default SANDBOX @@ -5,34 +8,42 @@ choice config ARC bool "ARC architecture" select HAVE_PRIVATE_LIBGCC + select HAVE_GENERIC_BOARD
config ARM bool "ARM architecture" select HAVE_PRIVATE_LIBGCC + select HAVE_GENERIC_BOARD select SUPPORT_OF_CONTROL
config AVR32 bool "AVR32 architecture" + select HAVE_GENERIC_BOARD
config BLACKFIN bool "Blackfin architecture" + select HAVE_GENERIC_BOARD
config M68K bool "M68000 architecture" + select HAVE_GENERIC_BOARD
config MICROBLAZE bool "MicroBlaze architecture" + select HAVE_GENERIC_BOARD select SUPPORT_OF_CONTROL
config MIPS bool "MIPS architecture" select HAVE_PRIVATE_LIBGCC + select HAVE_GENERIC_BOARD
config NDS32 bool "NDS32 architecture"
config NIOS2 bool "Nios II architecture" + select HAVE_GENERIC_BOARD
config OPENRISC bool "OpenRISC architecture" @@ -40,10 +51,12 @@ config OPENRISC config PPC bool "PowerPC architecture" select HAVE_PRIVATE_LIBGCC + select HAVE_GENERIC_BOARD select SUPPORT_OF_CONTROL
config SANDBOX bool "Sandbox" + select HAVE_GENERIC_BOARD select SUPPORT_OF_CONTROL
config SH @@ -56,6 +69,7 @@ config SPARC config X86 bool "x86 architecture" select HAVE_PRIVATE_LIBGCC + select HAVE_GENERIC_BOARD select SUPPORT_OF_CONTROL
endchoice diff --git a/arch/arc/config.mk b/arch/arc/config.mk index 4fcd407..04c034b 100644 --- a/arch/arc/config.mk +++ b/arch/arc/config.mk @@ -57,6 +57,3 @@ LDFLAGS_FINAL += -pie
# Load address for standalone apps CONFIG_STANDALONE_LOAD_ADDR ?= 0x82000000 - -# Support generic board on ARC -__HAVE_ARCH_GENERIC_BOARD := y diff --git a/arch/arm/config.mk b/arch/arm/config.mk index 0667984..c005ce4 100644 --- a/arch/arm/config.mk +++ b/arch/arm/config.mk @@ -19,9 +19,6 @@ PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections \ PLATFORM_RELFLAGS += $(call cc-option, -msoft-float) \ $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
-# Support generic board on ARM -__HAVE_ARCH_GENERIC_BOARD := y - PLATFORM_CPPFLAGS += -D__ARM__
# Choose between ARM/Thumb instruction sets diff --git a/arch/avr32/config.mk b/arch/avr32/config.mk index 8252f59..469185e 100644 --- a/arch/avr32/config.mk +++ b/arch/avr32/config.mk @@ -9,9 +9,6 @@ ifeq ($(CROSS_COMPILE),) CROSS_COMPILE := avr32-linux- endif
-# avr32 has generic board support -__HAVE_ARCH_GENERIC_BOARD := y - CONFIG_STANDALONE_LOAD_ADDR ?= 0x00000000
PLATFORM_RELFLAGS += -ffixed-r5 -fPIC -mno-init-got -mrelax diff --git a/arch/blackfin/config.mk b/arch/blackfin/config.mk index 584b38b..7b17b75 100644 --- a/arch/blackfin/config.mk +++ b/arch/blackfin/config.mk @@ -20,9 +20,6 @@ CONFIG_BFIN_CPU := $(strip $(CONFIG_BFIN_CPU:"%"=%)) endif CONFIG_BFIN_BOOT_MODE := $(strip $(CONFIG_BFIN_BOOT_MODE:"%"=%))
-# Support generic board on Blackfin -__HAVE_ARCH_GENERIC_BOARD := y - PLATFORM_RELFLAGS += -ffixed-P3 -fomit-frame-pointer -mno-fdpic
LDFLAGS_FINAL += --gc-sections diff --git a/arch/m68k/config.mk b/arch/m68k/config.mk index a629b68..3b3a7e8 100644 --- a/arch/m68k/config.mk +++ b/arch/m68k/config.mk @@ -11,9 +11,6 @@ endif
CONFIG_STANDALONE_LOAD_ADDR ?= 0x20000
-# Support generic board on m68k -__HAVE_ARCH_GENERIC_BOARD := y - PLATFORM_CPPFLAGS += -D__M68K__ PLATFORM_LDFLAGS += -n PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections diff --git a/arch/microblaze/config.mk b/arch/microblaze/config.mk index 2b817be..e7a3477 100644 --- a/arch/microblaze/config.mk +++ b/arch/microblaze/config.mk @@ -19,4 +19,3 @@ PLATFORM_CPPFLAGS += -ffixed-r31 -D__microblaze__ ifeq ($(CONFIG_SPL_BUILD),) PLATFORM_CPPFLAGS += -fPIC endif -__HAVE_ARCH_GENERIC_BOARD := y diff --git a/arch/mips/config.mk b/arch/mips/config.mk index 4dc88f4..52e28f2 100644 --- a/arch/mips/config.mk +++ b/arch/mips/config.mk @@ -43,8 +43,6 @@ PLATFORM_CPPFLAGS += $(cpuflags-y)
PLATFORM_CPPFLAGS += -D__MIPS__
-__HAVE_ARCH_GENERIC_BOARD := y - # # From Linux arch/mips/Makefile # diff --git a/arch/nios2/config.mk b/arch/nios2/config.mk index 9b7c56d..82bd887 100644 --- a/arch/nios2/config.mk +++ b/arch/nios2/config.mk @@ -17,5 +17,3 @@ PLATFORM_CPPFLAGS += -G0
LDFLAGS_FINAL += --gc-sections PLATFORM_RELFLAGS += -ffunction-sections -fdata-sections - -__HAVE_ARCH_GENERIC_BOARD := y diff --git a/arch/powerpc/config.mk b/arch/powerpc/config.mk index fec02f2..07b11c6 100644 --- a/arch/powerpc/config.mk +++ b/arch/powerpc/config.mk @@ -17,9 +17,6 @@ PLATFORM_RELFLAGS += -fpic -mrelocatable -ffunction-sections -fdata-sections \ PLATFORM_CPPFLAGS += -D__powerpc__ -ffixed-r2 PLATFORM_LDFLAGS += -n
-# Support generic board on PPC -__HAVE_ARCH_GENERIC_BOARD := y - # # When cross-compiling on NetBSD, we have to define __PPC__ or else we # will pick up a va_list declaration that is incompatible with the diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index 7b84f02..e477a84 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -16,9 +16,6 @@ PLATFORM_CPPFLAGS += $(shell sdl-config --cflags) endif endif
-# Support generic board on sandbox -__HAVE_ARCH_GENERIC_BOARD := y - cmd_u-boot__ = $(CC) -o $@ -T u-boot.lds \ -Wl,--start-group $(u-boot-main) -Wl,--end-group \ $(PLATFORM_LIBS) -Wl,-Map -Wl,u-boot.map diff --git a/arch/x86/config.mk b/arch/x86/config.mk index bb2da46..999143e 100644 --- a/arch/x86/config.mk +++ b/arch/x86/config.mk @@ -17,9 +17,6 @@ PLATFORM_CPPFLAGS += $(PF_CPPFLAGS_X86) PLATFORM_CPPFLAGS += -fno-dwarf2-cfi-asm PLATFORM_CPPFLAGS += -march=i386 -m32
-# Support generic board on x86 -__HAVE_ARCH_GENERIC_BOARD := y - PLATFORM_RELFLAGS += -ffunction-sections -fvisibility=hidden
PLATFORM_LDFLAGS += --emit-relocs -Bsymbolic -Bsymbolic-functions -m elf_i386 diff --git a/doc/README.generic-board b/doc/README.generic-board index 37c1b03..bd8eae1 100644 --- a/doc/README.generic-board +++ b/doc/README.generic-board @@ -44,16 +44,18 @@ The following architectures are supported now:
arc arm + avr32 + blackfin + m68k + microblaze mips + nios2 powerpc sandbox x86
-If your architecture is not supported, you need to adjust your -arch/<arch>/config.mk file to include: - - __HAVE_ARCH_GENERIC_BOARD := y - +If your architecture is not supported, you need to select +HAVE_GENERIC_BOARD in arch/Kconfig and test it with a suitable board, as follows.

We have done with the generic board conversion for all the boards of ARC, Blackfin, M68000, MicroBlaze, MIPS, NIOS2, Sandbox, X86.
Let's select SYS_GENERIC_BOARD for those architectures, so we can tell which architecture has finished the conversion at a glance.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
Changes in v2: None
arch/Kconfig | 12 ++++++++++++ arch/arc/include/asm/config.h | 1 - arch/blackfin/include/asm/config.h | 1 - arch/m68k/include/asm/config.h | 1 - arch/microblaze/include/asm/config.h | 1 - arch/nios2/include/asm/config.h | 1 - arch/sandbox/config.mk | 2 +- arch/x86/include/asm/config.h | 1 - include/configs/amcore.h | 2 -- include/configs/dbau1x00.h | 1 - include/configs/malta.h | 1 - include/configs/pb1x00.h | 1 - include/configs/qemu-mips.h | 1 - include/configs/qemu-mips64.h | 1 - include/configs/vct.h | 1 - 15 files changed, 13 insertions(+), 15 deletions(-)
diff --git a/arch/Kconfig b/arch/Kconfig index cdd1662..ca617e7 100644 --- a/arch/Kconfig +++ b/arch/Kconfig @@ -1,6 +1,10 @@ config HAVE_GENERIC_BOARD bool
+config SYS_GENERIC_BOARD + bool + depends on HAVE_GENERIC_BOARD + choice prompt "Architecture select" default SANDBOX @@ -9,6 +13,7 @@ config ARC bool "ARC architecture" select HAVE_PRIVATE_LIBGCC select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD
config ARM bool "ARM architecture" @@ -23,20 +28,24 @@ config AVR32 config BLACKFIN bool "Blackfin architecture" select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD
config M68K bool "M68000 architecture" select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD
config MICROBLAZE bool "MicroBlaze architecture" select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD select SUPPORT_OF_CONTROL
config MIPS bool "MIPS architecture" select HAVE_PRIVATE_LIBGCC select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD
config NDS32 bool "NDS32 architecture" @@ -44,6 +53,7 @@ config NDS32 config NIOS2 bool "Nios II architecture" select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD
config OPENRISC bool "OpenRISC architecture" @@ -57,6 +67,7 @@ config PPC config SANDBOX bool "Sandbox" select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD select SUPPORT_OF_CONTROL
config SH @@ -70,6 +81,7 @@ config X86 bool "x86 architecture" select HAVE_PRIVATE_LIBGCC select HAVE_GENERIC_BOARD + select SYS_GENERIC_BOARD select SUPPORT_OF_CONTROL
endchoice diff --git a/arch/arc/include/asm/config.h b/arch/arc/include/asm/config.h index b4e9099..8936f5c 100644 --- a/arch/arc/include/asm/config.h +++ b/arch/arc/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef __ASM_ARC_CONFIG_H_ #define __ASM_ARC_CONFIG_H_
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_SYS_GENERIC_GLOBAL_DATA #define CONFIG_SYS_BOOT_RAMDISK_HIGH #define CONFIG_ARCH_EARLY_INIT_R diff --git a/arch/blackfin/include/asm/config.h b/arch/blackfin/include/asm/config.h index 73cbfa2..d2cf71b 100644 --- a/arch/blackfin/include/asm/config.h +++ b/arch/blackfin/include/asm/config.h @@ -174,7 +174,6 @@ } #endif
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_CPUINFO #define CONFIG_ARCH_MISC_INIT
diff --git a/arch/m68k/include/asm/config.h b/arch/m68k/include/asm/config.h index 7590842..e1458ac 100644 --- a/arch/m68k/include/asm/config.h +++ b/arch/m68k/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_SYS_GENERIC_GLOBAL_DATA
#define CONFIG_NEEDS_MANUAL_RELOC diff --git a/arch/microblaze/include/asm/config.h b/arch/microblaze/include/asm/config.h index 32fd636..4af408a 100644 --- a/arch/microblaze/include/asm/config.h +++ b/arch/microblaze/include/asm/config.h @@ -12,6 +12,5 @@ #endif
#define CONFIG_NR_DRAM_BANKS 1 -#define CONFIG_SYS_GENERIC_BOARD
#endif diff --git a/arch/nios2/include/asm/config.h b/arch/nios2/include/asm/config.h index 476a32b..9c13848 100644 --- a/arch/nios2/include/asm/config.h +++ b/arch/nios2/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_SYS_GENERIC_GLOBAL_DATA
#endif diff --git a/arch/sandbox/config.mk b/arch/sandbox/config.mk index e477a84..b05a90f 100644 --- a/arch/sandbox/config.mk +++ b/arch/sandbox/config.mk @@ -2,7 +2,7 @@ # SPDX-License-Identifier: GPL-2.0+
PLATFORM_CPPFLAGS += -D__SANDBOX__ -U_FORTIFY_SOURCE -PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM -DCONFIG_SYS_GENERIC_BOARD +PLATFORM_CPPFLAGS += -DCONFIG_ARCH_MAP_SYSMEM PLATFORM_LIBS += -lrt
# Define this to avoid linking with SDL, which requires SDL libraries diff --git a/arch/x86/include/asm/config.h b/arch/x86/include/asm/config.h index ff15828..3a891ba 100644 --- a/arch/x86/include/asm/config.h +++ b/arch/x86/include/asm/config.h @@ -7,7 +7,6 @@ #ifndef _ASM_CONFIG_H_ #define _ASM_CONFIG_H_
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_LMB #define CONFIG_SYS_BOOT_RAMDISK_HIGH
diff --git a/include/configs/amcore.h b/include/configs/amcore.h index 2a785b3..37aa124 100644 --- a/include/configs/amcore.h +++ b/include/configs/amcore.h @@ -12,8 +12,6 @@ #define CONFIG_AMCORE #define CONFIG_HOSTNAME AMCORE
-#define CONFIG_SYS_GENERIC_BOARD - #define CONFIG_MCF530x #define CONFIG_M5307
diff --git a/include/configs/dbau1x00.h b/include/configs/dbau1x00.h index 8a7447d..56317ef 100644 --- a/include/configs/dbau1x00.h +++ b/include/configs/dbau1x00.h @@ -15,7 +15,6 @@ #define CONFIG_DBAU1X00 1 #define CONFIG_SOC_AU1X00 1 /* alchemy series cpu */
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO
#ifdef CONFIG_DBAU1000 diff --git a/include/configs/malta.h b/include/configs/malta.h index 354672e..9445c9b 100644 --- a/include/configs/malta.h +++ b/include/configs/malta.h @@ -14,7 +14,6 @@ * System configuration */ #define CONFIG_MALTA -#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_DISPLAY_BOARDINFO
diff --git a/include/configs/pb1x00.h b/include/configs/pb1x00.h index 61e6af3..a1926bb 100644 --- a/include/configs/pb1x00.h +++ b/include/configs/pb1x00.h @@ -15,7 +15,6 @@ #define CONFIG_PB1X00 1 #define CONFIG_SOC_AU1X00 1 /* alchemy series cpu */
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO
#ifdef CONFIG_PB1000 diff --git a/include/configs/qemu-mips.h b/include/configs/qemu-mips.h index 1548d3e..75da8a1 100644 --- a/include/configs/qemu-mips.h +++ b/include/configs/qemu-mips.h @@ -14,7 +14,6 @@
#define CONFIG_QEMU_MIPS
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO #define CONFIG_MISC_INIT_R
diff --git a/include/configs/qemu-mips64.h b/include/configs/qemu-mips64.h index 61cafad..b07ca4e 100644 --- a/include/configs/qemu-mips64.h +++ b/include/configs/qemu-mips64.h @@ -14,7 +14,6 @@
#define CONFIG_QEMU_MIPS
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO #define CONFIG_MISC_INIT_R
diff --git a/include/configs/vct.h b/include/configs/vct.h index 83e4163..88e58ec 100644 --- a/include/configs/vct.h +++ b/include/configs/vct.h @@ -25,7 +25,6 @@ #ifndef __CONFIG_H #define __CONFIG_H
-#define CONFIG_SYS_GENERIC_BOARD #define CONFIG_DISPLAY_BOARDINFO
#define CPU_CLOCK_RATE 324000000 /* Clock for the MIPS core */

All the M68000 boards have switched to Generic Board. This file is no longer necessary.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com Cc: Huan Wang alison.wang@freescale.com Cc: Angelo Dureghello angelo@sysam.it ---
Changes in v2: None
arch/m68k/lib/Makefile | 3 - arch/m68k/lib/board.c | 642 ------------------------------------------------- 2 files changed, 645 deletions(-) delete mode 100644 arch/m68k/lib/board.c
diff --git a/arch/m68k/lib/Makefile b/arch/m68k/lib/Makefile index d0e1a84..73d40bd 100644 --- a/arch/m68k/lib/Makefile +++ b/arch/m68k/lib/Makefile @@ -5,9 +5,6 @@ # SPDX-License-Identifier: GPL-2.0+ #
-ifndef CONFIG_SYS_GENERIC_BOARD -obj-y += board.o -endif obj-$(CONFIG_CMD_BOOTM) += bootm.o obj-y += cache.o obj-y += interrupts.o diff --git a/arch/m68k/lib/board.c b/arch/m68k/lib/board.c deleted file mode 100644 index 9caff73..0000000 --- a/arch/m68k/lib/board.c +++ /dev/null @@ -1,642 +0,0 @@ -/* - * (C) Copyright 2003 - * Josef Baumgartner josef.baumgartner@telex.de - * - * (C) Copyright 2000-2002 - * Wolfgang Denk, DENX Software Engineering, wd@denx.de. - * - * SPDX-License-Identifier: GPL-2.0+ - */ - -#include <common.h> -#include <watchdog.h> -#include <command.h> -#include <malloc.h> -#include <stdio_dev.h> -#include <linux/compiler.h> - -#include <asm/immap.h> - -#if defined(CONFIG_CMD_IDE) -#include <ide.h> -#endif -#if defined(CONFIG_CMD_SCSI) -#include <scsi.h> -#endif -#if defined(CONFIG_CMD_KGDB) -#include <kgdb.h> -#endif -#ifdef CONFIG_STATUS_LED -#include <status_led.h> -#endif -#include <net.h> -#include <serial.h> -#ifdef CONFIG_SYS_ALLOC_DPRAM -#include <commproc.h> -#endif -#include <version.h> - -#if defined(CONFIG_HARD_I2C) || \ - defined(CONFIG_SYS_I2C) -#include <i2c.h> -#endif - -#ifdef CONFIG_CMD_SPI -#include <spi.h> -#endif - -#ifdef CONFIG_BITBANGMII -#include <miiphy.h> -#endif - -#include <nand.h> - -DECLARE_GLOBAL_DATA_PTR; - -static char *failed = "*** failed ***\n"; - -#include <environment.h> - -extern ulong __init_end; -extern ulong __bss_end; - -#if defined(CONFIG_WATCHDOG) -# undef INIT_FUNC_WATCHDOG_INIT -# define INIT_FUNC_WATCHDOG_INIT watchdog_init, -# define WATCHDOG_DISABLE watchdog_disable - -extern int watchdog_init(void); -extern int watchdog_disable(void); -#else -# define INIT_FUNC_WATCHDOG_INIT /* undef */ -# define WATCHDOG_DISABLE /* undef */ -#endif /* CONFIG_WATCHDOG */ - -ulong monitor_flash_len; - -/************************************************************************ - * Utilities * - ************************************************************************ - */ - -/* - * All attempts to come up with a "common" initialization sequence - * that works for all boards and architectures failed: some of the - * requirements are just _too_ different. To get rid of the resulting - * mess of board dependend #ifdef'ed code we now make the whole - * initialization sequence configurable to the user. - * - * The requirements for any new initalization function is simple: it - * receives a pointer to the "global data" structure as it's only - * argument, and returns an integer return code, where 0 means - * "continue" and != 0 means "fatal error, hang the system". - */ -typedef int (init_fnc_t) (void); - -/************************************************************************ - * Init Utilities - ************************************************************************ - * Some of this code should be moved into the core functions, - * but let's get it working (again) first... - */ - -static int init_baudrate (void) -{ - gd->baudrate = getenv_ulong("baudrate", 10, CONFIG_BAUDRATE); - return 0; -} - -/***********************************************************************/ - -static int init_func_ram (void) -{ - int board_type = 0; /* use dummy arg */ - puts ("DRAM: "); - - if ((gd->ram_size = initdram (board_type)) > 0) { - print_size (gd->ram_size, "\n"); - return (0); - } - puts (failed); - return (1); -} - -/***********************************************************************/ - -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) -static int init_func_i2c (void) -{ - puts ("I2C: "); -#ifdef CONFIG_SYS_I2C - i2c_init_all(); -#else - i2c_init (CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SLAVE); -#endif - puts ("ready\n"); - return (0); -} -#endif - -#if defined(CONFIG_HARD_SPI) -static int init_func_spi (void) -{ - puts ("SPI: "); - spi_init (); - puts ("ready\n"); - return (0); -} -#endif - -/***********************************************************************/ - -/************************************************************************ - * Initialization sequence * - ************************************************************************ - */ - -init_fnc_t *init_sequence[] = { - get_clocks, - env_init, - init_baudrate, - serial_init, - console_init_f, - display_options, - checkcpu, - checkboard, -#if defined(CONFIG_HARD_I2C) || defined(CONFIG_SYS_I2C) - init_func_i2c, -#endif -#if defined(CONFIG_HARD_SPI) - init_func_spi, -#endif - init_func_ram, -#if defined(CONFIG_SYS_DRAM_TEST) - testdram, -#endif /* CONFIG_SYS_DRAM_TEST */ - INIT_FUNC_WATCHDOG_INIT - NULL, /* Terminate this list */ -}; - - -/************************************************************************ - * - * This is the first part of the initialization sequence that is - * implemented in C, but still running from ROM. - * - * The main purpose is to provide a (serial) console interface as - * soon as possible (so we can see any error messages), and to - * initialize the RAM so that we can relocate the monitor code to - * RAM. - * - * Be aware of the restrictions: global data is read-only, BSS is not - * initialized, and stack space is limited to a few kB. - * - ************************************************************************ - */ - -void -board_init_f (ulong bootflag) -{ - bd_t *bd; - ulong len, addr, addr_sp; - ulong *paddr; - gd_t *id; - init_fnc_t **init_fnc_ptr; -#ifdef CONFIG_PRAM - ulong reg; -#endif - - /* Pointer is writable since we allocated a register for it */ - gd = (gd_t *) (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_GBL_DATA_OFFSET); - /* compiler optimization barrier needed for GCC >= 3.4 */ - __asm__ __volatile__("": : :"memory"); - - /* Clear initial global data */ - memset ((void *) gd, 0, sizeof (gd_t)); - - for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { - if ((*init_fnc_ptr)() != 0) { - hang (); - } - } - - /* - * Now that we have DRAM mapped and working, we can - * relocate the code and continue running from DRAM. - * - * Reserve memory at end of RAM for (top down in that order): - * - protected RAM - * - LCD framebuffer - * - monitor code - * - board info struct - */ - len = (ulong)&__bss_end - CONFIG_SYS_MONITOR_BASE; - - addr = CONFIG_SYS_SDRAM_BASE + gd->ram_size; - -#ifdef CONFIG_LOGBUFFER - /* reserve kernel log buffer */ - addr -= (LOGBUFF_RESERVE); - debug ("Reserving %dk for kernel logbuffer at %08lx\n", LOGBUFF_LEN, addr); -#endif - -#ifdef CONFIG_PRAM - /* - * reserve protected RAM - */ - reg = getenv_ulong("pram", 10, CONFIG_PRAM); - addr -= (reg << 10); /* size is in kB */ - debug ("Reserving %ldk for protected RAM at %08lx\n", reg, addr); -#endif /* CONFIG_PRAM */ - - /* round down to next 4 kB limit */ - addr &= ~(4096 - 1); - debug ("Top of RAM usable for U-Boot at: %08lx\n", addr); - -#ifdef CONFIG_LCD -#ifdef CONFIG_FB_ADDR - gd->fb_base = CONFIG_FB_ADDR; -#else - /* reserve memory for LCD display (always full pages) */ - addr = lcd_setmem (addr); - gd->fb_base = addr; -#endif /* CONFIG_FB_ADDR */ -#endif /* CONFIG_LCD */ - - /* - * reserve memory for U-Boot code, data & bss - * round down to next 4 kB limit - */ - addr -= len; - addr &= ~(4096 - 1); - - debug ("Reserving %ldk for U-Boot at: %08lx\n", len >> 10, addr); - - /* - * reserve memory for malloc() arena - */ - addr_sp = addr - TOTAL_MALLOC_LEN; - debug ("Reserving %dk for malloc() at: %08lx\n", - TOTAL_MALLOC_LEN >> 10, addr_sp); - - /* - * (permanently) allocate a Board Info struct - * and a permanent copy of the "global" data - */ - addr_sp -= sizeof (bd_t); - bd = (bd_t *) addr_sp; - gd->bd = bd; - debug ("Reserving %zu Bytes for Board Info at: %08lx\n", - sizeof (bd_t), addr_sp); - addr_sp -= sizeof (gd_t); - id = (gd_t *) addr_sp; - debug ("Reserving %zu Bytes for Global Data at: %08lx\n", - sizeof (gd_t), addr_sp); - - /* Reserve memory for boot params. */ - addr_sp -= CONFIG_SYS_BOOTPARAMS_LEN; - bd->bi_boot_params = addr_sp; - debug ("Reserving %dk for boot parameters at: %08lx\n", - CONFIG_SYS_BOOTPARAMS_LEN >> 10, addr_sp); - - /* - * Finally, we set up a new (bigger) stack. - * - * Leave some safety gap for SP, force alignment on 16 byte boundary - * Clear initial stack frame - */ - addr_sp -= 16; - addr_sp &= ~0xF; - - paddr = (ulong *)addr_sp; - *paddr-- = 0; - *paddr-- = 0; - addr_sp = (ulong)paddr; - - debug ("Stack Pointer at: %08lx\n", addr_sp); - - /* - * Save local variables to board info struct - */ - bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; /* start of DRAM memory */ - bd->bi_memsize = gd->ram_size; /* size of DRAM memory in bytes */ -#ifdef CONFIG_SYS_INIT_RAM_ADDR - bd->bi_sramstart = CONFIG_SYS_INIT_RAM_ADDR; /* start of SRAM memory */ - bd->bi_sramsize = CONFIG_SYS_INIT_RAM_SIZE; /* size of SRAM memory */ -#endif - bd->bi_mbar_base = CONFIG_SYS_MBAR; /* base of internal registers */ - - bd->bi_bootflags = bootflag; /* boot / reboot flag (for LynxOS) */ - - WATCHDOG_RESET (); - bd->bi_intfreq = gd->cpu_clk; /* Internal Freq, in Hz */ - bd->bi_busfreq = gd->bus_clk; /* Bus Freq, in Hz */ -#ifdef CONFIG_PCI - bd->bi_pcifreq = gd->pci_clk; /* PCI Freq in Hz */ -#endif -#ifdef CONFIG_EXTRA_CLOCK - bd->bi_inpfreq = gd->arch.inp_clk; /* input Freq in Hz */ - bd->bi_vcofreq = gd->arch.vco_clk; /* vco Freq in Hz */ - bd->bi_flbfreq = gd->arch.flb_clk; /* flexbus Freq in Hz */ -#endif - -#ifdef CONFIG_SYS_EXTBDINFO - strncpy (bd->bi_s_version, "1.2", sizeof (bd->bi_s_version)); - strncpy (bd->bi_r_version, U_BOOT_VERSION, sizeof (bd->bi_r_version)); -#endif - - WATCHDOG_RESET (); - -#ifdef CONFIG_POST - post_bootmode_init(); - post_run (NULL, POST_ROM | post_bootmode_get(0)); -#endif - - WATCHDOG_RESET(); - - memcpy (id, (void *)gd, sizeof (gd_t)); - - debug ("Start relocate of code from %08x to %08lx\n", CONFIG_SYS_MONITOR_BASE, addr); - relocate_code (addr_sp, id, addr); - - /* NOTREACHED - jump_to_ram() does not return */ -} - -/************************************************************************ - * - * This is the next part if the initialization sequence: we are now - * running from RAM and have a "normal" C environment, i. e. global - * data can be written, BSS has been cleared, the stack size in not - * that critical any more, etc. - * - ************************************************************************ - */ -void board_init_r (gd_t *id, ulong dest_addr) -{ - char *s __maybe_unused; - bd_t *bd; - -#ifndef CONFIG_ENV_IS_NOWHERE - extern char * env_name_spec; -#endif -#ifndef CONFIG_SYS_NO_FLASH - ulong flash_size; -#endif - gd = id; /* initialize RAM version of global data */ - bd = gd->bd; - - gd->flags |= GD_FLG_RELOC; /* tell others: relocation done */ - - WATCHDOG_RESET (); - - gd->reloc_off = dest_addr - CONFIG_SYS_MONITOR_BASE; - - serial_initialize(); - - debug("Now running in RAM - U-Boot at: %08lx\n", dest_addr); - - monitor_flash_len = (ulong)&__init_end - dest_addr; - -#if defined(CONFIG_NEEDS_MANUAL_RELOC) - /* - * We have to relocate the command table manually - */ - fixup_cmdtable(ll_entry_start(cmd_tbl_t, cmd), - ll_entry_count(cmd_tbl_t, cmd)); -#endif /* defined(CONFIG_NEEDS_MANUAL_RELOC) */ - - /* there are some other pointer constants we must deal with */ -#ifndef CONFIG_ENV_IS_NOWHERE - env_name_spec += gd->reloc_off; -#endif - - WATCHDOG_RESET (); - -#ifdef CONFIG_LOGBUFFER - logbuff_init_ptrs (); -#endif -#ifdef CONFIG_POST - post_output_backlog (); - post_reloc (); -#endif - WATCHDOG_RESET(); - -#if 0 - /* instruction cache enabled in cpu_init_f() for faster relocation */ - icache_enable (); /* it's time to enable the instruction cache */ -#endif - - /* - * Setup trap handlers - */ - trap_init (CONFIG_SYS_SDRAM_BASE); - - /* The Malloc area is immediately below the monitor copy in DRAM */ - mem_malloc_init (CONFIG_SYS_MONITOR_BASE + gd->reloc_off - - TOTAL_MALLOC_LEN, TOTAL_MALLOC_LEN); - -#if !defined(CONFIG_SYS_NO_FLASH) - puts ("Flash: "); - - if ((flash_size = flash_init ()) > 0) { -# ifdef CONFIG_SYS_FLASH_CHECKSUM - print_size (flash_size, ""); - /* - * Compute and print flash CRC if flashchecksum is set to 'y' - * - * NOTE: Maybe we should add some WATCHDOG_RESET()? XXX - */ - if (getenv_yesno("flashchecksum") == 1) { - printf (" CRC: %08X", - crc32 (0, - (const unsigned char *) CONFIG_SYS_FLASH_BASE, - flash_size) - ); - } - putc ('\n'); -# else /* !CONFIG_SYS_FLASH_CHECKSUM */ - print_size (flash_size, "\n"); -# endif /* CONFIG_SYS_FLASH_CHECKSUM */ - } else { - puts (failed); - hang (); - } - - bd->bi_flashstart = CONFIG_SYS_FLASH_BASE; /* update start of FLASH memory */ - bd->bi_flashsize = flash_size; /* size of FLASH memory (final value) */ - bd->bi_flashoffset = 0; -#else /* CONFIG_SYS_NO_FLASH */ - bd->bi_flashsize = 0; - bd->bi_flashstart = 0; - bd->bi_flashoffset = 0; -#endif /* !CONFIG_SYS_NO_FLASH */ - - WATCHDOG_RESET (); - - /* initialize higher level parts of CPU like time base and timers */ - cpu_init_r (); - - WATCHDOG_RESET (); - -#ifdef CONFIG_SPI -# if !defined(CONFIG_ENV_IS_IN_EEPROM) - spi_init_f (); -# endif - spi_init_r (); -#endif - -#if defined(CONFIG_SYS_I2C) - /* Adjust I2C subsystem pointers after relocation */ - i2c_reloc_fixup(); -#endif - - /* relocate environment function pointers etc. */ - env_relocate (); - - WATCHDOG_RESET (); - -#if defined(CONFIG_PCI) - /* - * Do pci configuration - */ - pci_init (); -#endif - - /** leave this here (after malloc(), environment and PCI are working) **/ - /* Initialize stdio devices */ - stdio_init (); - - /* Initialize the jump table for applications */ - jumptable_init (); - - /* Initialize the console (after the relocation and devices init) */ - console_init_r (); - -#if defined(CONFIG_MISC_INIT_R) - /* miscellaneous platform dependent initialisations */ - misc_init_r (); -#endif - -#if defined(CONFIG_CMD_KGDB) - WATCHDOG_RESET (); - puts ("KGDB: "); - kgdb_init (); -#endif - - debug ("U-Boot relocated to %08lx\n", dest_addr); - - /* - * Enable Interrupts - */ - interrupt_init (); - - /* Must happen after interrupts are initialized since - * an irq handler gets installed - */ - timer_init(); - -#ifdef CONFIG_STATUS_LED - status_led_set (STATUS_LED_BOOT, STATUS_LED_BLINKING); -#endif - - udelay (20); - - /* Insert function pointers now that we have relocated the code */ - - /* Initialize from environment */ - load_addr = getenv_ulong("loadaddr", 16, load_addr); - - WATCHDOG_RESET (); - -#if defined(CONFIG_CMD_DOC) - WATCHDOG_RESET (); - puts ("DOC: "); - doc_init (); -#endif - -#if defined(CONFIG_CMD_NAND) - WATCHDOG_RESET (); - puts ("NAND: "); - nand_init(); /* go init the NAND */ -#endif - -#ifdef CONFIG_BITBANGMII - bb_miiphy_init(); -#endif -#if defined(CONFIG_CMD_NET) - WATCHDOG_RESET(); -#if defined(FEC_ENET) - eth_init(bd); -#endif - puts ("Net: "); - eth_initialize (bd); -#endif - -#ifdef CONFIG_POST - post_run (NULL, POST_RAM | post_bootmode_get(0)); -#endif - -#if defined(CONFIG_CMD_PCMCIA) \ - && !defined(CONFIG_CMD_IDE) - WATCHDOG_RESET (); - puts ("PCMCIA:"); - pcmcia_init (); -#endif - -#if defined(CONFIG_CMD_IDE) - WATCHDOG_RESET (); - puts ("IDE: "); - ide_init (); -#endif - -#ifdef CONFIG_LAST_STAGE_INIT - WATCHDOG_RESET (); - /* - * Some parts can be only initialized if all others (like - * Interrupts) are up and running (i.e. the PC-style ISA - * keyboard). - */ - last_stage_init (); -#endif - -#if defined(CONFIG_PRAM) || defined(CONFIG_LOGBUFFER) - /* - * Export available size of memory for Linux, - * taking into account the protected RAM at top of memory - */ - { - ulong pram = 0; - char memsz[32]; - -#ifdef CONFIG_PRAM - pram = getenv_ulong("pram", 10, CONFIG_PRAM); -#endif -#ifdef CONFIG_LOGBUFFER - /* Also take the logbuffer into account (pram is in kB) */ - pram += (LOGBUFF_LEN+LOGBUFF_OVERHEAD)/1024; -#endif - sprintf (memsz, "%ldk", (bd->bi_memsize / 1024) - pram); - setenv ("mem", memsz); - } -#endif - -#ifdef CONFIG_WATCHDOG - /* disable watchdog if environment is set */ - if ((s = getenv ("watchdog")) != NULL) { - if (strncmp (s, "off", 3) == 0) { - WATCHDOG_DISABLE (); - } - } -#endif /* CONFIG_WATCHDOG*/ - - - /* Initialization complete - start the monitor */ - - /* main_loop() can return to retry autoboot, if so just run it again. */ - for (;;) { - WATCHDOG_RESET (); - main_loop (); - } - - /* NOTREACHED - no way out of command loop except booting */ -}

On 17/03/2015 04:35, Masahiro Yamada wrote:
All the M68000 boards have switched to Generic Board. This file is no longer necessary.
Hi Masahiro,
thanks.
Afaik, me and Alison converted and tested actually only 2 boards (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
Is this a problem ? Afaik, the user going to build the board will get a warning that he needs to switch to generic board. So the same user will be the tester that all works. Correct ?
Best regards, Angelo

Hi Angelo,
2015-03-17 15:55 GMT+09:00 Angelo Dureghello angelo@sysam.it:
On 17/03/2015 04:35, Masahiro Yamada wrote:
All the M68000 boards have switched to Generic Board. This file is no longer necessary.
Hi Masahiro,
thanks.
Afaik, me and Alison converted and tested actually only 2 boards (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
Is this a problem ? Afaik, the user going to build the board will get a warning that he needs to switch to generic board. So the same user will be the tester that all works. Correct ?
As a rule of generic board, people are supposed to do run-test and then send a patch.
BTW, M68K is the last architecture that adopts per-board linker script.
M68K should switch to per-soc linker scripts like the other architecures. It means all the followings should be merged into the single linker script arch/m68k/cpu/u-boot.lds.
board/freescale/m52277evb/u-boot.lds board/freescale/m5235evb/u-boot.lds board/cobra5272/u-boot.lds board/BuS/eb_cpu5282/u-boot.lds board/freescale/m5208evbe/u-boot.lds board/freescale/m5249evb/u-boot.lds board/freescale/m5253demo/u-boot.lds board/freescale/m5272c3/u-boot.lds board/freescale/m5275evb/u-boot.lds board/freescale/m5282evb/u-boot.lds board/sysam/amcore/u-boot.lds board/astro/mcf5373l/u-boot.lds board/freescale/m53017evb/u-boot.lds board/freescale/m5329evb/u-boot.lds board/freescale/m5373evb/u-boot.lds board/freescale/m54418twr/u-boot.lds board/freescale/m54451evb/u-boot.lds board/freescale/m54455evb/u-boot.lds board/freescale/m547xevb/u-boot.lds board/freescale/m548xevb/u-boot.lds
Is this possible for you? (or for someone else?)
If there is no volunteer, it would be much easier to remove all the M68K boards except the two you and Alison can maintain.
Maintain or Remove!

Hi Masahiro,
On 25/03/2015 04:20, Masahiro Yamada wrote:
Hi Angelo,
2015-03-17 15:55 GMT+09:00 Angelo Dureghello angelo@sysam.it:
On 17/03/2015 04:35, Masahiro Yamada wrote:
All the M68000 boards have switched to Generic Board. This file is no longer necessary.
Hi Masahiro,
thanks.
Afaik, me and Alison converted and tested actually only 2 boards (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
Is this a problem ? Afaik, the user going to build the board will get a warning that he needs to switch to generic board. So the same user will be the tester that all works. Correct ?
As a rule of generic board, people are supposed to do run-test and then send a patch.
BTW, M68K is the last architecture that adopts per-board linker script.
M68K should switch to per-soc linker scripts like the other architecures. It means all the followings should be merged into the single linker script arch/m68k/cpu/u-boot.lds.
board/freescale/m52277evb/u-boot.lds board/freescale/m5235evb/u-boot.lds board/cobra5272/u-boot.lds board/BuS/eb_cpu5282/u-boot.lds board/freescale/m5208evbe/u-boot.lds board/freescale/m5249evb/u-boot.lds board/freescale/m5253demo/u-boot.lds board/freescale/m5272c3/u-boot.lds board/freescale/m5275evb/u-boot.lds board/freescale/m5282evb/u-boot.lds board/sysam/amcore/u-boot.lds board/astro/mcf5373l/u-boot.lds board/freescale/m53017evb/u-boot.lds board/freescale/m5329evb/u-boot.lds board/freescale/m5373evb/u-boot.lds board/freescale/m54418twr/u-boot.lds board/freescale/m54451evb/u-boot.lds board/freescale/m54455evb/u-boot.lds board/freescale/m547xevb/u-boot.lds board/freescale/m548xevb/u-boot.lds
Is this possible for you? (or for someone else?)
Sure, i look into this. I start from checking what are the differences.
If there is no volunteer, it would be much easier to remove all the M68K boards except the two you and Alison can maintain.
Maintain or Remove!
Best regards Angelo

Hi Masahiro and all,
On 25/03/2015 04:20, Masahiro Yamada wrote:
Hi Angelo,
2015-03-17 15:55 GMT+09:00 Angelo Dureghello angelo@sysam.it:
On 17/03/2015 04:35, Masahiro Yamada wrote:
All the M68000 boards have switched to Generic Board. This file is no longer necessary.
Hi Masahiro,
thanks.
Afaik, me and Alison converted and tested actually only 2 boards (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
Is this a problem ? Afaik, the user going to build the board will get a warning that he needs to switch to generic board. So the same user will be the tester that all works. Correct ?
As a rule of generic board, people are supposed to do run-test and then send a patch.
BTW, M68K is the last architecture that adopts per-board linker script.
M68K should switch to per-soc linker scripts like the other architecures. It means all the followings should be merged into the single linker script arch/m68k/cpu/u-boot.lds.
board/freescale/m52277evb/u-boot.lds board/freescale/m5235evb/u-boot.lds board/cobra5272/u-boot.lds board/BuS/eb_cpu5282/u-boot.lds board/freescale/m5208evbe/u-boot.lds board/freescale/m5249evb/u-boot.lds board/freescale/m5253demo/u-boot.lds board/freescale/m5272c3/u-boot.lds board/freescale/m5275evb/u-boot.lds board/freescale/m5282evb/u-boot.lds board/sysam/amcore/u-boot.lds board/astro/mcf5373l/u-boot.lds board/freescale/m53017evb/u-boot.lds board/freescale/m5329evb/u-boot.lds board/freescale/m5373evb/u-boot.lds board/freescale/m54418twr/u-boot.lds board/freescale/m54451evb/u-boot.lds board/freescale/m54455evb/u-boot.lds board/freescale/m547xevb/u-boot.lds board/freescale/m548xevb/u-boot.lds
Is this possible for you? (or for someone else?)
If there is no volunteer, it would be much easier to remove all the M68K boards except the two you and Alison can maintain.
Maintain or Remove!
so i posted a patch for a unified m68k arch-wide linker script. Could not be the best solution but it is a solution that works.
https://patchwork.ozlabs.org/patch/455952/
Let me know your comments.
Best regards, Angelo Dureghello --

Hi Angelo,
2015-04-09 4:20 GMT+09:00 Angelo Dureghello angelo@sysam.it:
Hi Masahiro and all,
On 25/03/2015 04:20, Masahiro Yamada wrote:
Hi Angelo,
2015-03-17 15:55 GMT+09:00 Angelo Dureghello angelo@sysam.it:
On 17/03/2015 04:35, Masahiro Yamada wrote:
All the M68000 boards have switched to Generic Board. This file is no longer necessary.
Hi Masahiro,
thanks.
Afaik, me and Alison converted and tested actually only 2 boards (adding #define CONFIG_SYS_GENERIC_BOARD inside /include/configs/...)
Is this a problem ? Afaik, the user going to build the board will get a warning that he needs to switch to generic board. So the same user will be the tester that all works. Correct ?
As a rule of generic board, people are supposed to do run-test and then send a patch.
BTW, M68K is the last architecture that adopts per-board linker script.
M68K should switch to per-soc linker scripts like the other architecures. It means all the followings should be merged into the single linker script arch/m68k/cpu/u-boot.lds.
board/freescale/m52277evb/u-boot.lds board/freescale/m5235evb/u-boot.lds board/cobra5272/u-boot.lds board/BuS/eb_cpu5282/u-boot.lds board/freescale/m5208evbe/u-boot.lds board/freescale/m5249evb/u-boot.lds board/freescale/m5253demo/u-boot.lds board/freescale/m5272c3/u-boot.lds board/freescale/m5275evb/u-boot.lds board/freescale/m5282evb/u-boot.lds board/sysam/amcore/u-boot.lds board/astro/mcf5373l/u-boot.lds board/freescale/m53017evb/u-boot.lds board/freescale/m5329evb/u-boot.lds board/freescale/m5373evb/u-boot.lds board/freescale/m54418twr/u-boot.lds board/freescale/m54451evb/u-boot.lds board/freescale/m54455evb/u-boot.lds board/freescale/m547xevb/u-boot.lds board/freescale/m548xevb/u-boot.lds
Is this possible for you? (or for someone else?)
If there is no volunteer, it would be much easier to remove all the M68K boards except the two you and Alison can maintain.
Maintain or Remove!
so i posted a patch for a unified m68k arch-wide linker script. Could not be the best solution but it is a solution that works.
https://patchwork.ozlabs.org/patch/455952/
Let me know your comments.
Great cleanup!
Thank you!

The default value of CONFIG_SYS_MALLOC_F_LEN is defined by ./Kconfig as 0x400. Each defconfig or Kconfig need not repeat the same value.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
Changes in v2: None
arch/arm/cpu/armv7/exynos/Kconfig | 3 --- arch/arm/cpu/armv7/omap3/Kconfig | 3 --- arch/arm/mach-uniphier/Kconfig | 3 --- board/amcc/canyonlands/Kconfig | 4 ---- board/ti/am335x/Kconfig | 3 --- configs/Linksprite_pcDuino3_fdt_defconfig | 1 - configs/am335x_igep0033_defconfig | 1 - configs/cm_fx6_defconfig | 1 - configs/cm_t335_defconfig | 1 - configs/gwventana_defconfig | 1 - configs/mx6dlsabreauto_defconfig | 1 - configs/mx6qsabreauto_defconfig | 1 - configs/mx6qsabresd_defconfig | 1 - configs/mx6sxsabresd_defconfig | 1 - configs/nokia_rx51_defconfig | 1 - configs/pcm051_rev1_defconfig | 1 - configs/pcm051_rev3_defconfig | 1 - configs/pengwyn_defconfig | 1 - configs/pepper_defconfig | 1 - configs/rpi_2_defconfig | 1 - configs/rpi_defconfig | 1 - configs/s5p_goni_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/smdkc100_defconfig | 1 - configs/snapper9260_defconfig | 1 - configs/snapper9g20_defconfig | 1 - 26 files changed, 37 deletions(-)
diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index eb86a7f..9e47ed3 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -83,9 +83,6 @@ config DM_GPIO config SYS_MALLOC_F default y
-config SYS_MALLOC_F_LEN - default 0x400 - source "board/samsung/smdkv310/Kconfig" source "board/samsung/trats/Kconfig" source "board/samsung/universal_c210/Kconfig" diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig index 65da6e2..aa2ff46 100644 --- a/arch/arm/cpu/armv7/omap3/Kconfig +++ b/arch/arm/cpu/armv7/omap3/Kconfig @@ -109,9 +109,6 @@ config DM_SERIAL config SYS_MALLOC_F default y if DM
-config SYS_MALLOC_F_LEN - default 0x400 if DM - config SYS_SOC default "omap3"
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig index 8335685..b6dc75f 100644 --- a/arch/arm/mach-uniphier/Kconfig +++ b/arch/arm/mach-uniphier/Kconfig @@ -51,9 +51,6 @@ endchoice config SYS_MALLOC_F default y
-config SYS_MALLOC_F_LEN - default 0x400 - config CMD_PINMON bool "Enable boot mode pins monitor command" default y diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig index 848e08f..c0dbd18 100644 --- a/board/amcc/canyonlands/Kconfig +++ b/board/amcc/canyonlands/Kconfig @@ -43,8 +43,4 @@ config SYS_MALLOC_F bool default y
-config SYS_MALLOC_F_LEN - hex - default 0x400 - endif diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig index 722f9d5..8c45892 100644 --- a/board/ti/am335x/Kconfig +++ b/board/ti/am335x/Kconfig @@ -50,7 +50,4 @@ config DM_SERIAL config SYS_MALLOC_F default y if DM
-config SYS_MALLOC_F_LEN - default 0x400 if DM - endif diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig b/configs/Linksprite_pcDuino3_fdt_defconfig index 1504664..87dd38f 100644 --- a/configs/Linksprite_pcDuino3_fdt_defconfig +++ b/configs/Linksprite_pcDuino3_fdt_defconfig @@ -14,4 +14,3 @@ CONFIG_DRAM_CLK=480 CONFIG_DRAM_ZQ=122 CONFIG_DRAM_EMR1=4 CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/am335x_igep0033_defconfig b/configs/am335x_igep0033_defconfig index 8d38e26..a439298 100644 --- a/configs/am335x_igep0033_defconfig +++ b/configs/am335x_igep0033_defconfig @@ -4,4 +4,3 @@ CONFIG_SPL_STACK_R_ADDR=0x82000000 CONFIG_ARM=y CONFIG_TARGET_AM335X_IGEP0033=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 2fd21cf..00cbdd2 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -6,4 +6,3 @@ CONFIG_DM=y CONFIG_DM_GPIO=y CONFIG_DM_SERIAL=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig index 086e526..31705f2 100644 --- a/configs/cm_t335_defconfig +++ b/configs/cm_t335_defconfig @@ -2,4 +2,3 @@ CONFIG_SPL=y CONFIG_ARM=y CONFIG_TARGET_CM_T335=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/gwventana_defconfig b/configs/gwventana_defconfig index 6eab019..d6bbdc1 100644 --- a/configs/gwventana_defconfig +++ b/configs/gwventana_defconfig @@ -3,4 +3,3 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/imx-common/spl_sd.cfg,MX6QDL" CONFIG_ARM=y CONFIG_TARGET_GW_VENTANA=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig index 47f3f87..b3816ec 100644 --- a/configs/mx6dlsabreauto_defconfig +++ b/configs/mx6dlsabreauto_defconfig @@ -2,6 +2,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6 CONFIG_ARM=y CONFIG_TARGET_MX6QSABREAUTO=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig index ab72942..df09296 100644 --- a/configs/mx6qsabreauto_defconfig +++ b/configs/mx6qsabreauto_defconfig @@ -2,6 +2,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg, CONFIG_ARM=y CONFIG_TARGET_MX6QSABREAUTO=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig index 112918b..cad4281 100644 --- a/configs/mx6qsabresd_defconfig +++ b/configs/mx6qsabresd_defconfig @@ -2,6 +2,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128 CONFIG_ARM=y CONFIG_TARGET_MX6SABRESD=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig index cc82322..12a9bdc 100644 --- a/configs/mx6sxsabresd_defconfig +++ b/configs/mx6sxsabresd_defconfig @@ -2,6 +2,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,M CONFIG_ARM=y CONFIG_TARGET_MX6SXSABRESD=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index 1bb7664..48a1b29 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -5,4 +5,3 @@ CONFIG_DM=n CONFIG_DM_SERIAL=n CONFIG_DM_GPIO=n CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig index f417aac..a8b10d4 100644 --- a/configs/pcm051_rev1_defconfig +++ b/configs/pcm051_rev1_defconfig @@ -3,4 +3,3 @@ CONFIG_SYS_EXTRA_OPTIONS="REV1" CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig index cc6f3f5..ef307d9 100644 --- a/configs/pcm051_rev3_defconfig +++ b/configs/pcm051_rev3_defconfig @@ -3,4 +3,3 @@ CONFIG_SYS_EXTRA_OPTIONS="REV3" CONFIG_ARM=y CONFIG_TARGET_PCM051=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig index 9c6ddf4..86f8bbb 100644 --- a/configs/pengwyn_defconfig +++ b/configs/pengwyn_defconfig @@ -2,4 +2,3 @@ CONFIG_SPL=y CONFIG_ARM=y CONFIG_TARGET_PENGWYN=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/pepper_defconfig b/configs/pepper_defconfig index e14b008..438d886 100644 --- a/configs/pepper_defconfig +++ b/configs/pepper_defconfig @@ -2,4 +2,3 @@ CONFIG_SPL=y CONFIG_ARM=y CONFIG_TARGET_PEPPER=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig index b539d4a..69723d5 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -1,4 +1,3 @@ CONFIG_ARM=y CONFIG_TARGET_RPI_2=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig index 98d3199..1a5a8e2 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -1,4 +1,3 @@ CONFIG_ARM=y CONFIG_TARGET_RPI=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig index 33e6fb8..5815667 100644 --- a/configs/s5p_goni_defconfig +++ b/configs/s5p_goni_defconfig @@ -3,4 +3,3 @@ CONFIG_ARCH_S5PC1XX=y CONFIG_TARGET_S5P_GONI=y CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-goni" CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index 70f5b86..a0e19ad 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -6,7 +6,6 @@ CONFIG_FIT_SIGNATURE=y CONFIG_DM=y CONFIG_DEFAULT_DEVICE_TREE="sandbox" CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 CONFIG_CROS_EC=y CONFIG_DM_CROS_EC=y CONFIG_CROS_EC_SANDBOX=y diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig index e933a32..585fea6 100644 --- a/configs/smdkc100_defconfig +++ b/configs/smdkc100_defconfig @@ -3,4 +3,3 @@ CONFIG_TARGET_SMDKC100=y CONFIG_ARCH_S5PC1XX=y CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100" CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig index 3a47505..9a0d0ad 100644 --- a/configs/snapper9260_defconfig +++ b/configs/snapper9260_defconfig @@ -6,4 +6,3 @@ CONFIG_DM=y CONFIG_DM_GPIO=y CONFIG_DM_SERIAL=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400 diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig index 1f0244b..82f7a07 100644 --- a/configs/snapper9g20_defconfig +++ b/configs/snapper9g20_defconfig @@ -6,4 +6,3 @@ CONFIG_DM=y CONFIG_DM_GPIO=y CONFIG_DM_SERIAL=y CONFIG_SYS_MALLOC_F=y -CONFIG_SYS_MALLOC_F_LEN=0x400

This option has a bool type, not hex. Fix it and enable it if CONFIG_DM is on because Driver Model always requires malloc memory. Devices are scanned twice, before/after relocation. CONFIG_SYS_MALLOC_F should be enabled to use malloc memory before relocation. As it is board-independent, handle it globally.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com ---
Changes in v2: - Fix a typo s/not board-independent/board-independent/
Kconfig | 2 +- arch/arm/cpu/armv7/exynos/Kconfig | 3 --- arch/arm/cpu/armv7/omap3/Kconfig | 3 --- arch/arm/mach-tegra/Kconfig | 3 --- arch/arm/mach-uniphier/Kconfig | 3 --- arch/x86/Kconfig | 3 --- board/amcc/canyonlands/Kconfig | 4 ---- board/ti/am335x/Kconfig | 3 --- configs/Linksprite_pcDuino3_fdt_defconfig | 1 - configs/am335x_igep0033_defconfig | 1 - configs/cm_fx6_defconfig | 1 - configs/cm_t335_defconfig | 1 - configs/mx6dlsabreauto_defconfig | 1 - configs/mx6qsabreauto_defconfig | 1 - configs/mx6qsabresd_defconfig | 1 - configs/mx6sxsabresd_defconfig | 1 - configs/nokia_rx51_defconfig | 1 - configs/pcm051_rev1_defconfig | 1 - configs/pcm051_rev3_defconfig | 1 - configs/pengwyn_defconfig | 1 - configs/pepper_defconfig | 1 - configs/rpi_2_defconfig | 1 - configs/rpi_defconfig | 1 - configs/s5p_goni_defconfig | 1 - configs/sandbox_defconfig | 1 - configs/smdkc100_defconfig | 1 - configs/snapper9260_defconfig | 1 - configs/snapper9g20_defconfig | 1 - configs/stv0991_defconfig | 1 - include/configs/rcar-gen2-common.h | 2 -- 30 files changed, 1 insertion(+), 46 deletions(-)
diff --git a/Kconfig b/Kconfig index 8f96c94..b5968d7 100644 --- a/Kconfig +++ b/Kconfig @@ -54,7 +54,7 @@ config CC_OPTIMIZE_FOR_SIZE
config SYS_MALLOC_F bool "Enable malloc() pool before relocation" - default 0x400 + default y if DM help Before relocation memory is very limited on many platforms. Still, we can provide a small malloc() pool if needed. Driver model in diff --git a/arch/arm/cpu/armv7/exynos/Kconfig b/arch/arm/cpu/armv7/exynos/Kconfig index 9e47ed3..bd7540a 100644 --- a/arch/arm/cpu/armv7/exynos/Kconfig +++ b/arch/arm/cpu/armv7/exynos/Kconfig @@ -80,9 +80,6 @@ config DM_SPI_FLASH config DM_GPIO default y
-config SYS_MALLOC_F - default y - source "board/samsung/smdkv310/Kconfig" source "board/samsung/trats/Kconfig" source "board/samsung/universal_c210/Kconfig" diff --git a/arch/arm/cpu/armv7/omap3/Kconfig b/arch/arm/cpu/armv7/omap3/Kconfig index aa2ff46..1f96498 100644 --- a/arch/arm/cpu/armv7/omap3/Kconfig +++ b/arch/arm/cpu/armv7/omap3/Kconfig @@ -106,9 +106,6 @@ config DM_GPIO config DM_SERIAL default y if DM
-config SYS_MALLOC_F - default y if DM - config SYS_SOC default "omap3"
diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig index fccfd79..fce1c1d 100644 --- a/arch/arm/mach-tegra/Kconfig +++ b/arch/arm/mach-tegra/Kconfig @@ -17,9 +17,6 @@ config TEGRA124
endchoice
-config SYS_MALLOC_F - default y - config SYS_MALLOC_F_LEN default 0x1800
diff --git a/arch/arm/mach-uniphier/Kconfig b/arch/arm/mach-uniphier/Kconfig index b6dc75f..20e20a5 100644 --- a/arch/arm/mach-uniphier/Kconfig +++ b/arch/arm/mach-uniphier/Kconfig @@ -48,9 +48,6 @@ config DCC_MICRO_SUPPORT_CARD
endchoice
-config SYS_MALLOC_F - default y - config CMD_PINMON bool "Enable boot mode pins monitor command" default y diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 35d24e4..da27115 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -76,9 +76,6 @@ config DM_GPIO config DM_SERIAL default y
-config SYS_MALLOC_F - default y - config SYS_MALLOC_F_LEN default 0x800
diff --git a/board/amcc/canyonlands/Kconfig b/board/amcc/canyonlands/Kconfig index c0dbd18..46efa7a 100644 --- a/board/amcc/canyonlands/Kconfig +++ b/board/amcc/canyonlands/Kconfig @@ -39,8 +39,4 @@ config DM config DM_SERIAL default y
-config SYS_MALLOC_F - bool - default y - endif diff --git a/board/ti/am335x/Kconfig b/board/ti/am335x/Kconfig index 8c45892..7cb006f 100644 --- a/board/ti/am335x/Kconfig +++ b/board/ti/am335x/Kconfig @@ -47,7 +47,4 @@ config DM_GPIO config DM_SERIAL default y if DM
-config SYS_MALLOC_F - default y if DM - endif diff --git a/configs/Linksprite_pcDuino3_fdt_defconfig b/configs/Linksprite_pcDuino3_fdt_defconfig index 87dd38f..7690d1e 100644 --- a/configs/Linksprite_pcDuino3_fdt_defconfig +++ b/configs/Linksprite_pcDuino3_fdt_defconfig @@ -13,4 +13,3 @@ CONFIG_MACH_SUN7I=y CONFIG_DRAM_CLK=480 CONFIG_DRAM_ZQ=122 CONFIG_DRAM_EMR1=4 -CONFIG_SYS_MALLOC_F=y diff --git a/configs/am335x_igep0033_defconfig b/configs/am335x_igep0033_defconfig index a439298..7ff0a13 100644 --- a/configs/am335x_igep0033_defconfig +++ b/configs/am335x_igep0033_defconfig @@ -3,4 +3,3 @@ CONFIG_SPL_STACK_R=y CONFIG_SPL_STACK_R_ADDR=0x82000000 CONFIG_ARM=y CONFIG_TARGET_AM335X_IGEP0033=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/cm_fx6_defconfig b/configs/cm_fx6_defconfig index 00cbdd2..f10a5c2 100644 --- a/configs/cm_fx6_defconfig +++ b/configs/cm_fx6_defconfig @@ -5,4 +5,3 @@ CONFIG_TARGET_CM_FX6=y CONFIG_DM=y CONFIG_DM_GPIO=y CONFIG_DM_SERIAL=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/cm_t335_defconfig b/configs/cm_t335_defconfig index 31705f2..d189799 100644 --- a/configs/cm_t335_defconfig +++ b/configs/cm_t335_defconfig @@ -1,4 +1,3 @@ CONFIG_SPL=y CONFIG_ARM=y CONFIG_TARGET_CM_T335=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/mx6dlsabreauto_defconfig b/configs/mx6dlsabreauto_defconfig index b3816ec..8bc5e8b 100644 --- a/configs/mx6dlsabreauto_defconfig +++ b/configs/mx6dlsabreauto_defconfig @@ -1,6 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/mx6dl.cfg,MX6DL" CONFIG_ARM=y CONFIG_TARGET_MX6QSABREAUTO=y -CONFIG_SYS_MALLOC_F=y CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/mx6qsabreauto_defconfig b/configs/mx6qsabreauto_defconfig index df09296..ba9e512 100644 --- a/configs/mx6qsabreauto_defconfig +++ b/configs/mx6qsabreauto_defconfig @@ -1,6 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6qsabreauto/imximage.cfg,MX6Q" CONFIG_ARM=y CONFIG_TARGET_MX6QSABREAUTO=y -CONFIG_SYS_MALLOC_F=y CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/mx6qsabresd_defconfig b/configs/mx6qsabresd_defconfig index cad4281..1764b39 100644 --- a/configs/mx6qsabresd_defconfig +++ b/configs/mx6qsabresd_defconfig @@ -1,6 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sabresd/mx6q_4x_mt41j128.cfg,MX6Q" CONFIG_ARM=y CONFIG_TARGET_MX6SABRESD=y -CONFIG_SYS_MALLOC_F=y CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/mx6sxsabresd_defconfig b/configs/mx6sxsabresd_defconfig index 12a9bdc..5c862cf 100644 --- a/configs/mx6sxsabresd_defconfig +++ b/configs/mx6sxsabresd_defconfig @@ -1,6 +1,5 @@ CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=board/freescale/mx6sxsabresd/imximage.cfg,MX6SX" CONFIG_ARM=y CONFIG_TARGET_MX6SXSABRESD=y -CONFIG_SYS_MALLOC_F=y CONFIG_DM=y CONFIG_DM_THERMAL=y diff --git a/configs/nokia_rx51_defconfig b/configs/nokia_rx51_defconfig index 48a1b29..20a51e1 100644 --- a/configs/nokia_rx51_defconfig +++ b/configs/nokia_rx51_defconfig @@ -4,4 +4,3 @@ CONFIG_TARGET_NOKIA_RX51=y CONFIG_DM=n CONFIG_DM_SERIAL=n CONFIG_DM_GPIO=n -CONFIG_SYS_MALLOC_F=y diff --git a/configs/pcm051_rev1_defconfig b/configs/pcm051_rev1_defconfig index a8b10d4..08075e7 100644 --- a/configs/pcm051_rev1_defconfig +++ b/configs/pcm051_rev1_defconfig @@ -2,4 +2,3 @@ CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="REV1" CONFIG_ARM=y CONFIG_TARGET_PCM051=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/pcm051_rev3_defconfig b/configs/pcm051_rev3_defconfig index ef307d9..56deb48 100644 --- a/configs/pcm051_rev3_defconfig +++ b/configs/pcm051_rev3_defconfig @@ -2,4 +2,3 @@ CONFIG_SPL=y CONFIG_SYS_EXTRA_OPTIONS="REV3" CONFIG_ARM=y CONFIG_TARGET_PCM051=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/pengwyn_defconfig b/configs/pengwyn_defconfig index 86f8bbb..6346b57 100644 --- a/configs/pengwyn_defconfig +++ b/configs/pengwyn_defconfig @@ -1,4 +1,3 @@ CONFIG_SPL=y CONFIG_ARM=y CONFIG_TARGET_PENGWYN=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/pepper_defconfig b/configs/pepper_defconfig index 438d886..3b042ec 100644 --- a/configs/pepper_defconfig +++ b/configs/pepper_defconfig @@ -1,4 +1,3 @@ CONFIG_SPL=y CONFIG_ARM=y CONFIG_TARGET_PEPPER=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig index 69723d5..3075321 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -1,3 +1,2 @@ CONFIG_ARM=y CONFIG_TARGET_RPI_2=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig index 1a5a8e2..9379cf0 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -1,3 +1,2 @@ CONFIG_ARM=y CONFIG_TARGET_RPI=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/s5p_goni_defconfig b/configs/s5p_goni_defconfig index 5815667..618e590 100644 --- a/configs/s5p_goni_defconfig +++ b/configs/s5p_goni_defconfig @@ -2,4 +2,3 @@ CONFIG_ARM=y CONFIG_ARCH_S5PC1XX=y CONFIG_TARGET_S5P_GONI=y CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-goni" -CONFIG_SYS_MALLOC_F=y diff --git a/configs/sandbox_defconfig b/configs/sandbox_defconfig index a0e19ad..a216039 100644 --- a/configs/sandbox_defconfig +++ b/configs/sandbox_defconfig @@ -5,7 +5,6 @@ CONFIG_FIT_VERBOSE=y CONFIG_FIT_SIGNATURE=y CONFIG_DM=y CONFIG_DEFAULT_DEVICE_TREE="sandbox" -CONFIG_SYS_MALLOC_F=y CONFIG_CROS_EC=y CONFIG_DM_CROS_EC=y CONFIG_CROS_EC_SANDBOX=y diff --git a/configs/smdkc100_defconfig b/configs/smdkc100_defconfig index 585fea6..041030f 100644 --- a/configs/smdkc100_defconfig +++ b/configs/smdkc100_defconfig @@ -2,4 +2,3 @@ CONFIG_ARM=y CONFIG_TARGET_SMDKC100=y CONFIG_ARCH_S5PC1XX=y CONFIG_DEFAULT_DEVICE_TREE="s5pc1xx-smdkc100" -CONFIG_SYS_MALLOC_F=y diff --git a/configs/snapper9260_defconfig b/configs/snapper9260_defconfig index 9a0d0ad..576d9c5 100644 --- a/configs/snapper9260_defconfig +++ b/configs/snapper9260_defconfig @@ -5,4 +5,3 @@ CONFIG_TARGET_SNAPPER9260=y CONFIG_DM=y CONFIG_DM_GPIO=y CONFIG_DM_SERIAL=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/snapper9g20_defconfig b/configs/snapper9g20_defconfig index 82f7a07..07a2643 100644 --- a/configs/snapper9g20_defconfig +++ b/configs/snapper9g20_defconfig @@ -5,4 +5,3 @@ CONFIG_TARGET_SNAPPER9260=y CONFIG_DM=y CONFIG_DM_GPIO=y CONFIG_DM_SERIAL=y -CONFIG_SYS_MALLOC_F=y diff --git a/configs/stv0991_defconfig b/configs/stv0991_defconfig index 1c9ba88..e8cf311 100644 --- a/configs/stv0991_defconfig +++ b/configs/stv0991_defconfig @@ -1,7 +1,6 @@ CONFIG_SYS_EXTRA_OPTIONS="stv0991" CONFIG_ARM=y CONFIG_TARGET_STV0991=y -CONFIG_SYS_MALLOC_F=y CONFIG_SYS_MALLOC_F_LEN=0x2000 CONFIG_DM=y CONFIG_DM_SERIAL=y diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h index e9ef7cc..c33f1cb 100644 --- a/include/configs/rcar-gen2-common.h +++ b/include/configs/rcar-gen2-common.h @@ -35,8 +35,6 @@ #define CONFIG_SYS_THUMB_BUILD #define CONFIG_SYS_GENERIC_BOARD
-#define CONFIG_SYS_MALLOC_F_LEN (1 << 10) - /* Support File sytems */ #define CONFIG_FAT_WRITE #define CONFIG_DOS_PARTITION

BCM2835 (used on Raspberry Pi) and BCM2836 (used on Raspberry Pi 2) are similar enough. One of the biggest differences is the ARM processor. It is reasonable to collect the source files into a single place, arch/arm/mach-bcm283x/.
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com Cc: Stephen Warren swarren@nvidia.com ---
Changes in v2: None
arch/arm/Kconfig | 15 +++----- arch/arm/Makefile | 1 + arch/arm/cpu/arm1176/Makefile | 2 -- arch/arm/cpu/arm1176/bcm2835/Kconfig | 12 ------- arch/arm/cpu/armv7/Makefile | 1 - arch/arm/cpu/armv7/bcm2835/Makefile | 13 ------- arch/arm/mach-bcm283x/Kconfig | 40 ++++++++++++++++++++++ .../{cpu/arm1176/bcm2835 => mach-bcm283x}/Makefile | 2 +- .../{cpu/arm1176/bcm2835 => mach-bcm283x}/init.c | 0 .../bcm2835 => mach-bcm283x}/lowlevel_init.S | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/mbox.c | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/reset.c | 0 .../{cpu/arm1176/bcm2835 => mach-bcm283x}/timer.c | 0 board/raspberrypi/rpi/Kconfig | 15 -------- board/raspberrypi/rpi_2/Kconfig | 15 -------- configs/rpi_2_defconfig | 1 + configs/rpi_defconfig | 1 + 17 files changed, 48 insertions(+), 70 deletions(-) delete mode 100644 arch/arm/cpu/arm1176/bcm2835/Kconfig delete mode 100644 arch/arm/cpu/armv7/bcm2835/Makefile create mode 100644 arch/arm/mach-bcm283x/Kconfig rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/Makefile (72%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/init.c (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/lowlevel_init.S (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/mbox.c (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/reset.c (100%) rename arch/arm/{cpu/arm1176/bcm2835 => mach-bcm283x}/timer.c (100%) delete mode 100644 board/raspberrypi/rpi/Kconfig delete mode 100644 board/raspberrypi/rpi_2/Kconfig
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index b9ebee1..9292e98 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -286,13 +286,8 @@ config TARGET_MX35PDK bool "Support mx35pdk" select CPU_ARM1136
-config TARGET_RPI - bool "Support rpi" - select CPU_ARM1176 - -config TARGET_RPI_2 - bool "Support rpi_2" - select CPU_V7 +config ARCH_BCM283X + bool "Broadcom BCM283X family"
config TARGET_INTEGRATORAP_CM946ES bool "Support integratorap_cm946es" @@ -723,9 +718,9 @@ endchoice
source "arch/arm/mach-at91/Kconfig"
-source "arch/arm/mach-davinci/Kconfig" +source "arch/arm/mach-bcm283x/Kconfig"
-source "arch/arm/cpu/arm1176/bcm2835/Kconfig" +source "arch/arm/mach-davinci/Kconfig"
source "arch/arm/cpu/armv7/exynos/Kconfig"
@@ -834,8 +829,6 @@ source "board/palmtreo680/Kconfig" source "board/phytec/pcm051/Kconfig" source "board/ppcag/bg0900/Kconfig" source "board/pxa255_idp/Kconfig" -source "board/raspberrypi/rpi/Kconfig" -source "board/raspberrypi/rpi_2/Kconfig" source "board/samsung/smdk2410/Kconfig" source "board/sandisk/sansa_fuze_plus/Kconfig" source "board/scb9328/Kconfig" diff --git a/arch/arm/Makefile b/arch/arm/Makefile index 08946de..bac3cb2 100644 --- a/arch/arm/Makefile +++ b/arch/arm/Makefile @@ -5,6 +5,7 @@ # Machine directory name. This list is sorted alphanumerically # by CONFIG_* macro name. machine-$(CONFIG_ARCH_AT91) += at91 +machine-$(CONFIG_ARCH_BCM283X) += bcm283x machine-$(CONFIG_ARCH_DAVINCI) += davinci machine-$(CONFIG_ARCH_HIGHBANK) += highbank machine-$(CONFIG_ARCH_KEYSTONE) += keystone diff --git a/arch/arm/cpu/arm1176/Makefile b/arch/arm/cpu/arm1176/Makefile index 480e130..deec427 100644 --- a/arch/arm/cpu/arm1176/Makefile +++ b/arch/arm/cpu/arm1176/Makefile @@ -10,5 +10,3 @@
extra-y = start.o obj-y = cpu.o - -obj-$(CONFIG_BCM2835) += bcm2835/ diff --git a/arch/arm/cpu/arm1176/bcm2835/Kconfig b/arch/arm/cpu/arm1176/bcm2835/Kconfig deleted file mode 100644 index 73cc72b..0000000 --- a/arch/arm/cpu/arm1176/bcm2835/Kconfig +++ /dev/null @@ -1,12 +0,0 @@ -if TARGET_RPI || TARGET_RPI_2 - -config DM - default y - -config DM_SERIAL - default y - -config DM_GPIO - default y - -endif diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 1312a9d..21fc03b 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -39,7 +39,6 @@ endif
obj-$(if $(filter am33xx,$(SOC)),y) += am33xx/ obj-$(if $(filter armada-xp,$(SOC)),y) += armada-xp/ -obj-$(CONFIG_BCM2835) += bcm2835/ obj-$(if $(filter bcm281xx,$(SOC)),y) += bcm281xx/ obj-$(if $(filter bcmcygnus,$(SOC)),y) += bcmcygnus/ obj-$(if $(filter bcmnsp,$(SOC)),y) += bcmnsp/ diff --git a/arch/arm/cpu/armv7/bcm2835/Makefile b/arch/arm/cpu/armv7/bcm2835/Makefile deleted file mode 100644 index ed1ee47..0000000 --- a/arch/arm/cpu/armv7/bcm2835/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# -# (C) Copyright 2012 Stephen Warren -# -# SPDX-License-Identifier: GPL-2.0+ -# - -src_dir := ../../arm1176/bcm2835/ - -obj-y := -obj-y += $(src_dir)/init.o -obj-y += $(src_dir)/reset.o -obj-y += $(src_dir)/timer.o -obj-y += $(src_dir)/mbox.o diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig new file mode 100644 index 0000000..d5e09e8 --- /dev/null +++ b/arch/arm/mach-bcm283x/Kconfig @@ -0,0 +1,40 @@ +menu "Broadcom BCM283X family" + depends on ARCH_BCM283X + +choice + prompt "Broadcom BCM283X board select" + +config TARGET_RPI + bool "Raspberry Pi" + select CPU_ARM1176 + +config TARGET_RPI_2 + bool "Raspberry Pi 2" + select CPU_V7 + +endchoice + +config DM + default y + +config DM_SERIAL + default y + +config DM_GPIO + default y + +config SYS_BOARD + default "rpi" if TARGET_RPI + default "rpi_2" if TARGET_RPI_2 + +config SYS_VENDOR + default "raspberrypi" + +config SYS_SOC + default "bcm2835" + +config SYS_CONFIG_NAME + default "rpi" if TARGET_RPI + default "rpi_2" if TARGET_RPI_2 + +endmenu diff --git a/arch/arm/cpu/arm1176/bcm2835/Makefile b/arch/arm/mach-bcm283x/Makefile similarity index 72% rename from arch/arm/cpu/arm1176/bcm2835/Makefile rename to arch/arm/mach-bcm283x/Makefile index 7e5dbe1..2505428 100644 --- a/arch/arm/cpu/arm1176/bcm2835/Makefile +++ b/arch/arm/mach-bcm283x/Makefile @@ -4,5 +4,5 @@ # SPDX-License-Identifier: GPL-2.0 #
-obj-y := lowlevel_init.o +obj-$(CONFIG_TARGET_RPI) += lowlevel_init.o obj-y += init.o reset.o timer.o mbox.o diff --git a/arch/arm/cpu/arm1176/bcm2835/init.c b/arch/arm/mach-bcm283x/init.c similarity index 100% rename from arch/arm/cpu/arm1176/bcm2835/init.c rename to arch/arm/mach-bcm283x/init.c diff --git a/arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S b/arch/arm/mach-bcm283x/lowlevel_init.S similarity index 100% rename from arch/arm/cpu/arm1176/bcm2835/lowlevel_init.S rename to arch/arm/mach-bcm283x/lowlevel_init.S diff --git a/arch/arm/cpu/arm1176/bcm2835/mbox.c b/arch/arm/mach-bcm283x/mbox.c similarity index 100% rename from arch/arm/cpu/arm1176/bcm2835/mbox.c rename to arch/arm/mach-bcm283x/mbox.c diff --git a/arch/arm/cpu/arm1176/bcm2835/reset.c b/arch/arm/mach-bcm283x/reset.c similarity index 100% rename from arch/arm/cpu/arm1176/bcm2835/reset.c rename to arch/arm/mach-bcm283x/reset.c diff --git a/arch/arm/cpu/arm1176/bcm2835/timer.c b/arch/arm/mach-bcm283x/timer.c similarity index 100% rename from arch/arm/cpu/arm1176/bcm2835/timer.c rename to arch/arm/mach-bcm283x/timer.c diff --git a/board/raspberrypi/rpi/Kconfig b/board/raspberrypi/rpi/Kconfig deleted file mode 100644 index 6a538cf..0000000 --- a/board/raspberrypi/rpi/Kconfig +++ /dev/null @@ -1,15 +0,0 @@ -if TARGET_RPI - -config SYS_BOARD - default "rpi" - -config SYS_VENDOR - default "raspberrypi" - -config SYS_SOC - default "bcm2835" - -config SYS_CONFIG_NAME - default "rpi" - -endif diff --git a/board/raspberrypi/rpi_2/Kconfig b/board/raspberrypi/rpi_2/Kconfig deleted file mode 100644 index 032184d..0000000 --- a/board/raspberrypi/rpi_2/Kconfig +++ /dev/null @@ -1,15 +0,0 @@ -if TARGET_RPI_2 - -config SYS_BOARD - default "rpi_2" - -config SYS_VENDOR - default "raspberrypi" - -config SYS_SOC - default "bcm2835" - -config SYS_CONFIG_NAME - default "rpi_2" - -endif diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig index 3075321..965fcae 100644 --- a/configs/rpi_2_defconfig +++ b/configs/rpi_2_defconfig @@ -1,2 +1,3 @@ CONFIG_ARM=y +CONFIG_ARCH_BCM283X=y CONFIG_TARGET_RPI_2=y diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig index 9379cf0..8de1d9f 100644 --- a/configs/rpi_defconfig +++ b/configs/rpi_defconfig @@ -1,2 +1,3 @@ CONFIG_ARM=y +CONFIG_ARCH_BCM283X=y CONFIG_TARGET_RPI=y

Move arch/arm/include/asm/arch-bcm283x/* -> arch/arm/mach-bcm283x/include/mach/*
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com Cc: Stephen Warren swarren@nvidia.com ---
Changes in v2: None
arch/arm/mach-bcm283x/Kconfig | 2 +- .../{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/gpio.h | 0 .../{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/mbox.h | 0 .../{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/sdhci.h | 0 .../{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/timer.h | 0 .../{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/wdog.h | 0 drivers/mmc/bcm2835_sdhci.c | 4 ++-- 7 files changed, 3 insertions(+), 3 deletions(-) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/gpio.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/mbox.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/sdhci.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/timer.h (100%) rename arch/arm/{include/asm/arch-bcm2835 => mach-bcm283x/include/mach}/wdog.h (100%)
diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig index d5e09e8..b43f2d9 100644 --- a/arch/arm/mach-bcm283x/Kconfig +++ b/arch/arm/mach-bcm283x/Kconfig @@ -31,7 +31,7 @@ config SYS_VENDOR default "raspberrypi"
config SYS_SOC - default "bcm2835" + default "bcm283x"
config SYS_CONFIG_NAME default "rpi" if TARGET_RPI diff --git a/arch/arm/include/asm/arch-bcm2835/gpio.h b/arch/arm/mach-bcm283x/include/mach/gpio.h similarity index 100% rename from arch/arm/include/asm/arch-bcm2835/gpio.h rename to arch/arm/mach-bcm283x/include/mach/gpio.h diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h b/arch/arm/mach-bcm283x/include/mach/mbox.h similarity index 100% rename from arch/arm/include/asm/arch-bcm2835/mbox.h rename to arch/arm/mach-bcm283x/include/mach/mbox.h diff --git a/arch/arm/include/asm/arch-bcm2835/sdhci.h b/arch/arm/mach-bcm283x/include/mach/sdhci.h similarity index 100% rename from arch/arm/include/asm/arch-bcm2835/sdhci.h rename to arch/arm/mach-bcm283x/include/mach/sdhci.h diff --git a/arch/arm/include/asm/arch-bcm2835/timer.h b/arch/arm/mach-bcm283x/include/mach/timer.h similarity index 100% rename from arch/arm/include/asm/arch-bcm2835/timer.h rename to arch/arm/mach-bcm283x/include/mach/timer.h diff --git a/arch/arm/include/asm/arch-bcm2835/wdog.h b/arch/arm/mach-bcm283x/include/mach/wdog.h similarity index 100% rename from arch/arm/include/asm/arch-bcm2835/wdog.h rename to arch/arm/mach-bcm283x/include/mach/wdog.h diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c index 92f7d89..4ec2968 100644 --- a/drivers/mmc/bcm2835_sdhci.c +++ b/drivers/mmc/bcm2835_sdhci.c @@ -39,8 +39,8 @@ #include <common.h> #include <malloc.h> #include <sdhci.h> -#include <asm/arch/timer.h> -#include <asm/arch-bcm2835/sdhci.h> +#include <mach/timer.h> +#include <mach/sdhci.h>
/* 400KHz is max freq for card ID etc. Use that as min */ #define MIN_FREQ 400000

2015-03-17 12:35 GMT+09:00 Masahiro Yamada yamada.masahiro@socionext.com:
Move arch/arm/include/asm/arch-bcm283x/* -> arch/arm/mach-bcm283x/include/mach/*
Signed-off-by: Masahiro Yamada yamada.masahiro@socionext.com Cc: Stephen Warren swarren@nvidia.com
Based on Stephen's comment in: http://lists.denx.de/pipermail/u-boot/2015-March/208135.html
Acked-by: Stephen Warren <swarren at wwwdotorg.org>
participants (2)
-
Angelo Dureghello
-
Masahiro Yamada