diff options
author | Olof Johansson <olof@lixom.net> | 2013-12-29 16:15:03 -0500 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2013-12-29 16:15:03 -0500 |
commit | acdcbd63314f235fc3f4e580bf2db49161b35d06 (patch) | |
tree | 80ac064ea50697268f49cd4f9b771b733c9770c0 /arch/arm/mach-shmobile | |
parent | 91a38be875f2dc8efc53ff2634beec5f05f25d7b (diff) | |
parent | be0647d556985ae58a42e7fc3751a293c418c41e (diff) |
Merge tag 'renesas-boards-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/boards
From Simon Horman:
Renesas ARM based SoC board updates for v3.14
* Global
- Kconfig: Mention Renesas ARM SoCs instead of SH-Mobile
* r7s72100 SoC (RZ/A1H) based Genmai Board
- Add Multiplatform support
- Add Reference DT
* r8a7791 (R-Car M2) based Koelsch board
- Add pinctrl_register_mappings() for Koelsch
- Hook up SW30-SW36 on Koelsch
- Mark GPIO keys as wake-up sources
- Use ->init_late()
- Add Multiplatform support
- Set .debounce_interval for GPIO keys
- Add SW2 to GPIO keys
- Add Led 6, 7 and 8 support
- Add reference DT
- Enable PFC/GPIO
* r8a7790 (R-Car H2) based Lager board
- Add gpio/fixed regulator for SDHI
- Add SPI FLASH support on QSPI
- Mark GPIO keys as wake-up sources
- Use ->init_late()
- Set .debounce_interval for GPIO keys
* r8a7778 (R-Car M1) based Bock-W board
- bockw: remove unused RSND_SSI_CLK_FROM_ADG
- Set .debounce_interval for GPIO keys
- Correct FPGA ioremap area
- Use regulator for MMCIF
* r8a7740 (R-Mobile A1) based Armadillo board
- Correct FSI address size
* sh7374 (SH-Mobile AP4) based Mackerel board
- Use pinconf API to configure pin pull-down
- clk_round_rate() can return a zero to indicate an error
* tag 'renesas-boards-for-v3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (75 commits)
ARM: shmobile: lager: add gpio/fixed regulator for SDHI
ARM: shmobile: bockw: remove unused RSND_SSI_CLK_FROM_ADG
ARM: shmobile: armadillo: fixup FSI address size
ARM: Kconfig: Mention Renesas ARM SoCs instead of SH-Mobile
ARM: shmobile: mackerel: Use pinconf API to configure pin pull-down
ARM: shmobile: Lager:add SPI FLASH support on QSPI
ARM: shmobile: mackerel: clk_round_rate() can return a zero to indicate an error
ARM: shmobile: Add pinctrl_register_mappings() for Koelsch
ARM: shmobile: Use ->init_late() on Lager
ARM: shmobile: Hook up SW30-SW36 on Koelsch
ARM: shmobile: koelsch: mark GPIO keys as wake-up sources
ARM: shmobile: Use ->init_late() on Koelsch
ARM: shmobile: lager: mark GPIO keys as wake-up sources
ARM: shmobile: r7s72100 Genmai Multiplatform
ARM: shmobile: r7s72100 Genmai DT reference C bits
ARM: shmobile: r7s72100 Genmai DT reference DTS bits
ARM: shmobile: Initial r8a7791 and Koelsch multiplatform support
ARM: shmobile: koelsch: set .debounce_interval
ARM: shmobile: lager: set .debounce_interval
ARM: shmobile: bockw: add pin pull-up setting for SDHI
...
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm/mach-shmobile')
36 files changed, 741 insertions, 412 deletions
diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig index a4a4b75109b2..3e57d457308a 100644 --- a/arch/arm/mach-shmobile/Kconfig +++ b/arch/arm/mach-shmobile/Kconfig | |||
@@ -1,6 +1,10 @@ | |||
1 | config ARCH_SHMOBILE | ||
2 | bool | ||
3 | |||
1 | config ARCH_SHMOBILE_MULTI | 4 | config ARCH_SHMOBILE_MULTI |
2 | bool "SH-Mobile Series" if ARCH_MULTI_V7 | 5 | bool "Renesas ARM SoCs" if ARCH_MULTI_V7 |
3 | depends on MMU | 6 | depends on MMU |
7 | select ARCH_SHMOBILE | ||
4 | select CPU_V7 | 8 | select CPU_V7 |
5 | select GENERIC_CLOCKEVENTS | 9 | select GENERIC_CLOCKEVENTS |
6 | select HAVE_ARM_SCU if SMP | 10 | select HAVE_ARM_SCU if SMP |
@@ -15,24 +19,39 @@ config ARCH_SHMOBILE_MULTI | |||
15 | 19 | ||
16 | if ARCH_SHMOBILE_MULTI | 20 | if ARCH_SHMOBILE_MULTI |
17 | 21 | ||
18 | comment "SH-Mobile System Type" | 22 | comment "Renesas ARM SoCs System Type" |
19 | 23 | ||
20 | config ARCH_EMEV2 | 24 | config ARCH_EMEV2 |
21 | bool "Emma Mobile EV2" | 25 | bool "Emma Mobile EV2" |
22 | 26 | ||
23 | comment "SH-Mobile Board Type" | 27 | config ARCH_R7S72100 |
28 | bool "RZ/A1H (R7S72100)" | ||
29 | |||
30 | config ARCH_R8A7791 | ||
31 | bool "R-Car M2 (R8A77910)" | ||
32 | select RENESAS_IRQC | ||
33 | |||
34 | comment "Renesas ARM SoCs Board Type" | ||
35 | |||
36 | config MACH_GENMAI | ||
37 | bool "Genmai board" | ||
38 | depends on ARCH_R7S72100 | ||
39 | |||
40 | config MACH_KOELSCH | ||
41 | bool "Koelsch board" | ||
42 | depends on ARCH_R8A7791 | ||
24 | 43 | ||
25 | config MACH_KZM9D | 44 | config MACH_KZM9D |
26 | bool "KZM9D board" | 45 | bool "KZM9D board" |
27 | depends on ARCH_EMEV2 | 46 | depends on ARCH_EMEV2 |
28 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | 47 | select REGULATOR_FIXED_VOLTAGE if REGULATOR |
29 | 48 | ||
30 | comment "SH-Mobile System Configuration" | 49 | comment "Renesas ARM SoCs System Configuration" |
31 | endif | 50 | endif |
32 | 51 | ||
33 | if ARCH_SHMOBILE | 52 | if ARCH_SHMOBILE_LEGACY |
34 | 53 | ||
35 | comment "SH-Mobile System Type" | 54 | comment "Renesas ARM SoCs System Type" |
36 | 55 | ||
37 | config ARCH_SH7372 | 56 | config ARCH_SH7372 |
38 | bool "SH-Mobile AP4 (SH7372)" | 57 | bool "SH-Mobile AP4 (SH7372)" |
@@ -97,23 +116,28 @@ config ARCH_R8A7790 | |||
97 | 116 | ||
98 | config ARCH_R8A7791 | 117 | config ARCH_R8A7791 |
99 | bool "R-Car M2 (R8A77910)" | 118 | bool "R-Car M2 (R8A77910)" |
119 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
100 | select ARM_GIC | 120 | select ARM_GIC |
101 | select CPU_V7 | 121 | select CPU_V7 |
102 | select SH_CLK_CPG | 122 | select SH_CLK_CPG |
123 | select RENESAS_IRQC | ||
103 | 124 | ||
104 | config ARCH_EMEV2 | 125 | config ARCH_EMEV2 |
105 | bool "Emma Mobile EV2" | 126 | bool "Emma Mobile EV2" |
106 | select ARCH_WANT_OPTIONAL_GPIOLIB | 127 | select ARCH_WANT_OPTIONAL_GPIOLIB |
107 | select ARM_GIC | 128 | select ARM_GIC |
108 | select CPU_V7 | 129 | select CPU_V7 |
130 | select USE_OF | ||
131 | select AUTO_ZRELADDR | ||
109 | 132 | ||
110 | config ARCH_R7S72100 | 133 | config ARCH_R7S72100 |
111 | bool "RZ/A1H (R7S72100)" | 134 | bool "RZ/A1H (R7S72100)" |
135 | select ARCH_WANT_OPTIONAL_GPIOLIB | ||
112 | select ARM_GIC | 136 | select ARM_GIC |
113 | select CPU_V7 | 137 | select CPU_V7 |
114 | select SH_CLK_CPG | 138 | select SH_CLK_CPG |
115 | 139 | ||
116 | comment "SH-Mobile Board Type" | 140 | comment "Renesas ARM SoCs Board Type" |
117 | 141 | ||
118 | config MACH_APE6EVM | 142 | config MACH_APE6EVM |
119 | bool "APE6EVM board" | 143 | bool "APE6EVM board" |
@@ -190,6 +214,17 @@ config MACH_GENMAI | |||
190 | depends on ARCH_R7S72100 | 214 | depends on ARCH_R7S72100 |
191 | select USE_OF | 215 | select USE_OF |
192 | 216 | ||
217 | config MACH_GENMAI_REFERENCE | ||
218 | bool "Genmai board - Reference Device Tree Implementation" | ||
219 | depends on ARCH_R7S72100 | ||
220 | select USE_OF | ||
221 | ---help--- | ||
222 | Use reference implementation of Genmai board support | ||
223 | which makes use of device tree at the expense | ||
224 | of not supporting a number of devices. | ||
225 | |||
226 | This is intended to aid developers | ||
227 | |||
193 | config MACH_MARZEN | 228 | config MACH_MARZEN |
194 | bool "MARZEN board" | 229 | bool "MARZEN board" |
195 | depends on ARCH_R8A7779 | 230 | depends on ARCH_R8A7779 |
@@ -231,11 +266,16 @@ config MACH_KOELSCH | |||
231 | depends on ARCH_R8A7791 | 266 | depends on ARCH_R8A7791 |
232 | select USE_OF | 267 | select USE_OF |
233 | 268 | ||
234 | config MACH_KZM9D | 269 | config MACH_KOELSCH_REFERENCE |
235 | bool "KZM9D board" | 270 | bool "Koelsch board - Reference Device Tree Implementation" |
236 | depends on ARCH_EMEV2 | 271 | depends on ARCH_R8A7791 |
237 | select REGULATOR_FIXED_VOLTAGE if REGULATOR | ||
238 | select USE_OF | 272 | select USE_OF |
273 | ---help--- | ||
274 | Use reference implementation of Koelsch board support | ||
275 | which makes use of device tree at the expense | ||
276 | of not supporting a number of devices. | ||
277 | |||
278 | This is intended to aid developers | ||
239 | 279 | ||
240 | config MACH_KZM9G | 280 | config MACH_KZM9G |
241 | bool "KZM-A9-GT board" | 281 | bool "KZM-A9-GT board" |
@@ -261,7 +301,7 @@ config MACH_KZM9G_REFERENCE | |||
261 | 301 | ||
262 | This is intended to aid developers | 302 | This is intended to aid developers |
263 | 303 | ||
264 | comment "SH-Mobile System Configuration" | 304 | comment "Renesas ARM SoCs System Configuration" |
265 | 305 | ||
266 | config CPU_HAS_INTEVT | 306 | config CPU_HAS_INTEVT |
267 | bool | 307 | bool |
@@ -274,7 +314,7 @@ source "drivers/sh/Kconfig" | |||
274 | 314 | ||
275 | endif | 315 | endif |
276 | 316 | ||
277 | if ARCH_SHMOBILE || ARCH_SHMOBILE_MULTI | 317 | if ARCH_SHMOBILE |
278 | 318 | ||
279 | menu "Timer and clock configuration" | 319 | menu "Timer and clock configuration" |
280 | 320 | ||
@@ -286,8 +326,8 @@ config SHMOBILE_TIMER_HZ | |||
286 | Allows the configuration of the timer frequency. It is customary | 326 | Allows the configuration of the timer frequency. It is customary |
287 | to have the timer interrupt run at 1000 Hz or 100 Hz, but in the | 327 | to have the timer interrupt run at 1000 Hz or 100 Hz, but in the |
288 | case of low timer frequencies other values may be more suitable. | 328 | case of low timer frequencies other values may be more suitable. |
289 | SH-Mobile systems using a 32768 Hz RCLK for clock events may want | 329 | Renesas ARM SoC systems using a 32768 Hz RCLK for clock events may |
290 | to select a HZ value such as 128 that can evenly divide RCLK. | 330 | want to select a HZ value such as 128 that can evenly divide RCLK. |
291 | A HZ value that does not divide evenly may cause timer drift. | 331 | A HZ value that does not divide evenly may cause timer drift. |
292 | 332 | ||
293 | config SH_TIMER_CMT | 333 | config SH_TIMER_CMT |
diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile index 51db2bcafabf..1c131046dec6 100644 --- a/arch/arm/mach-shmobile/Makefile +++ b/arch/arm/mach-shmobile/Makefile | |||
@@ -56,6 +56,8 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o | |||
56 | 56 | ||
57 | # Board objects | 57 | # Board objects |
58 | ifdef CONFIG_ARCH_SHMOBILE_MULTI | 58 | ifdef CONFIG_ARCH_SHMOBILE_MULTI |
59 | obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o | ||
60 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o | ||
59 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o | 61 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o |
60 | else | 62 | else |
61 | obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o | 63 | obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o |
@@ -64,6 +66,7 @@ obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o | |||
64 | obj-$(CONFIG_MACH_BOCKW) += board-bockw.o | 66 | obj-$(CONFIG_MACH_BOCKW) += board-bockw.o |
65 | obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o | 67 | obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o |
66 | obj-$(CONFIG_MACH_GENMAI) += board-genmai.o | 68 | obj-$(CONFIG_MACH_GENMAI) += board-genmai.o |
69 | obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.o | ||
67 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o | 70 | obj-$(CONFIG_MACH_MARZEN) += board-marzen.o |
68 | obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o | 71 | obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o |
69 | obj-$(CONFIG_MACH_LAGER) += board-lager.o | 72 | obj-$(CONFIG_MACH_LAGER) += board-lager.o |
@@ -71,7 +74,7 @@ obj-$(CONFIG_MACH_LAGER_REFERENCE) += board-lager-reference.o | |||
71 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o | 74 | obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o |
72 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o | 75 | obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o |
73 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o | 76 | obj-$(CONFIG_MACH_KOELSCH) += board-koelsch.o |
74 | obj-$(CONFIG_MACH_KZM9D) += board-kzm9d.o | 77 | obj-$(CONFIG_MACH_KOELSCH_REFERENCE) += board-koelsch-reference.o |
75 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o | 78 | obj-$(CONFIG_MACH_KZM9G) += board-kzm9g.o |
76 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o | 79 | obj-$(CONFIG_MACH_KZM9G_REFERENCE) += board-kzm9g-reference.o |
77 | endif | 80 | endif |
diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot index 391d72a5536c..759e4f8fcd37 100644 --- a/arch/arm/mach-shmobile/Makefile.boot +++ b/arch/arm/mach-shmobile/Makefile.boot | |||
@@ -6,9 +6,10 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA) += 0x40008000 | |||
6 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 | 6 | loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000 |
7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 | 7 | loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000 |
8 | loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 | 8 | loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000 |
9 | loadaddr-$(CONFIG_MACH_GENMAI) += 0x8008000 | 9 | loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000 |
10 | loadaddr-$(CONFIG_MACH_GENMAI_REFERENCE) += 0x08008000 | ||
10 | loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 | 11 | loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000 |
11 | loadaddr-$(CONFIG_MACH_KZM9D) += 0x40008000 | 12 | loadaddr-$(CONFIG_MACH_KOELSCH_REFERENCE) += 0x40008000 |
12 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 | 13 | loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000 |
13 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 | 14 | loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000 |
14 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 | 15 | loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000 |
diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c index 0fa068e30a30..fe071a9130b7 100644 --- a/arch/arm/mach-shmobile/board-ape6evm.c +++ b/arch/arm/mach-shmobile/board-ape6evm.c | |||
@@ -168,7 +168,7 @@ static const struct sh_mmcif_plat_data mmcif0_pdata __initconst = { | |||
168 | }; | 168 | }; |
169 | 169 | ||
170 | static const struct resource mmcif0_resources[] __initconst = { | 170 | static const struct resource mmcif0_resources[] __initconst = { |
171 | DEFINE_RES_MEM_NAMED(0xee200000, 0x100, "MMCIF0"), | 171 | DEFINE_RES_MEM(0xee200000, 0x100), |
172 | DEFINE_RES_IRQ(gic_spi(169)), | 172 | DEFINE_RES_IRQ(gic_spi(169)), |
173 | }; | 173 | }; |
174 | 174 | ||
@@ -179,7 +179,7 @@ static const struct sh_mobile_sdhi_info sdhi0_pdata __initconst = { | |||
179 | }; | 179 | }; |
180 | 180 | ||
181 | static const struct resource sdhi0_resources[] __initconst = { | 181 | static const struct resource sdhi0_resources[] __initconst = { |
182 | DEFINE_RES_MEM_NAMED(0xee100000, 0x100, "SDHI0"), | 182 | DEFINE_RES_MEM(0xee100000, 0x100), |
183 | DEFINE_RES_IRQ(gic_spi(165)), | 183 | DEFINE_RES_IRQ(gic_spi(165)), |
184 | }; | 184 | }; |
185 | 185 | ||
@@ -191,7 +191,7 @@ static const struct sh_mobile_sdhi_info sdhi1_pdata __initconst = { | |||
191 | }; | 191 | }; |
192 | 192 | ||
193 | static const struct resource sdhi1_resources[] __initconst = { | 193 | static const struct resource sdhi1_resources[] __initconst = { |
194 | DEFINE_RES_MEM_NAMED(0xee120000, 0x100, "SDHI1"), | 194 | DEFINE_RES_MEM(0xee120000, 0x100), |
195 | DEFINE_RES_IRQ(gic_spi(166)), | 195 | DEFINE_RES_IRQ(gic_spi(166)), |
196 | }; | 196 | }; |
197 | 197 | ||
diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c index 958e3cbf0ac2..d9e28c7aca49 100644 --- a/arch/arm/mach-shmobile/board-armadillo800eva.c +++ b/arch/arm/mach-shmobile/board-armadillo800eva.c | |||
@@ -958,7 +958,7 @@ static struct resource fsi_resources[] = { | |||
958 | [0] = { | 958 | [0] = { |
959 | .name = "FSI", | 959 | .name = "FSI", |
960 | .start = 0xfe1f0000, | 960 | .start = 0xfe1f0000, |
961 | .end = 0xfe1f8400 - 1, | 961 | .end = 0xfe1f0400 - 1, |
962 | .flags = IORESOURCE_MEM, | 962 | .flags = IORESOURCE_MEM, |
963 | }, | 963 | }, |
964 | [1] = { | 964 | [1] = { |
diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c index ae88fdad4b3a..6586f5c40af2 100644 --- a/arch/arm/mach-shmobile/board-bockw-reference.c +++ b/arch/arm/mach-shmobile/board-bockw-reference.c | |||
@@ -19,7 +19,6 @@ | |||
19 | */ | 19 | */ |
20 | 20 | ||
21 | #include <linux/of_platform.h> | 21 | #include <linux/of_platform.h> |
22 | #include <linux/pinctrl/machine.h> | ||
23 | #include <mach/common.h> | 22 | #include <mach/common.h> |
24 | #include <mach/r8a7778.h> | 23 | #include <mach/r8a7778.h> |
25 | #include <asm/mach/arch.h> | 24 | #include <asm/mach/arch.h> |
@@ -39,9 +38,13 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { | |||
39 | #define FPGA 0x18200000 | 38 | #define FPGA 0x18200000 |
40 | #define IRQ0MR 0x30 | 39 | #define IRQ0MR 0x30 |
41 | #define COMCTLR 0x101c | 40 | #define COMCTLR 0x101c |
41 | |||
42 | #define PFC 0xfffc0000 | ||
43 | #define PUPR4 0x110 | ||
42 | static void __init bockw_init(void) | 44 | static void __init bockw_init(void) |
43 | { | 45 | { |
44 | static void __iomem *fpga; | 46 | void __iomem *fpga; |
47 | void __iomem *pfc; | ||
45 | 48 | ||
46 | r8a7778_clock_init(); | 49 | r8a7778_clock_init(); |
47 | r8a7778_init_irq_extpin_dt(1); | 50 | r8a7778_init_irq_extpin_dt(1); |
@@ -63,6 +66,19 @@ static void __init bockw_init(void) | |||
63 | u16 val = ioread16(fpga + IRQ0MR); | 66 | u16 val = ioread16(fpga + IRQ0MR); |
64 | val &= ~(1 << 4); /* enable SMSC911x */ | 67 | val &= ~(1 << 4); /* enable SMSC911x */ |
65 | iowrite16(val, fpga + IRQ0MR); | 68 | iowrite16(val, fpga + IRQ0MR); |
69 | |||
70 | iounmap(fpga); | ||
71 | } | ||
72 | |||
73 | pfc = ioremap_nocache(PFC, 0x200); | ||
74 | if (pfc) { | ||
75 | /* | ||
76 | * FIXME | ||
77 | * | ||
78 | * SDHI CD/WP pin needs pull-up | ||
79 | */ | ||
80 | iowrite32(ioread32(pfc + PUPR4) | (3 << 26), pfc + PUPR4); | ||
81 | iounmap(pfc); | ||
66 | } | 82 | } |
67 | 83 | ||
68 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 84 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 38611526fe9a..eb5b54fc5cc9 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -116,6 +116,11 @@ static struct regulator_consumer_supply dummy_supplies[] = { | |||
116 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | 116 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), |
117 | }; | 117 | }; |
118 | 118 | ||
119 | static struct regulator_consumer_supply fixed3v3_power_consumers[] = { | ||
120 | REGULATOR_SUPPLY("vmmc", "sh_mmcif"), | ||
121 | REGULATOR_SUPPLY("vqmmc", "sh_mmcif"), | ||
122 | }; | ||
123 | |||
119 | static struct smsc911x_platform_config smsc911x_data __initdata = { | 124 | static struct smsc911x_platform_config smsc911x_data __initdata = { |
120 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, | 125 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_LOW, |
121 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | 126 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, |
@@ -271,7 +276,6 @@ static struct resource mmc_resources[] __initdata = { | |||
271 | 276 | ||
272 | static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = { | 277 | static struct sh_mmcif_plat_data sh_mmcif_plat __initdata = { |
273 | .sup_pclk = 0, | 278 | .sup_pclk = 0, |
274 | .ocr = MMC_VDD_165_195 | MMC_VDD_32_33 | MMC_VDD_33_34, | ||
275 | .caps = MMC_CAP_4_BIT_DATA | | 279 | .caps = MMC_CAP_4_BIT_DATA | |
276 | MMC_CAP_8_BIT_DATA | | 280 | MMC_CAP_8_BIT_DATA | |
277 | MMC_CAP_NEEDS_POLL, | 281 | MMC_CAP_NEEDS_POLL, |
@@ -328,11 +332,11 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = { | |||
328 | RSND_SSI_UNUSED, /* SSI 1 */ | 332 | RSND_SSI_UNUSED, /* SSI 1 */ |
329 | RSND_SSI_UNUSED, /* SSI 2 */ | 333 | RSND_SSI_UNUSED, /* SSI 2 */ |
330 | RSND_SSI_SET(1, 0, gic_iid(0x85), RSND_SSI_PLAY), | 334 | RSND_SSI_SET(1, 0, gic_iid(0x85), RSND_SSI_PLAY), |
331 | RSND_SSI_SET(2, 0, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE | RSND_SSI_CLK_FROM_ADG), | 335 | RSND_SSI_SET(2, 0, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE), |
332 | RSND_SSI_SET(0, 0, gic_iid(0x86), RSND_SSI_PLAY), | 336 | RSND_SSI_SET(0, 0, gic_iid(0x86), RSND_SSI_PLAY), |
333 | RSND_SSI_SET(0, 0, gic_iid(0x86), 0), | 337 | RSND_SSI_SET(0, 0, gic_iid(0x86), 0), |
334 | RSND_SSI_SET(3, 0, gic_iid(0x86), RSND_SSI_PLAY), | 338 | RSND_SSI_SET(3, 0, gic_iid(0x86), RSND_SSI_PLAY), |
335 | RSND_SSI_SET(4, 0, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE | RSND_SSI_CLK_FROM_ADG), | 339 | RSND_SSI_SET(4, 0, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE), |
336 | }; | 340 | }; |
337 | 341 | ||
338 | static struct rsnd_scu_platform_info rsnd_scu[9] = { | 342 | static struct rsnd_scu_platform_info rsnd_scu[9] = { |
@@ -614,6 +618,10 @@ static void __init bockw_init(void) | |||
614 | &usb_phy_platform_data, | 618 | &usb_phy_platform_data, |
615 | sizeof(struct rcar_phy_platform_data)); | 619 | sizeof(struct rcar_phy_platform_data)); |
616 | 620 | ||
621 | regulator_register_fixed(0, dummy_supplies, | ||
622 | ARRAY_SIZE(dummy_supplies)); | ||
623 | regulator_register_always_on(1, "fixed-3.3V", fixed3v3_power_consumers, | ||
624 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | ||
617 | 625 | ||
618 | /* for SMSC */ | 626 | /* for SMSC */ |
619 | fpga = ioremap_nocache(FPGA, SZ_1M); | 627 | fpga = ioremap_nocache(FPGA, SZ_1M); |
@@ -629,9 +637,6 @@ static void __init bockw_init(void) | |||
629 | val &= ~(1 << 4); /* enable SMSC911x */ | 637 | val &= ~(1 << 4); /* enable SMSC911x */ |
630 | iowrite16(val, fpga + IRQ0MR); | 638 | iowrite16(val, fpga + IRQ0MR); |
631 | 639 | ||
632 | regulator_register_fixed(0, dummy_supplies, | ||
633 | ARRAY_SIZE(dummy_supplies)); | ||
634 | |||
635 | platform_device_register_resndata( | 640 | platform_device_register_resndata( |
636 | &platform_bus, "smsc911x", -1, | 641 | &platform_bus, "smsc911x", -1, |
637 | smsc911x_resources, ARRAY_SIZE(smsc911x_resources), | 642 | smsc911x_resources, ARRAY_SIZE(smsc911x_resources), |
diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c new file mode 100644 index 000000000000..7630c1053e32 --- /dev/null +++ b/arch/arm/mach-shmobile/board-genmai-reference.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Genmai board support | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2013 Magnus Damm | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/clk-provider.h> | ||
22 | #include <linux/kernel.h> | ||
23 | #include <linux/of_platform.h> | ||
24 | #include <mach/common.h> | ||
25 | #include <mach/r7s72100.h> | ||
26 | #include <asm/mach-types.h> | ||
27 | #include <asm/mach/arch.h> | ||
28 | |||
29 | static void __init genmai_add_standard_devices(void) | ||
30 | { | ||
31 | #ifdef CONFIG_COMMON_CLK | ||
32 | of_clk_init(NULL); | ||
33 | #else | ||
34 | r7s72100_clock_init(); | ||
35 | #endif | ||
36 | r7s72100_add_dt_devices(); | ||
37 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
38 | } | ||
39 | |||
40 | static const char * const genmai_boards_compat_dt[] __initconst = { | ||
41 | "renesas,genmai-reference", | ||
42 | NULL, | ||
43 | }; | ||
44 | |||
45 | DT_MACHINE_START(GENMAI_DT, "genmai") | ||
46 | .init_early = r7s72100_init_early, | ||
47 | .init_machine = genmai_add_standard_devices, | ||
48 | .dt_compat = genmai_boards_compat_dt, | ||
49 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c new file mode 100644 index 000000000000..a804a1798a71 --- /dev/null +++ b/arch/arm/mach-shmobile/board-koelsch-reference.c | |||
@@ -0,0 +1,53 @@ | |||
1 | /* | ||
2 | * Koelsch board support - Reference DT implementation | ||
3 | * | ||
4 | * Copyright (C) 2013 Renesas Electronics Corporation | ||
5 | * Copyright (C) 2013 Renesas Solutions Corp. | ||
6 | * Copyright (C) 2013 Magnus Damm | ||
7 | * | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; version 2 of the License. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | */ | ||
21 | |||
22 | #include <linux/clk-provider.h> | ||
23 | #include <linux/kernel.h> | ||
24 | #include <linux/of_platform.h> | ||
25 | #include <mach/common.h> | ||
26 | #include <mach/rcar-gen2.h> | ||
27 | #include <mach/r8a7791.h> | ||
28 | #include <asm/mach/arch.h> | ||
29 | |||
30 | static void __init koelsch_add_standard_devices(void) | ||
31 | { | ||
32 | #ifdef CONFIG_COMMON_CLK | ||
33 | of_clk_init(NULL); | ||
34 | #else | ||
35 | r8a7791_clock_init(); | ||
36 | #endif | ||
37 | r8a7791_add_dt_devices(); | ||
38 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
39 | } | ||
40 | |||
41 | static const char * const koelsch_boards_compat_dt[] __initconst = { | ||
42 | "renesas,koelsch-reference", | ||
43 | NULL, | ||
44 | }; | ||
45 | |||
46 | DT_MACHINE_START(KOELSCH_DT, "koelsch") | ||
47 | .smp = smp_ops(r8a7791_smp_ops), | ||
48 | .init_early = r8a7791_init_early, | ||
49 | .init_time = rcar_gen2_timer_init, | ||
50 | .init_machine = koelsch_add_standard_devices, | ||
51 | .init_late = shmobile_init_late, | ||
52 | .dt_compat = koelsch_boards_compat_dt, | ||
53 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c index ace1711a6cd8..6e12914d6d58 100644 --- a/arch/arm/mach-shmobile/board-koelsch.c +++ b/arch/arm/mach-shmobile/board-koelsch.c | |||
@@ -19,7 +19,13 @@ | |||
19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 19 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #include <linux/gpio.h> | ||
23 | #include <linux/gpio_keys.h> | ||
24 | #include <linux/input.h> | ||
22 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/leds.h> | ||
27 | #include <linux/pinctrl/machine.h> | ||
28 | #include <linux/platform_data/gpio-rcar.h> | ||
23 | #include <linux/platform_device.h> | 29 | #include <linux/platform_device.h> |
24 | #include <mach/common.h> | 30 | #include <mach/common.h> |
25 | #include <mach/r8a7791.h> | 31 | #include <mach/r8a7791.h> |
@@ -27,10 +33,74 @@ | |||
27 | #include <asm/mach-types.h> | 33 | #include <asm/mach-types.h> |
28 | #include <asm/mach/arch.h> | 34 | #include <asm/mach/arch.h> |
29 | 35 | ||
36 | /* LEDS */ | ||
37 | static struct gpio_led koelsch_leds[] = { | ||
38 | { | ||
39 | .name = "led8", | ||
40 | .gpio = RCAR_GP_PIN(2, 21), | ||
41 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
42 | }, { | ||
43 | .name = "led7", | ||
44 | .gpio = RCAR_GP_PIN(2, 20), | ||
45 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
46 | }, { | ||
47 | .name = "led6", | ||
48 | .gpio = RCAR_GP_PIN(2, 19), | ||
49 | .default_state = LEDS_GPIO_DEFSTATE_ON, | ||
50 | }, | ||
51 | }; | ||
52 | |||
53 | static const struct gpio_led_platform_data koelsch_leds_pdata __initconst = { | ||
54 | .leds = koelsch_leds, | ||
55 | .num_leds = ARRAY_SIZE(koelsch_leds), | ||
56 | }; | ||
57 | |||
58 | /* GPIO KEY */ | ||
59 | #define GPIO_KEY(c, g, d, ...) \ | ||
60 | { .code = c, .gpio = g, .desc = d, .active_low = 1, \ | ||
61 | .wakeup = 1, .debounce_interval = 20 } | ||
62 | |||
63 | static struct gpio_keys_button gpio_buttons[] = { | ||
64 | GPIO_KEY(KEY_4, RCAR_GP_PIN(5, 3), "SW2-pin4"), | ||
65 | GPIO_KEY(KEY_3, RCAR_GP_PIN(5, 2), "SW2-pin3"), | ||
66 | GPIO_KEY(KEY_2, RCAR_GP_PIN(5, 1), "SW2-pin2"), | ||
67 | GPIO_KEY(KEY_1, RCAR_GP_PIN(5, 0), "SW2-pin1"), | ||
68 | GPIO_KEY(KEY_G, RCAR_GP_PIN(7, 6), "SW36"), | ||
69 | GPIO_KEY(KEY_F, RCAR_GP_PIN(7, 5), "SW35"), | ||
70 | GPIO_KEY(KEY_E, RCAR_GP_PIN(7, 4), "SW34"), | ||
71 | GPIO_KEY(KEY_D, RCAR_GP_PIN(7, 3), "SW33"), | ||
72 | GPIO_KEY(KEY_C, RCAR_GP_PIN(7, 2), "SW32"), | ||
73 | GPIO_KEY(KEY_B, RCAR_GP_PIN(7, 1), "SW31"), | ||
74 | GPIO_KEY(KEY_A, RCAR_GP_PIN(7, 0), "SW30"), | ||
75 | }; | ||
76 | |||
77 | static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = { | ||
78 | .buttons = gpio_buttons, | ||
79 | .nbuttons = ARRAY_SIZE(gpio_buttons), | ||
80 | }; | ||
81 | |||
82 | static const struct pinctrl_map koelsch_pinctrl_map[] = { | ||
83 | /* SCIF0 (CN19: DEBUG SERIAL0) */ | ||
84 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791", | ||
85 | "scif0_data_d", "scif0"), | ||
86 | /* SCIF1 (CN20: DEBUG SERIAL1) */ | ||
87 | PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791", | ||
88 | "scif1_data_d", "scif1"), | ||
89 | }; | ||
90 | |||
30 | static void __init koelsch_add_standard_devices(void) | 91 | static void __init koelsch_add_standard_devices(void) |
31 | { | 92 | { |
32 | r8a7791_clock_init(); | 93 | r8a7791_clock_init(); |
94 | pinctrl_register_mappings(koelsch_pinctrl_map, | ||
95 | ARRAY_SIZE(koelsch_pinctrl_map)); | ||
96 | r8a7791_pinmux_init(); | ||
33 | r8a7791_add_standard_devices(); | 97 | r8a7791_add_standard_devices(); |
98 | platform_device_register_data(&platform_bus, "leds-gpio", -1, | ||
99 | &koelsch_leds_pdata, | ||
100 | sizeof(koelsch_leds_pdata)); | ||
101 | platform_device_register_data(&platform_bus, "gpio-keys", -1, | ||
102 | &koelsch_keys_pdata, | ||
103 | sizeof(koelsch_keys_pdata)); | ||
34 | } | 104 | } |
35 | 105 | ||
36 | static const char * const koelsch_boards_compat_dt[] __initconst = { | 106 | static const char * const koelsch_boards_compat_dt[] __initconst = { |
@@ -41,7 +111,8 @@ static const char * const koelsch_boards_compat_dt[] __initconst = { | |||
41 | DT_MACHINE_START(KOELSCH_DT, "koelsch") | 111 | DT_MACHINE_START(KOELSCH_DT, "koelsch") |
42 | .smp = smp_ops(r8a7791_smp_ops), | 112 | .smp = smp_ops(r8a7791_smp_ops), |
43 | .init_early = r8a7791_init_early, | 113 | .init_early = r8a7791_init_early, |
44 | .init_machine = koelsch_add_standard_devices, | ||
45 | .init_time = rcar_gen2_timer_init, | 114 | .init_time = rcar_gen2_timer_init, |
115 | .init_machine = koelsch_add_standard_devices, | ||
116 | .init_late = shmobile_init_late, | ||
46 | .dt_compat = koelsch_boards_compat_dt, | 117 | .dt_compat = koelsch_boards_compat_dt, |
47 | MACHINE_END | 118 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-kzm9d.c b/arch/arm/mach-shmobile/board-kzm9d.c deleted file mode 100644 index 30c2cc695b12..000000000000 --- a/arch/arm/mach-shmobile/board-kzm9d.c +++ /dev/null | |||
@@ -1,92 +0,0 @@ | |||
1 | /* | ||
2 | * kzm9d board support | ||
3 | * | ||
4 | * Copyright (C) 2012 Renesas Solutions Corp. | ||
5 | * Copyright (C) 2012 Magnus Damm | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; version 2 of the License. | ||
10 | * | ||
11 | * This program is distributed in the hope that it will be useful, | ||
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
14 | * GNU General Public License for more details. | ||
15 | * | ||
16 | * You should have received a copy of the GNU General Public License | ||
17 | * along with this program; if not, write to the Free Software | ||
18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
19 | */ | ||
20 | |||
21 | #include <linux/kernel.h> | ||
22 | #include <linux/interrupt.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/regulator/fixed.h> | ||
25 | #include <linux/regulator/machine.h> | ||
26 | #include <linux/smsc911x.h> | ||
27 | #include <mach/common.h> | ||
28 | #include <mach/emev2.h> | ||
29 | #include <asm/mach-types.h> | ||
30 | #include <asm/mach/arch.h> | ||
31 | |||
32 | /* Dummy supplies, where voltage doesn't matter */ | ||
33 | static struct regulator_consumer_supply dummy_supplies[] = { | ||
34 | REGULATOR_SUPPLY("vddvario", "smsc911x"), | ||
35 | REGULATOR_SUPPLY("vdd33a", "smsc911x"), | ||
36 | }; | ||
37 | |||
38 | /* Ether */ | ||
39 | static struct resource smsc911x_resources[] = { | ||
40 | [0] = { | ||
41 | .start = 0x20000000, | ||
42 | .end = 0x2000ffff, | ||
43 | .flags = IORESOURCE_MEM, | ||
44 | }, | ||
45 | [1] = { | ||
46 | .start = EMEV2_GPIO_IRQ(1), | ||
47 | .flags = IORESOURCE_IRQ | IRQF_TRIGGER_HIGH, | ||
48 | }, | ||
49 | }; | ||
50 | |||
51 | static struct smsc911x_platform_config smsc911x_platdata = { | ||
52 | .flags = SMSC911X_USE_32BIT, | ||
53 | .irq_type = SMSC911X_IRQ_TYPE_PUSH_PULL, | ||
54 | .irq_polarity = SMSC911X_IRQ_POLARITY_ACTIVE_HIGH, | ||
55 | }; | ||
56 | |||
57 | static struct platform_device smsc91x_device = { | ||
58 | .name = "smsc911x", | ||
59 | .id = -1, | ||
60 | .dev = { | ||
61 | .platform_data = &smsc911x_platdata, | ||
62 | }, | ||
63 | .num_resources = ARRAY_SIZE(smsc911x_resources), | ||
64 | .resource = smsc911x_resources, | ||
65 | }; | ||
66 | |||
67 | static struct platform_device *kzm9d_devices[] __initdata = { | ||
68 | &smsc91x_device, | ||
69 | }; | ||
70 | |||
71 | void __init kzm9d_add_standard_devices(void) | ||
72 | { | ||
73 | regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); | ||
74 | |||
75 | emev2_add_standard_devices(); | ||
76 | |||
77 | platform_add_devices(kzm9d_devices, ARRAY_SIZE(kzm9d_devices)); | ||
78 | } | ||
79 | |||
80 | static const char *kzm9d_boards_compat_dt[] __initdata = { | ||
81 | "renesas,kzm9d", | ||
82 | NULL, | ||
83 | }; | ||
84 | |||
85 | DT_MACHINE_START(KZM9D_DT, "kzm9d") | ||
86 | .smp = smp_ops(emev2_smp_ops), | ||
87 | .map_io = emev2_map_io, | ||
88 | .init_early = emev2_init_delay, | ||
89 | .init_machine = kzm9d_add_standard_devices, | ||
90 | .init_late = shmobile_init_late, | ||
91 | .dt_compat = kzm9d_boards_compat_dt, | ||
92 | MACHINE_END | ||
diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c index 1a1a4a888632..51a3bcc704e5 100644 --- a/arch/arm/mach-shmobile/board-lager-reference.c +++ b/arch/arm/mach-shmobile/board-lager-reference.c | |||
@@ -20,16 +20,16 @@ | |||
20 | 20 | ||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
23 | #include <mach/common.h> | ||
24 | #include <mach/rcar-gen2.h> | ||
23 | #include <mach/r8a7790.h> | 25 | #include <mach/r8a7790.h> |
24 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
25 | 27 | ||
26 | static void __init lager_add_standard_devices(void) | 28 | static void __init lager_add_standard_devices(void) |
27 | { | 29 | { |
28 | /* clocks are setup late during boot in the case of DT */ | ||
29 | r8a7790_clock_init(); | 30 | r8a7790_clock_init(); |
30 | |||
31 | r8a7790_add_dt_devices(); | 31 | r8a7790_add_dt_devices(); |
32 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | 32 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); |
33 | } | 33 | } |
34 | 34 | ||
35 | static const char *lager_boards_compat_dt[] __initdata = { | 35 | static const char *lager_boards_compat_dt[] __initdata = { |
@@ -42,5 +42,6 @@ DT_MACHINE_START(LAGER_DT, "lager") | |||
42 | .init_early = r8a7790_init_early, | 42 | .init_early = r8a7790_init_early, |
43 | .init_time = rcar_gen2_timer_init, | 43 | .init_time = rcar_gen2_timer_init, |
44 | .init_machine = lager_add_standard_devices, | 44 | .init_machine = lager_add_standard_devices, |
45 | .init_late = shmobile_init_late, | ||
45 | .dt_compat = lager_boards_compat_dt, | 46 | .dt_compat = lager_boards_compat_dt, |
46 | MACHINE_END | 47 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c index e0406fd37390..f20c10a18543 100644 --- a/arch/arm/mach-shmobile/board-lager.c +++ b/arch/arm/mach-shmobile/board-lager.c | |||
@@ -31,7 +31,9 @@ | |||
31 | #include <linux/platform_data/rcar-du.h> | 31 | #include <linux/platform_data/rcar-du.h> |
32 | #include <linux/platform_device.h> | 32 | #include <linux/platform_device.h> |
33 | #include <linux/phy.h> | 33 | #include <linux/phy.h> |
34 | #include <linux/regulator/driver.h> | ||
34 | #include <linux/regulator/fixed.h> | 35 | #include <linux/regulator/fixed.h> |
36 | #include <linux/regulator/gpio-regulator.h> | ||
35 | #include <linux/regulator/machine.h> | 37 | #include <linux/regulator/machine.h> |
36 | #include <linux/sh_eth.h> | 38 | #include <linux/sh_eth.h> |
37 | #include <mach/common.h> | 39 | #include <mach/common.h> |
@@ -39,6 +41,11 @@ | |||
39 | #include <mach/r8a7790.h> | 41 | #include <mach/r8a7790.h> |
40 | #include <asm/mach-types.h> | 42 | #include <asm/mach-types.h> |
41 | #include <asm/mach/arch.h> | 43 | #include <asm/mach/arch.h> |
44 | #include <linux/mtd/partitions.h> | ||
45 | #include <linux/mtd/mtd.h> | ||
46 | #include <linux/spi/flash.h> | ||
47 | #include <linux/spi/rspi.h> | ||
48 | #include <linux/spi/spi.h> | ||
42 | 49 | ||
43 | /* DU */ | 50 | /* DU */ |
44 | static struct rcar_du_encoder_data lager_du_encoders[] = { | 51 | static struct rcar_du_encoder_data lager_du_encoders[] = { |
@@ -120,7 +127,8 @@ static const struct gpio_led_platform_data lager_leds_pdata __initconst = { | |||
120 | 127 | ||
121 | /* GPIO KEY */ | 128 | /* GPIO KEY */ |
122 | #define GPIO_KEY(c, g, d, ...) \ | 129 | #define GPIO_KEY(c, g, d, ...) \ |
123 | { .code = c, .gpio = g, .desc = d, .active_low = 1 } | 130 | { .code = c, .gpio = g, .desc = d, .active_low = 1, \ |
131 | .wakeup = 1, .debounce_interval = 20 } | ||
124 | 132 | ||
125 | static struct gpio_keys_button gpio_buttons[] = { | 133 | static struct gpio_keys_button gpio_buttons[] = { |
126 | GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), | 134 | GPIO_KEY(KEY_4, RCAR_GP_PIN(1, 28), "SW2-pin4"), |
@@ -140,6 +148,71 @@ static struct regulator_consumer_supply fixed3v3_power_consumers[] = | |||
140 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.1"), | 148 | REGULATOR_SUPPLY("vmmc", "sh_mmcif.1"), |
141 | }; | 149 | }; |
142 | 150 | ||
151 | /* | ||
152 | * SDHI regulator macro | ||
153 | * | ||
154 | ** FIXME** | ||
155 | * Lager board vqmmc is provided via DA9063 PMIC chip, | ||
156 | * and we should use ${LINK}/drivers/mfd/da9063-* driver for it. | ||
157 | * but, it doesn't have regulator support at this point. | ||
158 | * It uses gpio-regulator for vqmmc as quick-hack. | ||
159 | */ | ||
160 | #define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \ | ||
161 | static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \ | ||
162 | REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \ | ||
163 | \ | ||
164 | static struct regulator_init_data vcc_sdhi##idx##_init_data = { \ | ||
165 | .constraints = { \ | ||
166 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ | ||
167 | }, \ | ||
168 | .consumer_supplies = &vcc_sdhi##idx##_consumer, \ | ||
169 | .num_consumer_supplies = 1, \ | ||
170 | }; \ | ||
171 | \ | ||
172 | static const struct fixed_voltage_config vcc_sdhi##idx##_info __initconst = {\ | ||
173 | .supply_name = "SDHI" #idx "Vcc", \ | ||
174 | .microvolts = 3300000, \ | ||
175 | .gpio = vdd_pin, \ | ||
176 | .enable_high = 1, \ | ||
177 | .init_data = &vcc_sdhi##idx##_init_data, \ | ||
178 | }; \ | ||
179 | \ | ||
180 | static struct regulator_consumer_supply vccq_sdhi##idx##_consumer = \ | ||
181 | REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx); \ | ||
182 | \ | ||
183 | static struct regulator_init_data vccq_sdhi##idx##_init_data = { \ | ||
184 | .constraints = { \ | ||
185 | .input_uV = 3300000, \ | ||
186 | .min_uV = 1800000, \ | ||
187 | .max_uV = 3300000, \ | ||
188 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | \ | ||
189 | REGULATOR_CHANGE_STATUS, \ | ||
190 | }, \ | ||
191 | .consumer_supplies = &vccq_sdhi##idx##_consumer, \ | ||
192 | .num_consumer_supplies = 1, \ | ||
193 | }; \ | ||
194 | \ | ||
195 | static struct gpio vccq_sdhi##idx##_gpio = \ | ||
196 | { vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx }; \ | ||
197 | \ | ||
198 | static struct gpio_regulator_state vccq_sdhi##idx##_states[] = { \ | ||
199 | { .value = 1800000, .gpios = 0 }, \ | ||
200 | { .value = 3300000, .gpios = 1 }, \ | ||
201 | }; \ | ||
202 | \ | ||
203 | static const struct gpio_regulator_config vccq_sdhi##idx##_info __initconst = {\ | ||
204 | .supply_name = "vqmmc", \ | ||
205 | .gpios = &vccq_sdhi##idx##_gpio, \ | ||
206 | .nr_gpios = 1, \ | ||
207 | .states = vccq_sdhi##idx##_states, \ | ||
208 | .nr_states = ARRAY_SIZE(vccq_sdhi##idx##_states), \ | ||
209 | .type = REGULATOR_VOLTAGE, \ | ||
210 | .init_data = &vccq_sdhi##idx##_init_data, \ | ||
211 | }; | ||
212 | |||
213 | SDHI_REGULATOR(0, RCAR_GP_PIN(5, 24), RCAR_GP_PIN(5, 29)); | ||
214 | SDHI_REGULATOR(2, RCAR_GP_PIN(5, 25), RCAR_GP_PIN(5, 30)); | ||
215 | |||
143 | /* MMCIF */ | 216 | /* MMCIF */ |
144 | static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = { | 217 | static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = { |
145 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, | 218 | .caps = MMC_CAP_8_BIT_DATA | MMC_CAP_NONREMOVABLE, |
@@ -148,7 +221,7 @@ static const struct sh_mmcif_plat_data mmcif1_pdata __initconst = { | |||
148 | }; | 221 | }; |
149 | 222 | ||
150 | static const struct resource mmcif1_resources[] __initconst = { | 223 | static const struct resource mmcif1_resources[] __initconst = { |
151 | DEFINE_RES_MEM_NAMED(0xee220000, 0x80, "MMCIF1"), | 224 | DEFINE_RES_MEM(0xee220000, 0x80), |
152 | DEFINE_RES_IRQ(gic_spi(170)), | 225 | DEFINE_RES_IRQ(gic_spi(170)), |
153 | }; | 226 | }; |
154 | 227 | ||
@@ -165,6 +238,59 @@ static const struct resource ether_resources[] __initconst = { | |||
165 | DEFINE_RES_IRQ(gic_spi(162)), | 238 | DEFINE_RES_IRQ(gic_spi(162)), |
166 | }; | 239 | }; |
167 | 240 | ||
241 | /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */ | ||
242 | static struct mtd_partition spi_flash_part[] = { | ||
243 | /* Reserved for user loader program, read-only */ | ||
244 | { | ||
245 | .name = "loader", | ||
246 | .offset = 0, | ||
247 | .size = SZ_256K, | ||
248 | .mask_flags = MTD_WRITEABLE, | ||
249 | }, | ||
250 | /* Reserved for user program, read-only */ | ||
251 | { | ||
252 | .name = "user", | ||
253 | .offset = MTDPART_OFS_APPEND, | ||
254 | .size = SZ_4M, | ||
255 | .mask_flags = MTD_WRITEABLE, | ||
256 | }, | ||
257 | /* All else is writable (e.g. JFFS2) */ | ||
258 | { | ||
259 | .name = "flash", | ||
260 | .offset = MTDPART_OFS_APPEND, | ||
261 | .size = MTDPART_SIZ_FULL, | ||
262 | .mask_flags = 0, | ||
263 | }, | ||
264 | }; | ||
265 | |||
266 | static struct flash_platform_data spi_flash_data = { | ||
267 | .name = "m25p80", | ||
268 | .parts = spi_flash_part, | ||
269 | .nr_parts = ARRAY_SIZE(spi_flash_part), | ||
270 | .type = "s25fl512s", | ||
271 | }; | ||
272 | |||
273 | static const struct rspi_plat_data qspi_pdata __initconst = { | ||
274 | .num_chipselect = 1, | ||
275 | }; | ||
276 | |||
277 | static const struct spi_board_info spi_info[] __initconst = { | ||
278 | { | ||
279 | .modalias = "m25p80", | ||
280 | .platform_data = &spi_flash_data, | ||
281 | .mode = SPI_MODE_0, | ||
282 | .max_speed_hz = 30000000, | ||
283 | .bus_num = 0, | ||
284 | .chip_select = 0, | ||
285 | }, | ||
286 | }; | ||
287 | |||
288 | /* QSPI resource */ | ||
289 | static const struct resource qspi_resources[] __initconst = { | ||
290 | DEFINE_RES_MEM(0xe6b10000, 0x1000), | ||
291 | DEFINE_RES_IRQ(gic_spi(184)), | ||
292 | }; | ||
293 | |||
168 | static const struct pinctrl_map lager_pinctrl_map[] = { | 294 | static const struct pinctrl_map lager_pinctrl_map[] = { |
169 | /* DU (CN10: ARGB0, CN13: LVDS) */ | 295 | /* DU (CN10: ARGB0, CN13: LVDS) */ |
170 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", | 296 | PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790", |
@@ -197,6 +323,9 @@ static const struct pinctrl_map lager_pinctrl_map[] = { | |||
197 | 323 | ||
198 | static void __init lager_add_standard_devices(void) | 324 | static void __init lager_add_standard_devices(void) |
199 | { | 325 | { |
326 | int fixed_regulator_idx = 0; | ||
327 | int gpio_regulator_idx = 0; | ||
328 | |||
200 | r8a7790_clock_init(); | 329 | r8a7790_clock_init(); |
201 | 330 | ||
202 | pinctrl_register_mappings(lager_pinctrl_map, | 331 | pinctrl_register_mappings(lager_pinctrl_map, |
@@ -210,7 +339,8 @@ static void __init lager_add_standard_devices(void) | |||
210 | platform_device_register_data(&platform_bus, "gpio-keys", -1, | 339 | platform_device_register_data(&platform_bus, "gpio-keys", -1, |
211 | &lager_keys_pdata, | 340 | &lager_keys_pdata, |
212 | sizeof(lager_keys_pdata)); | 341 | sizeof(lager_keys_pdata)); |
213 | regulator_register_always_on(0, "fixed-3.3V", fixed3v3_power_consumers, | 342 | regulator_register_always_on(fixed_regulator_idx++, |
343 | "fixed-3.3V", fixed3v3_power_consumers, | ||
214 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); | 344 | ARRAY_SIZE(fixed3v3_power_consumers), 3300000); |
215 | platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, | 345 | platform_device_register_resndata(&platform_bus, "sh_mmcif", 1, |
216 | mmcif1_resources, ARRAY_SIZE(mmcif1_resources), | 346 | mmcif1_resources, ARRAY_SIZE(mmcif1_resources), |
@@ -222,6 +352,22 @@ static void __init lager_add_standard_devices(void) | |||
222 | ðer_pdata, sizeof(ether_pdata)); | 352 | ðer_pdata, sizeof(ether_pdata)); |
223 | 353 | ||
224 | lager_add_du_device(); | 354 | lager_add_du_device(); |
355 | |||
356 | platform_device_register_resndata(&platform_bus, "qspi", 0, | ||
357 | qspi_resources, | ||
358 | ARRAY_SIZE(qspi_resources), | ||
359 | &qspi_pdata, sizeof(qspi_pdata)); | ||
360 | spi_register_board_info(spi_info, ARRAY_SIZE(spi_info)); | ||
361 | |||
362 | platform_device_register_data(&platform_bus, "reg-fixed-voltage", fixed_regulator_idx++, | ||
363 | &vcc_sdhi0_info, sizeof(struct fixed_voltage_config)); | ||
364 | platform_device_register_data(&platform_bus, "reg-fixed-voltage", fixed_regulator_idx++, | ||
365 | &vcc_sdhi2_info, sizeof(struct fixed_voltage_config)); | ||
366 | |||
367 | platform_device_register_data(&platform_bus, "gpio-regulator", gpio_regulator_idx++, | ||
368 | &vccq_sdhi0_info, sizeof(struct gpio_regulator_config)); | ||
369 | platform_device_register_data(&platform_bus, "gpio-regulator", gpio_regulator_idx++, | ||
370 | &vccq_sdhi2_info, sizeof(struct gpio_regulator_config)); | ||
225 | } | 371 | } |
226 | 372 | ||
227 | /* | 373 | /* |
@@ -260,5 +406,6 @@ DT_MACHINE_START(LAGER_DT, "lager") | |||
260 | .init_early = r8a7790_init_early, | 406 | .init_early = r8a7790_init_early, |
261 | .init_time = rcar_gen2_timer_init, | 407 | .init_time = rcar_gen2_timer_init, |
262 | .init_machine = lager_init, | 408 | .init_machine = lager_init, |
409 | .init_late = shmobile_init_late, | ||
263 | .dt_compat = lager_boards_compat_dt, | 410 | .dt_compat = lager_boards_compat_dt, |
264 | MACHINE_END | 411 | MACHINE_END |
diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c index af06753eb809..207acf0e07da 100644 --- a/arch/arm/mach-shmobile/board-mackerel.c +++ b/arch/arm/mach-shmobile/board-mackerel.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #include <linux/mtd/physmap.h> | 41 | #include <linux/mtd/physmap.h> |
42 | #include <linux/mtd/sh_flctl.h> | 42 | #include <linux/mtd/sh_flctl.h> |
43 | #include <linux/pinctrl/machine.h> | 43 | #include <linux/pinctrl/machine.h> |
44 | #include <linux/pinctrl/pinconf-generic.h> | ||
44 | #include <linux/platform_data/gpio_backlight.h> | 45 | #include <linux/platform_data/gpio_backlight.h> |
45 | #include <linux/pm_clock.h> | 46 | #include <linux/pm_clock.h> |
46 | #include <linux/regulator/fixed.h> | 47 | #include <linux/regulator/fixed.h> |
@@ -548,9 +549,9 @@ static void __init hdmi_init_pm_clock(void) | |||
548 | clk_get_rate(&sh7372_pllc2_clk)); | 549 | clk_get_rate(&sh7372_pllc2_clk)); |
549 | 550 | ||
550 | rate = clk_round_rate(&sh7372_pllc2_clk, 594000000); | 551 | rate = clk_round_rate(&sh7372_pllc2_clk, 594000000); |
551 | if (rate < 0) { | 552 | if (rate <= 0) { |
552 | pr_err("Cannot get suitable rate: %ld\n", rate); | 553 | pr_err("Cannot get suitable rate: %ld\n", rate); |
553 | ret = rate; | 554 | ret = -EINVAL; |
554 | goto out; | 555 | goto out; |
555 | } | 556 | } |
556 | 557 | ||
@@ -1311,6 +1312,10 @@ static struct i2c_board_info i2c1_devices[] = { | |||
1311 | }, | 1312 | }, |
1312 | }; | 1313 | }; |
1313 | 1314 | ||
1315 | static unsigned long pin_pulldown_conf[] = { | ||
1316 | PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0), | ||
1317 | }; | ||
1318 | |||
1314 | static const struct pinctrl_map mackerel_pinctrl_map[] = { | 1319 | static const struct pinctrl_map mackerel_pinctrl_map[] = { |
1315 | /* ADXL34X */ | 1320 | /* ADXL34X */ |
1316 | PIN_MAP_MUX_GROUP_DEFAULT("1-0053", "pfc-sh7372", | 1321 | PIN_MAP_MUX_GROUP_DEFAULT("1-0053", "pfc-sh7372", |
@@ -1396,17 +1401,19 @@ static const struct pinctrl_map mackerel_pinctrl_map[] = { | |||
1396 | /* USBHS0 */ | 1401 | /* USBHS0 */ |
1397 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372", | 1402 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372", |
1398 | "usb0_vbus", "usb0"), | 1403 | "usb0_vbus", "usb0"), |
1404 | PIN_MAP_CONFIGS_GROUP_DEFAULT("renesas_usbhs.0", "pfc-sh7372", | ||
1405 | "usb0_vbus", pin_pulldown_conf), | ||
1399 | /* USBHS1 */ | 1406 | /* USBHS1 */ |
1400 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", | 1407 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", |
1401 | "usb1_vbus", "usb1"), | 1408 | "usb1_vbus", "usb1"), |
1409 | PIN_MAP_CONFIGS_GROUP_DEFAULT("renesas_usbhs.&", "pfc-sh7372", | ||
1410 | "usb1_vbus", pin_pulldown_conf), | ||
1402 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", | 1411 | PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs.1", "pfc-sh7372", |
1403 | "usb1_otg_id_0", "usb1"), | 1412 | "usb1_otg_id_0", "usb1"), |
1404 | }; | 1413 | }; |
1405 | 1414 | ||
1406 | #define GPIO_PORT9CR IOMEM(0xE6051009) | 1415 | #define GPIO_PORT9CR IOMEM(0xE6051009) |
1407 | #define GPIO_PORT10CR IOMEM(0xE605100A) | 1416 | #define GPIO_PORT10CR IOMEM(0xE605100A) |
1408 | #define GPIO_PORT167CR IOMEM(0xE60520A7) | ||
1409 | #define GPIO_PORT168CR IOMEM(0xE60520A8) | ||
1410 | #define SRCR4 IOMEM(0xe61580bc) | 1417 | #define SRCR4 IOMEM(0xe61580bc) |
1411 | #define USCCR1 IOMEM(0xE6058144) | 1418 | #define USCCR1 IOMEM(0xE6058144) |
1412 | static void __init mackerel_init(void) | 1419 | static void __init mackerel_init(void) |
@@ -1446,12 +1453,6 @@ static void __init mackerel_init(void) | |||
1446 | 1453 | ||
1447 | gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ | 1454 | gpio_request_one(151, GPIOF_OUT_INIT_HIGH, NULL); /* LCDDON */ |
1448 | 1455 | ||
1449 | /* USBHS0 */ | ||
1450 | gpio_request_pulldown(GPIO_PORT168CR); /* VBUS0_0 pull down */ | ||
1451 | |||
1452 | /* USBHS1 */ | ||
1453 | gpio_request_pulldown(GPIO_PORT167CR); /* VBUS0_1 pull down */ | ||
1454 | |||
1455 | /* FSI2 port A (ak4643) */ | 1456 | /* FSI2 port A (ak4643) */ |
1456 | gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ | 1457 | gpio_request_one(161, GPIOF_OUT_INIT_LOW, NULL); /* slave */ |
1457 | 1458 | ||
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index da1352f5f71b..4f9e3ec42ddc 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/leds.h> | 29 | #include <linux/leds.h> |
30 | #include <linux/dma-mapping.h> | 30 | #include <linux/dma-mapping.h> |
31 | #include <linux/pinctrl/machine.h> | 31 | #include <linux/pinctrl/machine.h> |
32 | #include <linux/platform_data/camera-rcar.h> | ||
32 | #include <linux/platform_data/gpio-rcar.h> | 33 | #include <linux/platform_data/gpio-rcar.h> |
33 | #include <linux/platform_data/rcar-du.h> | 34 | #include <linux/platform_data/rcar-du.h> |
34 | #include <linux/platform_data/usb-rcar-phy.h> | 35 | #include <linux/platform_data/usb-rcar-phy.h> |
@@ -259,10 +260,30 @@ static struct platform_device leds_device = { | |||
259 | }, | 260 | }, |
260 | }; | 261 | }; |
261 | 262 | ||
263 | /* VIN */ | ||
262 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | 264 | static struct rcar_vin_platform_data vin_platform_data __initdata = { |
263 | .flags = RCAR_VIN_BT656, | 265 | .flags = RCAR_VIN_BT656, |
264 | }; | 266 | }; |
265 | 267 | ||
268 | #define MARZEN_VIN(idx) \ | ||
269 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
270 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
271 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
272 | }; \ | ||
273 | \ | ||
274 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
275 | .parent = &platform_bus, \ | ||
276 | .name = "r8a7779-vin", \ | ||
277 | .id = idx, \ | ||
278 | .res = vin##idx##_resources, \ | ||
279 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
280 | .dma_mask = DMA_BIT_MASK(32), \ | ||
281 | .data = &vin_platform_data, \ | ||
282 | .size_data = sizeof(vin_platform_data), \ | ||
283 | } | ||
284 | MARZEN_VIN(1); | ||
285 | MARZEN_VIN(3); | ||
286 | |||
266 | #define MARZEN_CAMERA(idx) \ | 287 | #define MARZEN_CAMERA(idx) \ |
267 | static struct i2c_board_info camera##idx##_info = { \ | 288 | static struct i2c_board_info camera##idx##_info = { \ |
268 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ | 289 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ |
@@ -367,8 +388,8 @@ static void __init marzen_init(void) | |||
367 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ | 388 | r8a7779_init_irq_extpin(1); /* IRQ1 as individual interrupt */ |
368 | 389 | ||
369 | r8a7779_add_standard_devices(); | 390 | r8a7779_add_standard_devices(); |
370 | r8a7779_add_vin_device(1, &vin_platform_data); | 391 | platform_device_register_full(&vin1_info); |
371 | r8a7779_add_vin_device(3, &vin_platform_data); | 392 | platform_device_register_full(&vin3_info); |
372 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 393 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
373 | marzen_add_du_device(); | 394 | marzen_add_du_device(); |
374 | } | 395 | } |
diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c index 4aba20ca127e..7b457aed8253 100644 --- a/arch/arm/mach-shmobile/clock-r7s72100.c +++ b/arch/arm/mach-shmobile/clock-r7s72100.c | |||
@@ -170,6 +170,9 @@ static struct clk_lookup lookups[] = { | |||
170 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), | 170 | CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]), |
171 | 171 | ||
172 | /* MSTP clocks */ | 172 | /* MSTP clocks */ |
173 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), | ||
174 | |||
175 | /* ICK */ | ||
173 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), | 176 | CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]), |
174 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), | 177 | CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP46]), |
175 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), | 178 | CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP45]), |
@@ -178,6 +181,7 @@ static struct clk_lookup lookups[] = { | |||
178 | CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), | 181 | CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]), |
179 | CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), | 182 | CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]), |
180 | CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), | 183 | CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]), |
184 | CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]), | ||
181 | }; | 185 | }; |
182 | 186 | ||
183 | void __init r7s72100_clock_init(void) | 187 | void __init r7s72100_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c index c826bca4024e..e9a3c6401845 100644 --- a/arch/arm/mach-shmobile/clock-r8a7740.c +++ b/arch/arm/mach-shmobile/clock-r8a7740.c | |||
@@ -585,6 +585,7 @@ static struct clk_lookup lookups[] = { | |||
585 | 585 | ||
586 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), | 586 | CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), |
587 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), | 587 | CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), |
588 | CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]), | ||
588 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), | 589 | CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]), |
589 | CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]), | 590 | CLKDEV_DEV_ID("e6c20000.i2c", &mstp_clks[MSTP323]), |
590 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]), | 591 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP320]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index fb6af83858e3..54064346dafb 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c | |||
@@ -173,9 +173,13 @@ static struct clk_lookup lookups[] = { | |||
173 | 173 | ||
174 | /* MSTP32 clocks */ | 174 | /* MSTP32 clocks */ |
175 | CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */ | 175 | CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP331]), /* MMC */ |
176 | CLKDEV_DEV_ID("ffe4e000.mmcif", &mstp_clks[MSTP331]), /* MMC */ | ||
176 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | 177 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ |
178 | CLKDEV_DEV_ID("ffe4c000.sdhi", &mstp_clks[MSTP323]), /* SDHI0 */ | ||
177 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 179 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
180 | CLKDEV_DEV_ID("ffe4d000.sdhi", &mstp_clks[MSTP322]), /* SDHI1 */ | ||
178 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 181 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
182 | CLKDEV_DEV_ID("ffe4f000.sdhi", &mstp_clks[MSTP321]), /* SDHI2 */ | ||
179 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ | 183 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ |
180 | CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ | 184 | CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ |
181 | CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ | 185 | CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ |
@@ -183,9 +187,13 @@ static struct clk_lookup lookups[] = { | |||
183 | CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ | 187 | CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ |
184 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP100]), /* USB FUNC */ | 188 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP100]), /* USB FUNC */ |
185 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | 189 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ |
190 | CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ | ||
186 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ | 191 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ |
192 | CLKDEV_DEV_ID("ffc71000.i2c", &mstp_clks[MSTP029]), /* I2C1 */ | ||
187 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ | 193 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ |
194 | CLKDEV_DEV_ID("ffc72000.i2c", &mstp_clks[MSTP028]), /* I2C2 */ | ||
188 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | 195 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ |
196 | CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ | ||
189 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 197 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
190 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 198 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
191 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 199 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
@@ -195,8 +203,11 @@ static struct clk_lookup lookups[] = { | |||
195 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ | 203 | CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */ |
196 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ | 204 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */ |
197 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | 205 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ |
206 | CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ | ||
198 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | 207 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ |
208 | CLKDEV_DEV_ID("fffc8000.spi", &mstp_clks[MSTP007]), /* HSPI1 */ | ||
199 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ | 209 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ |
210 | CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */ | ||
200 | CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */ | 211 | CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */ |
201 | 212 | ||
202 | CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]), | 213 | CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]), |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 1f7080fab0a5..b545c8dbb818 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -184,9 +184,13 @@ static struct clk_lookup lookups[] = { | |||
184 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ | 184 | CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */ |
185 | CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */ | 185 | CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */ |
186 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | 186 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ |
187 | CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */ | ||
187 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ | 188 | CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */ |
189 | CLKDEV_DEV_ID("ffc71000.i2c", &mstp_clks[MSTP029]), /* I2C1 */ | ||
188 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ | 190 | CLKDEV_DEV_ID("i2c-rcar.2", &mstp_clks[MSTP028]), /* I2C2 */ |
191 | CLKDEV_DEV_ID("ffc72000.i2c", &mstp_clks[MSTP028]), /* I2C2 */ | ||
189 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ | 192 | CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */ |
193 | CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */ | ||
190 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ | 194 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */ |
191 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ | 195 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */ |
192 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ | 196 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */ |
@@ -194,12 +198,19 @@ static struct clk_lookup lookups[] = { | |||
194 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ | 198 | CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */ |
195 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ | 199 | CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */ |
196 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ | 200 | CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */ |
201 | CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */ | ||
197 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ | 202 | CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */ |
203 | CLKDEV_DEV_ID("fffc8000.spi", &mstp_clks[MSTP007]), /* HSPI1 */ | ||
198 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ | 204 | CLKDEV_DEV_ID("sh-hspi.2", &mstp_clks[MSTP007]), /* HSPI2 */ |
205 | CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */ | ||
199 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ | 206 | CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP323]), /* SDHI0 */ |
207 | CLKDEV_DEV_ID("ffe4c000.sdhi", &mstp_clks[MSTP323]), /* SDHI0 */ | ||
200 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 208 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
209 | CLKDEV_DEV_ID("ffe4d000.sdhi", &mstp_clks[MSTP322]), /* SDHI1 */ | ||
201 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 210 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
211 | CLKDEV_DEV_ID("ffe4e000.sdhi", &mstp_clks[MSTP321]), /* SDHI2 */ | ||
202 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ | 212 | CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP320]), /* SDHI3 */ |
213 | CLKDEV_DEV_ID("ffe4f000.sdhi", &mstp_clks[MSTP320]), /* SDHI3 */ | ||
203 | CLKDEV_DEV_ID("rcar-du-r8a7779", &mstp_clks[MSTP103]), /* DU */ | 214 | CLKDEV_DEV_ID("rcar-du-r8a7779", &mstp_clks[MSTP103]), /* DU */ |
204 | }; | 215 | }; |
205 | 216 | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c index a64f965c7da1..80cd8f31fa3c 100644 --- a/arch/arm/mach-shmobile/clock-r8a7790.c +++ b/arch/arm/mach-shmobile/clock-r8a7790.c | |||
@@ -53,6 +53,7 @@ | |||
53 | #define SMSTPCR7 0xe615014c | 53 | #define SMSTPCR7 0xe615014c |
54 | #define SMSTPCR8 0xe6150990 | 54 | #define SMSTPCR8 0xe6150990 |
55 | #define SMSTPCR9 0xe6150994 | 55 | #define SMSTPCR9 0xe6150994 |
56 | #define SMSTPCR10 0xe6150998 | ||
56 | 57 | ||
57 | #define SDCKCR 0xE6150074 | 58 | #define SDCKCR 0xE6150074 |
58 | #define SD2CKCR 0xE6150078 | 59 | #define SD2CKCR 0xE6150078 |
@@ -77,7 +78,7 @@ static struct sh_clk_ops followparent_clk_ops = { | |||
77 | }; | 78 | }; |
78 | 79 | ||
79 | static struct clk main_clk = { | 80 | static struct clk main_clk = { |
80 | /* .parent will be set r8a73a4_clock_init */ | 81 | /* .parent will be set r8a7790_clock_init */ |
81 | .ops = &followparent_clk_ops, | 82 | .ops = &followparent_clk_ops, |
82 | }; | 83 | }; |
83 | 84 | ||
@@ -182,10 +183,14 @@ static struct clk div6_clks[DIV6_NR] = { | |||
182 | 183 | ||
183 | /* MSTP */ | 184 | /* MSTP */ |
184 | enum { | 185 | enum { |
186 | MSTP1015, MSTP1014, MSTP1013, MSTP1012, MSTP1011, MSTP1010, | ||
187 | MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005, | ||
185 | MSTP931, MSTP930, MSTP929, MSTP928, | 188 | MSTP931, MSTP930, MSTP929, MSTP928, |
189 | MSTP917, | ||
186 | MSTP813, | 190 | MSTP813, |
187 | MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, | 191 | MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720, |
188 | MSTP717, MSTP716, | 192 | MSTP717, MSTP716, |
193 | MSTP704, | ||
189 | MSTP522, | 194 | MSTP522, |
190 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, | 195 | MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304, |
191 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, | 196 | MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202, |
@@ -194,10 +199,22 @@ enum { | |||
194 | }; | 199 | }; |
195 | 200 | ||
196 | static struct clk mstp_clks[MSTP_NR] = { | 201 | static struct clk mstp_clks[MSTP_NR] = { |
197 | [MSTP931] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 31, 0), /* I2C0 */ | 202 | [MSTP1015] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 15, 0), /* SSI0 */ |
198 | [MSTP930] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 30, 0), /* I2C1 */ | 203 | [MSTP1014] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 14, 0), /* SSI1 */ |
199 | [MSTP929] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 29, 0), /* I2C2 */ | 204 | [MSTP1013] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 13, 0), /* SSI2 */ |
200 | [MSTP928] = SH_CLK_MSTP32(&hp_clk, SMSTPCR9, 28, 0), /* I2C3 */ | 205 | [MSTP1012] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 12, 0), /* SSI3 */ |
206 | [MSTP1011] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 11, 0), /* SSI4 */ | ||
207 | [MSTP1010] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 10, 0), /* SSI5 */ | ||
208 | [MSTP1009] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 9, 0), /* SSI6 */ | ||
209 | [MSTP1008] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 8, 0), /* SSI7 */ | ||
210 | [MSTP1007] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 7, 0), /* SSI8 */ | ||
211 | [MSTP1006] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 6, 0), /* SSI9 */ | ||
212 | [MSTP1005] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 5, 0), /* SSI ALL */ | ||
213 | [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */ | ||
214 | [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */ | ||
215 | [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */ | ||
216 | [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */ | ||
217 | [MSTP917] = SH_CLK_MSTP32(&qspi_clk, SMSTPCR9, 17, 0), /* QSPI */ | ||
201 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ | 218 | [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */ |
202 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ | 219 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ |
203 | [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ | 220 | [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */ |
@@ -208,6 +225,7 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
208 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 225 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ |
209 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ | 226 | [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */ |
210 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ | 227 | [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */ |
228 | [MSTP704] = SH_CLK_MSTP32(&mp_clk, SMSTPCR7, 4, 0), /* HSUSB */ | ||
211 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | 229 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ |
212 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ | 230 | [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */ |
213 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ | 231 | [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */ |
@@ -262,11 +280,7 @@ static struct clk_lookup lookups[] = { | |||
262 | CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]), | 280 | CLKDEV_CON_ID("ssprs", &div6_clks[DIV6_SSPRS]), |
263 | 281 | ||
264 | /* MSTP */ | 282 | /* MSTP */ |
265 | CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), | 283 | CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP1005]), |
266 | CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), | ||
267 | CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]), | ||
268 | CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]), | ||
269 | CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]), | ||
270 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), | 284 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), |
271 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), | 285 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), |
272 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), | 286 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), |
@@ -282,6 +296,7 @@ static struct clk_lookup lookups[] = { | |||
282 | CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]), | 296 | CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]), |
283 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), | 297 | CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]), |
284 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), | 298 | CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]), |
299 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | ||
285 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | 300 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), |
286 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), | 301 | CLKDEV_DEV_ID("ee200000.mmcif", &mstp_clks[MSTP315]), |
287 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), | 302 | CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]), |
@@ -296,6 +311,27 @@ static struct clk_lookup lookups[] = { | |||
296 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), | 311 | CLKDEV_DEV_ID("ee220000.mmcif", &mstp_clks[MSTP305]), |
297 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), | 312 | CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]), |
298 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | 313 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), |
314 | CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]), | ||
315 | CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]), | ||
316 | |||
317 | /* ICK */ | ||
318 | CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]), | ||
319 | CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]), | ||
320 | CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]), | ||
321 | CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]), | ||
322 | CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]), | ||
323 | CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]), | ||
324 | CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]), | ||
325 | CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]), | ||
326 | CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]), | ||
327 | CLKDEV_ICK_ID("ssi.3", "rcar_sound", &mstp_clks[MSTP1012]), | ||
328 | CLKDEV_ICK_ID("ssi.4", "rcar_sound", &mstp_clks[MSTP1011]), | ||
329 | CLKDEV_ICK_ID("ssi.5", "rcar_sound", &mstp_clks[MSTP1010]), | ||
330 | CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP1009]), | ||
331 | CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP1008]), | ||
332 | CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP1007]), | ||
333 | CLKDEV_ICK_ID("ssi.9", "rcar_sound", &mstp_clks[MSTP1006]), | ||
334 | |||
299 | }; | 335 | }; |
300 | 336 | ||
301 | #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ | 337 | #define R8A7790_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ |
@@ -321,10 +357,10 @@ void __init r8a7790_clock_init(void) | |||
321 | R8A7790_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66); | 357 | R8A7790_CLOCK_ROOT(20, &extal_clk, 130, 156, 80, 66); |
322 | break; | 358 | break; |
323 | case MD(14): | 359 | case MD(14): |
324 | R8A7790_CLOCK_ROOT(26, &extal_div2_clk, 200, 240, 122, 102); | 360 | R8A7790_CLOCK_ROOT(26 / 2, &extal_div2_clk, 200, 240, 122, 102); |
325 | break; | 361 | break; |
326 | case MD(13) | MD(14): | 362 | case MD(13) | MD(14): |
327 | R8A7790_CLOCK_ROOT(30, &extal_div2_clk, 172, 208, 106, 88); | 363 | R8A7790_CLOCK_ROOT(30 / 2, &extal_div2_clk, 172, 208, 106, 88); |
328 | break; | 364 | break; |
329 | } | 365 | } |
330 | 366 | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c index c9a26f16ce5b..ff2d60d55bd5 100644 --- a/arch/arm/mach-shmobile/clock-r8a7791.c +++ b/arch/arm/mach-shmobile/clock-r8a7791.c | |||
@@ -103,6 +103,7 @@ SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12); | |||
103 | SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); | 103 | SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24); |
104 | SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); | 104 | SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024)); |
105 | SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); | 105 | SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15); |
106 | SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3); | ||
106 | 107 | ||
107 | static struct clk *main_clks[] = { | 108 | static struct clk *main_clks[] = { |
108 | &extal_clk, | 109 | &extal_clk, |
@@ -116,12 +117,14 @@ static struct clk *main_clks[] = { | |||
116 | &rclk_clk, | 117 | &rclk_clk, |
117 | &mp_clk, | 118 | &mp_clk, |
118 | &cp_clk, | 119 | &cp_clk, |
120 | &zx_clk, | ||
119 | }; | 121 | }; |
120 | 122 | ||
121 | /* MSTP */ | 123 | /* MSTP */ |
122 | enum { | 124 | enum { |
123 | MSTP721, MSTP720, | 125 | MSTP726, MSTP724, MSTP723, MSTP721, MSTP720, |
124 | MSTP719, MSTP718, MSTP715, MSTP714, | 126 | MSTP719, MSTP718, MSTP715, MSTP714, |
127 | MSTP522, | ||
125 | MSTP216, MSTP207, MSTP206, | 128 | MSTP216, MSTP207, MSTP206, |
126 | MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107, | 129 | MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107, |
127 | MSTP124, | 130 | MSTP124, |
@@ -129,12 +132,16 @@ enum { | |||
129 | }; | 132 | }; |
130 | 133 | ||
131 | static struct clk mstp_clks[MSTP_NR] = { | 134 | static struct clk mstp_clks[MSTP_NR] = { |
135 | [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */ | ||
136 | [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */ | ||
137 | [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */ | ||
132 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ | 138 | [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */ |
133 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ | 139 | [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */ |
134 | [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */ | 140 | [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */ |
135 | [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ | 141 | [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */ |
136 | [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ | 142 | [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */ |
137 | [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ | 143 | [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */ |
144 | [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */ | ||
138 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ | 145 | [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */ |
139 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ | 146 | [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */ |
140 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ | 147 | [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */ |
@@ -164,6 +171,9 @@ static struct clk_lookup lookups[] = { | |||
164 | CLKDEV_CON_ID("peripheral_clk", &hp_clk), | 171 | CLKDEV_CON_ID("peripheral_clk", &hp_clk), |
165 | 172 | ||
166 | /* MSTP */ | 173 | /* MSTP */ |
174 | CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7791", &mstp_clks[MSTP726]), | ||
175 | CLKDEV_ICK_ID("du.0", "rcar-du-r8a7791", &mstp_clks[MSTP724]), | ||
176 | CLKDEV_ICK_ID("du.1", "rcar-du-r8a7791", &mstp_clks[MSTP723]), | ||
167 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ | 177 | CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */ |
168 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ | 178 | CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */ |
169 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */ | 179 | CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]), /* SCIFB0 */ |
@@ -180,6 +190,8 @@ static struct clk_lookup lookups[] = { | |||
180 | CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */ | 190 | CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */ |
181 | CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */ | 191 | CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */ |
182 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), | 192 | CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]), |
193 | CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]), | ||
194 | CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]), | ||
183 | }; | 195 | }; |
184 | 196 | ||
185 | #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ | 197 | #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \ |
diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c index 5390c6bbbc02..28489978b09c 100644 --- a/arch/arm/mach-shmobile/clock-sh7372.c +++ b/arch/arm/mach-shmobile/clock-sh7372.c | |||
@@ -504,10 +504,6 @@ static struct clk_lookup lookups[] = { | |||
504 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), | 504 | CLKDEV_CON_ID("spu_clk", &div6_clks[DIV6_SPU]), |
505 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), | 505 | CLKDEV_CON_ID("vou_clk", &div6_clks[DIV6_VOU]), |
506 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), | 506 | CLKDEV_CON_ID("hdmi_clk", &div6_reparent_clks[DIV6_HDMI]), |
507 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
508 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
509 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
510 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
511 | 507 | ||
512 | /* MSTP32 clocks */ | 508 | /* MSTP32 clocks */ |
513 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ | 509 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* IIC2 */ |
@@ -574,6 +570,11 @@ static struct clk_lookup lookups[] = { | |||
574 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 570 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
575 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ | 571 | CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */ |
576 | 572 | ||
573 | /* ICK */ | ||
574 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
575 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
576 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
577 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
577 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", | 578 | CLKDEV_ICK_ID("hdmi", "sh_mobile_lcdc_fb.1", |
578 | &div6_reparent_clks[DIV6_HDMI]), | 579 | &div6_reparent_clks[DIV6_HDMI]), |
579 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), | 580 | CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]), |
diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c index c92c023f0d27..2aeec468cf7c 100644 --- a/arch/arm/mach-shmobile/clock-sh73a0.c +++ b/arch/arm/mach-shmobile/clock-sh73a0.c | |||
@@ -625,12 +625,6 @@ static struct clk_lookup lookups[] = { | |||
625 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), | 625 | CLKDEV_CON_ID("sdhi0_clk", &div6_clks[DIV6_SDHI0]), |
626 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), | 626 | CLKDEV_CON_ID("sdhi1_clk", &div6_clks[DIV6_SDHI1]), |
627 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), | 627 | CLKDEV_CON_ID("sdhi2_clk", &div6_clks[DIV6_SDHI2]), |
628 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
629 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
630 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
631 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
632 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
633 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
634 | 628 | ||
635 | /* MSTP32 clocks */ | 629 | /* MSTP32 clocks */ |
636 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ | 630 | CLKDEV_DEV_ID("i2c-sh_mobile.2", &mstp_clks[MSTP001]), /* I2C2 */ |
@@ -680,6 +674,14 @@ static struct clk_lookup lookups[] = { | |||
680 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ | 674 | CLKDEV_DEV_ID("i2c-sh_mobile.4", &mstp_clks[MSTP410]), /* I2C4 */ |
681 | CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ | 675 | CLKDEV_DEV_ID("e6828000.i2c", &mstp_clks[MSTP410]), /* I2C4 */ |
682 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ | 676 | CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */ |
677 | |||
678 | /* ICK */ | ||
679 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]), | ||
680 | CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSIT]), | ||
681 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSI0P]), | ||
682 | CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]), | ||
683 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk), | ||
684 | CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk), | ||
683 | }; | 685 | }; |
684 | 686 | ||
685 | void __init sh73a0_clock_init(void) | 687 | void __init sh73a0_clock_init(void) |
diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h index c2eb7568d9be..fcb142a14e07 100644 --- a/arch/arm/mach-shmobile/include/mach/emev2.h +++ b/arch/arm/mach-shmobile/include/mach/emev2.h | |||
@@ -3,12 +3,7 @@ | |||
3 | 3 | ||
4 | extern void emev2_map_io(void); | 4 | extern void emev2_map_io(void); |
5 | extern void emev2_init_delay(void); | 5 | extern void emev2_init_delay(void); |
6 | extern void emev2_add_standard_devices(void); | ||
7 | extern void emev2_clock_init(void); | 6 | extern void emev2_clock_init(void); |
8 | |||
9 | #define EMEV2_GPIO_BASE 200 | ||
10 | #define EMEV2_GPIO_IRQ(n) (EMEV2_GPIO_BASE + (n)) | ||
11 | |||
12 | extern struct smp_operations emev2_smp_ops; | 7 | extern struct smp_operations emev2_smp_ops; |
13 | 8 | ||
14 | #endif /* __ASM_EMEV2_H__ */ | 9 | #endif /* __ASM_EMEV2_H__ */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 441886c9714b..b497f932d04f 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -27,6 +27,24 @@ enum { | |||
27 | HPBDMA_SLAVE_DUMMY, | 27 | HPBDMA_SLAVE_DUMMY, |
28 | HPBDMA_SLAVE_SDHI0_TX, | 28 | HPBDMA_SLAVE_SDHI0_TX, |
29 | HPBDMA_SLAVE_SDHI0_RX, | 29 | HPBDMA_SLAVE_SDHI0_RX, |
30 | HPBDMA_SLAVE_HPBIF0_TX, | ||
31 | HPBDMA_SLAVE_HPBIF0_RX, | ||
32 | HPBDMA_SLAVE_HPBIF1_TX, | ||
33 | HPBDMA_SLAVE_HPBIF1_RX, | ||
34 | HPBDMA_SLAVE_HPBIF2_TX, | ||
35 | HPBDMA_SLAVE_HPBIF2_RX, | ||
36 | HPBDMA_SLAVE_HPBIF3_TX, | ||
37 | HPBDMA_SLAVE_HPBIF3_RX, | ||
38 | HPBDMA_SLAVE_HPBIF4_TX, | ||
39 | HPBDMA_SLAVE_HPBIF4_RX, | ||
40 | HPBDMA_SLAVE_HPBIF5_TX, | ||
41 | HPBDMA_SLAVE_HPBIF5_RX, | ||
42 | HPBDMA_SLAVE_HPBIF6_TX, | ||
43 | HPBDMA_SLAVE_HPBIF6_RX, | ||
44 | HPBDMA_SLAVE_HPBIF7_TX, | ||
45 | HPBDMA_SLAVE_HPBIF7_RX, | ||
46 | HPBDMA_SLAVE_HPBIF8_TX, | ||
47 | HPBDMA_SLAVE_HPBIF8_RX, | ||
30 | }; | 48 | }; |
31 | 49 | ||
32 | extern void r8a7778_add_standard_devices(void); | 50 | extern void r8a7778_add_standard_devices(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index 17af34ed89c8..5014145f272e 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -3,8 +3,6 @@ | |||
3 | 3 | ||
4 | #include <linux/sh_clk.h> | 4 | #include <linux/sh_clk.h> |
5 | #include <linux/pm_domain.h> | 5 | #include <linux/pm_domain.h> |
6 | #include <linux/sh_eth.h> | ||
7 | #include <linux/platform_data/camera-rcar.h> | ||
8 | 6 | ||
9 | /* HPB-DMA slave IDs */ | 7 | /* HPB-DMA slave IDs */ |
10 | enum { | 8 | enum { |
@@ -40,9 +38,6 @@ extern void r8a7779_earlytimer_init(void); | |||
40 | extern void r8a7779_add_early_devices(void); | 38 | extern void r8a7779_add_early_devices(void); |
41 | extern void r8a7779_add_standard_devices(void); | 39 | extern void r8a7779_add_standard_devices(void); |
42 | extern void r8a7779_add_standard_devices_dt(void); | 40 | extern void r8a7779_add_standard_devices_dt(void); |
43 | extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); | ||
44 | extern void r8a7779_add_vin_device(int idx, | ||
45 | struct rcar_vin_platform_data *pdata); | ||
46 | extern void r8a7779_init_late(void); | 41 | extern void r8a7779_init_late(void); |
47 | extern void r8a7779_clock_init(void); | 42 | extern void r8a7779_clock_init(void); |
48 | extern void r8a7779_pinmux_init(void); | 43 | extern void r8a7779_pinmux_init(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h index 051ead3c286e..200fa699f730 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7791.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h | |||
@@ -4,6 +4,7 @@ | |||
4 | void r8a7791_add_standard_devices(void); | 4 | void r8a7791_add_standard_devices(void); |
5 | void r8a7791_add_dt_devices(void); | 5 | void r8a7791_add_dt_devices(void); |
6 | void r8a7791_clock_init(void); | 6 | void r8a7791_clock_init(void); |
7 | void r8a7791_pinmux_init(void); | ||
7 | void r8a7791_init_early(void); | 8 | void r8a7791_init_early(void); |
8 | extern struct smp_operations r8a7791_smp_ops; | 9 | extern struct smp_operations r8a7791_smp_ops; |
9 | 10 | ||
diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c index 3ad531caf4f0..c8f2a1a69a52 100644 --- a/arch/arm/mach-shmobile/setup-emev2.c +++ b/arch/arm/mach-shmobile/setup-emev2.c | |||
@@ -16,24 +16,15 @@ | |||
16 | * along with this program; if not, write to the Free Software | 16 | * along with this program; if not, write to the Free Software |
17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
18 | */ | 18 | */ |
19 | #include <linux/clk-provider.h> | ||
19 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
20 | #include <linux/init.h> | 21 | #include <linux/init.h> |
21 | #include <linux/interrupt.h> | ||
22 | #include <linux/irq.h> | ||
23 | #include <linux/platform_device.h> | ||
24 | #include <linux/platform_data/gpio-em.h> | ||
25 | #include <linux/of_platform.h> | 22 | #include <linux/of_platform.h> |
26 | #include <linux/delay.h> | ||
27 | #include <linux/input.h> | ||
28 | #include <linux/io.h> | ||
29 | #include <linux/irqchip/arm-gic.h> | ||
30 | #include <mach/common.h> | 23 | #include <mach/common.h> |
31 | #include <mach/emev2.h> | 24 | #include <mach/emev2.h> |
32 | #include <mach/irqs.h> | ||
33 | #include <asm/mach-types.h> | 25 | #include <asm/mach-types.h> |
34 | #include <asm/mach/arch.h> | 26 | #include <asm/mach/arch.h> |
35 | #include <asm/mach/map.h> | 27 | #include <asm/mach/map.h> |
36 | #include <asm/mach/time.h> | ||
37 | 28 | ||
38 | static struct map_desc emev2_io_desc[] __initdata = { | 29 | static struct map_desc emev2_io_desc[] __initdata = { |
39 | #ifdef CONFIG_SMP | 30 | #ifdef CONFIG_SMP |
@@ -52,150 +43,20 @@ void __init emev2_map_io(void) | |||
52 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); | 43 | iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc)); |
53 | } | 44 | } |
54 | 45 | ||
55 | /* UART */ | ||
56 | static struct resource uart0_resources[] = { | ||
57 | DEFINE_RES_MEM(0xe1020000, 0x38), | ||
58 | DEFINE_RES_IRQ(40), | ||
59 | }; | ||
60 | |||
61 | static struct resource uart1_resources[] = { | ||
62 | DEFINE_RES_MEM(0xe1030000, 0x38), | ||
63 | DEFINE_RES_IRQ(41), | ||
64 | }; | ||
65 | |||
66 | static struct resource uart2_resources[] = { | ||
67 | DEFINE_RES_MEM(0xe1040000, 0x38), | ||
68 | DEFINE_RES_IRQ(42), | ||
69 | }; | ||
70 | |||
71 | static struct resource uart3_resources[] = { | ||
72 | DEFINE_RES_MEM(0xe1050000, 0x38), | ||
73 | DEFINE_RES_IRQ(43), | ||
74 | }; | ||
75 | |||
76 | #define emev2_register_uart(idx) \ | ||
77 | platform_device_register_simple("serial8250-em", idx, \ | ||
78 | uart##idx##_resources, \ | ||
79 | ARRAY_SIZE(uart##idx##_resources)) | ||
80 | |||
81 | /* STI */ | ||
82 | static struct resource sti_resources[] = { | ||
83 | DEFINE_RES_MEM(0xe0180000, 0x54), | ||
84 | DEFINE_RES_IRQ(157), | ||
85 | }; | ||
86 | |||
87 | #define emev2_register_sti() \ | ||
88 | platform_device_register_simple("em_sti", 0, \ | ||
89 | sti_resources, \ | ||
90 | ARRAY_SIZE(sti_resources)) | ||
91 | |||
92 | /* GIO */ | ||
93 | static struct gpio_em_config gio0_config = { | ||
94 | .gpio_base = 0, | ||
95 | .irq_base = EMEV2_GPIO_IRQ(0), | ||
96 | .number_of_pins = 32, | ||
97 | }; | ||
98 | |||
99 | static struct resource gio0_resources[] = { | ||
100 | DEFINE_RES_MEM(0xe0050000, 0x2c), | ||
101 | DEFINE_RES_MEM(0xe0050040, 0x20), | ||
102 | DEFINE_RES_IRQ(99), | ||
103 | DEFINE_RES_IRQ(100), | ||
104 | }; | ||
105 | |||
106 | static struct gpio_em_config gio1_config = { | ||
107 | .gpio_base = 32, | ||
108 | .irq_base = EMEV2_GPIO_IRQ(32), | ||
109 | .number_of_pins = 32, | ||
110 | }; | ||
111 | |||
112 | static struct resource gio1_resources[] = { | ||
113 | DEFINE_RES_MEM(0xe0050080, 0x2c), | ||
114 | DEFINE_RES_MEM(0xe00500c0, 0x20), | ||
115 | DEFINE_RES_IRQ(101), | ||
116 | DEFINE_RES_IRQ(102), | ||
117 | }; | ||
118 | |||
119 | static struct gpio_em_config gio2_config = { | ||
120 | .gpio_base = 64, | ||
121 | .irq_base = EMEV2_GPIO_IRQ(64), | ||
122 | .number_of_pins = 32, | ||
123 | }; | ||
124 | |||
125 | static struct resource gio2_resources[] = { | ||
126 | DEFINE_RES_MEM(0xe0050100, 0x2c), | ||
127 | DEFINE_RES_MEM(0xe0050140, 0x20), | ||
128 | DEFINE_RES_IRQ(103), | ||
129 | DEFINE_RES_IRQ(104), | ||
130 | }; | ||
131 | |||
132 | static struct gpio_em_config gio3_config = { | ||
133 | .gpio_base = 96, | ||
134 | .irq_base = EMEV2_GPIO_IRQ(96), | ||
135 | .number_of_pins = 32, | ||
136 | }; | ||
137 | |||
138 | static struct resource gio3_resources[] = { | ||
139 | DEFINE_RES_MEM(0xe0050180, 0x2c), | ||
140 | DEFINE_RES_MEM(0xe00501c0, 0x20), | ||
141 | DEFINE_RES_IRQ(105), | ||
142 | DEFINE_RES_IRQ(106), | ||
143 | }; | ||
144 | |||
145 | static struct gpio_em_config gio4_config = { | ||
146 | .gpio_base = 128, | ||
147 | .irq_base = EMEV2_GPIO_IRQ(128), | ||
148 | .number_of_pins = 31, | ||
149 | }; | ||
150 | |||
151 | static struct resource gio4_resources[] = { | ||
152 | DEFINE_RES_MEM(0xe0050200, 0x2c), | ||
153 | DEFINE_RES_MEM(0xe0050240, 0x20), | ||
154 | DEFINE_RES_IRQ(107), | ||
155 | DEFINE_RES_IRQ(108), | ||
156 | }; | ||
157 | |||
158 | #define emev2_register_gio(idx) \ | ||
159 | platform_device_register_resndata(&platform_bus, "em_gio", \ | ||
160 | idx, gio##idx##_resources, \ | ||
161 | ARRAY_SIZE(gio##idx##_resources), \ | ||
162 | &gio##idx##_config, \ | ||
163 | sizeof(struct gpio_em_config)) | ||
164 | |||
165 | static struct resource pmu_resources[] = { | ||
166 | DEFINE_RES_IRQ(152), | ||
167 | DEFINE_RES_IRQ(153), | ||
168 | }; | ||
169 | |||
170 | #define emev2_register_pmu() \ | ||
171 | platform_device_register_simple("arm-pmu", -1, \ | ||
172 | pmu_resources, \ | ||
173 | ARRAY_SIZE(pmu_resources)) | ||
174 | |||
175 | void __init emev2_add_standard_devices(void) | ||
176 | { | ||
177 | if (!IS_ENABLED(CONFIG_COMMON_CLK)) | ||
178 | emev2_clock_init(); | ||
179 | |||
180 | emev2_register_uart(0); | ||
181 | emev2_register_uart(1); | ||
182 | emev2_register_uart(2); | ||
183 | emev2_register_uart(3); | ||
184 | emev2_register_sti(); | ||
185 | emev2_register_gio(0); | ||
186 | emev2_register_gio(1); | ||
187 | emev2_register_gio(2); | ||
188 | emev2_register_gio(3); | ||
189 | emev2_register_gio(4); | ||
190 | emev2_register_pmu(); | ||
191 | } | ||
192 | |||
193 | void __init emev2_init_delay(void) | 46 | void __init emev2_init_delay(void) |
194 | { | 47 | { |
195 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ | 48 | shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */ |
196 | } | 49 | } |
197 | 50 | ||
198 | #ifdef CONFIG_USE_OF | 51 | static void __init emev2_add_standard_devices_dt(void) |
52 | { | ||
53 | #ifdef CONFIG_COMMON_CLK | ||
54 | of_clk_init(NULL); | ||
55 | #else | ||
56 | emev2_clock_init(); | ||
57 | #endif | ||
58 | of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL); | ||
59 | } | ||
199 | 60 | ||
200 | static const char *emev2_boards_compat_dt[] __initdata = { | 61 | static const char *emev2_boards_compat_dt[] __initdata = { |
201 | "renesas,emev2", | 62 | "renesas,emev2", |
@@ -206,7 +67,7 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)") | |||
206 | .smp = smp_ops(emev2_smp_ops), | 67 | .smp = smp_ops(emev2_smp_ops), |
207 | .map_io = emev2_map_io, | 68 | .map_io = emev2_map_io, |
208 | .init_early = emev2_init_delay, | 69 | .init_early = emev2_init_delay, |
70 | .init_machine = emev2_add_standard_devices_dt, | ||
71 | .init_late = shmobile_init_late, | ||
209 | .dt_compat = emev2_boards_compat_dt, | 72 | .dt_compat = emev2_boards_compat_dt, |
210 | MACHINE_END | 73 | MACHINE_END |
211 | |||
212 | #endif /* CONFIG_USE_OF */ | ||
diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c index d4eb509a1c87..55f0b9c7c482 100644 --- a/arch/arm/mach-shmobile/setup-r7s72100.c +++ b/arch/arm/mach-shmobile/setup-r7s72100.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/kernel.h> | 22 | #include <linux/kernel.h> |
23 | #include <linux/of_platform.h> | 23 | #include <linux/of_platform.h> |
24 | #include <linux/serial_sci.h> | 24 | #include <linux/serial_sci.h> |
25 | #include <linux/sh_timer.h> | ||
25 | #include <mach/common.h> | 26 | #include <mach/common.h> |
26 | #include <mach/irqs.h> | 27 | #include <mach/irqs.h> |
27 | #include <mach/r7s72100.h> | 28 | #include <mach/r7s72100.h> |
@@ -58,6 +59,26 @@ static inline void r7s72100_register_scif(int idx) | |||
58 | sizeof(struct plat_sci_port)); | 59 | sizeof(struct plat_sci_port)); |
59 | } | 60 | } |
60 | 61 | ||
62 | |||
63 | static struct sh_timer_config mtu2_0_platform_data __initdata = { | ||
64 | .name = "MTU2_0", | ||
65 | .timer_bit = 0, | ||
66 | .channel_offset = -0x80, | ||
67 | .clockevent_rating = 200, | ||
68 | }; | ||
69 | |||
70 | static struct resource mtu2_0_resources[] __initdata = { | ||
71 | DEFINE_RES_MEM(0xfcff0300, 0x27), | ||
72 | DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */ | ||
73 | }; | ||
74 | |||
75 | #define r7s72100_register_mtu2(idx) \ | ||
76 | platform_device_register_resndata(&platform_bus, "sh_mtu2", \ | ||
77 | idx, mtu2_##idx##_resources, \ | ||
78 | ARRAY_SIZE(mtu2_##idx##_resources), \ | ||
79 | &mtu2_##idx##_platform_data, \ | ||
80 | sizeof(struct sh_timer_config)) | ||
81 | |||
61 | void __init r7s72100_add_dt_devices(void) | 82 | void __init r7s72100_add_dt_devices(void) |
62 | { | 83 | { |
63 | r7s72100_register_scif(SCIF0); | 84 | r7s72100_register_scif(SCIF0); |
@@ -68,6 +89,7 @@ void __init r7s72100_add_dt_devices(void) | |||
68 | r7s72100_register_scif(SCIF5); | 89 | r7s72100_register_scif(SCIF5); |
69 | r7s72100_register_scif(SCIF6); | 90 | r7s72100_register_scif(SCIF6); |
70 | r7s72100_register_scif(SCIF7); | 91 | r7s72100_register_scif(SCIF7); |
92 | r7s72100_register_mtu2(0); | ||
71 | } | 93 | } |
72 | 94 | ||
73 | void __init r7s72100_init_early(void) | 95 | void __init r7s72100_init_early(void) |
diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c index b0f2749071be..cc94b64c2ef5 100644 --- a/arch/arm/mach-shmobile/setup-r8a73a4.c +++ b/arch/arm/mach-shmobile/setup-r8a73a4.c | |||
@@ -275,7 +275,7 @@ static const struct sh_dmae_pdata dma_pdata = { | |||
275 | 275 | ||
276 | static struct resource dma_resources[] = { | 276 | static struct resource dma_resources[] = { |
277 | DEFINE_RES_MEM(0xe6700020, 0x89e0), | 277 | DEFINE_RES_MEM(0xe6700020, 0x89e0), |
278 | DEFINE_RES_IRQ_NAMED(gic_spi(220), "error_irq"), | 278 | DEFINE_RES_IRQ(gic_spi(220)), |
279 | { | 279 | { |
280 | /* IRQ for channels 0-19 */ | 280 | /* IRQ for channels 0-19 */ |
281 | .start = gic_spi(200), | 281 | .start = gic_spi(200), |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 03fcc5974ef9..81701cfb6cc6 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -319,6 +319,29 @@ void __init r8a7778_add_dt_devices(void) | |||
319 | #define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE BIT(1) /* SDHI0 */ | 319 | #define HPB_DMAE_ASYNCMDR_ASMD21_SINGLE BIT(1) /* SDHI0 */ |
320 | #define HPB_DMAE_ASYNCMDR_ASMD21_MULTI 0 /* SDHI0 */ | 320 | #define HPB_DMAE_ASYNCMDR_ASMD21_MULTI 0 /* SDHI0 */ |
321 | 321 | ||
322 | #define HPBDMA_HPBIF(_id) \ | ||
323 | { \ | ||
324 | .id = HPBDMA_SLAVE_HPBIF## _id ##_TX, \ | ||
325 | .addr = 0xffda0000 + (_id * 0x1000), \ | ||
326 | .dcr = HPB_DMAE_DCR_CT | \ | ||
327 | HPB_DMAE_DCR_DIP | \ | ||
328 | HPB_DMAE_DCR_SPDS_32BIT | \ | ||
329 | HPB_DMAE_DCR_DMDL | \ | ||
330 | HPB_DMAE_DCR_DPDS_32BIT, \ | ||
331 | .port = 0x1111, \ | ||
332 | .dma_ch = (28 + _id), \ | ||
333 | }, { \ | ||
334 | .id = HPBDMA_SLAVE_HPBIF## _id ##_RX, \ | ||
335 | .addr = 0xffda0000 + (_id * 0x1000), \ | ||
336 | .dcr = HPB_DMAE_DCR_CT | \ | ||
337 | HPB_DMAE_DCR_DIP | \ | ||
338 | HPB_DMAE_DCR_SMDL | \ | ||
339 | HPB_DMAE_DCR_SPDS_32BIT | \ | ||
340 | HPB_DMAE_DCR_DPDS_32BIT, \ | ||
341 | .port = 0x1111, \ | ||
342 | .dma_ch = (28 + _id), \ | ||
343 | } | ||
344 | |||
322 | static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { | 345 | static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { |
323 | { | 346 | { |
324 | .id = HPBDMA_SLAVE_SDHI0_TX, | 347 | .id = HPBDMA_SLAVE_SDHI0_TX, |
@@ -349,11 +372,39 @@ static const struct hpb_dmae_slave_config hpb_dmae_slaves[] = { | |||
349 | .flags = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE, | 372 | .flags = HPB_DMAE_SET_ASYNC_RESET | HPB_DMAE_SET_ASYNC_MODE, |
350 | .dma_ch = 22, | 373 | .dma_ch = 22, |
351 | }, | 374 | }, |
375 | |||
376 | HPBDMA_HPBIF(0), | ||
377 | HPBDMA_HPBIF(1), | ||
378 | HPBDMA_HPBIF(2), | ||
379 | HPBDMA_HPBIF(3), | ||
380 | HPBDMA_HPBIF(4), | ||
381 | HPBDMA_HPBIF(5), | ||
382 | HPBDMA_HPBIF(6), | ||
383 | HPBDMA_HPBIF(7), | ||
384 | HPBDMA_HPBIF(8), | ||
352 | }; | 385 | }; |
353 | 386 | ||
354 | static const struct hpb_dmae_channel hpb_dmae_channels[] = { | 387 | static const struct hpb_dmae_channel hpb_dmae_channels[] = { |
355 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */ | 388 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_TX), /* ch. 21 */ |
356 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */ | 389 | HPB_DMAE_CHANNEL(0x7e, HPBDMA_SLAVE_SDHI0_RX), /* ch. 22 */ |
390 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF0_TX), /* ch. 28 */ | ||
391 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF0_RX), /* ch. 28 */ | ||
392 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF1_TX), /* ch. 29 */ | ||
393 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF1_RX), /* ch. 29 */ | ||
394 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF2_TX), /* ch. 30 */ | ||
395 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF2_RX), /* ch. 30 */ | ||
396 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF3_TX), /* ch. 31 */ | ||
397 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF3_RX), /* ch. 31 */ | ||
398 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF4_TX), /* ch. 32 */ | ||
399 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF4_RX), /* ch. 32 */ | ||
400 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF5_TX), /* ch. 33 */ | ||
401 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF5_RX), /* ch. 33 */ | ||
402 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF6_TX), /* ch. 34 */ | ||
403 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF6_RX), /* ch. 34 */ | ||
404 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF7_TX), /* ch. 35 */ | ||
405 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF7_RX), /* ch. 35 */ | ||
406 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF8_TX), /* ch. 36 */ | ||
407 | HPB_DMAE_CHANNEL(0x7f, HPBDMA_SLAVE_HPBIF8_RX), /* ch. 36 */ | ||
357 | }; | 408 | }; |
358 | 409 | ||
359 | static struct hpb_dmae_pdata dma_platform_data __initdata = { | 410 | static struct hpb_dmae_pdata dma_platform_data __initdata = { |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 13049e9d691c..8f9453152fb9 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -598,45 +598,6 @@ static struct platform_device ohci1_device = { | |||
598 | .resource = ohci1_resources, | 598 | .resource = ohci1_resources, |
599 | }; | 599 | }; |
600 | 600 | ||
601 | /* Ether */ | ||
602 | static struct resource ether_resources[] __initdata = { | ||
603 | { | ||
604 | .start = 0xfde00000, | ||
605 | .end = 0xfde003ff, | ||
606 | .flags = IORESOURCE_MEM, | ||
607 | }, { | ||
608 | .start = gic_iid(0xb4), | ||
609 | .flags = IORESOURCE_IRQ, | ||
610 | }, | ||
611 | }; | ||
612 | |||
613 | #define R8A7779_VIN(idx) \ | ||
614 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
615 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
616 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
617 | }; \ | ||
618 | \ | ||
619 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
620 | .parent = &platform_bus, \ | ||
621 | .name = "r8a7779-vin", \ | ||
622 | .id = idx, \ | ||
623 | .res = vin##idx##_resources, \ | ||
624 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
625 | .dma_mask = DMA_BIT_MASK(32), \ | ||
626 | } | ||
627 | |||
628 | R8A7779_VIN(0); | ||
629 | R8A7779_VIN(1); | ||
630 | R8A7779_VIN(2); | ||
631 | R8A7779_VIN(3); | ||
632 | |||
633 | static struct platform_device_info *vin_info_table[] __initdata = { | ||
634 | &vin0_info, | ||
635 | &vin1_info, | ||
636 | &vin2_info, | ||
637 | &vin3_info, | ||
638 | }; | ||
639 | |||
640 | /* HPB-DMA */ | 601 | /* HPB-DMA */ |
641 | 602 | ||
642 | /* Asynchronous mode register bits */ | 603 | /* Asynchronous mode register bits */ |
@@ -825,24 +786,6 @@ void __init r8a7779_add_standard_devices(void) | |||
825 | r8a7779_register_hpb_dmae(); | 786 | r8a7779_register_hpb_dmae(); |
826 | } | 787 | } |
827 | 788 | ||
828 | void __init r8a7779_add_ether_device(struct sh_eth_plat_data *pdata) | ||
829 | { | ||
830 | platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1, | ||
831 | ether_resources, | ||
832 | ARRAY_SIZE(ether_resources), | ||
833 | pdata, sizeof(*pdata)); | ||
834 | } | ||
835 | |||
836 | void __init r8a7779_add_vin_device(int id, struct rcar_vin_platform_data *pdata) | ||
837 | { | ||
838 | BUG_ON(id < 0 || id > 3); | ||
839 | |||
840 | vin_info_table[id]->data = pdata; | ||
841 | vin_info_table[id]->size_data = sizeof(*pdata); | ||
842 | |||
843 | platform_device_register_full(vin_info_table[id]); | ||
844 | } | ||
845 | |||
846 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | 789 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ |
847 | void __init __weak r8a7779_register_twd(void) { } | 790 | void __init __weak r8a7779_register_twd(void) { } |
848 | 791 | ||
diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c index c47bcebbcb00..3543c3bacb75 100644 --- a/arch/arm/mach-shmobile/setup-r8a7790.c +++ b/arch/arm/mach-shmobile/setup-r8a7790.c | |||
@@ -34,6 +34,10 @@ static const struct resource pfc_resources[] __initconst = { | |||
34 | DEFINE_RES_MEM(0xe6060000, 0x250), | 34 | DEFINE_RES_MEM(0xe6060000, 0x250), |
35 | }; | 35 | }; |
36 | 36 | ||
37 | #define r8a7790_register_pfc() \ | ||
38 | platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, \ | ||
39 | ARRAY_SIZE(pfc_resources)) | ||
40 | |||
37 | #define R8A7790_GPIO(idx) \ | 41 | #define R8A7790_GPIO(idx) \ |
38 | static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ | 42 | static const struct resource r8a7790_gpio##idx##_resources[] __initconst = { \ |
39 | DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ | 43 | DEFINE_RES_MEM(0xe6050000 + 0x1000 * (idx), 0x50), \ |
@@ -65,8 +69,7 @@ R8A7790_GPIO(5); | |||
65 | 69 | ||
66 | void __init r8a7790_pinmux_init(void) | 70 | void __init r8a7790_pinmux_init(void) |
67 | { | 71 | { |
68 | platform_device_register_simple("pfc-r8a7790", -1, pfc_resources, | 72 | r8a7790_register_pfc(); |
69 | ARRAY_SIZE(pfc_resources)); | ||
70 | r8a7790_register_gpio(0); | 73 | r8a7790_register_gpio(0); |
71 | r8a7790_register_gpio(1); | 74 | r8a7790_register_gpio(1); |
72 | r8a7790_register_gpio(2); | 75 | r8a7790_register_gpio(2); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c index d9393d61ee27..cddca99b434f 100644 --- a/arch/arm/mach-shmobile/setup-r8a7791.c +++ b/arch/arm/mach-shmobile/setup-r8a7791.c | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/irq.h> | 22 | #include <linux/irq.h> |
23 | #include <linux/kernel.h> | 23 | #include <linux/kernel.h> |
24 | #include <linux/of_platform.h> | 24 | #include <linux/of_platform.h> |
25 | #include <linux/platform_data/gpio-rcar.h> | ||
25 | #include <linux/platform_data/irq-renesas-irqc.h> | 26 | #include <linux/platform_data/irq-renesas-irqc.h> |
26 | #include <linux/serial_sci.h> | 27 | #include <linux/serial_sci.h> |
27 | #include <linux/sh_timer.h> | 28 | #include <linux/sh_timer.h> |
@@ -31,6 +32,58 @@ | |||
31 | #include <mach/rcar-gen2.h> | 32 | #include <mach/rcar-gen2.h> |
32 | #include <asm/mach/arch.h> | 33 | #include <asm/mach/arch.h> |
33 | 34 | ||
35 | static const struct resource pfc_resources[] __initconst = { | ||
36 | DEFINE_RES_MEM(0xe6060000, 0x250), | ||
37 | }; | ||
38 | |||
39 | #define r8a7791_register_pfc() \ | ||
40 | platform_device_register_simple("pfc-r8a7791", -1, pfc_resources, \ | ||
41 | ARRAY_SIZE(pfc_resources)) | ||
42 | |||
43 | #define R8A7791_GPIO(idx, base, nr) \ | ||
44 | static const struct resource r8a7791_gpio##idx##_resources[] __initconst = { \ | ||
45 | DEFINE_RES_MEM((base), 0x50), \ | ||
46 | DEFINE_RES_IRQ(gic_spi(4 + (idx))), \ | ||
47 | }; \ | ||
48 | \ | ||
49 | static const struct gpio_rcar_config \ | ||
50 | r8a7791_gpio##idx##_platform_data __initconst = { \ | ||
51 | .gpio_base = 32 * (idx), \ | ||
52 | .irq_base = 0, \ | ||
53 | .number_of_pins = (nr), \ | ||
54 | .pctl_name = "pfc-r8a7791", \ | ||
55 | .has_both_edge_trigger = 1, \ | ||
56 | }; \ | ||
57 | |||
58 | R8A7791_GPIO(0, 0xe6050000, 32); | ||
59 | R8A7791_GPIO(1, 0xe6051000, 32); | ||
60 | R8A7791_GPIO(2, 0xe6052000, 32); | ||
61 | R8A7791_GPIO(3, 0xe6053000, 32); | ||
62 | R8A7791_GPIO(4, 0xe6054000, 32); | ||
63 | R8A7791_GPIO(5, 0xe6055000, 32); | ||
64 | R8A7791_GPIO(6, 0xe6055400, 32); | ||
65 | R8A7791_GPIO(7, 0xe6055800, 26); | ||
66 | |||
67 | #define r8a7791_register_gpio(idx) \ | ||
68 | platform_device_register_resndata(&platform_bus, "gpio_rcar", idx, \ | ||
69 | r8a7791_gpio##idx##_resources, \ | ||
70 | ARRAY_SIZE(r8a7791_gpio##idx##_resources), \ | ||
71 | &r8a7791_gpio##idx##_platform_data, \ | ||
72 | sizeof(r8a7791_gpio##idx##_platform_data)) | ||
73 | |||
74 | void __init r8a7791_pinmux_init(void) | ||
75 | { | ||
76 | r8a7791_register_pfc(); | ||
77 | r8a7791_register_gpio(0); | ||
78 | r8a7791_register_gpio(1); | ||
79 | r8a7791_register_gpio(2); | ||
80 | r8a7791_register_gpio(3); | ||
81 | r8a7791_register_gpio(4); | ||
82 | r8a7791_register_gpio(5); | ||
83 | r8a7791_register_gpio(6); | ||
84 | r8a7791_register_gpio(7); | ||
85 | } | ||
86 | |||
34 | #define SCIF_COMMON(scif_type, baseaddr, irq) \ | 87 | #define SCIF_COMMON(scif_type, baseaddr, irq) \ |
35 | .type = scif_type, \ | 88 | .type = scif_type, \ |
36 | .mapbase = baseaddr, \ | 89 | .mapbase = baseaddr, \ |
@@ -136,6 +189,17 @@ static struct resource irqc0_resources[] = { | |||
136 | &irqc##idx##_data, \ | 189 | &irqc##idx##_data, \ |
137 | sizeof(struct renesas_irqc_config)) | 190 | sizeof(struct renesas_irqc_config)) |
138 | 191 | ||
192 | static const struct resource thermal_resources[] __initconst = { | ||
193 | DEFINE_RES_MEM(0xe61f0000, 0x14), | ||
194 | DEFINE_RES_MEM(0xe61f0100, 0x38), | ||
195 | DEFINE_RES_IRQ(gic_spi(69)), | ||
196 | }; | ||
197 | |||
198 | #define r8a7791_register_thermal() \ | ||
199 | platform_device_register_simple("rcar_thermal", -1, \ | ||
200 | thermal_resources, \ | ||
201 | ARRAY_SIZE(thermal_resources)) | ||
202 | |||
139 | void __init r8a7791_add_dt_devices(void) | 203 | void __init r8a7791_add_dt_devices(void) |
140 | { | 204 | { |
141 | r8a7791_register_scif(SCIFA0); | 205 | r8a7791_register_scif(SCIFA0); |
@@ -160,6 +224,7 @@ void __init r8a7791_add_standard_devices(void) | |||
160 | { | 224 | { |
161 | r8a7791_add_dt_devices(); | 225 | r8a7791_add_dt_devices(); |
162 | r8a7791_register_irqc(0); | 226 | r8a7791_register_irqc(0); |
227 | r8a7791_register_thermal(); | ||
163 | } | 228 | } |
164 | 229 | ||
165 | void __init r8a7791_init_early(void) | 230 | void __init r8a7791_init_early(void) |
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c index 22de17417fd7..65151c48cbd4 100644 --- a/arch/arm/mach-shmobile/setup-sh73a0.c +++ b/arch/arm/mach-shmobile/setup-sh73a0.c | |||
@@ -273,7 +273,7 @@ static struct sh_timer_config tmu00_platform_data = { | |||
273 | }; | 273 | }; |
274 | 274 | ||
275 | static struct resource tmu00_resources[] = { | 275 | static struct resource tmu00_resources[] = { |
276 | [0] = DEFINE_RES_MEM_NAMED(0xfff60008, 0xc, "TMU00"), | 276 | [0] = DEFINE_RES_MEM(0xfff60008, 0xc), |
277 | [1] = { | 277 | [1] = { |
278 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ | 278 | .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */ |
279 | .flags = IORESOURCE_IRQ, | 279 | .flags = IORESOURCE_IRQ, |
@@ -298,7 +298,7 @@ static struct sh_timer_config tmu01_platform_data = { | |||
298 | }; | 298 | }; |
299 | 299 | ||
300 | static struct resource tmu01_resources[] = { | 300 | static struct resource tmu01_resources[] = { |
301 | [0] = DEFINE_RES_MEM_NAMED(0xfff60014, 0xc, "TMU00"), | 301 | [0] = DEFINE_RES_MEM(0xfff60014, 0xc), |
302 | [1] = { | 302 | [1] = { |
303 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ | 303 | .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */ |
304 | .flags = IORESOURCE_IRQ, | 304 | .flags = IORESOURCE_IRQ, |
@@ -316,7 +316,7 @@ static struct platform_device tmu01_device = { | |||
316 | }; | 316 | }; |
317 | 317 | ||
318 | static struct resource i2c0_resources[] = { | 318 | static struct resource i2c0_resources[] = { |
319 | [0] = DEFINE_RES_MEM_NAMED(0xe6820000, 0x426, "IIC0"), | 319 | [0] = DEFINE_RES_MEM(0xe6820000, 0x426), |
320 | [1] = { | 320 | [1] = { |
321 | .start = gic_spi(167), | 321 | .start = gic_spi(167), |
322 | .end = gic_spi(170), | 322 | .end = gic_spi(170), |
@@ -325,7 +325,7 @@ static struct resource i2c0_resources[] = { | |||
325 | }; | 325 | }; |
326 | 326 | ||
327 | static struct resource i2c1_resources[] = { | 327 | static struct resource i2c1_resources[] = { |
328 | [0] = DEFINE_RES_MEM_NAMED(0xe6822000, 0x426, "IIC1"), | 328 | [0] = DEFINE_RES_MEM(0xe6822000, 0x426), |
329 | [1] = { | 329 | [1] = { |
330 | .start = gic_spi(51), | 330 | .start = gic_spi(51), |
331 | .end = gic_spi(54), | 331 | .end = gic_spi(54), |
@@ -334,7 +334,7 @@ static struct resource i2c1_resources[] = { | |||
334 | }; | 334 | }; |
335 | 335 | ||
336 | static struct resource i2c2_resources[] = { | 336 | static struct resource i2c2_resources[] = { |
337 | [0] = DEFINE_RES_MEM_NAMED(0xe6824000, 0x426, "IIC2"), | 337 | [0] = DEFINE_RES_MEM(0xe6824000, 0x426), |
338 | [1] = { | 338 | [1] = { |
339 | .start = gic_spi(171), | 339 | .start = gic_spi(171), |
340 | .end = gic_spi(174), | 340 | .end = gic_spi(174), |
@@ -343,7 +343,7 @@ static struct resource i2c2_resources[] = { | |||
343 | }; | 343 | }; |
344 | 344 | ||
345 | static struct resource i2c3_resources[] = { | 345 | static struct resource i2c3_resources[] = { |
346 | [0] = DEFINE_RES_MEM_NAMED(0xe6826000, 0x426, "IIC3"), | 346 | [0] = DEFINE_RES_MEM(0xe6826000, 0x426), |
347 | [1] = { | 347 | [1] = { |
348 | .start = gic_spi(183), | 348 | .start = gic_spi(183), |
349 | .end = gic_spi(186), | 349 | .end = gic_spi(186), |
@@ -352,7 +352,7 @@ static struct resource i2c3_resources[] = { | |||
352 | }; | 352 | }; |
353 | 353 | ||
354 | static struct resource i2c4_resources[] = { | 354 | static struct resource i2c4_resources[] = { |
355 | [0] = DEFINE_RES_MEM_NAMED(0xe6828000, 0x426, "IIC4"), | 355 | [0] = DEFINE_RES_MEM(0xe6828000, 0x426), |
356 | [1] = { | 356 | [1] = { |
357 | .start = gic_spi(187), | 357 | .start = gic_spi(187), |
358 | .end = gic_spi(190), | 358 | .end = gic_spi(190), |
@@ -722,7 +722,7 @@ static struct platform_device pmu_device = { | |||
722 | 722 | ||
723 | /* an IPMMU module for ICB */ | 723 | /* an IPMMU module for ICB */ |
724 | static struct resource ipmmu_resources[] = { | 724 | static struct resource ipmmu_resources[] = { |
725 | DEFINE_RES_MEM_NAMED(0xfe951000, 0x100, "IPMMU"), | 725 | DEFINE_RES_MEM(0xfe951000, 0x100), |
726 | }; | 726 | }; |
727 | 727 | ||
728 | static const char * const ipmmu_dev_names[] = { | 728 | static const char * const ipmmu_dev_names[] = { |
diff --git a/arch/arm/mach-shmobile/sh-gpio.h b/arch/arm/mach-shmobile/sh-gpio.h index e834763ac2a5..2c4141413db9 100644 --- a/arch/arm/mach-shmobile/sh-gpio.h +++ b/arch/arm/mach-shmobile/sh-gpio.h | |||
@@ -26,23 +26,4 @@ static inline void __init gpio_direction_none(void __iomem * addr) | |||
26 | __raw_writeb(0x00, addr); | 26 | __raw_writeb(0x00, addr); |
27 | } | 27 | } |
28 | 28 | ||
29 | static inline void __init gpio_request_pullup(void __iomem * addr) | ||
30 | { | ||
31 | u8 data = __raw_readb(addr); | ||
32 | |||
33 | data &= 0x0F; | ||
34 | data |= 0xC0; | ||
35 | __raw_writeb(data, addr); | ||
36 | } | ||
37 | |||
38 | static inline void __init gpio_request_pulldown(void __iomem * addr) | ||
39 | { | ||
40 | u8 data = __raw_readb(addr); | ||
41 | |||
42 | data &= 0x0F; | ||
43 | data |= 0xA0; | ||
44 | |||
45 | __raw_writeb(data, addr); | ||
46 | } | ||
47 | |||
48 | #endif /* __ASM_ARCH_GPIO_H */ | 29 | #endif /* __ASM_ARCH_GPIO_H */ |