All of lore.kernel.org
 help / color / mirror / Atom feed
From: u.kleine-koenig@pengutronix.de (Uwe Kleine-König)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] mx51: add resources for SD/MMC on i.MX51
Date: Tue, 12 Oct 2010 11:32:25 +0200	[thread overview]
Message-ID: <20101012093225.GF29673@pengutronix.de> (raw)
In-Reply-To: <4CB4216C.8010200@eukrea.com>

Hi Eric,

On Tue, Oct 12, 2010 at 10:50:52AM +0200, Eric B?nard wrote:
> Le 12/10/2010 10:18, Uwe Kleine-K?nig a ?crit :
>> On Tue, Oct 12, 2010 at 09:31:25AM +0200, Eric B?nard wrote:
>>> the attached patch allows SD to work on i.MX51 with Wolfram's drivers
>>> Tested on i.MX51.
>>>
>>> Based on original patch from: Richard Zhu<r65037@freescale.com>
>>> Signed-off-by: Eric B?nard<eric@eukrea.com>
>>> ---
>>>   arch/arm/mach-mx5/clock-mx51.c              |  102 ++++++++++++++++++++++++++-
>>>   arch/arm/mach-mx5/devices-imx51.h           |    9 +++
>>>   arch/arm/plat-mxc/include/mach/iomux-mx51.h |   45 ++++++++----
>>>   3 files changed, 140 insertions(+), 16 deletions(-)
>>>
>>> diff --git a/arch/arm/mach-mx5/clock-mx51.c b/arch/arm/mach-mx5/clock-mx51.c
>>> index 7deb683..9e8b268 100644
>>> --- a/arch/arm/mach-mx5/clock-mx51.c
>>> +++ b/arch/arm/mach-mx5/clock-mx51.c
>>> @@ -41,6 +41,34 @@ static struct clk usboh3_clk;
>>>
>>>   #define MAX_DPLL_WAIT_TRIES	1000 /* 1000 * udelay(1) = 1ms */
>>>
>>> +static void __calc_pre_post_dividers(u32 div, u32 *pre, u32 *post)
>>> +{
>> I asked for a comment here.  E.g. valid ranges of pre and post and the
>> task solved here (I assume it's "Find pre and post with pre * post =
>> div"?).
>>
> will try to write something.
> Richard : do you have a comment in mind for this function ?
>
> >> +		}
> >> +		*post = (div + *pre - 1) / *pre;
> > 		*post = DIV_ROUND_UP(div, *pre);
> >
> > I don't know if DIV_ROUND_UP is sensible, maybe use DIV_ROUND_CLOSEST?
> > I'd look into that when the comment above is in place.
> >
> if you have an opinion before, this would be great to avoid a n+1  
> version of this patch ;-)
I'm lazy.  To analyse this I need to know how pre and post are used.  I
assume you (and/or Richard) already know that so I'm not keen to search
this info in the reference manuals.  See it as a quality test for the
comment I asked for :-)

>>> -#define DEFINE_CLOCK1(name, i, er, es, pfx, p, s)	\
>>> +#define DEFINE_CLOCK_CCGR(name, i, er, es, pfx, p, s)	\
>> This is IMHO a good idea, but it should go in a seperate patch.  These
>> clock changes are very sensible and so a working bisection is important
>> here.
>>
> there is no clock change here only a define rename to avoid having  
> DEFINE_CLOCK1, DEFINE_CLOCK2 ... is a separate patch really needed ?
Yep, please do.  I don't hope your patch breaks anything, but if it
does, it's easier to find out the actual breakage if there is no noise
in the patch.

Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |

      reply	other threads:[~2010-10-12  9:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-11 16:05 [PATCH] mx51: add resources for SD/MMC on i.MX51 Eric Bénard
2010-10-11 16:28 ` Wolfram Sang
2010-10-11 16:55   ` Eric Bénard
2010-10-11 17:04     ` Wolfram Sang
2010-10-12  7:31       ` [PATCH 1/2] clock-mx51: factorize clk_set_parent and clk_get_rate Eric Bénard
2010-10-12  7:31       ` [PATCH 2/2] mx51: add resources for SD/MMC on i.MX51 Eric Bénard
2010-10-12  8:18         ` Uwe Kleine-König
2010-10-12  8:50           ` Eric Bénard
2010-10-12  9:32             ` Uwe Kleine-König [this message]

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=20101012093225.GF29673@pengutronix.de \
    --to=u.kleine-koenig@pengutronix.de \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.