aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource/sh_mtu2.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-05-03 04:57:17 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-05-03 04:57:17 -0400
commit46a12f7426d71cabc08972cf8d3ffdd441d26a3a (patch)
tree40689b826cc2b24d62bc5be1e08db27593072873 /drivers/clocksource/sh_mtu2.c
parentd43a41bf8b504a1d9f0b4ce7e17d803f4ef39d84 (diff)
sh: Consolidate MTU2/CMT/TMU timer platform data.
All of the SH timers use a roughly identical structure for platform data, which presently is broken out for each block. Consolidate all of these definitions, as there is no reason for them to be broken out in the first place. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'drivers/clocksource/sh_mtu2.c')
-rw-r--r--drivers/clocksource/sh_mtu2.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
index 420566f4c501..ef02185a827a 100644
--- a/drivers/clocksource/sh_mtu2.c
+++ b/drivers/clocksource/sh_mtu2.c
@@ -28,7 +28,7 @@
28#include <linux/irq.h> 28#include <linux/irq.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/clockchips.h> 30#include <linux/clockchips.h>
31#include <linux/sh_mtu2.h> 31#include <linux/sh_timer.h>
32 32
33struct sh_mtu2_priv { 33struct sh_mtu2_priv {
34 void __iomem *mapbase; 34 void __iomem *mapbase;
@@ -63,7 +63,7 @@ static unsigned long mtu2_reg_offs[] = {
63 63
64static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr) 64static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr)
65{ 65{
66 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 66 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
67 void __iomem *base = p->mapbase; 67 void __iomem *base = p->mapbase;
68 unsigned long offs; 68 unsigned long offs;
69 69
@@ -81,7 +81,7 @@ static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr)
81static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr, 81static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr,
82 unsigned long value) 82 unsigned long value)
83{ 83{
84 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 84 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
85 void __iomem *base = p->mapbase; 85 void __iomem *base = p->mapbase;
86 unsigned long offs; 86 unsigned long offs;
87 87
@@ -100,7 +100,7 @@ static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr,
100 100
101static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start) 101static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
102{ 102{
103 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 103 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
104 unsigned long flags, value; 104 unsigned long flags, value;
105 105
106 /* start stop register shared by multiple timer channels */ 106 /* start stop register shared by multiple timer channels */
@@ -118,7 +118,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
118 118
119static int sh_mtu2_enable(struct sh_mtu2_priv *p) 119static int sh_mtu2_enable(struct sh_mtu2_priv *p)
120{ 120{
121 struct sh_mtu2_config *cfg = p->pdev->dev.platform_data; 121 struct sh_timer_config *cfg = p->pdev->dev.platform_data;
122 int ret; 122 int ret;
123 123
124 /* enable clock */ 124 /* enable clock */
@@ -243,7 +243,7 @@ int sh_mtu2_register(struct sh_mtu2_priv *p, char *name,
243 243
244static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev) 244static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
245{ 245{
246 struct sh_mtu2_config *cfg = pdev->dev.platform_data; 246 struct sh_timer_config *cfg = pdev->dev.platform_data;
247 struct resource *res; 247 struct resource *res;
248 int irq, ret; 248 int irq, ret;
249 ret = -ENXIO; 249 ret = -ENXIO;
@@ -303,7 +303,7 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
303static int __devinit sh_mtu2_probe(struct platform_device *pdev) 303static int __devinit sh_mtu2_probe(struct platform_device *pdev)
304{ 304{
305 struct sh_mtu2_priv *p = platform_get_drvdata(pdev); 305 struct sh_mtu2_priv *p = platform_get_drvdata(pdev);
306 struct sh_mtu2_config *cfg = pdev->dev.platform_data; 306 struct sh_timer_config *cfg = pdev->dev.platform_data;
307 int ret; 307 int ret;
308 308
309 if (p) { 309 if (p) {