aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2007-05-15 03:25:47 -0400
committerPaul Mundt <lethal@hera.kernel.org>2007-06-07 22:43:40 -0400
commit05627486ab7f31ea09d8bb7a83582ca0185dc283 (patch)
tree79189f3118568cff90b374d433de0ea2c8b2fe1f
parentfd8f20e8e2f8f1d9201086bff444c8d35f0a6a45 (diff)
sh: Fix SH-4 CPU selects.
Now that select no longer works for selecting the "closest" CPU, we have to explicitly reference the precise sub-type in the few places where it actually matters (presently only setup code and some legacy sh-sci cruft). Signed-off-by: Paul Mundt <lethal@linux-sh.org>
-rw-r--r--arch/sh/Kconfig6
-rw-r--r--arch/sh/kernel/cpu/sh4/Makefile4
-rw-r--r--arch/sh/mm/Kconfig4
-rw-r--r--drivers/serial/sh-sci.h25
4 files changed, 26 insertions, 13 deletions
diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
index 6c42c8ed9781..78f5f2305132 100644
--- a/arch/sh/Kconfig
+++ b/arch/sh/Kconfig
@@ -467,13 +467,13 @@ config SH_PCLK_FREQ
467 int "Peripheral clock frequency (in Hz)" 467 int "Peripheral clock frequency (in Hz)"
468 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343 468 default "27000000" if CPU_SUBTYPE_SH73180 || CPU_SUBTYPE_SH7343
469 default "31250000" if CPU_SUBTYPE_SH7619 469 default "31250000" if CPU_SUBTYPE_SH7619
470 default "32000000" if CPU_SUBTYPE_SH7722
470 default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \ 471 default "33333333" if CPU_SUBTYPE_SH7300 || CPU_SUBTYPE_SH7770 || \
471 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \ 472 CPU_SUBTYPE_SH7760 || CPU_SUBTYPE_SH7705 || \
472 CPU_SUBTYPE_SH7206 473 CPU_SUBTYPE_SH7206
473 default "50000000" if CPU_SUBTYPE_SH7750 || CPU_SUBTYPE_SH7780 || \ 474 default "60000000" if CPU_SUBTYPE_SH7751 || CPU_SUBTYPE_SH7751R
474 CPU_SUBTYPE_SH7785
475 default "60000000" if CPU_SUBTYPE_SH7751
476 default "66000000" if CPU_SUBTYPE_SH4_202 475 default "66000000" if CPU_SUBTYPE_SH4_202
476 default "50000000"
477 help 477 help
478 This option is used to specify the peripheral clock frequency. 478 This option is used to specify the peripheral clock frequency.
479 This is necessary for determining the reference clock value on 479 This is necessary for determining the reference clock value on
diff --git a/arch/sh/kernel/cpu/sh4/Makefile b/arch/sh/kernel/cpu/sh4/Makefile
index 8add10bd8268..dadd6bffc128 100644
--- a/arch/sh/kernel/cpu/sh4/Makefile
+++ b/arch/sh/kernel/cpu/sh4/Makefile
@@ -10,7 +10,11 @@ obj-$(CONFIG_SH_STORE_QUEUES) += sq.o
10 10
11# CPU subtype setup 11# CPU subtype setup
12obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o 12obj-$(CONFIG_CPU_SUBTYPE_SH7750) += setup-sh7750.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7750R) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7750S) += setup-sh7750.o
15obj-$(CONFIG_CPU_SUBTYPE_SH7091) += setup-sh7750.o
13obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o 16obj-$(CONFIG_CPU_SUBTYPE_SH7751) += setup-sh7750.o
17obj-$(CONFIG_CPU_SUBTYPE_SH7751R) += setup-sh7750.o
14obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o 18obj-$(CONFIG_CPU_SUBTYPE_SH7760) += setup-sh7760.o
15obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o 19obj-$(CONFIG_CPU_SUBTYPE_SH4_202) += setup-sh4-202.o
16 20
diff --git a/arch/sh/mm/Kconfig b/arch/sh/mm/Kconfig
index 8f826b03f9fe..00f64c41edba 100644
--- a/arch/sh/mm/Kconfig
+++ b/arch/sh/mm/Kconfig
@@ -126,7 +126,6 @@ config CPU_SUBTYPE_SH7750
126config CPU_SUBTYPE_SH7091 126config CPU_SUBTYPE_SH7091
127 bool "Support SH7091 processor" 127 bool "Support SH7091 processor"
128 select CPU_SH4 128 select CPU_SH4
129 select CPU_SUBTYPE_SH7750
130 help 129 help
131 Select SH7091 if you have an SH-4 based Sega device (such as 130 Select SH7091 if you have an SH-4 based Sega device (such as
132 the Dreamcast, Naomi, and Naomi 2). 131 the Dreamcast, Naomi, and Naomi 2).
@@ -134,13 +133,11 @@ config CPU_SUBTYPE_SH7091
134config CPU_SUBTYPE_SH7750R 133config CPU_SUBTYPE_SH7750R
135 bool "Support SH7750R processor" 134 bool "Support SH7750R processor"
136 select CPU_SH4 135 select CPU_SH4
137 select CPU_SUBTYPE_SH7750
138 select CPU_HAS_IPR_IRQ 136 select CPU_HAS_IPR_IRQ
139 137
140config CPU_SUBTYPE_SH7750S 138config CPU_SUBTYPE_SH7750S
141 bool "Support SH7750S processor" 139 bool "Support SH7750S processor"
142 select CPU_SH4 140 select CPU_SH4
143 select CPU_SUBTYPE_SH7750
144 select CPU_HAS_IPR_IRQ 141 select CPU_HAS_IPR_IRQ
145 142
146config CPU_SUBTYPE_SH7751 143config CPU_SUBTYPE_SH7751
@@ -154,7 +151,6 @@ config CPU_SUBTYPE_SH7751
154config CPU_SUBTYPE_SH7751R 151config CPU_SUBTYPE_SH7751R
155 bool "Support SH7751R processor" 152 bool "Support SH7751R processor"
156 select CPU_SH4 153 select CPU_SH4
157 select CPU_SUBTYPE_SH7751
158 select CPU_HAS_IPR_IRQ 154 select CPU_HAS_IPR_IRQ
159 155
160config CPU_SUBTYPE_SH7760 156config CPU_SUBTYPE_SH7760
diff --git a/drivers/serial/sh-sci.h b/drivers/serial/sh-sci.h
index fb04fb5f9843..da643b31715b 100644
--- a/drivers/serial/sh-sci.h
+++ b/drivers/serial/sh-sci.h
@@ -53,7 +53,12 @@
53# define SCIF_ORER 0x0001 /* overrun error bit */ 53# define SCIF_ORER 0x0001 /* overrun error bit */
54# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */ 54# define SCSCR_INIT(port) 0x3a /* TIE=0,RIE=0,TE=1,RE=1,REIE=1 */
55# define SCIF_ONLY 55# define SCIF_ONLY
56#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || defined(CONFIG_CPU_SUBTYPE_SH7751) 56#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || \
57 defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
58 defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
59 defined(CONFIG_CPU_SUBTYPE_SH7091) || \
60 defined(CONFIG_CPU_SUBTYPE_SH7751) || \
61 defined(CONFIG_CPU_SUBTYPE_SH7751R)
57# define SCSPTR1 0xffe0001c /* 8 bit SCI */ 62# define SCSPTR1 0xffe0001c /* 8 bit SCI */
58# define SCSPTR2 0xFFE80020 /* 16 bit SCIF */ 63# define SCSPTR2 0xFFE80020 /* 16 bit SCIF */
59# define SCIF_ORER 0x0001 /* overrun error bit */ 64# define SCIF_ORER 0x0001 /* overrun error bit */
@@ -177,9 +182,13 @@
177#define SCI_CTRL_FLAGS_RIE 0x40 /* all */ 182#define SCI_CTRL_FLAGS_RIE 0x40 /* all */
178#define SCI_CTRL_FLAGS_TE 0x20 /* all */ 183#define SCI_CTRL_FLAGS_TE 0x20 /* all */
179#define SCI_CTRL_FLAGS_RE 0x10 /* all */ 184#define SCI_CTRL_FLAGS_RE 0x10 /* all */
180#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \ 185#if defined(CONFIG_CPU_SUBTYPE_SH7750) || \
181 defined(CONFIG_CPU_SUBTYPE_SH7751) || \ 186 defined(CONFIG_CPU_SUBTYPE_SH7091) || \
182 defined(CONFIG_CPU_SUBTYPE_SH7780) || \ 187 defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
188 defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
189 defined(CONFIG_CPU_SUBTYPE_SH7751) || \
190 defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
191 defined(CONFIG_CPU_SUBTYPE_SH7780) || \
183 defined(CONFIG_CPU_SUBTYPE_SH7785) 192 defined(CONFIG_CPU_SUBTYPE_SH7785)
184#define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */ 193#define SCI_CTRL_FLAGS_REIE 0x08 /* 7750 SCIF */
185#else 194#else
@@ -514,8 +523,12 @@ static inline void set_sh771x_scif_pfc(struct uart_port *port)
514 } 523 }
515} 524}
516 525
517#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || \ 526#elif defined(CONFIG_CPU_SUBTYPE_SH7750) || \
518 defined(CONFIG_CPU_SUBTYPE_SH7751) || \ 527 defined(CONFIG_CPU_SUBTYPE_SH7751) || \
528 defined(CONFIG_CPU_SUBTYPE_SH7751R) || \
529 defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
530 defined(CONFIG_CPU_SUBTYPE_SH7750S) || \
531 defined(CONFIG_CPU_SUBTYPE_SH7091) || \
519 defined(CONFIG_CPU_SUBTYPE_SH4_202) 532 defined(CONFIG_CPU_SUBTYPE_SH4_202)
520static inline int sci_rxd_in(struct uart_port *port) 533static inline int sci_rxd_in(struct uart_port *port)
521{ 534{