Skip to contentSkip to conversation

sh: Use SYS_SUPPORTS_32BIT for managing 32BIT dependencies.

PATCH In review Jean-Christophe PLAGNIOL-VILLARD 2 participants 2 messages Oct 24, 2009 – Oct 26, 2009 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: Use SYS_SUPPORTS_32BIT for managing 32BIT dependencies.

---
 arch/sh/Kconfig    |    6 ++++++
 arch/sh/mm/Kconfig |    8 +++-----
 2 files changed, 9 insertions(+), 5 deletions(-)
arch/sh/Kconfig +6 -0
index 0dc7e3c..20a3488 100644
@@ -121,6 +121,9 @@ config SYS_SUPPORTS_APM_EMULATION
 	bool
 	select ARCH_SUSPEND_POSSIBLE
 
+config SYS_SUPPORTS_32BIT
+	bool
+
 config SYS_SUPPORTS_SMP
 	bool
 
@@ -402,6 +405,7 @@ config CPU_SUBTYPE_SH7757
 	bool "Support SH7757 processor"
 	select CPU_SH4A
 	select CPU_SHX2
+	select SYS_SUPPORTS_32BIT
 	help
 	  Select SH7757 if you have a SH4A SH7757 CPU.
 
@@ -418,12 +422,14 @@ config CPU_SUBTYPE_SH7770
 config CPU_SUBTYPE_SH7780
 	bool "Support SH7780 processor"
 	select CPU_SH4A
+	select SYS_SUPPORTS_32BIT
 
 config CPU_SUBTYPE_SH7785
 	bool "Support SH7785 processor"
 	select CPU_SH4A
 	select CPU_SHX2
 	select ARCH_SPARSEMEM_ENABLE
+	select SYS_SUPPORTS_32BIT
 	select SYS_SUPPORTS_NUMA
 
 config CPU_SUBTYPE_SH7786
arch/sh/mm/Kconfig +3 -5
index 64dc1ad..64b5d43 100644
@@ -82,7 +82,7 @@ config 32BIT
 
 config PMB_ENABLE
 	bool "Support 32-bit physical addressing through PMB"
-	depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
+	depends on MMU && EXPERIMENTAL && SYS_SUPPORTS_32BIT
 	select 32BIT
 	default y
 	help
@@ -97,7 +97,7 @@ choice
 
 config PMB
 	bool "PMB"
-	depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
+	depends on MMU && EXPERIMENTAL && SYS_SUPPORTS_32BIT
 	select 32BIT
 	help
 	  If you say Y here, physical addressing will be extended to
@@ -106,9 +106,7 @@ config PMB
 
 config PMB_FIXED
 	bool "fixed PMB"
-	depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || \
-					   CPU_SUBTYPE_SH7780 || \
-					   CPU_SUBTYPE_SH7785)
+	depends on MMU && EXPERIMENTAL && SYS_SUPPORTS_32BIT
 	select 32BIT
 	help
 	  If this option is enabled, fixed PMB mappings are inherited
Signature · 1 line
1.6.4
#1 lore raw

arch/sh/mm/Kconfig config 32BIT · line 88

Quoted 13 lines · Jean-Christophe PLAGNIOL-VILLARD
arch/sh/mm/Kconfig +1 -1
index 64dc1ad..64b5d43 100644
@@ -82,7 +82,7 @@ config 32BIT
 
 config PMB_ENABLE
 	bool "Support 32-bit physical addressing through PMB"
-	depends on MMU && EXPERIMENTAL && (CPU_SUBTYPE_SH7757 || CPU_SUBTYPE_SH7780 || CPU_SUBTYPE_SH7785)
+	depends on MMU && EXPERIMENTAL && SYS_SUPPORTS_32BIT
 	select 32BIT
 	default y
 	help

I don't recall why we started conditionalizing this in the first place. I think it was because out of the first-gen SH-4A boards the SH7770 was lacking support for the PMB, while SH7780 had it, as did SH73180. Any sensible SH-4A part ought to have the PMB, so it probably makes more sense to just invert the logic and explicitly disable it for the one-off chips that don't make any sense in the first place.