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