summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/clock.h
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-08-08 23:17:12 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2011-08-10 14:53:06 +0200
commitb9605d8a96ee68eb79020febdf39254d31cbeb87 (patch)
treeaeeba4e3096bb13dc678a43699724fe37b8f7c71 /arch/arm/mach-at91/clock.h
parentdb879ec1a96df9ee35d89500a081177b485c3a8b (diff)
downloadbarebox-b9605d8a96ee68eb79020febdf39254d31cbeb87.tar.gz
barebox-b9605d8a96ee68eb79020febdf39254d31cbeb87.tar.xz
at91: swtich to clkdev
this will also fix the clock support as we now switch to allocated generic device as we can need to associate the clock and the device but the driver is probe before the association we also change the atmel serial name to "atmel_usart" to simplify sharing with linux Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-at91/clock.h')
-rw-r--r--arch/arm/mach-at91/clock.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/clock.h b/arch/arm/mach-at91/clock.h
index c8ecd0cf55..c2e63e47dc 100644
--- a/arch/arm/mach-at91/clock.h
+++ b/arch/arm/mach-at91/clock.h
@@ -6,6 +6,8 @@
* published by the Free Software Foundation.
*/
+#include <linux/clkdev.h>
+
#define CLK_TYPE_PRIMARY 0x1
#define CLK_TYPE_PLL 0x2
#define CLK_TYPE_PROGRAMMABLE 0x4
@@ -16,8 +18,7 @@
struct clk {
struct list_head node;
const char *name; /* unique clock name */
- const char *function; /* function of the clock */
- struct device_d *dev; /* device associated with function */
+ struct clk_lookup cl;
unsigned long rate_hz;
struct clk *parent;
u32 pmc_mask;
@@ -29,3 +30,18 @@ struct clk {
extern int __init clk_register(struct clk *clk);
+extern struct clk mck;
+extern struct clk utmi_clk;
+
+#define CLKDEV_CON_ID(_id, _clk) \
+ { \
+ .con_id = _id, \
+ .clk = _clk, \
+ }
+
+#define CLKDEV_CON_DEV_ID(_con_id, _dev_id, _clk) \
+ { \
+ .con_id = _con_id, \
+ .dev_id = _dev_id, \
+ .clk = _clk, \
+ }