diff options
author | Nobuhiro Iwamatsu <iwamatsu@nigauri.org> | 2007-03-27 05:13:51 -0400 |
---|---|---|
committer | Paul Mundt <lethal@hera.kernel.org> | 2007-05-06 22:10:54 -0400 |
commit | 9465a54fa4a9da628091c372baa84120f8304587 (patch) | |
tree | ef34abf9debce228b0985e0fb783ca46939e626a /arch/sh/boards/se | |
parent | c86c5a910451dd5a30e62a9e36d8e9b3c7a0c1d1 (diff) |
sh: MS7712SE01 board support.
Support the SH7712 (SH3-DSP) Solution Engine reference board.
Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/boards/se')
-rw-r--r-- | arch/sh/boards/se/770x/io.c | 2 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/irq.c | 27 | ||||
-rw-r--r-- | arch/sh/boards/se/770x/setup.c | 4 |
3 files changed, 19 insertions, 14 deletions
diff --git a/arch/sh/boards/se/770x/io.c b/arch/sh/boards/se/770x/io.c index 9941949331ab..c4550473d4c3 100644 --- a/arch/sh/boards/se/770x/io.c +++ b/arch/sh/boards/se/770x/io.c | |||
@@ -27,6 +27,8 @@ int sh_pcic_io_dummy; | |||
27 | static inline volatile __u16 * | 27 | static inline volatile __u16 * |
28 | port2adr(unsigned int port) | 28 | port2adr(unsigned int port) |
29 | { | 29 | { |
30 | if (port & 0xff000000) | ||
31 | return ( volatile __u16 *) port; | ||
30 | if (port >= 0x2000) | 32 | if (port >= 0x2000) |
31 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); | 33 | return (volatile __u16 *) (PA_MRSHPC + (port - 0x2000)); |
32 | else if (port >= 0x1000) | 34 | else if (port >= 0x1000) |
diff --git a/arch/sh/boards/se/770x/irq.c b/arch/sh/boards/se/770x/irq.c index 307ca5da6232..59cdffa13964 100644 --- a/arch/sh/boards/se/770x/irq.c +++ b/arch/sh/boards/se/770x/irq.c | |||
@@ -55,6 +55,17 @@ void make_se770x_irq(struct ipr_data *table, unsigned int nr_irqs) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | static struct ipr_data se770x_ipr_map[] = { | 57 | static struct ipr_data se770x_ipr_map[] = { |
58 | /* | ||
59 | * Super I/O (Just mimic PC): | ||
60 | * 1: keyboard | ||
61 | * 3: serial 0 | ||
62 | * 4: serial 1 | ||
63 | * 5: printer | ||
64 | * 6: floppy | ||
65 | * 8: rtc | ||
66 | * 12: mouse | ||
67 | * 14: ide0 | ||
68 | */ | ||
58 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | 69 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) |
59 | /* This is default value */ | 70 | /* This is default value */ |
60 | { 0xf-0x2, 0, 8, 0x2 , BCR_ILCRA}, | 71 | { 0xf-0x2, 0, 8, 0x2 , BCR_ILCRA}, |
@@ -81,8 +92,10 @@ static struct ipr_data se770x_ipr_map[] = { | |||
81 | { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC}, | 92 | { 4, 0, 4, 0x0f- 4 ,BCR_ILCRC}, |
82 | { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC}, | 93 | { 3, 0, 0, 0x0f- 3 ,BCR_ILCRC}, |
83 | { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD}, | 94 | { 1, 0, 12, 0x0f- 1 ,BCR_ILCRD}, |
95 | #if defined(CONFIG_STNIC) | ||
84 | /* ST NIC */ | 96 | /* ST NIC */ |
85 | { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */ | 97 | { 10, 0, 4, 0x0f-10 ,BCR_ILCRD}, /* LAN */ |
98 | #endif | ||
86 | /* MRSHPC IRQs setting */ | 99 | /* MRSHPC IRQs setting */ |
87 | { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */ | 100 | { 0, 0, 12, 0x0f- 0 ,BCR_ILCRE}, /* PCIRQ3 */ |
88 | { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */ | 101 | { 11, 0, 8, 0x0f-11 ,BCR_ILCRE}, /* PCIRQ2 */ |
@@ -100,18 +113,6 @@ static struct ipr_data se770x_ipr_map[] = { | |||
100 | */ | 113 | */ |
101 | void __init init_se_IRQ(void) | 114 | void __init init_se_IRQ(void) |
102 | { | 115 | { |
103 | /* | ||
104 | * Super I/O (Just mimic PC): | ||
105 | * 1: keyboard | ||
106 | * 3: serial 0 | ||
107 | * 4: serial 1 | ||
108 | * 5: printer | ||
109 | * 6: floppy | ||
110 | * 8: rtc | ||
111 | * 12: mouse | ||
112 | * 14: ide0 | ||
113 | */ | ||
114 | #if defined(CONFIG_CPU_SUBTYPE_SH7705) | ||
115 | /* Disable all interrupts */ | 116 | /* Disable all interrupts */ |
116 | ctrl_outw(0, BCR_ILCRA); | 117 | ctrl_outw(0, BCR_ILCRA); |
117 | ctrl_outw(0, BCR_ILCRB); | 118 | ctrl_outw(0, BCR_ILCRB); |
@@ -120,6 +121,6 @@ void __init init_se_IRQ(void) | |||
120 | ctrl_outw(0, BCR_ILCRE); | 121 | ctrl_outw(0, BCR_ILCRE); |
121 | ctrl_outw(0, BCR_ILCRF); | 122 | ctrl_outw(0, BCR_ILCRF); |
122 | ctrl_outw(0, BCR_ILCRG); | 123 | ctrl_outw(0, BCR_ILCRG); |
123 | #endif | 124 | |
124 | make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); | 125 | make_se770x_irq(se770x_ipr_map, ARRAY_SIZE(se770x_ipr_map)); |
125 | } | 126 | } |
diff --git a/arch/sh/boards/se/770x/setup.c b/arch/sh/boards/se/770x/setup.c index dab5510699a0..f1c7c8d9fdd2 100644 --- a/arch/sh/boards/se/770x/setup.c +++ b/arch/sh/boards/se/770x/setup.c | |||
@@ -117,7 +117,7 @@ static int __init se_devices_setup(void) | |||
117 | { | 117 | { |
118 | return platform_add_devices(se_devices, ARRAY_SIZE(se_devices)); | 118 | return platform_add_devices(se_devices, ARRAY_SIZE(se_devices)); |
119 | } | 119 | } |
120 | __initcall(se_devices_setup); | 120 | device_initcall(se_devices_setup); |
121 | 121 | ||
122 | /* | 122 | /* |
123 | * The Machine Vector | 123 | * The Machine Vector |
@@ -133,6 +133,8 @@ struct sh_machine_vector mv_se __initmv = { | |||
133 | .mv_nr_irqs = 61, | 133 | .mv_nr_irqs = 61, |
134 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) | 134 | #elif defined(CONFIG_CPU_SUBTYPE_SH7705) |
135 | .mv_nr_irqs = 86, | 135 | .mv_nr_irqs = 86, |
136 | #elif defined(CONFIG_CPU_SUBTYPE_SH7710) || defined(CONFIG_CPU_SUBTYPE_SH7712) | ||
137 | .mv_nr_irqs = 104, | ||
136 | #endif | 138 | #endif |
137 | 139 | ||
138 | .mv_inb = se_inb, | 140 | .mv_inb = se_inb, |