Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* linux/arch/arm/mach-s3c2410/mach-vr1000.c |
| 2 | * |
Ben Dooks | ccae941 | 2009-11-13 22:54:14 +0000 | [diff] [blame] | 3 | * Copyright (c) 2003-2008 Simtec Electronics |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * Ben Dooks <ben@simtec.co.uk> |
| 5 | * |
| 6 | * Machine support for Thorcom VR1000 board. Designed for Thorcom by |
| 7 | * Simtec Electronics, http://www.simtec.co.uk/ |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU General Public License version 2 as |
| 11 | * published by the Free Software Foundation. |
| 12 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 13 | */ |
| 14 | |
| 15 | #include <linux/kernel.h> |
| 16 | #include <linux/types.h> |
| 17 | #include <linux/interrupt.h> |
| 18 | #include <linux/list.h> |
| 19 | #include <linux/timer.h> |
| 20 | #include <linux/init.h> |
Ben Dooks | ec976d6 | 2009-05-13 22:52:24 +0100 | [diff] [blame] | 21 | #include <linux/gpio.h> |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 22 | #include <linux/dm9000.h> |
Ben Dooks | 60d6698 | 2008-07-03 11:24:42 +0100 | [diff] [blame] | 23 | #include <linux/i2c.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 24 | |
| 25 | #include <linux/serial.h> |
| 26 | #include <linux/tty.h> |
| 27 | #include <linux/serial_8250.h> |
| 28 | #include <linux/serial_reg.h> |
Russell King | fced80c | 2008-09-06 12:10:45 +0100 | [diff] [blame] | 29 | #include <linux/io.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 30 | |
| 31 | #include <asm/mach/arch.h> |
| 32 | #include <asm/mach/map.h> |
| 33 | #include <asm/mach/irq.h> |
| 34 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 35 | #include <mach/bast-map.h> |
| 36 | #include <mach/vr1000-map.h> |
| 37 | #include <mach/vr1000-irq.h> |
| 38 | #include <mach/vr1000-cpld.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 39 | |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 40 | #include <mach/hardware.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 41 | #include <asm/irq.h> |
| 42 | #include <asm/mach-types.h> |
| 43 | |
Ben Dooks | a2b7ba9 | 2008-10-07 22:26:09 +0100 | [diff] [blame] | 44 | #include <plat/regs-serial.h> |
Russell King | a09e64f | 2008-08-05 16:14:15 +0100 | [diff] [blame] | 45 | #include <mach/regs-gpio.h> |
| 46 | #include <mach/leds-gpio.h> |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 47 | |
Ben Dooks | d5120ae | 2008-10-07 23:09:51 +0100 | [diff] [blame] | 48 | #include <plat/clock.h> |
Ben Dooks | a2b7ba9 | 2008-10-07 22:26:09 +0100 | [diff] [blame] | 49 | #include <plat/devs.h> |
| 50 | #include <plat/cpu.h> |
Ben Dooks | 3e1b776 | 2008-10-31 16:14:40 +0000 | [diff] [blame] | 51 | #include <plat/iic.h> |
Ben Dooks | 4d3a346 | 2009-11-13 22:34:20 +0000 | [diff] [blame] | 52 | #include <plat/audio-simtec.h> |
Ben Dooks | 9d529c6 | 2008-07-03 11:24:39 +0100 | [diff] [blame] | 53 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 54 | #include "usb-simtec.h" |
Ben Dooks | 9d529c6 | 2008-07-03 11:24:39 +0100 | [diff] [blame] | 55 | #include "nor-simtec.h" |
Kukjin Kim | b27b072 | 2012-01-03 14:02:03 +0100 | [diff] [blame^] | 56 | #include "common.h" |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 57 | |
| 58 | /* macros for virtual address mods for the io space entries */ |
| 59 | #define VA_C5(item) ((unsigned long)(item) + BAST_VAM_CS5) |
| 60 | #define VA_C4(item) ((unsigned long)(item) + BAST_VAM_CS4) |
| 61 | #define VA_C3(item) ((unsigned long)(item) + BAST_VAM_CS3) |
| 62 | #define VA_C2(item) ((unsigned long)(item) + BAST_VAM_CS2) |
| 63 | |
| 64 | /* macros to modify the physical addresses for io space */ |
| 65 | |
Ben Dooks | df1ec6d | 2005-11-08 19:15:30 +0000 | [diff] [blame] | 66 | #define PA_CS2(item) (__phys_to_pfn((item) + S3C2410_CS2)) |
| 67 | #define PA_CS3(item) (__phys_to_pfn((item) + S3C2410_CS3)) |
| 68 | #define PA_CS4(item) (__phys_to_pfn((item) + S3C2410_CS4)) |
| 69 | #define PA_CS5(item) (__phys_to_pfn((item) + S3C2410_CS5)) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 70 | |
| 71 | static struct map_desc vr1000_iodesc[] __initdata = { |
| 72 | /* ISA IO areas */ |
Ben Dooks | df1ec6d | 2005-11-08 19:15:30 +0000 | [diff] [blame] | 73 | { |
| 74 | .virtual = (u32)S3C24XX_VA_ISA_BYTE, |
| 75 | .pfn = PA_CS2(BAST_PA_ISAIO), |
| 76 | .length = SZ_16M, |
| 77 | .type = MT_DEVICE, |
| 78 | }, { |
| 79 | .virtual = (u32)S3C24XX_VA_ISA_WORD, |
| 80 | .pfn = PA_CS3(BAST_PA_ISAIO), |
| 81 | .length = SZ_16M, |
| 82 | .type = MT_DEVICE, |
| 83 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 84 | |
Ben Dooks | df1ec6d | 2005-11-08 19:15:30 +0000 | [diff] [blame] | 85 | /* CPLD control registers, and external interrupt controls */ |
| 86 | { |
| 87 | .virtual = (u32)VR1000_VA_CTRL1, |
| 88 | .pfn = __phys_to_pfn(VR1000_PA_CTRL1), |
| 89 | .length = SZ_1M, |
| 90 | .type = MT_DEVICE, |
| 91 | }, { |
| 92 | .virtual = (u32)VR1000_VA_CTRL2, |
| 93 | .pfn = __phys_to_pfn(VR1000_PA_CTRL2), |
| 94 | .length = SZ_1M, |
| 95 | .type = MT_DEVICE, |
| 96 | }, { |
| 97 | .virtual = (u32)VR1000_VA_CTRL3, |
| 98 | .pfn = __phys_to_pfn(VR1000_PA_CTRL3), |
| 99 | .length = SZ_1M, |
| 100 | .type = MT_DEVICE, |
| 101 | }, { |
| 102 | .virtual = (u32)VR1000_VA_CTRL4, |
| 103 | .pfn = __phys_to_pfn(VR1000_PA_CTRL4), |
| 104 | .length = SZ_1M, |
| 105 | .type = MT_DEVICE, |
| 106 | }, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | }; |
| 108 | |
| 109 | #define UCON S3C2410_UCON_DEFAULT | S3C2410_UCON_UCLK |
| 110 | #define ULCON S3C2410_LCON_CS8 | S3C2410_LCON_PNONE | S3C2410_LCON_STOPB |
| 111 | #define UFCON S3C2410_UFCON_RXTRIG8 | S3C2410_UFCON_FIFOMODE |
| 112 | |
| 113 | /* uart clock source(s) */ |
| 114 | |
| 115 | static struct s3c24xx_uart_clksrc vr1000_serial_clocks[] = { |
| 116 | [0] = { |
| 117 | .name = "uclk", |
| 118 | .divisor = 1, |
| 119 | .min_baud = 0, |
| 120 | .max_baud = 0, |
| 121 | }, |
| 122 | [1] = { |
| 123 | .name = "pclk", |
| 124 | .divisor = 1, |
| 125 | .min_baud = 0, |
| 126 | .max_baud = 0. |
| 127 | } |
| 128 | }; |
| 129 | |
Ben Dooks | 66a9b49 | 2006-06-18 23:04:05 +0100 | [diff] [blame] | 130 | static struct s3c2410_uartcfg vr1000_uartcfgs[] __initdata = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 131 | [0] = { |
| 132 | .hwport = 0, |
| 133 | .flags = 0, |
| 134 | .ucon = UCON, |
| 135 | .ulcon = ULCON, |
| 136 | .ufcon = UFCON, |
| 137 | .clocks = vr1000_serial_clocks, |
| 138 | .clocks_size = ARRAY_SIZE(vr1000_serial_clocks), |
| 139 | }, |
| 140 | [1] = { |
| 141 | .hwport = 1, |
| 142 | .flags = 0, |
| 143 | .ucon = UCON, |
| 144 | .ulcon = ULCON, |
| 145 | .ufcon = UFCON, |
| 146 | .clocks = vr1000_serial_clocks, |
| 147 | .clocks_size = ARRAY_SIZE(vr1000_serial_clocks), |
| 148 | }, |
| 149 | /* port 2 is not actually used */ |
| 150 | [2] = { |
| 151 | .hwport = 2, |
| 152 | .flags = 0, |
| 153 | .ucon = UCON, |
| 154 | .ulcon = ULCON, |
| 155 | .ufcon = UFCON, |
| 156 | .clocks = vr1000_serial_clocks, |
| 157 | .clocks_size = ARRAY_SIZE(vr1000_serial_clocks), |
| 158 | |
| 159 | } |
| 160 | }; |
| 161 | |
| 162 | /* definitions for the vr1000 extra 16550 serial ports */ |
| 163 | |
| 164 | #define VR1000_BAUDBASE (3692307) |
| 165 | |
| 166 | #define VR1000_SERIAL_MAPBASE(x) (VR1000_PA_SERIAL + 0x80 + ((x) << 5)) |
| 167 | |
| 168 | static struct plat_serial8250_port serial_platform_data[] = { |
| 169 | [0] = { |
| 170 | .mapbase = VR1000_SERIAL_MAPBASE(0), |
| 171 | .irq = IRQ_VR1000_SERIAL + 0, |
| 172 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, |
| 173 | .iotype = UPIO_MEM, |
| 174 | .regshift = 0, |
| 175 | .uartclk = VR1000_BAUDBASE, |
| 176 | }, |
| 177 | [1] = { |
| 178 | .mapbase = VR1000_SERIAL_MAPBASE(1), |
| 179 | .irq = IRQ_VR1000_SERIAL + 1, |
| 180 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, |
| 181 | .iotype = UPIO_MEM, |
| 182 | .regshift = 0, |
| 183 | .uartclk = VR1000_BAUDBASE, |
| 184 | }, |
| 185 | [2] = { |
| 186 | .mapbase = VR1000_SERIAL_MAPBASE(2), |
| 187 | .irq = IRQ_VR1000_SERIAL + 2, |
| 188 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, |
| 189 | .iotype = UPIO_MEM, |
| 190 | .regshift = 0, |
| 191 | .uartclk = VR1000_BAUDBASE, |
| 192 | }, |
| 193 | [3] = { |
| 194 | .mapbase = VR1000_SERIAL_MAPBASE(3), |
| 195 | .irq = IRQ_VR1000_SERIAL + 3, |
| 196 | .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, |
| 197 | .iotype = UPIO_MEM, |
| 198 | .regshift = 0, |
| 199 | .uartclk = VR1000_BAUDBASE, |
| 200 | }, |
| 201 | { }, |
| 202 | }; |
| 203 | |
| 204 | static struct platform_device serial_device = { |
| 205 | .name = "serial8250", |
Russell King | 6df29de | 2005-09-08 16:04:41 +0100 | [diff] [blame] | 206 | .id = PLAT8250_DEV_PLATFORM, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 207 | .dev = { |
| 208 | .platform_data = serial_platform_data, |
| 209 | }, |
| 210 | }; |
| 211 | |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 212 | /* DM9000 ethernet devices */ |
| 213 | |
| 214 | static struct resource vr1000_dm9k0_resource[] = { |
| 215 | [0] = { |
| 216 | .start = S3C2410_CS5 + VR1000_PA_DM9000, |
| 217 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 3, |
| 218 | .flags = IORESOURCE_MEM |
| 219 | }, |
| 220 | [1] = { |
| 221 | .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x40, |
| 222 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x7f, |
| 223 | .flags = IORESOURCE_MEM |
| 224 | }, |
| 225 | [2] = { |
| 226 | .start = IRQ_VR1000_DM9000A, |
| 227 | .end = IRQ_VR1000_DM9000A, |
Ben Dooks | 9cf345e | 2008-07-03 11:24:22 +0100 | [diff] [blame] | 228 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 229 | } |
| 230 | |
| 231 | }; |
| 232 | |
| 233 | static struct resource vr1000_dm9k1_resource[] = { |
| 234 | [0] = { |
| 235 | .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0x80, |
| 236 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0x83, |
| 237 | .flags = IORESOURCE_MEM |
| 238 | }, |
| 239 | [1] = { |
| 240 | .start = S3C2410_CS5 + VR1000_PA_DM9000 + 0xC0, |
| 241 | .end = S3C2410_CS5 + VR1000_PA_DM9000 + 0xFF, |
| 242 | .flags = IORESOURCE_MEM |
| 243 | }, |
| 244 | [2] = { |
| 245 | .start = IRQ_VR1000_DM9000N, |
| 246 | .end = IRQ_VR1000_DM9000N, |
Ben Dooks | 9cf345e | 2008-07-03 11:24:22 +0100 | [diff] [blame] | 247 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_HIGHLEVEL, |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 248 | } |
| 249 | }; |
| 250 | |
| 251 | /* for the moment we limit ourselves to 16bit IO until some |
| 252 | * better IO routines can be written and tested |
| 253 | */ |
| 254 | |
Ben Dooks | 9f693d7 | 2005-10-12 19:58:07 +0100 | [diff] [blame] | 255 | static struct dm9000_plat_data vr1000_dm9k_platdata = { |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 256 | .flags = DM9000_PLATF_16BITONLY, |
| 257 | }; |
| 258 | |
| 259 | static struct platform_device vr1000_dm9k0 = { |
| 260 | .name = "dm9000", |
| 261 | .id = 0, |
| 262 | .num_resources = ARRAY_SIZE(vr1000_dm9k0_resource), |
| 263 | .resource = vr1000_dm9k0_resource, |
| 264 | .dev = { |
| 265 | .platform_data = &vr1000_dm9k_platdata, |
| 266 | } |
| 267 | }; |
| 268 | |
| 269 | static struct platform_device vr1000_dm9k1 = { |
| 270 | .name = "dm9000", |
| 271 | .id = 1, |
| 272 | .num_resources = ARRAY_SIZE(vr1000_dm9k1_resource), |
| 273 | .resource = vr1000_dm9k1_resource, |
| 274 | .dev = { |
| 275 | .platform_data = &vr1000_dm9k_platdata, |
| 276 | } |
| 277 | }; |
| 278 | |
Ben Dooks | b2eba6b | 2006-12-07 20:28:23 +0100 | [diff] [blame] | 279 | /* LEDS */ |
| 280 | |
| 281 | static struct s3c24xx_led_platdata vr1000_led1_pdata = { |
| 282 | .name = "led1", |
Ben Dooks | 070276d | 2009-05-17 22:32:23 +0100 | [diff] [blame] | 283 | .gpio = S3C2410_GPB(0), |
Ben Dooks | b2eba6b | 2006-12-07 20:28:23 +0100 | [diff] [blame] | 284 | .def_trigger = "", |
| 285 | }; |
| 286 | |
| 287 | static struct s3c24xx_led_platdata vr1000_led2_pdata = { |
| 288 | .name = "led2", |
Ben Dooks | 070276d | 2009-05-17 22:32:23 +0100 | [diff] [blame] | 289 | .gpio = S3C2410_GPB(1), |
Ben Dooks | b2eba6b | 2006-12-07 20:28:23 +0100 | [diff] [blame] | 290 | .def_trigger = "", |
| 291 | }; |
| 292 | |
| 293 | static struct s3c24xx_led_platdata vr1000_led3_pdata = { |
| 294 | .name = "led3", |
Ben Dooks | 070276d | 2009-05-17 22:32:23 +0100 | [diff] [blame] | 295 | .gpio = S3C2410_GPB(2), |
Ben Dooks | b2eba6b | 2006-12-07 20:28:23 +0100 | [diff] [blame] | 296 | .def_trigger = "", |
| 297 | }; |
| 298 | |
| 299 | static struct platform_device vr1000_led1 = { |
| 300 | .name = "s3c24xx_led", |
| 301 | .id = 1, |
| 302 | .dev = { |
| 303 | .platform_data = &vr1000_led1_pdata, |
| 304 | }, |
| 305 | }; |
| 306 | |
| 307 | static struct platform_device vr1000_led2 = { |
| 308 | .name = "s3c24xx_led", |
| 309 | .id = 2, |
| 310 | .dev = { |
| 311 | .platform_data = &vr1000_led2_pdata, |
| 312 | }, |
| 313 | }; |
| 314 | |
| 315 | static struct platform_device vr1000_led3 = { |
| 316 | .name = "s3c24xx_led", |
Ben Dooks | abac08d7 | 2006-12-19 19:10:13 +0100 | [diff] [blame] | 317 | .id = 3, |
Ben Dooks | b2eba6b | 2006-12-07 20:28:23 +0100 | [diff] [blame] | 318 | .dev = { |
| 319 | .platform_data = &vr1000_led3_pdata, |
| 320 | }, |
| 321 | }; |
| 322 | |
Ben Dooks | 60d6698 | 2008-07-03 11:24:42 +0100 | [diff] [blame] | 323 | /* I2C devices. */ |
| 324 | |
| 325 | static struct i2c_board_info vr1000_i2c_devs[] __initdata = { |
| 326 | { |
| 327 | I2C_BOARD_INFO("tlv320aic23", 0x1a), |
| 328 | }, { |
Ben Dooks | 9c3871c | 2008-07-03 11:24:44 +0100 | [diff] [blame] | 329 | I2C_BOARD_INFO("tmp101", 0x48), |
| 330 | }, { |
Ben Dooks | 60d6698 | 2008-07-03 11:24:42 +0100 | [diff] [blame] | 331 | I2C_BOARD_INFO("m41st87", 0x68), |
| 332 | }, |
| 333 | }; |
| 334 | |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 335 | /* devices for this board */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 336 | |
| 337 | static struct platform_device *vr1000_devices[] __initdata = { |
Ben Dooks | b813248 | 2009-11-23 00:13:39 +0000 | [diff] [blame] | 338 | &s3c_device_ohci, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 339 | &s3c_device_lcd, |
| 340 | &s3c_device_wdt, |
Ben Dooks | 3e1b776 | 2008-10-31 16:14:40 +0000 | [diff] [blame] | 341 | &s3c_device_i2c0, |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 342 | &s3c_device_adc, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 343 | &serial_device, |
Ben Dooks | d97a666 | 2005-06-23 21:56:47 +0100 | [diff] [blame] | 344 | &vr1000_dm9k0, |
Ben Dooks | b2eba6b | 2006-12-07 20:28:23 +0100 | [diff] [blame] | 345 | &vr1000_dm9k1, |
| 346 | &vr1000_led1, |
| 347 | &vr1000_led2, |
| 348 | &vr1000_led3, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 349 | }; |
| 350 | |
Ben Dooks | 2bc7509 | 2008-07-15 17:17:48 +0100 | [diff] [blame] | 351 | static struct clk *vr1000_clocks[] __initdata = { |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 352 | &s3c24xx_dclk0, |
| 353 | &s3c24xx_dclk1, |
| 354 | &s3c24xx_clkout0, |
| 355 | &s3c24xx_clkout1, |
| 356 | &s3c24xx_uclk, |
| 357 | }; |
| 358 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 359 | static void vr1000_power_off(void) |
| 360 | { |
Ben Dooks | 7614e1d | 2010-05-04 12:53:11 +0900 | [diff] [blame] | 361 | gpio_direction_output(S3C2410_GPB(9), 1); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 362 | } |
| 363 | |
Ben Dooks | 5fe10ab | 2005-09-20 17:24:33 +0100 | [diff] [blame] | 364 | static void __init vr1000_map_io(void) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 365 | { |
| 366 | /* initialise clock sources */ |
| 367 | |
Ben Dooks | d96a980 | 2008-04-16 00:12:39 +0100 | [diff] [blame] | 368 | s3c24xx_dclk0.parent = &clk_upll; |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 369 | s3c24xx_dclk0.rate = 12*1000*1000; |
| 370 | |
| 371 | s3c24xx_dclk1.parent = NULL; |
| 372 | s3c24xx_dclk1.rate = 3692307; |
| 373 | |
| 374 | s3c24xx_clkout0.parent = &s3c24xx_dclk0; |
| 375 | s3c24xx_clkout1.parent = &s3c24xx_dclk1; |
| 376 | |
| 377 | s3c24xx_uclk.parent = &s3c24xx_clkout1; |
| 378 | |
Ben Dooks | ce89c20 | 2007-04-20 11:15:27 +0100 | [diff] [blame] | 379 | s3c24xx_register_clocks(vr1000_clocks, ARRAY_SIZE(vr1000_clocks)); |
| 380 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 381 | pm_power_off = vr1000_power_off; |
| 382 | |
| 383 | s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc)); |
| 384 | s3c24xx_init_clocks(0); |
| 385 | s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs)); |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 386 | } |
| 387 | |
Ben Dooks | 57e5171 | 2007-04-20 11:19:16 +0100 | [diff] [blame] | 388 | static void __init vr1000_init(void) |
| 389 | { |
Ben Dooks | 3e1b776 | 2008-10-31 16:14:40 +0000 | [diff] [blame] | 390 | s3c_i2c0_set_platdata(NULL); |
Ben Dooks | 57e5171 | 2007-04-20 11:19:16 +0100 | [diff] [blame] | 391 | platform_add_devices(vr1000_devices, ARRAY_SIZE(vr1000_devices)); |
Ben Dooks | 9d529c6 | 2008-07-03 11:24:39 +0100 | [diff] [blame] | 392 | |
Ben Dooks | 60d6698 | 2008-07-03 11:24:42 +0100 | [diff] [blame] | 393 | i2c_register_board_info(0, vr1000_i2c_devs, |
| 394 | ARRAY_SIZE(vr1000_i2c_devs)); |
| 395 | |
Ben Dooks | 9d529c6 | 2008-07-03 11:24:39 +0100 | [diff] [blame] | 396 | nor_simtec_init(); |
Ben Dooks | 4d3a346 | 2009-11-13 22:34:20 +0000 | [diff] [blame] | 397 | simtec_audio_add(NULL, true, NULL); |
Ben Dooks | 7614e1d | 2010-05-04 12:53:11 +0900 | [diff] [blame] | 398 | |
| 399 | WARN_ON(gpio_request(S3C2410_GPB(9), "power off")); |
Ben Dooks | 57e5171 | 2007-04-20 11:19:16 +0100 | [diff] [blame] | 400 | } |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 401 | |
| 402 | MACHINE_START(VR1000, "Thorcom-VR1000") |
Russell King | e9dea0c | 2005-07-03 17:38:58 +0100 | [diff] [blame] | 403 | /* Maintainer: Ben Dooks <ben@simtec.co.uk> */ |
Nicolas Pitre | 69d5071 | 2011-07-05 22:38:17 -0400 | [diff] [blame] | 404 | .atag_offset = 0x100, |
Ben Dooks | 6904b24 | 2005-06-29 11:09:15 +0100 | [diff] [blame] | 405 | .map_io = vr1000_map_io, |
Ben Dooks | 57e5171 | 2007-04-20 11:19:16 +0100 | [diff] [blame] | 406 | .init_machine = vr1000_init, |
Ben Dooks | 6904b24 | 2005-06-29 11:09:15 +0100 | [diff] [blame] | 407 | .init_irq = s3c24xx_init_irq, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 408 | .timer = &s3c24xx_timer, |
Kukjin Kim | b27b072 | 2012-01-03 14:02:03 +0100 | [diff] [blame^] | 409 | .restart = s3c2410_restart, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 410 | MACHINE_END |