Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 1 | /* |
| 2 | * linux/arch/arm/mach-omap2/board-n8x0.c |
| 3 | * |
| 4 | * Copyright (C) 2005-2009 Nokia Corporation |
| 5 | * Author: Juha Yrjola <juha.yrjola@nokia.com> |
| 6 | * |
| 7 | * Modified from mach-omap2/board-generic.c |
| 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 | */ |
| 13 | |
| 14 | #include <linux/clk.h> |
| 15 | #include <linux/delay.h> |
| 16 | #include <linux/gpio.h> |
| 17 | #include <linux/init.h> |
| 18 | #include <linux/io.h> |
Aaro Koskinen | 0857ba3 | 2012-11-18 18:36:19 +0200 | [diff] [blame] | 19 | #include <linux/irq.h> |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 20 | #include <linux/stddef.h> |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 21 | #include <linux/i2c.h> |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 22 | #include <linux/spi/spi.h> |
| 23 | #include <linux/usb/musb.h> |
Aaro Koskinen | 0857ba3 | 2012-11-18 18:36:19 +0200 | [diff] [blame] | 24 | #include <linux/platform_data/i2c-cbus-gpio.h> |
Arnd Bergmann | 2203747 | 2012-08-24 15:21:06 +0200 | [diff] [blame] | 25 | #include <linux/platform_data/spi-omap2-mcspi.h> |
| 26 | #include <linux/platform_data/mtd-onenand-omap2.h> |
Tony Lindgren | 7bd3b61 | 2012-10-15 13:53:41 -0700 | [diff] [blame] | 27 | #include <linux/mfd/menelaus.h> |
Jarkko Nikula | 366498d | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 28 | #include <sound/tlv320aic3x.h> |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 29 | |
| 30 | #include <asm/mach/arch.h> |
| 31 | #include <asm/mach-types.h> |
| 32 | |
Tony Lindgren | 4e65331 | 2011-11-10 22:45:17 +0100 | [diff] [blame] | 33 | #include "common.h" |
Tony Lindgren | 68f39e7 | 2012-10-15 12:09:43 -0700 | [diff] [blame] | 34 | #include "mmc.h" |
Tony Lindgren | 810ac2a | 2013-11-25 15:17:10 -0800 | [diff] [blame^] | 35 | #include "soc.h" |
Tony Lindgren | bd8f0fc | 2010-07-05 16:31:38 +0300 | [diff] [blame] | 36 | #include "mux.h" |
Afzal Mohammed | b6ab13e | 2012-09-29 10:32:42 +0530 | [diff] [blame] | 37 | #include "gpmc-onenand.h" |
Tony Lindgren | bd8f0fc | 2010-07-05 16:31:38 +0300 | [diff] [blame] | 38 | |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 39 | #define TUSB6010_ASYNC_CS 1 |
| 40 | #define TUSB6010_SYNC_CS 4 |
| 41 | #define TUSB6010_GPIO_INT 58 |
| 42 | #define TUSB6010_GPIO_ENABLE 0 |
| 43 | #define TUSB6010_DMACHAN 0x3f |
| 44 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 45 | #define NOKIA_N810_WIMAX (1 << 2) |
| 46 | #define NOKIA_N810 (1 << 1) |
| 47 | #define NOKIA_N800 (1 << 0) |
| 48 | |
| 49 | static u32 board_caps; |
| 50 | |
| 51 | #define board_is_n800() (board_caps & NOKIA_N800) |
| 52 | #define board_is_n810() (board_caps & NOKIA_N810) |
| 53 | #define board_is_n810_wimax() (board_caps & NOKIA_N810_WIMAX) |
| 54 | |
| 55 | static void board_check_revision(void) |
| 56 | { |
| 57 | if (of_have_populated_dt()) { |
| 58 | if (of_machine_is_compatible("nokia,n800")) |
| 59 | board_caps = NOKIA_N800; |
| 60 | else if (of_machine_is_compatible("nokia,n810")) |
| 61 | board_caps = NOKIA_N810; |
| 62 | else if (of_machine_is_compatible("nokia,n810-wimax")) |
| 63 | board_caps = NOKIA_N810_WIMAX; |
| 64 | } else { |
| 65 | if (machine_is_nokia_n800()) |
| 66 | board_caps = NOKIA_N800; |
| 67 | else if (machine_is_nokia_n810()) |
| 68 | board_caps = NOKIA_N810; |
| 69 | else if (machine_is_nokia_n810_wimax()) |
| 70 | board_caps = NOKIA_N810_WIMAX; |
| 71 | } |
| 72 | |
| 73 | if (!board_caps) |
| 74 | pr_err("Unknown board\n"); |
| 75 | } |
| 76 | |
Aaro Koskinen | 0857ba3 | 2012-11-18 18:36:19 +0200 | [diff] [blame] | 77 | #if defined(CONFIG_I2C_CBUS_GPIO) || defined(CONFIG_I2C_CBUS_GPIO_MODULE) |
| 78 | static struct i2c_cbus_platform_data n8x0_cbus_data = { |
| 79 | .clk_gpio = 66, |
| 80 | .dat_gpio = 65, |
| 81 | .sel_gpio = 64, |
| 82 | }; |
| 83 | |
| 84 | static struct platform_device n8x0_cbus_device = { |
| 85 | .name = "i2c-cbus-gpio", |
| 86 | .id = 3, |
| 87 | .dev = { |
| 88 | .platform_data = &n8x0_cbus_data, |
| 89 | }, |
| 90 | }; |
| 91 | |
| 92 | static struct i2c_board_info n8x0_i2c_board_info_3[] __initdata = { |
| 93 | { |
| 94 | I2C_BOARD_INFO("retu-mfd", 0x01), |
| 95 | }, |
| 96 | }; |
| 97 | |
| 98 | static void __init n8x0_cbus_init(void) |
| 99 | { |
| 100 | const int retu_irq_gpio = 108; |
| 101 | |
| 102 | if (gpio_request_one(retu_irq_gpio, GPIOF_IN, "Retu IRQ")) |
| 103 | return; |
| 104 | irq_set_irq_type(gpio_to_irq(retu_irq_gpio), IRQ_TYPE_EDGE_RISING); |
| 105 | n8x0_i2c_board_info_3[0].irq = gpio_to_irq(retu_irq_gpio); |
| 106 | i2c_register_board_info(3, n8x0_i2c_board_info_3, |
| 107 | ARRAY_SIZE(n8x0_i2c_board_info_3)); |
| 108 | platform_device_register(&n8x0_cbus_device); |
| 109 | } |
| 110 | #else /* CONFIG_I2C_CBUS_GPIO */ |
| 111 | static void __init n8x0_cbus_init(void) |
| 112 | { |
| 113 | } |
| 114 | #endif /* CONFIG_I2C_CBUS_GPIO */ |
| 115 | |
Arnd Bergmann | 9a35f876 | 2011-10-02 16:45:47 +0200 | [diff] [blame] | 116 | #if defined(CONFIG_USB_MUSB_TUSB6010) || defined(CONFIG_USB_MUSB_TUSB6010_MODULE) |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 117 | /* |
| 118 | * Enable or disable power to TUSB6010. When enabling, turn on 3.3 V and |
| 119 | * 1.5 V voltage regulators of PM companion chip. Companion chip will then |
| 120 | * provide then PGOOD signal to TUSB6010 which will release it from reset. |
| 121 | */ |
| 122 | static int tusb_set_power(int state) |
| 123 | { |
| 124 | int i, retval = 0; |
| 125 | |
| 126 | if (state) { |
| 127 | gpio_set_value(TUSB6010_GPIO_ENABLE, 1); |
| 128 | msleep(1); |
| 129 | |
| 130 | /* Wait until TUSB6010 pulls INT pin down */ |
| 131 | i = 100; |
| 132 | while (i && gpio_get_value(TUSB6010_GPIO_INT)) { |
| 133 | msleep(1); |
| 134 | i--; |
| 135 | } |
| 136 | |
| 137 | if (!i) { |
| 138 | printk(KERN_ERR "tusb: powerup failed\n"); |
| 139 | retval = -ENODEV; |
| 140 | } |
| 141 | } else { |
| 142 | gpio_set_value(TUSB6010_GPIO_ENABLE, 0); |
| 143 | msleep(10); |
| 144 | } |
| 145 | |
| 146 | return retval; |
| 147 | } |
| 148 | |
| 149 | static struct musb_hdrc_config musb_config = { |
| 150 | .multipoint = 1, |
| 151 | .dyn_fifo = 1, |
| 152 | .num_eps = 16, |
| 153 | .ram_bits = 12, |
| 154 | }; |
| 155 | |
| 156 | static struct musb_hdrc_platform_data tusb_data = { |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 157 | .mode = MUSB_OTG, |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 158 | .set_power = tusb_set_power, |
| 159 | .min_power = 25, /* x2 = 50 mA drawn from VBUS as peripheral */ |
| 160 | .power = 100, /* Max 100 mA VBUS for host mode */ |
| 161 | .config = &musb_config, |
| 162 | }; |
| 163 | |
| 164 | static void __init n8x0_usb_init(void) |
| 165 | { |
| 166 | int ret = 0; |
| 167 | static char announce[] __initdata = KERN_INFO "TUSB 6010\n"; |
| 168 | |
| 169 | /* PM companion chip power control pin */ |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 170 | ret = gpio_request_one(TUSB6010_GPIO_ENABLE, GPIOF_OUT_INIT_LOW, |
| 171 | "TUSB6010 enable"); |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 172 | if (ret != 0) { |
| 173 | printk(KERN_ERR "Could not get TUSB power GPIO%i\n", |
| 174 | TUSB6010_GPIO_ENABLE); |
| 175 | return; |
| 176 | } |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 177 | tusb_set_power(0); |
| 178 | |
| 179 | ret = tusb6010_setup_interface(&tusb_data, TUSB6010_REFCLK_19, 2, |
| 180 | TUSB6010_ASYNC_CS, TUSB6010_SYNC_CS, |
| 181 | TUSB6010_GPIO_INT, TUSB6010_DMACHAN); |
| 182 | if (ret != 0) |
| 183 | goto err; |
| 184 | |
| 185 | printk(announce); |
| 186 | |
| 187 | return; |
| 188 | |
| 189 | err: |
| 190 | gpio_free(TUSB6010_GPIO_ENABLE); |
| 191 | } |
| 192 | #else |
| 193 | |
| 194 | static void __init n8x0_usb_init(void) {} |
| 195 | |
Felipe Balbi | 7c92554 | 2010-12-01 14:23:48 +0200 | [diff] [blame] | 196 | #endif /*CONFIG_USB_MUSB_TUSB6010 */ |
Francisco Alecrim | 97b9ad16 | 2010-03-10 18:52:24 -0800 | [diff] [blame] | 197 | |
| 198 | |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 199 | static struct omap2_mcspi_device_config p54spi_mcspi_config = { |
| 200 | .turbo_mode = 0, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 201 | }; |
| 202 | |
| 203 | static struct spi_board_info n800_spi_board_info[] __initdata = { |
| 204 | { |
| 205 | .modalias = "p54spi", |
| 206 | .bus_num = 2, |
| 207 | .chip_select = 0, |
| 208 | .max_speed_hz = 48000000, |
| 209 | .controller_data = &p54spi_mcspi_config, |
| 210 | }, |
| 211 | }; |
| 212 | |
| 213 | #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ |
| 214 | defined(CONFIG_MTD_ONENAND_OMAP2_MODULE) |
| 215 | |
| 216 | static struct mtd_partition onenand_partitions[] = { |
| 217 | { |
| 218 | .name = "bootloader", |
| 219 | .offset = 0, |
| 220 | .size = 0x20000, |
| 221 | .mask_flags = MTD_WRITEABLE, /* Force read-only */ |
| 222 | }, |
| 223 | { |
| 224 | .name = "config", |
| 225 | .offset = MTDPART_OFS_APPEND, |
| 226 | .size = 0x60000, |
| 227 | }, |
| 228 | { |
| 229 | .name = "kernel", |
| 230 | .offset = MTDPART_OFS_APPEND, |
| 231 | .size = 0x200000, |
| 232 | }, |
| 233 | { |
| 234 | .name = "initfs", |
| 235 | .offset = MTDPART_OFS_APPEND, |
| 236 | .size = 0x400000, |
| 237 | }, |
| 238 | { |
| 239 | .name = "rootfs", |
| 240 | .offset = MTDPART_OFS_APPEND, |
| 241 | .size = MTDPART_SIZ_FULL, |
| 242 | }, |
| 243 | }; |
| 244 | |
Aaro Koskinen | a1a92e6 | 2010-12-02 15:51:23 +0000 | [diff] [blame] | 245 | static struct omap_onenand_platform_data board_onenand_data[] = { |
| 246 | { |
| 247 | .cs = 0, |
| 248 | .gpio_irq = 26, |
| 249 | .parts = onenand_partitions, |
| 250 | .nr_parts = ARRAY_SIZE(onenand_partitions), |
| 251 | .flags = ONENAND_SYNC_READ, |
| 252 | } |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 253 | }; |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 254 | #endif |
| 255 | |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 256 | #if defined(CONFIG_MENELAUS) && \ |
| 257 | (defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE)) |
| 258 | |
| 259 | /* |
| 260 | * On both N800 and N810, only the first of the two MMC controllers is in use. |
| 261 | * The two MMC slots are multiplexed via Menelaus companion chip over I2C. |
| 262 | * On N800, both slots are powered via Menelaus. On N810, only one of the |
| 263 | * slots is powered via Menelaus. The N810 EMMC is powered via GPIO. |
| 264 | * |
| 265 | * VMMC slot 1 on both N800 and N810 |
| 266 | * VDCDC3_APE and VMCS2_APE slot 2 on N800 |
| 267 | * GPIO23 and GPIO9 slot 2 EMMC on N810 |
| 268 | * |
| 269 | */ |
| 270 | #define N8X0_SLOT_SWITCH_GPIO 96 |
| 271 | #define N810_EMMC_VSD_GPIO 23 |
Tony Lindgren | 1dea5c6 | 2010-04-21 15:27:24 -0700 | [diff] [blame] | 272 | #define N810_EMMC_VIO_GPIO 9 |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 273 | |
Tony Lindgren | 49b87c6 | 2012-03-06 11:49:28 -0800 | [diff] [blame] | 274 | static int slot1_cover_open; |
| 275 | static int slot2_cover_open; |
| 276 | static struct device *mmc_device; |
| 277 | |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 278 | static int n8x0_mmc_switch_slot(struct device *dev, int slot) |
| 279 | { |
| 280 | #ifdef CONFIG_MMC_DEBUG |
| 281 | dev_dbg(dev, "Choose slot %d\n", slot + 1); |
| 282 | #endif |
| 283 | gpio_set_value(N8X0_SLOT_SWITCH_GPIO, slot); |
| 284 | return 0; |
| 285 | } |
| 286 | |
| 287 | static int n8x0_mmc_set_power_menelaus(struct device *dev, int slot, |
| 288 | int power_on, int vdd) |
| 289 | { |
| 290 | int mV; |
| 291 | |
| 292 | #ifdef CONFIG_MMC_DEBUG |
| 293 | dev_dbg(dev, "Set slot %d power: %s (vdd %d)\n", slot + 1, |
| 294 | power_on ? "on" : "off", vdd); |
| 295 | #endif |
| 296 | if (slot == 0) { |
| 297 | if (!power_on) |
| 298 | return menelaus_set_vmmc(0); |
| 299 | switch (1 << vdd) { |
| 300 | case MMC_VDD_33_34: |
| 301 | case MMC_VDD_32_33: |
| 302 | case MMC_VDD_31_32: |
| 303 | mV = 3100; |
| 304 | break; |
| 305 | case MMC_VDD_30_31: |
| 306 | mV = 3000; |
| 307 | break; |
| 308 | case MMC_VDD_28_29: |
| 309 | mV = 2800; |
| 310 | break; |
| 311 | case MMC_VDD_165_195: |
| 312 | mV = 1850; |
| 313 | break; |
| 314 | default: |
| 315 | BUG(); |
| 316 | } |
| 317 | return menelaus_set_vmmc(mV); |
| 318 | } else { |
| 319 | if (!power_on) |
| 320 | return menelaus_set_vdcdc(3, 0); |
| 321 | switch (1 << vdd) { |
| 322 | case MMC_VDD_33_34: |
| 323 | case MMC_VDD_32_33: |
| 324 | mV = 3300; |
| 325 | break; |
| 326 | case MMC_VDD_30_31: |
| 327 | case MMC_VDD_29_30: |
| 328 | mV = 3000; |
| 329 | break; |
| 330 | case MMC_VDD_28_29: |
| 331 | case MMC_VDD_27_28: |
| 332 | mV = 2800; |
| 333 | break; |
| 334 | case MMC_VDD_24_25: |
| 335 | case MMC_VDD_23_24: |
| 336 | mV = 2400; |
| 337 | break; |
| 338 | case MMC_VDD_22_23: |
| 339 | case MMC_VDD_21_22: |
| 340 | mV = 2200; |
| 341 | break; |
| 342 | case MMC_VDD_20_21: |
| 343 | mV = 2000; |
| 344 | break; |
| 345 | case MMC_VDD_165_195: |
| 346 | mV = 1800; |
| 347 | break; |
| 348 | default: |
| 349 | BUG(); |
| 350 | } |
| 351 | return menelaus_set_vdcdc(3, mV); |
| 352 | } |
| 353 | return 0; |
| 354 | } |
| 355 | |
| 356 | static void n810_set_power_emmc(struct device *dev, |
| 357 | int power_on) |
| 358 | { |
| 359 | dev_dbg(dev, "Set EMMC power %s\n", power_on ? "on" : "off"); |
| 360 | |
| 361 | if (power_on) { |
| 362 | gpio_set_value(N810_EMMC_VSD_GPIO, 1); |
| 363 | msleep(1); |
Tony Lindgren | 1dea5c6 | 2010-04-21 15:27:24 -0700 | [diff] [blame] | 364 | gpio_set_value(N810_EMMC_VIO_GPIO, 1); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 365 | msleep(1); |
| 366 | } else { |
Tony Lindgren | 1dea5c6 | 2010-04-21 15:27:24 -0700 | [diff] [blame] | 367 | gpio_set_value(N810_EMMC_VIO_GPIO, 0); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 368 | msleep(50); |
| 369 | gpio_set_value(N810_EMMC_VSD_GPIO, 0); |
| 370 | msleep(50); |
| 371 | } |
| 372 | } |
| 373 | |
| 374 | static int n8x0_mmc_set_power(struct device *dev, int slot, int power_on, |
| 375 | int vdd) |
| 376 | { |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 377 | if (board_is_n800() || slot == 0) |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 378 | return n8x0_mmc_set_power_menelaus(dev, slot, power_on, vdd); |
| 379 | |
| 380 | n810_set_power_emmc(dev, power_on); |
| 381 | |
| 382 | return 0; |
| 383 | } |
| 384 | |
| 385 | static int n8x0_mmc_set_bus_mode(struct device *dev, int slot, int bus_mode) |
| 386 | { |
| 387 | int r; |
| 388 | |
| 389 | dev_dbg(dev, "Set slot %d bus mode %s\n", slot + 1, |
| 390 | bus_mode == MMC_BUSMODE_OPENDRAIN ? "open-drain" : "push-pull"); |
| 391 | BUG_ON(slot != 0 && slot != 1); |
| 392 | slot++; |
| 393 | switch (bus_mode) { |
| 394 | case MMC_BUSMODE_OPENDRAIN: |
| 395 | r = menelaus_set_mmc_opendrain(slot, 1); |
| 396 | break; |
| 397 | case MMC_BUSMODE_PUSHPULL: |
| 398 | r = menelaus_set_mmc_opendrain(slot, 0); |
| 399 | break; |
| 400 | default: |
| 401 | BUG(); |
| 402 | } |
| 403 | if (r != 0 && printk_ratelimit()) |
| 404 | dev_err(dev, "MMC: unable to set bus mode for slot %d\n", |
| 405 | slot); |
| 406 | return r; |
| 407 | } |
| 408 | |
| 409 | static int n8x0_mmc_get_cover_state(struct device *dev, int slot) |
| 410 | { |
| 411 | slot++; |
| 412 | BUG_ON(slot != 1 && slot != 2); |
| 413 | if (slot == 1) |
| 414 | return slot1_cover_open; |
| 415 | else |
| 416 | return slot2_cover_open; |
| 417 | } |
| 418 | |
| 419 | static void n8x0_mmc_callback(void *data, u8 card_mask) |
| 420 | { |
| 421 | int bit, *openp, index; |
| 422 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 423 | if (board_is_n800()) { |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 424 | bit = 1 << 1; |
| 425 | openp = &slot2_cover_open; |
| 426 | index = 1; |
| 427 | } else { |
| 428 | bit = 1; |
| 429 | openp = &slot1_cover_open; |
| 430 | index = 0; |
| 431 | } |
| 432 | |
| 433 | if (card_mask & bit) |
| 434 | *openp = 1; |
| 435 | else |
| 436 | *openp = 0; |
| 437 | |
Tony Lindgren | d517110 | 2012-02-20 10:00:03 -0800 | [diff] [blame] | 438 | #ifdef CONFIG_MMC_OMAP |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 439 | omap_mmc_notify_cover_event(mmc_device, index, *openp); |
Tony Lindgren | d517110 | 2012-02-20 10:00:03 -0800 | [diff] [blame] | 440 | #else |
| 441 | pr_warn("MMC: notify cover event not available\n"); |
| 442 | #endif |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 443 | } |
| 444 | |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 445 | static int n8x0_mmc_late_init(struct device *dev) |
| 446 | { |
| 447 | int r, bit, *openp; |
| 448 | int vs2sel; |
| 449 | |
| 450 | mmc_device = dev; |
| 451 | |
| 452 | r = menelaus_set_slot_sel(1); |
| 453 | if (r < 0) |
| 454 | return r; |
| 455 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 456 | if (board_is_n800()) |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 457 | vs2sel = 0; |
| 458 | else |
| 459 | vs2sel = 2; |
| 460 | |
| 461 | r = menelaus_set_mmc_slot(2, 0, vs2sel, 1); |
| 462 | if (r < 0) |
| 463 | return r; |
| 464 | |
| 465 | n8x0_mmc_set_power(dev, 0, MMC_POWER_ON, 16); /* MMC_VDD_28_29 */ |
| 466 | n8x0_mmc_set_power(dev, 1, MMC_POWER_ON, 16); |
| 467 | |
| 468 | r = menelaus_set_mmc_slot(1, 1, 0, 1); |
| 469 | if (r < 0) |
| 470 | return r; |
| 471 | r = menelaus_set_mmc_slot(2, 1, vs2sel, 1); |
| 472 | if (r < 0) |
| 473 | return r; |
| 474 | |
| 475 | r = menelaus_get_slot_pin_states(); |
| 476 | if (r < 0) |
| 477 | return r; |
| 478 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 479 | if (board_is_n800()) { |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 480 | bit = 1 << 1; |
| 481 | openp = &slot2_cover_open; |
| 482 | } else { |
| 483 | bit = 1; |
| 484 | openp = &slot1_cover_open; |
| 485 | slot2_cover_open = 0; |
| 486 | } |
| 487 | |
| 488 | /* All slot pin bits seem to be inversed until first switch change */ |
| 489 | if (r == 0xf || r == (0xf & ~bit)) |
| 490 | r = ~r; |
| 491 | |
| 492 | if (r & bit) |
| 493 | *openp = 1; |
| 494 | else |
| 495 | *openp = 0; |
| 496 | |
| 497 | r = menelaus_register_mmc_callback(n8x0_mmc_callback, NULL); |
| 498 | |
| 499 | return r; |
| 500 | } |
| 501 | |
| 502 | static void n8x0_mmc_shutdown(struct device *dev) |
| 503 | { |
| 504 | int vs2sel; |
| 505 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 506 | if (board_is_n800()) |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 507 | vs2sel = 0; |
| 508 | else |
| 509 | vs2sel = 2; |
| 510 | |
| 511 | menelaus_set_mmc_slot(1, 0, 0, 0); |
| 512 | menelaus_set_mmc_slot(2, 0, vs2sel, 0); |
| 513 | } |
| 514 | |
| 515 | static void n8x0_mmc_cleanup(struct device *dev) |
| 516 | { |
| 517 | menelaus_unregister_mmc_callback(); |
| 518 | |
| 519 | gpio_free(N8X0_SLOT_SWITCH_GPIO); |
| 520 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 521 | if (board_is_n810()) { |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 522 | gpio_free(N810_EMMC_VSD_GPIO); |
Tony Lindgren | 1dea5c6 | 2010-04-21 15:27:24 -0700 | [diff] [blame] | 523 | gpio_free(N810_EMMC_VIO_GPIO); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 524 | } |
| 525 | } |
| 526 | |
| 527 | /* |
| 528 | * MMC controller1 has two slots that are multiplexed via I2C. |
| 529 | * MMC controller2 is not in use. |
| 530 | */ |
| 531 | static struct omap_mmc_platform_data mmc1_data = { |
| 532 | .nr_slots = 2, |
| 533 | .switch_slot = n8x0_mmc_switch_slot, |
| 534 | .init = n8x0_mmc_late_init, |
| 535 | .cleanup = n8x0_mmc_cleanup, |
| 536 | .shutdown = n8x0_mmc_shutdown, |
| 537 | .max_freq = 24000000, |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 538 | .slots[0] = { |
| 539 | .wires = 4, |
| 540 | .set_power = n8x0_mmc_set_power, |
| 541 | .set_bus_mode = n8x0_mmc_set_bus_mode, |
| 542 | .get_cover_state = n8x0_mmc_get_cover_state, |
| 543 | .ocr_mask = MMC_VDD_165_195 | MMC_VDD_30_31 | |
| 544 | MMC_VDD_32_33 | MMC_VDD_33_34, |
| 545 | .name = "internal", |
| 546 | }, |
| 547 | .slots[1] = { |
| 548 | .set_power = n8x0_mmc_set_power, |
| 549 | .set_bus_mode = n8x0_mmc_set_bus_mode, |
| 550 | .get_cover_state = n8x0_mmc_get_cover_state, |
| 551 | .ocr_mask = MMC_VDD_165_195 | MMC_VDD_20_21 | |
| 552 | MMC_VDD_21_22 | MMC_VDD_22_23 | |
| 553 | MMC_VDD_23_24 | MMC_VDD_24_25 | |
| 554 | MMC_VDD_27_28 | MMC_VDD_28_29 | |
| 555 | MMC_VDD_29_30 | MMC_VDD_30_31 | |
| 556 | MMC_VDD_32_33 | MMC_VDD_33_34, |
| 557 | .name = "external", |
| 558 | }, |
| 559 | }; |
| 560 | |
| 561 | static struct omap_mmc_platform_data *mmc_data[OMAP24XX_NR_MMC]; |
| 562 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 563 | static struct gpio n810_emmc_gpios[] __initdata = { |
| 564 | { N810_EMMC_VSD_GPIO, GPIOF_OUT_INIT_LOW, "MMC slot 2 Vddf" }, |
| 565 | { N810_EMMC_VIO_GPIO, GPIOF_OUT_INIT_LOW, "MMC slot 2 Vdd" }, |
| 566 | }; |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 567 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 568 | static void __init n8x0_mmc_init(void) |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 569 | { |
| 570 | int err; |
| 571 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 572 | if (board_is_n810()) { |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 573 | mmc1_data.slots[0].name = "external"; |
| 574 | |
| 575 | /* |
| 576 | * Some Samsung Movinand chips do not like open-ended |
| 577 | * multi-block reads and fall to braind-dead state |
| 578 | * while doing so. Reducing the number of blocks in |
| 579 | * the transfer or delays in clock disable do not help |
| 580 | */ |
| 581 | mmc1_data.slots[1].name = "internal"; |
| 582 | mmc1_data.slots[1].ban_openended = 1; |
| 583 | } |
| 584 | |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 585 | err = gpio_request_one(N8X0_SLOT_SWITCH_GPIO, GPIOF_OUT_INIT_LOW, |
| 586 | "MMC slot switch"); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 587 | if (err) |
Tony Lindgren | 1dea5c6 | 2010-04-21 15:27:24 -0700 | [diff] [blame] | 588 | return; |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 589 | |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 590 | if (board_is_n810()) { |
Igor Grinberg | bc593f5 | 2011-05-03 18:22:09 +0300 | [diff] [blame] | 591 | err = gpio_request_array(n810_emmc_gpios, |
| 592 | ARRAY_SIZE(n810_emmc_gpios)); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 593 | if (err) { |
| 594 | gpio_free(N8X0_SLOT_SWITCH_GPIO); |
Tony Lindgren | 1dea5c6 | 2010-04-21 15:27:24 -0700 | [diff] [blame] | 595 | return; |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 596 | } |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 597 | } |
| 598 | |
| 599 | mmc_data[0] = &mmc1_data; |
Tony Lindgren | 810ac2a | 2013-11-25 15:17:10 -0800 | [diff] [blame^] | 600 | if (!of_have_populated_dt()) |
| 601 | omap242x_init_mmc(mmc_data); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 602 | } |
| 603 | #else |
| 604 | |
| 605 | void __init n8x0_mmc_init(void) |
| 606 | { |
| 607 | } |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 608 | #endif /* CONFIG_MMC_OMAP */ |
| 609 | |
| 610 | #ifdef CONFIG_MENELAUS |
| 611 | |
| 612 | static int n8x0_auto_sleep_regulators(void) |
| 613 | { |
| 614 | u32 val; |
| 615 | int ret; |
| 616 | |
| 617 | val = EN_VPLL_SLEEP | EN_VMMC_SLEEP \ |
| 618 | | EN_VAUX_SLEEP | EN_VIO_SLEEP \ |
| 619 | | EN_VMEM_SLEEP | EN_DC3_SLEEP \ |
| 620 | | EN_VC_SLEEP | EN_DC2_SLEEP; |
| 621 | |
| 622 | ret = menelaus_set_regulator_sleep(1, val); |
| 623 | if (ret < 0) { |
Paul Walmsley | 7852ec0 | 2012-07-26 00:54:26 -0600 | [diff] [blame] | 624 | pr_err("Could not set regulators to sleep on menelaus: %u\n", |
| 625 | ret); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 626 | return ret; |
| 627 | } |
| 628 | return 0; |
| 629 | } |
| 630 | |
| 631 | static int n8x0_auto_voltage_scale(void) |
| 632 | { |
| 633 | int ret; |
| 634 | |
| 635 | ret = menelaus_set_vcore_hw(1400, 1050); |
| 636 | if (ret < 0) { |
Paul Walmsley | 7852ec0 | 2012-07-26 00:54:26 -0600 | [diff] [blame] | 637 | pr_err("Could not set VCORE voltage on menelaus: %u\n", ret); |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 638 | return ret; |
| 639 | } |
| 640 | return 0; |
| 641 | } |
| 642 | |
| 643 | static int n8x0_menelaus_late_init(struct device *dev) |
| 644 | { |
| 645 | int ret; |
| 646 | |
| 647 | ret = n8x0_auto_voltage_scale(); |
| 648 | if (ret < 0) |
| 649 | return ret; |
| 650 | ret = n8x0_auto_sleep_regulators(); |
| 651 | if (ret < 0) |
| 652 | return ret; |
| 653 | return 0; |
| 654 | } |
| 655 | |
Jarkko Nikula | a7f97d2 | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 656 | #else |
| 657 | static int n8x0_menelaus_late_init(struct device *dev) |
| 658 | { |
| 659 | return 0; |
| 660 | } |
| 661 | #endif |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 662 | |
Jarkko Nikula | a7f97d2 | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 663 | static struct menelaus_platform_data n8x0_menelaus_platform_data __initdata = { |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 664 | .late_init = n8x0_menelaus_late_init, |
| 665 | }; |
| 666 | |
Jarkko Nikula | a7f97d2 | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 667 | static struct i2c_board_info __initdata n8x0_i2c_board_info_1[] __initdata = { |
| 668 | { |
| 669 | I2C_BOARD_INFO("menelaus", 0x72), |
Tony Lindgren | 7d7e1eb | 2012-08-27 17:43:01 -0700 | [diff] [blame] | 670 | .irq = 7 + OMAP_INTC_START, |
Jarkko Nikula | a7f97d2 | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 671 | .platform_data = &n8x0_menelaus_platform_data, |
| 672 | }, |
| 673 | }; |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 674 | |
Jarkko Nikula | 366498d | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 675 | static struct aic3x_pdata n810_aic33_data __initdata = { |
| 676 | .gpio_reset = 118, |
| 677 | }; |
| 678 | |
| 679 | static struct i2c_board_info n810_i2c_board_info_2[] __initdata = { |
| 680 | { |
| 681 | I2C_BOARD_INFO("tlv320aic3x", 0x18), |
| 682 | .platform_data = &n810_aic33_data, |
| 683 | }, |
| 684 | }; |
Tony Lindgren | 9418c65 | 2010-02-26 15:31:12 -0800 | [diff] [blame] | 685 | |
Tony Lindgren | bd8f0fc | 2010-07-05 16:31:38 +0300 | [diff] [blame] | 686 | #ifdef CONFIG_OMAP_MUX |
| 687 | static struct omap_board_mux board_mux[] __initdata = { |
Jarkko Nikula | 04be1e9 | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 688 | /* I2S codec port pins for McBSP block */ |
| 689 | OMAP2420_MUX(EAC_AC_SCLK, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 690 | OMAP2420_MUX(EAC_AC_FS, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 691 | OMAP2420_MUX(EAC_AC_DIN, OMAP_MUX_MODE1 | OMAP_PIN_INPUT), |
| 692 | OMAP2420_MUX(EAC_AC_DOUT, OMAP_MUX_MODE1 | OMAP_PIN_OUTPUT), |
Tony Lindgren | bd8f0fc | 2010-07-05 16:31:38 +0300 | [diff] [blame] | 693 | { .reg_offset = OMAP_MUX_TERMINATOR }, |
| 694 | }; |
Tony Lindgren | 0b50c69 | 2010-12-22 18:42:36 -0800 | [diff] [blame] | 695 | |
| 696 | static struct omap_device_pad serial2_pads[] __initdata = { |
| 697 | { |
| 698 | .name = "uart3_rx_irrx.uart3_rx_irrx", |
| 699 | .flags = OMAP_DEVICE_PAD_REMUX | OMAP_DEVICE_PAD_WAKEUP, |
| 700 | .enable = OMAP_MUX_MODE0, |
| 701 | .idle = OMAP_MUX_MODE3 /* Mux as GPIO for idle */ |
| 702 | }, |
| 703 | }; |
| 704 | |
| 705 | static inline void board_serial_init(void) |
| 706 | { |
| 707 | struct omap_board_data bdata; |
| 708 | |
| 709 | bdata.flags = 0; |
| 710 | bdata.pads = NULL; |
| 711 | bdata.pads_cnt = 0; |
| 712 | |
| 713 | bdata.id = 0; |
Deepak K | c86845db | 2011-11-09 17:33:38 +0530 | [diff] [blame] | 714 | omap_serial_init_port(&bdata, NULL); |
Tony Lindgren | 0b50c69 | 2010-12-22 18:42:36 -0800 | [diff] [blame] | 715 | |
| 716 | bdata.id = 1; |
Deepak K | c86845db | 2011-11-09 17:33:38 +0530 | [diff] [blame] | 717 | omap_serial_init_port(&bdata, NULL); |
Tony Lindgren | 0b50c69 | 2010-12-22 18:42:36 -0800 | [diff] [blame] | 718 | |
| 719 | bdata.id = 2; |
| 720 | bdata.pads = serial2_pads; |
| 721 | bdata.pads_cnt = ARRAY_SIZE(serial2_pads); |
Deepak K | c86845db | 2011-11-09 17:33:38 +0530 | [diff] [blame] | 722 | omap_serial_init_port(&bdata, NULL); |
Tony Lindgren | 0b50c69 | 2010-12-22 18:42:36 -0800 | [diff] [blame] | 723 | } |
| 724 | |
| 725 | #else |
| 726 | |
| 727 | static inline void board_serial_init(void) |
| 728 | { |
| 729 | omap_serial_init(); |
| 730 | } |
| 731 | |
Tony Lindgren | bd8f0fc | 2010-07-05 16:31:38 +0300 | [diff] [blame] | 732 | #endif |
| 733 | |
Tony Lindgren | 810ac2a | 2013-11-25 15:17:10 -0800 | [diff] [blame^] | 734 | static int __init n8x0_late_initcall(void) |
| 735 | { |
| 736 | if (!board_caps) |
| 737 | return -ENODEV; |
| 738 | |
| 739 | gpmc_onenand_init(board_onenand_data); |
| 740 | n8x0_mmc_init(); |
| 741 | n8x0_usb_init(); |
| 742 | if (!of_have_populated_dt()) |
| 743 | n8x0_cbus_init(); |
| 744 | |
| 745 | return 0; |
| 746 | } |
| 747 | omap_late_initcall(n8x0_late_initcall); |
| 748 | |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 749 | static void __init n8x0_init_machine(void) |
| 750 | { |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 751 | board_check_revision(); |
Tony Lindgren | bd8f0fc | 2010-07-05 16:31:38 +0300 | [diff] [blame] | 752 | omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC); |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 753 | /* FIXME: add n810 spi devices */ |
| 754 | spi_register_board_info(n800_spi_board_info, |
| 755 | ARRAY_SIZE(n800_spi_board_info)); |
Jarkko Nikula | a7f97d2 | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 756 | omap_register_i2c_bus(1, 400, n8x0_i2c_board_info_1, |
| 757 | ARRAY_SIZE(n8x0_i2c_board_info_1)); |
Jarkko Nikula | 366498d | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 758 | omap_register_i2c_bus(2, 400, NULL, 0); |
Tony Lindgren | c8f27e9 | 2013-11-25 15:17:09 -0800 | [diff] [blame] | 759 | if (board_is_n810()) |
Jarkko Nikula | 366498d | 2010-08-20 09:36:28 +0300 | [diff] [blame] | 760 | i2c_register_board_info(2, n810_i2c_board_info_2, |
| 761 | ARRAY_SIZE(n810_i2c_board_info_2)); |
Tony Lindgren | 810ac2a | 2013-11-25 15:17:10 -0800 | [diff] [blame^] | 762 | if (!of_have_populated_dt()) { |
| 763 | board_serial_init(); |
| 764 | omap_sdrc_init(NULL, NULL); |
| 765 | } |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 766 | } |
| 767 | |
| 768 | MACHINE_START(NOKIA_N800, "Nokia N800") |
Nicolas Pitre | 5e52b43 | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 769 | .atag_offset = 0x100, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 770 | .reserve = omap_reserve, |
Tony Lindgren | e990a40 | 2011-09-26 14:52:55 -0700 | [diff] [blame] | 771 | .map_io = omap242x_map_io, |
Tony Lindgren | 8f5b5a4 | 2011-08-22 23:57:24 -0700 | [diff] [blame] | 772 | .init_early = omap2420_init_early, |
Tony Lindgren | 741e3a8 | 2011-05-17 03:51:26 -0700 | [diff] [blame] | 773 | .init_irq = omap2_init_irq, |
Marc Zyngier | 6b2f55d | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 774 | .handle_irq = omap2_intc_handle_irq, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 775 | .init_machine = n8x0_init_machine, |
Shawn Guo | bbd707a | 2012-04-26 16:06:50 +0800 | [diff] [blame] | 776 | .init_late = omap2420_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 777 | .init_time = omap2_sync32k_timer_init, |
Paul Walmsley | 187e3e0 | 2012-10-29 20:56:12 -0600 | [diff] [blame] | 778 | .restart = omap2xxx_restart, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 779 | MACHINE_END |
| 780 | |
| 781 | MACHINE_START(NOKIA_N810, "Nokia N810") |
Nicolas Pitre | 5e52b43 | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 782 | .atag_offset = 0x100, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 783 | .reserve = omap_reserve, |
Tony Lindgren | e990a40 | 2011-09-26 14:52:55 -0700 | [diff] [blame] | 784 | .map_io = omap242x_map_io, |
Tony Lindgren | 8f5b5a4 | 2011-08-22 23:57:24 -0700 | [diff] [blame] | 785 | .init_early = omap2420_init_early, |
Tony Lindgren | 741e3a8 | 2011-05-17 03:51:26 -0700 | [diff] [blame] | 786 | .init_irq = omap2_init_irq, |
Marc Zyngier | 6b2f55d | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 787 | .handle_irq = omap2_intc_handle_irq, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 788 | .init_machine = n8x0_init_machine, |
Shawn Guo | bbd707a | 2012-04-26 16:06:50 +0800 | [diff] [blame] | 789 | .init_late = omap2420_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 790 | .init_time = omap2_sync32k_timer_init, |
Paul Walmsley | 187e3e0 | 2012-10-29 20:56:12 -0600 | [diff] [blame] | 791 | .restart = omap2xxx_restart, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 792 | MACHINE_END |
| 793 | |
| 794 | MACHINE_START(NOKIA_N810_WIMAX, "Nokia N810 WiMAX") |
Nicolas Pitre | 5e52b43 | 2011-07-05 22:38:15 -0400 | [diff] [blame] | 795 | .atag_offset = 0x100, |
Russell King | 71ee7da | 2010-05-23 10:18:16 +0100 | [diff] [blame] | 796 | .reserve = omap_reserve, |
Tony Lindgren | e990a40 | 2011-09-26 14:52:55 -0700 | [diff] [blame] | 797 | .map_io = omap242x_map_io, |
Tony Lindgren | 8f5b5a4 | 2011-08-22 23:57:24 -0700 | [diff] [blame] | 798 | .init_early = omap2420_init_early, |
Tony Lindgren | 741e3a8 | 2011-05-17 03:51:26 -0700 | [diff] [blame] | 799 | .init_irq = omap2_init_irq, |
Marc Zyngier | 6b2f55d | 2011-09-06 10:23:45 +0100 | [diff] [blame] | 800 | .handle_irq = omap2_intc_handle_irq, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 801 | .init_machine = n8x0_init_machine, |
Shawn Guo | bbd707a | 2012-04-26 16:06:50 +0800 | [diff] [blame] | 802 | .init_late = omap2420_init_late, |
Stephen Warren | 6bb27d7 | 2012-11-08 12:40:59 -0700 | [diff] [blame] | 803 | .init_time = omap2_sync32k_timer_init, |
Paul Walmsley | 187e3e0 | 2012-10-29 20:56:12 -0600 | [diff] [blame] | 804 | .restart = omap2xxx_restart, |
Kalle Valo | 6313881 | 2009-08-28 10:51:38 -0700 | [diff] [blame] | 805 | MACHINE_END |