diff options
author | Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> | 2014-04-23 07:15:17 -0400 |
---|---|---|
committer | Simon Horman <horms+renesas@verge.net.au> | 2014-05-11 06:35:28 -0400 |
commit | 3df592bc335a6efe30c88c9e39d29ceb5c20bbfb (patch) | |
tree | 046260a2542cab954818b16fbaee4e8073ee9445 /arch/arm/mach-shmobile | |
parent | 8e8236a9d86e5cf5979be13c3063d2381fbed285 (diff) |
ARM: shmobile: sh73a0: Switch to new style TMU device
The TMU (Timer Unit) 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-sh73a0.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-sh73a0.c | 56 |
2 files changed, 14 insertions, 45 deletions
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index ca03989c0d78..0d9cd1fe0212 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -633,8 +633,6 @@ static struct clk_lookup lookups[] = { | |||
633 | CLKDEV_DEV_ID("sh-mobile-csi2.1", &mstp_clks[MSTP128]), /* CSI2-RX1 */ | 633 | CLKDEV_DEV_ID("sh-mobile-csi2.1", &mstp_clks[MSTP128]), /* CSI2-RX1 */ |
634 | CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU0 */ | 634 | CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU0 */ |
635 | CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2-RX0 */ | 635 | CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2-RX0 */ |
636 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */ | ||
637 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */ | ||
638 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ | 636 | CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */ |
639 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ | 637 | CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */ |
640 | CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */ | 638 | CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */ |
@@ -683,6 +681,7 @@ static struct clk_lookup lookups[] = { | |||
683 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | 681 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), |
684 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | 682 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), |
685 | CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */ | 683 | CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */ |
684 | CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */ | ||
686 | }; | 685 | }; |
687 | 686 | ||
688 | void __init sh73a0_clock_init(void) | 687 | void __init sh73a0_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 71d0e4460a10..ad00724a2269 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -124,54 +124,25 @@ static struct platform_device cmt1_device = { | |||
124 | }; | 124 | }; |
125 | 125 | ||
126 | /* TMU */ | 126 | /* TMU */ |
127 | static struct sh_timer_config tmu00_platform_data = { | 127 | static struct sh_timer_config tmu0_platform_data = { |
128 | .name = "TMU00", | 128 | .channels_mask = 7, |
129 | .channel_offset = 0x4, | ||
130 | .timer_bit = 0, | ||
131 | .clockevent_rating = 200, | ||
132 | }; | 129 | }; |
133 | 130 | ||
134 | static struct resource tmu00_resources[] = { | 131 | static struct resource tmu0_resources[] = { |
135 | [0] = DEFINE_RES_MEM(0xfff60008, 0xc), | 132 | DEFINE_RES_MEM(0xfff60000, 0x2c), |
136 | [1] = { | 133 | DEFINE_RES_IRQ(intcs_evt2irq(0xe80)), |
137 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ | 134 | DEFINE_RES_IRQ(intcs_evt2irq(0xea0)), |
138 | .flags = IORESOURCE_IRQ, | 135 | DEFINE_RES_IRQ(intcs_evt2irq(0xec0)), |
139 | }, | ||
140 | }; | 136 | }; |
141 | 137 | ||
142 | static struct platform_device tmu00_device = { | 138 | static struct platform_device tmu0_device = { |
143 | .name = "sh_tmu", | 139 | .name = "sh-tmu", |
144 | .id = 0, | 140 | .id = 0, |
145 | .dev = { | 141 | .dev = { |
146 | .platform_data = &tmu00_platform_data, | 142 | .platform_data = &tmu0_platform_data, |
147 | }, | ||
148 | .resource = tmu00_resources, | ||
149 | .num_resources = ARRAY_SIZE(tmu00_resources), | ||
150 | }; | ||
151 | |||
152 | static struct sh_timer_config tmu01_platform_data = { | ||
153 | .name = "TMU01", | ||
154 | .channel_offset = 0x10, | ||
155 | .timer_bit = 1, | ||
156 | .clocksource_rating = 200, | ||
157 | }; | ||
158 | |||
159 | static struct resource tmu01_resources[] = { | ||
160 | [0] = DEFINE_RES_MEM(0xfff60014, 0xc), | ||
161 | [1] = { | ||
162 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ | ||
163 | .flags = IORESOURCE_IRQ, | ||
164 | }, | ||
165 | }; | ||
166 | |||
167 | static struct platform_device tmu01_device = { | ||
168 | .name = "sh_tmu", | ||
169 | .id = 1, | ||
170 | .dev = { | ||
171 | .platform_data = &tmu01_platform_data, | ||
172 | }, | 143 | }, |
173 | .resource = tmu01_resources, | 144 | .resource = tmu0_resources, |
174 | .num_resources = ARRAY_SIZE(tmu01_resources), | 145 | .num_resources = ARRAY_SIZE(tmu0_resources), |
175 | }; | 146 | }; |
176 | 147 | ||
177 | static struct resource i2c0_resources[] = { | 148 | static struct resource i2c0_resources[] = { |
@@ -738,8 +709,7 @@ static struct platform_device *sh73a0_devices_dt[] __initdata = { | |||
738 | }; | 709 | }; |
739 | 710 | ||
740 | static struct platform_device *sh73a0_early_devices[] __initdata = { | 711 | static struct platform_device *sh73a0_early_devices[] __initdata = { |
741 | &tmu00_device, | 712 | &tmu0_device, |
742 | &tmu01_device, | ||
743 | &ipmmu_device, | 713 | &ipmmu_device, |
744 | }; | 714 | }; |
745 | 715 | ||