2 * Copyright (C) 2010, Lars-Peter Clausen <lars@metafoo.de>
3 * JZ4740 SoC clock support
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version.
10 * You should have received a copy of the GNU General Public License along
11 * with this program; if not, write to the Free Software Foundation, Inc.,
12 * 675 Mass Ave, Cambridge, MA 02139, USA.
16 #ifndef __JZ4740_CLOCK_H__
17 #define __JZ4740_CLOCK_H__
20 unsigned long (*get_rate
)(struct clk
* clk
);
21 unsigned long (*round_rate
)(struct clk
*clk
, unsigned long rate
);
22 int (*set_rate
)(struct clk
* clk
, unsigned long rate
);
23 int (*enable
)(struct clk
* clk
);
24 int (*disable
)(struct clk
* clk
);
25 int (*is_enabled
)(struct clk
* clk
);
27 int (*set_parent
)(struct clk
* clk
, struct clk
*parent
);
37 const struct clk_ops
*ops
;
39 struct list_head list
;
41 #ifdef CONFIG_DEBUG_FS
42 struct dentry
*debugfs_entry
;
43 struct dentry
*debugfs_parent_entry
;
48 #define JZ4740_CLK_NOT_GATED ((uint32_t)-1)
50 int clk_is_enabled(struct clk
*clk
);
52 #ifdef CONFIG_DEBUG_FS
53 void jz4740_clock_debugfs_init(void);
54 void jz4740_clock_debugfs_add_clk(struct clk
*clk
);
55 void jz4740_clock_debugfs_update_parent(struct clk
*clk
);
57 static inline void jz4740_clock_debugfs_init(void) {};
58 static inline void jz4740_clock_debugfs_add_clk(struct clk
*clk
) {};
59 static inline void jz4740_clock_debugfs_update_parent(struct clk
*clk
) {};
This page took 0.045498 seconds and 5 git commands to generate.