diff options
author | Felipe Balbi <felipe.balbi@nokia.com> | 2010-03-04 02:45:53 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-11 12:32:03 -0500 |
commit | 6f69a1815a93722b360a1439934856e766509002 (patch) | |
tree | 481edc7df03ca6fb72c1b71496ee89f08c378f6e /arch | |
parent | d2197e1e6038bb01568367a220e4a4e040f8337d (diff) |
omap2/3/4: ehci: avoid compiler error with touchbook
the early_param() call in board-omap3touchbook.c expands to:
static const char __setup_str_early_touchbook_revision[]
__section(.init.rodata) _aligned(1) = tbr;
[...]
and we have a non-const variable being added to the
same section:
static struct ehci_hcd_omap_platform_data ehci_pdata
__section(.init.rodata);
because of that, gcc generates a section type conflict
which can (and actually should) be avoided by marking
const every variable marked with __initconst.
This patch fixes that for the ehci_hdc_omap_platform_data.
Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-omap2/board-3430sdp.c | 2 | ||||
-rwxr-xr-x | arch/arm/mach-omap2/board-3630sdp.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-am3517evm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-cm-t35.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-devkit8000.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-igep0020.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3beagle.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3evm.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3pandora.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-omap3touchbook.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-overo.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/board-zoom3.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-omap2/usb-ehci.c | 6 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/usb.h | 2 |
14 files changed, 16 insertions, 16 deletions
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c index a101029ceb6f..5822bcf7b15f 100644 --- a/arch/arm/mach-omap2/board-3430sdp.c +++ b/arch/arm/mach-omap2/board-3430sdp.c | |||
@@ -648,7 +648,7 @@ static void enable_board_wakeup_source(void) | |||
648 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | 648 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
649 | } | 649 | } |
650 | 650 | ||
651 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 651 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
652 | 652 | ||
653 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 653 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
654 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 654 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-3630sdp.c b/arch/arm/mach-omap2/board-3630sdp.c index 4386d2b4a785..a0a2a113465c 100755 --- a/arch/arm/mach-omap2/board-3630sdp.c +++ b/arch/arm/mach-omap2/board-3630sdp.c | |||
@@ -54,7 +54,7 @@ static void enable_board_wakeup_source(void) | |||
54 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); | 54 | OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); |
55 | } | 55 | } |
56 | 56 | ||
57 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 57 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
58 | 58 | ||
59 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 59 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
60 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 60 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c index 70c18614773c..6ae880585d54 100644 --- a/arch/arm/mach-omap2/board-am3517evm.c +++ b/arch/arm/mach-omap2/board-am3517evm.c | |||
@@ -273,7 +273,7 @@ static void __init am3517_evm_init_irq(void) | |||
273 | omap_gpio_init(); | 273 | omap_gpio_init(); |
274 | } | 274 | } |
275 | 275 | ||
276 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { | 276 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
277 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 277 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
278 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 278 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
279 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 279 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c index afa77caaff4d..2de4f79f03a0 100644 --- a/arch/arm/mach-omap2/board-cm-t35.c +++ b/arch/arm/mach-omap2/board-cm-t35.c | |||
@@ -612,7 +612,7 @@ static struct omap2_hsmmc_info mmc[] = { | |||
612 | {} /* Terminator */ | 612 | {} /* Terminator */ |
613 | }; | 613 | }; |
614 | 614 | ||
615 | static struct ehci_hcd_omap_platform_data ehci_pdata = { | 615 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
616 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 616 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
617 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 617 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
618 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 618 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c index 371019054b49..5bfc13b3176c 100644 --- a/arch/arm/mach-omap2/board-devkit8000.c +++ b/arch/arm/mach-omap2/board-devkit8000.c | |||
@@ -636,7 +636,7 @@ static struct omap_musb_board_data musb_board_data = { | |||
636 | .power = 100, | 636 | .power = 100, |
637 | }; | 637 | }; |
638 | 638 | ||
639 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 639 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
640 | 640 | ||
641 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 641 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
642 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 642 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 9958987a3d0a..4f1accf7f7f3 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c | |||
@@ -442,7 +442,7 @@ static struct omap_musb_board_data musb_board_data = { | |||
442 | .power = 100, | 442 | .power = 100, |
443 | }; | 443 | }; |
444 | 444 | ||
445 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 445 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
446 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 446 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
447 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 447 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
448 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 448 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 6eb77e1f7c82..962d377970e9 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c | |||
@@ -410,7 +410,7 @@ static void __init omap3beagle_flash_init(void) | |||
410 | } | 410 | } |
411 | } | 411 | } |
412 | 412 | ||
413 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 413 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
414 | 414 | ||
415 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 415 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
416 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 416 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c index d6bc88c426b5..017bb2f4f7d2 100644 --- a/arch/arm/mach-omap2/board-omap3evm.c +++ b/arch/arm/mach-omap2/board-omap3evm.c | |||
@@ -635,7 +635,7 @@ static struct platform_device *omap3_evm_devices[] __initdata = { | |||
635 | &omap3_evm_dss_device, | 635 | &omap3_evm_dss_device, |
636 | }; | 636 | }; |
637 | 637 | ||
638 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 638 | static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { |
639 | 639 | ||
640 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 640 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
641 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 641 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-omap3pandora.c b/arch/arm/mach-omap2/board-omap3pandora.c index 4827f4658df3..51a5315519c4 100644 --- a/arch/arm/mach-omap2/board-omap3pandora.c +++ b/arch/arm/mach-omap2/board-omap3pandora.c | |||
@@ -537,7 +537,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { | |||
537 | &pandora_dss_device, | 537 | &pandora_dss_device, |
538 | }; | 538 | }; |
539 | 539 | ||
540 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 540 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
541 | 541 | ||
542 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 542 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
543 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 543 | .port_mode[1] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 2a5bf5cea883..2504d41f923e 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c | |||
@@ -493,7 +493,7 @@ static void __init omap3touchbook_flash_init(void) | |||
493 | } | 493 | } |
494 | } | 494 | } |
495 | 495 | ||
496 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 496 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
497 | 497 | ||
498 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, | 498 | .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, |
499 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 499 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c index 50872a42bec7..8848c7c5ce48 100644 --- a/arch/arm/mach-omap2/board-overo.c +++ b/arch/arm/mach-omap2/board-overo.c | |||
@@ -394,7 +394,7 @@ static struct platform_device *overo_devices[] __initdata = { | |||
394 | &overo_lcd_device, | 394 | &overo_lcd_device, |
395 | }; | 395 | }; |
396 | 396 | ||
397 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 397 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
398 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 398 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
399 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 399 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
400 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 400 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/board-zoom3.c b/arch/arm/mach-omap2/board-zoom3.c index d3e3cd5170d1..cd3e40cf3ac1 100644 --- a/arch/arm/mach-omap2/board-zoom3.c +++ b/arch/arm/mach-omap2/board-zoom3.c | |||
@@ -52,7 +52,7 @@ static struct omap_board_mux board_mux[] __initdata = { | |||
52 | #define board_mux NULL | 52 | #define board_mux NULL |
53 | #endif | 53 | #endif |
54 | 54 | ||
55 | static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { | 55 | static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { |
56 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 56 | .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
57 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, | 57 | .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, |
58 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, | 58 | .port_mode[2] = EHCI_HCD_OMAP_MODE_UNKNOWN, |
diff --git a/arch/arm/mach-omap2/usb-ehci.c b/arch/arm/mach-omap2/usb-ehci.c index f1df873d59db..ee9f548d5d81 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c | |||
@@ -70,7 +70,7 @@ static struct platform_device ehci_device = { | |||
70 | /* | 70 | /* |
71 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST | 71 | * setup_ehci_io_mux - initialize IO pad mux for USBHOST |
72 | */ | 72 | */ |
73 | static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | 73 | static void setup_ehci_io_mux(const enum ehci_hcd_omap_mode *port_mode) |
74 | { | 74 | { |
75 | switch (port_mode[0]) { | 75 | switch (port_mode[0]) { |
76 | case EHCI_HCD_OMAP_MODE_PHY: | 76 | case EHCI_HCD_OMAP_MODE_PHY: |
@@ -213,7 +213,7 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) | |||
213 | return; | 213 | return; |
214 | } | 214 | } |
215 | 215 | ||
216 | void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) | 216 | void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) |
217 | { | 217 | { |
218 | platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); | 218 | platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); |
219 | 219 | ||
@@ -229,7 +229,7 @@ void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) | |||
229 | 229 | ||
230 | #else | 230 | #else |
231 | 231 | ||
232 | void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) | 232 | void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) |
233 | 233 | ||
234 | { | 234 | { |
235 | } | 235 | } |
diff --git a/arch/arm/plat-omap/include/plat/usb.h b/arch/arm/plat-omap/include/plat/usb.h index 288e29e1c06f..568578db93b6 100644 --- a/arch/arm/plat-omap/include/plat/usb.h +++ b/arch/arm/plat-omap/include/plat/usb.h | |||
@@ -53,7 +53,7 @@ enum musb_interface {MUSB_INTERFACE_ULPI, MUSB_INTERFACE_UTMI}; | |||
53 | 53 | ||
54 | extern void usb_musb_init(struct omap_musb_board_data *board_data); | 54 | extern void usb_musb_init(struct omap_musb_board_data *board_data); |
55 | 55 | ||
56 | extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata); | 56 | extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata); |
57 | 57 | ||
58 | #endif | 58 | #endif |
59 | 59 | ||