Merge branch 'fixes-non-critical' into next/drivers2
authorOlof Johansson <olof@lixom.net>
Wed, 28 Mar 2012 04:21:44 +0000 (21:21 -0700)
committerOlof Johansson <olof@lixom.net>
Wed, 28 Mar 2012 04:24:03 +0000 (21:24 -0700)
fixes-non-critical has already been merged upstream, and there are a
handful of annoying context conflicts that it makes sense to resolve
before sending up. Part of this is because there was parallel development
going on between more urgent fixes and general driver fixups, it should
settle down once the lpc32xx platform reaches a more steady state.

Conflicts:
arch/arm/mach-lpc32xx/clock.c
arch/arm/mach-lpc32xx/common.h

Signed-off-by: Olof Johansson <olof@lixom.net>
82 files changed:
arch/arm/Kconfig
arch/arm/configs/imx_v4_v5_defconfig
arch/arm/mach-davinci/cpufreq.c
arch/arm/mach-davinci/da850.c
arch/arm/mach-davinci/dma.c
arch/arm/mach-davinci/include/mach/edma.h
arch/arm/mach-imx/mach-pcm038.c
arch/arm/mach-imx/mm-imx3.c
arch/arm/mach-lpc32xx/clock.c
arch/arm/mach-lpc32xx/common.h
arch/arm/mach-omap1/io.c
arch/arm/mach-omap1/lcd_dma.c
arch/arm/mach-omap2/Makefile
arch/arm/mach-omap2/board-2430sdp.c
arch/arm/mach-omap2/board-3430sdp.c
arch/arm/mach-omap2/board-4430sdp.c
arch/arm/mach-omap2/board-am3517evm.c
arch/arm/mach-omap2/board-cm-t35.c
arch/arm/mach-omap2/board-devkit8000.c
arch/arm/mach-omap2/board-flash.c
arch/arm/mach-omap2/board-igep0020.c
arch/arm/mach-omap2/board-ldp.c
arch/arm/mach-omap2/board-n8x0.c
arch/arm/mach-omap2/board-omap3beagle.c
arch/arm/mach-omap2/board-omap3evm.c
arch/arm/mach-omap2/board-omap3logic.c
arch/arm/mach-omap2/board-omap3pandora.c
arch/arm/mach-omap2/board-omap3stalker.c
arch/arm/mach-omap2/board-omap3touchbook.c
arch/arm/mach-omap2/board-omap4panda.c
arch/arm/mach-omap2/board-overo.c
arch/arm/mach-omap2/board-rm680.c
arch/arm/mach-omap2/board-rx51-peripherals.c
arch/arm/mach-omap2/board-zoom-peripherals.c
arch/arm/mach-omap2/clkt_clksel.c
arch/arm/mach-omap2/common-board-devices.c
arch/arm/mach-omap2/control.h
arch/arm/mach-omap2/devices.c
arch/arm/mach-omap2/display.c
arch/arm/mach-omap2/dma.c
arch/arm/mach-omap2/gpio.c
arch/arm/mach-omap2/gpmc-smsc911x.c
arch/arm/mach-omap2/gpmc.c
arch/arm/mach-omap2/hsmmc.c
arch/arm/mach-omap2/hsmmc.h
arch/arm/mach-omap2/id.c
arch/arm/mach-omap2/io.c
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/omap-hotplug.c
arch/arm/mach-omap2/omap-mpuss-lowpower.c
arch/arm/mach-omap2/omap-wakeupgen.c
arch/arm/mach-omap2/omap_hwmod_44xx_data.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/powerdomain-common.c
arch/arm/mach-omap2/powerdomain2xxx_3xxx.c
arch/arm/mach-omap2/powerdomain44xx.c
arch/arm/mach-omap2/powerdomains3xxx_data.c
arch/arm/mach-omap2/sr_device.c
arch/arm/mach-omap2/vc.c
arch/arm/mach-omap2/vp.c
arch/arm/mach-ux500/Kconfig
arch/arm/mach-ux500/Makefile
arch/arm/mach-ux500/board-mop500-regulators.c
arch/arm/mach-ux500/board-mop500-u8500uib.c
arch/arm/mach-ux500/board-mop500.c
arch/arm/mach-ux500/board-mop500.h
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/clock.h
arch/arm/mach-ux500/devices-db8500.c
arch/arm/mach-ux500/include/mach/hardware.h
arch/arm/mach-ux500/include/mach/irqs.h
arch/arm/plat-mxc/include/mach/iomux-mx25.h
arch/arm/plat-omap/clock.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/dmtimer.c
arch/arm/plat-omap/include/plat/cpu.h
arch/arm/plat-omap/include/plat/omap_device.h
arch/arm/plat-omap/include/plat/sram.h
arch/arm/plat-omap/mailbox.c
arch/arm/plat-omap/omap_device.c
arch/arm/plat-omap/sram.c

index 97bf5e4437648aa73cdd845f3db94a51ec074420..3b3de99c2d6c57dea3bdfcd689d388d2f486c601 100644 (file)
@@ -901,6 +901,7 @@ config ARCH_U300
 
 config ARCH_U8500
        bool "ST-Ericsson U8500 Series"
+       depends on MMU
        select CPU_V7
        select ARM_AMBA
        select GENERIC_CLOCKEVENTS
@@ -1577,7 +1578,7 @@ config LOCAL_TIMERS
 config ARCH_NR_GPIO
        int
        default 1024 if ARCH_SHMOBILE || ARCH_TEGRA
-       default 350 if ARCH_U8500
+       default 355 if ARCH_U8500
        default 0
        help
          Maximum number of GPIOs in the system.
index d9eddfd774285bf0a3a784f954ecb1cdf07fc56c..b5ac644e12af9121985b0eadeecfdefaaf85c33b 100644 (file)
@@ -69,6 +69,7 @@ CONFIG_MTD_CFI=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_MTD_CFI_GEOMETRY=y
 # CONFIG_MTD_MAP_BANK_WIDTH_1 is not set
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
 # CONFIG_MTD_CFI_I2 is not set
 CONFIG_MTD_CFI_INTELEXT=y
 CONFIG_MTD_PHYSMAP=y
index 5bba7070f2714a87ab4f5c4f5cb902c7b7642622..031048fec9f5e2d175707eea2c4ed0d2edd395a2 100644 (file)
@@ -95,7 +95,7 @@ static int davinci_target(struct cpufreq_policy *policy,
        if (freqs.old == freqs.new)
                return ret;
 
-       dev_dbg(&cpufreq.dev, "transition: %u --> %u\n", freqs.old, freqs.new);
+       dev_dbg(cpufreq.dev, "transition: %u --> %u\n", freqs.old, freqs.new);
 
        ret = cpufreq_frequency_table_target(policy, pdata->freq_table,
                                                freqs.new, relation, &idx);
index 992c4c4101856db5f8f503cdd34aa5fbd5196806..b44dc844e15e0c2ce8c404486c75494749dfec51 100644 (file)
@@ -1026,7 +1026,7 @@ static int da850_round_armrate(struct clk *clk, unsigned long rate)
 }
 #endif
 
-int da850_register_pm(struct platform_device *pdev)
+int __init da850_register_pm(struct platform_device *pdev)
 {
        int ret;
        struct davinci_pm_config *pdata = pdev->dev.platform_data;
index da90103a313dc2a7d3b2e7e2f5e99d418cbd02d2..fd33919c95d4ef4a1ae9c7ad3437f52526713730 100644 (file)
@@ -1508,12 +1508,8 @@ static int __init edma_probe(struct platform_device *pdev)
                        goto fail;
                }
 
-               /* Everything lives on transfer controller 1 until otherwise
-                * specified. This way, long transfers on the low priority queue
-                * started by the codec engine will not cause audio defects.
-                */
                for (i = 0; i < edma_cc[j]->num_channels; i++)
-                       map_dmach_queue(j, i, EVENTQ_1);
+                       map_dmach_queue(j, i, info[j]->default_queue);
 
                queue_tc_mapping = info[j]->queue_tc_mapping;
                queue_priority_mapping = info[j]->queue_priority_mapping;
index 20c77f29bf0f3a74c36ca48eb16085d0e87abacb..7e84c906ceff4046aef96e484d9bc0b5dd895711 100644 (file)
@@ -250,6 +250,11 @@ struct edma_soc_info {
        unsigned        n_slot;
        unsigned        n_tc;
        unsigned        n_cc;
+       /*
+        * Default queue is expected to be a low-priority queue.
+        * This way, long transfers on the default queue started
+        * by the codec engine will not cause audio defects.
+        */
        enum dma_event_q        default_queue;
 
        /* Resource reservation for other cores */
index 16f126da9f8f543abf7d175477778b5636bb0a55..2f3debe2a11335f60de6f2913cb4ba9452127567 100644 (file)
@@ -233,7 +233,7 @@ static struct regulator_init_data sdhc1_data = {
 
 static struct regulator_consumer_supply cam_consumers[] = {
        {
-               .dev    = NULL,
+               .dev_name = NULL,
                .supply = "imx_cam_vcc",
        },
 };
index 8404ee72555ac4dda154e27d33b9c6f7804afaab..6222151f55be64d1c1523f28b6790de3679160fa 100644 (file)
@@ -76,7 +76,7 @@ static void __iomem *imx3_ioremap(unsigned long phys_addr, size_t size,
        return __arm_ioremap(phys_addr, size, mtype);
 }
 
-void imx3_init_l2x0(void)
+void __init imx3_init_l2x0(void)
 {
        void __iomem *l2x0_base;
        void __iomem *clkctl_base;
index 47639f31ba3805832737cc99b2eb1e678f10b1c4..b7ef51119d37580839f9773431f69c4282bdbae0 100644 (file)
@@ -1129,12 +1129,12 @@ static struct clk_lookup lookups[] = {
        _REGISTER_CLOCK("dev:ssp1", NULL, clk_ssp1)
        _REGISTER_CLOCK("lpc32xx_keys.0", NULL, clk_kscan)
        _REGISTER_CLOCK("lpc32xx-nand.0", "nand_ck", clk_nand)
+       _REGISTER_CLOCK("lpc32xx-adc", NULL, clk_adc)
        _REGISTER_CLOCK(NULL, "i2s0_ck", clk_i2s0)
        _REGISTER_CLOCK(NULL, "i2s1_ck", clk_i2s1)
-       _REGISTER_CLOCK("lpc32xx-adc", NULL, clk_adc)
        _REGISTER_CLOCK("ts-lpc32xx", NULL, clk_tsc)
        _REGISTER_CLOCK("dev:mmc0", NULL, clk_mmc)
-       _REGISTER_CLOCK("lpc-eth.0", NULL, clk_net)
+       _REGISTER_CLOCK("lpc-net.0", NULL, clk_net)
        _REGISTER_CLOCK("dev:clcd", NULL, clk_lcd)
        _REGISTER_CLOCK("lpc32xx_udc", "ck_usbd", clk_usbd)
        _REGISTER_CLOCK("lpc32xx_rtc", NULL, clk_rtc)
index 23c21905ff89561343fd9e88f4624502f3f369b9..68e45e8c9486139d2906a74622ee1d62f02a2c95 100644 (file)
@@ -69,6 +69,7 @@ extern u32 clk_get_pclk_div(void);
  */
 extern void lpc32xx_get_uid(u32 devid[4]);
 
+extern u32 lpc32xx_return_iram_size(void);
 /*
  * Pointers used for sizing and copying suspend function data
  */
index 8e55b6fb3478becc4c18a02dc976451fcf4adb1e..55a8f582d04c3b7b27c7519d76c99f9fed564401 100644 (file)
@@ -118,7 +118,7 @@ void __init omap16xx_map_io(void)
 /*
  * Common low-level hardware init for omap1.
  */
-void omap1_init_early(void)
+void __init omap1_init_early(void)
 {
        omap_check_revision();
 
index 453809359ba6620e2d96df0e2c7b1dc4ec8c811c..4c5ce7d829c2414d508825e9d1a816713e301420 100644 (file)
@@ -117,7 +117,7 @@ EXPORT_SYMBOL(omap_set_lcd_dma_b1_mirror);
 void omap_set_lcd_dma_b1_vxres(unsigned long vxres)
 {
        if (cpu_is_omap15xx()) {
-               printk(KERN_ERR "DMA virtual resulotion is not supported "
+               printk(KERN_ERR "DMA virtual resolution is not supported "
                                "in 1510 mode\n");
                BUG();
        }
index 56a6e98652cce0cf350385edccf281cc4591c891..f1096172b9bb06de7cd410eb7cfda70c67de31f4 100644 (file)
@@ -265,6 +265,8 @@ obj-y                                       += $(smc91x-m) $(smc91x-y)
 
 smsc911x-$(CONFIG_SMSC911X)            := gpmc-smsc911x.o
 obj-y                                  += $(smsc911x-m) $(smsc911x-y)
-obj-$(CONFIG_ARCH_OMAP4)               += hwspinlock.o
+ifneq ($(CONFIG_HWSPINLOCK_OMAP),)
+obj-y                                  += hwspinlock.o
+endif
 
 obj-y                                  += common-board-devices.o twl-common.o
index 7370983f809fc3994a8722970f2c6f7f1a85f08e..c8bda62900d8dd87d9d383edf305651ae21bd354 100644 (file)
@@ -279,7 +279,7 @@ static void __init omap_2430sdp_init(void)
        platform_add_devices(sdp2430_devices, ARRAY_SIZE(sdp2430_devices));
        omap_serial_init();
        omap_sdrc_init(NULL, NULL);
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_init(mmc);
        omap2_usbfs_init(&sdp2430_usb_config);
 
        omap_mux_init_signal("usb0hs_stp", OMAP_PULL_ENA | OMAP_PULL_UP);
index 383717ba63b9ae7f72bcf3d8999bf371abed4032..da75f239873ece08a66e598bc0f9694ff49fbf8b 100644 (file)
@@ -232,11 +232,13 @@ static struct omap2_hsmmc_info mmc[] = {
                 */
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = 4,
+               .deferred       = true,
        },
        {
                .mmc            = 2,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = 7,
+               .deferred       = true,
        },
        {}      /* Terminator */
 };
@@ -249,7 +251,7 @@ static int sdp3430_twl_gpio_setup(struct device *dev,
         */
        mmc[0].gpio_cd = gpio + 0;
        mmc[1].gpio_cd = gpio + 1;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /* gpio + 7 is "sub_lcd_en_bkl" (output/PWM1) */
        gpio_request_one(gpio + 7, GPIOF_OUT_INIT_LOW, "sub_lcd_en_bkl");
@@ -606,6 +608,7 @@ static void __init omap_3430sdp_init(void)
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap_board_config = sdp3430_config;
        omap_board_config_size = ARRAY_SIZE(sdp3430_config);
+       omap_hsmmc_init(mmc);
        omap3430_i2c_init();
        omap_display_init(&sdp3430_dss_data);
        if (omap_rev() > OMAP3430_REV_ES1_0)
index 4e9071589bfb60ac3bfb5a222eefcfebc700bd03..09ae257e86fd2d470d5ef77781a13ad78b9cbb1d 100644 (file)
@@ -491,9 +491,9 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
 {
        struct omap2_hsmmc_info *c;
 
-       omap2_hsmmc_init(controllers);
+       omap_hsmmc_init(controllers);
        for (c = controllers; c->mmc; c++)
-               omap4_twl6030_hsmmc_set_late_init(c->dev);
+               omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
 
        return 0;
 }
index 4b1cfe32e6baf4b4ab4e6d0eeb41f0c4f4d17ffa..71138a1271d8393a70ec4f501d74a55f99b5aecd 100644 (file)
@@ -504,7 +504,7 @@ static void __init am3517_evm_init(void)
        am3517_evm_musb_init();
 
        /* MMC init function */
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_init(mmc);
 }
 
 MACHINE_START(OMAP3517EVM, "OMAP3517/AM3517 EVM")
index d73316ed4207c600378cb538b73ae0daf04dcb2e..49e64057cb6703466143a26dfb785169782c3397 100644 (file)
@@ -413,7 +413,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
-
+               .deferred       = true,
        },
        {
                .mmc            = 2,
@@ -471,7 +471,7 @@ static int cm_t35_twl_gpio_setup(struct device *dev, unsigned gpio,
 
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        return 0;
 }
@@ -639,6 +639,7 @@ static void __init cm_t3x_common_init(void)
        omap_serial_init();
        omap_sdrc_init(mt46h32m32lf6_sdrc_params,
                             mt46h32m32lf6_sdrc_params);
+       omap_hsmmc_init(mmc);
        cm_t35_init_i2c();
        omap_ads7846_init(1, CM_T35_GPIO_PENDOWN, 0, NULL);
        cm_t35_init_ethernet();
index e873063f4fdaf4cac7fffe5d18ca718a79cb84fe..11cd2a8060939e640c3be752c126fc987b08553b 100644 (file)
@@ -100,6 +100,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .mmc            = 1,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = 29,
+               .deferred       = true,
        },
        {}      /* Terminator */
 };
@@ -228,7 +229,7 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
 
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -636,6 +637,7 @@ static void __init devkit8000_init(void)
 
        omap_dm9000_init();
 
+       omap_hsmmc_init(mmc);
        devkit8000_i2c_init();
        platform_add_devices(devkit8000_devices,
                        ARRAY_SIZE(devkit8000_devices));
index 30a6f527510c05e624a692c936642693badba97e..0349fd2b68d86afd6fd0dccf805d24f425769e2f 100644 (file)
@@ -189,7 +189,7 @@ unmap:
  *
  * @return - void.
  */
-void board_flash_init(struct flash_partitions partition_info[],
+void __init board_flash_init(struct flash_partitions partition_info[],
                        char chip_sel_board[][GPMC_CS_NUM], int nand_type)
 {
        u8              cs = 0;
index a59ace0ed560a57cdf1009cd15d596b94d71c76d..e558800adfdf58bdd69b55398ed8a7f3c4b332b0 100644 (file)
@@ -295,6 +295,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = -EINVAL,
+               .deferred       = true,
        },
 #if defined(CONFIG_LIBERTAS_SDIO) || defined(CONFIG_LIBERTAS_SDIO_MODULE)
        {
@@ -402,7 +403,7 @@ static int igep_twl_gpio_setup(struct device *dev,
 
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */
 #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE)
@@ -639,6 +640,9 @@ static void __init igep_init(void)
 
        /* Get IGEP2 hardware revision */
        igep2_get_revision();
+
+       omap_hsmmc_init(mmc);
+
        /* Register I2C busses and drivers */
        igep_i2c_init();
        platform_add_devices(igep_devices, ARRAY_SIZE(igep_devices));
index 2d2a61f7dcbf8e3d799fee8054a39011d94ab603..d50a562adfa0b08c4eed8318711384833385571f 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/io.h>
 #include <linux/smsc911x.h>
 #include <linux/mmc/host.h>
-#include <linux/gpio.h>
 
 #include <mach/hardware.h>
 #include <asm/mach-types.h>
@@ -424,7 +423,7 @@ static void __init omap_ldp_init(void)
        board_nand_init(ldp_nand_partitions,
                ARRAY_SIZE(ldp_nand_partitions), ZOOM_NAND_CS, 0);
 
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_init(mmc);
        ldp_display_init();
 }
 
index 672262717601e012affe2a2f7e952c917ec22871..50e40bc3f8f7412cfd81f7b32a085f1c8f797bab 100644 (file)
 
 #include "mux.h"
 
-static int slot1_cover_open;
-static int slot2_cover_open;
-static struct device *mmc_device;
-
 #define TUSB6010_ASYNC_CS      1
 #define TUSB6010_SYNC_CS       4
 #define TUSB6010_GPIO_INT      58
@@ -211,6 +207,10 @@ static struct omap_onenand_platform_data board_onenand_data[] = {
 #define N810_EMMC_VSD_GPIO     23
 #define N810_EMMC_VIO_GPIO     9
 
+static int slot1_cover_open;
+static int slot2_cover_open;
+static struct device *mmc_device;
+
 static int n8x0_mmc_switch_slot(struct device *dev, int slot)
 {
 #ifdef CONFIG_MMC_DEBUG
index 7ffcd2839e7ba872d872e0a53476b2e95832c2a2..7be8d659d91dc59f7b592108fe342d6436814cc6 100644 (file)
@@ -253,6 +253,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .mmc            = 1,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = -EINVAL,
+               .deferred       = true,
        },
        {}      /* Terminator */
 };
@@ -272,12 +273,10 @@ static int beagle_twl_gpio_setup(struct device *dev,
 {
        int r;
 
-       if (beagle_config.mmc1_gpio_wp != -EINVAL)
-               omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
        mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /*
         * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
@@ -521,6 +520,11 @@ static void __init omap3_beagle_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
        omap3_beagle_init_rev();
+
+       if (beagle_config.mmc1_gpio_wp != -EINVAL)
+               omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT);
+       omap_hsmmc_init(mmc);
+
        omap3_beagle_i2c_init();
 
        gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
index c877236a8442d235a4803c0903eb913d69ca3096..a659e198892beca6dd98ec167b4eee3e02ba77c0 100644 (file)
@@ -317,6 +317,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_cd        = -EINVAL,
                .gpio_wp        = 63,
+               .deferred       = true,
        },
 #ifdef CONFIG_WL12XX_PLATFORM_DATA
        {
@@ -361,9 +362,8 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
        int r, lcd_bl_en;
 
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
-       omap_mux_init_gpio(63, OMAP_PIN_INPUT);
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /*
         * Most GPIOs are for USB OTG.  Some are mostly sent to
@@ -644,6 +644,9 @@ static void __init omap3_evm_init(void)
        omap_board_config = omap3_evm_config;
        omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
 
+       omap_mux_init_gpio(63, OMAP_PIN_INPUT);
+       omap_hsmmc_init(mmc);
+
        omap3_evm_i2c_init();
 
        omap_display_init(&omap3_evm_dss_data);
index 4198dd017d8fdfde7fd00b2a8a00d5f9d7e766fb..2304ba340e99748e5538cdf16942c3415cbb3edc 100644 (file)
@@ -128,7 +128,7 @@ static void __init board_mmc_init(void)
                return;
        }
 
-       omap2_hsmmc_init(board_mmc_info);
+       omap_hsmmc_init(board_mmc_info);
 }
 
 static struct omap_smsc911x_platform_data __initdata board_smsc911x_data = {
index 1644b73017fcafbdc0e7b87a503ac35f92e8f992..7184b8b9e38f6bb2ddfb79ce713536dee72a23e5 100644 (file)
@@ -273,6 +273,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
                .gpio_cd        = -EINVAL,
                .gpio_wp        = 126,
                .ext_clock      = 0,
+               .deferred       = true,
        },
        {
                .mmc            = 2,
@@ -281,6 +282,7 @@ static struct omap2_hsmmc_info omap3pandora_mmc[] = {
                .gpio_wp        = 127,
                .ext_clock      = 1,
                .transceiver    = true,
+               .deferred       = true,
        },
        {
                .mmc            = 3,
@@ -300,7 +302,7 @@ static int omap3pandora_twl_gpio_setup(struct device *dev,
        /* gpio + {0,1} is "mmc{0,1}_cd" (input/IRQ) */
        omap3pandora_mmc[0].gpio_cd = gpio + 0;
        omap3pandora_mmc[1].gpio_cd = gpio + 1;
-       omap2_hsmmc_init(omap3pandora_mmc);
+       omap_hsmmc_late_init(omap3pandora_mmc);
 
        /* gpio + 13 drives 32kHz buffer for wifi module */
        gpio_32khz = gpio + 13;
@@ -343,7 +345,7 @@ static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
 };
 
 static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
-       REGULATOR_SUPPLY("hsusb0", "ehci-omap.0"),
+       REGULATOR_SUPPLY("hsusb1", "ehci-omap.0"),
 };
 
 /* ads7846 on SPI and 2 nub controllers on I2C */
@@ -561,13 +563,13 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
 
 static const struct usbhs_omap_board_data usbhs_bdata __initconst = {
 
-       .port_mode[0] = OMAP_EHCI_PORT_MODE_PHY,
-       .port_mode[1] = OMAP_USBHS_PORT_MODE_UNUSED,
+       .port_mode[0] = OMAP_USBHS_PORT_MODE_UNUSED,
+       .port_mode[1] = OMAP_EHCI_PORT_MODE_PHY,
        .port_mode[2] = OMAP_USBHS_PORT_MODE_UNUSED,
 
        .phy_reset  = true,
-       .reset_gpio_port[0]  = 16,
-       .reset_gpio_port[1]  = -EINVAL,
+       .reset_gpio_port[0]  = -EINVAL,
+       .reset_gpio_port[1]  = 16,
        .reset_gpio_port[2]  = -EINVAL
 };
 
@@ -580,6 +582,7 @@ static struct omap_board_mux board_mux[] __initdata = {
 static void __init omap3pandora_init(void)
 {
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_hsmmc_init(omap3pandora_mmc);
        omap3pandora_i2c_init();
        pandora_wl1251_init();
        platform_add_devices(omap3pandora_devices,
index cb089a46f62f691cceec4c20f9f035111dded5a3..641004380795f458c9432bf1056dd63187a5a33e 100644 (file)
@@ -209,10 +209,11 @@ static struct regulator_init_data omap3stalker_vsim = {
 
 static struct omap2_hsmmc_info mmc[] = {
        {
-        .mmc           = 1,
-        .caps          = MMC_CAP_4_BIT_DATA,
-        .gpio_cd       = -EINVAL,
-        .gpio_wp       = 23,
+               .mmc            = 1,
+               .caps           = MMC_CAP_4_BIT_DATA,
+               .gpio_cd        = -EINVAL,
+               .gpio_wp        = 23,
+               .deferred       = true,
         },
        {}                      /* Terminator */
 };
@@ -282,9 +283,8 @@ omap3stalker_twl_gpio_setup(struct device *dev,
                            unsigned gpio, unsigned ngpio)
 {
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
-       omap_mux_init_gpio(23, OMAP_PIN_INPUT);
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /*
         * Most GPIOs are for USB OTG.  Some are mostly sent to
@@ -425,6 +425,9 @@ static void __init omap3_stalker_init(void)
        omap_board_config = omap3_stalker_config;
        omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
 
+       omap_mux_init_gpio(23, OMAP_PIN_INPUT);
+       omap_hsmmc_init(mmc);
+
        omap3_stalker_i2c_init();
 
        platform_add_devices(omap3_stalker_devices,
index a0b851aafccad1bc87d900d9474cfa689e8cf39d..8842e04aef013a9d6efce34a16f64c9c79b27321 100644 (file)
@@ -100,6 +100,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .mmc            = 1,
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = 29,
+               .deferred       = true,
        },
        {}      /* Terminator */
 };
@@ -117,15 +118,9 @@ static struct gpio_led gpio_leds[];
 static int touchbook_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
-       if (system_rev >= 0x20 && system_rev <= 0x34301000) {
-               omap_mux_init_gpio(23, OMAP_PIN_INPUT);
-               mmc[0].gpio_wp = 23;
-       } else {
-               omap_mux_init_gpio(29, OMAP_PIN_INPUT);
-       }
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        /* REVISIT: need ehci-omap hooks for external VBUS
         * power switch and overcurrent detect
@@ -351,6 +346,14 @@ static void __init omap3_touchbook_init(void)
 
        pm_power_off = omap3_touchbook_poweroff;
 
+       if (system_rev >= 0x20 && system_rev <= 0x34301000) {
+               omap_mux_init_gpio(23, OMAP_PIN_INPUT);
+               mmc[0].gpio_wp = 23;
+       } else {
+               omap_mux_init_gpio(29, OMAP_PIN_INPUT);
+       }
+       omap_hsmmc_init(mmc);
+
        omap3_touchbook_i2c_init();
        platform_add_devices(omap3_touchbook_devices,
                        ARRAY_SIZE(omap3_touchbook_devices));
index 28fc271f70316510b5268c2a212adcac3718fce1..7ca7a5c474d4fa5d65c133954bca575fba164e8f 100644 (file)
@@ -245,9 +245,9 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
 {
        struct omap2_hsmmc_info *c;
 
-       omap2_hsmmc_init(controllers);
+       omap_hsmmc_init(controllers);
        for (c = controllers; c->mmc; c++)
-               omap4_twl6030_hsmmc_set_late_init(c->dev);
+               omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev);
 
        return 0;
 }
@@ -461,7 +461,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
        .default_device = &omap4_panda_dvi_device,
 };
 
-void omap4_panda_display_init(void)
+void __init omap4_panda_display_init(void)
 {
        int r;
 
index 52c0cef77165cb2cbc8a658d8fd63b260ec5662a..668533e2a3791442e3582696d365e964179124e8 100644 (file)
@@ -407,8 +407,6 @@ static inline void __init overo_init_keys(void) { return; }
 static int overo_twl_gpio_setup(struct device *dev,
                unsigned gpio, unsigned ngpio)
 {
-       omap2_hsmmc_init(mmc);
-
 #if defined(CONFIG_LEDS_GPIO) || defined(CONFIG_LEDS_GPIO_MODULE)
        /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */
        gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
@@ -505,6 +503,7 @@ static void __init overo_init(void)
        int ret;
 
        omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_hsmmc_init(mmc);
        overo_i2c_init();
        omap_display_init(&overo_dss_data);
        omap_serial_init();
index 8678b386c6a2ab8e7a0b664546f837eb9966d36f..2d24c98f3d450ccac8615bef10c14979484ea654 100644 (file)
@@ -120,7 +120,7 @@ static void __init rm680_peripherals_init(void)
                                ARRAY_SIZE(rm680_peripherals_devices));
        rm680_i2c_init();
        gpmc_onenand_init(board_onenand_data);
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_init(mmc);
 }
 
 #ifdef CONFIG_OMAP_MUX
index acb4e77b39efd088538ef6d7c6542f64ab6411e1..0e9d89a2048f5534631130936046fd53f155252b 100644 (file)
@@ -1145,7 +1145,7 @@ void __init rx51_peripherals_init(void)
 
        partition = omap_mux_get("core");
        if (partition)
-               omap2_hsmmc_init(mmc);
+               omap_hsmmc_init(mmc);
 
        rx51_charger_init();
 }
index c126461836ac5d2134314b82c80dae0eb41fcf60..3d39cdb2e25021704b511ca3c6b45dce606243b0 100644 (file)
@@ -205,6 +205,7 @@ static struct omap2_hsmmc_info mmc[] = {
                .caps           = MMC_CAP_4_BIT_DATA,
                .gpio_wp        = -EINVAL,
                .power_saving   = true,
+               .deferred       = true,
        },
        {
                .name           = "internal",
@@ -233,7 +234,7 @@ static int zoom_twl_gpio_setup(struct device *dev,
 
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
-       omap2_hsmmc_init(mmc);
+       omap_hsmmc_late_init(mmc);
 
        ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW,
                               "lcd enable");
@@ -301,6 +302,7 @@ void __init zoom_peripherals_init(void)
        if (ret)
                pr_err("error setting wl12xx data: %d\n", ret);
 
+       omap_hsmmc_init(mmc);
        omap_i2c_init();
        platform_device_register(&omap_vwlan_device);
        usb_musb_init(NULL);
index e25364de028a8ba7a1eb0f418177d7cdb7dee4d6..04d551b1f7f75fd43f91ed49abf1b017dfcf95e6 100644 (file)
@@ -43,6 +43,7 @@
 #include <linux/errno.h>
 #include <linux/clk.h>
 #include <linux/io.h>
+#include <linux/bug.h>
 
 #include <plat/clock.h>
 
index bcb0c5817167095b7d2b0edc536ab663a9463bd3..799a617ade30ac934501bf3b97ce55d481f8717c 100644 (file)
@@ -76,13 +76,15 @@ void __init omap_ads7846_init(int bus_num, int gpio_pendown, int gpio_debounce,
                        gpio_set_debounce(gpio_pendown, gpio_debounce);
        }
 
-       ads7846_config.gpio_pendown = gpio_pendown;
-
        spi_bi->bus_num = bus_num;
        spi_bi->irq     = OMAP_GPIO_IRQ(gpio_pendown);
 
-       if (board_pdata)
+       if (board_pdata) {
+               board_pdata->gpio_pendown = gpio_pendown;
                spi_bi->platform_data = board_pdata;
+       } else {
+               ads7846_config.gpio_pendown = gpio_pendown;
+       }
 
        spi_register_board_info(&ads7846_spi_board_info, 1);
 }
index 0ba68d3764bc932b3ff85091203559b5f0d323be..96c4bcc0a75c908ea5f3f6227e020bfb0819e10a 100644 (file)
 #define AM35XX_HECC_SW_RST             BIT(3)
 #define AM35XX_VPFE_PCLK_SW_RST                BIT(4)
 
+/*
+ * CONTROL AM33XX STATUS register
+ */
+#define AM33XX_CONTROL_STATUS          0x040
+
 /*
  * CONTROL OMAP STATUS register to identify OMAP3 features
  */
index 3ffefe275ea07923d23a80b0d586e99a058fd419..2bda43629b40f920bbaf3636886ccfc361ee2e25 100644 (file)
@@ -276,7 +276,7 @@ int __init omap4_keyboard_init(struct omap4_keypad_platform_data
 }
 
 #if defined(CONFIG_OMAP_MBOX_FWK) || defined(CONFIG_OMAP_MBOX_FWK_MODULE)
-static inline void omap_init_mbox(void)
+static inline void __init omap_init_mbox(void)
 {
        struct omap_hwmod *oh;
        struct platform_device *pdev;
@@ -337,7 +337,7 @@ static inline void omap_init_audio(void) {}
 #if defined(CONFIG_SND_OMAP_SOC_MCPDM) || \
                defined(CONFIG_SND_OMAP_SOC_MCPDM_MODULE)
 
-static void omap_init_mcpdm(void)
+static void __init omap_init_mcpdm(void)
 {
        struct omap_hwmod *oh;
        struct platform_device *pdev;
@@ -358,7 +358,7 @@ static inline void omap_init_mcpdm(void) {}
 #if defined(CONFIG_SND_OMAP_SOC_DMIC) || \
                defined(CONFIG_SND_OMAP_SOC_DMIC_MODULE)
 
-static void omap_init_dmic(void)
+static void __init omap_init_dmic(void)
 {
        struct omap_hwmod *oh;
        struct platform_device *pdev;
@@ -380,7 +380,7 @@ static inline void omap_init_dmic(void) {}
 
 #include <plat/mcspi.h>
 
-static int omap_mcspi_init(struct omap_hwmod *oh, void *unused)
+static int __init omap_mcspi_init(struct omap_hwmod *oh, void *unused)
 {
        struct platform_device *pdev;
        char *name = "omap2_mcspi";
index 3677b1f58b85f32c25e9c4f1e886a0e259ee9102..62e133ca43141daa622bf414dbff8ab3977594ae 100644 (file)
@@ -124,7 +124,7 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags)
        }
 }
 
-static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
+static int __init omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
 {
        u32 enable_mask, enable_shift;
        u32 pipd_mask, pipd_shift;
@@ -157,7 +157,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
        return 0;
 }
 
-int omap_hdmi_init(enum omap_hdmi_flags flags)
+int __init omap_hdmi_init(enum omap_hdmi_flags flags)
 {
        if (cpu_is_omap44xx())
                omap4_hdmi_mux_pads(flags);
@@ -165,7 +165,7 @@ int omap_hdmi_init(enum omap_hdmi_flags flags)
        return 0;
 }
 
-static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
+static int __init omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
 {
        if (cpu_is_omap44xx())
                return omap4_dsi_mux_pads(dsi_id, lane_mask);
@@ -173,7 +173,7 @@ static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
        return 0;
 }
 
-static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask)
+static void __init omap_dsi_disable_pads(int dsi_id, unsigned lane_mask)
 {
        if (cpu_is_omap44xx())
                omap4_dsi_mux_pads(dsi_id, 0);
index a59a45a0096ef77276811c6641a39e8149ceef5c..b19d8496c16ed2dd1e62eb4afb29a08c27052110 100644 (file)
@@ -227,7 +227,7 @@ static int __init omap2_system_dma_init_dev(struct omap_hwmod *oh, void *unused)
 
        dma_stride              = OMAP2_DMA_STRIDE;
        dma_common_ch_start     = CSDP;
-       if (cpu_is_omap3630() || cpu_is_omap4430())
+       if (cpu_is_omap3630() || cpu_is_omap44xx())
                dma_common_ch_end = CCDN;
        else
                dma_common_ch_end = CCFN;
index 8cbfbc2918ce3b88168dadd29cdc90d0e530ffe7..64c0caed9516d29535fa3d72e7002b67603351ac 100644 (file)
@@ -24,7 +24,7 @@
 #include <plat/omap_hwmod.h>
 #include <plat/omap_device.h>
 
-static int omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
+static int __init omap2_gpio_dev_init(struct omap_hwmod *oh, void *unused)
 {
        struct platform_device *pdev;
        struct omap_gpio_platform_data *pdata;
index bbb870c04a5e3ed3aa4f61777c187f3e33358ee9..5e5880d6d099e9a17e29436f7515f27ad2f94093 100644 (file)
@@ -101,10 +101,13 @@ void __init gpmc_smsc911x_init(struct omap_smsc911x_platform_data *board_data)
 
        gpmc_cfg = board_data;
 
-       ret = platform_device_register(&gpmc_smsc911x_regulator);
-       if (ret < 0) {
-               pr_err("Unable to register smsc911x regulators: %d\n", ret);
-               return;
+       if (!gpmc_cfg->id) {
+               ret = platform_device_register(&gpmc_smsc911x_regulator);
+               if (ret < 0) {
+                       pr_err("Unable to register smsc911x regulators: %d\n",
+                              ret);
+                       return;
+               }
        }
 
        if (gpmc_cs_request(gpmc_cfg->cs, SZ_16M, &cs_mem_base) < 0) {
index dfffbbf4c009624c87375b6322a2a7285cd8a2e7..00d510858e287fa41c2f3a893553e59dc205a7a8 100644 (file)
@@ -888,6 +888,7 @@ int gpmc_enable_hwecc(int cs, int mode, int dev_width, int ecc_size)
        gpmc_write_reg(GPMC_ECC_CONFIG, val);
        return 0;
 }
+EXPORT_SYMBOL_GPL(gpmc_enable_hwecc);
 
 /**
  * gpmc_calculate_ecc - generate non-inverted ecc bytes
@@ -918,3 +919,4 @@ int gpmc_calculate_ecc(int cs, const u_char *dat, u_char *ecc_code)
        gpmc_ecc_used = -EINVAL;
        return 0;
 }
+EXPORT_SYMBOL_GPL(gpmc_calculate_ecc);
index 19dd1657245c58634dc3ac1e8005e823e7360dd5..8121720e942ffdb10d14cd6fdde29aa691f7446e 100644 (file)
@@ -293,8 +293,8 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
        }
 }
 
-static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
-                                struct omap_mmc_platform_data *mmc)
+static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
+                                       struct omap_mmc_platform_data *mmc)
 {
        char *hc_name;
 
@@ -429,66 +429,131 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
 }
 
 static int omap_hsmmc_done;
+
+void omap_hsmmc_late_init(struct omap2_hsmmc_info *c)
+{
+       struct platform_device *pdev;
+       struct omap_mmc_platform_data *mmc_pdata;
+       int res;
+
+       if (omap_hsmmc_done != 1)
+               return;
+
+       omap_hsmmc_done++;
+
+       for (; c->mmc; c++) {
+               if (!c->deferred)
+                       continue;
+
+               pdev = c->pdev;
+               if (!pdev)
+                       continue;
+
+               mmc_pdata = pdev->dev.platform_data;
+               if (!mmc_pdata)
+                       continue;
+
+               mmc_pdata->slots[0].switch_pin = c->gpio_cd;
+               mmc_pdata->slots[0].gpio_wp = c->gpio_wp;
+
+               res = omap_device_register(pdev);
+               if (res)
+                       pr_err("Could not late init MMC %s\n",
+                              c->name);
+       }
+}
+
 #define MAX_OMAP_MMC_HWMOD_NAME_LEN            16
 
-void omap_init_hsmmc(struct omap2_hsmmc_info *hsmmcinfo, int ctrl_nr)
+static void __init omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
+                                       int ctrl_nr)
 {
        struct omap_hwmod *oh;
+       struct omap_hwmod *ohs[1];
+       struct omap_device *od;
        struct platform_device *pdev;
        char oh_name[MAX_OMAP_MMC_HWMOD_NAME_LEN];
        struct omap_mmc_platform_data *mmc_data;
        struct omap_mmc_dev_attr *mmc_dev_attr;
        char *name;
-       int l;
+       int res;
 
        mmc_data = kzalloc(sizeof(struct omap_mmc_platform_data), GFP_KERNEL);
        if (!mmc_data) {
                pr_err("Cannot allocate memory for mmc device!\n");
-               goto done;
+               return;
        }
 
-       if (omap_hsmmc_pdata_init(hsmmcinfo, mmc_data) < 0) {
-               pr_err("%s fails!\n", __func__);
-               goto done;
-       }
+       res = omap_hsmmc_pdata_init(hsmmcinfo, mmc_data);
+       if (res < 0)
+               goto free_mmc;
+
        omap_hsmmc_mux(mmc_data, (ctrl_nr - 1));
 
        name = "omap_hsmmc";
-
-       l = snprintf(oh_name, MAX_OMAP_MMC_HWMOD_NAME_LEN,
+       res = snprintf(oh_name, MAX_OMAP_MMC_HWMOD_NAME_LEN,
                     "mmc%d", ctrl_nr);
-       WARN(l >= MAX_OMAP_MMC_HWMOD_NAME_LEN,
+       WARN(res >= MAX_OMAP_MMC_HWMOD_NAME_LEN,
             "String buffer overflow in MMC%d device setup\n", ctrl_nr);
+
        oh = omap_hwmod_lookup(oh_name);
        if (!oh) {
                pr_err("Could not look up %s\n", oh_name);
-               kfree(mmc_data->slots[0].name);
-               goto done;
+               goto free_name;
        }
-
+       ohs[0] = oh;
        if (oh->dev_attr != NULL) {
                mmc_dev_attr = oh->dev_attr;
                mmc_data->controller_flags = mmc_dev_attr->flags;
        }
 
-       pdev = omap_device_build(name, ctrl_nr - 1, oh, mmc_data,
-               sizeof(struct omap_mmc_platform_data), NULL, 0, false);
-       if (IS_ERR(pdev)) {
-               WARN(1, "Can't build omap_device for %s:%s.\n", name, oh->name);
-               kfree(mmc_data->slots[0].name);
-               goto done;
+       pdev = platform_device_alloc(name, ctrl_nr - 1);
+       if (!pdev) {
+               pr_err("Could not allocate pdev for %s\n", name);
+               goto free_name;
        }
-       /*
-        * return device handle to board setup code
-        * required to populate for regulator framework structure
-        */
-       hsmmcinfo->dev = &pdev->dev;
+       dev_set_name(&pdev->dev, "%s.%d", pdev->name, pdev->id);
+
+       od = omap_device_alloc(pdev, ohs, 1, NULL, 0);
+       if (!od) {
+               pr_err("Could not allocate od for %s\n", name);
+               goto put_pdev;
+       }
+
+       res = platform_device_add_data(pdev, mmc_data,
+                             sizeof(struct omap_mmc_platform_data));
+       if (res) {
+               pr_err("Could not add pdata for %s\n", name);
+               goto put_pdev;
+       }
+
+       hsmmcinfo->pdev = pdev;
+
+       if (hsmmcinfo->deferred)
+               goto free_mmc;
+
+       res = omap_device_register(pdev);
+       if (res) {
+               pr_err("Could not register od for %s\n", name);
+               goto free_od;
+       }
+
+       goto free_mmc;
+
+free_od:
+       omap_device_delete(od);
+
+put_pdev:
+       platform_device_put(pdev);
+
+free_name:
+       kfree(mmc_data->slots[0].name);
 
-done:
+free_mmc:
        kfree(mmc_data);
 }
 
-void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
+void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers)
 {
        u32 reg;
 
@@ -521,7 +586,7 @@ void omap2_hsmmc_init(struct omap2_hsmmc_info *controllers)
        }
 
        for (; controllers->mmc; controllers++)
-               omap_init_hsmmc(controllers, controllers->mmc);
+               omap_hsmmc_init_one(controllers, controllers->mmc);
 
 }
 
index c4409730c4bb6ea18d4c0b93f9bd7fab612e20a5..07831cc3c171d39bcc96b1f3fa8e20615ac804ba 100644 (file)
@@ -21,10 +21,11 @@ struct omap2_hsmmc_info {
        bool    no_off;         /* power_saving and power is not to go off */
        bool    no_off_init;    /* no power off when not in MMC sleep state */
        bool    vcc_aux_disable_is_sleep; /* Regulator off remapped to sleep */
+       bool    deferred;       /* mmc needs a deferred probe */
        int     gpio_cd;        /* or -EINVAL */
        int     gpio_wp;        /* or -EINVAL */
        char    *name;          /* or NULL for default */
-       struct device *dev;     /* returned: pointer to mmc adapter */
+       struct platform_device *pdev;   /* mmc controller instance */
        int     ocr_mask;       /* temporary HACK */
        /* Remux (pad configuration) when powering on/off */
        void (*remux)(struct device *dev, int slot, int power_on);
@@ -34,11 +35,16 @@ struct omap2_hsmmc_info {
 
 #if defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
 
-void omap2_hsmmc_init(struct omap2_hsmmc_info *);
+void omap_hsmmc_init(struct omap2_hsmmc_info *);
+void omap_hsmmc_late_init(struct omap2_hsmmc_info *);
 
 #else
 
-static inline void omap2_hsmmc_init(struct omap2_hsmmc_info *info)
+static inline void omap_hsmmc_init(struct omap2_hsmmc_info *info)
+{
+}
+
+static inline void omap_hsmmc_late_init(struct omap2_hsmmc_info *info)
 {
 }
 
index 719ee423abe22be6439cb4b3dd0ce78dcecb41b5..613e2c1eeb2f2e3dc09a067d3d3eba36adfa241f 100644 (file)
@@ -44,6 +44,8 @@ int omap_type(void)
 
        if (cpu_is_omap24xx()) {
                val = omap_ctrl_readl(OMAP24XX_CONTROL_STATUS);
+       } else if (cpu_is_am33xx()) {
+               val = omap_ctrl_readl(AM33XX_CONTROL_STATUS);
        } else if (cpu_is_omap34xx()) {
                val = omap_ctrl_readl(OMAP343X_CONTROL_STATUS);
        } else if (cpu_is_omap44xx()) {
index fb11b44fbdecc77d6c8b5ce41e5da4f0aeecc1fc..24ad0d15451945f1b5c25ab69627cc03f6c1eedb 100644 (file)
 #include "clockdomain.h"
 #include <plat/omap_hwmod.h>
 #include <plat/multi.h>
-#include "common.h"
 
 /*
  * The machine specific code may provide the extra mapping besides the
  * default mapping provided here.
  */
 
-#ifdef CONFIG_ARCH_OMAP2
+#if defined(CONFIG_SOC_OMAP2420) || defined(CONFIG_SOC_OMAP2430)
 static struct map_desc omap24xx_io_desc[] __initdata = {
        {
                .virtual        = L3_24XX_VIRT,
index fb4bcf81a183311c9a0baf95ed7a92af61ae01ff..5f8a876e4fd228c68de25712731d9bce1e9696ef 100644 (file)
@@ -122,7 +122,7 @@ static int omap3_enable_st_clock(unsigned int id, bool enable)
        return 0;
 }
 
-static int omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
+static int __init omap_init_mcbsp(struct omap_hwmod *oh, void *unused)
 {
        int id, count = 1;
        char *name = "omap-mcbsp";
index 611a0e3d54ca34c47f8180faed43932191df26cf..f26b2faa16947c042fe1563fed8b9d5b23b8488e 100644 (file)
@@ -100,8 +100,8 @@ void omap_mux_write_array(struct omap_mux_partition *partition,
 
 static char *omap_mux_options;
 
-static int _omap_mux_init_gpio(struct omap_mux_partition *partition,
-                              int gpio, int val)
+static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition,
+                                     int gpio, int val)
 {
        struct omap_mux_entry *e;
        struct omap_mux *gpio_mux = NULL;
@@ -145,7 +145,7 @@ static int _omap_mux_init_gpio(struct omap_mux_partition *partition,
        return 0;
 }
 
-int omap_mux_init_gpio(int gpio, int val)
+int __init omap_mux_init_gpio(int gpio, int val)
 {
        struct omap_mux_partition *partition;
        int ret;
@@ -159,9 +159,9 @@ int omap_mux_init_gpio(int gpio, int val)
        return -ENODEV;
 }
 
-static int _omap_mux_get_by_name(struct omap_mux_partition *partition,
-                                const char *muxname,
-                                struct omap_mux **found_mux)
+static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition,
+                                       const char *muxname,
+                                       struct omap_mux **found_mux)
 {
        struct omap_mux *mux = NULL;
        struct omap_mux_entry *e;
@@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition,
        return -ENODEV;
 }
 
-static int
+static int __init
 omap_mux_get_by_name(const char *muxname,
                        struct omap_mux_partition **found_partition,
                        struct omap_mux **found_mux)
@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname,
        return -ENODEV;
 }
 
-int omap_mux_init_signal(const char *muxname, int val)
+int __init omap_mux_init_signal(const char *muxname, int val)
 {
        struct omap_mux_partition *partition = NULL;
        struct omap_mux *mux = NULL;
index adbe4d8c7cafdcd64d52c5880530f096ffacaebd..56c345b8b931b1d00b926152ea1459390884c500 100644 (file)
@@ -33,7 +33,7 @@ int platform_cpu_kill(unsigned int cpu)
  * platform-specific code to shutdown a CPU
  * Called with IRQs disabled
  */
-void platform_cpu_die(unsigned int cpu)
+void __ref platform_cpu_die(unsigned int cpu)
 {
        unsigned int this_cpu;
 
index 1d5d01056558fa0581410a35ba09d4bfeeff8cc0..fe9ab7c58fae71d027f26b57c88a3590da5e51ab 100644 (file)
@@ -300,7 +300,7 @@ int omap4_enter_lowpower(unsigned int cpu, unsigned int power_state)
  * @cpu : CPU ID
  * @power_state: CPU low power state.
  */
-int omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
+int __cpuinit omap4_hotplug_cpu(unsigned int cpu, unsigned int power_state)
 {
        unsigned int cpu_state = 0;
 
index d3d8971d7f30ee10293385d9bd997ca30a30144b..42cd7fb52414b961ad0535004a9f1f83333130ea 100644 (file)
@@ -43,7 +43,6 @@
 
 static void __iomem *wakeupgen_base;
 static void __iomem *sar_base;
-static DEFINE_PER_CPU(u32 [NR_REG_BANKS], irqmasks);
 static DEFINE_SPINLOCK(wakeupgen_lock);
 static unsigned int irq_target_cpu[NR_IRQS];
 
@@ -67,14 +66,6 @@ static inline void sar_writel(u32 val, u32 offset, u8 idx)
        __raw_writel(val, sar_base + offset + (idx * 4));
 }
 
-static void _wakeupgen_set_all(unsigned int cpu, unsigned int reg)
-{
-       u8 i;
-
-       for (i = 0; i < NR_REG_BANKS; i++)
-               wakeupgen_writel(reg, i, cpu);
-}
-
 static inline int _wakeupgen_get_irq_info(u32 irq, u32 *bit_posn, u8 *reg_index)
 {
        unsigned int spi_irq;
@@ -130,22 +121,6 @@ static void _wakeupgen_set(unsigned int irq, unsigned int cpu)
        wakeupgen_writel(val, i, cpu);
 }
 
-static void _wakeupgen_save_masks(unsigned int cpu)
-{
-       u8 i;
-
-       for (i = 0; i < NR_REG_BANKS; i++)
-               per_cpu(irqmasks, cpu)[i] = wakeupgen_readl(i, cpu);
-}
-
-static void _wakeupgen_restore_masks(unsigned int cpu)
-{
-       u8 i;
-
-       for (i = 0; i < NR_REG_BANKS; i++)
-               wakeupgen_writel(per_cpu(irqmasks, cpu)[i], i, cpu);
-}
-
 /*
  * Architecture specific Mask extension
  */
@@ -170,6 +145,33 @@ static void wakeupgen_unmask(struct irq_data *d)
        spin_unlock_irqrestore(&wakeupgen_lock, flags);
 }
 
+#ifdef CONFIG_HOTPLUG_CPU
+static DEFINE_PER_CPU(u32 [NR_REG_BANKS], irqmasks);
+
+static void _wakeupgen_save_masks(unsigned int cpu)
+{
+       u8 i;
+
+       for (i = 0; i < NR_REG_BANKS; i++)
+               per_cpu(irqmasks, cpu)[i] = wakeupgen_readl(i, cpu);
+}
+
+static void _wakeupgen_restore_masks(unsigned int cpu)
+{
+       u8 i;
+
+       for (i = 0; i < NR_REG_BANKS; i++)
+               wakeupgen_writel(per_cpu(irqmasks, cpu)[i], i, cpu);
+}
+
+static void _wakeupgen_set_all(unsigned int cpu, unsigned int reg)
+{
+       u8 i;
+
+       for (i = 0; i < NR_REG_BANKS; i++)
+               wakeupgen_writel(reg, i, cpu);
+}
+
 /*
  * Mask or unmask all interrupts on given CPU.
  *     0 = Mask all interrupts on the 'cpu'
@@ -191,6 +193,7 @@ static void wakeupgen_irqmask_all(unsigned int cpu, unsigned int set)
        }
        spin_unlock_irqrestore(&wakeupgen_lock, flags);
 }
+#endif
 
 #ifdef CONFIG_CPU_PM
 /*
index ee3624bd1996ccd7361f762843ce09fffac6d11a..08daa5e0eb5fdbd1fa3a20c5c1ba4dd1112b3d90 100644 (file)
@@ -28,7 +28,6 @@
 #include <plat/mcspi.h>
 #include <plat/mcbsp.h>
 #include <plat/mmc.h>
-#include <plat/i2c.h>
 #include <plat/dmtimer.h>
 #include <plat/common.h>
 
index 5a65dd04aa38ba8298168a5cb80e1d50766f1136..184ae21feea75629efadc1163c9655a2651cf4a7 100644 (file)
@@ -28,7 +28,7 @@
 
 static struct omap_device_pm_latency *pm_lats;
 
-static int _init_omap_device(char *name)
+static int __init _init_omap_device(char *name)
 {
        struct omap_hwmod *oh;
        struct platform_device *pdev;
@@ -49,7 +49,7 @@ static int _init_omap_device(char *name)
 /*
  * Build omap_devices for processors and bus.
  */
-static void omap2_init_processor_devices(void)
+static void __init omap2_init_processor_devices(void)
 {
        _init_omap_device("mpu");
        if (omap3_has_iva())
index f97afff68d6dc172cbceff966ee6ead2820787d3..c0aeabfcf0091251b2f9893149f9482ac2c2f023 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/errno.h>
 #include <linux/kernel.h>
+#include <linux/bug.h>
 #include "pm.h"
 #include "cm.h"
 #include "cm-regbits-34xx.h"
index 6a17e4ca1d793817a96f870e70a3b87e73d0ca8a..0f0a9f1592fea28acbfa723919196a7527e918de 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/bug.h>
 
 #include <plat/prcm.h>
 
index a7880af4b3d9f18164e48e6497587a2ed45f24a3..601325b852a422c1c44cff441989ad42d1d8f9e9 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/io.h>
 #include <linux/errno.h>
 #include <linux/delay.h>
+#include <linux/bug.h>
 
 #include "powerdomain.h"
 #include <plat/prcm.h>
index 8ef26daeed68f966b64fb410e346dc073e940fe3..b7ea468eea326aa02537572139b9cc50da183b81 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <linux/kernel.h>
 #include <linux/init.h>
+#include <linux/bug.h>
 
 #include <plat/cpu.h>
 
index 60293370a2a7a778ad6d25755d8bdd06e9e57fdd..a503e1e8358c1f011b193a22f33c48ff38ce89d2 100644 (file)
@@ -69,7 +69,7 @@ static void __init sr_set_nvalues(struct omap_volt_data *volt_data,
        sr_data->nvalue_count = count;
 }
 
-static int sr_dev_init(struct omap_hwmod *oh, void *user)
+static int __init sr_dev_init(struct omap_hwmod *oh, void *user)
 {
        struct omap_sr_data *sr_data;
        struct platform_device *pdev;
index 175b7d86d86ac3673d926745dc67e42a4e0ad899..84da34f9a7cff598ab059a604fb3bf14ec5ddea4 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/init.h>
+#include <linux/bug.h>
 
 #include <plat/cpu.h>
 
index 0df88820978d5d509ded718d3311659e8ab079d4..f95c1bad9dc6363a573fee56f6addaa17a0accfd 100644 (file)
@@ -61,8 +61,8 @@ void __init omap_vp_init(struct voltagedomain *voltdm)
        vddmin = voltdm->pmic->vp_vddmin;
        vddmax = voltdm->pmic->vp_vddmax;
 
-       waittime = ((voltdm->pmic->step_size / voltdm->pmic->slew_rate) *
-                   sys_clk_rate) / 1000;
+       waittime = DIV_ROUND_UP(voltdm->pmic->step_size * sys_clk_rate,
+                               1000 * voltdm->pmic->slew_rate);
        vstepmin = voltdm->pmic->vp_vstepmin;
        vstepmax = voltdm->pmic->vp_vstepmax;
 
index c59e8b892d6b9af1781f62666be3992885c6cfcf..9ec635812349d3594749cfda7fca07b742d402dd 100644 (file)
@@ -8,47 +8,55 @@ config UX500_SOC_COMMON
        select PL310_ERRATA_753970
        select ARM_ERRATA_754322
        select ARM_ERRATA_764369
-
-menu "Ux500 SoC"
+       select CACHE_L2X0
 
 config UX500_SOC_DB5500
-       bool "DB5500"
+       bool
        select MFD_DB5500_PRCMU
 
 config UX500_SOC_DB8500
-       bool "DB8500"
+       bool
        select MFD_DB8500_PRCMU
        select REGULATOR_DB8500_PRCMU
-
-endmenu
+       select CPU_FREQ_TABLE if CPU_FREQ
 
 menu "Ux500 target platform (boards)"
 
-config MACH_U8500
-       bool "U8500 Development platform"
-       depends on UX500_SOC_DB8500
-       select TPS6105X
+config MACH_MOP500
+       bool "U8500 Development platform, MOP500 versions"
+       select UX500_SOC_DB8500
+       select I2C
+       select I2C_NOMADIK
        help
-         Include support for the mop500 development platform.
+         Include support for the MOP500 development platform.
 
 config MACH_HREFV60
-       bool "U85000 Development platform, HREFv60 version"
-       depends on UX500_SOC_DB8500
-       help
-         Include support for the HREFv60 new development platform.
+       bool "U8500 Development platform, HREFv60 version"
+       select MACH_MOP500
+       help
+         Include support for the HREFv60 new development platform.
+         Includes HREFv70, v71 etc.
 
 config MACH_SNOWBALL
        bool "U8500 Snowball platform"
-       depends on UX500_SOC_DB8500
-       select MACH_U8500
+       select MACH_MOP500
        help
          Include support for the snowball development platform.
 
 config MACH_U5500
        bool "U5500 Development platform"
-       depends on UX500_SOC_DB5500
+       select UX500_SOC_DB5500
        help
          Include support for the U5500 development platform.
+
+config UX500_AUTO_PLATFORM
+       def_bool y
+       depends on !MACH_U5500
+       select MACH_MOP500
+       help
+         At least one platform needs to be selected in order to build
+         a working kernel. If everything else is disabled, this
+         automatically enables MACH_MOP500.
 endmenu
 
 config UX500_DEBUG_UART
index 6bd2f451c185518522f4b72b227b8075df9aed6c..8dd75f210d2b40ddb20572164d77e17b99073ea8 100644 (file)
@@ -7,7 +7,7 @@ obj-y                           := clock.o cpu.o devices.o devices-common.o \
 obj-$(CONFIG_CACHE_L2X0)       += cache-l2x0.o
 obj-$(CONFIG_UX500_SOC_DB5500) += cpu-db5500.o dma-db5500.o
 obj-$(CONFIG_UX500_SOC_DB8500) += cpu-db8500.o devices-db8500.o
-obj-$(CONFIG_MACH_U8500)       += board-mop500.o board-mop500-sdi.o \
+obj-$(CONFIG_MACH_MOP500)      += board-mop500.o board-mop500-sdi.o \
                                board-mop500-regulators.o \
                                board-mop500-uib.o board-mop500-stuib.o \
                                board-mop500-u8500uib.o \
index 2735d03996cf46a9cdfc7da67378902130dd2aec..52426a4257871cf62e3f2681d7d36b3ca83bea22 100644 (file)
@@ -74,6 +74,26 @@ static struct regulator_consumer_supply ab8500_vtvout_consumers[] = {
        REGULATOR_SUPPLY("vddadc", "ab8500-gpadc.0"),
 };
 
+static struct regulator_consumer_supply ab8500_vaud_consumers[] = {
+       /* AB8500 audio-codec main supply */
+       REGULATOR_SUPPLY("vaud", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vamic1_consumers[] = {
+       /* AB8500 audio-codec Mic1 supply */
+       REGULATOR_SUPPLY("vamic1", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vamic2_consumers[] = {
+       /* AB8500 audio-codec Mic2 supply */
+       REGULATOR_SUPPLY("vamic2", "ab8500-codec.0"),
+};
+
+static struct regulator_consumer_supply ab8500_vdmic_consumers[] = {
+       /* AB8500 audio-codec DMic supply */
+       REGULATOR_SUPPLY("vdmic", "ab8500-codec.0"),
+};
+
 static struct regulator_consumer_supply ab8500_vintcore_consumers[] = {
        /* SoC core supply, no device */
        REGULATOR_SUPPLY("v-intcore", NULL),
@@ -323,6 +343,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-AUD",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vaud_consumers),
+               .consumer_supplies = ab8500_vaud_consumers,
        },
        /* supply for v-anamic1 VAMic1-LDO */
        [AB8500_LDO_ANAMIC1] = {
@@ -330,6 +352,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-AMIC1",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic1_consumers),
+               .consumer_supplies = ab8500_vamic1_consumers,
        },
        /* supply for v-amic2, VAMIC2 LDO, reuse constants for AMIC1 */
        [AB8500_LDO_ANAMIC2] = {
@@ -337,6 +361,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-AMIC2",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vamic2_consumers),
+               .consumer_supplies = ab8500_vamic2_consumers,
        },
        /* supply for v-dmic, VDMIC LDO */
        [AB8500_LDO_DMIC] = {
@@ -344,6 +370,8 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = {
                        .name = "V-DMIC",
                        .valid_ops_mask = REGULATOR_CHANGE_STATUS,
                },
+               .num_consumer_supplies = ARRAY_SIZE(ab8500_vdmic_consumers),
+               .consumer_supplies = ab8500_vdmic_consumers,
        },
        /* supply for v-intcore12, VINTCORE12 LDO */
        [AB8500_LDO_INTCORE] = {
index feb5744d98b7d7658f3d58290b0b1c76ded8f295..ead91c968ff480367a145d5d7a5d8009774330cf 100644 (file)
@@ -8,7 +8,6 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/i2c.h>
-#include <linux/gpio.h>
 #include <linux/interrupt.h>
 #include <linux/mfd/tc3589x.h>
 #include <linux/input/matrix_keypad.h>
index 5c00712907d18ef715a74fa3caa27b38fba095f6..6d672a556df896a05ebc5e60ad0f125790edd6f4 100644 (file)
@@ -72,7 +72,7 @@ static struct platform_device snowball_led_dev = {
 };
 
 static struct ab8500_gpio_platform_data ab8500_gpio_pdata = {
-       .gpio_base              = MOP500_AB8500_GPIO(0),
+       .gpio_base              = MOP500_AB8500_PIN_GPIO(1),
        .irq_base               = MOP500_AB8500_VIR_GPIO_IRQ_BASE,
        /* config_reg is the initial configuration of ab8500 pins.
         * The pins can be configured as GPIO or alt functions based
index f926d3db6207ed3a68a834eedddd61286c07bf70..7ff6cbffc10446419a83f4f7d04db61eef56616d 100644 (file)
@@ -63,7 +63,7 @@
  * because the AB8500 GPIO pins are enumbered starting from 1, so the value in
  * parens matches the GPIO pin number in the data sheet.
  */
-#define MOP500_AB8500_GPIO(x)          (MOP500_EGPIO_END + (x) - 1)
+#define MOP500_AB8500_PIN_GPIO(x)      (MOP500_EGPIO_END + (x) - 1)
 /*Snowball AB8500 GPIO */
 #define SNOWBALL_VSMPS2_1V8_GPIO       MOP500_AB8500_PIN_GPIO(1)       /* SYSCLKREQ2/GPIO1 */
 #define SNOWBALL_PM_GPIO1_GPIO         MOP500_AB8500_PIN_GPIO(2)       /* SYSCLKREQ3/GPIO2 */
index 7379075370040f623842f07a78724657131cdbce..ec35f0aa5665a99d23f11c73ec552ab6e83f3aca 100644 (file)
@@ -223,6 +223,13 @@ int clk_set_rate(struct clk *clk, unsigned long rate)
 }
 EXPORT_SYMBOL(clk_set_rate);
 
+int clk_set_parent(struct clk *clk, struct clk *parent)
+{
+       /*TODO*/
+       return -ENOSYS;
+}
+EXPORT_SYMBOL(clk_set_parent);
+
 static void clk_prcmu_enable(struct clk *clk)
 {
        void __iomem *cg_set_reg = __io_address(U8500_PRCMU_BASE)
index 074490705229a73a987b380441ad569d083d8ef1..d776ada08dbf1062b0cb8d5733a31c00dcc7a78b 100644 (file)
@@ -21,6 +21,7 @@ struct clkops {
        void (*enable) (struct clk *);
        void (*disable) (struct clk *);
        unsigned long (*get_rate) (struct clk *);
+       int (*set_parent)(struct clk *, struct clk *);
 };
 
 /**
index a7c6cdc9b11e5cacfb846215f2f88af9835c00a4..6e66d3777ed51723deb030b45a4558518c5130c7 100644 (file)
@@ -101,6 +101,9 @@ static const dma_addr_t dma40_tx_map[DB8500_DMA_NR_DEV] = {
        [DB8500_DMA_DEV41_SD_MM3_TX] = -1,
        [DB8500_DMA_DEV42_SD_MM4_TX] = -1,
        [DB8500_DMA_DEV43_SD_MM5_TX] = -1,
+       [DB8500_DMA_DEV14_MSP2_TX] = U8500_MSP2_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV30_MSP1_TX] = U8500_MSP1_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV31_MSP0_TX_SLIM0_CH0_TX] = U8500_MSP0_BASE + MSP_TX_RX_REG_OFFSET,
 };
 
 /* Mapping between source event lines and physical device address */
@@ -133,6 +136,9 @@ static const dma_addr_t dma40_rx_map[DB8500_DMA_NR_DEV] = {
        [DB8500_DMA_DEV41_SD_MM3_RX] = -1,
        [DB8500_DMA_DEV42_SD_MM4_RX] = -1,
        [DB8500_DMA_DEV43_SD_MM5_RX] = -1,
+       [DB8500_DMA_DEV14_MSP2_RX] = U8500_MSP2_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV30_MSP3_RX] = U8500_MSP3_BASE + MSP_TX_RX_REG_OFFSET,
+       [DB8500_DMA_DEV31_MSP0_RX_SLIM0_CH0_RX] = U8500_MSP0_BASE + MSP_TX_RX_REG_OFFSET,
 };
 
 /* Reserved event lines for memcpy only */
index b6ba26a1367da3ebffcc2cfa794a2f7c3497743c..d93d6dbef25b8a0a9c8c8a1647cb0bc93517ba0f 100644 (file)
@@ -30,6 +30,8 @@
 #include <mach/db8500-regs.h>
 #include <mach/db5500-regs.h>
 
+#define MSP_TX_RX_REG_OFFSET   0
+
 #ifndef __ASSEMBLY__
 
 #include <mach/id.h>
index 9db68d264c5f727c1fffc15f5a563d4b2a9d9a65..c23a6b5f0c4eefd58220620043316d999b3d651d 100644 (file)
@@ -43,7 +43,7 @@
 /* This will be overridden by board-specific irq headers */
 #define IRQ_BOARD_END          IRQ_BOARD_START
 
-#ifdef CONFIG_MACH_U8500
+#ifdef CONFIG_MACH_MOP500
 #include <mach/irqs-board-mop500.h>
 #endif
 
index f0726d48df2276f4ec4baa0ac76e4ec678ba96ce..c61ec0fc10d47899c1ffc8dfb361fa1de73f273a 100644 (file)
 #define MX25_PAD_NFRB__GPIO_3_31       IOMUX_PAD(0x27c, 0x084, 0x15, 0, 0, NO_PAD_CTRL)
 
 #define MX25_PAD_D15__D15              IOMUX_PAD(0x280, 0x088, 0x00, 0, 0, NO_PAD_CTRL)
-#define MX25_PAD_D15__LD16             IOMUX_PAD(0x280, 0x088, 0x01, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_D15__LD16             IOMUX_PAD(0x280, 0x088, 0x01, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_D15__GPIO_4_5         IOMUX_PAD(0x280, 0x088, 0x05, 0, 0, NO_PAD_CTRL)
 
 #define MX25_PAD_D14__D14              IOMUX_PAD(0x284, 0x08c, 0x00, 0, 0, NO_PAD_CTRL)
-#define MX25_PAD_D14__LD17             IOMUX_PAD(0x284, 0x08c, 0x01, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_D14__LD17             IOMUX_PAD(0x284, 0x08c, 0x01, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_D14__GPIO_4_6         IOMUX_PAD(0x284, 0x08c, 0x05, 0, 0, NO_PAD_CTRL)
 
 #define MX25_PAD_D13__D13              IOMUX_PAD(0x288, 0x090, 0x00, 0, 0, NO_PAD_CTRL)
-#define MX25_PAD_D13__LD18             IOMUX_PAD(0x288, 0x090, 0x01, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_D13__LD18             IOMUX_PAD(0x288, 0x090, 0x01, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_D13__GPIO_4_7         IOMUX_PAD(0x288, 0x090, 0x05, 0, 0, NO_PAD_CTRL)
 
 #define MX25_PAD_D12__D12              IOMUX_PAD(0x28c, 0x094, 0x00, 0, 0, NO_PAD_CTRL)
 #define MX25_PAD_D0__D0                        IOMUX_PAD(0x2bc, 0x0c4, 0x00, 0, 0, NO_PAD_CTRL)
 #define MX25_PAD_D0__GPIO_4_20         IOMUX_PAD(0x2bc, 0x0c4, 0x05, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD0__LD0              IOMUX_PAD(0x2c0, 0x0c8, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD0__LD0              IOMUX_PAD(0x2c0, 0x0c8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD0__CSI_D0           IOMUX_PAD(0x2c0, 0x0c8, 0x12, 0x488, 0, NO_PAD_CTRL)
 #define MX25_PAD_LD0__GPIO_2_15                IOMUX_PAD(0x2c0, 0x0c8, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD1__LD1              IOMUX_PAD(0x2c4, 0x0cc, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD1__LD1              IOMUX_PAD(0x2c4, 0x0cc, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD1__CSI_D1           IOMUX_PAD(0x2c4, 0x0cc, 0x12, 0x48c, 0, NO_PAD_CTRL)
 #define MX25_PAD_LD1__GPIO_2_16                IOMUX_PAD(0x2c4, 0x0cc, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD2__LD2              IOMUX_PAD(0x2c8, 0x0d0, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD2__LD2              IOMUX_PAD(0x2c8, 0x0d0, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD2__GPIO_2_17                IOMUX_PAD(0x2c8, 0x0d0, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD3__LD3              IOMUX_PAD(0x2cc, 0x0d4, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD3__LD3              IOMUX_PAD(0x2cc, 0x0d4, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD3__GPIO_2_18                IOMUX_PAD(0x2cc, 0x0d4, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD4__LD4              IOMUX_PAD(0x2d0, 0x0d8, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD4__LD4              IOMUX_PAD(0x2d0, 0x0d8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD4__GPIO_2_19                IOMUX_PAD(0x2d0, 0x0d8, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD5__LD5              IOMUX_PAD(0x2d4, 0x0dc, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD5__LD5              IOMUX_PAD(0x2d4, 0x0dc, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD5__GPIO_1_19                IOMUX_PAD(0x2d4, 0x0dc, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD6__LD6              IOMUX_PAD(0x2d8, 0x0e0, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD6__LD6              IOMUX_PAD(0x2d8, 0x0e0, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD6__GPIO_1_20                IOMUX_PAD(0x2d8, 0x0e0, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD7__LD7              IOMUX_PAD(0x2dc, 0x0e4, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD7__LD7              IOMUX_PAD(0x2dc, 0x0e4, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD7__GPIO_1_21                IOMUX_PAD(0x2dc, 0x0e4, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD8__LD8              IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD8__LD8              IOMUX_PAD(0x2e0, 0x0e8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD8__FEC_TX_ERR       IOMUX_PAD(0x2e0, 0x0e8, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD9__LD9              IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD9__LD9              IOMUX_PAD(0x2e4, 0x0ec, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD9__FEC_COL          IOMUX_PAD(0x2e4, 0x0ec, 0x15, 0x504, 1, NO_PAD_CTRL)
 
-#define MX25_PAD_LD10__LD10            IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD10__LD10            IOMUX_PAD(0x2e8, 0x0f0, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD10__FEC_RX_ER       IOMUX_PAD(0x2e8, 0x0f0, 0x15, 0x518, 1, NO_PAD_CTRL)
 
-#define MX25_PAD_LD11__LD11            IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD11__LD11            IOMUX_PAD(0x2ec, 0x0f4, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD11__FEC_RDATA2      IOMUX_PAD(0x2ec, 0x0f4, 0x15, 0x50c, 1, NO_PAD_CTRL)
 
-#define MX25_PAD_LD12__LD12            IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD12__LD12            IOMUX_PAD(0x2f0, 0x0f8, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD12__FEC_RDATA3      IOMUX_PAD(0x2f0, 0x0f8, 0x15, 0x510, 1, NO_PAD_CTRL)
 
-#define MX25_PAD_LD13__LD13            IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD13__LD13            IOMUX_PAD(0x2f4, 0x0fc, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD13__FEC_TDATA2      IOMUX_PAD(0x2f4, 0x0fc, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD14__LD14            IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD14__LD14            IOMUX_PAD(0x2f8, 0x100, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD14__FEC_TDATA3      IOMUX_PAD(0x2f8, 0x100, 0x15, 0, 0, NO_PAD_CTRL)
 
-#define MX25_PAD_LD15__LD15            IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_LD15__LD15            IOMUX_PAD(0x2fc, 0x104, 0x10, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_LD15__FEC_RX_CLK      IOMUX_PAD(0x2fc, 0x104, 0x15, 0x514, 1, NO_PAD_CTRL)
 
 #define MX25_PAD_HSYNC__HSYNC          IOMUX_PAD(0x300, 0x108, 0x10, 0, 0, NO_PAD_CTRL)
 #define MX25_PAD_GPIO_C__CAN2_TX       IOMUX_PAD(0x3f8, 0x1fc, 0x16, 0, 0, PAD_CTL_PUS_22K_UP)
 
 #define MX25_PAD_GPIO_D__GPIO_D                IOMUX_PAD(0x3fc, 0x200, 0x10, 0, 0, NO_PAD_CTRL)
-#define MX25_PAD_GPIO_E__LD16          IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_GPIO_E__LD16          IOMUX_PAD(0x400, 0x204, 0x02, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_GPIO_D__CAN2_RX       IOMUX_PAD(0x3fc, 0x200, 0x16, 0x484, 1, PAD_CTL_PUS_22K_UP)
 
 #define MX25_PAD_GPIO_E__GPIO_E                IOMUX_PAD(0x400, 0x204, 0x10, 0, 0, NO_PAD_CTRL)
-#define MX25_PAD_GPIO_F__LD17          IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, NO_PAD_CTRL)
+#define MX25_PAD_GPIO_F__LD17          IOMUX_PAD(0x404, 0x208, 0x02, 0, 0, PAD_CTL_SRE_FAST)
 #define MX25_PAD_GPIO_E__AUD7_TXD      IOMUX_PAD(0x400, 0x204, 0x14, 0, 0, NO_PAD_CTRL)
 
 #define MX25_PAD_GPIO_F__GPIO_F                IOMUX_PAD(0x404, 0x208, 0x10, 0, 0, NO_PAD_CTRL)
index 567e4b54f245d9684d3525178eed385052d55d2d..56b6f8b7053e3f842ce8a67bdea2d3cb8663b11b 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/clk.h>
 #include <linux/mutex.h>
 #include <linux/cpufreq.h>
-#include <linux/debugfs.h>
 #include <linux/io.h>
 
 #include <plat/clock.h>
index 002fb4d96bbc7020b6158b469040faf29c72b891..cb856fe0434a2b4ba0316381365498d9184b6911 100644 (file)
@@ -2125,7 +2125,7 @@ static int __devexit omap_system_dma_remove(struct platform_device *pdev)
 
 static struct platform_driver omap_system_dma_driver = {
        .probe          = omap_system_dma_probe,
-       .remove         = omap_system_dma_remove,
+       .remove         = __devexit_p(omap_system_dma_remove),
        .driver         = {
                .name   = "omap_dma_system"
        },
index af3b92be84593384f96c5c8c59f74d10c108e22d..0b77fe87e0104b2614ac7e493fc7467e2bb2bf4c 100644 (file)
@@ -80,9 +80,9 @@ static void omap_dm_timer_write_reg(struct omap_dm_timer *timer, u32 reg,
 
 static void omap_timer_restore_context(struct omap_dm_timer *timer)
 {
-       omap_dm_timer_write_reg(timer, OMAP_TIMER_OCP_CFG_OFFSET,
-                               timer->context.tiocp_cfg);
-       if (timer->revision > 1)
+       __raw_writel(timer->context.tiocp_cfg,
+                       timer->io_base + OMAP_TIMER_OCP_CFG_OFFSET);
+       if (timer->revision == 1)
                __raw_writel(timer->context.tistat, timer->sys_stat);
 
        __raw_writel(timer->context.tisr, timer->irq_stat);
@@ -357,6 +357,19 @@ int omap_dm_timer_stop(struct omap_dm_timer *timer)
 
        __omap_dm_timer_stop(timer, timer->posted, rate);
 
+       if (timer->loses_context && timer->get_context_loss_count)
+               timer->ctx_loss_count =
+                       timer->get_context_loss_count(&timer->pdev->dev);
+
+       /*
+        * Since the register values are computed and written within
+        * __omap_dm_timer_stop, we need to use read to retrieve the
+        * context.
+        */
+       timer->context.tclr =
+                       omap_dm_timer_read_reg(timer, OMAP_TIMER_CTRL_REG);
+       timer->context.tisr = __raw_readl(timer->irq_stat);
+       omap_dm_timer_disable(timer);
        return 0;
 }
 EXPORT_SYMBOL_GPL(omap_dm_timer_stop);
index 6b51086fce18c9360fda3fb0bbc396422e3973ff..4f18eaed451167b2a8ad7a9b358cb6a6a9f9cc16 100644 (file)
@@ -250,7 +250,6 @@ IS_AM_SUBCLASS(335x, 0x335)
  * cpu_is_omap2423():  True for OMAP2423
  * cpu_is_omap2430():  True for OMAP2430
  * cpu_is_omap3430():  True for OMAP3430
- * cpu_is_omap4430():  True for OMAP4430
  * cpu_is_omap3505():  True for OMAP3505
  * cpu_is_omap3517():  True for OMAP3517
  */
@@ -299,7 +298,6 @@ IS_OMAP_TYPE(3517, 0x3517)
 #define cpu_is_omap3505()              0
 #define cpu_is_omap3517()              0
 #define cpu_is_omap3430()              0
-#define cpu_is_omap4430()              0
 #define cpu_is_omap3630()              0
 
 /*
index 51423d2727a5f9b11ef886e1548905bc6a0e3ef4..05f7615b61f0d20b19a726fff23f5783a9949878 100644 (file)
@@ -100,6 +100,13 @@ struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
                                         struct omap_device_pm_latency *pm_lats,
                                         int pm_lats_cnt, int is_early_device);
 
+struct omap_device *omap_device_alloc(struct platform_device *pdev,
+                                     struct omap_hwmod **ohs, int oh_cnt,
+                                     struct omap_device_pm_latency *pm_lats,
+                                     int pm_lats_cnt);
+void omap_device_delete(struct omap_device *od);
+int omap_device_register(struct platform_device *pdev);
+
 void __iomem *omap_device_get_rt_va(struct omap_device *od);
 struct device *omap_device_get_by_hwmod_name(const char *oh_name);
 
index 75aa1b2bef519eaa8958c37a7050df66c022848a..227ae26575549eb3e1ad488247dc9af08d4bbcef 100644 (file)
@@ -101,4 +101,5 @@ static inline void omap_push_sram_idle(void) {}
 #else
 #define OMAP4_SRAM_PA          0x40300000
 #endif
+#define AM33XX_SRAM_PA         0x40300000
 #endif
index ad80112c22751defaaa4cb5b9aefe11eac27e6be..ad32621aa52e259fe20346d60f5d9f7d38edbad6 100644 (file)
@@ -307,7 +307,7 @@ static void omap_mbox_fini(struct omap_mbox *mbox)
        if (!--mbox->use_count) {
                free_irq(mbox->irq, mbox);
                tasklet_kill(&mbox->txq->tasklet);
-       flush_work_sync(&mbox->rxq->work);
+               flush_work_sync(&mbox->rxq->work);
                mbox_queue_free(mbox->txq);
                mbox_queue_free(mbox->rxq);
        }
index e8d98693d2dd1fd0ac11a175510738cae8419c72..2d00ab01d1504f678b045272d139fb02a65b7a41 100644 (file)
@@ -1,3 +1,4 @@
+
 /*
  * omap_device implementation
  *
 #define USE_WAKEUP_LAT                 0
 #define IGNORE_WAKEUP_LAT              1
 
-static int omap_device_register(struct platform_device *pdev);
 static int omap_early_device_register(struct platform_device *pdev);
-static struct omap_device *omap_device_alloc(struct platform_device *pdev,
-                                     struct omap_hwmod **ohs, int oh_cnt,
-                                     struct omap_device_pm_latency *pm_lats,
-                                     int pm_lats_cnt);
-static void omap_device_delete(struct omap_device *od);
-
 
 static struct omap_device_pm_latency omap_default_latency[] = {
        {
@@ -509,7 +503,7 @@ static int omap_device_fill_resources(struct omap_device *od,
  *
  * Returns an struct omap_device pointer or ERR_PTR() on error;
  */
-static struct omap_device *omap_device_alloc(struct platform_device *pdev,
+struct omap_device *omap_device_alloc(struct platform_device *pdev,
                                        struct omap_hwmod **ohs, int oh_cnt,
                                        struct omap_device_pm_latency *pm_lats,
                                        int pm_lats_cnt)
@@ -591,7 +585,7 @@ oda_exit1:
        return ERR_PTR(ret);
 }
 
-static void omap_device_delete(struct omap_device *od)
+void omap_device_delete(struct omap_device *od)
 {
        if (!od)
                return;
@@ -619,7 +613,7 @@ static void omap_device_delete(struct omap_device *od)
  * information.  Returns ERR_PTR(-EINVAL) if @oh is NULL; otherwise,
  * passes along the return value of omap_device_build_ss().
  */
-struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
+struct platform_device __init *omap_device_build(const char *pdev_name, int pdev_id,
                                      struct omap_hwmod *oh, void *pdata,
                                      int pdata_len,
                                      struct omap_device_pm_latency *pm_lats,
@@ -652,7 +646,7 @@ struct platform_device *omap_device_build(const char *pdev_name, int pdev_id,
  * platform_device record.  Returns an ERR_PTR() on error, or passes
  * along the return value of omap_device_register().
  */
-struct platform_device *omap_device_build_ss(const char *pdev_name, int pdev_id,
+struct platform_device __init *omap_device_build_ss(const char *pdev_name, int pdev_id,
                                         struct omap_hwmod **ohs, int oh_cnt,
                                         void *pdata, int pdata_len,
                                         struct omap_device_pm_latency *pm_lats,
@@ -717,7 +711,7 @@ odbs_exit:
  * platform_early_add_device() on the underlying platform_device.
  * Returns 0 by default.
  */
-static int omap_early_device_register(struct platform_device *pdev)
+static int __init omap_early_device_register(struct platform_device *pdev)
 {
        struct platform_device *devices[1];
 
@@ -817,7 +811,7 @@ static struct dev_pm_domain omap_device_pm_domain = {
  * platform_device_register() on the underlying platform_device.
  * Returns the return value of platform_device_register().
  */
-static int omap_device_register(struct platform_device *pdev)
+int omap_device_register(struct platform_device *pdev)
 {
        pr_debug("omap_device: %s: registering\n", pdev->name);
 
index 4243bdcc87bcb99fe8ba3f26341757cd47ea41d9..596f2224e15ad795f4eca6fb68a00d40353d7394 100644 (file)
@@ -86,7 +86,7 @@ static int is_sram_locked(void)
                        __raw_writel(0xCFDE, OMAP24XX_VA_READPERM0);  /* all i-read */
                        __raw_writel(0xCFDE, OMAP24XX_VA_WRITEPERM0); /* all i-write */
                }
-               if (cpu_is_omap34xx()) {
+               if (cpu_is_omap34xx() && !cpu_is_am33xx()) {
                        __raw_writel(0xFFFF, OMAP34XX_VA_REQINFOPERM0); /* all q-vects */
                        __raw_writel(0xFFFF, OMAP34XX_VA_READPERM0);  /* all i-read */
                        __raw_writel(0xFFFF, OMAP34XX_VA_WRITEPERM0); /* all i-write */
@@ -124,7 +124,10 @@ static void __init omap_detect_sram(void)
                                omap_sram_size = 0x800; /* 2K */
                        }
                } else {
-                       if (cpu_is_omap34xx()) {
+                       if (cpu_is_am33xx()) {
+                               omap_sram_start = AM33XX_SRAM_PA;
+                               omap_sram_size = 0x10000; /* 64K */
+                       } else if (cpu_is_omap34xx()) {
                                omap_sram_start = OMAP3_SRAM_PA;
                                omap_sram_size = 0x10000; /* 64K */
                        } else if (cpu_is_omap44xx()) {
@@ -368,6 +371,11 @@ static inline int omap34xx_sram_init(void)
        return 0;
 }
 
+static inline int am33xx_sram_init(void)
+{
+       return 0;
+}
+
 int __init omap_sram_init(void)
 {
        omap_detect_sram();
@@ -379,6 +387,8 @@ int __init omap_sram_init(void)
                omap242x_sram_init();
        else if (cpu_is_omap2430())
                omap243x_sram_init();
+       else if (cpu_is_am33xx())
+               am33xx_sram_init();
        else if (cpu_is_omap34xx())
                omap34xx_sram_init();