[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOh2x==Se4ipK_jexOE_=82=S4p41W9Ek0Om6DrUwctSz-Wcyw@mail.gmail.com>
Date: Wed, 25 Apr 2012 08:32:14 +0530
From: viresh kumar <viresh.linux@...il.com>
To: Russell King - ARM Linux <linux@....linux.org.uk>
Cc: Andrew Lunn <andrew@...n.ch>, Viresh Kumar <viresh.kumar@...com>,
akpm@...ux-foundation.org, spear-devel@...t.st.com,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
mturquette@...aro.org, sshtylyov@...sta.com, jgarzik@...hat.com,
linux-ide@...r.kernel.org
Subject: Re: [PATCH V3 07/12] ata/sata_mv: Remove conditional compilation of
clk code
On Wed, Apr 25, 2012 at 1:48 AM, Russell King - ARM Linux
<linux@....linux.org.uk> 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
--
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