Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 1 | /* |
| 2 | * sh7372 processor 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 | */ |
| 20 | #include <linux/kernel.h> |
| 21 | #include <linux/init.h> |
| 22 | #include <linux/interrupt.h> |
| 23 | #include <linux/irq.h> |
| 24 | #include <linux/platform_device.h> |
Magnus Damm | 6822471 | 2011-04-28 03:21:00 +0000 | [diff] [blame] | 25 | #include <linux/uio_driver.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 26 | #include <linux/delay.h> |
| 27 | #include <linux/input.h> |
| 28 | #include <linux/io.h> |
| 29 | #include <linux/serial_sci.h> |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 30 | #include <linux/sh_dma.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 31 | #include <linux/sh_intc.h> |
| 32 | #include <linux/sh_timer.h> |
Rafael J. Wysocki | 111058c | 2011-08-14 13:35:39 +0200 | [diff] [blame^] | 33 | #include <linux/pm_domain.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 34 | #include <mach/hardware.h> |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 35 | #include <mach/sh7372.h> |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 36 | #include <asm/mach-types.h> |
| 37 | #include <asm/mach/arch.h> |
| 38 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 39 | /* SCIFA0 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 40 | static struct plat_sci_port scif0_platform_data = { |
| 41 | .mapbase = 0xe6c40000, |
| 42 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 43 | .scscr = SCSCR_RE | SCSCR_TE, |
| 44 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 45 | .type = PORT_SCIFA, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 46 | .irqs = { evt2irq(0x0c00), evt2irq(0x0c00), |
| 47 | evt2irq(0x0c00), evt2irq(0x0c00) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 48 | }; |
| 49 | |
| 50 | static struct platform_device scif0_device = { |
| 51 | .name = "sh-sci", |
| 52 | .id = 0, |
| 53 | .dev = { |
| 54 | .platform_data = &scif0_platform_data, |
| 55 | }, |
| 56 | }; |
| 57 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 58 | /* SCIFA1 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 59 | static struct plat_sci_port scif1_platform_data = { |
| 60 | .mapbase = 0xe6c50000, |
| 61 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 62 | .scscr = SCSCR_RE | SCSCR_TE, |
| 63 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 64 | .type = PORT_SCIFA, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 65 | .irqs = { evt2irq(0x0c20), evt2irq(0x0c20), |
| 66 | evt2irq(0x0c20), evt2irq(0x0c20) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 67 | }; |
| 68 | |
| 69 | static struct platform_device scif1_device = { |
| 70 | .name = "sh-sci", |
| 71 | .id = 1, |
| 72 | .dev = { |
| 73 | .platform_data = &scif1_platform_data, |
| 74 | }, |
| 75 | }; |
| 76 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 77 | /* SCIFA2 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 78 | static struct plat_sci_port scif2_platform_data = { |
| 79 | .mapbase = 0xe6c60000, |
| 80 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 81 | .scscr = SCSCR_RE | SCSCR_TE, |
| 82 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 83 | .type = PORT_SCIFA, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 84 | .irqs = { evt2irq(0x0c40), evt2irq(0x0c40), |
| 85 | evt2irq(0x0c40), evt2irq(0x0c40) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 86 | }; |
| 87 | |
| 88 | static struct platform_device scif2_device = { |
| 89 | .name = "sh-sci", |
| 90 | .id = 2, |
| 91 | .dev = { |
| 92 | .platform_data = &scif2_platform_data, |
| 93 | }, |
| 94 | }; |
| 95 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 96 | /* SCIFA3 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 97 | static struct plat_sci_port scif3_platform_data = { |
| 98 | .mapbase = 0xe6c70000, |
| 99 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 100 | .scscr = SCSCR_RE | SCSCR_TE, |
| 101 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 102 | .type = PORT_SCIFA, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 103 | .irqs = { evt2irq(0x0c60), evt2irq(0x0c60), |
| 104 | evt2irq(0x0c60), evt2irq(0x0c60) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 105 | }; |
| 106 | |
| 107 | static struct platform_device scif3_device = { |
| 108 | .name = "sh-sci", |
| 109 | .id = 3, |
| 110 | .dev = { |
| 111 | .platform_data = &scif3_platform_data, |
| 112 | }, |
| 113 | }; |
| 114 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 115 | /* SCIFA4 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 116 | static struct plat_sci_port scif4_platform_data = { |
| 117 | .mapbase = 0xe6c80000, |
| 118 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 119 | .scscr = SCSCR_RE | SCSCR_TE, |
| 120 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 121 | .type = PORT_SCIFA, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 122 | .irqs = { evt2irq(0x0d20), evt2irq(0x0d20), |
| 123 | evt2irq(0x0d20), evt2irq(0x0d20) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 124 | }; |
| 125 | |
| 126 | static struct platform_device scif4_device = { |
| 127 | .name = "sh-sci", |
| 128 | .id = 4, |
| 129 | .dev = { |
| 130 | .platform_data = &scif4_platform_data, |
| 131 | }, |
| 132 | }; |
| 133 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 134 | /* SCIFA5 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 135 | static struct plat_sci_port scif5_platform_data = { |
| 136 | .mapbase = 0xe6cb0000, |
| 137 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 138 | .scscr = SCSCR_RE | SCSCR_TE, |
| 139 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 140 | .type = PORT_SCIFA, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 141 | .irqs = { evt2irq(0x0d40), evt2irq(0x0d40), |
| 142 | evt2irq(0x0d40), evt2irq(0x0d40) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 143 | }; |
| 144 | |
| 145 | static struct platform_device scif5_device = { |
| 146 | .name = "sh-sci", |
| 147 | .id = 5, |
| 148 | .dev = { |
| 149 | .platform_data = &scif5_platform_data, |
| 150 | }, |
| 151 | }; |
| 152 | |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 153 | /* SCIFB */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 154 | static struct plat_sci_port scif6_platform_data = { |
| 155 | .mapbase = 0xe6c30000, |
| 156 | .flags = UPF_BOOT_AUTOCONF, |
Paul Mundt | f43dc23 | 2011-01-13 15:06:28 +0900 | [diff] [blame] | 157 | .scscr = SCSCR_RE | SCSCR_TE, |
| 158 | .scbrr_algo_id = SCBRR_ALGO_4, |
Guennadi Liakhovetski | eb6e8605e | 2010-05-23 16:39:17 +0000 | [diff] [blame] | 159 | .type = PORT_SCIFB, |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 160 | .irqs = { evt2irq(0x0d60), evt2irq(0x0d60), |
| 161 | evt2irq(0x0d60), evt2irq(0x0d60) }, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 162 | }; |
| 163 | |
| 164 | static struct platform_device scif6_device = { |
| 165 | .name = "sh-sci", |
| 166 | .id = 6, |
| 167 | .dev = { |
| 168 | .platform_data = &scif6_platform_data, |
| 169 | }, |
| 170 | }; |
| 171 | |
Kuninori Morimoto | c1909cc | 2010-03-11 10:42:47 +0000 | [diff] [blame] | 172 | /* CMT */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 173 | static struct sh_timer_config cmt10_platform_data = { |
| 174 | .name = "CMT10", |
| 175 | .channel_offset = 0x10, |
| 176 | .timer_bit = 0, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 177 | .clockevent_rating = 125, |
| 178 | .clocksource_rating = 125, |
| 179 | }; |
| 180 | |
| 181 | static struct resource cmt10_resources[] = { |
| 182 | [0] = { |
| 183 | .name = "CMT10", |
| 184 | .start = 0xe6138010, |
| 185 | .end = 0xe613801b, |
| 186 | .flags = IORESOURCE_MEM, |
| 187 | }, |
| 188 | [1] = { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 189 | .start = evt2irq(0x0b00), /* CMT1_CMT10 */ |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 190 | .flags = IORESOURCE_IRQ, |
| 191 | }, |
| 192 | }; |
| 193 | |
| 194 | static struct platform_device cmt10_device = { |
| 195 | .name = "sh_cmt", |
| 196 | .id = 10, |
| 197 | .dev = { |
| 198 | .platform_data = &cmt10_platform_data, |
| 199 | }, |
| 200 | .resource = cmt10_resources, |
| 201 | .num_resources = ARRAY_SIZE(cmt10_resources), |
| 202 | }; |
| 203 | |
Magnus Damm | c6c049e | 2010-10-14 06:57:25 +0000 | [diff] [blame] | 204 | /* TMU */ |
| 205 | static struct sh_timer_config tmu00_platform_data = { |
| 206 | .name = "TMU00", |
| 207 | .channel_offset = 0x4, |
| 208 | .timer_bit = 0, |
| 209 | .clockevent_rating = 200, |
| 210 | }; |
| 211 | |
| 212 | static struct resource tmu00_resources[] = { |
| 213 | [0] = { |
| 214 | .name = "TMU00", |
| 215 | .start = 0xfff60008, |
| 216 | .end = 0xfff60013, |
| 217 | .flags = IORESOURCE_MEM, |
| 218 | }, |
| 219 | [1] = { |
| 220 | .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */ |
| 221 | .flags = IORESOURCE_IRQ, |
| 222 | }, |
| 223 | }; |
| 224 | |
| 225 | static struct platform_device tmu00_device = { |
| 226 | .name = "sh_tmu", |
| 227 | .id = 0, |
| 228 | .dev = { |
| 229 | .platform_data = &tmu00_platform_data, |
| 230 | }, |
| 231 | .resource = tmu00_resources, |
| 232 | .num_resources = ARRAY_SIZE(tmu00_resources), |
| 233 | }; |
| 234 | |
| 235 | static struct sh_timer_config tmu01_platform_data = { |
| 236 | .name = "TMU01", |
| 237 | .channel_offset = 0x10, |
| 238 | .timer_bit = 1, |
| 239 | .clocksource_rating = 200, |
| 240 | }; |
| 241 | |
| 242 | static struct resource tmu01_resources[] = { |
| 243 | [0] = { |
| 244 | .name = "TMU01", |
| 245 | .start = 0xfff60014, |
| 246 | .end = 0xfff6001f, |
| 247 | .flags = IORESOURCE_MEM, |
| 248 | }, |
| 249 | [1] = { |
| 250 | .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */ |
| 251 | .flags = IORESOURCE_IRQ, |
| 252 | }, |
| 253 | }; |
| 254 | |
| 255 | static struct platform_device tmu01_device = { |
| 256 | .name = "sh_tmu", |
| 257 | .id = 1, |
| 258 | .dev = { |
| 259 | .platform_data = &tmu01_platform_data, |
| 260 | }, |
| 261 | .resource = tmu01_resources, |
| 262 | .num_resources = ARRAY_SIZE(tmu01_resources), |
| 263 | }; |
| 264 | |
Kuninori Morimoto | c1909cc | 2010-03-11 10:42:47 +0000 | [diff] [blame] | 265 | /* I2C */ |
| 266 | static struct resource iic0_resources[] = { |
| 267 | [0] = { |
| 268 | .name = "IIC0", |
| 269 | .start = 0xFFF20000, |
| 270 | .end = 0xFFF20425 - 1, |
| 271 | .flags = IORESOURCE_MEM, |
| 272 | }, |
| 273 | [1] = { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 274 | .start = intcs_evt2irq(0xe00), /* IIC0_ALI0 */ |
| 275 | .end = intcs_evt2irq(0xe60), /* IIC0_DTEI0 */ |
Kuninori Morimoto | c1909cc | 2010-03-11 10:42:47 +0000 | [diff] [blame] | 276 | .flags = IORESOURCE_IRQ, |
| 277 | }, |
| 278 | }; |
| 279 | |
| 280 | static struct platform_device iic0_device = { |
| 281 | .name = "i2c-sh_mobile", |
| 282 | .id = 0, /* "i2c0" clock */ |
| 283 | .num_resources = ARRAY_SIZE(iic0_resources), |
| 284 | .resource = iic0_resources, |
| 285 | }; |
| 286 | |
| 287 | static struct resource iic1_resources[] = { |
| 288 | [0] = { |
| 289 | .name = "IIC1", |
| 290 | .start = 0xE6C20000, |
| 291 | .end = 0xE6C20425 - 1, |
| 292 | .flags = IORESOURCE_MEM, |
| 293 | }, |
| 294 | [1] = { |
Magnus Damm | 33c9607 | 2010-05-20 14:41:00 +0000 | [diff] [blame] | 295 | .start = evt2irq(0x780), /* IIC1_ALI1 */ |
| 296 | .end = evt2irq(0x7e0), /* IIC1_DTEI1 */ |
Kuninori Morimoto | c1909cc | 2010-03-11 10:42:47 +0000 | [diff] [blame] | 297 | .flags = IORESOURCE_IRQ, |
| 298 | }, |
| 299 | }; |
| 300 | |
| 301 | static struct platform_device iic1_device = { |
| 302 | .name = "i2c-sh_mobile", |
| 303 | .id = 1, /* "i2c1" clock */ |
| 304 | .num_resources = ARRAY_SIZE(iic1_resources), |
| 305 | .resource = iic1_resources, |
| 306 | }; |
| 307 | |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 308 | /* DMA */ |
| 309 | /* Transmit sizes and respective CHCR register values */ |
| 310 | enum { |
| 311 | XMIT_SZ_8BIT = 0, |
| 312 | XMIT_SZ_16BIT = 1, |
| 313 | XMIT_SZ_32BIT = 2, |
| 314 | XMIT_SZ_64BIT = 7, |
| 315 | XMIT_SZ_128BIT = 3, |
| 316 | XMIT_SZ_256BIT = 4, |
| 317 | XMIT_SZ_512BIT = 5, |
| 318 | }; |
| 319 | |
| 320 | /* log2(size / 8) - used to calculate number of transfers */ |
| 321 | #define TS_SHIFT { \ |
| 322 | [XMIT_SZ_8BIT] = 0, \ |
| 323 | [XMIT_SZ_16BIT] = 1, \ |
| 324 | [XMIT_SZ_32BIT] = 2, \ |
| 325 | [XMIT_SZ_64BIT] = 3, \ |
| 326 | [XMIT_SZ_128BIT] = 4, \ |
| 327 | [XMIT_SZ_256BIT] = 5, \ |
| 328 | [XMIT_SZ_512BIT] = 6, \ |
| 329 | } |
| 330 | |
| 331 | #define TS_INDEX2VAL(i) ((((i) & 3) << 3) | \ |
| 332 | (((i) & 0xc) << (20 - 2))) |
| 333 | |
| 334 | static const struct sh_dmae_slave_config sh7372_dmae_slaves[] = { |
| 335 | { |
Guennadi Liakhovetski | 8d3e17b | 2010-05-23 16:39:24 +0000 | [diff] [blame] | 336 | .slave_id = SHDMA_SLAVE_SCIF0_TX, |
| 337 | .addr = 0xe6c40020, |
| 338 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 339 | .mid_rid = 0x21, |
| 340 | }, { |
| 341 | .slave_id = SHDMA_SLAVE_SCIF0_RX, |
| 342 | .addr = 0xe6c40024, |
| 343 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 344 | .mid_rid = 0x22, |
| 345 | }, { |
| 346 | .slave_id = SHDMA_SLAVE_SCIF1_TX, |
| 347 | .addr = 0xe6c50020, |
| 348 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 349 | .mid_rid = 0x25, |
| 350 | }, { |
| 351 | .slave_id = SHDMA_SLAVE_SCIF1_RX, |
| 352 | .addr = 0xe6c50024, |
| 353 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 354 | .mid_rid = 0x26, |
| 355 | }, { |
| 356 | .slave_id = SHDMA_SLAVE_SCIF2_TX, |
| 357 | .addr = 0xe6c60020, |
| 358 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 359 | .mid_rid = 0x29, |
| 360 | }, { |
| 361 | .slave_id = SHDMA_SLAVE_SCIF2_RX, |
| 362 | .addr = 0xe6c60024, |
| 363 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 364 | .mid_rid = 0x2a, |
| 365 | }, { |
| 366 | .slave_id = SHDMA_SLAVE_SCIF3_TX, |
| 367 | .addr = 0xe6c70020, |
| 368 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 369 | .mid_rid = 0x2d, |
| 370 | }, { |
| 371 | .slave_id = SHDMA_SLAVE_SCIF3_RX, |
| 372 | .addr = 0xe6c70024, |
| 373 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 374 | .mid_rid = 0x2e, |
| 375 | }, { |
| 376 | .slave_id = SHDMA_SLAVE_SCIF4_TX, |
| 377 | .addr = 0xe6c80020, |
| 378 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 379 | .mid_rid = 0x39, |
| 380 | }, { |
| 381 | .slave_id = SHDMA_SLAVE_SCIF4_RX, |
| 382 | .addr = 0xe6c80024, |
| 383 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 384 | .mid_rid = 0x3a, |
| 385 | }, { |
| 386 | .slave_id = SHDMA_SLAVE_SCIF5_TX, |
| 387 | .addr = 0xe6cb0020, |
| 388 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 389 | .mid_rid = 0x35, |
| 390 | }, { |
| 391 | .slave_id = SHDMA_SLAVE_SCIF5_RX, |
| 392 | .addr = 0xe6cb0024, |
| 393 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 394 | .mid_rid = 0x36, |
| 395 | }, { |
| 396 | .slave_id = SHDMA_SLAVE_SCIF6_TX, |
| 397 | .addr = 0xe6c30040, |
| 398 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 399 | .mid_rid = 0x3d, |
| 400 | }, { |
| 401 | .slave_id = SHDMA_SLAVE_SCIF6_RX, |
| 402 | .addr = 0xe6c30060, |
| 403 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_8BIT), |
| 404 | .mid_rid = 0x3e, |
| 405 | }, { |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 406 | .slave_id = SHDMA_SLAVE_SDHI0_TX, |
| 407 | .addr = 0xe6850030, |
| 408 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
| 409 | .mid_rid = 0xc1, |
| 410 | }, { |
| 411 | .slave_id = SHDMA_SLAVE_SDHI0_RX, |
| 412 | .addr = 0xe6850030, |
| 413 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
| 414 | .mid_rid = 0xc2, |
| 415 | }, { |
| 416 | .slave_id = SHDMA_SLAVE_SDHI1_TX, |
| 417 | .addr = 0xe6860030, |
| 418 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
| 419 | .mid_rid = 0xc9, |
| 420 | }, { |
| 421 | .slave_id = SHDMA_SLAVE_SDHI1_RX, |
| 422 | .addr = 0xe6860030, |
| 423 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
| 424 | .mid_rid = 0xca, |
| 425 | }, { |
| 426 | .slave_id = SHDMA_SLAVE_SDHI2_TX, |
| 427 | .addr = 0xe6870030, |
| 428 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
| 429 | .mid_rid = 0xcd, |
| 430 | }, { |
| 431 | .slave_id = SHDMA_SLAVE_SDHI2_RX, |
| 432 | .addr = 0xe6870030, |
| 433 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_16BIT), |
| 434 | .mid_rid = 0xce, |
Guennadi Liakhovetski | 6d11dc1 | 2010-11-24 10:05:15 +0000 | [diff] [blame] | 435 | }, { |
| 436 | .slave_id = SHDMA_SLAVE_MMCIF_TX, |
| 437 | .addr = 0xe6bd0034, |
| 438 | .chcr = DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), |
| 439 | .mid_rid = 0xd1, |
| 440 | }, { |
| 441 | .slave_id = SHDMA_SLAVE_MMCIF_RX, |
| 442 | .addr = 0xe6bd0034, |
| 443 | .chcr = DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL(XMIT_SZ_32BIT), |
| 444 | .mid_rid = 0xd2, |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 445 | }, |
| 446 | }; |
| 447 | |
| 448 | static const struct sh_dmae_channel sh7372_dmae_channels[] = { |
| 449 | { |
| 450 | .offset = 0, |
| 451 | .dmars = 0, |
| 452 | .dmars_bit = 0, |
| 453 | }, { |
| 454 | .offset = 0x10, |
| 455 | .dmars = 0, |
| 456 | .dmars_bit = 8, |
| 457 | }, { |
| 458 | .offset = 0x20, |
| 459 | .dmars = 4, |
| 460 | .dmars_bit = 0, |
| 461 | }, { |
| 462 | .offset = 0x30, |
| 463 | .dmars = 4, |
| 464 | .dmars_bit = 8, |
| 465 | }, { |
| 466 | .offset = 0x50, |
| 467 | .dmars = 8, |
| 468 | .dmars_bit = 0, |
| 469 | }, { |
| 470 | .offset = 0x60, |
| 471 | .dmars = 8, |
| 472 | .dmars_bit = 8, |
| 473 | } |
| 474 | }; |
| 475 | |
| 476 | static const unsigned int ts_shift[] = TS_SHIFT; |
| 477 | |
| 478 | static struct sh_dmae_pdata dma_platform_data = { |
| 479 | .slave = sh7372_dmae_slaves, |
| 480 | .slave_num = ARRAY_SIZE(sh7372_dmae_slaves), |
| 481 | .channel = sh7372_dmae_channels, |
| 482 | .channel_num = ARRAY_SIZE(sh7372_dmae_channels), |
| 483 | .ts_low_shift = 3, |
| 484 | .ts_low_mask = 0x18, |
| 485 | .ts_high_shift = (20 - 2), /* 2 bits for shifted low TS */ |
| 486 | .ts_high_mask = 0x00300000, |
| 487 | .ts_shift = ts_shift, |
| 488 | .ts_shift_num = ARRAY_SIZE(ts_shift), |
| 489 | .dmaor_init = DMAOR_DME, |
| 490 | }; |
| 491 | |
| 492 | /* Resource order important! */ |
| 493 | static struct resource sh7372_dmae0_resources[] = { |
| 494 | { |
| 495 | /* Channel registers and DMAOR */ |
| 496 | .start = 0xfe008020, |
| 497 | .end = 0xfe00808f, |
| 498 | .flags = IORESOURCE_MEM, |
| 499 | }, |
| 500 | { |
| 501 | /* DMARSx */ |
| 502 | .start = 0xfe009000, |
| 503 | .end = 0xfe00900b, |
| 504 | .flags = IORESOURCE_MEM, |
| 505 | }, |
| 506 | { |
| 507 | /* DMA error IRQ */ |
Magnus Damm | f989ae5 | 2010-08-31 09:27:53 +0000 | [diff] [blame] | 508 | .start = evt2irq(0x20c0), |
| 509 | .end = evt2irq(0x20c0), |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 510 | .flags = IORESOURCE_IRQ, |
| 511 | }, |
| 512 | { |
| 513 | /* IRQ for channels 0-5 */ |
Magnus Damm | f989ae5 | 2010-08-31 09:27:53 +0000 | [diff] [blame] | 514 | .start = evt2irq(0x2000), |
| 515 | .end = evt2irq(0x20a0), |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 516 | .flags = IORESOURCE_IRQ, |
| 517 | }, |
| 518 | }; |
| 519 | |
| 520 | /* Resource order important! */ |
| 521 | static struct resource sh7372_dmae1_resources[] = { |
| 522 | { |
| 523 | /* Channel registers and DMAOR */ |
| 524 | .start = 0xfe018020, |
| 525 | .end = 0xfe01808f, |
| 526 | .flags = IORESOURCE_MEM, |
| 527 | }, |
| 528 | { |
| 529 | /* DMARSx */ |
| 530 | .start = 0xfe019000, |
| 531 | .end = 0xfe01900b, |
| 532 | .flags = IORESOURCE_MEM, |
| 533 | }, |
| 534 | { |
| 535 | /* DMA error IRQ */ |
Magnus Damm | f989ae5 | 2010-08-31 09:27:53 +0000 | [diff] [blame] | 536 | .start = evt2irq(0x21c0), |
| 537 | .end = evt2irq(0x21c0), |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 538 | .flags = IORESOURCE_IRQ, |
| 539 | }, |
| 540 | { |
| 541 | /* IRQ for channels 0-5 */ |
Magnus Damm | f989ae5 | 2010-08-31 09:27:53 +0000 | [diff] [blame] | 542 | .start = evt2irq(0x2100), |
| 543 | .end = evt2irq(0x21a0), |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 544 | .flags = IORESOURCE_IRQ, |
| 545 | }, |
| 546 | }; |
| 547 | |
| 548 | /* Resource order important! */ |
| 549 | static struct resource sh7372_dmae2_resources[] = { |
| 550 | { |
| 551 | /* Channel registers and DMAOR */ |
| 552 | .start = 0xfe028020, |
| 553 | .end = 0xfe02808f, |
| 554 | .flags = IORESOURCE_MEM, |
| 555 | }, |
| 556 | { |
| 557 | /* DMARSx */ |
| 558 | .start = 0xfe029000, |
| 559 | .end = 0xfe02900b, |
| 560 | .flags = IORESOURCE_MEM, |
| 561 | }, |
| 562 | { |
| 563 | /* DMA error IRQ */ |
Magnus Damm | f989ae5 | 2010-08-31 09:27:53 +0000 | [diff] [blame] | 564 | .start = evt2irq(0x22c0), |
| 565 | .end = evt2irq(0x22c0), |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 566 | .flags = IORESOURCE_IRQ, |
| 567 | }, |
| 568 | { |
| 569 | /* IRQ for channels 0-5 */ |
Magnus Damm | f989ae5 | 2010-08-31 09:27:53 +0000 | [diff] [blame] | 570 | .start = evt2irq(0x2200), |
| 571 | .end = evt2irq(0x22a0), |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 572 | .flags = IORESOURCE_IRQ, |
| 573 | }, |
| 574 | }; |
| 575 | |
| 576 | static struct platform_device dma0_device = { |
| 577 | .name = "sh-dma-engine", |
| 578 | .id = 0, |
| 579 | .resource = sh7372_dmae0_resources, |
| 580 | .num_resources = ARRAY_SIZE(sh7372_dmae0_resources), |
| 581 | .dev = { |
| 582 | .platform_data = &dma_platform_data, |
| 583 | }, |
| 584 | }; |
| 585 | |
| 586 | static struct platform_device dma1_device = { |
| 587 | .name = "sh-dma-engine", |
| 588 | .id = 1, |
| 589 | .resource = sh7372_dmae1_resources, |
| 590 | .num_resources = ARRAY_SIZE(sh7372_dmae1_resources), |
| 591 | .dev = { |
| 592 | .platform_data = &dma_platform_data, |
| 593 | }, |
| 594 | }; |
| 595 | |
| 596 | static struct platform_device dma2_device = { |
| 597 | .name = "sh-dma-engine", |
| 598 | .id = 2, |
| 599 | .resource = sh7372_dmae2_resources, |
| 600 | .num_resources = ARRAY_SIZE(sh7372_dmae2_resources), |
| 601 | .dev = { |
| 602 | .platform_data = &dma_platform_data, |
| 603 | }, |
| 604 | }; |
| 605 | |
Magnus Damm | 6822471 | 2011-04-28 03:21:00 +0000 | [diff] [blame] | 606 | /* VPU */ |
| 607 | static struct uio_info vpu_platform_data = { |
| 608 | .name = "VPU5HG", |
| 609 | .version = "0", |
| 610 | .irq = intcs_evt2irq(0x980), |
| 611 | }; |
| 612 | |
| 613 | static struct resource vpu_resources[] = { |
| 614 | [0] = { |
| 615 | .name = "VPU", |
| 616 | .start = 0xfe900000, |
| 617 | .end = 0xfe900157, |
| 618 | .flags = IORESOURCE_MEM, |
| 619 | }, |
| 620 | }; |
| 621 | |
| 622 | static struct platform_device vpu_device = { |
| 623 | .name = "uio_pdrv_genirq", |
| 624 | .id = 0, |
| 625 | .dev = { |
| 626 | .platform_data = &vpu_platform_data, |
| 627 | }, |
| 628 | .resource = vpu_resources, |
| 629 | .num_resources = ARRAY_SIZE(vpu_resources), |
| 630 | }; |
| 631 | |
| 632 | /* VEU0 */ |
| 633 | static struct uio_info veu0_platform_data = { |
| 634 | .name = "VEU0", |
| 635 | .version = "0", |
| 636 | .irq = intcs_evt2irq(0x700), |
| 637 | }; |
| 638 | |
| 639 | static struct resource veu0_resources[] = { |
| 640 | [0] = { |
| 641 | .name = "VEU0", |
| 642 | .start = 0xfe920000, |
| 643 | .end = 0xfe9200cb, |
| 644 | .flags = IORESOURCE_MEM, |
| 645 | }, |
| 646 | }; |
| 647 | |
| 648 | static struct platform_device veu0_device = { |
| 649 | .name = "uio_pdrv_genirq", |
| 650 | .id = 1, |
| 651 | .dev = { |
| 652 | .platform_data = &veu0_platform_data, |
| 653 | }, |
| 654 | .resource = veu0_resources, |
| 655 | .num_resources = ARRAY_SIZE(veu0_resources), |
| 656 | }; |
| 657 | |
| 658 | /* VEU1 */ |
| 659 | static struct uio_info veu1_platform_data = { |
| 660 | .name = "VEU1", |
| 661 | .version = "0", |
| 662 | .irq = intcs_evt2irq(0x720), |
| 663 | }; |
| 664 | |
| 665 | static struct resource veu1_resources[] = { |
| 666 | [0] = { |
| 667 | .name = "VEU1", |
| 668 | .start = 0xfe924000, |
| 669 | .end = 0xfe9240cb, |
| 670 | .flags = IORESOURCE_MEM, |
| 671 | }, |
| 672 | }; |
| 673 | |
| 674 | static struct platform_device veu1_device = { |
| 675 | .name = "uio_pdrv_genirq", |
| 676 | .id = 2, |
| 677 | .dev = { |
| 678 | .platform_data = &veu1_platform_data, |
| 679 | }, |
| 680 | .resource = veu1_resources, |
| 681 | .num_resources = ARRAY_SIZE(veu1_resources), |
| 682 | }; |
| 683 | |
| 684 | /* VEU2 */ |
| 685 | static struct uio_info veu2_platform_data = { |
| 686 | .name = "VEU2", |
| 687 | .version = "0", |
| 688 | .irq = intcs_evt2irq(0x740), |
| 689 | }; |
| 690 | |
| 691 | static struct resource veu2_resources[] = { |
| 692 | [0] = { |
| 693 | .name = "VEU2", |
| 694 | .start = 0xfe928000, |
| 695 | .end = 0xfe928307, |
| 696 | .flags = IORESOURCE_MEM, |
| 697 | }, |
| 698 | }; |
| 699 | |
| 700 | static struct platform_device veu2_device = { |
| 701 | .name = "uio_pdrv_genirq", |
| 702 | .id = 3, |
| 703 | .dev = { |
| 704 | .platform_data = &veu2_platform_data, |
| 705 | }, |
| 706 | .resource = veu2_resources, |
| 707 | .num_resources = ARRAY_SIZE(veu2_resources), |
| 708 | }; |
| 709 | |
| 710 | /* VEU3 */ |
| 711 | static struct uio_info veu3_platform_data = { |
| 712 | .name = "VEU3", |
| 713 | .version = "0", |
| 714 | .irq = intcs_evt2irq(0x760), |
| 715 | }; |
| 716 | |
| 717 | static struct resource veu3_resources[] = { |
| 718 | [0] = { |
| 719 | .name = "VEU3", |
| 720 | .start = 0xfe92c000, |
| 721 | .end = 0xfe92c307, |
| 722 | .flags = IORESOURCE_MEM, |
| 723 | }, |
| 724 | }; |
| 725 | |
| 726 | static struct platform_device veu3_device = { |
| 727 | .name = "uio_pdrv_genirq", |
| 728 | .id = 4, |
| 729 | .dev = { |
| 730 | .platform_data = &veu3_platform_data, |
| 731 | }, |
| 732 | .resource = veu3_resources, |
| 733 | .num_resources = ARRAY_SIZE(veu3_resources), |
| 734 | }; |
| 735 | |
| 736 | /* JPU */ |
| 737 | static struct uio_info jpu_platform_data = { |
| 738 | .name = "JPU", |
| 739 | .version = "0", |
| 740 | .irq = intcs_evt2irq(0x560), |
| 741 | }; |
| 742 | |
| 743 | static struct resource jpu_resources[] = { |
| 744 | [0] = { |
| 745 | .name = "JPU", |
| 746 | .start = 0xfe980000, |
| 747 | .end = 0xfe9902d3, |
| 748 | .flags = IORESOURCE_MEM, |
| 749 | }, |
| 750 | }; |
| 751 | |
| 752 | static struct platform_device jpu_device = { |
| 753 | .name = "uio_pdrv_genirq", |
| 754 | .id = 5, |
| 755 | .dev = { |
| 756 | .platform_data = &jpu_platform_data, |
| 757 | }, |
| 758 | .resource = jpu_resources, |
| 759 | .num_resources = ARRAY_SIZE(jpu_resources), |
| 760 | }; |
| 761 | |
| 762 | /* SPU2DSP0 */ |
| 763 | static struct uio_info spu0_platform_data = { |
| 764 | .name = "SPU2DSP0", |
| 765 | .version = "0", |
| 766 | .irq = evt2irq(0x1800), |
| 767 | }; |
| 768 | |
| 769 | static struct resource spu0_resources[] = { |
| 770 | [0] = { |
| 771 | .name = "SPU2DSP0", |
| 772 | .start = 0xfe200000, |
| 773 | .end = 0xfe2fffff, |
| 774 | .flags = IORESOURCE_MEM, |
| 775 | }, |
| 776 | }; |
| 777 | |
| 778 | static struct platform_device spu0_device = { |
| 779 | .name = "uio_pdrv_genirq", |
| 780 | .id = 6, |
| 781 | .dev = { |
| 782 | .platform_data = &spu0_platform_data, |
| 783 | }, |
| 784 | .resource = spu0_resources, |
| 785 | .num_resources = ARRAY_SIZE(spu0_resources), |
| 786 | }; |
| 787 | |
| 788 | /* SPU2DSP1 */ |
| 789 | static struct uio_info spu1_platform_data = { |
| 790 | .name = "SPU2DSP1", |
| 791 | .version = "0", |
| 792 | .irq = evt2irq(0x1820), |
| 793 | }; |
| 794 | |
| 795 | static struct resource spu1_resources[] = { |
| 796 | [0] = { |
| 797 | .name = "SPU2DSP1", |
| 798 | .start = 0xfe300000, |
| 799 | .end = 0xfe3fffff, |
| 800 | .flags = IORESOURCE_MEM, |
| 801 | }, |
| 802 | }; |
| 803 | |
| 804 | static struct platform_device spu1_device = { |
| 805 | .name = "uio_pdrv_genirq", |
| 806 | .id = 7, |
| 807 | .dev = { |
| 808 | .platform_data = &spu1_platform_data, |
| 809 | }, |
| 810 | .resource = spu1_resources, |
| 811 | .num_resources = ARRAY_SIZE(spu1_resources), |
| 812 | }; |
| 813 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 814 | static struct platform_device *sh7372_early_devices[] __initdata = { |
| 815 | &scif0_device, |
| 816 | &scif1_device, |
| 817 | &scif2_device, |
| 818 | &scif3_device, |
| 819 | &scif4_device, |
| 820 | &scif5_device, |
| 821 | &scif6_device, |
| 822 | &cmt10_device, |
Magnus Damm | c6c049e | 2010-10-14 06:57:25 +0000 | [diff] [blame] | 823 | &tmu00_device, |
| 824 | &tmu01_device, |
Magnus Damm | 934e407 | 2010-10-13 07:22:11 +0000 | [diff] [blame] | 825 | }; |
| 826 | |
| 827 | static struct platform_device *sh7372_late_devices[] __initdata = { |
Kuninori Morimoto | c1909cc | 2010-03-11 10:42:47 +0000 | [diff] [blame] | 828 | &iic0_device, |
| 829 | &iic1_device, |
Guennadi Liakhovetski | 69bf6f4 | 2010-05-04 14:07:15 +0000 | [diff] [blame] | 830 | &dma0_device, |
| 831 | &dma1_device, |
| 832 | &dma2_device, |
Magnus Damm | 6822471 | 2011-04-28 03:21:00 +0000 | [diff] [blame] | 833 | &vpu_device, |
| 834 | &veu0_device, |
| 835 | &veu1_device, |
| 836 | &veu2_device, |
| 837 | &veu3_device, |
| 838 | &jpu_device, |
| 839 | &spu0_device, |
| 840 | &spu1_device, |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 841 | }; |
| 842 | |
| 843 | void __init sh7372_add_standard_devices(void) |
| 844 | { |
Magnus Damm | 96f7934 | 2011-07-01 22:14:34 +0200 | [diff] [blame] | 845 | sh7372_init_pm_domain(&sh7372_a4lc); |
Kuninori Morimoto | c1ba5bb | 2011-07-10 10:12:08 +0200 | [diff] [blame] | 846 | sh7372_init_pm_domain(&sh7372_a4mp); |
Magnus Damm | d24771d | 2011-07-10 10:38:22 +0200 | [diff] [blame] | 847 | sh7372_init_pm_domain(&sh7372_d4); |
Magnus Damm | 33afebf | 2011-07-01 22:14:45 +0200 | [diff] [blame] | 848 | sh7372_init_pm_domain(&sh7372_a3rv); |
Magnus Damm | 082517a | 2011-07-01 22:14:53 +0200 | [diff] [blame] | 849 | sh7372_init_pm_domain(&sh7372_a3ri); |
Magnus Damm | c47586b | 2011-07-01 22:15:01 +0200 | [diff] [blame] | 850 | sh7372_init_pm_domain(&sh7372_a3sg); |
Magnus Damm | 96f7934 | 2011-07-01 22:14:34 +0200 | [diff] [blame] | 851 | |
Rafael J. Wysocki | 111058c | 2011-08-14 13:35:39 +0200 | [diff] [blame^] | 852 | sh7372_pm_add_subdomain(&sh7372_a4lc, &sh7372_a3rv); |
| 853 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 854 | platform_add_devices(sh7372_early_devices, |
| 855 | ARRAY_SIZE(sh7372_early_devices)); |
Magnus Damm | 934e407 | 2010-10-13 07:22:11 +0000 | [diff] [blame] | 856 | |
| 857 | platform_add_devices(sh7372_late_devices, |
| 858 | ARRAY_SIZE(sh7372_late_devices)); |
Magnus Damm | 33afebf | 2011-07-01 22:14:45 +0200 | [diff] [blame] | 859 | |
| 860 | sh7372_add_device_to_domain(&sh7372_a3rv, &vpu_device); |
Kuninori Morimoto | c1ba5bb | 2011-07-10 10:12:08 +0200 | [diff] [blame] | 861 | sh7372_add_device_to_domain(&sh7372_a4mp, &spu0_device); |
| 862 | sh7372_add_device_to_domain(&sh7372_a4mp, &spu1_device); |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 863 | } |
| 864 | |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 865 | void __init sh7372_add_early_devices(void) |
| 866 | { |
Magnus Damm | 2b7eda6 | 2010-02-05 11:14:58 +0000 | [diff] [blame] | 867 | early_platform_add_devices(sh7372_early_devices, |
| 868 | ARRAY_SIZE(sh7372_early_devices)); |
| 869 | } |