aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorNicolas Ferre <nicolas.ferre@atmel.com>2012-01-19 12:44:49 -0500
committerNicolas Ferre <nicolas.ferre@atmel.com>2012-03-01 07:38:49 -0500
commit8e315a7b0c082c6743a6636ead5674a2265638d3 (patch)
tree9eabbe8dfff1679fcc7c1ca72f81e58631dfdfcb /include
parent3a61a5dae49bf3d1afb7f75c8acb3607f26565af (diff)
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')
-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 @@
34struct clk; 34struct clk;
35 35
36/** 36/**
37 * struct atmel_tcb_config - SoC data for a Timer/Counter Block
38 * @counter_width: size in bits of a timer counter register
39 */
40struct atmel_tcb_config {
41 size_t counter_width;
42};
43
44/**
37 * struct atmel_tc - information about a Timer/Counter Block 45 * struct atmel_tc - information about a Timer/Counter Block
38 * @pdev: physical device 46 * @pdev: physical device
39 * @iomem: resource associated with the I/O register 47 * @iomem: resource associated with the I/O register
40 * @regs: mapping through which the I/O registers can be accessed 48 * @regs: mapping through which the I/O registers can be accessed
49 * @tcb_config: configuration data from SoC
41 * @irq: irq for each of the three channels 50 * @irq: irq for each of the three channels
42 * @clk: internal clock source for each of the three channels 51 * @clk: internal clock source for each of the three channels
43 * @node: list node, for tclib internal use 52 * @node: list node, for tclib internal use
@@ -54,6 +63,7 @@ struct atmel_tc {
54 struct platform_device *pdev; 63 struct platform_device *pdev;
55 struct resource *iomem; 64 struct resource *iomem;
56 void __iomem *regs; 65 void __iomem *regs;
66 struct atmel_tcb_config *tcb_config;
57 int irq[3]; 67 int irq[3];
58 struct clk *clk[3]; 68 struct clk *clk[3];
59 struct list_head node; 69 struct list_head node;