[U-Boot] [PATCH] dm: clk: Remove simple version of clk_get_by_index()
Stephen Warren
swarren at wwwdotorg.org
Thu Jul 14 20:17:12 CEST 2016
On 07/14/2016 05:24 AM, Michal Simek wrote:
> Simple version of clk_get_by_index() added by:
> "dm: clk: Add a simple version of clk_get_by_index()"
> (sha1: a4b10c088c4f6ef2e2bba33e8cfea369bcbbce44)
> is not sufficient if you use multiple clocks in the system
> because clk->id is phandle id which for example fixed-clock
> is not able to handle. Use the same implementation as is used
> in full version.
It took me a while to work out what failure case you were describing. It
might be worth more explicitly pointing out that the existing simple
implementation fails in any case where #clock-cells=<0>, or for larger
#clock-cells, where the clock ID isn't in the first cell.
To be honest, I'd be inclined to always include the real
clk_get_by_name() in SPL builds too. If it's never called, the function
will be dropped by the linker. If it is called, the dummy implementation
probably actively causes failures that we should avoid by using the real
implementation. I'm not sure why the original SPL-specific code existed,
unless the 773 byte code increase you mention is actually problematic
for some specific build?
>
> Signed-off-by: Michal Simek <michal.simek at xilinx.com>
> ---
>
> Diff for ZynqMP is 773 B based on buildman.
More information about the U-Boot
mailing list