Re: Linux v3.1-rc8 : SDHC card do not switch to high speed mode

2011-10-18 Thread Chris Ball
Hi,

On Tue, Oct 18 2011, Subhash Jadavani wrote:
 Chris,

 I had already posted the proper patch with signed off:
 http://permalink.gmane.org/gmane.linux.ports.arm.msm/1875

Thanks, you're right.  I've pushed it to mmc-next for 3.2 now,
after changing the 0x2 over to UHS_SDR50_BUS_SPEED.

- Chris.
-- 
Chris Ball   c...@laptop.org   http://printf.net/
One Laptop Per Child
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH v7 12/21] OMAP2+: UART: Add wakeup mechanism for omap-uarts

2011-10-18 Thread Govindraj.R
From the runtime callbacks enable hwmod wakeups for uart which will
internally enable io-pad wakeups for uarts if they have rx-pad pins
set as wakeup capabale.

Use the io-ring wakeup mechanism after uart clock gating and leave
the PM_WKST set for uart to default reset values cleanup the
code in serial.c which was handling PM_WKST reg.
Irq_chaing(PRM_DRIVER) is used to wakeup uart after uart clocks are gated
using pad wakeup mechanism.

Signed-off-by: Govindraj.R govindraj.r...@ti.com
---
 arch/arm/mach-omap2/serial.c  |   96 +++-
 arch/arm/plat-omap/include/plat/omap-serial.h |2 +
 drivers/tty/serial/omap-serial.c  |   15 
 3 files changed, 29 insertions(+), 84 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 8c6dc85..6b3f0bd 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -56,10 +56,6 @@ struct omap_uart_state {
int num;
int can_sleep;
 
-   void __iomem *wk_st;
-   void __iomem *wk_en;
-   u32 wk_mask;
-
int clocked;
 
struct list_head node;
@@ -114,26 +110,6 @@ static inline void omap_uart_disable_clocks(struct 
omap_uart_state *uart)
omap_device_idle(uart-pdev);
 }
 
-static void omap_uart_enable_wakeup(struct omap_uart_state *uart)
-{
-   /* Set wake-enable bit */
-   if (uart-wk_en  uart-wk_mask) {
-   u32 v = __raw_readl(uart-wk_en);
-   v |= uart-wk_mask;
-   __raw_writel(v, uart-wk_en);
-   }
-}
-
-static void omap_uart_disable_wakeup(struct omap_uart_state *uart)
-{
-   /* Clear wake-enable bit */
-   if (uart-wk_en  uart-wk_mask) {
-   u32 v = __raw_readl(uart-wk_en);
-   v = ~uart-wk_mask;
-   __raw_writel(v, uart-wk_en);
-   }
-}
-
 static void omap_uart_block_sleep(struct omap_uart_state *uart)
 {
omap_uart_enable_clocks(uart);
@@ -163,65 +139,17 @@ int omap_uart_can_sleep(void)
return can_sleep;
 }
 
-static void omap_uart_idle_init(struct omap_uart_state *uart)
+static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable)
 {
-   int ret;
-
-   uart-can_sleep = 0;
-   omap_uart_smart_idle_enable(uart, 0);
+   struct omap_device *od = to_omap_device(pdev);
 
-   if (cpu_is_omap34xx()  !cpu_is_ti816x()) {
-   u32 mod = (uart-num  1) ? OMAP3430_PER_MOD : CORE_MOD;
-   u32 wk_mask = 0;
+   if (!od)
+   return;
 
-   /* XXX These PRM accesses do not belong here */
-   uart-wk_en = OMAP34XX_PRM_REGADDR(mod, PM_WKEN1);
-   uart-wk_st = OMAP34XX_PRM_REGADDR(mod, PM_WKST1);
-   switch (uart-num) {
-   case 0:
-   wk_mask = OMAP3430_ST_UART1_MASK;
-   break;
-   case 1:
-   wk_mask = OMAP3430_ST_UART2_MASK;
-   break;
-   case 2:
-   wk_mask = OMAP3430_ST_UART3_MASK;
-   break;
-   case 3:
-   wk_mask = OMAP3630_ST_UART4_MASK;
-   break;
-   }
-   uart-wk_mask = wk_mask;
-   } else if (cpu_is_omap24xx()) {
-   u32 wk_mask = 0;
-   u32 wk_en = PM_WKEN1, wk_st = PM_WKST1;
-
-   switch (uart-num) {
-   case 0:
-   wk_mask = OMAP24XX_ST_UART1_MASK;
-   break;
-   case 1:
-   wk_mask = OMAP24XX_ST_UART2_MASK;
-   break;
-   case 2:
-   wk_en = OMAP24XX_PM_WKEN2;
-   wk_st = OMAP24XX_PM_WKST2;
-   wk_mask = OMAP24XX_ST_UART3_MASK;
-   break;
-   }
-   uart-wk_mask = wk_mask;
-   if (cpu_is_omap2430()) {
-   uart-wk_en = OMAP2430_PRM_REGADDR(CORE_MOD, wk_en);
-   uart-wk_st = OMAP2430_PRM_REGADDR(CORE_MOD, wk_st);
-   } else if (cpu_is_omap2420()) {
-   uart-wk_en = OMAP2420_PRM_REGADDR(CORE_MOD, wk_en);
-   uart-wk_st = OMAP2420_PRM_REGADDR(CORE_MOD, wk_st);
-   }
-   } else {
-   uart-wk_en = NULL;
-   uart-wk_st = NULL;
-   uart-wk_mask = 0;
-   }
+   if (enable)
+   omap_hwmod_enable_wakeup(od-hwmods[0]);
+   else
+   omap_hwmod_disable_wakeup(od-hwmods[0]);
 }
 
 /*
@@ -244,6 +172,8 @@ static void omap_uart_set_forceidle(struct platform_device 
*pdev)
 }
 
 #else
+static void omap_uart_enable_wakeup(struct platform_device *pdev, bool enable)
+{}
 static void omap_uart_set_noidle(struct platform_device *pdev) {}
 static void omap_uart_set_forceidle(struct platform_device *pdev) {}
 static void 

[PATCH v7 16/21] OMAP2+: UART: Remove custom activate funcs and use generic funcs.

2011-10-18 Thread Govindraj.R
The custom hwmod activate and deactivate funcs does hwmod_enable
and idle same can be done with omap_device generic API's.

Signed-off-by: Govindraj.R govindraj.r...@ti.com
---
 arch/arm/mach-omap2/serial.c |   18 ++
 1 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 7c65410..7658a03 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -78,24 +78,10 @@ static struct omap_uart_port_info 
omap_serial_default_info[] __initdata = {
},
 };
 
-static int uart_idle_hwmod(struct omap_device *od)
-{
-   omap_hwmod_idle(od-hwmods[0]);
-
-   return 0;
-}
-
-static int uart_enable_hwmod(struct omap_device *od)
-{
-   omap_hwmod_enable(od-hwmods[0]);
-
-   return 0;
-}
-
 static struct omap_device_pm_latency omap_uart_latency[] = {
{
-   .deactivate_func = uart_idle_hwmod,
-   .activate_func   = uart_enable_hwmod,
+   .activate_func   = omap_device_enable_hwmods,
+   .deactivate_func = omap_device_idle_hwmods,
.flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST,
},
 };
-- 
1.7.4.1

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 3/5] regulator: helper routine to extract regulator_init_data

2011-10-18 Thread Mark Brown
On Tue, Oct 18, 2011 at 07:58:37PM +0800, Shawn Guo wrote:

 I understand that ideally device tree is supposed to describe pure
 hardware configurations.  But practically, when migrating a driver
 to device tree probe, we are trying to move the configurations
 described by platform_data into device tree to save the use of
 platform_data for device tree probe.  Then some of the configuration
 may not be so purely hardware related.  But I do not see this is a
 critical problem.

It's not just Linux-specific stuff, some of this is even specific to
what current Linux drivers can do - updating the kernel could mean a
different set of constraints.
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ARM: OMAP: Fix early init definitions

2011-10-18 Thread Kyle Manna
Depending on the archs defined in the config, some functions are
referenced without being defined. This fixes compile time errors that
would otherwise result.

Signed-off-by: Kyle Manna kyle.ma...@fuel7.com
---
 arch/arm/mach-omap2/io.c |   13 +
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/io.c b/arch/arm/mach-omap2/io.c
index aa96538..f1d18a2 100644
--- a/arch/arm/mach-omap2/io.c
+++ b/arch/arm/mach-omap2/io.c
@@ -359,6 +359,8 @@ static void __init omap_hwmod_init_postsetup(void)
omap_pm_if_early_init();
 }
 
+#if defined(CONFIG_SOC_OMAP2420)
+
 void __init omap2420_init_early(void)
 {
omap2_set_globals_242x();
@@ -370,6 +372,9 @@ void __init omap2420_init_early(void)
omap_hwmod_init_postsetup();
omap2420_clk_init();
 }
+#endif
+
+#if defined(CONFIG_SOC_OMAP2430)
 
 void __init omap2430_init_early(void)
 {
@@ -382,11 +387,14 @@ void __init omap2430_init_early(void)
omap_hwmod_init_postsetup();
omap2430_clk_init();
 }
+#endif
 
 /*
  * Currently only board-omap3beagle.c should call this because of the
  * same machine_id for 34xx and 36xx beagle.. Will get fixed with DT.
  */
+#if defined(CONFIG_ARCH_OMAP3)
+
 void __init omap3_init_early(void)
 {
omap2_set_globals_3xxx();
@@ -398,6 +406,7 @@ void __init omap3_init_early(void)
omap_hwmod_init_postsetup();
omap3xxx_clk_init();
 }
+#endif
 
 void __init omap3430_init_early(void)
 {
@@ -431,6 +440,8 @@ void __init ti816x_init_early(void)
omap3xxx_clk_init();
 }
 
+#if defined(CONFIG_ARCH_OMAP4)
+
 void __init omap4430_init_early(void)
 {
omap2_set_globals_443x();
@@ -442,6 +453,8 @@ void __init omap4430_init_early(void)
omap_hwmod_init_postsetup();
omap4xxx_clk_init();
 }
+#endif
+
 
 void __init omap_sdrc_init(struct omap_sdrc_params *sdrc_cs0,
  struct omap_sdrc_params *sdrc_cs1)
-- 
1.7.5.4

--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html