blob: 3844fc34cbb5fc75206efe9c6e76d12a78d99c95 [file] [log] [blame]
Kevin Hilmand0e47fb2009-04-14 11:30:11 -05001/*
2 * TI DaVinci DM644x chip specific setup
3 *
4 * Author: Kevin Hilman, Deep Root Systems, LLC
5 *
6 * 2007 (c) Deep Root Systems, LLC. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/clk.h>
Mark A. Greer65e866a2009-03-18 12:36:08 -050014#include <linux/serial_8250.h>
Kevin Hilmand0e47fb2009-04-14 11:30:11 -050015#include <linux/platform_device.h>
Mark A. Greera9949552009-04-15 12:40:35 -070016#include <linux/gpio.h>
Kevin Hilmand0e47fb2009-04-14 11:30:11 -050017
Mark A. Greer79c3c0b2009-04-15 12:38:58 -070018#include <asm/mach/map.h>
19
Kevin Hilmand0e47fb2009-04-14 11:30:11 -050020#include <mach/dm644x.h>
21#include <mach/clock.h>
22#include <mach/cputype.h>
23#include <mach/edma.h>
24#include <mach/irqs.h>
25#include <mach/psc.h>
26#include <mach/mux.h>
Mark A. Greerf64691b2009-04-15 12:40:11 -070027#include <mach/time.h>
Mark A. Greer65e866a2009-03-18 12:36:08 -050028#include <mach/serial.h>
Mark A. Greer79c3c0b2009-04-15 12:38:58 -070029#include <mach/common.h>
Kevin Hilmand0e47fb2009-04-14 11:30:11 -050030
31#include "clock.h"
32#include "mux.h"
33
34/*
35 * Device specific clocks
36 */
37#define DM644X_REF_FREQ 27000000
38
39static struct pll_data pll1_data = {
40 .num = 1,
41 .phys_base = DAVINCI_PLL1_BASE,
42};
43
44static struct pll_data pll2_data = {
45 .num = 2,
46 .phys_base = DAVINCI_PLL2_BASE,
47};
48
49static struct clk ref_clk = {
50 .name = "ref_clk",
51 .rate = DM644X_REF_FREQ,
52};
53
54static struct clk pll1_clk = {
55 .name = "pll1",
56 .parent = &ref_clk,
57 .pll_data = &pll1_data,
58 .flags = CLK_PLL,
59};
60
61static struct clk pll1_sysclk1 = {
62 .name = "pll1_sysclk1",
63 .parent = &pll1_clk,
64 .flags = CLK_PLL,
65 .div_reg = PLLDIV1,
66};
67
68static struct clk pll1_sysclk2 = {
69 .name = "pll1_sysclk2",
70 .parent = &pll1_clk,
71 .flags = CLK_PLL,
72 .div_reg = PLLDIV2,
73};
74
75static struct clk pll1_sysclk3 = {
76 .name = "pll1_sysclk3",
77 .parent = &pll1_clk,
78 .flags = CLK_PLL,
79 .div_reg = PLLDIV3,
80};
81
82static struct clk pll1_sysclk5 = {
83 .name = "pll1_sysclk5",
84 .parent = &pll1_clk,
85 .flags = CLK_PLL,
86 .div_reg = PLLDIV5,
87};
88
89static struct clk pll1_aux_clk = {
90 .name = "pll1_aux_clk",
91 .parent = &pll1_clk,
92 .flags = CLK_PLL | PRE_PLL,
93};
94
95static struct clk pll1_sysclkbp = {
96 .name = "pll1_sysclkbp",
97 .parent = &pll1_clk,
98 .flags = CLK_PLL | PRE_PLL,
99 .div_reg = BPDIV
100};
101
102static struct clk pll2_clk = {
103 .name = "pll2",
104 .parent = &ref_clk,
105 .pll_data = &pll2_data,
106 .flags = CLK_PLL,
107};
108
109static struct clk pll2_sysclk1 = {
110 .name = "pll2_sysclk1",
111 .parent = &pll2_clk,
112 .flags = CLK_PLL,
113 .div_reg = PLLDIV1,
114};
115
116static struct clk pll2_sysclk2 = {
117 .name = "pll2_sysclk2",
118 .parent = &pll2_clk,
119 .flags = CLK_PLL,
120 .div_reg = PLLDIV2,
121};
122
123static struct clk pll2_sysclkbp = {
124 .name = "pll2_sysclkbp",
125 .parent = &pll2_clk,
126 .flags = CLK_PLL | PRE_PLL,
127 .div_reg = BPDIV
128};
129
130static struct clk dsp_clk = {
131 .name = "dsp",
132 .parent = &pll1_sysclk1,
133 .lpsc = DAVINCI_LPSC_GEM,
134 .flags = PSC_DSP,
135 .usecount = 1, /* REVISIT how to disable? */
136};
137
138static struct clk arm_clk = {
139 .name = "arm",
140 .parent = &pll1_sysclk2,
141 .lpsc = DAVINCI_LPSC_ARM,
142 .flags = ALWAYS_ENABLED,
143};
144
145static struct clk vicp_clk = {
146 .name = "vicp",
147 .parent = &pll1_sysclk2,
148 .lpsc = DAVINCI_LPSC_IMCOP,
149 .flags = PSC_DSP,
150 .usecount = 1, /* REVISIT how to disable? */
151};
152
153static struct clk vpss_master_clk = {
154 .name = "vpss_master",
155 .parent = &pll1_sysclk3,
156 .lpsc = DAVINCI_LPSC_VPSSMSTR,
157 .flags = CLK_PSC,
158};
159
160static struct clk vpss_slave_clk = {
161 .name = "vpss_slave",
162 .parent = &pll1_sysclk3,
163 .lpsc = DAVINCI_LPSC_VPSSSLV,
164};
165
166static struct clk uart0_clk = {
167 .name = "uart0",
168 .parent = &pll1_aux_clk,
169 .lpsc = DAVINCI_LPSC_UART0,
170};
171
172static struct clk uart1_clk = {
173 .name = "uart1",
174 .parent = &pll1_aux_clk,
175 .lpsc = DAVINCI_LPSC_UART1,
176};
177
178static struct clk uart2_clk = {
179 .name = "uart2",
180 .parent = &pll1_aux_clk,
181 .lpsc = DAVINCI_LPSC_UART2,
182};
183
184static struct clk emac_clk = {
185 .name = "emac",
186 .parent = &pll1_sysclk5,
187 .lpsc = DAVINCI_LPSC_EMAC_WRAPPER,
188};
189
190static struct clk i2c_clk = {
191 .name = "i2c",
192 .parent = &pll1_aux_clk,
193 .lpsc = DAVINCI_LPSC_I2C,
194};
195
196static struct clk ide_clk = {
197 .name = "ide",
198 .parent = &pll1_sysclk5,
199 .lpsc = DAVINCI_LPSC_ATA,
200};
201
202static struct clk asp_clk = {
203 .name = "asp0",
204 .parent = &pll1_sysclk5,
205 .lpsc = DAVINCI_LPSC_McBSP,
206};
207
208static struct clk mmcsd_clk = {
209 .name = "mmcsd",
210 .parent = &pll1_sysclk5,
211 .lpsc = DAVINCI_LPSC_MMC_SD,
212};
213
214static struct clk spi_clk = {
215 .name = "spi",
216 .parent = &pll1_sysclk5,
217 .lpsc = DAVINCI_LPSC_SPI,
218};
219
220static struct clk gpio_clk = {
221 .name = "gpio",
222 .parent = &pll1_sysclk5,
223 .lpsc = DAVINCI_LPSC_GPIO,
224};
225
226static struct clk usb_clk = {
227 .name = "usb",
228 .parent = &pll1_sysclk5,
229 .lpsc = DAVINCI_LPSC_USB,
230};
231
232static struct clk vlynq_clk = {
233 .name = "vlynq",
234 .parent = &pll1_sysclk5,
235 .lpsc = DAVINCI_LPSC_VLYNQ,
236};
237
238static struct clk aemif_clk = {
239 .name = "aemif",
240 .parent = &pll1_sysclk5,
241 .lpsc = DAVINCI_LPSC_AEMIF,
242};
243
244static struct clk pwm0_clk = {
245 .name = "pwm0",
246 .parent = &pll1_aux_clk,
247 .lpsc = DAVINCI_LPSC_PWM0,
248};
249
250static struct clk pwm1_clk = {
251 .name = "pwm1",
252 .parent = &pll1_aux_clk,
253 .lpsc = DAVINCI_LPSC_PWM1,
254};
255
256static struct clk pwm2_clk = {
257 .name = "pwm2",
258 .parent = &pll1_aux_clk,
259 .lpsc = DAVINCI_LPSC_PWM2,
260};
261
262static struct clk timer0_clk = {
263 .name = "timer0",
264 .parent = &pll1_aux_clk,
265 .lpsc = DAVINCI_LPSC_TIMER0,
266};
267
268static struct clk timer1_clk = {
269 .name = "timer1",
270 .parent = &pll1_aux_clk,
271 .lpsc = DAVINCI_LPSC_TIMER1,
272};
273
274static struct clk timer2_clk = {
275 .name = "timer2",
276 .parent = &pll1_aux_clk,
277 .lpsc = DAVINCI_LPSC_TIMER2,
278 .usecount = 1, /* REVISIT: why cant' this be disabled? */
279};
280
281struct davinci_clk dm644x_clks[] = {
282 CLK(NULL, "ref", &ref_clk),
283 CLK(NULL, "pll1", &pll1_clk),
284 CLK(NULL, "pll1_sysclk1", &pll1_sysclk1),
285 CLK(NULL, "pll1_sysclk2", &pll1_sysclk2),
286 CLK(NULL, "pll1_sysclk3", &pll1_sysclk3),
287 CLK(NULL, "pll1_sysclk5", &pll1_sysclk5),
288 CLK(NULL, "pll1_aux", &pll1_aux_clk),
289 CLK(NULL, "pll1_sysclkbp", &pll1_sysclkbp),
290 CLK(NULL, "pll2", &pll2_clk),
291 CLK(NULL, "pll2_sysclk1", &pll2_sysclk1),
292 CLK(NULL, "pll2_sysclk2", &pll2_sysclk2),
293 CLK(NULL, "pll2_sysclkbp", &pll2_sysclkbp),
294 CLK(NULL, "dsp", &dsp_clk),
295 CLK(NULL, "arm", &arm_clk),
296 CLK(NULL, "vicp", &vicp_clk),
297 CLK(NULL, "vpss_master", &vpss_master_clk),
298 CLK(NULL, "vpss_slave", &vpss_slave_clk),
299 CLK(NULL, "arm", &arm_clk),
300 CLK(NULL, "uart0", &uart0_clk),
301 CLK(NULL, "uart1", &uart1_clk),
302 CLK(NULL, "uart2", &uart2_clk),
303 CLK("davinci_emac.1", NULL, &emac_clk),
304 CLK("i2c_davinci.1", NULL, &i2c_clk),
305 CLK("palm_bk3710", NULL, &ide_clk),
306 CLK("soc-audio.0", NULL, &asp_clk),
307 CLK("davinci_mmc.0", NULL, &mmcsd_clk),
308 CLK(NULL, "spi", &spi_clk),
309 CLK(NULL, "gpio", &gpio_clk),
310 CLK(NULL, "usb", &usb_clk),
311 CLK(NULL, "vlynq", &vlynq_clk),
312 CLK(NULL, "aemif", &aemif_clk),
313 CLK(NULL, "pwm0", &pwm0_clk),
314 CLK(NULL, "pwm1", &pwm1_clk),
315 CLK(NULL, "pwm2", &pwm2_clk),
316 CLK(NULL, "timer0", &timer0_clk),
317 CLK(NULL, "timer1", &timer1_clk),
318 CLK("watchdog", NULL, &timer2_clk),
319 CLK(NULL, NULL, NULL),
320};
321
Mark A. Greer972412b2009-04-15 12:40:56 -0700322static struct emac_platform_data dm644x_emac_pdata = {
323 .ctrl_reg_offset = DM644X_EMAC_CNTRL_OFFSET,
324 .ctrl_mod_reg_offset = DM644X_EMAC_CNTRL_MOD_OFFSET,
325 .ctrl_ram_offset = DM644X_EMAC_CNTRL_RAM_OFFSET,
326 .mdio_reg_offset = DM644X_EMAC_MDIO_OFFSET,
327 .ctrl_ram_size = DM644X_EMAC_CNTRL_RAM_SIZE,
328 .version = EMAC_VERSION_1,
329};
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500330
331static struct resource dm644x_emac_resources[] = {
332 {
333 .start = DM644X_EMAC_BASE,
334 .end = DM644X_EMAC_BASE + 0x47ff,
335 .flags = IORESOURCE_MEM,
336 },
337 {
338 .start = IRQ_EMACINT,
339 .end = IRQ_EMACINT,
340 .flags = IORESOURCE_IRQ,
341 },
342};
343
344static struct platform_device dm644x_emac_device = {
345 .name = "davinci_emac",
346 .id = 1,
Mark A. Greer972412b2009-04-15 12:40:56 -0700347 .dev = {
348 .platform_data = &dm644x_emac_pdata,
349 },
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500350 .num_resources = ARRAY_SIZE(dm644x_emac_resources),
351 .resource = dm644x_emac_resources,
352};
353
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500354/*
355 * Device specific mux setup
356 *
357 * soc description mux mode mode mux dbg
358 * reg offset mask mode
359 */
360static const struct mux_config dm644x_pins[] = {
Mark A. Greer0e585952009-04-15 12:39:48 -0700361#ifdef CONFIG_DAVINCI_MUX
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500362MUX_CFG(DM644X, HDIREN, 0, 16, 1, 1, true)
363MUX_CFG(DM644X, ATAEN, 0, 17, 1, 1, true)
364MUX_CFG(DM644X, ATAEN_DISABLE, 0, 17, 1, 0, true)
365
366MUX_CFG(DM644X, HPIEN_DISABLE, 0, 29, 1, 0, true)
367
368MUX_CFG(DM644X, AEAW, 0, 0, 31, 31, true)
369
370MUX_CFG(DM644X, MSTK, 1, 9, 1, 0, false)
371
372MUX_CFG(DM644X, I2C, 1, 7, 1, 1, false)
373
374MUX_CFG(DM644X, MCBSP, 1, 10, 1, 1, false)
375
376MUX_CFG(DM644X, UART1, 1, 1, 1, 1, true)
377MUX_CFG(DM644X, UART2, 1, 2, 1, 1, true)
378
379MUX_CFG(DM644X, PWM0, 1, 4, 1, 1, false)
380
381MUX_CFG(DM644X, PWM1, 1, 5, 1, 1, false)
382
383MUX_CFG(DM644X, PWM2, 1, 6, 1, 1, false)
384
385MUX_CFG(DM644X, VLYNQEN, 0, 15, 1, 1, false)
386MUX_CFG(DM644X, VLSCREN, 0, 14, 1, 1, false)
387MUX_CFG(DM644X, VLYNQWD, 0, 12, 3, 3, false)
388
389MUX_CFG(DM644X, EMACEN, 0, 31, 1, 1, true)
390
391MUX_CFG(DM644X, GPIO3V, 0, 31, 1, 0, true)
392
393MUX_CFG(DM644X, GPIO0, 0, 24, 1, 0, true)
394MUX_CFG(DM644X, GPIO3, 0, 25, 1, 0, false)
395MUX_CFG(DM644X, GPIO43_44, 1, 7, 1, 0, false)
396MUX_CFG(DM644X, GPIO46_47, 0, 22, 1, 0, true)
397
398MUX_CFG(DM644X, RGB666, 0, 22, 1, 1, true)
399
400MUX_CFG(DM644X, LOEEN, 0, 24, 1, 1, true)
401MUX_CFG(DM644X, LFLDEN, 0, 25, 1, 1, false)
Mark A. Greer0e585952009-04-15 12:39:48 -0700402#endif
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500403};
404
Mark A. Greer673dd362009-04-15 12:40:00 -0700405/* FIQ are pri 0-1; otherwise 2-7, with 7 lowest priority */
406static u8 dm644x_default_priorities[DAVINCI_N_AINTC_IRQ] = {
407 [IRQ_VDINT0] = 2,
408 [IRQ_VDINT1] = 6,
409 [IRQ_VDINT2] = 6,
410 [IRQ_HISTINT] = 6,
411 [IRQ_H3AINT] = 6,
412 [IRQ_PRVUINT] = 6,
413 [IRQ_RSZINT] = 6,
414 [7] = 7,
415 [IRQ_VENCINT] = 6,
416 [IRQ_ASQINT] = 6,
417 [IRQ_IMXINT] = 6,
418 [IRQ_VLCDINT] = 6,
419 [IRQ_USBINT] = 4,
420 [IRQ_EMACINT] = 4,
421 [14] = 7,
422 [15] = 7,
423 [IRQ_CCINT0] = 5, /* dma */
424 [IRQ_CCERRINT] = 5, /* dma */
425 [IRQ_TCERRINT0] = 5, /* dma */
426 [IRQ_TCERRINT] = 5, /* dma */
427 [IRQ_PSCIN] = 7,
428 [21] = 7,
429 [IRQ_IDE] = 4,
430 [23] = 7,
431 [IRQ_MBXINT] = 7,
432 [IRQ_MBRINT] = 7,
433 [IRQ_MMCINT] = 7,
434 [IRQ_SDIOINT] = 7,
435 [28] = 7,
436 [IRQ_DDRINT] = 7,
437 [IRQ_AEMIFINT] = 7,
438 [IRQ_VLQINT] = 4,
439 [IRQ_TINT0_TINT12] = 2, /* clockevent */
440 [IRQ_TINT0_TINT34] = 2, /* clocksource */
441 [IRQ_TINT1_TINT12] = 7, /* DSP timer */
442 [IRQ_TINT1_TINT34] = 7, /* system tick */
443 [IRQ_PWMINT0] = 7,
444 [IRQ_PWMINT1] = 7,
445 [IRQ_PWMINT2] = 7,
446 [IRQ_I2C] = 3,
447 [IRQ_UARTINT0] = 3,
448 [IRQ_UARTINT1] = 3,
449 [IRQ_UARTINT2] = 3,
450 [IRQ_SPINT0] = 3,
451 [IRQ_SPINT1] = 3,
452 [45] = 7,
453 [IRQ_DSP2ARM0] = 4,
454 [IRQ_DSP2ARM1] = 4,
455 [IRQ_GPIO0] = 7,
456 [IRQ_GPIO1] = 7,
457 [IRQ_GPIO2] = 7,
458 [IRQ_GPIO3] = 7,
459 [IRQ_GPIO4] = 7,
460 [IRQ_GPIO5] = 7,
461 [IRQ_GPIO6] = 7,
462 [IRQ_GPIO7] = 7,
463 [IRQ_GPIOBNK0] = 7,
464 [IRQ_GPIOBNK1] = 7,
465 [IRQ_GPIOBNK2] = 7,
466 [IRQ_GPIOBNK3] = 7,
467 [IRQ_GPIOBNK4] = 7,
468 [IRQ_COMMTX] = 7,
469 [IRQ_COMMRX] = 7,
470 [IRQ_EMUINT] = 7,
471};
472
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500473/*----------------------------------------------------------------------*/
474
475static const s8 dma_chan_dm644x_no_event[] = {
476 0, 1, 12, 13, 14,
477 15, 25, 30, 31, 45,
478 46, 47, 55, 56, 57,
479 58, 59, 60, 61, 62,
480 63,
481 -1
482};
483
484static struct edma_soc_info dm644x_edma_info = {
485 .n_channel = 64,
486 .n_region = 4,
487 .n_slot = 128,
488 .n_tc = 2,
489 .noevent = dma_chan_dm644x_no_event,
490};
491
492static struct resource edma_resources[] = {
493 {
494 .name = "edma_cc",
495 .start = 0x01c00000,
496 .end = 0x01c00000 + SZ_64K - 1,
497 .flags = IORESOURCE_MEM,
498 },
499 {
500 .name = "edma_tc0",
501 .start = 0x01c10000,
502 .end = 0x01c10000 + SZ_1K - 1,
503 .flags = IORESOURCE_MEM,
504 },
505 {
506 .name = "edma_tc1",
507 .start = 0x01c10400,
508 .end = 0x01c10400 + SZ_1K - 1,
509 .flags = IORESOURCE_MEM,
510 },
511 {
512 .start = IRQ_CCINT0,
513 .flags = IORESOURCE_IRQ,
514 },
515 {
516 .start = IRQ_CCERRINT,
517 .flags = IORESOURCE_IRQ,
518 },
519 /* not using TC*_ERR */
520};
521
522static struct platform_device dm644x_edma_device = {
523 .name = "edma",
524 .id = -1,
525 .dev.platform_data = &dm644x_edma_info,
526 .num_resources = ARRAY_SIZE(edma_resources),
527 .resource = edma_resources,
528};
529
530/*----------------------------------------------------------------------*/
Kevin Hilmanac7b75b2009-05-07 06:19:40 -0700531
Mark A. Greer79c3c0b2009-04-15 12:38:58 -0700532static struct map_desc dm644x_io_desc[] = {
533 {
534 .virtual = IO_VIRT,
535 .pfn = __phys_to_pfn(IO_PHYS),
536 .length = IO_SIZE,
537 .type = MT_DEVICE
538 },
539};
540
Mark A. Greerb9ab1272009-04-15 12:39:09 -0700541/* Contents of JTAG ID register used to identify exact cpu type */
542static struct davinci_id dm644x_ids[] = {
543 {
544 .variant = 0x0,
545 .part_no = 0xb700,
546 .manufacturer = 0x017,
547 .cpu_id = DAVINCI_CPU_ID_DM6446,
548 .name = "dm6446",
549 },
550};
551
Mark A. Greerd81d1882009-04-15 12:39:33 -0700552static void __iomem *dm644x_psc_bases[] = {
553 IO_ADDRESS(DAVINCI_PWR_SLEEP_CNTRL_BASE),
554};
555
Mark A. Greerf64691b2009-04-15 12:40:11 -0700556/*
557 * T0_BOT: Timer 0, bottom: clockevent source for hrtimers
558 * T0_TOP: Timer 0, top : clocksource for generic timekeeping
559 * T1_BOT: Timer 1, bottom: (used by DSP in TI DSPLink code)
560 * T1_TOP: Timer 1, top : <unused>
561 */
562struct davinci_timer_info dm644x_timer_info = {
563 .timers = davinci_timer_instance,
564 .clockevent_id = T0_BOT,
565 .clocksource_id = T0_TOP,
566};
567
Mark A. Greer65e866a2009-03-18 12:36:08 -0500568static struct plat_serial8250_port dm644x_serial_platform_data[] = {
569 {
570 .mapbase = DAVINCI_UART0_BASE,
571 .irq = IRQ_UARTINT0,
572 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
573 UPF_IOREMAP,
574 .iotype = UPIO_MEM,
575 .regshift = 2,
576 },
577 {
578 .mapbase = DAVINCI_UART1_BASE,
579 .irq = IRQ_UARTINT1,
580 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
581 UPF_IOREMAP,
582 .iotype = UPIO_MEM,
583 .regshift = 2,
584 },
585 {
586 .mapbase = DAVINCI_UART2_BASE,
587 .irq = IRQ_UARTINT2,
588 .flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST |
589 UPF_IOREMAP,
590 .iotype = UPIO_MEM,
591 .regshift = 2,
592 },
593 {
594 .flags = 0
595 },
596};
597
598static struct platform_device dm644x_serial_device = {
599 .name = "serial8250",
600 .id = PLAT8250_DEV_PLATFORM,
601 .dev = {
602 .platform_data = dm644x_serial_platform_data,
603 },
604};
605
Mark A. Greer79c3c0b2009-04-15 12:38:58 -0700606static struct davinci_soc_info davinci_soc_info_dm644x = {
607 .io_desc = dm644x_io_desc,
608 .io_desc_num = ARRAY_SIZE(dm644x_io_desc),
Mark A. Greerb9ab1272009-04-15 12:39:09 -0700609 .jtag_id_base = IO_ADDRESS(0x01c40028),
610 .ids = dm644x_ids,
611 .ids_num = ARRAY_SIZE(dm644x_ids),
Mark A. Greer66e0c392009-04-15 12:39:23 -0700612 .cpu_clks = dm644x_clks,
Mark A. Greerd81d1882009-04-15 12:39:33 -0700613 .psc_bases = dm644x_psc_bases,
614 .psc_bases_num = ARRAY_SIZE(dm644x_psc_bases),
Mark A. Greer0e585952009-04-15 12:39:48 -0700615 .pinmux_base = IO_ADDRESS(DAVINCI_SYSTEM_MODULE_BASE),
616 .pinmux_pins = dm644x_pins,
617 .pinmux_pins_num = ARRAY_SIZE(dm644x_pins),
Mark A. Greer673dd362009-04-15 12:40:00 -0700618 .intc_base = IO_ADDRESS(DAVINCI_ARM_INTC_BASE),
619 .intc_type = DAVINCI_INTC_TYPE_AINTC,
620 .intc_irq_prios = dm644x_default_priorities,
621 .intc_irq_num = DAVINCI_N_AINTC_IRQ,
Mark A. Greerf64691b2009-04-15 12:40:11 -0700622 .timer_info = &dm644x_timer_info,
Mark A. Greer951d6f62009-04-15 12:40:21 -0700623 .wdt_base = IO_ADDRESS(DAVINCI_WDOG_BASE),
Mark A. Greera9949552009-04-15 12:40:35 -0700624 .gpio_base = IO_ADDRESS(DAVINCI_GPIO_BASE),
625 .gpio_num = 71,
626 .gpio_irq = IRQ_GPIOBNK0,
Mark A. Greer65e866a2009-03-18 12:36:08 -0500627 .serial_dev = &dm644x_serial_device,
Mark A. Greer972412b2009-04-15 12:40:56 -0700628 .emac_pdata = &dm644x_emac_pdata,
Mark A. Greer79c3c0b2009-04-15 12:38:58 -0700629};
630
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500631void __init dm644x_init(void)
632{
Mark A. Greer79c3c0b2009-04-15 12:38:58 -0700633 davinci_common_init(&davinci_soc_info_dm644x);
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500634}
635
636static int __init dm644x_init_devices(void)
637{
638 if (!cpu_is_davinci_dm644x())
639 return 0;
640
641 platform_device_register(&dm644x_edma_device);
Mark A. Greer972412b2009-04-15 12:40:56 -0700642 platform_device_register(&dm644x_emac_device);
Kevin Hilmand0e47fb2009-04-14 11:30:11 -0500643 return 0;
644}
645postcore_initcall(dm644x_init_devices);