diff options
author | Tony Lindgren <tony@atomide.com> | 2012-02-20 12:43:30 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2012-02-24 16:04:10 -0500 |
commit | d1589f0912533e6cb2ac8fd6f1feb3d5989fe8cb (patch) | |
tree | 5dea58c939bcf51d8188a0e488d033807e4758a3 /arch/arm/mach-omap2 | |
parent | 3b972bf06c22f5abfa6586a8baf50321cd825965 (diff) |
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:
a98f77b (ARM: omap: fix section mismatch warning for sdp3430_twl_gpio_setup())
8930b4e (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: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r-- | arch/arm/mach-omap2/board-flash.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3stalker.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3touchbook.c | 13 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/display.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-omap2/hsmmc.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-omap2/mux.c | 16 |
9 files changed, 32 insertions, 27 deletions
diff --git a/arch/arm/mach-omap2/board-flash.c b/arch/arm/mach-omap2/board-flash.c index 30a6f527510c..0349fd2b68d8 100644 --- a/arch/arm/mach-omap2/board-flash.c +++ b/arch/arm/mach-omap2/board-flash.c | |||
@@ -189,7 +189,7 @@ unmap: | |||
189 | * | 189 | * |
190 | * @return - void. | 190 | * @return - void. |
191 | */ | 191 | */ |
192 | void board_flash_init(struct flash_partitions partition_info[], | 192 | void __init board_flash_init(struct flash_partitions partition_info[], |
193 | char chip_sel_board[][GPMC_CS_NUM], int nand_type) | 193 | char chip_sel_board[][GPMC_CS_NUM], int nand_type) |
194 | { | 194 | { |
195 | u8 cs = 0; | 195 | u8 cs = 0; |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 78bfcd5d5a78..7be8d659d91d 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -273,8 +273,6 @@ static int beagle_twl_gpio_setup(struct device *dev, | |||
273 | { | 273 | { |
274 | int r; | 274 | int r; |
275 | 275 | ||
276 | if (beagle_config.mmc1_gpio_wp != -EINVAL) | ||
277 | omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); | ||
278 | mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp; | 276 | mmc[0].gpio_wp = beagle_config.mmc1_gpio_wp; |
279 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 277 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
280 | mmc[0].gpio_cd = gpio + 0; | 278 | mmc[0].gpio_cd = gpio + 0; |
@@ -522,7 +520,11 @@ static void __init omap3_beagle_init(void) | |||
522 | { | 520 | { |
523 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); | 521 | omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); |
524 | omap3_beagle_init_rev(); | 522 | omap3_beagle_init_rev(); |
523 | |||
524 | if (beagle_config.mmc1_gpio_wp != -EINVAL) | ||
525 | omap_mux_init_gpio(beagle_config.mmc1_gpio_wp, OMAP_PIN_INPUT); | ||
525 | omap_hsmmc_init(mmc); | 526 | omap_hsmmc_init(mmc); |
527 | |||
526 | omap3_beagle_i2c_init(); | 528 | omap3_beagle_i2c_init(); |
527 | 529 | ||
528 | gpio_buttons[0].gpio = beagle_config.usr_button_gpio; | 530 | gpio_buttons[0].gpio = beagle_config.usr_button_gpio; |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index 3d585b81669a..6b77ad95981d 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -362,7 +362,6 @@ static int omap3evm_twl_gpio_setup(struct device *dev, | |||
362 | int r, lcd_bl_en; | 362 | int r, lcd_bl_en; |
363 | 363 | ||
364 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 364 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
365 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | ||
366 | mmc[0].gpio_cd = gpio + 0; | 365 | mmc[0].gpio_cd = gpio + 0; |
367 | omap_hsmmc_late_init(mmc); | 366 | omap_hsmmc_late_init(mmc); |
368 | 367 | ||
@@ -645,7 +644,9 @@ static void __init omap3_evm_init(void) | |||
645 | omap_board_config = omap3_evm_config; | 644 | omap_board_config = omap3_evm_config; |
646 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); | 645 | omap_board_config_size = ARRAY_SIZE(omap3_evm_config); |
647 | 646 | ||
647 | omap_mux_init_gpio(63, OMAP_PIN_INPUT); | ||
648 | omap_hsmmc_init(mmc); | 648 | omap_hsmmc_init(mmc); |
649 | |||
649 | omap3_evm_i2c_init(); | 650 | omap3_evm_i2c_init(); |
650 | 651 | ||
651 | omap_display_init(&omap3_evm_dss_data); | 652 | omap_display_init(&omap3_evm_dss_data); |
diff --git a/arch/arm/mach-omap2/board-omap3stalker.c b/arch/arm/mach-omap2/board-omap3stalker.c index 8eee9930ee5f..641004380795 100644 --- a/arch/arm/mach-omap2/board-omap3stalker.c +++ b/arch/arm/mach-omap2/board-omap3stalker.c | |||
@@ -283,7 +283,6 @@ omap3stalker_twl_gpio_setup(struct device *dev, | |||
283 | unsigned gpio, unsigned ngpio) | 283 | unsigned gpio, unsigned ngpio) |
284 | { | 284 | { |
285 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 285 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
286 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); | ||
287 | mmc[0].gpio_cd = gpio + 0; | 286 | mmc[0].gpio_cd = gpio + 0; |
288 | omap_hsmmc_late_init(mmc); | 287 | omap_hsmmc_late_init(mmc); |
289 | 288 | ||
@@ -426,7 +425,9 @@ static void __init omap3_stalker_init(void) | |||
426 | omap_board_config = omap3_stalker_config; | 425 | omap_board_config = omap3_stalker_config; |
427 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); | 426 | omap_board_config_size = ARRAY_SIZE(omap3_stalker_config); |
428 | 427 | ||
428 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); | ||
429 | omap_hsmmc_init(mmc); | 429 | omap_hsmmc_init(mmc); |
430 | |||
430 | omap3_stalker_i2c_init(); | 431 | omap3_stalker_i2c_init(); |
431 | 432 | ||
432 | platform_add_devices(omap3_stalker_devices, | 433 | platform_add_devices(omap3_stalker_devices, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index ba9c118862e6..8842e04aef01 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -118,12 +118,6 @@ static struct gpio_led gpio_leds[]; | |||
118 | static int touchbook_twl_gpio_setup(struct device *dev, | 118 | static int touchbook_twl_gpio_setup(struct device *dev, |
119 | unsigned gpio, unsigned ngpio) | 119 | unsigned gpio, unsigned ngpio) |
120 | { | 120 | { |
121 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { | ||
122 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); | ||
123 | mmc[0].gpio_wp = 23; | ||
124 | } else { | ||
125 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); | ||
126 | } | ||
127 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ | 121 | /* gpio + 0 is "mmc0_cd" (input/IRQ) */ |
128 | mmc[0].gpio_cd = gpio + 0; | 122 | mmc[0].gpio_cd = gpio + 0; |
129 | omap_hsmmc_late_init(mmc); | 123 | omap_hsmmc_late_init(mmc); |
@@ -352,7 +346,14 @@ static void __init omap3_touchbook_init(void) | |||
352 | 346 | ||
353 | pm_power_off = omap3_touchbook_poweroff; | 347 | pm_power_off = omap3_touchbook_poweroff; |
354 | 348 | ||
349 | if (system_rev >= 0x20 && system_rev <= 0x34301000) { | ||
350 | omap_mux_init_gpio(23, OMAP_PIN_INPUT); | ||
351 | mmc[0].gpio_wp = 23; | ||
352 | } else { | ||
353 | omap_mux_init_gpio(29, OMAP_PIN_INPUT); | ||
354 | } | ||
355 | omap_hsmmc_init(mmc); | 355 | omap_hsmmc_init(mmc); |
356 | |||
356 | omap3_touchbook_i2c_init(); | 357 | omap3_touchbook_i2c_init(); |
357 | platform_add_devices(omap3_touchbook_devices, | 358 | platform_add_devices(omap3_touchbook_devices, |
358 | ARRAY_SIZE(omap3_touchbook_devices)); | 359 | ARRAY_SIZE(omap3_touchbook_devices)); |
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index bcc563c37b64..7ca7a5c474d4 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c | |||
@@ -461,7 +461,7 @@ static struct omap_dss_board_info omap4_panda_dss_data = { | |||
461 | .default_device = &omap4_panda_dvi_device, | 461 | .default_device = &omap4_panda_dvi_device, |
462 | }; | 462 | }; |
463 | 463 | ||
464 | void omap4_panda_display_init(void) | 464 | void __init omap4_panda_display_init(void) |
465 | { | 465 | { |
466 | int r; | 466 | int r; |
467 | 467 | ||
diff --git a/arch/arm/mach-omap2/display.c b/arch/arm/mach-omap2/display.c index 3677b1f58b85..62e133ca4314 100644 --- a/arch/arm/mach-omap2/display.c +++ b/arch/arm/mach-omap2/display.c | |||
@@ -124,7 +124,7 @@ static void omap4_hdmi_mux_pads(enum omap_hdmi_flags flags) | |||
124 | } | 124 | } |
125 | } | 125 | } |
126 | 126 | ||
127 | static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | 127 | static int __init omap4_dsi_mux_pads(int dsi_id, unsigned lanes) |
128 | { | 128 | { |
129 | u32 enable_mask, enable_shift; | 129 | u32 enable_mask, enable_shift; |
130 | u32 pipd_mask, pipd_shift; | 130 | u32 pipd_mask, pipd_shift; |
@@ -157,7 +157,7 @@ static int omap4_dsi_mux_pads(int dsi_id, unsigned lanes) | |||
157 | return 0; | 157 | return 0; |
158 | } | 158 | } |
159 | 159 | ||
160 | int omap_hdmi_init(enum omap_hdmi_flags flags) | 160 | int __init omap_hdmi_init(enum omap_hdmi_flags flags) |
161 | { | 161 | { |
162 | if (cpu_is_omap44xx()) | 162 | if (cpu_is_omap44xx()) |
163 | omap4_hdmi_mux_pads(flags); | 163 | omap4_hdmi_mux_pads(flags); |
@@ -165,7 +165,7 @@ int omap_hdmi_init(enum omap_hdmi_flags flags) | |||
165 | return 0; | 165 | return 0; |
166 | } | 166 | } |
167 | 167 | ||
168 | static int omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) | 168 | static int __init omap_dsi_enable_pads(int dsi_id, unsigned lane_mask) |
169 | { | 169 | { |
170 | if (cpu_is_omap44xx()) | 170 | if (cpu_is_omap44xx()) |
171 | return omap4_dsi_mux_pads(dsi_id, lane_mask); | 171 | 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 | return 0; | 173 | return 0; |
174 | } | 174 | } |
175 | 175 | ||
176 | static void omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) | 176 | static void __init omap_dsi_disable_pads(int dsi_id, unsigned lane_mask) |
177 | { | 177 | { |
178 | if (cpu_is_omap44xx()) | 178 | if (cpu_is_omap44xx()) |
179 | omap4_dsi_mux_pads(dsi_id, 0); | 179 | omap4_dsi_mux_pads(dsi_id, 0); |
diff --git a/arch/arm/mach-omap2/hsmmc.c b/arch/arm/mach-omap2/hsmmc.c index efb2fcbf9b3f..a97876da7fad 100644 --- a/arch/arm/mach-omap2/hsmmc.c +++ b/arch/arm/mach-omap2/hsmmc.c | |||
@@ -293,8 +293,8 @@ static inline void omap_hsmmc_mux(struct omap_mmc_platform_data *mmc_controller, | |||
293 | } | 293 | } |
294 | } | 294 | } |
295 | 295 | ||
296 | static int omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, | 296 | static int __init omap_hsmmc_pdata_init(struct omap2_hsmmc_info *c, |
297 | struct omap_mmc_platform_data *mmc) | 297 | struct omap_mmc_platform_data *mmc) |
298 | { | 298 | { |
299 | char *hc_name; | 299 | char *hc_name; |
300 | 300 | ||
@@ -553,7 +553,7 @@ free_mmc: | |||
553 | kfree(mmc_data); | 553 | kfree(mmc_data); |
554 | } | 554 | } |
555 | 555 | ||
556 | void omap_hsmmc_init(struct omap2_hsmmc_info *controllers) | 556 | void __init omap_hsmmc_init(struct omap2_hsmmc_info *controllers) |
557 | { | 557 | { |
558 | u32 reg; | 558 | u32 reg; |
559 | 559 | ||
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 611a0e3d54ca..f26b2faa1694 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c | |||
@@ -100,8 +100,8 @@ void omap_mux_write_array(struct omap_mux_partition *partition, | |||
100 | 100 | ||
101 | static char *omap_mux_options; | 101 | static char *omap_mux_options; |
102 | 102 | ||
103 | static int _omap_mux_init_gpio(struct omap_mux_partition *partition, | 103 | static int __init _omap_mux_init_gpio(struct omap_mux_partition *partition, |
104 | int gpio, int val) | 104 | int gpio, int val) |
105 | { | 105 | { |
106 | struct omap_mux_entry *e; | 106 | struct omap_mux_entry *e; |
107 | struct omap_mux *gpio_mux = NULL; | 107 | struct omap_mux *gpio_mux = NULL; |
@@ -145,7 +145,7 @@ static int _omap_mux_init_gpio(struct omap_mux_partition *partition, | |||
145 | return 0; | 145 | return 0; |
146 | } | 146 | } |
147 | 147 | ||
148 | int omap_mux_init_gpio(int gpio, int val) | 148 | int __init omap_mux_init_gpio(int gpio, int val) |
149 | { | 149 | { |
150 | struct omap_mux_partition *partition; | 150 | struct omap_mux_partition *partition; |
151 | int ret; | 151 | int ret; |
@@ -159,9 +159,9 @@ int omap_mux_init_gpio(int gpio, int val) | |||
159 | return -ENODEV; | 159 | return -ENODEV; |
160 | } | 160 | } |
161 | 161 | ||
162 | static int _omap_mux_get_by_name(struct omap_mux_partition *partition, | 162 | static int __init _omap_mux_get_by_name(struct omap_mux_partition *partition, |
163 | const char *muxname, | 163 | const char *muxname, |
164 | struct omap_mux **found_mux) | 164 | struct omap_mux **found_mux) |
165 | { | 165 | { |
166 | struct omap_mux *mux = NULL; | 166 | struct omap_mux *mux = NULL; |
167 | struct omap_mux_entry *e; | 167 | struct omap_mux_entry *e; |
@@ -218,7 +218,7 @@ static int _omap_mux_get_by_name(struct omap_mux_partition *partition, | |||
218 | return -ENODEV; | 218 | return -ENODEV; |
219 | } | 219 | } |
220 | 220 | ||
221 | static int | 221 | static int __init |
222 | omap_mux_get_by_name(const char *muxname, | 222 | omap_mux_get_by_name(const char *muxname, |
223 | struct omap_mux_partition **found_partition, | 223 | struct omap_mux_partition **found_partition, |
224 | struct omap_mux **found_mux) | 224 | struct omap_mux **found_mux) |
@@ -240,7 +240,7 @@ omap_mux_get_by_name(const char *muxname, | |||
240 | return -ENODEV; | 240 | return -ENODEV; |
241 | } | 241 | } |
242 | 242 | ||
243 | int omap_mux_init_signal(const char *muxname, int val) | 243 | int __init omap_mux_init_signal(const char *muxname, int val) |
244 | { | 244 | { |
245 | struct omap_mux_partition *partition = NULL; | 245 | struct omap_mux_partition *partition = NULL; |
246 | struct omap_mux *mux = NULL; | 246 | struct omap_mux *mux = NULL; |