diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-04-23 07:15:09 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-05-11 06:35:26 -0400 |
commit | 386f60aae35271efa4dc7c407f65269b7cb71edb (patch) | |
tree | ae9d5856aa5172c7c6cf59dcba01796175e180db /arch/arm/mach-shmobile | |
parent | 9b17e48cd4df4e129976c37660cf9ec644c66059 (diff) |
ARM: shmobile: sh7372: Switch to new style CMT device
The CMT (Compare Match Timer) driver implements a new style of platform
data that handles the timer as a single device with multiple channel.
Switch from the old-style platform data to the new-style platform data.
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r-- | arch/arm/mach-shmobile/clock-sh7372.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh7372.c | 20 |
2 files changed, 7 insertions, 19 deletions
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 28489978b09c..c622b491edaf 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -565,10 +565,7 @@ static struct clk_lookup lookups[] = { | |||
565 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ | 565 | CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */ |
566 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ | 566 | CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */ |
567 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ | 567 | CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */ |
568 | CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */ | ||
569 | CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */ | ||
570 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 568 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
571 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | ||
572 | 569 | ||
573 | /* ICK */ | 570 | /* ICK */ |
574 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | 571 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), |
@@ -581,6 +578,9 @@ static struct clk_lookup lookups[] = { | |||
581 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), | 578 | CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]), |
582 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), | 579 | CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]), |
583 | CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), | 580 | CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]), |
581 | CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.4", &mstp_clks[MSTP405]), /* CMT4 */ | ||
582 | CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.3", &mstp_clks[MSTP404]), /* CMT3 */ | ||
583 | CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.2", &mstp_clks[MSTP400]), /* CMT2 */ | ||
584 | CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), | 584 | CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]), |
585 | CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), | 585 | CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]), |
586 | CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk), | 586 | CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk), |
diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c index 27301278c208..4c0e9435af21 100644 --- a/arch/arm/mach-shmobile/setup-sh7372.c +++ b/arch/arm/mach-shmobile/setup-sh7372.c | |||
@@ -119,28 +119,16 @@ SH7372_SCIF(PORT_SCIFB, 6, 0xe6c30000, evt2irq(0x0d60)); | |||
119 | 119 | ||
120 | /* CMT */ | 120 | /* CMT */ |
121 | static struct sh_timer_config cmt2_platform_data = { | 121 | static struct sh_timer_config cmt2_platform_data = { |
122 | .name = "CMT2", | 122 | .channels_mask = 0x20, |
123 | .channel_offset = 0x40, | ||
124 | .timer_bit = 5, | ||
125 | .clockevent_rating = 125, | ||
126 | .clocksource_rating = 125, | ||
127 | }; | 123 | }; |
128 | 124 | ||
129 | static struct resource cmt2_resources[] = { | 125 | static struct resource cmt2_resources[] = { |
130 | [0] = { | 126 | DEFINE_RES_MEM(0xe6130000, 0x50), |
131 | .name = "CMT2", | 127 | DEFINE_RES_IRQ(evt2irq(0x0b80)), |
132 | .start = 0xe6130040, | ||
133 | .end = 0xe613004b, | ||
134 | .flags = IORESOURCE_MEM, | ||
135 | }, | ||
136 | [1] = { | ||
137 | .start = evt2irq(0x0b80), /* CMT2 */ | ||
138 | .flags = IORESOURCE_IRQ, | ||
139 | }, | ||
140 | }; | 128 | }; |
141 | 129 | ||
142 | static struct platform_device cmt2_device = { | 130 | static struct platform_device cmt2_device = { |
143 | .name = "sh_cmt", | 131 | .name = "sh-cmt-32-fast", |
144 | .id = 2, | 132 | .id = 2, |
145 | .dev = { | 133 | .dev = { |
146 | .platform_data = &cmt2_platform_data, | 134 | .platform_data = &cmt2_platform_data, |