Commit d1589f09 authored by Tony Lindgren's avatar Tony Lindgren

ARM: OMAP2+: Mark omap_hsmmc_init and omap_mux related functions as __init

Now that omap hsmmc init is split into two functions, it's safe
to mark omap_hsmmc_init and omap_mux related functions to __init.

This basically reverts the following fixes for the case where
TWL was compiled as a module:

a98f77bb (ARM: omap: fix section mismatch warning for sdp3430_twl_gpio_setup())
8930b4e3 (ARM: omap: fix section mismatch warnings in mux.c caused by hsmmc.c)

Additionally it fixes up the remaining section warnings for
all callers of omap_mux functions.

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 3b972bf0
...@@ -189,7 +189,7 @@ static u8 get_gpmc0_type(void) ...@@ -189,7 +189,7 @@ static u8 get_gpmc0_type(void)
* *
* @return - void. * @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) char chip_sel_board[][GPMC_CS_NUM], int nand_type)
{ {
u8 cs = 0; u8 cs = 0;
......
...@@ -273,8 +273,6 @@ static int beagle_twl_gpio_setup(struct device *dev, ...@@ -273,8 +273,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
{ {
int r; 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; mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp;
/* gpio + 0 is "mmc0_cd" (input/IRQ) */ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
...@@ -522,7 +520,11 @@ static void __init omap3_beagle_init(void) ...@@ -522,7 +520,11 @@ static void __init omap3_beagle_init(void)
{ {
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
omap3_beagle_init_rev(); 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); omap_hsmmc_init(mmc);
omap3_beagle_i2c_init(); omap3_beagle_i2c_init();
gpio_buttons[0].gpio = beagle_config.usr_button_gpio; gpio_buttons[0].gpio = beagle_config.usr_button_gpio;
......
...@@ -362,7 +362,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, ...@@ -362,7 +362,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
int r, lcd_bl_en; int r, lcd_bl_en;
/* gpio + 0 is "mmc0_cd" (input/IRQ) */ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
omap_mux_init_gpio(63, OMAP_PIN_INPUT);
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap_hsmmc_late_init(mmc); omap_hsmmc_late_init(mmc);
...@@ -645,7 +644,9 @@ static void __init omap3_evm_init(void) ...@@ -645,7 +644,9 @@ static void __init omap3_evm_init(void)
omap_board_config = omap3_evm_config; omap_board_config = omap3_evm_config;
omap_board_config_size = ARRAY_SIZE(omap3_evm_config); omap_board_config_size = ARRAY_SIZE(omap3_evm_config);
omap_mux_init_gpio(63, OMAP_PIN_INPUT);
omap_hsmmc_init(mmc); omap_hsmmc_init(mmc);
omap3_evm_i2c_init(); omap3_evm_i2c_init();
omap_display_init(&omap3_evm_dss_data); omap_display_init(&omap3_evm_dss_data);
......
...@@ -283,7 +283,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, ...@@ -283,7 +283,6 @@ omap3stalker_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio) unsigned gpio, unsigned ngpio)
{ {
/* gpio + 0 is "mmc0_cd" (input/IRQ) */ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
omap_mux_init_gpio(23, OMAP_PIN_INPUT);
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap_hsmmc_late_init(mmc); omap_hsmmc_late_init(mmc);
...@@ -426,7 +425,9 @@ static void __init omap3_stalker_init(void) ...@@ -426,7 +425,9 @@ static void __init omap3_stalker_init(void)
omap_board_config = omap3_stalker_config; omap_board_config = omap3_stalker_config;
omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); omap_board_config_size = ARRAY_SIZE(omap3_stalker_config);
omap_mux_init_gpio(23, OMAP_PIN_INPUT);
omap_hsmmc_init(mmc); omap_hsmmc_init(mmc);
omap3_stalker_i2c_init(); omap3_stalker_i2c_init();
platform_add_devices(omap3_stalker_devices, platform_add_devices(omap3_stalker_devices,
......
...@@ -118,12 +118,6 @@ static struct gpio_led gpio_leds[]; ...@@ -118,12 +118,6 @@ static struct gpio_led gpio_leds[];
static int touchbook_twl_gpio_setup(struct device *dev, static int touchbook_twl_gpio_setup(struct device *dev,
unsigned gpio, unsigned ngpio) 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) */ /* gpio + 0 is "mmc0_cd" (input/IRQ) */
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
omap_hsmmc_late_init(mmc); omap_hsmmc_late_init(mmc);
...@@ -352,7 +346,14 @@ static void __init omap3_touchbook_init(void) ...@@ -352,7 +346,14 @@ static void __init omap3_touchbook_init(void)
pm_power_off = omap3_touchbook_poweroff; 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); omap_hsmmc_init(mmc);
omap3_touchbook_i2c_init(); omap3_touchbook_i2c_init();
platform_add_devices(omap3_touchbook_devices, platform_add_devices(omap3_touchbook_devices,
ARRAY_SIZE(omap3_touchbook_devices)); ARRAY_SIZE(omap3_touchbook_devices));
......
...@@ -461,7 +461,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = { ...@@ -461,7 +461,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = {
.default_device = &omap4_panda_dvi_device, .default_device = &omap4_panda_dvi_device,
}; };
void omap4_panda_display_init(void) void __init omap4_panda_display_init(void)
{ {
int r; int r;
......
...@@ -124,7 +124,7 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) ...@@ -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 enable_mask, enable_shift;
u32 pipd_mask, pipd_shift; u32 pipd_mask, pipd_shift;
...@@ -157,7 +157,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) ...@@ -157,7 +157,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes)
return 0; 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()) if (cpu_is_omap44xx())
omap4_hdmi_mux_pads(flags); omap4_hdmi_mux_pads(flags);
...@@ -165,7 +165,7 @@ int omap_hdmi_init(enum omap_hdmi_flags flags) ...@@ -165,7 +165,7 @@ int omap_hdmi_init(enum omap_hdmi_flags flags)
return 0; 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()) if (cpu_is_omap44xx())
return omap4_dsi_mux_pads(dsi_id, lane_mask); 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) ...@@ -173,7 +173,7 @@ static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask)
return 0; 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()) if (cpu_is_omap44xx())
omap4_dsi_mux_pads(dsi_id, 0); omap4_dsi_mux_pads(dsi_id, 0);
......
...@@ -293,7 +293,7 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, ...@@ -293,7 +293,7 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller,
} }
} }
static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c,
struct omap_mmc_platform_data *mmc) struct omap_mmc_platform_data *mmc)
{ {
char *hc_name; char *hc_name;
...@@ -553,7 +553,7 @@ static void omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo, ...@@ -553,7 +553,7 @@ static void omap_hsmmc_init_one(struct omap2_hsmmc_info *hsmmcinfo,
kfree(mmc_data); kfree(mmc_data);
} }
void omap_hsmmc_init(struct omap2_hsmmc_info *controllers) void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers)
{ {
u32 reg; u32 reg;
......
...@@ -100,7 +100,7 @@ void omap_mux_write_array(struct omap_mux_partition *partition, ...@@ -100,7 +100,7 @@ void omap_mux_write_array(struct omap_mux_partition *partition,
static char *omap_mux_options; static char *omap_mux_options;
static int _omap_mux_init_gpio(struct omap_mux_partition *partition, static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition,
int gpio, int val) int gpio, int val)
{ {
struct omap_mux_entry *e; struct omap_mux_entry *e;
...@@ -145,7 +145,7 @@ static int _omap_mux_init_gpio(struct omap_mux_partition *partition, ...@@ -145,7 +145,7 @@ static int _omap_mux_init_gpio(struct omap_mux_partition *partition,
return 0; 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; struct omap_mux_partition *partition;
int ret; int ret;
...@@ -159,7 +159,7 @@ int omap_mux_init_gpio(int gpio, int val) ...@@ -159,7 +159,7 @@ int omap_mux_init_gpio(int gpio, int val)
return -ENODEV; return -ENODEV;
} }
static int _omap_mux_get_by_name(struct omap_mux_partition *partition, static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition,
const char *muxname, const char *muxname,
struct omap_mux **found_mux) struct omap_mux **found_mux)
{ {
...@@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition, ...@@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition,
return -ENODEV; return -ENODEV;
} }
static int static int __init
omap_mux_get_by_name(const char *muxname, omap_mux_get_by_name(const char *muxname,
struct omap_mux_partition **found_partition, struct omap_mux_partition **found_partition,
struct omap_mux **found_mux) struct omap_mux **found_mux)
...@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname, ...@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname,
return -ENODEV; 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_partition *partition = NULL;
struct omap_mux *mux = NULL; struct omap_mux *mux = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment