[PATCH V3 8/8] ARM: kirkwood: mv643xx_eth dt conversion
Sebastian Hesselbarth
sebastian.hesselbarth at gmail.com
Sun Jan 27 08:10:51 EST 2013
On 01/27/2013 01:21 PM, Russell King - ARM Linux wrote:
> On Sat, Jan 26, 2013 at 02:40:12PM +0100, Andrew Lunn wrote:
>> On Sat, Jan 26, 2013 at 01:50:11PM +0100, Sebastian Hesselbarth wrote:
>> The code here is based on dove_legacy_clk_init(). However the change
>> made by Jason is in order to make a DT device work, not an non-DT
>> device.
>>
>> The problem is the way the driver is getting the clock.
>>
>> mp->clk = clk_get(&pdev->dev, (pdev->id ? "1" : "0"));
>>
> ...
> So, the whole:
>
> mp->clk = clk_get(&pdev->dev, (pdev->id ? "1" : "0"));
>
> is absolutely ludicrous. You already know which device it is by means of
> the first argument. You don't need to pass a "0" or a "1". So that should
> be NULL, so:
>
> mp->clk = clk_get(&pdev->dev, NULL);
>
> That will get a clock from clkdev which is setup in the _matching_ tables
> to correlate with the device (and a NULL connection ID _there_ too). With
> OF, I believe it will get the first clock.
The conid was set for mv643xx but shouldn't be set anymore - check
mach-kirkwood/common.c. From what I can tell, powerpc isn't using
common clock at all and orion5x/mv78x00 don't have any clock gates.
I guess we can just remove the conid check and rely on DT passed
clock only.
Sebastian
More information about the linux-arm-kernel
mailing list