Commit 14d188bb authored by Arnd Bergmann's avatar Arnd Bergmann

Merge tag 'omap-for-v3.7-rc2/fixes-signed' of...

Merge tag 'omap-for-v3.7-rc2/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren <tony@atomide.com>:

Timer fix for am33xx, runtime PM fix for UART, audio McBSP fixes,
mux and pinctrl fixes, and Beagle OPP fix.

* tag 'omap-for-v3.7-rc2/fixes-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: AM33XX: Fix configuration of dmtimer parent clock by dmtimer driverDate:Wed, 17 Oct 2012 13:55:55 -0500
  ARM: OMAP3: Beagle: fix OPP customization and initcall ordering
  ARM: OMAP3: Fix 3430 legacy mux names for ssi1 signals.
  ARM: OMAP2+: Fix location of select PINCTRL
  ARM/dts: omap3: Fix mcbsp2/3 hwmods to be able to probe the drivers for audio
  ARM: OMAP2: UART: fix console UART mismatched runtime PM status
  ARM: OMAP3: PM: apply part of the erratum i582 workaround
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
parents d323c243 12ac7f9e
...@@ -257,7 +257,7 @@ mcbsp2: mcbsp@49022000 { ...@@ -257,7 +257,7 @@ mcbsp2: mcbsp@49022000 {
interrupt-names = "common", "tx", "rx", "sidetone"; interrupt-names = "common", "tx", "rx", "sidetone";
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
ti,buffer-size = <1280>; ti,buffer-size = <1280>;
ti,hwmods = "mcbsp2"; ti,hwmods = "mcbsp2", "mcbsp2_sidetone";
}; };
mcbsp3: mcbsp@49024000 { mcbsp3: mcbsp@49024000 {
...@@ -272,7 +272,7 @@ mcbsp3: mcbsp@49024000 { ...@@ -272,7 +272,7 @@ mcbsp3: mcbsp@49024000 {
interrupt-names = "common", "tx", "rx", "sidetone"; interrupt-names = "common", "tx", "rx", "sidetone";
interrupt-parent = <&intc>; interrupt-parent = <&intc>;
ti,buffer-size = <128>; ti,buffer-size = <128>;
ti,hwmods = "mcbsp3"; ti,hwmods = "mcbsp3", "mcbsp3_sidetone";
}; };
mcbsp4: mcbsp@49026000 { mcbsp4: mcbsp@49026000 {
......
...@@ -11,7 +11,6 @@ config ARCH_OMAP2PLUS_TYPICAL ...@@ -11,7 +11,6 @@ config ARCH_OMAP2PLUS_TYPICAL
select I2C_OMAP select I2C_OMAP
select MENELAUS if ARCH_OMAP2 select MENELAUS if ARCH_OMAP2
select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5 select NEON if ARCH_OMAP3 || ARCH_OMAP4 || SOC_OMAP5
select PINCTRL
select PM_RUNTIME select PM_RUNTIME
select REGULATOR select REGULATOR
select SERIAL_OMAP select SERIAL_OMAP
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/opp.h> #include <linux/opp.h>
#include <linux/cpu.h>
#include <linux/mtd/mtd.h> #include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h> #include <linux/mtd/partitions.h>
...@@ -444,27 +445,31 @@ static struct omap_board_mux board_mux[] __initdata = { ...@@ -444,27 +445,31 @@ static struct omap_board_mux board_mux[] __initdata = {
}; };
#endif #endif
static void __init beagle_opp_init(void) static int __init beagle_opp_init(void)
{ {
int r = 0; int r = 0;
/* Initialize the omap3 opp table */ if (!machine_is_omap3_beagle())
if (omap3_opp_init()) { return 0;
/* Initialize the omap3 opp table if not already created. */
r = omap3_opp_init();
if (IS_ERR_VALUE(r) && (r != -EEXIST)) {
pr_err("%s: opp default init failed\n", __func__); pr_err("%s: opp default init failed\n", __func__);
return; return r;
} }
/* Custom OPP enabled for all xM versions */ /* Custom OPP enabled for all xM versions */
if (cpu_is_omap3630()) { if (cpu_is_omap3630()) {
struct device *mpu_dev, *iva_dev; struct device *mpu_dev, *iva_dev;
mpu_dev = omap_device_get_by_hwmod_name("mpu"); mpu_dev = get_cpu_device(0);
iva_dev = omap_device_get_by_hwmod_name("iva"); iva_dev = omap_device_get_by_hwmod_name("iva");
if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) { if (IS_ERR(mpu_dev) || IS_ERR(iva_dev)) {
pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n", pr_err("%s: Aiee.. no mpu/dsp devices? %p %p\n",
__func__, mpu_dev, iva_dev); __func__, mpu_dev, iva_dev);
return; return -ENODEV;
} }
/* Enable MPU 1GHz and lower opps */ /* Enable MPU 1GHz and lower opps */
r = opp_enable(mpu_dev, 800000000); r = opp_enable(mpu_dev, 800000000);
...@@ -484,8 +489,9 @@ static void __init beagle_opp_init(void) ...@@ -484,8 +489,9 @@ static void __init beagle_opp_init(void)
opp_disable(iva_dev, 660000000); opp_disable(iva_dev, 660000000);
} }
} }
return; return 0;
} }
device_initcall(beagle_opp_init);
static void __init omap3_beagle_init(void) static void __init omap3_beagle_init(void)
{ {
...@@ -522,8 +528,6 @@ static void __init omap3_beagle_init(void) ...@@ -522,8 +528,6 @@ static void __init omap3_beagle_init(void)
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
beagle_opp_init();
} }
MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board") MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
......
...@@ -1073,6 +1073,8 @@ static struct omap_clk am33xx_clks[] = { ...@@ -1073,6 +1073,8 @@ static struct omap_clk am33xx_clks[] = {
CLK(NULL, "gfx_fck_div_ck", &gfx_fck_div_ck, CK_AM33XX), CLK(NULL, "gfx_fck_div_ck", &gfx_fck_div_ck, CK_AM33XX),
CLK(NULL, "sysclkout_pre_ck", &sysclkout_pre_ck, CK_AM33XX), CLK(NULL, "sysclkout_pre_ck", &sysclkout_pre_ck, CK_AM33XX),
CLK(NULL, "clkout2_ck", &clkout2_ck, CK_AM33XX), CLK(NULL, "clkout2_ck", &clkout2_ck, CK_AM33XX),
CLK(NULL, "timer_32k_ck", &clkdiv32k_ick, CK_AM33XX),
CLK(NULL, "timer_sys_ck", &sys_clkin_ck, CK_AM33XX),
}; };
int __init am33xx_clk_init(void) int __init am33xx_clk_init(void)
......
...@@ -614,16 +614,16 @@ static struct omap_mux __initdata omap3_muxmodes[] = { ...@@ -614,16 +614,16 @@ static struct omap_mux __initdata omap3_muxmodes[] = {
"sys_off_mode", NULL, NULL, NULL, "sys_off_mode", NULL, NULL, NULL,
"gpio_9", NULL, NULL, "safe_mode"), "gpio_9", NULL, NULL, "safe_mode"),
_OMAP3_MUXENTRY(UART1_CTS, 150, _OMAP3_MUXENTRY(UART1_CTS, 150,
"uart1_cts", NULL, NULL, NULL, "uart1_cts", "ssi1_rdy_tx", NULL, NULL,
"gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"), "gpio_150", "hsusb3_tll_clk", NULL, "safe_mode"),
_OMAP3_MUXENTRY(UART1_RTS, 149, _OMAP3_MUXENTRY(UART1_RTS, 149,
"uart1_rts", NULL, NULL, NULL, "uart1_rts", "ssi1_flag_tx", NULL, NULL,
"gpio_149", NULL, NULL, "safe_mode"), "gpio_149", NULL, NULL, "safe_mode"),
_OMAP3_MUXENTRY(UART1_RX, 151, _OMAP3_MUXENTRY(UART1_RX, 151,
"uart1_rx", NULL, "mcbsp1_clkr", "mcspi4_clk", "uart1_rx", "ss1_wake_tx", "mcbsp1_clkr", "mcspi4_clk",
"gpio_151", NULL, NULL, "safe_mode"), "gpio_151", NULL, NULL, "safe_mode"),
_OMAP3_MUXENTRY(UART1_TX, 148, _OMAP3_MUXENTRY(UART1_TX, 148,
"uart1_tx", NULL, NULL, NULL, "uart1_tx", "ssi1_dat_tx", NULL, NULL,
"gpio_148", NULL, NULL, "safe_mode"), "gpio_148", NULL, NULL, "safe_mode"),
_OMAP3_MUXENTRY(UART2_CTS, 144, _OMAP3_MUXENTRY(UART2_CTS, 144,
"uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL, "uart2_cts", "mcbsp3_dx", "gpt9_pwm_evt", NULL,
......
...@@ -91,6 +91,7 @@ extern void omap3_save_scratchpad_contents(void); ...@@ -91,6 +91,7 @@ extern void omap3_save_scratchpad_contents(void);
#define PM_RTA_ERRATUM_i608 (1 << 0) #define PM_RTA_ERRATUM_i608 (1 << 0)
#define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1) #define PM_SDRC_WAKEUP_ERRATUM_i583 (1 << 1)
#define PM_PER_MEMORIES_ERRATUM_i582 (1 << 2)
#if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3) #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
extern u16 pm34xx_errata; extern u16 pm34xx_errata;
......
...@@ -652,14 +652,17 @@ static void __init pm_errata_configure(void) ...@@ -652,14 +652,17 @@ static void __init pm_errata_configure(void)
/* Enable the l2 cache toggling in sleep logic */ /* Enable the l2 cache toggling in sleep logic */
enable_omap3630_toggle_l2_on_restore(); enable_omap3630_toggle_l2_on_restore();
if (omap_rev() < OMAP3630_REV_ES1_2) if (omap_rev() < OMAP3630_REV_ES1_2)
pm34xx_errata |= PM_SDRC_WAKEUP_ERRATUM_i583; pm34xx_errata |= (PM_SDRC_WAKEUP_ERRATUM_i583 |
PM_PER_MEMORIES_ERRATUM_i582);
} else if (cpu_is_omap34xx()) {
pm34xx_errata |= PM_PER_MEMORIES_ERRATUM_i582;
} }
} }
int __init omap3_pm_init(void) int __init omap3_pm_init(void)
{ {
struct power_state *pwrst, *tmp; struct power_state *pwrst, *tmp;
struct clockdomain *neon_clkdm, *mpu_clkdm; struct clockdomain *neon_clkdm, *mpu_clkdm, *per_clkdm, *wkup_clkdm;
int ret; int ret;
if (!omap3_has_io_chain_ctrl()) if (!omap3_has_io_chain_ctrl())
...@@ -711,6 +714,8 @@ int __init omap3_pm_init(void) ...@@ -711,6 +714,8 @@ int __init omap3_pm_init(void)
neon_clkdm = clkdm_lookup("neon_clkdm"); neon_clkdm = clkdm_lookup("neon_clkdm");
mpu_clkdm = clkdm_lookup("mpu_clkdm"); mpu_clkdm = clkdm_lookup("mpu_clkdm");
per_clkdm = clkdm_lookup("per_clkdm");
wkup_clkdm = clkdm_lookup("wkup_clkdm");
#ifdef CONFIG_SUSPEND #ifdef CONFIG_SUSPEND
omap_pm_suspend = omap3_pm_suspend; omap_pm_suspend = omap3_pm_suspend;
...@@ -727,6 +732,27 @@ int __init omap3_pm_init(void) ...@@ -727,6 +732,27 @@ int __init omap3_pm_init(void)
if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608)) if (IS_PM34XX_ERRATUM(PM_RTA_ERRATUM_i608))
omap3630_ctrl_disable_rta(); omap3630_ctrl_disable_rta();
/*
* The UART3/4 FIFO and the sidetone memory in McBSP2/3 are
* not correctly reset when the PER powerdomain comes back
* from OFF or OSWR when the CORE powerdomain is kept active.
* See OMAP36xx Erratum i582 "PER Domain reset issue after
* Domain-OFF/OSWR Wakeup". This wakeup dependency is not a
* complete workaround. The kernel must also prevent the PER
* powerdomain from going to OSWR/OFF while the CORE
* powerdomain is not going to OSWR/OFF. And if PER last
* power state was off while CORE last power state was ON, the
* UART3/4 and McBSP2/3 SIDETONE devices need to run a
* self-test using their loopback tests; if that fails, those
* devices are unusable until the PER/CORE can complete a transition
* from ON to OSWR/OFF and then back to ON.
*
* XXX Technically this workaround is only needed if off-mode
* or OSWR is enabled.
*/
if (IS_PM34XX_ERRATUM(PM_PER_MEMORIES_ERRATUM_i582))
clkdm_add_wkdep(per_clkdm, wkup_clkdm);
clkdm_add_wkdep(neon_clkdm, mpu_clkdm); clkdm_add_wkdep(neon_clkdm, mpu_clkdm);
if (omap_type() != OMAP2_DEVICE_TYPE_GP) { if (omap_type() != OMAP2_DEVICE_TYPE_GP) {
omap3_secure_ram_storage = omap3_secure_ram_storage =
......
...@@ -329,6 +329,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata, ...@@ -329,6 +329,11 @@ void __init omap_serial_init_port(struct omap_board_data *bdata,
oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt); oh->mux = omap_hwmod_mux_init(bdata->pads, bdata->pads_cnt);
if (console_uart_id == bdata->id) {
omap_device_enable(pdev);
pm_runtime_set_active(&pdev->dev);
}
oh->dev_attr = uart; oh->dev_attr = uart;
if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads) if (((cpu_is_omap34xx() || cpu_is_omap44xx()) && bdata->pads)
......
...@@ -26,6 +26,7 @@ config ARCH_OMAP2PLUS ...@@ -26,6 +26,7 @@ config ARCH_OMAP2PLUS
select CLKDEV_LOOKUP select CLKDEV_LOOKUP
select GENERIC_IRQ_CHIP select GENERIC_IRQ_CHIP
select OMAP_DM_TIMER select OMAP_DM_TIMER
select PINCTRL
select PROC_DEVICETREE if PROC_FS select PROC_DEVICETREE if PROC_FS
select SPARSE_IRQ select SPARSE_IRQ
select USE_OF select USE_OF
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment