From 4ff6baf45cd23593592e5786ccd607bdc8785f4c Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 9 Mar 2010 14:59:48 -0800 Subject: omap: Fix compile for early_param and omap_smc1 Commit 2b0d8c251b8876d530a6bf671eb5425838fa698a changed ARM to use the common early_param code. Fix compile for omaps accordingly. Commit d309427e792ea750cdd312e7a92cf6047ae44962 added support for CACHE_L2X0, this however breaks multi-omap builds for V6 because of dsb and smc. NOTE: The proper fix is to separate omap_smc1 into a separate .S file and compile it with -Wa,-march=armv7-a flags. Not-Yet-Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-4430sdp.c | 2 +- arch/arm/mach-omap2/board-omap3touchbook.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index 180ac112e527..a462d50e955f 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -49,7 +49,7 @@ static struct omap_board_config_kernel sdp4430_config[] __initdata = { { OMAP_TAG_LCD, &sdp4430_lcd_config }, }; -#ifdef CONFIG_CACHE_L2X0 +#if defined(CONFIG_SMP) && defined(CONFIG_CACHE_L2X0) noinline void omap_smc1(u32 fn, u32 arg) { register u32 r12 asm("r12") = fn; diff --git a/arch/arm/mach-omap2/board-omap3touchbook.c b/arch/arm/mach-omap2/board-omap3touchbook.c index 3943d0f8322c..2a5bf5cea883 100644 --- a/arch/arm/mach-omap2/board-omap3touchbook.c +++ b/arch/arm/mach-omap2/board-omap3touchbook.c @@ -518,14 +518,14 @@ static void omap3_touchbook_poweroff(void) gpio_direction_output(TB_KILL_POWER_GPIO, 0); } -static void __init early_touchbook_revision(char **p) +static int __init early_touchbook_revision(char *p) { - if (!*p) - return; + if (!p) + return 0; - strict_strtoul(*p, 10, &touchbook_revision); + return strict_strtoul(p, 10, &touchbook_revision); } -__early_param("tbr=", early_touchbook_revision); +early_param("tbr", early_touchbook_revision); static struct omap_musb_board_data musb_board_data = { .interface_type = MUSB_INTERFACE_ULPI, -- cgit v1.2.3 From 323145722c44d5cdf977d07d9fe8c850b0822588 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Thu, 4 Mar 2010 09:45:53 +0200 Subject: arm: omap: 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 Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-3430sdp.c | 2 +- arch/arm/mach-omap2/board-3630sdp.c | 2 +- arch/arm/mach-omap2/board-am3517evm.c | 2 +- arch/arm/mach-omap2/board-cm-t35.c | 2 +- arch/arm/mach-omap2/board-devkit8000.c | 2 +- arch/arm/mach-omap2/board-igep0020.c | 2 +- arch/arm/mach-omap2/board-omap3beagle.c | 2 +- arch/arm/mach-omap2/board-omap3evm.c | 2 +- arch/arm/mach-omap2/board-omap3pandora.c | 2 +- arch/arm/mach-omap2/board-omap3touchbook.c | 2 +- arch/arm/mach-omap2/board-overo.c | 2 +- arch/arm/mach-omap2/board-zoom3.c | 2 +- arch/arm/mach-omap2/usb-ehci.c | 4 ++-- arch/arm/plat-omap/include/plat/usb.h | 2 +- 14 files changed, 15 insertions(+), 15 deletions(-) (limited to 'arch/arm') 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) OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); } -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .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) OMAP_WAKEUP_EN | OMAP_PIN_INPUT_PULLUP); } -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .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) omap_gpio_init(); } -static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .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[] = { {} /* Terminator */ }; -static struct ehci_hcd_omap_platform_data ehci_pdata = { +static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .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 = { .power = 100, }; -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .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 = { .power = 100, }; -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .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) } } -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .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 = { &omap3_evm_dss_device, }; -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static struct ehci_hcd_omap_platform_data ehci_pdata __initdata = { .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .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 = { &pandora_dss_device, }; -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .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) } } -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_PHY, .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 = { &overo_lcd_device, }; -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .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 = { #define board_mux NULL #endif -static struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { +static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { .port_mode[0] = EHCI_HCD_OMAP_MODE_UNKNOWN, .port_mode[1] = EHCI_HCD_OMAP_MODE_PHY, .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..2a777591d9bd 100644 --- a/arch/arm/mach-omap2/usb-ehci.c +++ b/arch/arm/mach-omap2/usb-ehci.c @@ -213,7 +213,7 @@ static void setup_ehci_io_mux(enum ehci_hcd_omap_mode *port_mode) return; } -void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) +void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) { platform_device_add_data(&ehci_device, pdata, sizeof(*pdata)); @@ -229,7 +229,7 @@ void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) #else -void __init usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata) +void __init usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata) { } 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}; extern void usb_musb_init(struct omap_musb_board_data *board_data); -extern void usb_ehci_init(struct ehci_hcd_omap_platform_data *pdata); +extern void usb_ehci_init(const struct ehci_hcd_omap_platform_data *pdata); #endif -- cgit v1.2.3 From 0dcd3854306dbade786329abceafa8f5eabe78e1 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 9 Mar 2010 14:59:48 -0800 Subject: arm: Allow mounting root on omaps with CPU_V6 and CPU_V7 To mount root, we need to disable VFPv3 and HAS_TLS_REG. Otherwise we'll get something like this for CPUv3: Freeing init memory: 184K Internal error: Oops - undefined instruction: 0 [#1] last sysfs file: Modules linked in: CPU: 0 Not tainted (2.6.33-rc8-07824-gf2e1d91-dirty #36) PC is at no_old_VFP_process+0x8/0x3c LR is at __und_usr_unknown+0x0/0x14 ... Or the system just hangs if HAS_TLS_REG is set. Signed-off-by: Tony Lindgren --- arch/arm/Kconfig | 2 +- arch/arm/mm/Kconfig | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'arch/arm') diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 3b181284970f..e1faffee255b 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -1549,7 +1549,7 @@ config VFP config VFPv3 bool depends on VFP - default y if CPU_V7 + default y if CPU_V7 && !ARCH_OMAP2 config NEON bool "Advanced SIMD (NEON) Extension support" diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index c4ed9f93f646..a90486b762a9 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -718,7 +718,7 @@ config TLS_REG_EMUL config HAS_TLS_REG bool depends on !TLS_REG_EMUL - default y if SMP || CPU_32v7 + default y if (SMP || CPU_32v7) && !ARCH_OMAP2 help This selects support for the CP15 thread register. It is defined to be available on some ARMv6 processors (including -- cgit v1.2.3