2 * linux/arch/arm/mach-omap2/devices.c
4 * OMAP2 platform device setup/initialization
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
12 #include <linux/module.h>
13 #include <linux/kernel.h>
14 #include <linux/init.h>
15 #include <linux/platform_device.h>
17 #include <linux/clk.h>
19 #include <mach/hardware.h>
20 #include <mach/irqs.h>
21 #include <asm/mach-types.h>
22 #include <asm/mach/map.h>
25 #include <plat/control.h>
27 #include <plat/board.h>
28 #include <mach/gpio.h>
34 #if defined(CONFIG_VIDEO_OMAP2) || defined(CONFIG_VIDEO_OMAP2_MODULE)
36 static struct resource cam_resources[] = {
38 .start = OMAP24XX_CAMERA_BASE,
39 .end = OMAP24XX_CAMERA_BASE + 0xfff,
40 .flags = IORESOURCE_MEM,
43 .start = INT_24XX_CAM_IRQ,
44 .flags = IORESOURCE_IRQ,
48 static struct platform_device omap_cam_device = {
49 .name = "omap24xxcam",
51 .num_resources = ARRAY_SIZE(cam_resources),
52 .resource = cam_resources,
55 static inline void omap_init_camera(void)
57 platform_device_register(&omap_cam_device);
60 #elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
62 static struct resource omap3isp_resources[] = {
64 .start = OMAP3430_ISP_BASE,
65 .end = OMAP3430_ISP_END,
66 .flags = IORESOURCE_MEM,
69 .start = OMAP3430_ISP_CBUFF_BASE,
70 .end = OMAP3430_ISP_CBUFF_END,
71 .flags = IORESOURCE_MEM,
74 .start = OMAP3430_ISP_CCP2_BASE,
75 .end = OMAP3430_ISP_CCP2_END,
76 .flags = IORESOURCE_MEM,
79 .start = OMAP3430_ISP_CCDC_BASE,
80 .end = OMAP3430_ISP_CCDC_END,
81 .flags = IORESOURCE_MEM,
84 .start = OMAP3430_ISP_HIST_BASE,
85 .end = OMAP3430_ISP_HIST_END,
86 .flags = IORESOURCE_MEM,
89 .start = OMAP3430_ISP_H3A_BASE,
90 .end = OMAP3430_ISP_H3A_END,
91 .flags = IORESOURCE_MEM,
94 .start = OMAP3430_ISP_PREV_BASE,
95 .end = OMAP3430_ISP_PREV_END,
96 .flags = IORESOURCE_MEM,
99 .start = OMAP3430_ISP_RESZ_BASE,
100 .end = OMAP3430_ISP_RESZ_END,
101 .flags = IORESOURCE_MEM,
104 .start = OMAP3430_ISP_SBL_BASE,
105 .end = OMAP3430_ISP_SBL_END,
106 .flags = IORESOURCE_MEM,
109 .start = OMAP3430_ISP_CSI2A_BASE,
110 .end = OMAP3430_ISP_CSI2A_END,
111 .flags = IORESOURCE_MEM,
114 .start = OMAP3430_ISP_CSI2PHY_BASE,
115 .end = OMAP3430_ISP_CSI2PHY_END,
116 .flags = IORESOURCE_MEM,
119 .start = INT_34XX_CAM_IRQ,
120 .flags = IORESOURCE_IRQ,
124 static struct platform_device omap3isp_device = {
127 .num_resources = ARRAY_SIZE(omap3isp_resources),
128 .resource = omap3isp_resources,
131 static inline void omap_init_camera(void)
133 platform_device_register(&omap3isp_device);
136 static inline void omap_init_camera(void)
141 #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
143 #define MBOX_REG_SIZE 0x120
145 #ifdef CONFIG_ARCH_OMAP2
146 static struct resource omap2_mbox_resources[] = {
148 .start = OMAP24XX_MAILBOX_BASE,
149 .end = OMAP24XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
150 .flags = IORESOURCE_MEM,
153 .start = INT_24XX_MAIL_U0_MPU,
154 .flags = IORESOURCE_IRQ,
157 .start = INT_24XX_MAIL_U3_MPU,
158 .flags = IORESOURCE_IRQ,
161 static int omap2_mbox_resources_sz = ARRAY_SIZE(omap2_mbox_resources);
163 #define omap2_mbox_resources NULL
164 #define omap2_mbox_resources_sz 0
167 #ifdef CONFIG_ARCH_OMAP3
168 static struct resource omap3_mbox_resources[] = {
170 .start = OMAP34XX_MAILBOX_BASE,
171 .end = OMAP34XX_MAILBOX_BASE + MBOX_REG_SIZE - 1,
172 .flags = IORESOURCE_MEM,
175 .start = INT_24XX_MAIL_U0_MPU,
176 .flags = IORESOURCE_IRQ,
179 static int omap3_mbox_resources_sz = ARRAY_SIZE(omap3_mbox_resources);
181 #define omap3_mbox_resources NULL
182 #define omap3_mbox_resources_sz 0
185 #ifdef CONFIG_ARCH_OMAP4
187 #define OMAP4_MBOX_REG_SIZE 0x130
188 static struct resource omap4_mbox_resources[] = {
190 .start = OMAP44XX_MAILBOX_BASE,
191 .end = OMAP44XX_MAILBOX_BASE +
192 OMAP4_MBOX_REG_SIZE - 1,
193 .flags = IORESOURCE_MEM,
196 .start = OMAP44XX_IRQ_MAIL_U0,
197 .flags = IORESOURCE_IRQ,
200 static int omap4_mbox_resources_sz = ARRAY_SIZE(omap4_mbox_resources);
202 #define omap4_mbox_resources NULL
203 #define omap4_mbox_resources_sz 0
206 static struct platform_device mbox_device = {
207 .name = "omap2-mailbox",
211 static inline void omap_init_mbox(void)
213 if (cpu_is_omap24xx()) {
214 mbox_device.resource = omap2_mbox_resources;
215 mbox_device.num_resources = omap2_mbox_resources_sz;
216 } else if (cpu_is_omap34xx()) {
217 mbox_device.resource = omap3_mbox_resources;
218 mbox_device.num_resources = omap3_mbox_resources_sz;
219 } else if (cpu_is_omap44xx()) {
220 mbox_device.resource = omap4_mbox_resources;
221 mbox_device.num_resources = omap4_mbox_resources_sz;
223 pr_err("%s: platform not supported\n", __func__);
226 platform_device_register(&mbox_device);
229 static inline void omap_init_mbox(void) { }
230 #endif /* CONFIG_OMAP_MBOX_FWK */
232 static inline void omap_init_sti(void) {}
234 #if defined(CONFIG_SPI_OMAP24XX) || defined(CONFIG_SPI_OMAP24XX_MODULE)
236 #include <plat/mcspi.h>
238 #define OMAP2_MCSPI1_BASE 0x48098000
239 #define OMAP2_MCSPI2_BASE 0x4809a000
240 #define OMAP2_MCSPI3_BASE 0x480b8000
241 #define OMAP2_MCSPI4_BASE 0x480ba000
243 #define OMAP4_MCSPI1_BASE 0x48098100
244 #define OMAP4_MCSPI2_BASE 0x4809a100
245 #define OMAP4_MCSPI3_BASE 0x480b8100
246 #define OMAP4_MCSPI4_BASE 0x480ba100
248 static struct omap2_mcspi_platform_config omap2_mcspi1_config = {
252 static struct resource omap2_mcspi1_resources[] = {
254 .start = OMAP2_MCSPI1_BASE,
255 .end = OMAP2_MCSPI1_BASE + 0xff,
256 .flags = IORESOURCE_MEM,
260 static struct platform_device omap2_mcspi1 = {
261 .name = "omap2_mcspi",
263 .num_resources = ARRAY_SIZE(omap2_mcspi1_resources),
264 .resource = omap2_mcspi1_resources,
266 .platform_data = &omap2_mcspi1_config,
270 static struct omap2_mcspi_platform_config omap2_mcspi2_config = {
274 static struct resource omap2_mcspi2_resources[] = {
276 .start = OMAP2_MCSPI2_BASE,
277 .end = OMAP2_MCSPI2_BASE + 0xff,
278 .flags = IORESOURCE_MEM,
282 static struct platform_device omap2_mcspi2 = {
283 .name = "omap2_mcspi",
285 .num_resources = ARRAY_SIZE(omap2_mcspi2_resources),
286 .resource = omap2_mcspi2_resources,
288 .platform_data = &omap2_mcspi2_config,
292 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
293 defined(CONFIG_ARCH_OMAP4)
294 static struct omap2_mcspi_platform_config omap2_mcspi3_config = {
298 static struct resource omap2_mcspi3_resources[] = {
300 .start = OMAP2_MCSPI3_BASE,
301 .end = OMAP2_MCSPI3_BASE + 0xff,
302 .flags = IORESOURCE_MEM,
306 static struct platform_device omap2_mcspi3 = {
307 .name = "omap2_mcspi",
309 .num_resources = ARRAY_SIZE(omap2_mcspi3_resources),
310 .resource = omap2_mcspi3_resources,
312 .platform_data = &omap2_mcspi3_config,
317 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
318 static struct omap2_mcspi_platform_config omap2_mcspi4_config = {
322 static struct resource omap2_mcspi4_resources[] = {
324 .start = OMAP2_MCSPI4_BASE,
325 .end = OMAP2_MCSPI4_BASE + 0xff,
326 .flags = IORESOURCE_MEM,
330 static struct platform_device omap2_mcspi4 = {
331 .name = "omap2_mcspi",
333 .num_resources = ARRAY_SIZE(omap2_mcspi4_resources),
334 .resource = omap2_mcspi4_resources,
336 .platform_data = &omap2_mcspi4_config,
341 #ifdef CONFIG_ARCH_OMAP4
342 static inline void omap4_mcspi_fixup(void)
344 omap2_mcspi1_resources[0].start = OMAP4_MCSPI1_BASE;
345 omap2_mcspi1_resources[0].end = OMAP4_MCSPI1_BASE + 0xff;
346 omap2_mcspi2_resources[0].start = OMAP4_MCSPI2_BASE;
347 omap2_mcspi2_resources[0].end = OMAP4_MCSPI2_BASE + 0xff;
348 omap2_mcspi3_resources[0].start = OMAP4_MCSPI3_BASE;
349 omap2_mcspi3_resources[0].end = OMAP4_MCSPI3_BASE + 0xff;
350 omap2_mcspi4_resources[0].start = OMAP4_MCSPI4_BASE;
351 omap2_mcspi4_resources[0].end = OMAP4_MCSPI4_BASE + 0xff;
354 static inline void omap4_mcspi_fixup(void)
359 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3) || \
360 defined(CONFIG_ARCH_OMAP4)
361 static inline void omap2_mcspi3_init(void)
363 platform_device_register(&omap2_mcspi3);
366 static inline void omap2_mcspi3_init(void)
371 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
372 static inline void omap2_mcspi4_init(void)
374 platform_device_register(&omap2_mcspi4);
377 static inline void omap2_mcspi4_init(void)
382 static void omap_init_mcspi(void)
384 if (cpu_is_omap44xx())
387 platform_device_register(&omap2_mcspi1);
388 platform_device_register(&omap2_mcspi2);
390 if (cpu_is_omap2430() || cpu_is_omap343x() || cpu_is_omap44xx())
393 if (cpu_is_omap343x() || cpu_is_omap44xx())
398 static inline void omap_init_mcspi(void) {}
401 static struct resource omap2_pmu_resource = {
404 .flags = IORESOURCE_IRQ,
407 static struct resource omap3_pmu_resource = {
408 .start = INT_34XX_BENCH_MPU_EMUL,
409 .end = INT_34XX_BENCH_MPU_EMUL,
410 .flags = IORESOURCE_IRQ,
413 static struct platform_device omap_pmu_device = {
415 .id = ARM_PMU_DEVICE_CPU,
419 static void omap_init_pmu(void)
421 if (cpu_is_omap24xx())
422 omap_pmu_device.resource = &omap2_pmu_resource;
423 else if (cpu_is_omap34xx())
424 omap_pmu_device.resource = &omap3_pmu_resource;
428 platform_device_register(&omap_pmu_device);
432 #if defined(CONFIG_CRYPTO_DEV_OMAP_SHAM) || defined(CONFIG_CRYPTO_DEV_OMAP_SHAM_MODULE)
434 #ifdef CONFIG_ARCH_OMAP2
435 static struct resource omap2_sham_resources[] = {
437 .start = OMAP24XX_SEC_SHA1MD5_BASE,
438 .end = OMAP24XX_SEC_SHA1MD5_BASE + 0x64,
439 .flags = IORESOURCE_MEM,
442 .start = INT_24XX_SHA1MD5,
443 .flags = IORESOURCE_IRQ,
446 static int omap2_sham_resources_sz = ARRAY_SIZE(omap2_sham_resources);
448 #define omap2_sham_resources NULL
449 #define omap2_sham_resources_sz 0
452 #ifdef CONFIG_ARCH_OMAP3
453 static struct resource omap3_sham_resources[] = {
455 .start = OMAP34XX_SEC_SHA1MD5_BASE,
456 .end = OMAP34XX_SEC_SHA1MD5_BASE + 0x64,
457 .flags = IORESOURCE_MEM,
460 .start = INT_34XX_SHA1MD52_IRQ,
461 .flags = IORESOURCE_IRQ,
464 .start = OMAP34XX_DMA_SHA1MD5_RX,
465 .flags = IORESOURCE_DMA,
468 static int omap3_sham_resources_sz = ARRAY_SIZE(omap3_sham_resources);
470 #define omap3_sham_resources NULL
471 #define omap3_sham_resources_sz 0
474 static struct platform_device sham_device = {
479 static void omap_init_sham(void)
481 if (cpu_is_omap24xx()) {
482 sham_device.resource = omap2_sham_resources;
483 sham_device.num_resources = omap2_sham_resources_sz;
484 } else if (cpu_is_omap34xx()) {
485 sham_device.resource = omap3_sham_resources;
486 sham_device.num_resources = omap3_sham_resources_sz;
488 pr_err("%s: platform not supported\n", __func__);
491 platform_device_register(&sham_device);
494 static inline void omap_init_sham(void) { }
497 /*-------------------------------------------------------------------------*/
499 #if defined(CONFIG_ARCH_OMAP3) || defined(CONFIG_ARCH_OMAP4)
501 #define MMCHS_SYSCONFIG 0x0010
502 #define MMCHS_SYSCONFIG_SWRESET (1 << 1)
503 #define MMCHS_SYSSTATUS 0x0014
504 #define MMCHS_SYSSTATUS_RESETDONE (1 << 0)
506 static struct platform_device dummy_pdev = {
508 .bus = &platform_bus_type,
513 * omap_hsmmc_reset() - Full reset of each HS-MMC controller
515 * Ensure that each MMC controller is fully reset. Controllers
516 * left in an unknown state (by bootloader) may prevent retention
517 * or OFF-mode. This is especially important in cases where the
518 * MMC driver is not enabled, _or_ built as a module.
520 * In order for reset to work, interface, functional and debounce
521 * clocks must be enabled. The debounce clock comes from func_32k_clk
522 * and is not under SW control, so we only enable i- and f-clocks.
524 static void __init omap_hsmmc_reset(void)
526 u32 i, nr_controllers;
528 if (cpu_is_omap242x())
531 nr_controllers = cpu_is_omap44xx() ? OMAP44XX_NR_MMC :
532 (cpu_is_omap34xx() ? OMAP34XX_NR_MMC : OMAP24XX_NR_MMC);
534 for (i = 0; i < nr_controllers; i++) {
536 struct clk *iclk, *fclk;
537 struct device *dev = &dummy_pdev.dev;
541 base = OMAP2_MMC1_BASE;
544 base = OMAP2_MMC2_BASE;
547 base = OMAP3_MMC3_BASE;
550 if (!cpu_is_omap44xx())
552 base = OMAP4_MMC4_BASE;
555 if (!cpu_is_omap44xx())
557 base = OMAP4_MMC5_BASE;
561 if (cpu_is_omap44xx())
562 base += OMAP4_MMC_REG_OFFSET;
565 dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i);
566 iclk = clk_get(dev, "ick");
567 if (iclk && clk_enable(iclk))
570 fclk = clk_get(dev, "fck");
571 if (fclk && clk_enable(fclk))
574 if (!iclk || !fclk) {
576 "%s: Unable to enable clocks for MMC%d, "
577 "cannot reset.\n", __func__, i);
581 omap_writel(MMCHS_SYSCONFIG_SWRESET, base + MMCHS_SYSCONFIG);
582 v = omap_readl(base + MMCHS_SYSSTATUS);
583 while (!(omap_readl(base + MMCHS_SYSSTATUS) &
584 MMCHS_SYSSTATUS_RESETDONE))
598 static inline void omap_hsmmc_reset(void) {}
601 #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) || \
602 defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
604 static inline void omap2_mmc_mux(struct omap_mmc_platform_data *mmc_controller,
607 if ((mmc_controller->slots[0].switch_pin > 0) && \
608 (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES))
609 omap_mux_init_gpio(mmc_controller->slots[0].switch_pin,
610 OMAP_PIN_INPUT_PULLUP);
611 if ((mmc_controller->slots[0].gpio_wp > 0) && \
612 (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES))
613 omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp,
614 OMAP_PIN_INPUT_PULLUP);
616 if (cpu_is_omap2420() && controller_nr == 0) {
617 omap_mux_init_signal("sdmmc_cmd", 0);
618 omap_mux_init_signal("sdmmc_clki", 0);
619 omap_mux_init_signal("sdmmc_clko", 0);
620 omap_mux_init_signal("sdmmc_dat0", 0);
621 omap_mux_init_signal("sdmmc_dat_dir0", 0);
622 omap_mux_init_signal("sdmmc_cmd_dir", 0);
623 if (mmc_controller->slots[0].wires == 4) {
624 omap_mux_init_signal("sdmmc_dat1", 0);
625 omap_mux_init_signal("sdmmc_dat2", 0);
626 omap_mux_init_signal("sdmmc_dat3", 0);
627 omap_mux_init_signal("sdmmc_dat_dir1", 0);
628 omap_mux_init_signal("sdmmc_dat_dir2", 0);
629 omap_mux_init_signal("sdmmc_dat_dir3", 0);
633 * Use internal loop-back in MMC/SDIO Module Input Clock
636 if (mmc_controller->slots[0].internal_clock) {
637 u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0);
639 omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0);
643 if (cpu_is_omap34xx()) {
644 if (controller_nr == 0) {
645 omap_mux_init_signal("sdmmc1_clk",
646 OMAP_PIN_INPUT_PULLUP);
647 omap_mux_init_signal("sdmmc1_cmd",
648 OMAP_PIN_INPUT_PULLUP);
649 omap_mux_init_signal("sdmmc1_dat0",
650 OMAP_PIN_INPUT_PULLUP);
651 if (mmc_controller->slots[0].wires == 4 ||
652 mmc_controller->slots[0].wires == 8) {
653 omap_mux_init_signal("sdmmc1_dat1",
654 OMAP_PIN_INPUT_PULLUP);
655 omap_mux_init_signal("sdmmc1_dat2",
656 OMAP_PIN_INPUT_PULLUP);
657 omap_mux_init_signal("sdmmc1_dat3",
658 OMAP_PIN_INPUT_PULLUP);
660 if (mmc_controller->slots[0].wires == 8) {
661 omap_mux_init_signal("sdmmc1_dat4",
662 OMAP_PIN_INPUT_PULLUP);
663 omap_mux_init_signal("sdmmc1_dat5",
664 OMAP_PIN_INPUT_PULLUP);
665 omap_mux_init_signal("sdmmc1_dat6",
666 OMAP_PIN_INPUT_PULLUP);
667 omap_mux_init_signal("sdmmc1_dat7",
668 OMAP_PIN_INPUT_PULLUP);
671 if (controller_nr == 1) {
673 omap_mux_init_signal("sdmmc2_clk",
674 OMAP_PIN_INPUT_PULLUP);
675 omap_mux_init_signal("sdmmc2_cmd",
676 OMAP_PIN_INPUT_PULLUP);
677 omap_mux_init_signal("sdmmc2_dat0",
678 OMAP_PIN_INPUT_PULLUP);
681 * For 8 wire configurations, Lines DAT4, 5, 6 and 7 need to be muxed
682 * in the board-*.c files
684 if (mmc_controller->slots[0].wires == 4 ||
685 mmc_controller->slots[0].wires == 8) {
686 omap_mux_init_signal("sdmmc2_dat1",
687 OMAP_PIN_INPUT_PULLUP);
688 omap_mux_init_signal("sdmmc2_dat2",
689 OMAP_PIN_INPUT_PULLUP);
690 omap_mux_init_signal("sdmmc2_dat3",
691 OMAP_PIN_INPUT_PULLUP);
693 if (mmc_controller->slots[0].wires == 8) {
694 omap_mux_init_signal("sdmmc2_dat4.sdmmc2_dat4",
695 OMAP_PIN_INPUT_PULLUP);
696 omap_mux_init_signal("sdmmc2_dat5.sdmmc2_dat5",
697 OMAP_PIN_INPUT_PULLUP);
698 omap_mux_init_signal("sdmmc2_dat6.sdmmc2_dat6",
699 OMAP_PIN_INPUT_PULLUP);
700 omap_mux_init_signal("sdmmc2_dat7.sdmmc2_dat7",
701 OMAP_PIN_INPUT_PULLUP);
706 * For MMC3 the pins need to be muxed in the board-*.c files
711 void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
717 for (i = 0; i < nr_controllers; i++) {
718 unsigned long base, size;
719 unsigned int irq = 0;
724 omap2_mmc_mux(mmc_data[i], i);
728 base = OMAP2_MMC1_BASE;
729 irq = INT_24XX_MMC_IRQ;
732 base = OMAP2_MMC2_BASE;
733 irq = INT_24XX_MMC2_IRQ;
736 if (!cpu_is_omap44xx() && !cpu_is_omap34xx())
738 base = OMAP3_MMC3_BASE;
739 irq = INT_34XX_MMC3_IRQ;
742 if (!cpu_is_omap44xx())
744 base = OMAP4_MMC4_BASE + OMAP4_MMC_REG_OFFSET;
745 irq = OMAP44XX_IRQ_MMC4;
748 if (!cpu_is_omap44xx())
750 base = OMAP4_MMC5_BASE + OMAP4_MMC_REG_OFFSET;
751 irq = OMAP44XX_IRQ_MMC5;
757 if (cpu_is_omap2420()) {
758 size = OMAP2420_MMC_SIZE;
760 } else if (cpu_is_omap44xx()) {
762 base += OMAP4_MMC_REG_OFFSET;
763 irq += OMAP44XX_IRQ_GIC_START;
765 size = OMAP4_HSMMC_SIZE;
766 name = "mmci-omap-hs";
768 size = OMAP3_HSMMC_SIZE;
769 name = "mmci-omap-hs";
771 omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
777 /*-------------------------------------------------------------------------*/
779 #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE)
780 #if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP3430)
781 #define OMAP_HDQ_BASE 0x480B2000
783 static struct resource omap_hdq_resources[] = {
785 .start = OMAP_HDQ_BASE,
786 .end = OMAP_HDQ_BASE + 0x1C,
787 .flags = IORESOURCE_MEM,
790 .start = INT_24XX_HDQ_IRQ,
791 .flags = IORESOURCE_IRQ,
794 static struct platform_device omap_hdq_dev = {
798 .platform_data = NULL,
800 .num_resources = ARRAY_SIZE(omap_hdq_resources),
801 .resource = omap_hdq_resources,
803 static inline void omap_hdq_init(void)
805 (void) platform_device_register(&omap_hdq_dev);
808 static inline void omap_hdq_init(void) {}
811 /*---------------------------------------------------------------------------*/
813 #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \
814 defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE)
815 #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
816 static struct resource omap_vout_resource[3 - CONFIG_FB_OMAP2_NUM_FBS] = {
819 static struct resource omap_vout_resource[2] = {
823 static struct platform_device omap_vout_device = {
825 .num_resources = ARRAY_SIZE(omap_vout_resource),
826 .resource = &omap_vout_resource[0],
829 static void omap_init_vout(void)
831 if (platform_device_register(&omap_vout_device) < 0)
832 printk(KERN_ERR "Unable to register OMAP-VOUT device\n");
835 static inline void omap_init_vout(void) {}
838 /*-------------------------------------------------------------------------*/
840 static int __init omap2_init_devices(void)
842 /* please keep these calls, and their implementations above,
843 * in alphabetical order so they're easier to sort through.
857 arch_initcall(omap2_init_devices);