diff options
Diffstat (limited to 'arch/sh/boards/mach-se')
| -rw-r--r-- | arch/sh/boards/mach-se/7343/Makefile | 2 | ||||
| -rw-r--r-- | arch/sh/boards/mach-se/7343/io.c | 273 | ||||
| -rw-r--r-- | arch/sh/boards/mach-se/7343/setup.c | 126 | ||||
| -rw-r--r-- | arch/sh/boards/mach-se/770x/setup.c | 4 | ||||
| -rw-r--r-- | arch/sh/boards/mach-se/7721/setup.c | 7 | ||||
| -rw-r--r-- | arch/sh/boards/mach-se/7722/setup.c | 10 |
6 files changed, 92 insertions, 330 deletions
diff --git a/arch/sh/boards/mach-se/7343/Makefile b/arch/sh/boards/mach-se/7343/Makefile index 3024796c6203..4c3666a93790 100644 --- a/arch/sh/boards/mach-se/7343/Makefile +++ b/arch/sh/boards/mach-se/7343/Makefile | |||
| @@ -2,4 +2,4 @@ | |||
| 2 | # Makefile for the 7343 SolutionEngine specific parts of the kernel | 2 | # Makefile for the 7343 SolutionEngine specific parts of the kernel |
| 3 | # | 3 | # |
| 4 | 4 | ||
| 5 | obj-y := setup.o io.o irq.o | 5 | obj-y := setup.o irq.o |
diff --git a/arch/sh/boards/mach-se/7343/io.c b/arch/sh/boards/mach-se/7343/io.c deleted file mode 100644 index 8741abc1da7b..000000000000 --- a/arch/sh/boards/mach-se/7343/io.c +++ /dev/null | |||
| @@ -1,273 +0,0 @@ | |||
| 1 | /* | ||
| 2 | * arch/sh/boards/se/7343/io.c | ||
| 3 | * | ||
| 4 | * I/O routine for SH-Mobile3AS 7343 SolutionEngine. | ||
| 5 | * | ||
| 6 | */ | ||
| 7 | #include <linux/kernel.h> | ||
| 8 | #include <asm/io.h> | ||
| 9 | #include <mach-se/mach/se7343.h> | ||
| 10 | |||
| 11 | #define badio(fn, a) panic("bad i/o operation %s for %08lx.", #fn, a) | ||
| 12 | |||
| 13 | struct iop { | ||
| 14 | unsigned long start, end; | ||
| 15 | unsigned long base; | ||
| 16 | struct iop *(*check) (struct iop * p, unsigned long port); | ||
| 17 | unsigned char (*inb) (struct iop * p, unsigned long port); | ||
| 18 | unsigned short (*inw) (struct iop * p, unsigned long port); | ||
| 19 | void (*outb) (struct iop * p, unsigned char value, unsigned long port); | ||
| 20 | void (*outw) (struct iop * p, unsigned short value, unsigned long port); | ||
| 21 | }; | ||
| 22 | |||
| 23 | struct iop * | ||
| 24 | simple_check(struct iop *p, unsigned long port) | ||
| 25 | { | ||
| 26 | static int count; | ||
| 27 | |||
| 28 | if (count < 100) | ||
| 29 | count++; | ||
| 30 | |||
| 31 | port &= 0xFFFF; | ||
| 32 | |||
| 33 | if ((p->start <= port) && (port <= p->end)) | ||
| 34 | return p; | ||
| 35 | else | ||
| 36 | badio(check, port); | ||
| 37 | } | ||
| 38 | |||
| 39 | struct iop * | ||
| 40 | ide_check(struct iop *p, unsigned long port) | ||
| 41 | { | ||
| 42 | if (((0x1f0 <= port) && (port <= 0x1f7)) || (port == 0x3f7)) | ||
| 43 | return p; | ||
| 44 | return NULL; | ||
| 45 | } | ||
| 46 | |||
| 47 | unsigned char | ||
| 48 | simple_inb(struct iop *p, unsigned long port) | ||
| 49 | { | ||
| 50 | return *(unsigned char *) (p->base + port); | ||
| 51 | } | ||
| 52 | |||
| 53 | unsigned short | ||
| 54 | simple_inw(struct iop *p, unsigned long port) | ||
| 55 | { | ||
| 56 | return *(unsigned short *) (p->base + port); | ||
| 57 | } | ||
| 58 | |||
| 59 | void | ||
| 60 | simple_outb(struct iop *p, unsigned char value, unsigned long port) | ||
| 61 | { | ||
| 62 | *(unsigned char *) (p->base + port) = value; | ||
| 63 | } | ||
| 64 | |||
| 65 | void | ||
| 66 | simple_outw(struct iop *p, unsigned short value, unsigned long port) | ||
| 67 | { | ||
| 68 | *(unsigned short *) (p->base + port) = value; | ||
| 69 | } | ||
| 70 | |||
| 71 | unsigned char | ||
| 72 | pcc_inb(struct iop *p, unsigned long port) | ||
| 73 | { | ||
| 74 | unsigned long addr = p->base + port + 0x40000; | ||
| 75 | unsigned long v; | ||
| 76 | |||
| 77 | if (port & 1) | ||
| 78 | addr += 0x00400000; | ||
| 79 | v = *(volatile unsigned char *) addr; | ||
| 80 | return v; | ||
| 81 | } | ||
| 82 | |||
| 83 | void | ||
| 84 | pcc_outb(struct iop *p, unsigned char value, unsigned long port) | ||
| 85 | { | ||
| 86 | unsigned long addr = p->base + port + 0x40000; | ||
| 87 | |||
| 88 | if (port & 1) | ||
| 89 | addr += 0x00400000; | ||
| 90 | *(volatile unsigned char *) addr = value; | ||
| 91 | } | ||
| 92 | |||
| 93 | unsigned char | ||
| 94 | bad_inb(struct iop *p, unsigned long port) | ||
| 95 | { | ||
| 96 | badio(inb, port); | ||
| 97 | } | ||
| 98 | |||
| 99 | void | ||
| 100 | bad_outb(struct iop *p, unsigned char value, unsigned long port) | ||
| 101 | { | ||
| 102 | badio(inw, port); | ||
| 103 | } | ||
| 104 | |||
| 105 | #ifdef CONFIG_SMC91X | ||
| 106 | /* MSTLANEX01 LAN at 0xb400:0000 */ | ||
| 107 | static struct iop laniop = { | ||
| 108 | .start = 0x00, | ||
| 109 | .end = 0x0F, | ||
| 110 | .base = 0x04000000, | ||
| 111 | .check = simple_check, | ||
| 112 | .inb = simple_inb, | ||
| 113 | .inw = simple_inw, | ||
| 114 | .outb = simple_outb, | ||
| 115 | .outw = simple_outw, | ||
| 116 | }; | ||
| 117 | #endif | ||
| 118 | |||
| 119 | #ifdef CONFIG_NE2000 | ||
| 120 | /* NE2000 pc card NIC */ | ||
| 121 | static struct iop neiop = { | ||
| 122 | .start = 0x280, | ||
| 123 | .end = 0x29f, | ||
| 124 | .base = 0xb0600000 + 0x80, /* soft 0x280 -> hard 0x300 */ | ||
| 125 | .check = simple_check, | ||
| 126 | .inb = pcc_inb, | ||
| 127 | .inw = simple_inw, | ||
| 128 | .outb = pcc_outb, | ||
| 129 | .outw = simple_outw, | ||
| 130 | }; | ||
| 131 | #endif | ||
| 132 | |||
| 133 | #ifdef CONFIG_IDE | ||
| 134 | /* CF in CF slot */ | ||
| 135 | static struct iop cfiop = { | ||
| 136 | .base = 0xb0600000, | ||
| 137 | .check = ide_check, | ||
| 138 | .inb = pcc_inb, | ||
| 139 | .inw = simple_inw, | ||
| 140 | .outb = pcc_outb, | ||
| 141 | .outw = simple_outw, | ||
| 142 | }; | ||
| 143 | #endif | ||
| 144 | |||
| 145 | static __inline__ struct iop * | ||
| 146 | port2iop(unsigned long port) | ||
| 147 | { | ||
| 148 | if (0) ; | ||
| 149 | #if defined(CONFIG_SMC91X) | ||
| 150 | else if (laniop.check(&laniop, port)) | ||
| 151 | return &laniop; | ||
| 152 | #endif | ||
| 153 | #if defined(CONFIG_NE2000) | ||
| 154 | else if (neiop.check(&neiop, port)) | ||
| 155 | return &neiop; | ||
| 156 | #endif | ||
| 157 | #if defined(CONFIG_IDE) | ||
| 158 | else if (cfiop.check(&cfiop, port)) | ||
| 159 | return &cfiop; | ||
| 160 | #endif | ||
| 161 | else | ||
| 162 | return NULL; | ||
| 163 | } | ||
| 164 | |||
| 165 | static inline void | ||
| 166 | delay(void) | ||
| 167 | { | ||
| 168 | ctrl_inw(0xac000000); | ||
| 169 | ctrl_inw(0xac000000); | ||
| 170 | } | ||
| 171 | |||
| 172 | unsigned char | ||
| 173 | sh7343se_inb(unsigned long port) | ||
| 174 | { | ||
| 175 | struct iop *p = port2iop(port); | ||
| 176 | return (p->inb) (p, port); | ||
| 177 | } | ||
| 178 | |||
| 179 | unsigned char | ||
| 180 | sh7343se_inb_p(unsigned long port) | ||
| 181 | { | ||
| 182 | unsigned char v = sh7343se_inb(port); | ||
| 183 | delay(); | ||
| 184 | return v; | ||
| 185 | } | ||
| 186 | |||
| 187 | unsigned short | ||
| 188 | sh7343se_inw(unsigned long port) | ||
| 189 | { | ||
| 190 | struct iop *p = port2iop(port); | ||
| 191 | return (p->inw) (p, port); | ||
| 192 | } | ||
| 193 | |||
| 194 | unsigned int | ||
| 195 | sh7343se_inl(unsigned long port) | ||
| 196 | { | ||
| 197 | badio(inl, port); | ||
| 198 | } | ||
| 199 | |||
| 200 | void | ||
| 201 | sh7343se_outb(unsigned char value, unsigned long port) | ||
| 202 | { | ||
| 203 | struct iop *p = port2iop(port); | ||
| 204 | (p->outb) (p, value, port); | ||
| 205 | } | ||
| 206 | |||
| 207 | void | ||
| 208 | sh7343se_outb_p(unsigned char value, unsigned long port) | ||
| 209 | { | ||
| 210 | sh7343se_outb(value, port); | ||
| 211 | delay(); | ||
| 212 | } | ||
| 213 | |||
| 214 | void | ||
| 215 | sh7343se_outw(unsigned short value, unsigned long port) | ||
| 216 | { | ||
| 217 | struct iop *p = port2iop(port); | ||
| 218 | (p->outw) (p, value, port); | ||
| 219 | } | ||
| 220 | |||
| 221 | void | ||
| 222 | sh7343se_outl(unsigned int value, unsigned long port) | ||
| 223 | { | ||
| 224 | badio(outl, port); | ||
| 225 | } | ||
| 226 | |||
| 227 | void | ||
| 228 | sh7343se_insb(unsigned long port, void *addr, unsigned long count) | ||
| 229 | { | ||
| 230 | unsigned char *a = addr; | ||
| 231 | struct iop *p = port2iop(port); | ||
| 232 | while (count--) | ||
| 233 | *a++ = (p->inb) (p, port); | ||
| 234 | } | ||
| 235 | |||
| 236 | void | ||
| 237 | sh7343se_insw(unsigned long port, void *addr, unsigned long count) | ||
| 238 | { | ||
| 239 | unsigned short *a = addr; | ||
| 240 | struct iop *p = port2iop(port); | ||
| 241 | while (count--) | ||
| 242 | *a++ = (p->inw) (p, port); | ||
| 243 | } | ||
| 244 | |||
| 245 | void | ||
| 246 | sh7343se_insl(unsigned long port, void *addr, unsigned long count) | ||
| 247 | { | ||
| 248 | badio(insl, port); | ||
| 249 | } | ||
| 250 | |||
| 251 | void | ||
| 252 | sh7343se_outsb(unsigned long port, const void *addr, unsigned long count) | ||
| 253 | { | ||
| 254 | unsigned char *a = (unsigned char *) addr; | ||
| 255 | struct iop *p = port2iop(port); | ||
| 256 | while (count--) | ||
| 257 | (p->outb) (p, *a++, port); | ||
| 258 | } | ||
| 259 | |||
| 260 | void | ||
| 261 | sh7343se_outsw(unsigned long port, const void *addr, unsigned long count) | ||
| 262 | { | ||
| 263 | unsigned short *a = (unsigned short *) addr; | ||
| 264 | struct iop *p = port2iop(port); | ||
| 265 | while (count--) | ||
| 266 | (p->outw) (p, *a++, port); | ||
| 267 | } | ||
| 268 | |||
| 269 | void | ||
| 270 | sh7343se_outsl(unsigned long port, const void *addr, unsigned long count) | ||
| 271 | { | ||
| 272 | badio(outsw, port); | ||
| 273 | } | ||
diff --git a/arch/sh/boards/mach-se/7343/setup.c b/arch/sh/boards/mach-se/7343/setup.c index 486f40bf9274..4de56f35f419 100644 --- a/arch/sh/boards/mach-se/7343/setup.c +++ b/arch/sh/boards/mach-se/7343/setup.c | |||
| @@ -1,36 +1,16 @@ | |||
| 1 | #include <linux/init.h> | 1 | #include <linux/init.h> |
| 2 | #include <linux/platform_device.h> | 2 | #include <linux/platform_device.h> |
| 3 | #include <linux/mtd/physmap.h> | 3 | #include <linux/mtd/physmap.h> |
| 4 | #include <linux/serial_8250.h> | ||
| 5 | #include <linux/serial_reg.h> | ||
| 6 | #include <linux/usb/isp116x.h> | ||
| 7 | #include <linux/delay.h> | ||
| 4 | #include <asm/machvec.h> | 8 | #include <asm/machvec.h> |
| 5 | #include <mach-se/mach/se7343.h> | 9 | #include <mach-se/mach/se7343.h> |
| 6 | #include <asm/heartbeat.h> | 10 | #include <asm/heartbeat.h> |
| 7 | #include <asm/irq.h> | 11 | #include <asm/irq.h> |
| 8 | #include <asm/io.h> | 12 | #include <asm/io.h> |
| 9 | 13 | ||
| 10 | static struct resource smc91x_resources[] = { | ||
| 11 | [0] = { | ||
| 12 | .start = 0x10000000, | ||
| 13 | .end = 0x1000000F, | ||
| 14 | .flags = IORESOURCE_MEM, | ||
| 15 | }, | ||
| 16 | [1] = { | ||
| 17 | /* | ||
| 18 | * shared with other devices via externel | ||
| 19 | * interrupt controller in FPGA... | ||
| 20 | */ | ||
| 21 | .start = SMC_IRQ, | ||
| 22 | .end = SMC_IRQ, | ||
| 23 | .flags = IORESOURCE_IRQ, | ||
| 24 | }, | ||
| 25 | }; | ||
| 26 | |||
| 27 | static struct platform_device smc91x_device = { | ||
| 28 | .name = "smc91x", | ||
| 29 | .id = 0, | ||
| 30 | .num_resources = ARRAY_SIZE(smc91x_resources), | ||
| 31 | .resource = smc91x_resources, | ||
| 32 | }; | ||
| 33 | |||
| 34 | static struct resource heartbeat_resources[] = { | 14 | static struct resource heartbeat_resources[] = { |
| 35 | [0] = { | 15 | [0] = { |
| 36 | .start = PA_LED, | 16 | .start = PA_LED, |
| @@ -94,10 +74,83 @@ static struct platform_device nor_flash_device = { | |||
| 94 | .resource = nor_flash_resources, | 74 | .resource = nor_flash_resources, |
| 95 | }; | 75 | }; |
| 96 | 76 | ||
| 77 | #define ST16C2550C_FLAGS (UPF_BOOT_AUTOCONF | UPF_IOREMAP) | ||
| 78 | |||
| 79 | static struct plat_serial8250_port serial_platform_data[] = { | ||
| 80 | [0] = { | ||
| 81 | .iotype = UPIO_MEM, | ||
| 82 | .mapbase = 0x16000000, | ||
| 83 | .regshift = 1, | ||
| 84 | .flags = ST16C2550C_FLAGS, | ||
| 85 | .irq = UARTA_IRQ, | ||
| 86 | .uartclk = 7372800, | ||
| 87 | }, | ||
| 88 | [1] = { | ||
| 89 | .iotype = UPIO_MEM, | ||
| 90 | .mapbase = 0x17000000, | ||
| 91 | .regshift = 1, | ||
| 92 | .flags = ST16C2550C_FLAGS, | ||
| 93 | .irq = UARTB_IRQ, | ||
| 94 | .uartclk = 7372800, | ||
| 95 | }, | ||
| 96 | { }, | ||
| 97 | }; | ||
| 98 | |||
| 99 | static struct platform_device uart_device = { | ||
| 100 | .name = "serial8250", | ||
| 101 | .id = PLAT8250_DEV_PLATFORM, | ||
| 102 | .dev = { | ||
| 103 | .platform_data = serial_platform_data, | ||
| 104 | }, | ||
| 105 | }; | ||
| 106 | |||
| 107 | static void isp116x_delay(struct device *dev, int delay) | ||
| 108 | { | ||
| 109 | ndelay(delay); | ||
| 110 | } | ||
| 111 | |||
| 112 | static struct resource usb_resources[] = { | ||
| 113 | [0] = { | ||
| 114 | .start = 0x11800000, | ||
| 115 | .end = 0x11800001, | ||
| 116 | .flags = IORESOURCE_MEM, | ||
| 117 | }, | ||
| 118 | [1] = { | ||
| 119 | .start = 0x11800002, | ||
| 120 | .end = 0x11800003, | ||
| 121 | .flags = IORESOURCE_MEM, | ||
| 122 | }, | ||
| 123 | [2] = { | ||
| 124 | .start = USB_IRQ, | ||
| 125 | .flags = IORESOURCE_IRQ, | ||
| 126 | }, | ||
| 127 | }; | ||
| 128 | |||
| 129 | static struct isp116x_platform_data usb_platform_data = { | ||
| 130 | .sel15Kres = 1, | ||
| 131 | .oc_enable = 1, | ||
| 132 | .int_act_high = 0, | ||
| 133 | .int_edge_triggered = 0, | ||
| 134 | .remote_wakeup_enable = 0, | ||
| 135 | .delay = isp116x_delay, | ||
| 136 | }; | ||
| 137 | |||
| 138 | static struct platform_device usb_device = { | ||
| 139 | .name = "isp116x-hcd", | ||
| 140 | .id = -1, | ||
| 141 | .num_resources = ARRAY_SIZE(usb_resources), | ||
| 142 | .resource = usb_resources, | ||
| 143 | .dev = { | ||
| 144 | .platform_data = &usb_platform_data, | ||
| 145 | }, | ||
| 146 | |||
| 147 | }; | ||
| 148 | |||
| 97 | static struct platform_device *sh7343se_platform_devices[] __initdata = { | 149 | static struct platform_device *sh7343se_platform_devices[] __initdata = { |
| 98 | &smc91x_device, | ||
| 99 | &heartbeat_device, | 150 | &heartbeat_device, |
| 100 | &nor_flash_device, | 151 | &nor_flash_device, |
| 152 | &uart_device, | ||
| 153 | &usb_device, | ||
| 101 | }; | 154 | }; |
| 102 | 155 | ||
| 103 | static int __init sh7343se_devices_setup(void) | 156 | static int __init sh7343se_devices_setup(void) |
| @@ -126,27 +179,6 @@ static void __init sh7343se_setup(char **cmdline_p) | |||
| 126 | static struct sh_machine_vector mv_7343se __initmv = { | 179 | static struct sh_machine_vector mv_7343se __initmv = { |
| 127 | .mv_name = "SolutionEngine 7343", | 180 | .mv_name = "SolutionEngine 7343", |
| 128 | .mv_setup = sh7343se_setup, | 181 | .mv_setup = sh7343se_setup, |
| 129 | .mv_nr_irqs = 108, | 182 | .mv_nr_irqs = SE7343_FPGA_IRQ_BASE + SE7343_FPGA_IRQ_NR, |
| 130 | .mv_inb = sh7343se_inb, | ||
| 131 | .mv_inw = sh7343se_inw, | ||
| 132 | .mv_inl = sh7343se_inl, | ||
| 133 | .mv_outb = sh7343se_outb, | ||
| 134 | .mv_outw = sh7343se_outw, | ||
| 135 | .mv_outl = sh7343se_outl, | ||
| 136 | |||
| 137 | .mv_inb_p = sh7343se_inb_p, | ||
| 138 | .mv_inw_p = sh7343se_inw, | ||
| 139 | .mv_inl_p = sh7343se_inl, | ||
| 140 | .mv_outb_p = sh7343se_outb_p, | ||
| 141 | .mv_outw_p = sh7343se_outw, | ||
| 142 | .mv_outl_p = sh7343se_outl, | ||
| 143 | |||
| 144 | .mv_insb = sh7343se_insb, | ||
| 145 | .mv_insw = sh7343se_insw, | ||
| 146 | .mv_insl = sh7343se_insl, | ||
| 147 | .mv_outsb = sh7343se_outsb, | ||
| 148 | .mv_outsw = sh7343se_outsw, | ||
| 149 | .mv_outsl = sh7343se_outsl, | ||
| 150 | |||
| 151 | .mv_init_irq = init_7343se_IRQ, | 183 | .mv_init_irq = init_7343se_IRQ, |
| 152 | }; | 184 | }; |
diff --git a/arch/sh/boards/mach-se/770x/setup.c b/arch/sh/boards/mach-se/770x/setup.c index 9123d9687bf7..527eb6b12610 100644 --- a/arch/sh/boards/mach-se/770x/setup.c +++ b/arch/sh/boards/mach-se/770x/setup.c | |||
| @@ -8,8 +8,9 @@ | |||
| 8 | */ | 8 | */ |
| 9 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| 10 | #include <linux/platform_device.h> | 10 | #include <linux/platform_device.h> |
| 11 | #include <asm/machvec.h> | ||
| 12 | #include <mach-se/mach/se.h> | 11 | #include <mach-se/mach/se.h> |
| 12 | #include <mach-se/mach/mrshpc.h> | ||
| 13 | #include <asm/machvec.h> | ||
| 13 | #include <asm/io.h> | 14 | #include <asm/io.h> |
| 14 | #include <asm/smc37c93x.h> | 15 | #include <asm/smc37c93x.h> |
| 15 | #include <asm/heartbeat.h> | 16 | #include <asm/heartbeat.h> |
| @@ -175,6 +176,7 @@ static struct platform_device *se_devices[] __initdata = { | |||
| 175 | 176 | ||
| 176 | static int __init se_devices_setup(void) | 177 | static int __init se_devices_setup(void) |
| 177 | { | 178 | { |
| 179 | mrshpc_setup_windows(); | ||
| 178 | return platform_add_devices(se_devices, ARRAY_SIZE(se_devices)); | 180 | return platform_add_devices(se_devices, ARRAY_SIZE(se_devices)); |
| 179 | } | 181 | } |
| 180 | device_initcall(se_devices_setup); | 182 | device_initcall(se_devices_setup); |
diff --git a/arch/sh/boards/mach-se/7721/setup.c b/arch/sh/boards/mach-se/7721/setup.c index d3fc80ff4d83..55af4c36b43a 100644 --- a/arch/sh/boards/mach-se/7721/setup.c +++ b/arch/sh/boards/mach-se/7721/setup.c | |||
| @@ -12,8 +12,9 @@ | |||
| 12 | */ | 12 | */ |
| 13 | #include <linux/init.h> | 13 | #include <linux/init.h> |
| 14 | #include <linux/platform_device.h> | 14 | #include <linux/platform_device.h> |
| 15 | #include <asm/machvec.h> | ||
| 16 | #include <mach-se/mach/se7721.h> | 15 | #include <mach-se/mach/se7721.h> |
| 16 | #include <mach-se/mach/mrshpc.h> | ||
| 17 | #include <asm/machvec.h> | ||
| 17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
| 18 | #include <asm/heartbeat.h> | 19 | #include <asm/heartbeat.h> |
| 19 | 20 | ||
| @@ -74,8 +75,8 @@ static struct platform_device *se7721_devices[] __initdata = { | |||
| 74 | 75 | ||
| 75 | static int __init se7721_devices_setup(void) | 76 | static int __init se7721_devices_setup(void) |
| 76 | { | 77 | { |
| 77 | return platform_add_devices(se7721_devices, | 78 | mrshpc_setup_windows(); |
| 78 | ARRAY_SIZE(se7721_devices)); | 79 | return platform_add_devices(se7721_devices, ARRAY_SIZE(se7721_devices)); |
| 79 | } | 80 | } |
| 80 | device_initcall(se7721_devices_setup); | 81 | device_initcall(se7721_devices_setup); |
| 81 | 82 | ||
diff --git a/arch/sh/boards/mach-se/7722/setup.c b/arch/sh/boards/mach-se/7722/setup.c index fe6f96517e12..af84904ed86f 100644 --- a/arch/sh/boards/mach-se/7722/setup.c +++ b/arch/sh/boards/mach-se/7722/setup.c | |||
| @@ -15,9 +15,10 @@ | |||
| 15 | #include <linux/ata_platform.h> | 15 | #include <linux/ata_platform.h> |
| 16 | #include <linux/input.h> | 16 | #include <linux/input.h> |
| 17 | #include <linux/smc91x.h> | 17 | #include <linux/smc91x.h> |
| 18 | #include <mach-se/mach/se7722.h> | ||
| 19 | #include <mach-se/mach/mrshpc.h> | ||
| 18 | #include <asm/machvec.h> | 20 | #include <asm/machvec.h> |
| 19 | #include <asm/clock.h> | 21 | #include <asm/clock.h> |
| 20 | #include <mach-se/mach/se7722.h> | ||
| 21 | #include <asm/io.h> | 22 | #include <asm/io.h> |
| 22 | #include <asm/heartbeat.h> | 23 | #include <asm/heartbeat.h> |
| 23 | #include <asm/sh_keysc.h> | 24 | #include <asm/sh_keysc.h> |
| @@ -130,6 +131,7 @@ static struct resource sh_keysc_resources[] = { | |||
| 130 | 131 | ||
| 131 | static struct platform_device sh_keysc_device = { | 132 | static struct platform_device sh_keysc_device = { |
| 132 | .name = "sh_keysc", | 133 | .name = "sh_keysc", |
| 134 | .id = 0, /* "keysc0" clock */ | ||
| 133 | .num_resources = ARRAY_SIZE(sh_keysc_resources), | 135 | .num_resources = ARRAY_SIZE(sh_keysc_resources), |
| 134 | .resource = sh_keysc_resources, | 136 | .resource = sh_keysc_resources, |
| 135 | .dev = { | 137 | .dev = { |
| @@ -146,10 +148,8 @@ static struct platform_device *se7722_devices[] __initdata = { | |||
| 146 | 148 | ||
| 147 | static int __init se7722_devices_setup(void) | 149 | static int __init se7722_devices_setup(void) |
| 148 | { | 150 | { |
| 149 | clk_always_enable("mstp214"); /* KEYSC */ | 151 | mrshpc_setup_windows(); |
| 150 | 152 | return platform_add_devices(se7722_devices, ARRAY_SIZE(se7722_devices)); | |
| 151 | return platform_add_devices(se7722_devices, | ||
| 152 | ARRAY_SIZE(se7722_devices)); | ||
| 153 | } | 153 | } |
| 154 | device_initcall(se7722_devices_setup); | 154 | device_initcall(se7722_devices_setup); |
| 155 | 155 | ||
