[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 12 Dec 2011 20:47:57 +0100
From: Andrew Lunn <andrew@...n.ch>
To: mturquette@...aro.org
Cc: linux-kernel@...r.kernel.org, linux-omap@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, jeremy.kerr@...onical.com,
broonie@...nsource.wolfsonmicro.com, tglx@...utronix.de,
linus.walleij@...ricsson.com, amit.kucheria@...aro.org,
dsaxena@...aro.org, patches@...aro.org,
linaro-dev@...ts.linaro.org, aul@...an.com,
grant.likely@...retlab.ca, sboyd@...cinc.com,
shawn.guo@...escale.com, skannan@...cinc.com,
magnus.damm@...il.com, arnd.bergmann@...aro.org,
eric.miao@...aro.org, richard.zhao@...aro.org, mturquette@...com
Subject: Re: [PATCH v3 4/5] clk: basic gateable and fixed-rate clks
Hi Mike
+int clk_register_gate(struct device *dev, const char *name, unsigned long flags,
+ struct clk *fixed_parent, void __iomem *reg, u8 bit_idx,
+ int set_to_enable)
+
How do you suggest handling gated clocks which are already running
when calling the register function?
On my kirkwood bases system, the bootloader has already turned on a
number of clocks. It does not seem right to start messing with
clk->enable_count and clk->prepare_count. Could clk_register_gate()
have one more parameter, a bool indicating running?
The kirkwood mach code keeps a bitmap of which platform_data init
functions are called from the board file. In a late_initcall function
it then enables and disables clocks as needed. What i was thinking is
i can ask the hardware what clocks are already running before i
register them and register them as running/not running. Then let the
driver probe functions use the API to enable clocks which are really
needed. In a late_initcall function, i would then call clk_disable(),
clk_unprepare() on clocks which the boot loader started, thus turning
them off if no driver has claimed them.
Is this how you envisage it working?
Thanks
Andrew
--
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