[PATCH 2/2] ARM: OMAP: SmartReflex: pass device dependent data via platform data
Jean Pihet
jean.pihet at newoldbits.com
Wed Oct 3 11:51:27 EDT 2012
Kevin,
On Wed, Oct 3, 2012 at 4:29 PM, Kevin Hilman
<khilman at deeprootsystems.com> wrote:
> jean.pihet at newoldbits.com writes:
>
>> From: Jean Pihet <j-pihet at ti.com>
>>
>> Remove the device dependent code (ex. cpu_is_xxx()) and settings
>> from the driver code and instead pass them via the platform
>> data. This allows a clean separation of the driver code and the platform
>> code, as required by the move of the platform header files to
>> include/linux/platform_data.
>>
>> Note about the smartreflex functional clocks: the smartreflex fclks
>> are derived from sys_clk and are named "smartreflex.%d". Since the
>> smartreflex device names and the functional clock names are identical
>> the device driver code uses them to control the functional clocks.
>
> Thanks for adding this part.
>
> One more nit below, then please resend this patch as a combined series
> with the "align fclk names" patch.
Just re-sent the new series.
> (note: The previous patch 1 from this
> series I've queued separately as a fix for v3.7-rc. )
Thanks! The new series is based on mainline 3.6.0 with this patch applied.
...
>> diff --git a/drivers/power/avs/smartreflex.c b/drivers/power/avs/smartreflex.c
>> index 24768a2..829467f 100644
>> --- a/drivers/power/avs/smartreflex.c
>> +++ b/drivers/power/avs/smartreflex.c
>> @@ -133,14 +133,11 @@ static void sr_set_clk_length(struct omap_sr *sr)
>> struct clk *sys_ck;
>> u32 sys_clk_speed;
>>
>> - if (cpu_is_omap34xx())
>> - sys_ck = clk_get(NULL, "sys_ck");
>> - else
>> - sys_ck = clk_get(NULL, "sys_clkin_ck");
>> + sys_ck = clk_get(&sr->pdev->dev, "fck");
>
> nit: since this isn't the sys_clk anymore, could you s/sys_ck/fck/ ?
Done!
>
> Thanks,
>
> Kevin
>
Thanks,
Jean
More information about the linux-arm-kernel
mailing list