From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Nicolas Ferre <nicolas.ferre@atmel.com>,
Andrew Victor <linux@maxim.org.za>,
David Brownell <david-b@pacbell.net>,
ARM Linux Mailing List <linux-arm-kernel@lists.arm.linux.org.uk>,
Linux Kernel list <linux-kernel@vger.kernel.org>
Cc: Patrice VILCHEZ <patrice.vilchez@atmel.com>,
Sedji GAOUAOU <sedji.gaouaou@atmel.com>
Subject: Re: [RFC PATCH] AT91: manage clock by functionality instead of CPUs
Date: Mon, 23 Mar 2009 09:40:15 +0100 [thread overview]
Message-ID: <49C74AEF.1060508@atmel.com> (raw)
In-Reply-To: <20090322115710.GV10127@sci.fi>
Hi Ville,
Ville Syrjälä :
> On Fri, Mar 20, 2009 at 11:56:55AM +0100, Nicolas Ferre wrote:
>> --- a/arch/arm/mach-at91/clock.c
>> +++ b/arch/arm/mach-at91/clock.c
>> @@ -45,6 +45,25 @@
>> #define clk_is_sys(x) ((x)->type & CLK_TYPE_SYSTEM)
>>
>>
>> +/*
>> + * Chips have some kind of clocks : group them by functionality
>> + */
>> +#define cpu_has_utmi() ( cpu_is_at91cap9() \
>> + || cpu_is_at91sam9rl())
>> +
>> +#define cpu_has_800M_plla() (cpu_is_at91sam9g20())
>> +
>> +#define cpu_has_pllb() (!(cpu_is_at91sam9rl()))
>
> Useless parentheses.
Ok.
>> +
>> +#define cpu_has_upll() (0)
>
> Is this for some future chip?
Definitely, yes !
>> +
>> +/* USB host HS & FS */
>> +#define cpu_has_uhp() (!cpu_is_at91sam9rl())
>> +
>> +/* USB device FS only */
>> +#define cpu_has_udpfs() (!(cpu_is_at91sam9rl()))
>
> Useless parentheses.
Ok.
>> @@ -175,7 +194,12 @@ static struct clk __init *at91_css_to_cl
>> case AT91_PMC_CSS_PLLA:
>> return &plla;
>> case AT91_PMC_CSS_PLLB:
>> - return &pllb;
>> + if (cpu_has_upll())
>> + /* CSS_PLLB == CSS_UPLL */
>> + return &utmi_clk;
>> + else
>> + if (cpu_has_pllb())
>> + return &pllb;
>
> Put "else if" on one line?
Ok.
Thanks for your review, cheers,
--
Nicolas Ferre
prev parent reply other threads:[~2009-03-23 8:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-20 10:56 [RFC PATCH] AT91: manage clock by functionality instead of CPUs Nicolas Ferre
2009-03-22 11:57 ` Ville Syrjälä
2009-03-23 8:40 ` Nicolas Ferre [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=49C74AEF.1060508@atmel.com \
--to=nicolas.ferre@atmel.com \
--cc=david-b@pacbell.net \
--cc=linux-arm-kernel@lists.arm.linux.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@maxim.org.za \
--cc=patrice.vilchez@atmel.com \
--cc=sedji.gaouaou@atmel.com \
/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.