linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: eric@eukrea.com (Eric Bénard)
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 10:50:52 +0200	[thread overview]
Message-ID: <4CB4216C.8010200@eukrea.com> (raw)
In-Reply-To: <20101012081804.GD29673@pengutronix.de>

Hi Uwe,

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 ;-)

>> -#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 ?

Eric

  reply	other threads:[~2010-10-12  8:50 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 [this message]
2010-10-12  9:32             ` Uwe Kleine-König

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=4CB4216C.8010200@eukrea.com \
    --to=eric@eukrea.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).