linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: festevam@gmail.com (Fabio Estevam)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mx28: clock-mx28: Use a proper timeout mechanism
Date: Mon, 23 Jan 2012 19:31:45 -0200	[thread overview]
Message-ID: <CAOMZO5BfmEy29YgYYg3_TGLLm_CSzNU_yg3yPi0ZxFKf0g=ZZw@mail.gmail.com> (raw)
In-Reply-To: <20120123211854.GB14133@pengutronix.de>

Hi Wolfram,

On Mon, Jan 23, 2012 at 7:18 PM, Wolfram Sang <w.sang@pengutronix.de> wrote:

> Is there a difference in the two versions you sent?

No,  I sent the same patch twice by mistake.

>> +static int mxs_clkctrl_timeout(unsigned int reg_offset, unsigned int mask)
>> +{
>> + ? ? unsigned long timeout = jiffies + msecs_to_jiffies(CLKCTRL_TIMEOUT);
>> + ? ? while (readl_relaxed(CLKCTRL_BASE_ADDR + reg_offset) & mask) {
>
> Hmm, this is a lot better, yet not perfect. You could be scheduled away here
> for 10ms and then you had only checked at t=0. However, I think it makes more
> sense to introduce a generic timeout-loop somehow and then convert to it
> later. This is my homework, though...

Ok, will address your comments and keep the current
mxs_clkctrl_timeout version for v2.

Thanks for your review.

Regards,

Fabio Estevam

  reply	other threads:[~2012-01-23 21:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-23 14:41 [PATCH] ARM: mx28: clock-mx28: Use a proper timeout mechanism Fabio Estevam
2012-01-23 21:18 ` Wolfram Sang
2012-01-23 21:31   ` Fabio Estevam [this message]
2012-01-26 12:28 ` Shawn Guo
2012-01-27 14:56   ` Fabio Estevam
2012-01-27 14:42 ` [PATCH v2] " Fabio Estevam
2012-01-27 14:44 ` [PATCH v3] ARM: mxs: " Fabio Estevam
2012-01-31 15:28   ` Shawn Guo
  -- strict thread matches above, loose matches on Subject: below --
2012-01-23 12:40 [PATCH] ARM: mx28: clock-mx28: " Fabio Estevam

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='CAOMZO5BfmEy29YgYYg3_TGLLm_CSzNU_yg3yPi0ZxFKf0g=ZZw@mail.gmail.com' \
    --to=festevam@gmail.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).