summaryrefslogtreecommitdiff
path: root/include/linux/sh_clk.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 14:51:49 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-25 14:51:49 (GMT)
commit1dfd166e93f98892aa4427069a23ed73259983c8 (patch)
treec70a347b963091b99bd16842537153fa36e5c0e9 /include/linux/sh_clk.h
parent8e775167d54e6521e7cdbc03ee7ec42a8c67b49a (diff)
parent8df399018df120d28f89fda6f2515cc6e096e43d (diff)
downloadlinux-fsl-qoriq-1dfd166e93f98892aa4427069a23ed73259983c8.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (110 commits) sh: i2c-sh7760: Replase from ctrl_* to __raw_* sh: clkfwk: Shuffle around to match the intc split up. sh: clkfwk: modify for_each_frequency end condition sh: fix clk_get() error handling sh: clkfwk: Fix fault in frequency iterator. sh: clkfwk: Add a helper for rate rounding by divisor ranges. sh: clkfwk: Abstract rate rounding helper. sh: clkfwk: support clock remapping. sh: pci: Convert to upper/lower_32_bits() helpers. sh: mach-sdk7786: Add support for the FPGA SRAM. sh: Provide a generic SRAM pool for tiny memories. sh: pci: Support secondary FPGA-driven PCIe clocks on SDK7786. sh: pci: Support slot 4 routing on SDK7786. sh: Fix up PMB locking. sh: mach-sdk7786: Add support for fpga gpios. sh: use pr_fmt for clock framework, too. sh: remove name and id from struct clk sh: free-without-alloc fix for sh_mobile_lcdcfb sh: perf: Set up perf_max_events. sh: perf: Support SH-X3 hardware counters. ... Fix up trivial conflicts (perf_max_events got removed) in arch/sh/kernel/perf_event.c
Diffstat (limited to 'include/linux/sh_clk.h')
-rw-r--r--include/linux/sh_clk.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h
index 875ce50..4dca992 100644
--- a/include/linux/sh_clk.h
+++ b/include/linux/sh_clk.h
@@ -4,11 +4,20 @@
#include <linux/list.h>
#include <linux/seq_file.h>
#include <linux/cpufreq.h>
+#include <linux/types.h>
+#include <linux/kref.h>
#include <linux/clk.h>
#include <linux/err.h>
struct clk;
+struct clk_mapping {
+ phys_addr_t phys;
+ void __iomem *base;
+ unsigned long len;
+ struct kref ref;
+};
+
struct clk_ops {
void (*init)(struct clk *clk);
int (*enable)(struct clk *clk);
@@ -21,9 +30,6 @@ struct clk_ops {
struct clk {
struct list_head node;
- const char *name;
- int id;
-
struct clk *parent;
struct clk **parent_table; /* list of parents to */
unsigned short parent_num; /* choose between */
@@ -45,7 +51,9 @@ struct clk {
unsigned long arch_flags;
void *priv;
struct dentry *dentry;
+ struct clk_mapping *mapping;
struct cpufreq_frequency_table *freq_table;
+ unsigned int nr_freqs;
};
#define CLK_ENABLE_ON_INIT (1 << 0)
@@ -111,6 +119,9 @@ int clk_rate_table_find(struct clk *clk,
struct cpufreq_frequency_table *freq_table,
unsigned long rate);
+long clk_rate_div_range_round(struct clk *clk, unsigned int div_min,
+ unsigned int div_max, unsigned long rate);
+
#define SH_CLK_MSTP32(_parent, _enable_reg, _enable_bit, _flags) \
{ \
.parent = _parent, \