diff options
Diffstat (limited to 'arch/arm/mach-omap2/devices.c')
-rw-r--r-- | arch/arm/mach-omap2/devices.c | 112 |
1 files changed, 2 insertions, 110 deletions
diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 7b4b9327e54..c00c68961bb 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c | |||
@@ -27,7 +27,6 @@ | |||
27 | 27 | ||
28 | #include "iomap.h" | 28 | #include "iomap.h" |
29 | #include <plat/board.h> | 29 | #include <plat/board.h> |
30 | #include <plat/mmc.h> | ||
31 | #include <plat/dma.h> | 30 | #include <plat/dma.h> |
32 | #include <plat/omap_hwmod.h> | 31 | #include <plat/omap_hwmod.h> |
33 | #include <plat/omap_device.h> | 32 | #include <plat/omap_device.h> |
@@ -84,7 +83,7 @@ static int __init omap4_l3_init(void) | |||
84 | * To avoid code running on other OMAPs in | 83 | * To avoid code running on other OMAPs in |
85 | * multi-omap builds | 84 | * multi-omap builds |
86 | */ | 85 | */ |
87 | if (!(cpu_is_omap44xx())) | 86 | if (!cpu_is_omap44xx() && !soc_is_omap54xx()) |
88 | return -ENODEV; | 87 | return -ENODEV; |
89 | 88 | ||
90 | for (i = 0; i < L3_MODULES; i++) { | 89 | for (i = 0; i < L3_MODULES; i++) { |
@@ -603,112 +602,6 @@ static inline void omap_init_aes(void) { } | |||
603 | 602 | ||
604 | /*-------------------------------------------------------------------------*/ | 603 | /*-------------------------------------------------------------------------*/ |
605 | 604 | ||
606 | #if defined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) | ||
607 | |||
608 | static inline void omap242x_mmc_mux(struct omap_mmc_platform_data | ||
609 | *mmc_controller) | ||
610 | { | ||
611 | if ((mmc_controller->slots[0].switch_pin > 0) && \ | ||
612 | (mmc_controller->slots[0].switch_pin < OMAP_MAX_GPIO_LINES)) | ||
613 | omap_mux_init_gpio(mmc_controller->slots[0].switch_pin, | ||
614 | OMAP_PIN_INPUT_PULLUP); | ||
615 | if ((mmc_controller->slots[0].gpio_wp > 0) && \ | ||
616 | (mmc_controller->slots[0].gpio_wp < OMAP_MAX_GPIO_LINES)) | ||
617 | omap_mux_init_gpio(mmc_controller->slots[0].gpio_wp, | ||
618 | OMAP_PIN_INPUT_PULLUP); | ||
619 | |||
620 | omap_mux_init_signal("sdmmc_cmd", 0); | ||
621 | omap_mux_init_signal("sdmmc_clki", 0); | ||
622 | omap_mux_init_signal("sdmmc_clko", 0); | ||
623 | omap_mux_init_signal("sdmmc_dat0", 0); | ||
624 | omap_mux_init_signal("sdmmc_dat_dir0", 0); | ||
625 | omap_mux_init_signal("sdmmc_cmd_dir", 0); | ||
626 | if (mmc_controller->slots[0].caps & MMC_CAP_4_BIT_DATA) { | ||
627 | omap_mux_init_signal("sdmmc_dat1", 0); | ||
628 | omap_mux_init_signal("sdmmc_dat2", 0); | ||
629 | omap_mux_init_signal("sdmmc_dat3", 0); | ||
630 | omap_mux_init_signal("sdmmc_dat_dir1", 0); | ||
631 | omap_mux_init_signal("sdmmc_dat_dir2", 0); | ||
632 | omap_mux_init_signal("sdmmc_dat_dir3", 0); | ||
633 | } | ||
634 | |||
635 | /* | ||
636 | * Use internal loop-back in MMC/SDIO Module Input Clock | ||
637 | * selection | ||
638 | */ | ||
639 | if (mmc_controller->slots[0].internal_clock) { | ||
640 | u32 v = omap_ctrl_readl(OMAP2_CONTROL_DEVCONF0); | ||
641 | v |= (1 << 24); | ||
642 | omap_ctrl_writel(v, OMAP2_CONTROL_DEVCONF0); | ||
643 | } | ||
644 | } | ||
645 | |||
646 | void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data) | ||
647 | { | ||
648 | struct platform_device *pdev; | ||
649 | struct omap_hwmod *oh; | ||
650 | int id = 0; | ||
651 | char *oh_name = "msdi1"; | ||
652 | char *dev_name = "mmci-omap"; | ||
653 | |||
654 | if (!mmc_data[0]) { | ||
655 | pr_err("%s fails: Incomplete platform data\n", __func__); | ||
656 | return; | ||
657 | } | ||
658 | |||
659 | omap242x_mmc_mux(mmc_data[0]); | ||
660 | |||
661 | oh = omap_hwmod_lookup(oh_name); | ||
662 | if (!oh) { | ||
663 | pr_err("Could not look up %s\n", oh_name); | ||
664 | return; | ||
665 | } | ||
666 | pdev = omap_device_build(dev_name, id, oh, mmc_data[0], | ||
667 | sizeof(struct omap_mmc_platform_data), NULL, 0, 0); | ||
668 | if (IS_ERR(pdev)) | ||
669 | WARN(1, "Can'd build omap_device for %s:%s.\n", | ||
670 | dev_name, oh->name); | ||
671 | } | ||
672 | |||
673 | #endif | ||
674 | |||
675 | /*-------------------------------------------------------------------------*/ | ||
676 | |||
677 | #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE) | ||
678 | #define OMAP_HDQ_BASE 0x480B2000 | ||
679 | static struct resource omap_hdq_resources[] = { | ||
680 | { | ||
681 | .start = OMAP_HDQ_BASE, | ||
682 | .end = OMAP_HDQ_BASE + 0x1C, | ||
683 | .flags = IORESOURCE_MEM, | ||
684 | }, | ||
685 | { | ||
686 | .start = INT_24XX_HDQ_IRQ, | ||
687 | .flags = IORESOURCE_IRQ, | ||
688 | }, | ||
689 | }; | ||
690 | static struct platform_device omap_hdq_dev = { | ||
691 | .name = "omap_hdq", | ||
692 | .id = 0, | ||
693 | .dev = { | ||
694 | .platform_data = NULL, | ||
695 | }, | ||
696 | .num_resources = ARRAY_SIZE(omap_hdq_resources), | ||
697 | .resource = omap_hdq_resources, | ||
698 | }; | ||
699 | static inline void omap_hdq_init(void) | ||
700 | { | ||
701 | if (cpu_is_omap2420()) | ||
702 | return; | ||
703 | |||
704 | platform_device_register(&omap_hdq_dev); | ||
705 | } | ||
706 | #else | ||
707 | static inline void omap_hdq_init(void) {} | ||
708 | #endif | ||
709 | |||
710 | /*---------------------------------------------------------------------------*/ | ||
711 | |||
712 | #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \ | 605 | #if defined(CONFIG_VIDEO_OMAP2_VOUT) || \ |
713 | defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE) | 606 | defined(CONFIG_VIDEO_OMAP2_VOUT_MODULE) |
714 | #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) | 607 | #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) |
@@ -753,7 +646,6 @@ static int __init omap2_init_devices(void) | |||
753 | omap_init_mcspi(); | 646 | omap_init_mcspi(); |
754 | } | 647 | } |
755 | omap_init_pmu(); | 648 | omap_init_pmu(); |
756 | omap_hdq_init(); | ||
757 | omap_init_sti(); | 649 | omap_init_sti(); |
758 | omap_init_sham(); | 650 | omap_init_sham(); |
759 | omap_init_aes(); | 651 | omap_init_aes(); |
@@ -772,7 +664,7 @@ static int __init omap_init_wdt(void) | |||
772 | char *oh_name = "wd_timer2"; | 664 | char *oh_name = "wd_timer2"; |
773 | char *dev_name = "omap_wdt"; | 665 | char *dev_name = "omap_wdt"; |
774 | 666 | ||
775 | if (!cpu_class_is_omap2()) | 667 | if (!cpu_class_is_omap2() || of_have_populated_dt()) |
776 | return 0; | 668 | return 0; |
777 | 669 | ||
778 | oh = omap_hwmod_lookup(oh_name); | 670 | oh = omap_hwmod_lookup(oh_name); |