[U-Boot] [PATCH 1/6] sh: sh2: Add CONFIG_SH2 definition to config.mk of SH2

Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org --- arch/sh/cpu/sh2/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/cpu/sh2/config.mk b/arch/sh/cpu/sh2/config.mk index 8a0de96..69273b4 100644 --- a/arch/sh/cpu/sh2/config.mk +++ b/arch/sh/cpu/sh2/config.mk @@ -12,7 +12,7 @@ PLATFORM_CPPFLAGS += -m2a -m2a-nofpu -mb -ffreestanding else # SH2 PLATFORM_CPPFLAGS += -m3e -mb endif -PLATFORM_CPPFLAGS += $(call cc-option,-mno-fdpic) +PLATFORM_CPPFLAGS += -DCONFIG_SH2 $(call cc-option,-mno-fdpic)
PLATFORM_RELFLAGS += -ffixed-r13 PLATFORM_LDFLAGS += $(ENDIANNESS)

CONFIG_SH2 was already defined in arch/sh/sh2/config.mk. This removes CONFIG_SH2 from board config files of SH2.
Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org --- include/configs/rsk7203.h | 1 - include/configs/rsk7264.h | 1 - include/configs/rsk7269.h | 1 - 3 files changed, 3 deletions(-)
diff --git a/include/configs/rsk7203.h b/include/configs/rsk7203.h index d64579f..5920a26 100644 --- a/include/configs/rsk7203.h +++ b/include/configs/rsk7203.h @@ -11,7 +11,6 @@ #define __RSK7203_H
#undef DEBUG -#define CONFIG_SH2 1 #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 62b0618..5338cf2 100644 --- a/include/configs/rsk7264.h +++ b/include/configs/rsk7264.h @@ -12,7 +12,6 @@ #define __RSK7264_H
#undef DEBUG -#define CONFIG_SH2 1 #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 452f5b4..4796039 100644 --- a/include/configs/rsk7269.h +++ b/include/configs/rsk7269.h @@ -11,7 +11,6 @@ #define __RSK7269_H
#undef DEBUG -#define CONFIG_SH2 1 #define CONFIG_SH2A 1 #define CONFIG_CPU_SH7269 1 #define CONFIG_RSK7269 1

Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org --- arch/sh/cpu/sh3/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/cpu/sh3/config.mk b/arch/sh/cpu/sh3/config.mk index 5c77e5c..abd4b8d 100644 --- a/arch/sh/cpu/sh3/config.mk +++ b/arch/sh/cpu/sh3/config.mk @@ -11,5 +11,5 @@ # SPDX-License-Identifier: GPL-2.0+ # # -PLATFORM_CPPFLAGS += -m3 +PLATFORM_CPPFLAGS += -DCONFIG_SH3 -m3 PLATFORM_RELFLAGS += -ffixed-r13

CONFIG_SH3 was already defined in arch/sh/sh3/config.mk. This removes CONFIG_SH3 from board config files of SH3.
Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org --- include/configs/mpr2.h | 1 - include/configs/ms7720se.h | 1 - include/configs/shmin.h | 1 - 3 files changed, 3 deletions(-)
diff --git a/include/configs/mpr2.h b/include/configs/mpr2.h index 47ed694..8ae497c 100644 --- a/include/configs/mpr2.h +++ b/include/configs/mpr2.h @@ -24,7 +24,6 @@ #define CONFIG_VERSION_VARIABLE
/* CPU and platform */ -#define CONFIG_SH3 1 #define CONFIG_CPU_SH7720 1 #define CONFIG_MPR2 1
diff --git a/include/configs/ms7720se.h b/include/configs/ms7720se.h index 029f0e7..585d68f 100644 --- a/include/configs/ms7720se.h +++ b/include/configs/ms7720se.h @@ -9,7 +9,6 @@ #ifndef __MS7720SE_H #define __MS7720SE_H
-#define CONFIG_SH3 1 #define CONFIG_CPU_SH7720 1 #define CONFIG_MS7720SE 1
diff --git a/include/configs/shmin.h b/include/configs/shmin.h index 4f333b0..f8155ef 100644 --- a/include/configs/shmin.h +++ b/include/configs/shmin.h @@ -9,7 +9,6 @@ #ifndef __SHMIN_H #define __SHMIN_H
-#define CONFIG_SH3 1 #define CONFIG_CPU_SH7706 1 /* T-SH7706LAN */ #define CONFIG_SHMIN 1

Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org --- arch/sh/cpu/sh4/config.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk index c357557..753580b 100644 --- a/arch/sh/cpu/sh4/config.mk +++ b/arch/sh/cpu/sh4/config.mk @@ -8,5 +8,5 @@ # SPDX-License-Identifier: GPL-2.0+ # # -PLATFORM_CPPFLAGS += -m4-nofpu +PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu PLATFORM_RELFLAGS += -ffixed-r13

Hi Nobuhiro.
diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk index c357557..753580b 100644 --- a/arch/sh/cpu/sh4/config.mk +++ b/arch/sh/cpu/sh4/config.mk @@ -8,5 +8,5 @@ # SPDX-License-Identifier: GPL-2.0+ # # -PLATFORM_CPPFLAGS += -m4-nofpu +PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu PLATFORM_RELFLAGS += -ffixed-r13
Basically it looks good to me. But I have some comments.
Before this patch series, include/configs/r7780mp.h include/configs/sh7752evb.h include/configs/sh7753evb.h include/configs/sh7757lcr.h include/configs/sh7785lcr.h defined not CONFIG_SH4, but CONFIG_SH4A.
Now you are adding "CONFIG_SH4" to them too.
If we do not have to distinguish SH4A from SH4, can we delete "CONFIG_SH4A"?
It looks like we can re-write #if defined(CONFIG_SH4) || defined(CONFIG_SH4A) as #if defined(CONFIG_SH4)
in /arch/sh/include/asm/cache.h and /include/sh_tmu.h
Best Regards Masahiro Yamada

Hi,
I see. I will send different from this patch that takes your comments.
Best regards, Nobuhiro
2014/1/8 Masahiro Yamada yamada.m@jp.panasonic.com:
Hi Nobuhiro.
diff --git a/arch/sh/cpu/sh4/config.mk b/arch/sh/cpu/sh4/config.mk index c357557..753580b 100644 --- a/arch/sh/cpu/sh4/config.mk +++ b/arch/sh/cpu/sh4/config.mk @@ -8,5 +8,5 @@ # SPDX-License-Identifier: GPL-2.0+ # # -PLATFORM_CPPFLAGS += -m4-nofpu +PLATFORM_CPPFLAGS += -DCONFIG_SH4 -m4-nofpu PLATFORM_RELFLAGS += -ffixed-r13
Basically it looks good to me. But I have some comments.
Before this patch series, include/configs/r7780mp.h include/configs/sh7752evb.h include/configs/sh7753evb.h include/configs/sh7757lcr.h include/configs/sh7785lcr.h defined not CONFIG_SH4, but CONFIG_SH4A.
Now you are adding "CONFIG_SH4" to them too.
If we do not have to distinguish SH4A from SH4, can we delete "CONFIG_SH4A"?
It looks like we can re-write #if defined(CONFIG_SH4) || defined(CONFIG_SH4A) as #if defined(CONFIG_SH4)
in /arch/sh/include/asm/cache.h and /include/sh_tmu.h
Best Regards Masahiro Yamada

CONFIG_SH4 was already defined in arch/sh/sh4/config.mk. This removes CONFIG_SH4 from board config files of SH4.
Signed-off-by: Nobuhiro Iwamatsu iwamatsu@nigauri.org --- include/configs/MigoR.h | 1 - include/configs/ap325rxa.h | 1 - include/configs/ap_sh4a_4a.h | 1 - include/configs/ecovec.h | 1 - include/configs/espt.h | 1 - include/configs/ms7722se.h | 1 - include/configs/ms7750se.h | 1 - include/configs/r0p7734.h | 1 - include/configs/r2dplus.h | 1 - include/configs/sh7763rdp.h | 1 - 10 files changed, 10 deletions(-)
diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h index 47e3322..88df94f 100644 --- a/include/configs/MigoR.h +++ b/include/configs/MigoR.h @@ -10,7 +10,6 @@ #define __MIGO_R_H
#undef DEBUG -#define CONFIG_SH4 1 #define CONFIG_CPU_SH7722 1 #define CONFIG_MIGO_R 1
diff --git a/include/configs/ap325rxa.h b/include/configs/ap325rxa.h index a3c6b2b..462b2e2 100644 --- a/include/configs/ap325rxa.h +++ b/include/configs/ap325rxa.h @@ -11,7 +11,6 @@ #define __AP325RXA_H
#undef DEBUG -#define CONFIG_SH4 1 #define CONFIG_CPU_SH7723 1 #define CONFIG_AP325RXA 1
diff --git a/include/configs/ap_sh4a_4a.h b/include/configs/ap_sh4a_4a.h index 7478386..0162c3b 100644 --- a/include/configs/ap_sh4a_4a.h +++ b/include/configs/ap_sh4a_4a.h @@ -10,7 +10,6 @@ #define __AP_SH4A_4A_H
#undef DEBUG -#define CONFIG_SH4 1 #define CONFIG_SH4A 1 #define CONFIG_CPU_SH7734 1 #define CONFIG_AP_SH4A_4A 1 diff --git a/include/configs/ecovec.h b/include/configs/ecovec.h index a8f6dc9..ee9bd07 100644 --- a/include/configs/ecovec.h +++ b/include/configs/ecovec.h @@ -23,7 +23,6 @@ */
#undef DEBUG -#define CONFIG_SH4 1 #define CONFIG_SH4A 1 #define CONFIG_CPU_SH7724 1 #define CONFIG_BOARD_LATE_INIT 1 diff --git a/include/configs/espt.h b/include/configs/espt.h index 8493c24..de16be7 100644 --- a/include/configs/espt.h +++ b/include/configs/espt.h @@ -10,7 +10,6 @@ #ifndef __ESPT_H #define __ESPT_H
-#define CONFIG_SH4 1 #define CONFIG_CPU_SH7763 1 #define CONFIG_ESPT 1 #define __LITTLE_ENDIAN 1 diff --git a/include/configs/ms7722se.h b/include/configs/ms7722se.h index 20f8226..1c8ada6 100644 --- a/include/configs/ms7722se.h +++ b/include/configs/ms7722se.h @@ -9,7 +9,6 @@ #ifndef __MS7722SE_H #define __MS7722SE_H
-#define CONFIG_SH4 1 #define CONFIG_CPU_SH7722 1 #define CONFIG_MS7722SE 1
diff --git a/include/configs/ms7750se.h b/include/configs/ms7750se.h index d7285fd..4cf8efe 100644 --- a/include/configs/ms7750se.h +++ b/include/configs/ms7750se.h @@ -9,7 +9,6 @@ #ifndef __MS7750SE_H #define __MS7750SE_H
-#define CONFIG_SH4 1 #define CONFIG_CPU_SH7750 1 /* #define CONFIG_CPU_SH7751 1 */ /* #define CONFIG_CPU_TYPE_R 1 */ diff --git a/include/configs/r0p7734.h b/include/configs/r0p7734.h index 766d9b7..0bb7cc5 100644 --- a/include/configs/r0p7734.h +++ b/include/configs/r0p7734.h @@ -10,7 +10,6 @@ #define __R0P7734_H
#undef DEBUG -#define CONFIG_SH4 1 #define CONFIG_SH4A 1 #define CONFIG_CPU_SH7734 1 #define CONFIG_R0P7734 1 diff --git a/include/configs/r2dplus.h b/include/configs/r2dplus.h index 264abeb..24d0c34 100644 --- a/include/configs/r2dplus.h +++ b/include/configs/r2dplus.h @@ -3,7 +3,6 @@
#undef DEBUG
-#define CONFIG_SH4 1 #define CONFIG_CPU_SH7751 1 #define CONFIG_CPU_SH_TYPE_R 1 #define CONFIG_R2DPLUS 1 diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h index 0b19e05..2438318 100644 --- a/include/configs/sh7763rdp.h +++ b/include/configs/sh7763rdp.h @@ -10,7 +10,6 @@ #ifndef __SH7763RDP_H #define __SH7763RDP_H
-#define CONFIG_SH4 1 #define CONFIG_CPU_SH7763 1 #define CONFIG_SH7763RDP 1 #define __LITTLE_ENDIAN 1
participants (2)
-
Masahiro Yamada
-
Nobuhiro Iwamatsu