From 44442c13ba2f63a67664ab5cc7ce6c2fe009e4a0 Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Thu, 6 Nov 2014 14:03:03 +0100 Subject: board/renesas/ecovec/ecovec.c: fix buffer overflow Fix error detected by cppcheck: [board/renesas/ecovec/ecovec.c:66]: (error) Buffer is accessed out of bounds. Signed-off-by: Wolfgang Denk Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu diff --git a/board/renesas/ecovec/ecovec.c b/board/renesas/ecovec/ecovec.c index 2804d91..d862d99 100644 --- a/board/renesas/ecovec/ecovec.c +++ b/board/renesas/ecovec/ecovec.c @@ -41,7 +41,7 @@ static void debug_led(u8 led) int board_late_init(void) { u8 mac[6]; - char env_mac[17]; + char env_mac[18]; udelay(1000); -- cgit v0.10.2 From 0e29429f76e5578771c80c6d9e160440944a77f2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 6 Nov 2014 15:55:20 +0900 Subject: sh: use more descriptive prompts for board select menu The current prompts were added by a conversion tool based on board directory names when switching to Kconfig. Use better prompts mostly taken from from arch/sh/boards/* of Linux Kernel. Signed-off-by: Masahiro Yamada Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 4bf9afc..031ff6d 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -8,67 +8,67 @@ choice prompt "Target select" config TARGET_RSK7203 - bool "Support rsk7203" + bool "RSK+ 7203" config TARGET_RSK7264 - bool "Support rsk7264" + bool "RSK2+SH7264" config TARGET_RSK7269 - bool "Support rsk7269" + bool "RSK2+SH7269" config TARGET_MPR2 - bool "Support mpr2" + bool "Magic Panel Release 2 board" config TARGET_MS7720SE bool "Support ms7720se" config TARGET_SHMIN - bool "Support shmin" + bool "SHMIN" config TARGET_ESPT - bool "Support espt" + bool "Data Technology ESPT-GIGA board" config TARGET_MS7722SE - bool "Support ms7722se" + bool "SolutionEngine 7722" config TARGET_MS7750SE - bool "Support ms7750se" + bool "SolutionEngine 7750" config TARGET_AP_SH4A_4A - bool "Support ap_sh4a_4a" + bool "ALPHAPROJECT AP-SH4A-4A" config TARGET_AP325RXA - bool "Support ap325rxa" + bool "Renesas AP-325RXA" config TARGET_ECOVEC - bool "Support ecovec" + bool "EcoVec" config TARGET_MIGOR - bool "Support MigoR" + bool "Migo-R" config TARGET_R0P7734 bool "Support r0p7734" config TARGET_R2DPLUS - bool "Support r2dplus" + bool "Renesas R2D-PLUS" config TARGET_R7780MP - bool "Support r7780mp" + bool "R7780MP board" config TARGET_SH7752EVB - bool "Support sh7752evb" + bool "SH7752EVB" config TARGET_SH7753EVB - bool "Support sh7753evb" + bool "SH7753EVB" config TARGET_SH7757LCR - bool "Support sh7757lcr" + bool "SH7757LCR" config TARGET_SH7763RDP - bool "Support sh7763rdp" + bool "SH7763RDP" config TARGET_SH7785LCR - bool "Support sh7785lcr" + bool "SH7785LCR" endchoice -- cgit v0.10.2 From 7d2366627e1f4d1dbf80e65d5bf72b832ca128c9 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 6 Nov 2014 15:55:21 +0900 Subject: sh: move CONFIG_{SH2, SH2A, SH3, SH4} to Kconfig This commit moves CONFIG_SH2, CONFIG_SH2A, CONFIG_SH3, CONFIG_SH4 to Kconfig renaming into CONFIG_CPU_SH2, CONFIG_CPU_SH2A, CONFIG_CPU_SH3, CONFIG_CPU_SH4, respectively because arch/sh/Kconfig of Linux uses CONFIG_CPU_SH* convention. Signed-off-by: Masahiro Yamada Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 031ff6d..49b00da 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -4,71 +4,109 @@ menu "SuperH architecture" config SYS_ARCH default "sh" +config CPU_SH2 + bool + +config CPU_SH2A + bool + select CPU_SH2 + +config CPU_SH3 + bool + +config CPU_SH4 + bool + +config CPU_SH4A + bool + select CPU_SH4 + choice prompt "Target select" config TARGET_RSK7203 bool "RSK+ 7203" + select CPU_SH2A config TARGET_RSK7264 bool "RSK2+SH7264" + select CPU_SH2A config TARGET_RSK7269 bool "RSK2+SH7269" + select CPU_SH2A config TARGET_MPR2 bool "Magic Panel Release 2 board" + select CPU_SH3 config TARGET_MS7720SE bool "Support ms7720se" + select CPU_SH3 config TARGET_SHMIN bool "SHMIN" + select CPU_SH3 config TARGET_ESPT bool "Data Technology ESPT-GIGA board" + select CPU_SH4 config TARGET_MS7722SE bool "SolutionEngine 7722" + select CPU_SH4 config TARGET_MS7750SE bool "SolutionEngine 7750" + select CPU_SH4 config TARGET_AP_SH4A_4A bool "ALPHAPROJECT AP-SH4A-4A" + select CPU_SH4 config TARGET_AP325RXA bool "Renesas AP-325RXA" + select CPU_SH4 config TARGET_ECOVEC bool "EcoVec" + select CPU_SH4 config TARGET_MIGOR bool "Migo-R" + select CPU_SH4 config TARGET_R0P7734 bool "Support r0p7734" + select CPU_SH4 config TARGET_R2DPLUS bool "Renesas R2D-PLUS" + select CPU_SH4 config TARGET_R7780MP bool "R7780MP board" + select CPU_SH4 config TARGET_SH7752EVB bool "SH7752EVB" + select CPU_SH4 config TARGET_SH7753EVB bool "SH7753EVB" + select CPU_SH4 config TARGET_SH7757LCR bool "SH7757LCR" + select CPU_SH4 config TARGET_SH7763RDP bool "SH7763RDP" + select CPU_SH4 config TARGET_SH7785LCR bool "SH7785LCR" + select CPU_SH4 endchoice diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index 4904d76..12e202d 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -7,11 +7,11 @@ # ENDIANNESS += -EB -ifdef CONFIG_SH2A +ifdef CONFIG_CPU_SH2A PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb else # SH2 PLATFORM_CPPFLAGS += -m3e -mb endif -PLATFORM_CPPFLAGS += -DCONFIG_SH2 $(call cc-option,-mno-fdpic) +PLATFORM_CPPFLAGS += $(call cc-option,-mno-fdpic) PLATFORM_LDFLAGS += $(ENDIANNESS) diff --git a/arch/sh/cpu/sh3/config.mk b/arch/sh/cpu/sh3/config.mk index 24b5c47..dcafd19 100644 --- a/arch/sh/cpu/sh3/config.mk +++ b/arch/sh/cpu/sh3/config.mk @@ -11,4 +11,4 @@ # SPDX-License-Identifier: GPL-2.0+ # # -PLATFORM_CPPFLAGS += -DCONFIG_SH3 -m3 +PLATFORM_CPPFLAGS += -m3 diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk index 5773d4f..4fb2dc2 100644 --- a/arch/sh/cpu/sh4/config.mk +++ b/arch/sh/cpu/sh4/config.mk @@ -8,4 +8,4 @@ # SPDX-License-Identifier: GPL-2.0+ # # -PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu +PLATFORM_CPPFLAGS += -m4-nofpu diff --git a/arch/sh/include/asm/cache.h b/arch/sh/include/asm/cache.h index 0698a37..abaf405 100644 --- a/arch/sh/include/asm/cache.h +++ b/arch/sh/include/asm/cache.h @@ -1,7 +1,7 @@ #ifndef __ASM_SH_CACHE_H #define __ASM_SH_CACHE_H -#if defined(CONFIG_SH4) +#if defined(CONFIG_CPU_SH4) int cache_control(unsigned int cmd); @@ -18,7 +18,7 @@ struct __large_struct { unsigned long buf[100]; }; */ #define ARCH_DMA_MINALIGN 32 -#endif /* CONFIG_SH4 */ +#endif /* CONFIG_CPU_SH4 */ /* * Use the L1 data cache line size value for the minimum DMA buffer alignment diff --git a/arch/sh/include/asm/processor.h b/arch/sh/include/asm/processor.h index b8677da..b07fe54 100644 --- a/arch/sh/include/asm/processor.h +++ b/arch/sh/include/asm/processor.h @@ -1,10 +1,10 @@ #ifndef _ASM_SH_PROCESSOR_H_ #define _ASM_SH_PROCESSOR_H_ -#if defined(CONFIG_SH2) +#if defined(CONFIG_CPU_SH2) # include -#elif defined(CONFIG_SH3) +#elif defined(CONFIG_CPU_SH3) # include -#elif defined(CONFIG_SH4) +#elif defined(CONFIG_CPU_SH4) # include #endif #endif diff --git a/arch/sh/lib/Makefile b/arch/sh/lib/Makefile index 8a84b24..1304f4e 100644 --- a/arch/sh/lib/Makefile +++ b/arch/sh/lib/Makefile @@ -8,7 +8,7 @@ obj-y += board.o obj-$(CONFIG_CMD_BOOTM) += bootm.o -ifeq ($(CONFIG_SH2),y) +ifeq ($(CONFIG_CPU_SH2),y) obj-y += time_sh2.o else obj-y += time.o diff --git a/drivers/serial/serial_sh.h b/drivers/serial/serial_sh.h index 53406e5..ef88c8f 100644 --- a/drivers/serial/serial_sh.h +++ b/drivers/serial/serial_sh.h @@ -433,7 +433,7 @@ static inline void sci_##name##_out(struct uart_port *port,\ SCI_OUT(sci_size, sci_offset, value);\ } -#if defined(CONFIG_SH3) || \ +#if defined(CONFIG_CPU_SH3) || \ defined(CONFIG_ARCH_SH7367) || \ defined(CONFIG_ARCH_SH7377) || \ defined(CONFIG_ARCH_SH7372) || \ diff --git a/include/configs/rsk7203.h b/include/configs/rsk7203.h index 5436324..e7f7387 100644 --- a/include/configs/rsk7203.h +++ b/include/configs/rsk7203.h @@ -11,7 +11,6 @@ #define __RSK7203_H #undef DEBUG -#define CONFIG_SH2A 1 #define CONFIG_CPU_SH7203 1 #define CONFIG_RSK7203 1 diff --git a/include/configs/rsk7264.h b/include/configs/rsk7264.h index 4aaa3ef..2ecf785 100644 --- a/include/configs/rsk7264.h +++ b/include/configs/rsk7264.h @@ -12,7 +12,6 @@ #define __RSK7264_H #undef DEBUG -#define CONFIG_SH2A 1 #define CONFIG_CPU_SH7264 1 #define CONFIG_RSK7264 1 diff --git a/include/configs/rsk7269.h b/include/configs/rsk7269.h index 11fc231..14c1da7 100644 --- a/include/configs/rsk7269.h +++ b/include/configs/rsk7269.h @@ -11,7 +11,6 @@ #define __RSK7269_H #undef DEBUG -#define CONFIG_SH2A 1 #define CONFIG_CPU_SH7269 1 #define CONFIG_RSK7269 1 diff --git a/include/sh_tmu.h b/include/sh_tmu.h index 61afc71..97d578d 100644 --- a/include/sh_tmu.h +++ b/include/sh_tmu.h @@ -25,7 +25,7 @@ #include -#if defined(CONFIG_SH3) +#if defined(CONFIG_CPU_SH3) struct tmu_regs { u8 tocr; u8 reserved0; @@ -45,9 +45,9 @@ struct tmu_regs { u16 reserved4; u32 tcpr2; }; -#endif /* CONFIG_SH3 */ +#endif /* CONFIG_CPU_SH3 */ -#if defined(CONFIG_SH4) || defined(CONFIG_RMOBILE) +#if defined(CONFIG_CPU_SH4) || defined(CONFIG_RMOBILE) struct tmu_regs { u32 reserved; u8 tstr; @@ -65,7 +65,7 @@ struct tmu_regs { u16 tcr2; u16 reserved5; }; -#endif /* CONFIG_SH4 */ +#endif /* CONFIG_CPU_SH4 */ static inline unsigned long get_tmu0_clk_rate(void) { -- cgit v0.10.2 From 887363b5f0441b8ec22b586ac77df4bf5a1b09f1 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 6 Nov 2014 15:55:22 +0900 Subject: sh: consolidate CONFIG_SYS_CPU defines Now each board selects one of CONFIG_CPU_SH2, CONFIG_CPU_SH3, CONFIG_CPU_SH4, so let's move CONFIG_SYS_CPU definition to arch/sh/Kconfig. Signed-off-by: Masahiro Yamada Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 49b00da..a77e6f9 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -1,9 +1,6 @@ menu "SuperH architecture" depends on SH -config SYS_ARCH - default "sh" - config CPU_SH2 bool @@ -110,6 +107,14 @@ config TARGET_SH7785LCR endchoice +config SYS_ARCH + default "sh" + +config SYS_CPU + default "sh2" if CPU_SH2 + default "sh3" if CPU_SH3 + default "sh4" if CPU_SH4 + source "board/alphaproject/ap_sh4a_4a/Kconfig" source "board/espt/Kconfig" source "board/mpr2/Kconfig" diff --git a/board/alphaproject/ap_sh4a_4a/Kconfig b/board/alphaproject/ap_sh4a_4a/Kconfig index 2352e66..4692851 100644 --- a/board/alphaproject/ap_sh4a_4a/Kconfig +++ b/board/alphaproject/ap_sh4a_4a/Kconfig @@ -1,8 +1,5 @@ if TARGET_AP_SH4A_4A -config SYS_CPU - default "sh4" - config SYS_BOARD default "ap_sh4a_4a" diff --git a/board/espt/Kconfig b/board/espt/Kconfig index 6c7cd24..0294926 100644 --- a/board/espt/Kconfig +++ b/board/espt/Kconfig @@ -1,8 +1,5 @@ if TARGET_ESPT -config SYS_CPU - default "sh4" - config SYS_BOARD default "espt" diff --git a/board/mpr2/Kconfig b/board/mpr2/Kconfig index 79a60c2..54176e8 100644 --- a/board/mpr2/Kconfig +++ b/board/mpr2/Kconfig @@ -1,8 +1,5 @@ if TARGET_MPR2 -config SYS_CPU - default "sh3" - config SYS_BOARD default "mpr2" diff --git a/board/ms7720se/Kconfig b/board/ms7720se/Kconfig index d935aff..8331327 100644 --- a/board/ms7720se/Kconfig +++ b/board/ms7720se/Kconfig @@ -1,8 +1,5 @@ if TARGET_MS7720SE -config SYS_CPU - default "sh3" - config SYS_BOARD default "ms7720se" diff --git a/board/ms7722se/Kconfig b/board/ms7722se/Kconfig index 17073e8..39027c9 100644 --- a/board/ms7722se/Kconfig +++ b/board/ms7722se/Kconfig @@ -1,8 +1,5 @@ if TARGET_MS7722SE -config SYS_CPU - default "sh4" - config SYS_BOARD default "ms7722se" diff --git a/board/ms7750se/Kconfig b/board/ms7750se/Kconfig index 07aa024..2c0b88c 100644 --- a/board/ms7750se/Kconfig +++ b/board/ms7750se/Kconfig @@ -1,8 +1,5 @@ if TARGET_MS7750SE -config SYS_CPU - default "sh4" - config SYS_BOARD default "ms7750se" diff --git a/board/renesas/MigoR/Kconfig b/board/renesas/MigoR/Kconfig index 10dffed..25b170a 100644 --- a/board/renesas/MigoR/Kconfig +++ b/board/renesas/MigoR/Kconfig @@ -1,8 +1,5 @@ if TARGET_MIGOR -config SYS_CPU - default "sh4" - config SYS_BOARD default "MigoR" diff --git a/board/renesas/ap325rxa/Kconfig b/board/renesas/ap325rxa/Kconfig index 45bd600..c8f2de2 100644 --- a/board/renesas/ap325rxa/Kconfig +++ b/board/renesas/ap325rxa/Kconfig @@ -1,8 +1,5 @@ if TARGET_AP325RXA -config SYS_CPU - default "sh4" - config SYS_BOARD default "ap325rxa" diff --git a/board/renesas/ecovec/Kconfig b/board/renesas/ecovec/Kconfig index a24fe91..08cde83 100644 --- a/board/renesas/ecovec/Kconfig +++ b/board/renesas/ecovec/Kconfig @@ -1,8 +1,5 @@ if TARGET_ECOVEC -config SYS_CPU - default "sh4" - config SYS_BOARD default "ecovec" diff --git a/board/renesas/r0p7734/Kconfig b/board/renesas/r0p7734/Kconfig index bda785d..7f24f41 100644 --- a/board/renesas/r0p7734/Kconfig +++ b/board/renesas/r0p7734/Kconfig @@ -1,8 +1,5 @@ if TARGET_R0P7734 -config SYS_CPU - default "sh4" - config SYS_BOARD default "r0p7734" diff --git a/board/renesas/r2dplus/Kconfig b/board/renesas/r2dplus/Kconfig index c55c109..6597870 100644 --- a/board/renesas/r2dplus/Kconfig +++ b/board/renesas/r2dplus/Kconfig @@ -1,8 +1,5 @@ if TARGET_R2DPLUS -config SYS_CPU - default "sh4" - config SYS_BOARD default "r2dplus" diff --git a/board/renesas/r7780mp/Kconfig b/board/renesas/r7780mp/Kconfig index 2d3cbec..050cc4c 100644 --- a/board/renesas/r7780mp/Kconfig +++ b/board/renesas/r7780mp/Kconfig @@ -1,8 +1,5 @@ if TARGET_R7780MP -config SYS_CPU - default "sh4" - config SYS_BOARD default "r7780mp" diff --git a/board/renesas/rsk7203/Kconfig b/board/renesas/rsk7203/Kconfig index 5eb2923..10b8786 100644 --- a/board/renesas/rsk7203/Kconfig +++ b/board/renesas/rsk7203/Kconfig @@ -1,8 +1,5 @@ if TARGET_RSK7203 -config SYS_CPU - default "sh2" - config SYS_BOARD default "rsk7203" diff --git a/board/renesas/rsk7264/Kconfig b/board/renesas/rsk7264/Kconfig index af71295..755d289 100644 --- a/board/renesas/rsk7264/Kconfig +++ b/board/renesas/rsk7264/Kconfig @@ -1,8 +1,5 @@ if TARGET_RSK7264 -config SYS_CPU - default "sh2" - config SYS_BOARD default "rsk7264" diff --git a/board/renesas/rsk7269/Kconfig b/board/renesas/rsk7269/Kconfig index cc0092c..ab5cd0e 100644 --- a/board/renesas/rsk7269/Kconfig +++ b/board/renesas/rsk7269/Kconfig @@ -1,8 +1,5 @@ if TARGET_RSK7269 -config SYS_CPU - default "sh2" - config SYS_BOARD default "rsk7269" diff --git a/board/renesas/sh7752evb/Kconfig b/board/renesas/sh7752evb/Kconfig index 7c6aae9..7f40888 100644 --- a/board/renesas/sh7752evb/Kconfig +++ b/board/renesas/sh7752evb/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7752EVB -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7752evb" diff --git a/board/renesas/sh7753evb/Kconfig b/board/renesas/sh7753evb/Kconfig index 8abdea0..be88924 100644 --- a/board/renesas/sh7753evb/Kconfig +++ b/board/renesas/sh7753evb/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7753EVB -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7753evb" diff --git a/board/renesas/sh7757lcr/Kconfig b/board/renesas/sh7757lcr/Kconfig index 97d966f..3fba80d 100644 --- a/board/renesas/sh7757lcr/Kconfig +++ b/board/renesas/sh7757lcr/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7757LCR -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7757lcr" diff --git a/board/renesas/sh7763rdp/Kconfig b/board/renesas/sh7763rdp/Kconfig index d512988..101d2b5 100644 --- a/board/renesas/sh7763rdp/Kconfig +++ b/board/renesas/sh7763rdp/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7763RDP -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7763rdp" diff --git a/board/renesas/sh7785lcr/Kconfig b/board/renesas/sh7785lcr/Kconfig index 15787e6..e204c76 100644 --- a/board/renesas/sh7785lcr/Kconfig +++ b/board/renesas/sh7785lcr/Kconfig @@ -1,8 +1,5 @@ if TARGET_SH7785LCR -config SYS_CPU - default "sh4" - config SYS_BOARD default "sh7785lcr" diff --git a/board/shmin/Kconfig b/board/shmin/Kconfig index a1c383e..467580c 100644 --- a/board/shmin/Kconfig +++ b/board/shmin/Kconfig @@ -1,8 +1,5 @@ if TARGET_SHMIN -config SYS_CPU - default "sh3" - config SYS_BOARD default "shmin" -- cgit v0.10.2 From f97eeba44571fa3d85bdbc1161de7f24496227c0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 6 Nov 2014 15:55:23 +0900 Subject: sh: define CONFIG_CPU_SH4A for some boards Precisely, these boards are SH4A rather than SH4. Signed-off-by: Masahiro Yamada Cc: Nobuhiro Iwamatsu Signed-off-by: Nobuhiro Iwamatsu diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index a77e6f9..685406b 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -59,7 +59,7 @@ config TARGET_MS7750SE config TARGET_AP_SH4A_4A bool "ALPHAPROJECT AP-SH4A-4A" - select CPU_SH4 + select CPU_SH4A config TARGET_AP325RXA bool "Renesas AP-325RXA" @@ -67,7 +67,7 @@ config TARGET_AP325RXA config TARGET_ECOVEC bool "EcoVec" - select CPU_SH4 + select CPU_SH4A config TARGET_MIGOR bool "Migo-R" @@ -75,7 +75,7 @@ config TARGET_MIGOR config TARGET_R0P7734 bool "Support r0p7734" - select CPU_SH4 + select CPU_SH4A config TARGET_R2DPLUS bool "Renesas R2D-PLUS" @@ -83,11 +83,11 @@ config TARGET_R2DPLUS config TARGET_R7780MP bool "R7780MP board" - select CPU_SH4 + select CPU_SH4A config TARGET_SH7752EVB bool "SH7752EVB" - select CPU_SH4 + select CPU_SH4A config TARGET_SH7753EVB bool "SH7753EVB" @@ -95,7 +95,7 @@ config TARGET_SH7753EVB config TARGET_SH7757LCR bool "SH7757LCR" - select CPU_SH4 + select CPU_SH4A config TARGET_SH7763RDP bool "SH7763RDP" @@ -103,7 +103,7 @@ config TARGET_SH7763RDP config TARGET_SH7785LCR bool "SH7785LCR" - select CPU_SH4 + select CPU_SH4A endchoice -- cgit v0.10.2 From 570dd7f441c2d2d2e83a9345608801c92e7d2c6f Mon Sep 17 00:00:00 2001 From: Nobuhiro Iwamatsu Date: Fri, 14 Nov 2014 12:52:47 +0900 Subject: sh: Move SH_32BIT to Kconfig This moves SH_32BIT to Kconfig, and removes SH_32BIT from config files. Signed-off-by: Nobuhiro Iwamatsu diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 685406b..ff8f5b5 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -18,6 +18,15 @@ config CPU_SH4A bool select CPU_SH4 +config SH_32BIT + bool "32bit mode" + depends on CPU_SH4A + default n + help + SH4A has 2 physical memory maps. This use 32bit mode. + And this is board specific. Please check your board if you + want to use this. + choice prompt "Target select" diff --git a/configs/sh7752evb_defconfig b/configs/sh7752evb_defconfig index 124154c..1f7c6d0 100644 --- a/configs/sh7752evb_defconfig +++ b/configs/sh7752evb_defconfig @@ -1,2 +1,3 @@ CONFIG_SH=y +CONFIG_SH_32BIT=y CONFIG_TARGET_SH7752EVB=y diff --git a/configs/sh7753evb_defconfig b/configs/sh7753evb_defconfig index 9ff4121..35809e9 100644 --- a/configs/sh7753evb_defconfig +++ b/configs/sh7753evb_defconfig @@ -1,2 +1,3 @@ CONFIG_SH=y +CONFIG_SH_32BIT=y CONFIG_TARGET_SH7753EVB=y diff --git a/configs/sh7757lcr_defconfig b/configs/sh7757lcr_defconfig index 3066d97..ffcf961 100644 --- a/configs/sh7757lcr_defconfig +++ b/configs/sh7757lcr_defconfig @@ -1,2 +1,3 @@ CONFIG_SH=y +CONFIG_SH_32BIT=y CONFIG_TARGET_SH7757LCR=y diff --git a/configs/sh7785lcr_32bit_defconfig b/configs/sh7785lcr_32bit_defconfig index 7cf93b4..31b84ff 100644 --- a/configs/sh7785lcr_32bit_defconfig +++ b/configs/sh7785lcr_32bit_defconfig @@ -1,3 +1,3 @@ -CONFIG_SYS_EXTRA_OPTIONS="SH_32BIT=1" CONFIG_SH=y +CONFIG_SH_32BIT=y CONFIG_TARGET_SH7785LCR=y diff --git a/include/configs/sh7752evb.h b/include/configs/sh7752evb.h index f06abbc..2d509a9 100644 --- a/include/configs/sh7752evb.h +++ b/include/configs/sh7752evb.h @@ -10,7 +10,6 @@ #define __SH7752EVB_H #undef DEBUG -#define CONFIG_SH_32BIT 1 #define CONFIG_CPU_SH7752 1 #define CONFIG_SH7752EVB 1 diff --git a/include/configs/sh7753evb.h b/include/configs/sh7753evb.h index e400db0..c31dd7a 100644 --- a/include/configs/sh7753evb.h +++ b/include/configs/sh7753evb.h @@ -10,7 +10,6 @@ #define __SH7753EVB_H #undef DEBUG -#define CONFIG_SH_32BIT 1 #define CONFIG_CPU_SH7753 1 #define CONFIG_SH7753EVB 1 diff --git a/include/configs/sh7757lcr.h b/include/configs/sh7757lcr.h index 08bff1d..36afd5f 100644 --- a/include/configs/sh7757lcr.h +++ b/include/configs/sh7757lcr.h @@ -10,7 +10,6 @@ #define __SH7757LCR_H #undef DEBUG -#define CONFIG_SH_32BIT 1 #define CONFIG_CPU_SH7757 1 #define CONFIG_SH7757LCR 1 #define CONFIG_SH7757LCR_DDR_ECC 1 -- cgit v0.10.2