linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: rnayak@ti.com (Rajendra Nayak)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] ARM: OMAP4 PM: Add IO Daisychain support
Date: Fri, 24 Feb 2012 12:20:08 +0530	[thread overview]
Message-ID: <4F473320.7000901@ti.com> (raw)
In-Reply-To: <5672BD13E82B844A93BB4597F293F19A0B3F41AF@DNCE02.ent.ti.com>

Djamil,

On Thursday 23 February 2012 09:28 PM, Elaidi, Djamil wrote:
> Hi Kristo,
>
> I think you must also add a omap_test_timeout() check after the Trigger WUCLKIN disable, to verify WUCLK_STATUS has come back to 0.
> This is needed because the IO daisy chain will not be ready until the WUCLKIN falling edge has propagated.

You are right, this was missed and needs to be added.
Thanks for the review.

regards,
Rajendra

>
> +	/* Trigger WUCLKIN disable */
> +	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
> +			OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
> +	return;
> +	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);
>
>
> Best regards
> Djamil ELA?DI
> +33 4 97 27 50 97
> Software Systems Engineer
> OMAP Platform Business Unit - PSI Modem Integration
> Texas Instruments
>
> -----Original Message-----
> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-owner at vger.kernel.org] On Behalf Of Kristo, Tero
> Sent: jeudi 23 f?vrier 2012 14:22
> To: linux-omap at vger.kernel.org; Hilman, Kevin
> Cc: linux-arm-kernel at lists.infradead.org; Nayak, Rajendra; Sripathy, Vishwanath
> Subject: [PATCH 2/6] ARM: OMAP4 PM: Add IO Daisychain support
>
> From: Rajendra Nayak<rnayak@ti.com>
>
> patch adds IO Daisychain support for OMAP4 as per section 3.9.4 in OMAP4430
> Public TRM.
>
> 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>
> ---
>   arch/arm/mach-omap2/prm44xx.c |   32 ++++++++++++++++++++++++++++++++
>   arch/arm/mach-omap2/prm44xx.h |    1 +
>   2 files changed, 33 insertions(+), 0 deletions(-)
>
> diff --git a/arch/arm/mach-omap2/prm44xx.c b/arch/arm/mach-omap2/prm44xx.c
> index 33dd655..1557647 100644
> --- a/arch/arm/mach-omap2/prm44xx.c
> +++ b/arch/arm/mach-omap2/prm44xx.c
> @@ -230,6 +230,41 @@ void omap44xx_prm_restore_irqen(u32 *saved_mask)
>   				 OMAP4_PRM_IRQENABLE_MPU_2_OFFSET);
>   }
>
> +/**
> + * Maximum time(us) it takes to output the signal WUCLKOUT of the last pad of
> + * the I/O ring after asserting WUCLKIN high
> + */
> +#define MAX_IOPAD_LATCH_TIME 1000
> +
> +/* OMAP4 IO Daisychain trigger sequence */
> +void omap4_trigger_wuclk_ctrl(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);
> +
> +	/* Trigger WUCLKIN disable */
> +	omap4_prm_rmw_inst_reg_bits(OMAP4430_WUCLK_CTRL_MASK, 0x0,
> +			OMAP4430_PRM_DEVICE_INST, OMAP4_PRM_IO_PMCTRL_OFFSET);
> +	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..a840f0f 100644
> --- a/arch/arm/mach-omap2/prm44xx.h
> +++ b/arch/arm/mach-omap2/prm44xx.h
> @@ -762,6 +762,7 @@ void omap4_prm_vp_clear_txdone(u8 vp_id);
>   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 omap4_trigger_wuclk_ctrl(void);
>
>   /* PRM interrupt-related functions */
>   extern void omap44xx_prm_read_pending_irqs(unsigned long *events);

  reply	other threads:[~2012-02-24  6:50 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-23 13:21 [PATCH 0/6] ARM: OMAP4: core retention support Tero Kristo
2012-02-23 13:21 ` [PATCH 1/6] arm: omap4: suspend: Program all domains to RET Tero Kristo
2012-02-23 13:45   ` Shilimkar, Santosh
2012-02-23 13:21 ` [PATCH 2/6] ARM: OMAP4 PM: Add IO Daisychain support Tero Kristo
2012-02-23 13:48   ` Shilimkar, Santosh
2012-02-24  6:59     ` Rajendra Nayak
2012-02-24  8:53       ` Shilimkar, Santosh
2012-02-23 15:58   ` Elaidi, Djamil
2012-02-24  6:50     ` Rajendra Nayak [this message]
2012-02-23 13:21 ` [PATCH 3/6] ARM: OMAP3PLUS PM: Add IO Daisychain support via hwmod mux Tero Kristo
2012-02-23 13:53   ` Shilimkar, Santosh
2012-02-24 14:35     ` Tero Kristo
2012-02-28  0:24   ` Kevin Hilman
2012-02-23 13:21 ` [PATCH 4/6] arm: omap4: prm: fix interrupt register offsets Tero Kristo
2012-02-28  0:25   ` Kevin Hilman
2012-02-23 13:21 ` [PATCH 5/6] ARM: OMAP4: suspend: Do not get dsp/tesla out of reset Tero Kristo
2012-02-23 13:56   ` Shilimkar, Santosh
2012-02-23 20:44     ` Cousson, Benoit
2012-02-28  0:28   ` Kevin Hilman
2012-02-28  5:34     ` Rajendra Nayak
2012-02-23 13:22 ` [PATCH 6/6] arm: omap3+: add prcm chain interrupts to the interrupt list Tero Kristo
2012-02-28  1:25 ` [PATCH 0/6] ARM: OMAP4: core retention support Kevin Hilman
2012-02-28  7:24   ` Tero Kristo

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=4F473320.7000901@ti.com \
    --to=rnayak@ti.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).