[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <49C74AEF.1060508@atmel.com>
Date: Mon, 23 Mar 2009 09:40:15 +0100
From: Nicolas Ferre <nicolas.ferre@...el.com>
To: Nicolas Ferre <nicolas.ferre@...el.com>,
Andrew Victor <linux@...im.org.za>,
David Brownell <david-b@...bell.net>,
ARM Linux Mailing List
<linux-arm-kernel@...ts.arm.linux.org.uk>,
Linux Kernel list <linux-kernel@...r.kernel.org>
CC: Patrice VILCHEZ <patrice.vilchez@...el.com>,
Sedji GAOUAOU <sedji.gaouaou@...el.com>
Subject: Re: [RFC PATCH] AT91: manage clock by functionality instead of CPUs
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists