From e118a1df32c41186f717bbe6b42142741530e8b9 Mon Sep 17 00:00:00 2001 From: Catalin Marinas Date: Thu, 6 Jan 2011 19:57:53 -0800 Subject: ARM: Do not enable SWP emulation if CPU_V6 && CPU_V7 This option uses LDREXB/STREXB to emulate SWPB but these instructions are not supported on all the ARMv6 processors. Reported-by: Anand Gadiyar Signed-off-by: Catalin Marinas Cc: Leif Lindholm Signed-off-by: Tony Lindgren --- arch/arm/mm/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 49db8b3e4a49..0fe2389febf3 100644 --- a/arch/arm/mm/Kconfig +++ b/arch/arm/mm/Kconfig @@ -644,7 +644,7 @@ config ARM_THUMBEE config SWP_EMULATE bool "Emulate SWP/SWPB instructions" - depends on CPU_V7 + depends on CPU_V7 && !CPU_V6 select HAVE_PROC_CPU if PROC_FS default y if SMP help -- cgit v1.2.3 From 3083314238afb593b598dca4bab4bb6ae09a6c82 Mon Sep 17 00:00:00 2001 From: Aaro Koskinen Date: Thu, 6 Jan 2011 19:49:28 -0800 Subject: arm: mach-omap2: mux: fix buffer overrun memcpy() copies 8 bytes too much (omap_mux_entry vs. omap_mux). Correct by replacing memcpy() with struct assignment, which is safer. Signed-off-by: Aaro Koskinen Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/mux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c index 17bd6394d224..df8d2f2872c6 100644 --- a/arch/arm/mach-omap2/mux.c +++ b/arch/arm/mach-omap2/mux.c @@ -893,7 +893,7 @@ static struct omap_mux * __init omap_mux_list_add( return NULL; m = &entry->mux; - memcpy(m, src, sizeof(struct omap_mux_entry)); + entry->mux = *src; #ifdef CONFIG_OMAP_MUX if (omap_mux_copy_names(src, m)) { -- cgit v1.2.3 From bcb52693a49994f435fad5f8d4277fbb125f3452 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 6 Jan 2011 19:49:28 -0800 Subject: omap3|4: mux: make local structures static Mux data is passed by pointers to mux.c from the SoC specific mux file, these variables dont really need to be global scope. This fixes the following sparse warnings: arch/arm/mach-omap2/mux44xx.c:547:29: warning: symbol 'omap4_core_cbl_ball' was not declared. Should it be static? arch/arm/mach-omap2/mux44xx.c:1265:29: warning: symbol 'omap4_core_cbs_ball' was not declared. Should it be static? arch/arm/mach-omap2/mux44xx.c:1549:29: warning: symbol 'omap4_wkup_cbl_cbs_ball' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/mux34xx.c | 4 ++-- arch/arm/mach-omap2/mux44xx.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/mux34xx.c b/arch/arm/mach-omap2/mux34xx.c index 440c98e9a510..17f80e4ab162 100644 --- a/arch/arm/mach-omap2/mux34xx.c +++ b/arch/arm/mach-omap2/mux34xx.c @@ -703,7 +703,7 @@ static struct omap_mux __initdata omap3_muxmodes[] = { * Signals different on CBC package compared to the superset */ #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_OMAP_PACKAGE_CBC) -struct omap_mux __initdata omap3_cbc_subset[] = { +static struct omap_mux __initdata omap3_cbc_subset[] = { { .reg_offset = OMAP_MUX_TERMINATOR }, }; #else @@ -721,7 +721,7 @@ struct omap_mux __initdata omap3_cbc_subset[] = { */ #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ && defined(CONFIG_OMAP_PACKAGE_CBC) -struct omap_ball __initdata omap3_cbc_ball[] = { +static struct omap_ball __initdata omap3_cbc_ball[] = { _OMAP3_BALLENTRY(CAM_D0, "ae16", NULL), _OMAP3_BALLENTRY(CAM_D1, "ae15", NULL), _OMAP3_BALLENTRY(CAM_D10, "d25", NULL), diff --git a/arch/arm/mach-omap2/mux44xx.c b/arch/arm/mach-omap2/mux44xx.c index 980f11d45c79..c322e7bdaa17 100644 --- a/arch/arm/mach-omap2/mux44xx.c +++ b/arch/arm/mach-omap2/mux44xx.c @@ -544,7 +544,7 @@ static struct omap_mux __initdata omap4_core_muxmodes[] = { */ #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ && defined(CONFIG_OMAP_PACKAGE_CBL) -struct omap_ball __initdata omap4_core_cbl_ball[] = { +static struct omap_ball __initdata omap4_core_cbl_ball[] = { _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL), _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL), _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL), @@ -1262,7 +1262,7 @@ static struct omap_mux __initdata omap4_es2_core_muxmodes[] = { */ #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ && defined(CONFIG_OMAP_PACKAGE_CBS) -struct omap_ball __initdata omap4_core_cbs_ball[] = { +static struct omap_ball __initdata omap4_core_cbs_ball[] = { _OMAP4_BALLENTRY(GPMC_AD0, "c12", NULL), _OMAP4_BALLENTRY(GPMC_AD1, "d12", NULL), _OMAP4_BALLENTRY(GPMC_AD2, "c13", NULL), @@ -1546,7 +1546,7 @@ static struct omap_mux __initdata omap4_wkup_muxmodes[] = { */ #if defined(CONFIG_OMAP_MUX) && defined(CONFIG_DEBUG_FS) \ && defined(CONFIG_OMAP_PACKAGE_CBL) -struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = { +static struct omap_ball __initdata omap4_wkup_cbl_cbs_ball[] = { _OMAP4_BALLENTRY(SIM_IO, "h4", NULL), _OMAP4_BALLENTRY(SIM_CLK, "j2", NULL), _OMAP4_BALLENTRY(SIM_RESET, "g2", NULL), -- cgit v1.2.3 From 0ce3bb7208b5bf7de2d869a881372b60cc37362c Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 6 Jan 2011 19:49:29 -0800 Subject: omap3: zoom: use static for pointer passing omap_zoom_wlan_data and zoom2_set_hs_extmute are not used beyond the scope of zoom-peripherals directly, instead pointers are used. make them static instead. Fixes sparse warnings: arch/arm/mach-omap2/board-zoom-peripherals.c:193:29: warning: symbol 'omap_zoom_wlan_data' was not declared. Should it be static? arch/arm/mach-omap2/board-zoom-peripherals.c:245:6: warning: symbol 'zoom2_set_hs_extmute' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-zoom-peripherals.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 3fbd0edd712e..3d1f9abd5663 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -190,7 +190,7 @@ static struct platform_device omap_vwlan_device = { }, }; -struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { +static struct wl12xx_platform_data omap_zoom_wlan_data __initdata = { .irq = OMAP_GPIO_IRQ(OMAP_ZOOM_WLAN_IRQ_GPIO), /* ZOOM ref clock is 26 MHz */ .board_ref_clock = 1, @@ -242,7 +242,7 @@ static int zoom_twl_gpio_setup(struct device *dev, } /* EXTMUTE callback function */ -void zoom2_set_hs_extmute(int mute) +static void zoom2_set_hs_extmute(int mute) { gpio_set_value(ZOOM2_HEADSET_EXTMUTE_GPIO, mute); } -- cgit v1.2.3 From 2393608aede2380afc3fa8815197363f01f328ad Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 6 Jan 2011 19:49:29 -0800 Subject: omap3: igep3: make igep3_flash_init static igep3_flash_init is not used beyond the scope of the file, make it static instead. Fixes sparse warning: arch/arm/mach-omap2/board-igep0030.c:106:13: warning: symbol 'igep3_flash_init' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-igep0030.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index bcccd68f1856..c88e8f7f28ee 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c @@ -103,7 +103,7 @@ static struct platform_device igep3_onenand_device = { }, }; -void __init igep3_flash_init(void) +static void __init igep3_flash_init(void) { u8 cs = 0; u8 onenandcs = GPMC_CS_NUM + 1; @@ -137,7 +137,7 @@ void __init igep3_flash_init(void) } #else -void __init igep3_flash_init(void) {} +static void __init igep3_flash_init(void) {} #endif static struct regulator_consumer_supply igep3_vmmc1_supply = { -- cgit v1.2.3 From a9b365bdc328bd66e97087d0dba0b9a3d9eb1ac6 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Thu, 6 Jan 2011 19:49:29 -0800 Subject: omap2+: wdt: trivial sparse fixes omap2_wd_timer_disable is declared in wdtimer.h and used by hwmod function pointers for usage, the header inclusion is necessary to ensure that the prototype and function remains consistent. omap_wdt_latency is passed as a pointer and does not need global scope Fixes sparse warnings: arch/arm/mach-omap2/devices.c:981:31: warning: symbol 'omap_wdt_latency' was not declared. Should it be static? arch/arm/mach-omap2/wd_timer.c:27:5: warning: symbol 'omap2_wd_timer_disable' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/devices.c | 2 +- arch/arm/mach-omap2/wd_timer.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/devices.c b/arch/arm/mach-omap2/devices.c index 381f4eb92352..2c9c912f2c42 100644 --- a/arch/arm/mach-omap2/devices.c +++ b/arch/arm/mach-omap2/devices.c @@ -978,7 +978,7 @@ static int __init omap2_init_devices(void) arch_initcall(omap2_init_devices); #if defined(CONFIG_OMAP_WATCHDOG) || defined(CONFIG_OMAP_WATCHDOG_MODULE) -struct omap_device_pm_latency omap_wdt_latency[] = { +static struct omap_device_pm_latency omap_wdt_latency[] = { [0] = { .deactivate_func = omap_device_idle_hwmods, .activate_func = omap_device_enable_hwmods, diff --git a/arch/arm/mach-omap2/wd_timer.c b/arch/arm/mach-omap2/wd_timer.c index b0c4907ab3ca..4067669d96c4 100644 --- a/arch/arm/mach-omap2/wd_timer.c +++ b/arch/arm/mach-omap2/wd_timer.c @@ -13,6 +13,8 @@ #include +#include "wd_timer.h" + /* * In order to avoid any assumptions from bootloader regarding WDT * settings, WDT module is reset during init. This enables the watchdog -- cgit v1.2.3 From d0eadf6d10923a46609b682bb12657fdfc1afc18 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Mon, 3 Jan 2011 13:35:41 -0600 Subject: OMAP3+: sr_device: include pm header omap_enable_smartreflex_on_init is meant to be used by boards which would like to have SR enabled by default on the platform, while omap_devinit_smartreflex is used by pm code, the protos are defined in pm.h. This header should be included to ensure that sr_device function definitions match the prototypes. including pm.h fixes the sparse warnings (with CONFIG_OMAP_SMARTREFLEX=y): arch/arm/mach-omap2/sr_device.c:138:13: warning: symbol 'omap_enable_smartreflex_on_init' was not declared. Should it be static? arch/arm/mach-omap2/sr_device.c:143:12: warning: symbol 'omap_devinit_smartreflex' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/sr_device.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-omap2/sr_device.c b/arch/arm/mach-omap2/sr_device.c index 786d685c09a9..b1e0af18a26a 100644 --- a/arch/arm/mach-omap2/sr_device.c +++ b/arch/arm/mach-omap2/sr_device.c @@ -27,6 +27,7 @@ #include #include "control.h" +#include "pm.h" static bool sr_enable_on_init; -- cgit v1.2.3 From c84ff1cc48fa41ea1b86f76f61dd4767f1adb0cd Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Mon, 3 Jan 2011 12:58:29 -0600 Subject: OMAP2+: TWL: make conversion routines static The uv_to_vsel, vsel_to_uv functions don't need to be exposed to the world as they are used as function pointers. make them static. Fixes sparse warnings: arch/arm/mach-omap2/omap_twl.c:63:15: warning: symbol 'twl4030_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:68:4: warning: symbol 'twl4030_uv_to_vsel' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:73:15: warning: symbol 'twl6030_vsel_to_uv' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:105:4: warning: symbol 'twl6030_uv_to_vsel' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/omap_twl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 15f8c6c1bb0f..65ab4e33cfca 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c @@ -60,17 +60,17 @@ static u8 smps_offset; #define REG_SMPS_OFFSET 0xE0 -unsigned long twl4030_vsel_to_uv(const u8 vsel) +static unsigned long twl4030_vsel_to_uv(const u8 vsel) { return (((vsel * 125) + 6000)) * 100; } -u8 twl4030_uv_to_vsel(unsigned long uv) +static u8 twl4030_uv_to_vsel(unsigned long uv) { return DIV_ROUND_UP(uv - 600000, 12500); } -unsigned long twl6030_vsel_to_uv(const u8 vsel) +static unsigned long twl6030_vsel_to_uv(const u8 vsel) { /* * In TWL6030 depending on the value of SMPS_OFFSET @@ -102,7 +102,7 @@ unsigned long twl6030_vsel_to_uv(const u8 vsel) return ((((vsel - 1) * 125) + 6000)) * 100; } -u8 twl6030_uv_to_vsel(unsigned long uv) +static u8 twl6030_uv_to_vsel(unsigned long uv) { /* * In TWL6030 depending on the value of SMPS_OFFSET -- cgit v1.2.3 From dda0aea7ba5a902982cb65a7f7ec1b5c8e7b6923 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Mon, 3 Jan 2011 12:58:30 -0600 Subject: OMAP2+: TWL: include pm header for init protos twl_init functions are declared in pm.h and used in pm.c pm.h header defining the protos need to be included to ensure that omap_twl.c has consistent function definition. This fixes sparse warning: arch/arm/mach-omap2/omap_twl.c:237:12: warning: symbol 'omap4_twl_init' was not declared. Should it be static? arch/arm/mach-omap2/omap_twl.c:256:12: warning: symbol 'omap3_twl_init' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/omap_twl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-omap2/omap_twl.c b/arch/arm/mach-omap2/omap_twl.c index 65ab4e33cfca..00e1d2b53683 100644 --- a/arch/arm/mach-omap2/omap_twl.c +++ b/arch/arm/mach-omap2/omap_twl.c @@ -20,6 +20,8 @@ #include +#include "pm.h" + #define OMAP3_SRI2C_SLAVE_ADDR 0x12 #define OMAP3_VDD_MPU_SR_CONTROL_REG 0x00 #define OMAP3_VDD_CORE_SR_CONTROL_REG 0x01 -- cgit v1.2.3 From f7c5cc456211da7d0b0aefd3886e57b313a0e00f Mon Sep 17 00:00:00 2001 From: Mika Westerberg Date: Wed, 29 Dec 2010 13:01:31 +0200 Subject: OMAP: GPIO: fix _set_gpio_triggering() for OMAP2+ In case on OMAP2+ we call set_24xx_gpio_triggering() instead of updating reg and l values. However, at the end of the function we perform a write: __raw_writel(l, reg); So on OMAP2+ we end up writing 0 to the bank->base which is not correct (typically this points to GPIO_REVISION register). Fix this by returning immediately after call to set_24xx_gpio_triggering(). Signed-off-by: Mika Westerberg Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/gpio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 1f98e0b94847..60631f227797 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -718,7 +718,7 @@ static int _set_gpio_triggering(struct gpio_bank *bank, int gpio, int trigger) case METHOD_GPIO_24XX: case METHOD_GPIO_44XX: set_24xx_gpio_triggering(bank, gpio, trigger); - break; + return 0; #endif default: goto bad; -- cgit v1.2.3 From b97c374d8a44292c601146783aac61f3d5d1f46f Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Tue, 4 Jan 2011 14:07:14 -0600 Subject: omap2+: pm_bus: make functions used as pointers as static omap_pm_runtime_suspend and omap_pm_runtime_resume are used as function pointers and does not really need to be exposed to the world. Fixes sparse warnings: arch/arm/mach-omap2/pm_bus.c:23:5: warning: symbol 'omap_pm_runtime_suspend' was not declared. Should it be static? arch/arm/mach-omap2/pm_bus.c:40:5: warning: symbol 'omap_pm_runtime_resume' was not declared. Should it be static? Signed-off-by: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/pm_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/pm_bus.c b/arch/arm/mach-omap2/pm_bus.c index 784989f8f2f5..5acd2ab298b1 100644 --- a/arch/arm/mach-omap2/pm_bus.c +++ b/arch/arm/mach-omap2/pm_bus.c @@ -20,7 +20,7 @@ #include #ifdef CONFIG_PM_RUNTIME -int omap_pm_runtime_suspend(struct device *dev) +static int omap_pm_runtime_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); int r, ret = 0; @@ -37,7 +37,7 @@ int omap_pm_runtime_suspend(struct device *dev) return ret; }; -int omap_pm_runtime_resume(struct device *dev) +static int omap_pm_runtime_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); int r; -- cgit v1.2.3 From 1a9b5878671d417a856fdafe971306c99297b7f0 Mon Sep 17 00:00:00 2001 From: Felipe Balbi Date: Wed, 5 Jan 2011 08:46:18 +0200 Subject: arm: omap: gpio: don't access irq_desc array directly Instead of accessing the irq_desc array directly we can use irq_to_desc(irq). That will allow us to, if wanted, select SPARSE_IRQ and irq_descs will be added to a radix tree, instead of a array. Signed-off-by: Felipe Balbi Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/gpio.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 60631f227797..ccf2660f4151 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -756,8 +756,10 @@ static int gpio_irq_type(unsigned irq, unsigned type) spin_lock_irqsave(&bank->lock, flags); retval = _set_gpio_triggering(bank, get_gpio_index(gpio), type); if (retval == 0) { - irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK; - irq_desc[irq].status |= type; + struct irq_desc *d = irq_to_desc(irq); + + d->status &= ~IRQ_TYPE_SENSE_MASK; + d->status |= type; } spin_unlock_irqrestore(&bank->lock, flags); @@ -1671,7 +1673,9 @@ static void __init omap_gpio_chip_init(struct gpio_bank *bank) for (j = bank->virtual_irq_start; j < bank->virtual_irq_start + bank_width; j++) { - lockdep_set_class(&irq_desc[j].lock, &gpio_lock_class); + struct irq_desc *d = irq_to_desc(j); + + lockdep_set_class(&d->lock, &gpio_lock_class); set_irq_chip_data(j, bank); if (bank_is_mpuio(bank)) set_irq_chip(j, &mpuio_irq_chip); -- cgit v1.2.3 From 302991379c2940975cd9c6dc377abe0b522b5010 Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Wed, 5 Jan 2011 16:27:00 +0530 Subject: omap2plus: clockdomain: Trivial fix for build break because of clktrctrl_mask struct clockdomain member clktrctrl_mask is available for only for OMAP2 and OMAP3 architectures. Technially it is also used only for these archs but this breaks the build with custom OMAP4 configuration. CC arch/arm/mach-omap2/clockdomain.o arch/arm/mach-omap2/clockdomain.c: In function '_enable_hwsup': arch/arm/mach-omap2/clockdomain.c:251: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:254: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function '_disable_hwsup': arch/arm/mach-omap2/clockdomain.c:277: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:280: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_sleep': arch/arm/mach-omap2/clockdomain.c:744: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_wakeup': arch/arm/mach-omap2/clockdomain.c:789: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_enable': arch/arm/mach-omap2/clockdomain.c:922: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:926: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c: In function 'omap2_clkdm_clk_disable': arch/arm/mach-omap2/clockdomain.c:994: error: 'struct clockdomain' has no member named 'clktrctrl_mask' arch/arm/mach-omap2/clockdomain.c:998: error: 'struct clockdomain' has no member named 'clktrctrl_mask' make[1]: *** [arch/arm/mach-omap2/clockdomain.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Fix the build break by dropping the #ifdef as suggested by Paul Walmsley Signed-off-by: Santosh Shilimkar Acked-by: Paul Walmsley Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/clockdomain.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/clockdomain.h b/arch/arm/mach-omap2/clockdomain.h index de3faa20b46b..9b459c26fb85 100644 --- a/arch/arm/mach-omap2/clockdomain.h +++ b/arch/arm/mach-omap2/clockdomain.h @@ -103,9 +103,7 @@ struct clockdomain { const char *name; struct powerdomain *ptr; } pwrdm; -#if defined(CONFIG_ARCH_OMAP2) || defined(CONFIG_ARCH_OMAP3) const u16 clktrctrl_mask; -#endif const u8 flags; const u8 dep_bit; const u8 prcm_partition; -- cgit v1.2.3 From d7e08f1b8fcb85968c35ddecbf912bdab4cf2508 Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Wed, 5 Jan 2011 16:27:02 +0530 Subject: omap2plus: voltage: Trivial warning fix 'no return statement' Fix below build warnings CC arch/arm/mach-omap2/common.o CC arch/arm/mach-omap2/gpio.o In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38, from arch/arm/mach-omap2/gpio.c:25: arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic': arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void CC arch/arm/mach-omap2/dma.o In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38, from arch/arm/mach-omap2/dma.c:32: arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic': arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void CC arch/arm/mach-omap2/wd_timer.o In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38, from arch/arm/mach-omap2/wd_timer.c:15: arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic': arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void CC arch/arm/mach-omap2/prm44xx.o CC arch/arm/mach-omap2/omap_hwmod.o In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38, from arch/arm/mach-omap2/omap_hwmod.c:145: arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic': arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void CC arch/arm/mach-omap2/omap_hwmod_common_data.o In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38, from arch/arm/mach-omap2/omap_hwmod_common_data.c:20: arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_register_pmic': arch/arm/plat-omap/include/plat/voltage.h:137: warning: no return statement in function returning non-void The error is reported when omap2plus_defconfig built with CONFIG_PM disabled Signed-off-by: Santosh Shilimkar Cc: Thara Gopinath Cc: Kevin Hilman Cc: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/include/plat/voltage.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/plat-omap/include/plat/voltage.h b/arch/arm/plat-omap/include/plat/voltage.h index 0ff123399f3b..9943c667f8e1 100644 --- a/arch/arm/plat-omap/include/plat/voltage.h +++ b/arch/arm/plat-omap/include/plat/voltage.h @@ -134,7 +134,10 @@ void omap_change_voltscale_method(struct voltagedomain *voltdm, int omap_voltage_late_init(void); #else static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, - struct omap_volt_pmic_info *pmic_info) {} + struct omap_volt_pmic_info *pmic_info) +{ + return -EINVAL; +} static inline void omap_change_voltscale_method(struct voltagedomain *voltdm, int voltscale_method) {} static inline int omap_voltage_late_init(void) -- cgit v1.2.3 From dd361b6ff6de54f628e55a39b8667108589c74bf Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Wed, 5 Jan 2011 16:27:03 +0530 Subject: omap2plus: voltage: Trivial linking fix 'undefined reference' LD init/built-in.o LD .tmp_vmlinux1 arch/arm/mach-omap2/built-in.o: In function `omap2_set_init_voltage': arch/arm/mach-omap2/pm.c:181: undefined reference to `omap_voltage_domain_lookup' arch/arm/mach-omap2/built-in.o: In function `omap4_twl_init': arch/arm/mach-omap2/omap_twl.c:244: undefined reference to `omap_voltage_domain_lookup' arch/arm/mach-omap2/omap_twl.c:247: undefined reference to `omap_voltage_domain_lookup' arch/arm/mach-omap2/omap_twl.c:250: undefined reference to `omap_voltage_domain_lookup' make: *** [.tmp_vmlinux1] Error 1 The error is reported when omap2plus_defconfig built with CONFIG_PM disabled Signed-off-by: Santosh Shilimkar Cc: Thara Gopinath Cc: Kevin Hilman Cc: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/include/plat/voltage.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/plat-omap/include/plat/voltage.h b/arch/arm/plat-omap/include/plat/voltage.h index 9943c667f8e1..4b02227e4098 100644 --- a/arch/arm/plat-omap/include/plat/voltage.h +++ b/arch/arm/plat-omap/include/plat/voltage.h @@ -65,9 +65,6 @@ struct voltagedomain { char *name; }; -/* API to get the voltagedomain pointer */ -struct voltagedomain *omap_voltage_domain_lookup(char *name); - /** * struct omap_volt_data - Omap voltage specific data. * @voltage_nominal: The possible voltage value in uV @@ -131,6 +128,9 @@ int omap_voltage_register_pmic(struct voltagedomain *voltdm, struct omap_volt_pmic_info *pmic_info); void omap_change_voltscale_method(struct voltagedomain *voltdm, int voltscale_method); +/* API to get the voltagedomain pointer */ +struct voltagedomain *omap_voltage_domain_lookup(char *name); + int omap_voltage_late_init(void); #else static inline int omap_voltage_register_pmic(struct voltagedomain *voltdm, @@ -144,6 +144,10 @@ static inline int omap_voltage_late_init(void) { return -EINVAL; } +static inline struct voltagedomain *omap_voltage_domain_lookup(char *name) +{ + return ERR_PTR(-EINVAL); +} #endif #endif -- cgit v1.2.3 From faacebc50902d367071e788c6586882a32bf09f2 Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Wed, 5 Jan 2011 16:27:04 +0530 Subject: omap2plus: voltage: Trivial linking fix for 'EINVAL' undeclared CC arch/arm/mach-omap2/omap_hwmod_common_data.o In file included from arch/arm/plat-omap/include/plat/omap_hwmod.h:38, from arch/arm/mach-omap2/omap_hwmod_common_data.c:20: arch/arm/plat-omap/include/plat/voltage.h: In function 'omap_voltage_late_init': arch/arm/plat-omap/include/plat/voltage.h:145: error: 'EINVAL' undeclared (first use in this function) arch/arm/plat-omap/include/plat/voltage.h:145: error: (Each undeclared identifier is reported only once arch/arm/plat-omap/include/plat/voltage.h:145: error: for each function it appears in.) make[1]: *** [arch/arm/mach-omap2/omap_hwmod_common_data.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 The error is reported when omap2plus_defconfig built with CONFIG_PM disabled Signed-off-by: Santosh Shilimkar Cc: Thara Gopinath Cc: Kevin Hilman Cc: Nishanth Menon Signed-off-by: Kevin Hilman --- arch/arm/plat-omap/include/plat/voltage.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch') diff --git a/arch/arm/plat-omap/include/plat/voltage.h b/arch/arm/plat-omap/include/plat/voltage.h index 4b02227e4098..5bd204e55c32 100644 --- a/arch/arm/plat-omap/include/plat/voltage.h +++ b/arch/arm/plat-omap/include/plat/voltage.h @@ -14,6 +14,8 @@ #ifndef __ARCH_ARM_MACH_OMAP2_VOLTAGE_H #define __ARCH_ARM_MACH_OMAP2_VOLTAGE_H +#include + #define VOLTSCALE_VPFORCEUPDATE 1 #define VOLTSCALE_VCBYPASS 2 -- cgit v1.2.3 From 56a6a19dffda6b75cef8d4183c7c6ff650025cbd Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Tue, 4 Jan 2011 20:40:27 +0530 Subject: omap2plus: prm: Trvial build break fix for undefined reference to 'omap2_prm_read_mod_reg' omap2plus_defocnfig build breaks when customised with only ARCH_OMAP4 selected. This is because common files make references to the functions which are defined only for omap2xxx and omap3xxx. LD .tmp_vmlinux1 arch/arm/mach-omap2/built-in.o: In function `pm_dbg_regset_store': arch/arm/mach-omap2/pm-debug.c:335: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap2_pm_dump': arch/arm/mach-omap2/pm-debug.c:121: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:123: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:124: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/pm-debug.c:125: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_arch_reset': arch/arm/mach-omap2/prcm.c:106: undefined reference to `omap2_prm_set_mod_reg_bits' arch/arm/mach-omap2/prcm.c:108: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `omap_prcm_get_reset_sources': arch/arm/mach-omap2/prcm.c:53: undefined reference to `omap2_prm_read_mod_reg' arch/arm/mach-omap2/built-in.o: In function `clkdm_clear_all_wkdeps': arch/arm/mach-omap2/clockdomain.c:545: undefined reference to `omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function `clkdm_del_wkdep': arch/arm/mach-omap2/clockdomain.c:475: undefined reference to `omap2_prm_clear_mod_reg_bits' arch/arm/mach-omap2/built-in.o: In function `clkdm_read_wkdep': arch/arm/mach-omap2/clockdomain.c:511: undefined reference to `omap2_prm_read_mod_bits_shift' arch/arm/mach-omap2/built-in.o: In function `clkdm_add_wkdep': arch/arm/mach-omap2/clockdomain.c:440: undefined reference to `omap2_prm_set_mod_reg_bits' make: *** [.tmp_vmlinux1] Error 1 This patch adds stubs for these functions so that build continues to work. Signed-off-by: Santosh Shilimkar Acked-by: Paul Walmsley Signed-off-by: Kevin Hilman --- arch/arm/mach-omap2/prm2xxx_3xxx.h | 63 +++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/prm2xxx_3xxx.h b/arch/arm/mach-omap2/prm2xxx_3xxx.h index 53d44f6e3736..49654c8d18f5 100644 --- a/arch/arm/mach-omap2/prm2xxx_3xxx.h +++ b/arch/arm/mach-omap2/prm2xxx_3xxx.h @@ -228,7 +228,67 @@ #ifndef __ASSEMBLER__ - +/* + * Stub omap2xxx/omap3xxx functions so that common files + * continue to build when custom builds are used + */ +#if defined(CONFIG_ARCH_OMAP4) && !(defined(CONFIG_ARCH_OMAP2) || \ + defined(CONFIG_ARCH_OMAP3)) +static inline u32 omap2_prm_read_mod_reg(s16 module, u16 idx) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); +} +static inline u32 omap2_prm_rmw_mod_reg_bits(u32 mask, u32 bits, + s16 module, s16 idx) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline u32 omap2_prm_set_mod_reg_bits(u32 bits, s16 module, s16 idx) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline u32 omap2_prm_clear_mod_reg_bits(u32 bits, s16 module, s16 idx) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline u32 omap2_prm_read_mod_bits_shift(s16 domain, s16 idx, u32 mask) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +static inline int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift) +{ + WARN(1, "prm: omap2xxx/omap3xxx specific function and " + "not suppose to be used on omap4\n"); + return 0; +} +#else /* Power/reset management domain register get/set */ extern u32 omap2_prm_read_mod_reg(s16 module, u16 idx); extern void omap2_prm_write_mod_reg(u32 val, s16 module, u16 idx); @@ -242,6 +302,7 @@ extern int omap2_prm_is_hardreset_asserted(s16 prm_mod, u8 shift); extern int omap2_prm_assert_hardreset(s16 prm_mod, u8 shift); extern int omap2_prm_deassert_hardreset(s16 prm_mod, u8 shift); +#endif /* CONFIG_ARCH_OMAP4 */ #endif /* -- cgit v1.2.3 From 1740d483ba4d79f9fa6984dccd7152b6b208f1bf Mon Sep 17 00:00:00 2001 From: Anand Gadiyar Date: Mon, 10 Jan 2011 14:42:15 +0000 Subject: arm: omap4: pandaboard: turn on PHY reference clock at init The SMSC 3320 USB PHY on the OMAP4 Pandaboard needs a 19.2 MHz reference clock. This clock is provided from the OMAP4's fref_clk3 pad. Recent changes to clock44xx_data.c made the clock framework aware of the existence of these fref_clk[i] lines. If the option CONFIG_OMAP_RESET_CLOCKS is enabled in the kernel, then the clock framework will turn these clocks off during bootup. Explicitly request and keep this clock enabled at init for the Pandaboard, so that the PHY receives this clock at all times. Reported-by: Ming Lei Signed-off-by: Anand Gadiyar Cc: Benoit Cousson Reviewed-by: Paul Walmsley Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-omap4panda.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index b43e3ff9adec..613bdd89bcfa 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -95,7 +96,16 @@ static const struct ehci_hcd_omap_platform_data ehci_pdata __initconst = { static void __init omap4_ehci_init(void) { int ret; + struct clk *phy_ref_clk; + /* FREF_CLK3 provides the 19.2 MHz reference clock to the PHY */ + phy_ref_clk = clk_get(NULL, "auxclk3_ck"); + if (IS_ERR(phy_ref_clk)) { + pr_err("Cannot request auxclk3\n"); + goto error1; + } + clk_set_rate(phy_ref_clk, 19200000); + clk_enable(phy_ref_clk); /* disable the power to the usb hub prior to init */ ret = gpio_request(GPIO_HUB_POWER, "hub_power"); -- cgit v1.2.3 From d7cd5c73cec2dfa9f259a2adcf802c9f8fcc125f Mon Sep 17 00:00:00 2001 From: Santosh Shilimkar Date: Sun, 9 Jan 2011 22:16:13 +0000 Subject: omap3: clocks: Fix build error 'CK_3430ES2' undeclared here At latest mainline commit 0c21e3aaf6a, omap2plus build is broken. This patch is trivial fix for the missed usb clock node for CK_3430ES2PLUS flag update. CHK include/generated/compile.h CC arch/arm/mach-omap2/clock3xxx_data.o arch/arm/mach-omap2/clock3xxx_data.c:3289: error: 'CK_3430ES2' undeclared here (not in a function) make[1]: *** [arch/arm/mach-omap2/clock3xxx_data.o] Error 1 make: *** [arch/arm/mach-omap2] Error 2 Signed-off-by: Santosh Shilimkar Acked-by: Anand Gadiyar Acked-by: Paul Walmsley [tony@atomide.com: updated mask to include CK_36XX] Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/clock3xxx_data.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index d3ab1c9e50b0..403a4a1d3f9c 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c @@ -3286,7 +3286,7 @@ static struct omap_clk omap3xxx_clks[] = { CLK(NULL, "cpefuse_fck", &cpefuse_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), CLK(NULL, "ts_fck", &ts_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), CLK(NULL, "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), - CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2 | CK_AM35XX), + CLK("ehci-omap.0", "usbtll_fck", &usbtll_fck, CK_3430ES2PLUS | CK_AM35XX | CK_36XX), CLK("omap-mcbsp.1", "prcm_fck", &core_96m_fck, CK_3XXX), CLK("omap-mcbsp.5", "prcm_fck", &core_96m_fck, CK_3XXX), CLK(NULL, "core_96m_fck", &core_96m_fck, CK_3XXX), -- cgit v1.2.3 From 7b0d4b71f5b17f22914bc6b2e36c4cd7cdc56a28 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 10 Jan 2011 13:26:12 +0000 Subject: omap3: igep3: Add USB EHCI support for IGEP module The OMAP3 IGEP module has one EHCI interface on board using USB2HS port. GPIO183 is used as PHY reset. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-igep0030.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index c88e8f7f28ee..f0a85c1d24a7 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c @@ -43,7 +43,7 @@ #define IGEP3_GPIO_WIFI_NRESET 139 #define IGEP3_GPIO_BT_NRESET 137 -#define IGEP3_GPIO_USBH_NRESET 115 +#define IGEP3_GPIO_USBH_NRESET 183 #if defined(CONFIG_MTD_ONENAND_OMAP2) || \ @@ -363,8 +363,20 @@ static void __init igep3_wifi_bt_init(void) void __init igep3_wifi_bt_init(void) {} #endif +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, + + .phy_reset = true, + .reset_gpio_port[0] = -EINVAL, + .reset_gpio_port[1] = IGEP3_GPIO_USBH_NRESET, + .reset_gpio_port[2] = -EINVAL, +}; + #ifdef CONFIG_OMAP_MUX static struct omap_board_mux board_mux[] __initdata = { + OMAP3_MUX(I2C2_SDA, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), { .reg_offset = OMAP_MUX_TERMINATOR }, }; #endif @@ -378,6 +390,7 @@ static void __init igep3_init(void) omap_serial_init(); usb_musb_init(&musb_board_data); + usb_ehci_init(&ehci_pdata); igep3_flash_init(); igep3_leds_init(); -- cgit v1.2.3 From a271c6cd209674118e5ec221de922bc59c0c9454 Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 10 Jan 2011 13:26:13 +0000 Subject: omap3: igep3: Fix IGEP module second MMC channel power supply The second MMC channel (used by the WLAN/BT module) is not linked to power regulator. This causes the WLAN/BT module to fail being detected if CONFIG_REGULATOR_DUMMY is not set. This patch adds the two regulators that actually feed the WLAN/BT module (1v8 from the TWL4030 VIO LDO, and a fixed 3v3). With that patch, the second channel is properly detected. Also change vmmc1 to use symbolic names instead of direct device reference. Signed-off-by: Enric Balletbo i Serra Acked-by: Marc Zyngier Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-igep0030.c | 65 ++++++++++++++++++++++++++++++------ 1 file changed, 55 insertions(+), 10 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index f0a85c1d24a7..11b944f93d24 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c @@ -19,6 +19,7 @@ #include #include +#include #include #include @@ -140,9 +141,8 @@ static void __init igep3_flash_init(void) static void __init igep3_flash_init(void) {} #endif -static struct regulator_consumer_supply igep3_vmmc1_supply = { - .supply = "vmmc", -}; +static struct regulator_consumer_supply igep3_vmmc1_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); /* VMMC1 for OMAP VDD_MMC1 (i/o) and MMC1 card */ static struct regulator_init_data igep3_vmmc1 = { @@ -159,6 +159,52 @@ static struct regulator_init_data igep3_vmmc1 = { .consumer_supplies = &igep3_vmmc1_supply, }; +static struct regulator_consumer_supply igep3_vio_supply = + REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); + +static struct regulator_init_data igep3_vio = { + .constraints = { + .min_uV = 1800000, + .max_uV = 1800000, + .apply_uV = 1, + .valid_modes_mask = REGULATOR_MODE_NORMAL + | REGULATOR_MODE_STANDBY, + .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE + | REGULATOR_CHANGE_MODE + | REGULATOR_CHANGE_STATUS, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &igep3_vio_supply, +}; + +static struct regulator_consumer_supply igep3_vmmc2_supply = + REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); + +static struct regulator_init_data igep3_vmmc2 = { + .constraints = { + .valid_modes_mask = REGULATOR_MODE_NORMAL, + .always_on = 1, + }, + .num_consumer_supplies = 1, + .consumer_supplies = &igep3_vmmc2_supply, +}; + +static struct fixed_voltage_config igep3_vwlan = { + .supply_name = "vwlan", + .microvolts = 3300000, + .gpio = -EINVAL, + .enabled_at_boot = 1, + .init_data = &igep3_vmmc2, +}; + +static struct platform_device igep3_vwlan_device = { + .name = "reg-fixed-voltage", + .id = 0, + .dev = { + .platform_data = &igep3_vwlan, + }, +}; + static struct omap2_hsmmc_info mmc[] = { [0] = { .mmc = 1, @@ -254,12 +300,6 @@ static int igep3_twl4030_gpio_setup(struct device *dev, mmc[0].gpio_cd = gpio + 0; omap2_hsmmc_init(mmc); - /* - * link regulators to MMC adapters ... we "know" the - * regulators will be set up only *after* we return. - */ - igep3_vmmc1_supply.dev = mmc[0].dev; - /* TWL4030_GPIO_MAX + 1 == ledB (out, active low LED) */ #if !defined(CONFIG_LEDS_GPIO) && !defined(CONFIG_LEDS_GPIO_MODULE) if ((gpio_request(gpio+TWL4030_GPIO_MAX+1, "gpio-led:green:d1") == 0) @@ -287,6 +327,10 @@ static struct twl4030_usb_data igep3_twl4030_usb_data = { .usb_mode = T2_USB_MODE_ULPI, }; +static struct platform_device *igep3_devices[] __initdata = { + &igep3_vwlan_device, +}; + static void __init igep3_init_irq(void) { omap2_init_common_infrastructure(); @@ -303,6 +347,7 @@ static struct twl4030_platform_data igep3_twl4030_pdata = { .usb = &igep3_twl4030_usb_data, .gpio = &igep3_twl4030_gpio_pdata, .vmmc1 = &igep3_vmmc1, + .vio = &igep3_vio, }; static struct i2c_board_info __initdata igep3_i2c_boardinfo[] = { @@ -387,7 +432,7 @@ static void __init igep3_init(void) /* Register I2C busses and drivers */ igep3_i2c_init(); - + platform_add_devices(igep3_devices, ARRAY_SIZE(igep3_devices)); omap_serial_init(); usb_musb_init(&musb_board_data); usb_ehci_init(&ehci_pdata); -- cgit v1.2.3 From 18cbc7d94c1248fdc850ef6bac1cd8e22ef0738f Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Mon, 10 Jan 2011 13:26:14 +0000 Subject: omap3: igep2: Add keypad support Support twl4030 keypad and gpio keys on IGEP v2. Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-igep0020.c | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c index 0afa3011db0f..3a6cce5d3ff4 100644 --- a/arch/arm/mach-omap2/board-igep0020.c +++ b/arch/arm/mach-omap2/board-igep0020.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -535,6 +536,37 @@ static struct twl4030_codec_data igep2_codec_data = { .audio = &igep2_audio_data, }; +static int igep2_keymap[] = { + KEY(0, 0, KEY_LEFT), + KEY(0, 1, KEY_RIGHT), + KEY(0, 2, KEY_A), + KEY(0, 3, KEY_B), + KEY(1, 0, KEY_DOWN), + KEY(1, 1, KEY_UP), + KEY(1, 2, KEY_E), + KEY(1, 3, KEY_F), + KEY(2, 0, KEY_ENTER), + KEY(2, 1, KEY_I), + KEY(2, 2, KEY_J), + KEY(2, 3, KEY_K), + KEY(3, 0, KEY_M), + KEY(3, 1, KEY_N), + KEY(3, 2, KEY_O), + KEY(3, 3, KEY_P) +}; + +static struct matrix_keymap_data igep2_keymap_data = { + .keymap = igep2_keymap, + .keymap_size = ARRAY_SIZE(igep2_keymap), +}; + +static struct twl4030_keypad_data igep2_keypad_pdata = { + .keymap_data = &igep2_keymap_data, + .rows = 4, + .cols = 4, + .rep = 1, +}; + static struct twl4030_platform_data igep2_twldata = { .irq_base = TWL4030_IRQ_BASE, .irq_end = TWL4030_IRQ_END, @@ -543,6 +575,7 @@ static struct twl4030_platform_data igep2_twldata = { .usb = &igep2_usb_data, .codec = &igep2_codec_data, .gpio = &igep2_twl4030_gpio_pdata, + .keypad = &igep2_keypad_pdata, .vmmc1 = &igep2_vmmc1, .vpll2 = &igep2_vpll2, .vio = &igep2_vio, -- cgit v1.2.3 From 68fc3e152c9f99323e2a4917967725aec5281b32 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 11 Jan 2011 17:13:35 +0000 Subject: omap3: beaglexm: fix EHCI power up GPIO dir EHCI enable power pin is inverted (active high) in comparison to vanilla beagle which is active low. Handle this case conditionally. Without this fix, Beagle XM 4 port EHCI will not function and no networking will be available [nm@ti.com: split up, added descriptive changelogs] Signed-off-by: Nishanth Menon Signed-off-by: Koen Kooi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-omap3beagle.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 6c127605942f..af1166bd1c86 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -297,9 +297,15 @@ static int beagle_twl_gpio_setup(struct device *dev, gpio_request(gpio + 1, "EHCI_nOC"); gpio_direction_input(gpio + 1); - /* TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, active low) */ + /* + * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active + * high / others active low) + */ gpio_request(gpio + TWL4030_GPIO_MAX, "nEN_USB_PWR"); - gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 1); + else + gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; -- cgit v1.2.3 From f8362d215549c66066f78e67c033dd370ae50322 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Tue, 11 Jan 2011 17:13:36 +0000 Subject: omap3: beaglexm: fix DVI reset GPIO GPIO reset line for Beagle XM is different from vanilla beagle so we populate it as part of gpio update routine. This in part fixes the issue of display not functioning on beagle XM platform. [nm@ti.com: split up, added descriptive changelogs] Signed-off-by: Nishanth Menon Signed-off-by: Koen Kooi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-omap3beagle.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index af1166bd1c86..673deb9189fe 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -199,7 +199,7 @@ static struct omap_dss_device beagle_dvi_device = { .name = "dvi", .driver_name = "generic_panel", .phy.dpi.data_lines = 24, - .reset_gpio = 170, + .reset_gpio = -EINVAL, .platform_enable = beagle_enable_dvi, .platform_disable = beagle_disable_dvi, }; @@ -307,6 +307,12 @@ static int beagle_twl_gpio_setup(struct device *dev, else gpio_direction_output(gpio + TWL4030_GPIO_MAX, 0); + /* DVI reset GPIO is different between beagle revisions */ + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) + beagle_dvi_device.reset_gpio = 129; + else + beagle_dvi_device.reset_gpio = 170; + /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; -- cgit v1.2.3 From 0f7e2aaa03ea3f2393d3446c686036ce51298d3e Mon Sep 17 00:00:00 2001 From: Enric Balletbo i Serra Date: Tue, 11 Jan 2011 15:47:54 +0000 Subject: omap3: igep3: Add omap_reserve functionality This patch adds omap_reserve functionality to board-igep0030.c. This patch is in similar lines to commit id 71ee7dad9b6991, from Russell king Cc: Russell King Signed-off-by: Enric Balletbo i Serra Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-igep0030.c | 1 + 1 file changed, 1 insertion(+) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-igep0030.c b/arch/arm/mach-omap2/board-igep0030.c index 11b944f93d24..4dc62a9b9cb2 100644 --- a/arch/arm/mach-omap2/board-igep0030.c +++ b/arch/arm/mach-omap2/board-igep0030.c @@ -450,6 +450,7 @@ static void __init igep3_init(void) MACHINE_START(IGEP0030, "IGEP OMAP3 module") .boot_params = 0x80000100, + .reserve = omap_reserve, .map_io = omap3_map_io, .init_irq = igep3_init_irq, .init_machine = igep3_init, -- cgit v1.2.3 From 1bd9ef198498e3e00c9d78a1566338f7ea2e4bb5 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Wed, 12 Jan 2011 00:23:29 +0000 Subject: omap3: beaglexm: fix power on of DVI TFP410 DVI chip is used to provide display out. This chip is controlled by 2 lines: LDO which supplies the power is controlled over gpio + 2 and the enable of the chip itself is done over gpio + 1 NOTE: the LDO is necessary for LED, serial blocks as well. gpio + 1 was used to sense USB overcurrent in vanilla beagle. Without this fix, the display would not function as the LDO remains shut down. [nm@ti.com: split up, added descriptive changelogs] Signed-off-by: Nishanth Menon Signed-off-by: Koen Kooi Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/board-omap3beagle.c | 42 ++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c index 673deb9189fe..2ed804073f35 100644 --- a/arch/arm/mach-omap2/board-omap3beagle.c +++ b/arch/arm/mach-omap2/board-omap3beagle.c @@ -273,6 +273,8 @@ static struct gpio_led gpio_leds[]; static int beagle_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) { + int r; + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { mmc[0].gpio_wp = -EINVAL; } else if ((omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_C1_3) || @@ -293,9 +295,16 @@ static int beagle_twl_gpio_setup(struct device *dev, /* REVISIT: need ehci-omap hooks for external VBUS * power switch and overcurrent detect */ - - gpio_request(gpio + 1, "EHCI_nOC"); - gpio_direction_input(gpio + 1); + if (omap3_beagle_get_rev() != OMAP3BEAGLE_BOARD_XM) { + r = gpio_request(gpio + 1, "EHCI_nOC"); + if (!r) { + r = gpio_direction_input(gpio + 1); + if (r) + gpio_free(gpio + 1); + } + if (r) + pr_err("%s: unable to configure EHCI_nOC\n", __func__); + } /* * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active @@ -316,6 +325,33 @@ static int beagle_twl_gpio_setup(struct device *dev, /* TWL4030_GPIO_MAX + 1 == ledB, PMU_STAT (out, active low LED) */ gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; + /* + * gpio + 1 on Xm controls the TFP410's enable line (active low) + * gpio + 2 control varies depending on the board rev as follows: + * P7/P8 revisions(prototype): Camera EN + * A2+ revisions (production): LDO (supplies DVI, serial, led blocks) + */ + if (omap3_beagle_get_rev() == OMAP3BEAGLE_BOARD_XM) { + r = gpio_request(gpio + 1, "nDVI_PWR_EN"); + if (!r) { + r = gpio_direction_output(gpio + 1, 0); + if (r) + gpio_free(gpio + 1); + } + if (r) + pr_err("%s: unable to configure nDVI_PWR_EN\n", + __func__); + r = gpio_request(gpio + 2, "DVI_LDO_EN"); + if (!r) { + r = gpio_direction_output(gpio + 2, 1); + if (r) + gpio_free(gpio + 2); + } + if (r) + pr_err("%s: unable to configure DVI_LDO_EN\n", + __func__); + } + return 0; } -- cgit v1.2.3 From 7d4ca85a53bab1f6f9911411be38e0486a11187a Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Tue, 11 Jan 2011 15:31:45 -0800 Subject: omap4: Fix ULPI PHY init for ES1.0 SDP Commit 6aa85a5ae610106d89e50c7e1f760c56d12f9bc4 (omap4: 4430sdp: enable the ehci port on 4430SDP) added code to enable EHCI support on 4430sdp board. Looks like the ULPI pin does not seem to be muxed properly on ES1.0 SDP and this causes the system to reboot when the ULPI PHY is enabled. Fix this by muxing the pin, this is the same setting for both ES1.0 and ES2.0. Also add checking for gpio_request. Cc: Keshava Munegowda --- arch/arm/mach-omap2/board-4430sdp.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'arch') diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c index a70bdf28e2bc..07d1b20b1148 100644 --- a/arch/arm/mach-omap2/board-4430sdp.c +++ b/arch/arm/mach-omap2/board-4430sdp.c @@ -554,6 +554,7 @@ static void __init omap_sfh7741prox_init(void) #ifdef CONFIG_OMAP_MUX static struct omap_board_mux board_mux[] __initdata = { + OMAP4_MUX(USBB2_ULPITLL_CLK, OMAP_MUX_MODE4 | OMAP_PIN_OUTPUT), { .reg_offset = OMAP_MUX_TERMINATOR }, }; #else @@ -576,11 +577,12 @@ static void __init omap_4430sdp_init(void) omap4_twl6030_hsmmc_init(mmc); /* Power on the ULPI PHY */ - if (gpio_is_valid(OMAP4SDP_MDM_PWR_EN_GPIO)) { - /* FIXME: Assumes pad is already muxed for GPIO mode */ - gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); + status = gpio_request(OMAP4SDP_MDM_PWR_EN_GPIO, "USBB1 PHY VMDM_3V3"); + if (status) + pr_err("%s: Could not get USBB1 PHY GPIO\n", __func__); + else gpio_direction_output(OMAP4SDP_MDM_PWR_EN_GPIO, 1); - } + usb_ehci_init(&ehci_pdata); usb_musb_init(&musb_board_data); -- cgit v1.2.3