]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/devices.c
REMOVE OMAP LEGACY CODE: Reset clocks and PM code to mainline
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / devices.c
index d7e848e80bf6b27e828a87f84b61f8bd8a775ca0..3d4482c996c42e5df27a4aae26dded9d26cbb886 100644 (file)
@@ -56,10 +56,60 @@ static inline void omap_init_camera(void)
 
 #elif defined(CONFIG_VIDEO_OMAP3) || defined(CONFIG_VIDEO_OMAP3_MODULE)
 
-static struct resource cam_resources[] = {
+static struct resource omap3isp_resources[] = {
+       {
+               .start          = OMAP3430_ISP_BASE,
+               .end            = OMAP3430_ISP_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_CBUFF_BASE,
+               .end            = OMAP3430_ISP_CBUFF_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_CCP2_BASE,
+               .end            = OMAP3430_ISP_CCP2_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_CCDC_BASE,
+               .end            = OMAP3430_ISP_CCDC_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_HIST_BASE,
+               .end            = OMAP3430_ISP_HIST_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_H3A_BASE,
+               .end            = OMAP3430_ISP_H3A_END,
+               .flags          = IORESOURCE_MEM,
+       },
        {
-               .start          = OMAP34XX_CAMERA_BASE,
-               .end            = OMAP34XX_CAMERA_BASE + 0x1B70,
+               .start          = OMAP3430_ISP_PREV_BASE,
+               .end            = OMAP3430_ISP_PREV_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_RESZ_BASE,
+               .end            = OMAP3430_ISP_RESZ_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_SBL_BASE,
+               .end            = OMAP3430_ISP_SBL_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_CSI2A_BASE,
+               .end            = OMAP3430_ISP_CSI2A_END,
+               .flags          = IORESOURCE_MEM,
+       },
+       {
+               .start          = OMAP3430_ISP_CSI2PHY_BASE,
+               .end            = OMAP3430_ISP_CSI2PHY_END,
                .flags          = IORESOURCE_MEM,
        },
        {
@@ -68,16 +118,16 @@ static struct resource cam_resources[] = {
        }
 };
 
-static struct platform_device omap_cam_device = {
-       .name           = "omap34xxcam",
+static struct platform_device omap3isp_device = {
+       .name           = "omap3isp",
        .id             = -1,
-       .num_resources  = ARRAY_SIZE(cam_resources),
-       .resource       = cam_resources,
+       .num_resources  = ARRAY_SIZE(omap3isp_resources),
+       .resource       = omap3isp_resources,
 };
 
 static inline void omap_init_camera(void)
 {
-       platform_device_register(&omap_cam_device);
+       platform_device_register(&omap3isp_device);
 }
 #else
 static inline void omap_init_camera(void)
@@ -131,6 +181,7 @@ static inline void omap_init_mbox(void)
                mbox_device.num_resources = ARRAY_SIZE(omap3_mbox_resources);
                mbox_device.resource = omap3_mbox_resources;
        } else {
+               pr_err("%s: platform not supported\n", __func__);
                return;
        }
        platform_device_register(&mbox_device);
@@ -427,11 +478,12 @@ static void __init omap_hsmmc_reset(void)
                }
 
                dummy_pdev.id = i;
-               iclk = clk_get(dev, "mmchs_ick");
+               dev_set_name(&dummy_pdev.dev, "mmci-omap-hs.%d", i);
+               iclk = clk_get(dev, "ick");
                if (iclk && clk_enable(iclk))
                        iclk = NULL;
 
-               fclk = clk_get(dev, "mmchs_fck");
+               fclk = clk_get(dev, "fck");
                if (fclk && clk_enable(fclk))
                        fclk = NULL;
 
@@ -500,6 +552,7 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
                        int nr_controllers)
 {
        int i;
+       char *name;
 
        for (i = 0; i < nr_controllers; i++) {
                unsigned long base, size;
@@ -529,12 +582,14 @@ void __init omap2_init_mmc(struct omap_mmc_platform_data **mmc_data,
                        continue;
                }
 
-               if (cpu_is_omap2420())
+               if (cpu_is_omap2420()) {
                        size = OMAP2420_MMC_SIZE;
-               else
+                       name = "mmci-omap";
+               } else {
                        size = HSMMC_SIZE;
-
-               omap_mmc_add(i, base, size, irq, mmc_data[i]);
+                       name = "mmci-omap-hs";
+               }
+               omap_mmc_add(name, i, base, size, irq, mmc_data[i]);
        };
 }