summaryrefslogtreecommitdiff
path: root/include/linux/atmel_tc.h
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-01-19 21:44:49 +0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-03-01 16:38:49 +0400
commit8e315a7b0c082c6743a6636ead5674a2265638d3 (patch)
tree9eabbe8dfff1679fcc7c1ca72f81e58631dfdfcb /include/linux/atmel_tc.h
parent3a61a5dae49bf3d1afb7f75c8acb3607f26565af (diff)
downloadlinux-8e315a7b0c082c6743a6636ead5674a2265638d3.tar.xz
ARM: at91/tc/clocksource: Add 32 bit variant to Timer Counter
Some SoC have a 32 bit variant of Timer Counter Blocks. We do not need the chaining of two 16 bit counters anymore for them. The SoC nature is deduced from the device tree "compatible" string. For non-device-tree configurations, backward compatibility is maintained by using the default 16 bit counter configuration. This patch addresses both the atmel_tclib and its user: tcb_clksrc clocksource. Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Acked-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'include/linux/atmel_tc.h')
-rw-r--r--include/linux/atmel_tc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/atmel_tc.h b/include/linux/atmel_tc.h
index 53ba65e30caa..1d14b1dc1aee 100644
--- a/include/linux/atmel_tc.h
+++ b/include/linux/atmel_tc.h
@@ -34,10 +34,19 @@
struct clk;
/**
+ * struct atmel_tcb_config - SoC data for a Timer/Counter Block
+ * @counter_width: size in bits of a timer counter register
+ */
+struct atmel_tcb_config {
+ size_t counter_width;
+};
+
+/**
* struct atmel_tc - information about a Timer/Counter Block
* @pdev: physical device
* @iomem: resource associated with the I/O register
* @regs: mapping through which the I/O registers can be accessed
+ * @tcb_config: configuration data from SoC
* @irq: irq for each of the three channels
* @clk: internal clock source for each of the three channels
* @node: list node, for tclib internal use
@@ -54,6 +63,7 @@ struct atmel_tc {
struct platform_device *pdev;
struct resource *iomem;
void __iomem *regs;
+ struct atmel_tcb_config *tcb_config;
int irq[3];
struct clk *clk[3];
struct list_head node;