From: rnayak@ti•com (Rajendra Nayak)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCHv5 3/6] ARM: OMAP4 PM: Add IO Daisychain support
Date: Mon, 12 Mar 2012 11:22:42 +0530 [thread overview]
Message-ID: <4F5D8F2A.1070602@ti.com> (raw)
In-Reply-To: <alpine.DEB.2.00.1203092051140.30879@utopia.booyaka.com>
On Saturday 10 March 2012 09:29 AM, Paul Walmsley wrote:
> Hi
>
> On Tue, 6 Mar 2012, Tero Kristo wrote:
>
>> From: Rajendra Nayak<rnayak@ti•com>
>>
>> IO daisychain is a mechanism that allows individual IO pads to generate
>> wakeup events on their own based on a switch of an input signal level.
>> This allows the hardware module behind the pad to be powered down, but
>> still have device level capability to detect IO events, and once this
>> happens the module can be powered back up to resume IO. See section
>> 3.9.4 in OMAP4430 Public TRM for details.
>>
>> Signed-off-by: Rajendra Nayak<rnayak@ti•com>
>> Signed-off-by: Vishwanath BS<vishwanath.bs@ti•com>
>> Signed-off-by: Tero Kristo<t-kristo@ti•com>
>
> Here's an updated version of this patch. Please let me know if you think
> we should remove the poll on the WUCLKOUT line to conform with the change
> that Tero made to the OMAP3 version.
Thanks Paul, for the updates patch. Just one comment below..
>
>
> - Paul
>
> From: Rajendra Nayak<rnayak@ti•com>
> Date: Fri, 2 Mar 2012 17:17:52 +0200
> Subject: [PATCH 3/6] ARM: OMAP4: PRM: Add IO Daisychain support
>
> IO daisychain is a mechanism that allows individual IO pads to generate
> wakeup events on their own based on a switch of an input signal level.
> This allows the hardware module behind the pad to be powered down, but
> still have device level capability to detect IO events, and once this
> happens the module can be powered back up to resume IO. See section
> 3.9.4 in OMAP4430 Public TRM for details.
>
> Signed-off-by: Rajendra Nayak<rnayak@ti•com>
> Signed-off-by: Vishwanath BS<vishwanath.bs@ti•com> is just bad
documentation.
> Signed-off-by: Tero Kristo<t-kristo@ti•com>
> [paul at pwsan.com: removed MAX_IOPAD_LATCH_TIME declaration; renamed
But the code below still seems to use it. Is it now defined in some
common header so the same value is used in omap3 and omap4?
regards,
Rajendra
> omap4_trigger_io_chain() to conform to other PRM function names;
> added kerneldoc]
> Signed-off-by: Paul Walmsley<paul@pwsan•com>
> ---
> arch/arm/mach-omap2/prm44xx.c | 48 +++++++++++++++++++++++++++++++++++++++++
> arch/arm/mach-omap2/prm44xx.h | 2 +
> 2 files changed, 50 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
> index a1d6154..5868a12 100644
> --- a/arch/arm/mach-omap2/prm44xx.c
> +++ b/arch/arm/mach-omap2/prm44xx.c
> @@ -231,6 +231,54 @@ void omap44xx_prm_restore_irqen(u32 *saved_mask)
> OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
> }
>
> +/**
> + * omap44xx_prm_reconfigure_io_chain - clear latches and reconfigure I/O chain
> + *
> + * Clear any previously-latched I/O wakeup events and ensure that the
> + * I/O wakeup gates are aligned with the current mux settings. Works
> + * by asserting WUCLKIN, waiting for WUCLKOUT to be asserted, and then
> + * deasserting WUCLKIN and waiting for WUCLKOUT to be deasserted.
> + * No return value. XXX Are the final two steps necessary?
> + */
> +void omap44xx_prm_reconfigure_io_chain(void)
> +{
> + int i = 0;
> +
> + /* Enable GLOBAL_WUEN */
> + if (!(omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
> + OMAP4_PRM_IO_PMCTRL_OFFSET)& OMAP4430_GLOBAL_WUEN_MASK))
> + omap4_prm_rmw_inst_reg_bits(OMAP4430_GLOBAL_WUEN_MASK,
> + OMAP4430_GLOBAL_WUEN_MASK, OMAP4430_PRM_DEVICE_INST,
> + OMAP4_PRM_IO_PMCTRL_OFFSET);
> +
> + /* Trigger WUCLKIN enable */
> + omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK,
> + OMAP4430_WUCLK_CTRL_MASK, OMAP4430_PRM_DEVICE_INST,
> + OMAP4_PRM_IO_PMCTRL_OFFSET);
> + omap_test_timeout(
> + (((omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
> + OMAP4_PRM_IO_PMCTRL_OFFSET)&
> + OMAP4430_WUCLK_STATUS_MASK)>>
> + OMAP4430_WUCLK_STATUS_SHIFT) == 1),
> + MAX_IOPAD_LATCH_TIME, i);
> + if (i == MAX_IOPAD_LATCH_TIME)
> + pr_warn("PRM: I/O chain clock line assertion timed out\n");
> +
> + /* Trigger WUCLKIN disable */
> + omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
> + OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
> + omap_test_timeout(
> + (((omap4_prm_read_inst_reg(OMAP4430_PRM_DEVICE_INST,
> + OMAP4_PRM_IO_PMCTRL_OFFSET)&
> + OMAP4430_WUCLK_STATUS_MASK)>>
> + OMAP4430_WUCLK_STATUS_SHIFT) == 0),
> + MAX_IOPAD_LATCH_TIME, i);
> + if (i == MAX_IOPAD_LATCH_TIME)
> + pr_warn("PRM: I/O chain clock line deassertion timed out\n");
> +
> + return;
> +}
> +
> static int __init omap4xxx_prcm_init(void)
> {
> if (cpu_is_omap44xx())
> diff --git a/arch/arm/mach-omap2/prm44xx.h b/arch/arm/mach-omap2/prm44xx.h
> index 7978092..ee72ae6 100644
> --- a/arch/arm/mach-omap2/prm44xx.h
> +++ b/arch/arm/mach-omap2/prm44xx.h
> @@ -763,6 +763,8 @@ extern u32 omap4_prm_vcvp_read(u8 offset);
> extern void omap4_prm_vcvp_write(u32 val, u8 offset);
> extern u32 omap4_prm_vcvp_rmw(u32 mask, u32 bits, u8 offset);
>
> +extern void omap44xx_prm_reconfigure_io_chain(void);
> +
> /* PRM interrupt-related functions */
> extern void omap44xx_prm_read_pending_irqs(unsigned long *events);
> extern void omap44xx_prm_ocp_barrier(void);
next prev parent reply other threads:[~2012-03-12 5:52 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-06 15:11 [PATCHv5 0/6] ARM: OMAP3+: IO daisy chain support fixes Tero Kristo
2012-03-06 15:11 ` [PATCHv5 1/6] ARM: OMAP3 PM: correct enable/disable of daisy io chain Tero Kristo
2012-03-10 3:48 ` Paul Walmsley
2012-03-06 15:11 ` [PATCHv5 2/6] ARM: OMAP3 PM: Move IO Daisychain function to omap3 prm file Tero Kristo
2012-03-06 15:57 ` Nishanth Menon
2012-03-06 16:05 ` Tero Kristo
2012-03-10 0:40 ` Paul Walmsley
2012-03-12 5:50 ` Rajendra Nayak
2012-03-12 9:19 ` Tero Kristo
2012-03-12 10:15 ` Rajendra Nayak
2012-03-10 3:50 ` Paul Walmsley
2012-03-06 15:11 ` [PATCHv5 3/6] ARM: OMAP4 PM: Add IO Daisychain support Tero Kristo
2012-03-10 3:59 ` Paul Walmsley
2012-03-12 5:52 ` Rajendra Nayak [this message]
2012-03-12 6:10 ` Rajendra Nayak
2012-03-12 6:51 ` Paul Walmsley
2012-03-06 15:11 ` [PATCHv5 4/6] ARM: OMAP3+: PRM: Enable IO wake up Tero Kristo
2012-03-10 4:00 ` Paul Walmsley
2012-03-06 15:11 ` [PATCHv5 5/6] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Tero Kristo
2012-03-10 4:01 ` Paul Walmsley
2012-06-22 11:45 ` Rajendra Nayak
2012-06-22 18:39 ` Paul Walmsley
2012-03-06 15:11 ` [PATCHv5 6/6] ARM: OMAP3 PM: Remove IO Daisychain control from cpuidle Tero Kristo
2012-03-10 4:02 ` Paul Walmsley
2012-03-10 4:05 ` [PATCHv5 0/6] ARM: OMAP3+: IO daisy chain support fixes Paul Walmsley
2012-03-12 5:53 ` Rajendra Nayak
2012-03-12 10:00 ` Tero Kristo
2012-03-12 10:13 ` Paul Walmsley
2012-03-10 21:29 ` Paul Walmsley
2012-03-12 5:55 ` Rajendra Nayak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4F5D8F2A.1070602@ti.com \
--to=rnayak@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox