]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
Merge branch 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorArnd Bergmann <arnd@arndb.de>
Wed, 29 Feb 2012 20:53:57 +0000 (20:53 +0000)
committerArnd Bergmann <arnd@arndb.de>
Wed, 29 Feb 2012 20:53:57 +0000 (20:53 +0000)
* 'fixes-non-critical' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  OMAP4: dma: Correct CPU version check for dma_common_ch_end
  ARM: OMAP: Fix section mismatch warning for platform_cpu_die()
  ARM: OMAP: fix section mismatch warning for omap4_hotplug_cpu()
  ARM: OMAP: convert omap_device_build() and callers to __init
  ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init
  ARM: OMAP2+: Fix multiple randconfig errors with SOC_OMAP and SOC_OMAP_NOOP
  ARM: OMAP: Fix devexit for dma when CONFIG_HOTPLUG is not set
  ARM: OMAP2+: Fix devexit for smartreflex when CONFIG_HOTPLUG is not set
  ARM: OMAP2+: Fix zoom LCD backlight if TWL_CORE is not selected
  ARM: OMAP2+: Fix board_mux section type conflict when OMAP_MUX is not set
  ARM: OMAP2+: Fix OMAP_HDQ_BASE build error
  ARM: OMAP2+: Fix Kconfig dependencies for USB_ARCH_HAS_EHCI
  ARM: OMAP2+: I2C: always compile I2C reset code, even if I2C driver is not built
  ARM: OMAP2+: Split omap2_hsmmc_init() to properly support I2C GPIO pins
  ARM: OMAP: omap_device: Expose omap_device_{alloc, delete, register}
  ARM: OMAP: Fix build error when mmc_omap is built as module
  ARM: OMAP: Fix kernel panic with HSMMC when twl4030_gpio is a module

42 files changed:
arch/arm/Makefile
arch/arm/mach-omap2/Kconfig
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-display.c
arch/arm/mach-omap2/board-zoom-peripherals.c
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/hsmmc.c
arch/arm/mach-omap2/hsmmc.h
arch/arm/mach-omap2/mcbsp.c
arch/arm/mach-omap2/mux.c
arch/arm/mach-omap2/mux.h
arch/arm/mach-omap2/omap-hotplug.c
arch/arm/mach-omap2/omap-mpuss-lowpower.c
arch/arm/mach-omap2/pm.c
arch/arm/mach-omap2/smartreflex.c
arch/arm/mach-omap2/sr_device.c
arch/arm/plat-omap/dma.c
arch/arm/plat-omap/include/plat/omap_device.h
arch/arm/plat-omap/omap_device.c

index 1683bfb9166fa0d8d1124a2d23f5d5d347cdc4a0..ea69448be0ed29b8dda34c03bcf27c230b437452 100644 (file)
@@ -164,9 +164,7 @@ machine-$(CONFIG_ARCH_MXS)          := mxs
 machine-$(CONFIG_ARCH_NETX)            := netx
 machine-$(CONFIG_ARCH_NOMADIK)         := nomadik
 machine-$(CONFIG_ARCH_OMAP1)           := omap1
-machine-$(CONFIG_ARCH_OMAP2)           := omap2
-machine-$(CONFIG_ARCH_OMAP3)           := omap2
-machine-$(CONFIG_ARCH_OMAP4)           := omap2
+machine-$(CONFIG_ARCH_OMAP2PLUS)       := omap2
 machine-$(CONFIG_ARCH_ORION5X)         := orion5x
 machine-$(CONFIG_ARCH_PICOXCELL)       := picoxcell
 machine-$(CONFIG_ARCH_PNX4008)         := pnx4008
index d965da45160e67c4e03056a7d8c0d72178575042..c4ae0a77f7b40dc436fbb252cd6aa7be00837a12 100644 (file)
@@ -21,27 +21,21 @@ config ARCH_OMAP2PLUS_TYPICAL
          Compile a kernel suitable for booting most boards
 
 config ARCH_OMAP2
-       bool "TI OMAP2"
-       depends on ARCH_OMAP2PLUS
-       default y
+       bool
        select CPU_V6
        select MULTI_IRQ_HANDLER
 
 config ARCH_OMAP3
-       bool "TI OMAP3"
-       depends on ARCH_OMAP2PLUS
-       default y
+       bool
        select CPU_V7
-       select USB_ARCH_HAS_EHCI
+       select USB_ARCH_HAS_EHCI if USB_SUPPORT
        select ARCH_HAS_OPP
        select PM_OPP if PM
        select ARM_CPU_SUSPEND if PM
        select MULTI_IRQ_HANDLER
 
 config ARCH_OMAP4
-       bool "TI OMAP4"
-       default y
-       depends on ARCH_OMAP2PLUS
+       bool
        select CACHE_L2X0
        select CPU_V7
        select ARM_GIC
@@ -52,40 +46,62 @@ config ARCH_OMAP4
        select ARM_ERRATA_720789
        select ARCH_HAS_OPP
        select PM_OPP if PM
-       select USB_ARCH_HAS_EHCI
+       select USB_ARCH_HAS_EHCI if USB_SUPPORT
        select ARM_CPU_SUSPEND if PM
 
 comment "OMAP Core Type"
-       depends on ARCH_OMAP2
+
+config SOC_OMAP
+       bool
 
 config SOC_OMAP2420
        bool "OMAP2420 support"
-       depends on ARCH_OMAP2
        default y
+       select SOC_OMAP
+       select ARCH_OMAP2
        select OMAP_DM_TIMER
        select ARCH_OMAP_OTG
 
 config SOC_OMAP2430
        bool "OMAP2430 support"
-       depends on ARCH_OMAP2
        default y
+       select SOC_OMAP
+       select ARCH_OMAP2
        select ARCH_OMAP_OTG
 
 config SOC_OMAP3430
        bool "OMAP3430 support"
-       depends on ARCH_OMAP3
        default y
+       select SOC_OMAP
+       select ARCH_OMAP3
        select ARCH_OMAP_OTG
 
 config SOC_OMAPTI81XX
        bool "TI81XX support"
-       depends on ARCH_OMAP3
        default y
+       select SOC_OMAP
+       select ARCH_OMAP3
 
 config SOC_OMAPAM33XX
        bool "AM33XX support"
-       depends on ARCH_OMAP3
        default y
+       select SOC_OMAP
+       select ARCH_OMAP3
+
+config SOC_OMAP44XX
+       bool "OMAP44XX support"
+       default y
+       select SOC_OMAP
+       select ARCH_OMAP4
+
+config SOC_OMAP_NOOP
+       bool
+       depends on !SOC_OMAP
+       default y
+       select ARCH_OMAP2
+       select ARCH_OMAP3
+       select ARCH_OMAP4
+       select MACH_OMAP_GENERIC
 
 config OMAP_PACKAGE_ZAF
        bool
@@ -112,17 +128,17 @@ config OMAP_PACKAGE_CBS
        bool
 
 comment "OMAP Board Type"
-       depends on ARCH_OMAP2PLUS
 
 config MACH_OMAP_GENERIC
        bool "Generic OMAP2+ board"
-       depends on ARCH_OMAP2PLUS
        select USE_OF
        default y
        help
          Support for generic TI OMAP2+ boards using Flattened Device Tree.
          More information at Documentation/devicetree
 
+if SOC_OMAP
+
 config MACH_OMAP2_TUSB6010
        bool
        depends on ARCH_OMAP2 && SOC_OMAP2420
@@ -343,6 +359,7 @@ config MACH_OMAP4_PANDA
        select OMAP_PACKAGE_CBS
        select REGULATOR_FIXED_VOLTAGE if REGULATOR
 
+endif
 config OMAP3_EMU
        bool "OMAP3 debugging peripherals"
        depends on ARCH_OMAP3
index bd76394ccaf8c90de32b824dc5dc65675a73fb18..56a6e98652cce0cf350385edccf281cc4591c891 100644 (file)
@@ -4,7 +4,7 @@
 
 # Common support
 obj-y := id.o io.o control.o mux.o devices.o serial.o gpmc.o timer.o pm.o \
-        common.o gpio.o dma.o wd_timer.o display.o
+        common.o gpio.o dma.o wd_timer.o display.o i2c.o
 
 omap-2-3-common                                = irq.o sdrc.o
 hwmod-common                           = omap_hwmod.o \
@@ -182,9 +182,6 @@ obj-$(CONFIG_OMAP_IOMMU)            += iommu2.o
 iommu-$(CONFIG_OMAP_IOMMU)             := omap-iommu.o
 obj-y                                  += $(iommu-m) $(iommu-y)
 
-i2c-omap-$(CONFIG_I2C_OMAP)            := i2c.o
-obj-y                                  += $(i2c-omap-m) $(i2c-omap-y)
-
 ifneq ($(CONFIG_TIDSPBRIDGE),)
 obj-y                                  += dsp.o
 endif
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..b5bc9b2e286277bef7497e86f373e64a86273d90 100644 (file)
@@ -424,7 +424,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 42a4d11fad23de92c36cec7a87fe5ebfd34e4bbe..672262717601e012affe2a2f7e952c917ec22871 100644 (file)
@@ -371,7 +371,11 @@ static void n8x0_mmc_callback(void *data, u8 card_mask)
        else
                *openp = 0;
 
+#ifdef CONFIG_MMC_OMAP
        omap_mmc_notify_cover_event(mmc_device, index, *openp);
+#else
+       pr_warn("MMC: notify cover event not available\n");
+#endif
 }
 
 static int n8x0_mmc_late_init(struct device *dev)
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 c775bead1497c3f487e22696bee4b59c6c46eeed..6b77ad95981daf688203d66035d324d6feb09e42 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..ace466bcd76de9ea08d7c115b481704a895b06cf 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;
@@ -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 d4683ba5f72182aa47ef94267ff9dc97c446b043..2a13b9f6c61c07be76e024d26b6f167ce60ab247 100644 (file)
@@ -55,6 +55,7 @@ static void zoom_panel_disable_lcd(struct omap_dss_device *dssdev)
 
 static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
 {
+#ifdef CONFIG_TWL4030_CORE
        unsigned char c;
        u8 mux_pwm, enb_pwm;
 
@@ -90,6 +91,9 @@ static int zoom_set_bl_intensity(struct omap_dss_device *dssdev, int level)
        c = ((50 * (100 - level)) / 100) + 1;
        twl_i2c_write_u8(TWL4030_MODULE_PWM1, 0x7F, TWL_LED_PWMOFF);
        twl_i2c_write_u8(TWL4030_MODULE_PWM1, c, TWL_LED_PWMON);
+#else
+       pr_warn("Backlight not enabled\n");
+#endif
 
        return 0;
 }
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 283d11eae693115b42d2bbcca9176f019274960c..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";
@@ -654,9 +654,7 @@ void __init omap242x_init_mmc(struct omap_mmc_platform_data **mmc_data)
 /*-------------------------------------------------------------------------*/
 
 #if defined(CONFIG_HDQ_MASTER_OMAP) || defined(CONFIG_HDQ_MASTER_OMAP_MODULE)
-#if defined(CONFIG_SOC_OMAP2430) || defined(CONFIG_SOC_OMAP3430)
 #define OMAP_HDQ_BASE  0x480B2000
-#endif
 static struct resource omap_hdq_resources[] = {
        {
                .start          = OMAP_HDQ_BASE,
@@ -679,7 +677,10 @@ static struct platform_device omap_hdq_dev = {
 };
 static inline void omap_hdq_init(void)
 {
-       (void) platform_device_register(&omap_hdq_dev);
+       if (cpu_is_omap2420())
+               return;
+
+       platform_device_register(&omap_hdq_dev);
 }
 #else
 static inline void omap_hdq_init(void) {}
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 b40c288952987a2327d950abbfe374193f8f59e7..a97876da7fadf8099438b3bb13a63942e8ef2d7a 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;
 
@@ -428,69 +428,140 @@ static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
        return 0;
 }
 
+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 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;
 
-done:
+       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);
+
+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;
 
+       if (omap_hsmmc_done)
+               return;
+
+       omap_hsmmc_done = 1;
+
        if (!cpu_is_omap44xx()) {
                if (cpu_is_omap2430()) {
                        control_pbias_offset = OMAP243X_CONTROL_PBIAS_LITE;
@@ -515,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 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 fb8bc9fa43b140fbfd5050ebc478833877b8066f..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;
@@ -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 2132308ad1e41fffc14856b48294ffd42e748c8b..69fe060a0b755204875f42a9fd1e1ffc943736f9 100644 (file)
@@ -246,7 +246,7 @@ static inline void omap_hwmod_mux(struct omap_hwmod_mux_info *hmux, u8 state)
 {
 }
 
-static struct omap_board_mux *board_mux __initdata __maybe_unused;
+static struct omap_board_mux *board_mux __maybe_unused;
 
 #endif
 
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 1881fe9151495ba4fd542146fcee7c208565cb63..fb9b85bfc308bc23254dbc953512e56cfa2f357b 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;
index 7e755bb0ffc4c6a9bbfa906609cc370e383fdbf1..47c77a1d932a281d98847cbd5eb92575f49a16c7 100644 (file)
@@ -1012,7 +1012,7 @@ static int __devexit omap_sr_remove(struct platform_device *pdev)
 }
 
 static struct platform_driver smartreflex_driver = {
-       .remove         = omap_sr_remove,
+       .remove         = __devexit_p(omap_sr_remove),
        .driver         = {
                .name   = "smartreflex",
        },
index 9f43fcc05d3e5825b78e194e1929dd2d85c8799b..78c9437913ceeb9b1512af753c83a173d435251a 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 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 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 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);