Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * AP4EVB board support |
| 3 | * |
| 4 | * Copyright (C) 2010 Magnus Damm |
| 5 | * Copyright (C) 2008 Yoshihiro Shimoda |
| 6 | * |
| 7 | * This program is free software; you can redistribute it and/or modify |
| 8 | * it under the terms of the GNU General Public License as published by |
| 9 | * the Free Software Foundation; version 2 of the License. |
| 10 | * |
| 11 | * This program is distributed in the hope that it will be useful, |
| 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 14 | * GNU General Public License for more details. |
| 15 | * |
| 16 | * You should have received a copy of the GNU General Public License |
| 17 | * along with this program; if not, write to the Free Software |
| 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| 19 | */ |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 20 | #include <linux/clk.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 21 | #include <linux/kernel.h> |
| 22 | #include <linux/init.h> |
| 23 | #include <linux/interrupt.h> |
| 24 | #include <linux/irq.h> |
| 25 | #include <linux/platform_device.h> |
| 26 | #include <linux/delay.h> |
Guennadi Liakhovetski | 69bf6f45 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 27 | #include <linux/mfd/sh_mobile_sdhi.h> |
Guennadi Liakhovetski | 341291a | 2010-05-23 14:12:46 +0000 | [diff] [blame] | 28 | #include <linux/mmc/host.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 29 | #include <linux/mtd/mtd.h> |
| 30 | #include <linux/mtd/partitions.h> |
| 31 | #include <linux/mtd/physmap.h> |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 32 | #include <linux/mmc/host.h> |
| 33 | #include <linux/mmc/sh_mmcif.h> |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 34 | #include <linux/i2c.h> |
| 35 | #include <linux/i2c/tsc2007.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 36 | #include <linux/io.h> |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 37 | #include <linux/smsc911x.h> |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 38 | #include <linux/sh_intc.h> |
| 39 | #include <linux/sh_clk.h> |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 40 | #include <linux/gpio.h> |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 41 | #include <linux/input.h> |
| 42 | #include <linux/input/sh_keysc.h> |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 43 | #include <linux/usb/r8a66597.h> |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 44 | |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 45 | #include <sound/sh_fsi.h> |
| 46 | |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 47 | #include <video/sh_mobile_lcdc.h> |
| 48 | #include <video/sh_mipi_dsi.h> |
| 49 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 50 | #include <mach/common.h> |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 51 | #include <mach/irqs.h> |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 52 | #include <mach/sh7372.h> |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 53 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 54 | #include <asm/mach-types.h> |
| 55 | #include <asm/mach/arch.h> |
| 56 | #include <asm/mach/map.h> |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame] | 57 | #include <asm/mach/time.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 58 | |
Kuninori Morimoto | 02624a1 | 2010-02-18 17:58:19 +0900 | [diff] [blame] | 59 | /* |
| 60 | * Address Interface BusWidth note |
| 61 | * ------------------------------------------------------------------ |
| 62 | * 0x0000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = ON |
| 63 | * 0x0800_0000 user area - |
| 64 | * 0x1000_0000 NOR Flash ROM (MCP) 16bit SW7 : bit1 = OFF |
| 65 | * 0x1400_0000 Ether (LAN9220) 16bit |
| 66 | * 0x1600_0000 user area - cannot use with NAND |
| 67 | * 0x1800_0000 user area - |
| 68 | * 0x1A00_0000 - |
| 69 | * 0x4000_0000 LPDDR2-SDRAM (POP) 32bit |
| 70 | */ |
| 71 | |
| 72 | /* |
| 73 | * NOR Flash ROM |
| 74 | * |
| 75 | * SW1 | SW2 | SW7 | NOR Flash ROM |
| 76 | * bit1 | bit1 bit2 | bit1 | Memory allocation |
| 77 | * ------+------------+------+------------------ |
| 78 | * OFF | ON OFF | ON | Area 0 |
| 79 | * OFF | ON OFF | OFF | Area 4 |
| 80 | */ |
| 81 | |
| 82 | /* |
| 83 | * NAND Flash ROM |
| 84 | * |
| 85 | * SW1 | SW2 | SW7 | NAND Flash ROM |
| 86 | * bit1 | bit1 bit2 | bit2 | Memory allocation |
| 87 | * ------+------------+------+------------------ |
| 88 | * OFF | ON OFF | ON | FCE 0 |
| 89 | * OFF | ON OFF | OFF | FCE 1 |
| 90 | */ |
| 91 | |
| 92 | /* |
| 93 | * SMSC 9220 |
| 94 | * |
| 95 | * SW1 SMSC 9220 |
| 96 | * ----------------------- |
| 97 | * ON access disable |
| 98 | * OFF access enable |
| 99 | */ |
| 100 | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 101 | /* |
Kuninori Morimoto | dda128d | 2010-03-12 10:07:55 +0000 | [diff] [blame] | 102 | * LCD / IRQ / KEYSC / IrDA |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 103 | * |
Kuninori Morimoto | dda128d | 2010-03-12 10:07:55 +0000 | [diff] [blame] | 104 | * IRQ = IRQ26 (TS), IRQ27 (VIO), IRQ28 (TouchScreen) |
| 105 | * LCD = 2nd LCDC |
| 106 | * |
| 107 | * | SW43 | |
| 108 | * SW3 | ON | OFF | |
| 109 | * -------------+-----------------------+---------------+ |
| 110 | * ON | KEY / IrDA | LCD | |
| 111 | * OFF | KEY / IrDA / IRQ | IRQ | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 112 | */ |
| 113 | |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 114 | /* |
| 115 | * USB |
| 116 | * |
| 117 | * J7 : 1-2 MAX3355E VBUS |
| 118 | * 2-3 DC 5.0V |
| 119 | * |
| 120 | * S39: bit2: off |
| 121 | */ |
| 122 | |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 123 | /* |
| 124 | * FSI/FSMI |
| 125 | * |
| 126 | * SW41 : ON : SH-Mobile AP4 Audio Mode |
| 127 | * : OFF : Bluetooth Audio Mode |
| 128 | */ |
| 129 | |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 130 | /* |
Kuninori Morimoto | d3d03e4 | 2010-06-01 04:31:29 +0000 | [diff] [blame] | 131 | * MMC0/SDHI1 (CN7) |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 132 | * |
Kuninori Morimoto | d3d03e4 | 2010-06-01 04:31:29 +0000 | [diff] [blame] | 133 | * J22 : select card voltage |
| 134 | * 1-2 pin : 1.8v |
| 135 | * 2-3 pin : 3.3v |
| 136 | * |
| 137 | * SW1 | SW33 |
| 138 | * | bit1 | bit2 | bit3 | bit4 |
| 139 | * ------------+------+------+------+------- |
| 140 | * MMC0 OFF | OFF | ON | ON | X |
| 141 | * SDHI1 OFF | ON | X | OFF | ON |
| 142 | * |
| 143 | * voltage lebel |
| 144 | * CN7 : 1.8v |
| 145 | * CN12: 3.3v |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 146 | */ |
| 147 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 148 | /* MTD */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 149 | static struct mtd_partition nor_flash_partitions[] = { |
| 150 | { |
| 151 | .name = "loader", |
| 152 | .offset = 0x00000000, |
| 153 | .size = 512 * 1024, |
| 154 | }, |
| 155 | { |
| 156 | .name = "bootenv", |
| 157 | .offset = MTDPART_OFS_APPEND, |
| 158 | .size = 512 * 1024, |
| 159 | }, |
| 160 | { |
| 161 | .name = "kernel_ro", |
| 162 | .offset = MTDPART_OFS_APPEND, |
| 163 | .size = 8 * 1024 * 1024, |
| 164 | .mask_flags = MTD_WRITEABLE, |
| 165 | }, |
| 166 | { |
| 167 | .name = "kernel", |
| 168 | .offset = MTDPART_OFS_APPEND, |
| 169 | .size = 8 * 1024 * 1024, |
| 170 | }, |
| 171 | { |
| 172 | .name = "data", |
| 173 | .offset = MTDPART_OFS_APPEND, |
| 174 | .size = MTDPART_SIZ_FULL, |
| 175 | }, |
| 176 | }; |
| 177 | |
| 178 | static struct physmap_flash_data nor_flash_data = { |
| 179 | .width = 2, |
| 180 | .parts = nor_flash_partitions, |
| 181 | .nr_parts = ARRAY_SIZE(nor_flash_partitions), |
| 182 | }; |
| 183 | |
| 184 | static struct resource nor_flash_resources[] = { |
| 185 | [0] = { |
| 186 | .start = 0x00000000, |
| 187 | .end = 0x08000000 - 1, |
| 188 | .flags = IORESOURCE_MEM, |
| 189 | } |
| 190 | }; |
| 191 | |
| 192 | static struct platform_device nor_flash_device = { |
| 193 | .name = "physmap-flash", |
| 194 | .dev = { |
| 195 | .platform_data = &nor_flash_data, |
| 196 | }, |
| 197 | .num_resources = ARRAY_SIZE(nor_flash_resources), |
| 198 | .resource = nor_flash_resources, |
| 199 | }; |
| 200 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 201 | /* SMSC 9220 */ |
| 202 | static struct resource smc911x_resources[] = { |
| 203 | { |
| 204 | .start = 0x14000000, |
| 205 | .end = 0x16000000 - 1, |
| 206 | .flags = IORESOURCE_MEM, |
| 207 | }, { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 208 | .start = evt2irq(0x02c0) /* IRQ6A */, |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 209 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_LOWLEVEL, |
| 210 | }, |
| 211 | }; |
| 212 | |
| 213 | static struct smsc911x_platform_config smsc911x_info = { |
| 214 | .flags = SMSC911X_USE_16BIT | SMSC911X_SAVE_MAC_ADDRESS, |
| 215 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
| 216 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
| 217 | }; |
| 218 | |
| 219 | static struct platform_device smc911x_device = { |
| 220 | .name = "smsc911x", |
| 221 | .id = -1, |
| 222 | .num_resources = ARRAY_SIZE(smc911x_resources), |
| 223 | .resource = smc911x_resources, |
| 224 | .dev = { |
| 225 | .platform_data = &smsc911x_info, |
| 226 | }, |
| 227 | }; |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 228 | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 229 | /* KEYSC (Needs SW43 set to ON) */ |
| 230 | static struct sh_keysc_info keysc_info = { |
| 231 | .mode = SH_KEYSC_MODE_1, |
| 232 | .scan_timing = 3, |
| 233 | .delay = 2500, |
| 234 | .keycodes = { |
| 235 | KEY_0, KEY_1, KEY_2, KEY_3, KEY_4, |
| 236 | KEY_5, KEY_6, KEY_7, KEY_8, KEY_9, |
| 237 | KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, |
| 238 | KEY_F, KEY_G, KEY_H, KEY_I, KEY_J, |
| 239 | KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, |
| 240 | }, |
| 241 | }; |
| 242 | |
| 243 | static struct resource keysc_resources[] = { |
| 244 | [0] = { |
| 245 | .name = "KEYSC", |
| 246 | .start = 0xe61b0000, |
| 247 | .end = 0xe61b0063, |
| 248 | .flags = IORESOURCE_MEM, |
| 249 | }, |
| 250 | [1] = { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 251 | .start = evt2irq(0x0be0), /* KEYSC_KEY */ |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 252 | .flags = IORESOURCE_IRQ, |
| 253 | }, |
| 254 | }; |
| 255 | |
| 256 | static struct platform_device keysc_device = { |
| 257 | .name = "sh_keysc", |
| 258 | .id = 0, /* "keysc0" clock */ |
| 259 | .num_resources = ARRAY_SIZE(keysc_resources), |
| 260 | .resource = keysc_resources, |
| 261 | .dev = { |
| 262 | .platform_data = &keysc_info, |
| 263 | }, |
| 264 | }; |
| 265 | |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 266 | /* SH_MMCIF */ |
| 267 | static struct resource sh_mmcif_resources[] = { |
| 268 | [0] = { |
| 269 | .name = "SH_MMCIF", |
| 270 | .start = 0xE6BD0000, |
| 271 | .end = 0xE6BD00FF, |
| 272 | .flags = IORESOURCE_MEM, |
| 273 | }, |
| 274 | [1] = { |
| 275 | /* MMC ERR */ |
Kuninori Morimoto | 8d56934 | 2010-06-01 02:40:05 +0000 | [diff] [blame] | 276 | .start = evt2irq(0x1ac0), |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 277 | .flags = IORESOURCE_IRQ, |
| 278 | }, |
| 279 | [2] = { |
| 280 | /* MMC NOR */ |
Kuninori Morimoto | 8d56934 | 2010-06-01 02:40:05 +0000 | [diff] [blame] | 281 | .start = evt2irq(0x1ae0), |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 282 | .flags = IORESOURCE_IRQ, |
| 283 | }, |
| 284 | }; |
| 285 | |
Kuninori Morimoto | bb04e19 | 2010-06-02 00:25:03 +0000 | [diff] [blame^] | 286 | static struct sh_mmcif_plat_data sh_mmcif_plat = { |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 287 | .sup_pclk = 0, |
| 288 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, |
| 289 | .caps = MMC_CAP_4_BIT_DATA | |
| 290 | MMC_CAP_8_BIT_DATA | |
| 291 | MMC_CAP_NEEDS_POLL, |
| 292 | }; |
| 293 | |
| 294 | static struct platform_device sh_mmcif_device = { |
| 295 | .name = "sh_mmcif", |
| 296 | .id = 0, |
| 297 | .dev = { |
| 298 | .dma_mask = NULL, |
| 299 | .coherent_dma_mask = 0xffffffff, |
| 300 | .platform_data = &sh_mmcif_plat, |
| 301 | }, |
| 302 | .num_resources = ARRAY_SIZE(sh_mmcif_resources), |
| 303 | .resource = sh_mmcif_resources, |
| 304 | }; |
| 305 | |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 306 | /* SDHI0 */ |
Guennadi Liakhovetski | 69bf6f45 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 307 | static struct sh_mobile_sdhi_info sdhi0_info = { |
Guennadi Liakhovetski | 341291a | 2010-05-23 14:12:46 +0000 | [diff] [blame] | 308 | .dma_slave_tx = SHDMA_SLAVE_SDHI0_TX, |
| 309 | .dma_slave_rx = SHDMA_SLAVE_SDHI0_RX, |
Guennadi Liakhovetski | 69bf6f45 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 310 | }; |
| 311 | |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 312 | static struct resource sdhi0_resources[] = { |
| 313 | [0] = { |
| 314 | .name = "SDHI0", |
| 315 | .start = 0xe6850000, |
| 316 | .end = 0xe68501ff, |
| 317 | .flags = IORESOURCE_MEM, |
| 318 | }, |
| 319 | [1] = { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 320 | .start = evt2irq(0x0e00) /* SDHI0 */, |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 321 | .flags = IORESOURCE_IRQ, |
| 322 | }, |
| 323 | }; |
| 324 | |
| 325 | static struct platform_device sdhi0_device = { |
| 326 | .name = "sh_mobile_sdhi", |
| 327 | .num_resources = ARRAY_SIZE(sdhi0_resources), |
| 328 | .resource = sdhi0_resources, |
| 329 | .id = 0, |
Guennadi Liakhovetski | 69bf6f45 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 330 | .dev = { |
| 331 | .platform_data = &sdhi0_info, |
| 332 | }, |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 333 | }; |
| 334 | |
Guennadi Liakhovetski | 341291a | 2010-05-23 14:12:46 +0000 | [diff] [blame] | 335 | /* SDHI1 */ |
| 336 | static struct sh_mobile_sdhi_info sdhi1_info = { |
| 337 | .dma_slave_tx = SHDMA_SLAVE_SDHI1_TX, |
| 338 | .dma_slave_rx = SHDMA_SLAVE_SDHI1_RX, |
| 339 | .tmio_ocr_mask = MMC_VDD_165_195, |
| 340 | }; |
| 341 | |
| 342 | static struct resource sdhi1_resources[] = { |
| 343 | [0] = { |
| 344 | .name = "SDHI1", |
| 345 | .start = 0xe6860000, |
| 346 | .end = 0xe68601ff, |
| 347 | .flags = IORESOURCE_MEM, |
| 348 | }, |
| 349 | [1] = { |
| 350 | .start = evt2irq(0x0e80), |
| 351 | .flags = IORESOURCE_IRQ, |
| 352 | }, |
| 353 | }; |
| 354 | |
| 355 | static struct platform_device sdhi1_device = { |
| 356 | .name = "sh_mobile_sdhi", |
| 357 | .num_resources = ARRAY_SIZE(sdhi1_resources), |
| 358 | .resource = sdhi1_resources, |
| 359 | .id = 1, |
| 360 | .dev = { |
| 361 | .platform_data = &sdhi1_info, |
| 362 | }, |
| 363 | }; |
| 364 | |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 365 | /* USB1 */ |
Kuninori Morimoto | bb04e19 | 2010-06-02 00:25:03 +0000 | [diff] [blame^] | 366 | static void usb1_host_port_power(int port, int power) |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 367 | { |
| 368 | if (!power) /* only power-on supported for now */ |
| 369 | return; |
| 370 | |
| 371 | /* set VBOUT/PWEN and EXTLP1 in DVSTCTR */ |
| 372 | __raw_writew(__raw_readw(0xE68B0008) | 0x600, 0xE68B0008); |
| 373 | } |
| 374 | |
| 375 | static struct r8a66597_platdata usb1_host_data = { |
| 376 | .on_chip = 1, |
| 377 | .port_power = usb1_host_port_power, |
| 378 | }; |
| 379 | |
| 380 | static struct resource usb1_host_resources[] = { |
| 381 | [0] = { |
| 382 | .name = "USBHS", |
| 383 | .start = 0xE68B0000, |
| 384 | .end = 0xE68B00E6 - 1, |
| 385 | .flags = IORESOURCE_MEM, |
| 386 | }, |
| 387 | [1] = { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 388 | .start = evt2irq(0x1ce0) /* USB1_USB1I0 */, |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 389 | .flags = IORESOURCE_IRQ, |
| 390 | }, |
| 391 | }; |
| 392 | |
| 393 | static struct platform_device usb1_host_device = { |
| 394 | .name = "r8a66597_hcd", |
| 395 | .id = 1, |
| 396 | .dev = { |
| 397 | .dma_mask = NULL, /* not use dma */ |
| 398 | .coherent_dma_mask = 0xffffffff, |
| 399 | .platform_data = &usb1_host_data, |
| 400 | }, |
| 401 | .num_resources = ARRAY_SIZE(usb1_host_resources), |
| 402 | .resource = usb1_host_resources, |
| 403 | }; |
| 404 | |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 405 | static struct sh_mobile_lcdc_info sh_mobile_lcdc_info = { |
| 406 | .clock_source = LCDC_CLK_PERIPHERAL, /* One of interface clocks */ |
| 407 | .ch[0] = { |
| 408 | .chan = LCDC_CHAN_MAINLCD, |
| 409 | .bpp = 16, |
| 410 | .interface_type = RGB24, |
| 411 | .clock_divider = 1, |
| 412 | .flags = LCDC_FLAGS_DWPOL, |
| 413 | .lcd_cfg = { |
| 414 | .name = "R63302(QHD)", |
| 415 | .xres = 544, |
| 416 | .yres = 961, |
| 417 | .left_margin = 72, |
| 418 | .right_margin = 600, |
| 419 | .hsync_len = 16, |
| 420 | .upper_margin = 8, |
| 421 | .lower_margin = 8, |
| 422 | .vsync_len = 2, |
| 423 | .sync = FB_SYNC_VERT_HIGH_ACT | FB_SYNC_HOR_HIGH_ACT, |
| 424 | }, |
| 425 | .lcd_size_cfg = { |
| 426 | .width = 44, |
| 427 | .height = 79, |
| 428 | }, |
| 429 | } |
| 430 | }; |
| 431 | |
| 432 | static struct resource lcdc_resources[] = { |
| 433 | [0] = { |
| 434 | .name = "LCDC", |
| 435 | .start = 0xfe940000, /* P4-only space */ |
| 436 | .end = 0xfe943fff, |
| 437 | .flags = IORESOURCE_MEM, |
| 438 | }, |
| 439 | [1] = { |
| 440 | .start = intcs_evt2irq(0x580), |
| 441 | .flags = IORESOURCE_IRQ, |
| 442 | }, |
| 443 | }; |
| 444 | |
| 445 | static struct platform_device lcdc_device = { |
| 446 | .name = "sh_mobile_lcdc_fb", |
| 447 | .num_resources = ARRAY_SIZE(lcdc_resources), |
| 448 | .resource = lcdc_resources, |
| 449 | .dev = { |
| 450 | .platform_data = &sh_mobile_lcdc_info, |
| 451 | .coherent_dma_mask = ~0, |
| 452 | }, |
| 453 | }; |
| 454 | |
| 455 | static struct resource mipidsi0_resources[] = { |
| 456 | [0] = { |
| 457 | .start = 0xffc60000, |
| 458 | .end = 0xffc68fff, |
| 459 | .flags = IORESOURCE_MEM, |
| 460 | }, |
| 461 | }; |
| 462 | |
| 463 | static struct sh_mipi_dsi_info mipidsi0_info = { |
| 464 | .data_format = MIPI_RGB888, |
| 465 | .lcd_chan = &sh_mobile_lcdc_info.ch[0], |
| 466 | }; |
| 467 | |
| 468 | static struct platform_device mipidsi0_device = { |
| 469 | .name = "sh-mipi-dsi", |
| 470 | .num_resources = ARRAY_SIZE(mipidsi0_resources), |
| 471 | .resource = mipidsi0_resources, |
| 472 | .id = 0, |
| 473 | .dev = { |
| 474 | .platform_data = &mipidsi0_info, |
| 475 | }, |
| 476 | }; |
| 477 | |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 478 | /* FSI */ |
| 479 | #define IRQ_FSI evt2irq(0x1840) |
| 480 | #define FSIACKCR 0xE6150018 |
| 481 | static void fsiackcr_init(struct clk *clk) |
| 482 | { |
| 483 | u32 status = __raw_readl(clk->enable_reg); |
| 484 | |
| 485 | /* use external clock */ |
| 486 | status &= ~0x000000ff; |
| 487 | status |= 0x00000080; |
| 488 | __raw_writel(status, clk->enable_reg); |
| 489 | } |
| 490 | |
| 491 | static struct clk_ops fsiackcr_clk_ops = { |
| 492 | .init = fsiackcr_init, |
| 493 | }; |
| 494 | |
| 495 | static struct clk fsiackcr_clk = { |
| 496 | .ops = &fsiackcr_clk_ops, |
| 497 | .enable_reg = (void __iomem *)FSIACKCR, |
| 498 | .rate = 0, /* unknown */ |
| 499 | }; |
| 500 | |
Kuninori Morimoto | bb04e19 | 2010-06-02 00:25:03 +0000 | [diff] [blame^] | 501 | static struct sh_fsi_platform_info fsi_info = { |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 502 | .porta_flags = SH_FSI_BRS_INV | |
| 503 | SH_FSI_OUT_SLAVE_MODE | |
| 504 | SH_FSI_IN_SLAVE_MODE | |
| 505 | SH_FSI_OFMT(PCM) | |
| 506 | SH_FSI_IFMT(PCM), |
| 507 | }; |
| 508 | |
| 509 | static struct resource fsi_resources[] = { |
| 510 | [0] = { |
| 511 | .name = "FSI", |
| 512 | .start = 0xFE3C0000, |
| 513 | .end = 0xFE3C0400 - 1, |
| 514 | .flags = IORESOURCE_MEM, |
| 515 | }, |
| 516 | [1] = { |
| 517 | .start = IRQ_FSI, |
| 518 | .flags = IORESOURCE_IRQ, |
| 519 | }, |
| 520 | }; |
| 521 | |
| 522 | static struct platform_device fsi_device = { |
| 523 | .name = "sh_fsi2", |
| 524 | .id = 0, |
| 525 | .num_resources = ARRAY_SIZE(fsi_resources), |
| 526 | .resource = fsi_resources, |
| 527 | .dev = { |
| 528 | .platform_data = &fsi_info, |
| 529 | }, |
| 530 | }; |
| 531 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 532 | static struct platform_device *ap4evb_devices[] __initdata = { |
| 533 | &nor_flash_device, |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 534 | &smc911x_device, |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 535 | &keysc_device, |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 536 | &sdhi0_device, |
Guennadi Liakhovetski | 341291a | 2010-05-23 14:12:46 +0000 | [diff] [blame] | 537 | &sdhi1_device, |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 538 | &usb1_host_device, |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 539 | &lcdc_device, |
| 540 | &mipidsi0_device, |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 541 | &fsi_device, |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 542 | &sh_mmcif_device |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 543 | }; |
| 544 | |
Kuninori Morimoto | dda128d | 2010-03-12 10:07:55 +0000 | [diff] [blame] | 545 | /* TouchScreen (Needs SW3 set to OFF) */ |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 546 | #define IRQ28 evt2irq(0x3380) /* IRQ28A */ |
Kuninori Morimoto | bb04e19 | 2010-06-02 00:25:03 +0000 | [diff] [blame^] | 547 | static struct tsc2007_platform_data tsc2007_info = { |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 548 | .model = 2007, |
| 549 | .x_plate_ohms = 180, |
| 550 | }; |
| 551 | |
| 552 | /* I2C */ |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 553 | static struct i2c_board_info i2c0_devices[] = { |
| 554 | { |
| 555 | I2C_BOARD_INFO("ak4643", 0x13), |
| 556 | }, |
| 557 | }; |
| 558 | |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 559 | static struct i2c_board_info i2c1_devices[] = { |
| 560 | { |
Kuninori Morimoto | 8fc883c | 2010-03-11 07:34:37 +0000 | [diff] [blame] | 561 | I2C_BOARD_INFO("r2025sd", 0x32), |
| 562 | }, |
| 563 | { |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 564 | I2C_BOARD_INFO("tsc2007", 0x48), |
| 565 | .type = "tsc2007", |
| 566 | .platform_data = &tsc2007_info, |
| 567 | .irq = IRQ28, |
| 568 | }, |
| 569 | }; |
| 570 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 571 | static struct map_desc ap4evb_io_desc[] __initdata = { |
| 572 | /* create a 1:1 entity map for 0xe6xxxxxx |
| 573 | * used by CPGA, INTC and PFC. |
| 574 | */ |
| 575 | { |
| 576 | .virtual = 0xe6000000, |
| 577 | .pfn = __phys_to_pfn(0xe6000000), |
| 578 | .length = 256 << 20, |
| 579 | .type = MT_DEVICE_NONSHARED |
| 580 | }, |
| 581 | }; |
| 582 | |
| 583 | static void __init ap4evb_map_io(void) |
| 584 | { |
| 585 | iotable_init(ap4evb_io_desc, ARRAY_SIZE(ap4evb_io_desc)); |
| 586 | |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame] | 587 | /* setup early devices and console here as well */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 588 | sh7372_add_early_devices(); |
Magnus Damm | 4ae04ac | 2010-02-08 11:02:54 +0000 | [diff] [blame] | 589 | shmobile_setup_console(); |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 590 | } |
| 591 | |
Guennadi Liakhovetski | 8eda2f2 | 2010-05-23 14:04:03 +0000 | [diff] [blame] | 592 | /* This function will disappear when we switch to (runtime) PM */ |
| 593 | static int __init ap4evb_init_display_clk(void) |
| 594 | { |
| 595 | struct clk *lcdc_clk; |
| 596 | struct clk *dsitx_clk; |
| 597 | int ret; |
| 598 | |
| 599 | lcdc_clk = clk_get(&lcdc_device.dev, "sh_mobile_lcdc_fb.0"); |
| 600 | if (IS_ERR(lcdc_clk)) |
| 601 | return PTR_ERR(lcdc_clk); |
| 602 | |
| 603 | dsitx_clk = clk_get(&mipidsi0_device.dev, "sh-mipi-dsi.0"); |
| 604 | if (IS_ERR(dsitx_clk)) { |
| 605 | ret = PTR_ERR(dsitx_clk); |
| 606 | goto eclkdsitxget; |
| 607 | } |
| 608 | |
| 609 | ret = clk_enable(lcdc_clk); |
| 610 | if (ret < 0) |
| 611 | goto eclklcdcon; |
| 612 | |
| 613 | ret = clk_enable(dsitx_clk); |
| 614 | if (ret < 0) |
| 615 | goto eclkdsitxon; |
| 616 | |
| 617 | return 0; |
| 618 | |
| 619 | eclkdsitxon: |
| 620 | clk_disable(lcdc_clk); |
| 621 | eclklcdcon: |
| 622 | clk_put(dsitx_clk); |
| 623 | eclkdsitxget: |
| 624 | clk_put(lcdc_clk); |
| 625 | |
| 626 | return ret; |
| 627 | } |
| 628 | |
| 629 | device_initcall(ap4evb_init_display_clk); |
| 630 | |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 631 | /* |
| 632 | * FIXME !! |
| 633 | * |
| 634 | * gpio_no_direction is quick_hack. |
| 635 | * |
| 636 | * current gpio frame work doesn't have |
| 637 | * the method to control only pull up/down/free. |
| 638 | * this function should be replaced by correct gpio function |
| 639 | */ |
| 640 | static void __init gpio_no_direction(u32 addr) |
| 641 | { |
| 642 | __raw_writeb(0x00, addr); |
| 643 | } |
| 644 | |
| 645 | #define GPIO_PORT9CR 0xE6051009 |
| 646 | #define GPIO_PORT10CR 0xE605100A |
| 647 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 648 | static void __init ap4evb_init(void) |
| 649 | { |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 650 | struct clk *clk; |
| 651 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 652 | sh7372_pinmux_init(); |
| 653 | |
Kuninori Morimoto | b228b48 | 2010-02-18 16:44:41 +0900 | [diff] [blame] | 654 | /* enable SCIFA0 */ |
| 655 | gpio_request(GPIO_FN_SCIFA0_TXD, NULL); |
| 656 | gpio_request(GPIO_FN_SCIFA0_RXD, NULL); |
| 657 | |
Kuninori Morimoto | 1b7e067 | 2010-02-17 09:30:14 +0000 | [diff] [blame] | 658 | /* enable SMSC911X */ |
| 659 | gpio_request(GPIO_FN_CS5A, NULL); |
| 660 | gpio_request(GPIO_FN_IRQ6_39, NULL); |
| 661 | |
Kuninori Morimoto | 5098280 | 2010-02-22 09:20:39 +0000 | [diff] [blame] | 662 | /* enable LED 1 - 4 */ |
| 663 | gpio_request(GPIO_PORT185, NULL); |
| 664 | gpio_request(GPIO_PORT186, NULL); |
| 665 | gpio_request(GPIO_PORT187, NULL); |
| 666 | gpio_request(GPIO_PORT188, NULL); |
| 667 | gpio_direction_output(GPIO_PORT185, 1); |
| 668 | gpio_direction_output(GPIO_PORT186, 1); |
| 669 | gpio_direction_output(GPIO_PORT187, 1); |
| 670 | gpio_direction_output(GPIO_PORT188, 1); |
| 671 | gpio_export(GPIO_PORT185, 0); |
| 672 | gpio_export(GPIO_PORT186, 0); |
| 673 | gpio_export(GPIO_PORT187, 0); |
| 674 | gpio_export(GPIO_PORT188, 0); |
| 675 | |
Kuninori Morimoto | 8cb3a2e | 2010-02-22 09:30:12 +0000 | [diff] [blame] | 676 | /* enable Debug switch (S6) */ |
| 677 | gpio_request(GPIO_PORT32, NULL); |
| 678 | gpio_request(GPIO_PORT33, NULL); |
| 679 | gpio_request(GPIO_PORT34, NULL); |
| 680 | gpio_request(GPIO_PORT35, NULL); |
| 681 | gpio_direction_input(GPIO_PORT32); |
| 682 | gpio_direction_input(GPIO_PORT33); |
| 683 | gpio_direction_input(GPIO_PORT34); |
| 684 | gpio_direction_input(GPIO_PORT35); |
| 685 | gpio_export(GPIO_PORT32, 0); |
| 686 | gpio_export(GPIO_PORT33, 0); |
| 687 | gpio_export(GPIO_PORT34, 0); |
| 688 | gpio_export(GPIO_PORT35, 0); |
| 689 | |
Kuninori Morimoto | 17ccb83 | 2010-02-23 07:07:01 +0000 | [diff] [blame] | 690 | /* enable KEYSC */ |
| 691 | gpio_request(GPIO_FN_KEYOUT0, NULL); |
| 692 | gpio_request(GPIO_FN_KEYOUT1, NULL); |
| 693 | gpio_request(GPIO_FN_KEYOUT2, NULL); |
| 694 | gpio_request(GPIO_FN_KEYOUT3, NULL); |
| 695 | gpio_request(GPIO_FN_KEYOUT4, NULL); |
| 696 | gpio_request(GPIO_FN_KEYIN0_136, NULL); |
| 697 | gpio_request(GPIO_FN_KEYIN1_135, NULL); |
| 698 | gpio_request(GPIO_FN_KEYIN2_134, NULL); |
| 699 | gpio_request(GPIO_FN_KEYIN3_133, NULL); |
| 700 | gpio_request(GPIO_FN_KEYIN4, NULL); |
| 701 | |
Magnus Damm | 3a14d03 | 2010-03-10 09:26:44 +0000 | [diff] [blame] | 702 | /* SDHI0 */ |
| 703 | gpio_request(GPIO_FN_SDHICD0, NULL); |
| 704 | gpio_request(GPIO_FN_SDHIWP0, NULL); |
| 705 | gpio_request(GPIO_FN_SDHICMD0, NULL); |
| 706 | gpio_request(GPIO_FN_SDHICLK0, NULL); |
| 707 | gpio_request(GPIO_FN_SDHID0_3, NULL); |
| 708 | gpio_request(GPIO_FN_SDHID0_2, NULL); |
| 709 | gpio_request(GPIO_FN_SDHID0_1, NULL); |
| 710 | gpio_request(GPIO_FN_SDHID0_0, NULL); |
| 711 | |
Kuninori Morimoto | 91cf508 | 2010-03-11 10:42:52 +0000 | [diff] [blame] | 712 | /* enable TouchScreen */ |
| 713 | gpio_request(GPIO_FN_IRQ28_123, NULL); |
| 714 | set_irq_type(IRQ28, IRQ_TYPE_LEVEL_LOW); |
| 715 | |
Kuninori Morimoto | c8ee3d4 | 2010-05-13 01:08:21 +0000 | [diff] [blame] | 716 | /* MMCIF */ |
| 717 | gpio_request(GPIO_FN_MMCD0_0, NULL); |
| 718 | gpio_request(GPIO_FN_MMCD0_1, NULL); |
| 719 | gpio_request(GPIO_FN_MMCD0_2, NULL); |
| 720 | gpio_request(GPIO_FN_MMCD0_3, NULL); |
| 721 | gpio_request(GPIO_FN_MMCD0_4, NULL); |
| 722 | gpio_request(GPIO_FN_MMCD0_5, NULL); |
| 723 | gpio_request(GPIO_FN_MMCD0_6, NULL); |
| 724 | gpio_request(GPIO_FN_MMCD0_7, NULL); |
| 725 | gpio_request(GPIO_FN_MMCCMD0, NULL); |
| 726 | gpio_request(GPIO_FN_MMCCLK0, NULL); |
| 727 | |
Kuninori Morimoto | fb54d26 | 2010-04-13 06:16:32 +0000 | [diff] [blame] | 728 | /* USB enable */ |
| 729 | gpio_request(GPIO_FN_VBUS0_1, NULL); |
| 730 | gpio_request(GPIO_FN_IDIN_1_18, NULL); |
| 731 | gpio_request(GPIO_FN_PWEN_1_115, NULL); |
| 732 | gpio_request(GPIO_FN_OVCN_1_114, NULL); |
| 733 | gpio_request(GPIO_FN_EXTLP_1, NULL); |
| 734 | gpio_request(GPIO_FN_OVCN2_1, NULL); |
| 735 | |
| 736 | /* setup USB phy */ |
| 737 | __raw_writew(0x8a0a, 0xE6058130); /* USBCR2 */ |
| 738 | |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 739 | /* enable FSI2 */ |
| 740 | gpio_request(GPIO_FN_FSIAIBT, NULL); |
| 741 | gpio_request(GPIO_FN_FSIAILR, NULL); |
| 742 | gpio_request(GPIO_FN_FSIAISLD, NULL); |
| 743 | gpio_request(GPIO_FN_FSIAOSLD, NULL); |
| 744 | gpio_request(GPIO_PORT161, NULL); |
| 745 | gpio_direction_output(GPIO_PORT161, 0); /* slave */ |
| 746 | |
| 747 | gpio_request(GPIO_PORT9, NULL); |
| 748 | gpio_request(GPIO_PORT10, NULL); |
| 749 | gpio_no_direction(GPIO_PORT9CR); /* FSIAOBT needs no direction */ |
| 750 | gpio_no_direction(GPIO_PORT10CR); /* FSIAOLR needs no direction */ |
| 751 | |
| 752 | /* set SPU2 clock to 119.6 MHz */ |
| 753 | clk = clk_get(NULL, "spu_clk"); |
Paul Mundt | 2ae2b76 | 2010-05-31 14:25:57 +0900 | [diff] [blame] | 754 | if (!IS_ERR(clk)) { |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 755 | clk_set_rate(clk, clk_round_rate(clk, 119600000)); |
| 756 | clk_put(clk); |
| 757 | } |
| 758 | |
| 759 | /* change parent of FSI A */ |
| 760 | clk = clk_get(NULL, "fsia_clk"); |
Paul Mundt | 2ae2b76 | 2010-05-31 14:25:57 +0900 | [diff] [blame] | 761 | if (!IS_ERR(clk)) { |
Kuninori Morimoto | cb9215e | 2010-05-24 06:50:44 +0000 | [diff] [blame] | 762 | clk_register(&fsiackcr_clk); |
| 763 | clk_set_parent(clk, &fsiackcr_clk); |
| 764 | clk_put(clk); |
| 765 | } |
| 766 | |
| 767 | /* |
| 768 | * set irq priority, to avoid sound chopping |
| 769 | * when NFS rootfs is used |
| 770 | * FSI(3) > SMSC911X(2) |
| 771 | */ |
| 772 | intc_set_priority(IRQ_FSI, 3); |
| 773 | |
| 774 | i2c_register_board_info(0, i2c0_devices, |
| 775 | ARRAY_SIZE(i2c0_devices)); |
| 776 | |
| 777 | i2c_register_board_info(1, i2c1_devices, |
| 778 | ARRAY_SIZE(i2c1_devices)); |
| 779 | |
Guennadi Liakhovetski | 341291a | 2010-05-23 14:12:46 +0000 | [diff] [blame] | 780 | /* SDHI1 */ |
| 781 | gpio_request(GPIO_FN_SDHICMD1, NULL); |
| 782 | gpio_request(GPIO_FN_SDHICLK1, NULL); |
| 783 | gpio_request(GPIO_FN_SDHID1_3, NULL); |
| 784 | gpio_request(GPIO_FN_SDHID1_2, NULL); |
| 785 | gpio_request(GPIO_FN_SDHID1_1, NULL); |
| 786 | gpio_request(GPIO_FN_SDHID1_0, NULL); |
| 787 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 788 | sh7372_add_standard_devices(); |
| 789 | |
| 790 | platform_add_devices(ap4evb_devices, ARRAY_SIZE(ap4evb_devices)); |
| 791 | } |
| 792 | |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame] | 793 | static void __init ap4evb_timer_init(void) |
| 794 | { |
| 795 | sh7372_clock_init(); |
| 796 | shmobile_timer.init(); |
| 797 | } |
| 798 | |
| 799 | static struct sys_timer ap4evb_timer = { |
| 800 | .init = ap4evb_timer_init, |
| 801 | }; |
| 802 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 803 | MACHINE_START(AP4EVB, "ap4evb") |
| 804 | .phys_io = 0xe6000000, |
| 805 | .io_pg_offst = ((0xe6000000) >> 18) & 0xfffc, |
| 806 | .map_io = ap4evb_map_io, |
| 807 | .init_irq = sh7372_init_irq, |
| 808 | .init_machine = ap4evb_init, |
Magnus Damm | 495b3ce | 2010-05-12 14:21:34 +0000 | [diff] [blame] | 809 | .timer = &ap4evb_timer, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 810 | MACHINE_END |