Thread (30 messages) 30 messages, 6 authors, 2012-04-25

[PATCH V3 07/12] ata/sata_mv: Remove conditional compilation of clk code

From: viresh kumar <hidden>
Date: 2012-04-25 03:02:17
Also in: linux-ide, lkml

On Wed, Apr 25, 2012 at 1:48 AM, Russell King - ARM Linux
[off-list ref] wrote:
Look, it's very very simple.
Thanks for explaining.
Finally, if a platform has clk API support enabled, and a driver requests
a clock, and clk_get() returns an error, it means the clock was not found.
That's a fatal error for the driver, because it means that something is
wrong in the lookup tables - moreover, it means that _potentially_ someone
screwed up the clk matching and this device has a clock which needs some
control, but wasn't found. ?I don't think ignoring that kind of error,
even by printing a warning, is a particularly good approach - it seems
to me it makes things fragile. ?What if this missing clock causes the
bus to your device to ultimately hang?
This is what i was thinking too and thats why floated this version of patch.
But as Andrew said, clk API support is enabled for them, but still they
don't have a clk for sata. To get this working, there are two solutions:
- Create dummy clk for sata for that platform, so clk_get doesn't fail.
- Check for error before every call to clk APIs after clk_get().

Andrew favored the second one. Which means, even on platforms
with clk API defined and clk enable required, if there are some issues
with lookup table, and clk_get() fails, system may hang when registers
are accessed. For this i favored first one.

--
viresh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help