Re: [PATCH 4/4] ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap

2013-06-11 Thread Roger Quadros
On 06/10/2013 05:25 PM, Tony Lindgren wrote:
 * Quadros, Roger rog...@ti.com [130610 05:37]:
 Hi Tony, (sorry, on Outlook web)

 -   compatible = ti,omap4-padconf, pinctrl-single;
 +   compatible = ti,omap4-padconf;

 This change is not necessary if we make sure the pinctrl-single-omap driver
 gets registered early enough, before the pinctrl devices are probed.
  (e.g. subsys_initcall())
 
 I'd rather make everything just module_init, there should not be
 any need to tinker with the init call ordering any longer with
 deferred probe. And by making everything into regular device drivers
 we actually see real error messages without DEBUG_LL and earlyprintk
 if something goes wrong.
 
 Note that there are patches queued to make twl-core.c just regular
 module_init as well, so that should fix any issues you might be
 related it probing before pinctrl.
  

OK.

 I've commented about this in the other patch.
 
 Sorry can you clarify, which other patch? The other message I saw
 in this thread was empty. Or at least I have not seen it yet.

Sorry about that. Outlook web sucks. I see that you have found it :).

cheers,
-roger

--
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 4/4] ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap

2013-06-10 Thread Quadros, Roger
Hi Tony, (sorry, on Outlook web)

-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;

This change is not necessary if we make sure the pinctrl-single-omap driver
gets registered early enough, before the pinctrl devices are probed.
 (e.g. subsys_initcall())

I've commented about this in the other patch.

cheers,
-roger


Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. 
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki


From: Tony Lindgren [t...@atomide.com]
Sent: Friday, June 07, 2013 11:50 PM
To: linus.wall...@linaro.org
Cc: devicetree-disc...@lists.ozlabs.org; Haojian Zhuang; Ujfalusi, Peter; 
linux-omap@vger.kernel.org; linux-arm-ker...@lists.infradead.org; Quadros, Roger
Subject: [PATCH 4/4] ARM: OMAP: Move DT wake-up event handling over to use 
pinctrl-single-omap

Now pinctrl-single-omap can handle the wake-up events for us now
as long as the events are configured in the .dts files.

Done in collaboration with Roger Quadros rog...@ti.com.

Cc: Haojian Zhuang haojian.zhu...@gmail.com
Cc: Peter Ujfalusi peter.ujfal...@ti.com
Cc: devicetree-disc...@lists.ozlabs.org
Signed-off-by: Roger Quadros rog...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com
---
 arch/arm/boot/dts/omap3.dtsi |4 ++--
 arch/arm/boot/dts/omap4.dtsi |4 ++--
 arch/arm/boot/dts/omap5.dtsi |4 ++--
 arch/arm/mach-omap2/mux.c|8 ++--
 arch/arm/mach-omap2/pm34xx.c |2 ++
 arch/arm/mach-omap2/prm_common.c |   26 ++
 6 files changed, 40 insertions(+), 8 deletions(-)

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 99ba6e1..847af56 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -94,7 +94,7 @@
};

omap3_pmx_core: pinmux@48002030 {
-   compatible = ti,omap3-padconf, pinctrl-single;
+   compatible = ti,omap3-padconf;
reg = 0x48002030 0x05cc;
#address-cells = 1;
#size-cells = 0;
@@ -103,7 +103,7 @@
};

omap3_pmx_wkup: pinmux@0x48002a00 {
-   compatible = ti,omap3-padconf, pinctrl-single;
+   compatible = ti,omap3-padconf;
reg = 0x48002a00 0x5c;
#address-cells = 1;
#size-cells = 0;
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 2a56428..2a4f099 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -107,7 +107,7 @@
};

omap4_pmx_core: pinmux@4a100040 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4a100040 0x0196;
#address-cells = 1;
#size-cells = 0;
@@ -115,7 +115,7 @@
pinctrl-single,function-mask = 0x7fff;
};
omap4_pmx_wkup: pinmux@4a31e040 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4a31e040 0x0038;
#address-cells = 1;
#size-cells = 0;
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 3dd7ff8..5515d58 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -100,7 +100,7 @@
};

omap5_pmx_core: pinmux@4a002840 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4a002840 0x01b6;
#address-cells = 1;
#size-cells = 0;
@@ -108,7 +108,7 @@
pinctrl-single,function-mask = 0x7fff;
};
omap5_pmx_wkup: pinmux@4ae0c840 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4ae0c840 0x0038;
#address-cells = 1;
#size-cells = 0;
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index f82cf87..48094b58 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -811,6 +811,12 @@ int __init omap_mux_late_init(void)
}
}

+   omap_mux_dbg_init();
+
+   /* see pinctrl-single-omap for the wake-up interrupt handling */
+   if (of_have_populated_dt())
+   return 0;
+
ret = request_irq(omap_prcm_event_to_irq(io),
omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND,
hwmod_io, 

Re: [PATCH 4/4] ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap

2013-06-10 Thread Tony Lindgren
* Quadros, Roger rog...@ti.com [130610 05:37]:
 Hi Tony, (sorry, on Outlook web)
 
 -   compatible = ti,omap4-padconf, pinctrl-single;
 +   compatible = ti,omap4-padconf;
 
 This change is not necessary if we make sure the pinctrl-single-omap driver
 gets registered early enough, before the pinctrl devices are probed.
  (e.g. subsys_initcall())

I'd rather make everything just module_init, there should not be
any need to tinker with the init call ordering any longer with
deferred probe. And by making everything into regular device drivers
we actually see real error messages without DEBUG_LL and earlyprintk
if something goes wrong.

Note that there are patches queued to make twl-core.c just regular
module_init as well, so that should fix any issues you might be
related it probing before pinctrl.
 
 I've commented about this in the other patch.

Sorry can you clarify, which other patch? The other message I saw
in this thread was empty. Or at least I have not seen it yet.

Regards,

Tony
--
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 4/4] ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap

2013-06-10 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [130607 13:58]:
 * Tony Lindgren t...@atomide.com [130607 13:56]:
  Now pinctrl-single-omap can handle the wake-up events for us now
  as long as the events are configured in the .dts files.
 
 This patch I should queue separately, the rest should go via
 the pinctrl tree.

Here's this one updated to add stubs for the SoC specific
reconfigure_io_chain functions when the SoC is not selected.

Regards,

Tony



From: Tony Lindgren t...@atomide.com
Date: Fri, 7 Jun 2013 11:39:58 -0700
Subject: [PATCH] ARM: OMAP: Move DT wake-up event handling over to use 
pinctrl-single-omap

Now pinctrl-single-omap can handle the wake-up events for us now
as long as the events are configured in the .dts files.

Done in collaboration with Roger Quadros rog...@ti.com.

Cc: Haojian Zhuang haojian.zhu...@gmail.com
Cc: Peter Ujfalusi peter.ujfal...@ti.com
Cc: devicetree-disc...@lists.ozlabs.org
Signed-off-by: Roger Quadros rog...@ti.com
Signed-off-by: Tony Lindgren t...@atomide.com

diff --git a/arch/arm/boot/dts/omap3.dtsi b/arch/arm/boot/dts/omap3.dtsi
index 99ba6e1..847af56 100644
--- a/arch/arm/boot/dts/omap3.dtsi
+++ b/arch/arm/boot/dts/omap3.dtsi
@@ -94,7 +94,7 @@
};
 
omap3_pmx_core: pinmux@48002030 {
-   compatible = ti,omap3-padconf, pinctrl-single;
+   compatible = ti,omap3-padconf;
reg = 0x48002030 0x05cc;
#address-cells = 1;
#size-cells = 0;
@@ -103,7 +103,7 @@
};
 
omap3_pmx_wkup: pinmux@0x48002a00 {
-   compatible = ti,omap3-padconf, pinctrl-single;
+   compatible = ti,omap3-padconf;
reg = 0x48002a00 0x5c;
#address-cells = 1;
#size-cells = 0;
diff --git a/arch/arm/boot/dts/omap4.dtsi b/arch/arm/boot/dts/omap4.dtsi
index 2a56428..2a4f099 100644
--- a/arch/arm/boot/dts/omap4.dtsi
+++ b/arch/arm/boot/dts/omap4.dtsi
@@ -107,7 +107,7 @@
};
 
omap4_pmx_core: pinmux@4a100040 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4a100040 0x0196;
#address-cells = 1;
#size-cells = 0;
@@ -115,7 +115,7 @@
pinctrl-single,function-mask = 0x7fff;
};
omap4_pmx_wkup: pinmux@4a31e040 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4a31e040 0x0038;
#address-cells = 1;
#size-cells = 0;
diff --git a/arch/arm/boot/dts/omap5.dtsi b/arch/arm/boot/dts/omap5.dtsi
index 3dd7ff8..5515d58 100644
--- a/arch/arm/boot/dts/omap5.dtsi
+++ b/arch/arm/boot/dts/omap5.dtsi
@@ -100,7 +100,7 @@
};
 
omap5_pmx_core: pinmux@4a002840 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4a002840 0x01b6;
#address-cells = 1;
#size-cells = 0;
@@ -108,7 +108,7 @@
pinctrl-single,function-mask = 0x7fff;
};
omap5_pmx_wkup: pinmux@4ae0c840 {
-   compatible = ti,omap4-padconf, pinctrl-single;
+   compatible = ti,omap4-padconf;
reg = 0x4ae0c840 0x0038;
#address-cells = 1;
#size-cells = 0;
diff --git a/arch/arm/mach-omap2/mux.c b/arch/arm/mach-omap2/mux.c
index f82cf87..48094b58 100644
--- a/arch/arm/mach-omap2/mux.c
+++ b/arch/arm/mach-omap2/mux.c
@@ -811,6 +811,12 @@ int __init omap_mux_late_init(void)
}
}
 
+   omap_mux_dbg_init();
+
+   /* see pinctrl-single-omap for the wake-up interrupt handling */
+   if (of_have_populated_dt())
+   return 0;
+
ret = request_irq(omap_prcm_event_to_irq(io),
omap_hwmod_mux_handle_irq, IRQF_SHARED | IRQF_NO_SUSPEND,
hwmod_io, omap_mux_late_init);
@@ -818,8 +824,6 @@ int __init omap_mux_late_init(void)
if (ret)
pr_warning(mux: Failed to setup hwmod io irq %d\n, ret);
 
-   omap_mux_dbg_init();
-
return 0;
 }
 
diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c
index c018593..9b19b14 100644
--- a/arch/arm/mach-omap2/pm34xx.c
+++ b/arch/arm/mach-omap2/pm34xx.c
@@ -172,6 +172,8 @@ static int prcm_clear_mod_irqs(s16 module, u8 regs, u32 
ignore_bits)
wkst = omap2_prm_read_mod_reg(module, wkst_off);
wkst = ~ignore_bits;
c++;
+   if (c  10)

Re: [PATCH 4/4] ARM: OMAP: Move DT wake-up event handling over to use pinctrl-single-omap

2013-06-07 Thread Tony Lindgren
* Tony Lindgren t...@atomide.com [130607 13:56]:
 Now pinctrl-single-omap can handle the wake-up events for us now
 as long as the events are configured in the .dts files.

This patch I should queue separately, the rest should go via
the pinctrl tree.

Regards,

Tony
--
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