diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 14:55:59 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-05 14:55:59 -0400 |
commit | 27c053aa8d18d1fa7b83041e36bad20bcdf55514 (patch) | |
tree | c59dce17a248dd8f4757eca3823032334c626dcd /arch | |
parent | a09e9a7a4b907f2dfa9bdb2b98a1828ab4b340b2 (diff) | |
parent | f66b2a1c7f2ae3fb0d5b67d07ab4f5055fd3cf16 (diff) |
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media
Pull media updates from Mauro Carvalho Chehab:
"This series contains:
- Exynos s5p-mfc driver got support for VP8 encoder
- Some SoC drivers gained support for asynchronous registration
(needed for DT)
- The RC subsystem gained support for RC activity LED;
- New drivers added: a video decoder(adv7842), a video encoder
(adv7511), a new GSPCA driver (stk1135) and support for Renesas
R-Car (vsp1)
- the first SDR kernel driver: mirics msi3101. Due to some troubles
with the driver, and because the API is still under discussion, it
will be merged at staging for 3.12. Need to rework on it
- usual new boards additions, fixes, cleanups and driver
improvements"
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (242 commits)
[media] cx88: Fix regression: CX88_AUDIO_WM8775 can't be 0
[media] exynos4-is: Fix entity unregistration on error path
[media] exynos-gsc: Register v4l2 device
[media] exynos4-is: Fix fimc-lite bayer formats
[media] em28xx: fix assignment of the eeprom data
[media] hdpvr: fix iteration over uninitialized lists in hdpvr_probe()
[media] usbtv: Throw corrupted frames away
[media] usbtv: Fix deinterlacing
[media] v4l2: added missing mutex.h include to v4l2-ctrls.h
[media] DocBook: upgrade media_api DocBook version to 4.2
[media] ml86v7667: fix compile warning: 'ret' set but not used
[media] s5p-g2d: Fix registration failure
[media] media: coda: Fix DT driver data pointer for i.MX27
[media] s5p-mfc: Fix input/output format reporting
[media] v4l: vsp1: Fix mutex double lock at streamon time
[media] v4l: vsp1: Add support for RT clock
[media] v4l: vsp1: Initialize media device bus_info field
[media] davinci: vpif_capture: fix error return code in vpif_probe()
[media] davinci: vpif_display: fix error return code in vpif_probe()
[media] MAINTAINERS: add entries for adv7511 and adv7842
...
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/configs/bockw_defconfig | 7 | ||||
-rw-r--r-- | arch/arm/configs/marzen_defconfig | 7 | ||||
-rw-r--r-- | arch/arm/mach-davinci/board-da850-evm.c | 6 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-bockw.c | 41 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/board-marzen.c | 44 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7778.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/clock-r8a7779.c | 10 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7778.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/include/mach/r8a7779.h | 3 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7778.c | 34 | ||||
-rw-r--r-- | arch/arm/mach-shmobile/setup-r8a7779.c | 37 |
11 files changed, 192 insertions, 5 deletions
diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig index 845f5cdf62b5..e7e94948d194 100644 --- a/arch/arm/configs/bockw_defconfig +++ b/arch/arm/configs/bockw_defconfig | |||
@@ -82,6 +82,13 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y | |||
82 | # CONFIG_HWMON is not set | 82 | # CONFIG_HWMON is not set |
83 | CONFIG_I2C=y | 83 | CONFIG_I2C=y |
84 | CONFIG_I2C_RCAR=y | 84 | CONFIG_I2C_RCAR=y |
85 | CONFIG_MEDIA_SUPPORT=y | ||
86 | CONFIG_MEDIA_CAMERA_SUPPORT=y | ||
87 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
88 | CONFIG_SOC_CAMERA=y | ||
89 | CONFIG_VIDEO_RCAR_VIN=y | ||
90 | # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set | ||
91 | CONFIG_VIDEO_ML86V7667=y | ||
85 | CONFIG_SPI=y | 92 | CONFIG_SPI=y |
86 | CONFIG_SPI_SH_HSPI=y | 93 | CONFIG_SPI_SH_HSPI=y |
87 | CONFIG_USB=y | 94 | CONFIG_USB=y |
diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig index 494e70aeb9e1..c50e52be4463 100644 --- a/arch/arm/configs/marzen_defconfig +++ b/arch/arm/configs/marzen_defconfig | |||
@@ -84,6 +84,13 @@ CONFIG_GPIO_RCAR=y | |||
84 | CONFIG_THERMAL=y | 84 | CONFIG_THERMAL=y |
85 | CONFIG_RCAR_THERMAL=y | 85 | CONFIG_RCAR_THERMAL=y |
86 | CONFIG_SSB=y | 86 | CONFIG_SSB=y |
87 | CONFIG_MEDIA_SUPPORT=y | ||
88 | CONFIG_MEDIA_CAMERA_SUPPORT=y | ||
89 | CONFIG_V4L_PLATFORM_DRIVERS=y | ||
90 | CONFIG_SOC_CAMERA=y | ||
91 | CONFIG_VIDEO_RCAR_VIN=y | ||
92 | # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set | ||
93 | CONFIG_VIDEO_ADV7180=y | ||
87 | CONFIG_USB=y | 94 | CONFIG_USB=y |
88 | CONFIG_USB_RCAR_PHY=y | 95 | CONFIG_USB_RCAR_PHY=y |
89 | CONFIG_MMC=y | 96 | CONFIG_MMC=y |
diff --git a/arch/arm/mach-davinci/board-da850-evm.c b/arch/arm/mach-davinci/board-da850-evm.c index bea6793a7ede..9f09f45835f8 100644 --- a/arch/arm/mach-davinci/board-da850-evm.c +++ b/arch/arm/mach-davinci/board-da850-evm.c | |||
@@ -1249,12 +1249,10 @@ static struct vpif_capture_config da850_vpif_capture_config = { | |||
1249 | 1249 | ||
1250 | static struct adv7343_platform_data adv7343_pdata = { | 1250 | static struct adv7343_platform_data adv7343_pdata = { |
1251 | .mode_config = { | 1251 | .mode_config = { |
1252 | .dac_3 = 1, | 1252 | .dac = { 1, 1, 1 }, |
1253 | .dac_2 = 1, | ||
1254 | .dac_1 = 1, | ||
1255 | }, | 1253 | }, |
1256 | .sd_config = { | 1254 | .sd_config = { |
1257 | .sd_dac_out1 = 1, | 1255 | .sd_dac_out = { 1 }, |
1258 | }, | 1256 | }, |
1259 | }; | 1257 | }; |
1260 | 1258 | ||
diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c index 3354a85c90f7..24f26ee97f42 100644 --- a/arch/arm/mach-shmobile/board-bockw.c +++ b/arch/arm/mach-shmobile/board-bockw.c | |||
@@ -3,6 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2013 Renesas Solutions Corp. | 4 | * Copyright (C) 2013 Renesas Solutions Corp. |
5 | * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> | 5 | * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> |
6 | * Copyright (C) 2013 Cogent Embedded, Inc. | ||
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * 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 | * it under the terms of the GNU General Public License as published by |
@@ -28,6 +29,7 @@ | |||
28 | #include <linux/smsc911x.h> | 29 | #include <linux/smsc911x.h> |
29 | #include <linux/spi/spi.h> | 30 | #include <linux/spi/spi.h> |
30 | #include <linux/spi/flash.h> | 31 | #include <linux/spi/flash.h> |
32 | #include <media/soc_camera.h> | ||
31 | #include <mach/common.h> | 33 | #include <mach/common.h> |
32 | #include <mach/irqs.h> | 34 | #include <mach/irqs.h> |
33 | #include <mach/r8a7778.h> | 35 | #include <mach/r8a7778.h> |
@@ -143,6 +145,25 @@ static struct sh_mmcif_plat_data sh_mmcif_plat = { | |||
143 | MMC_CAP_NEEDS_POLL, | 145 | MMC_CAP_NEEDS_POLL, |
144 | }; | 146 | }; |
145 | 147 | ||
148 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | ||
149 | .flags = RCAR_VIN_BT656, | ||
150 | }; | ||
151 | |||
152 | /* In the default configuration both decoders reside on I2C bus 0 */ | ||
153 | #define BOCKW_CAMERA(idx) \ | ||
154 | static struct i2c_board_info camera##idx##_info = { \ | ||
155 | I2C_BOARD_INFO("ml86v7667", 0x41 + 2 * (idx)), \ | ||
156 | }; \ | ||
157 | \ | ||
158 | static struct soc_camera_link iclink##idx##_ml86v7667 __initdata = { \ | ||
159 | .bus_id = idx, \ | ||
160 | .i2c_adapter_id = 0, \ | ||
161 | .board_info = &camera##idx##_info, \ | ||
162 | } | ||
163 | |||
164 | BOCKW_CAMERA(0); | ||
165 | BOCKW_CAMERA(1); | ||
166 | |||
146 | static const struct pinctrl_map bockw_pinctrl_map[] = { | 167 | static const struct pinctrl_map bockw_pinctrl_map[] = { |
147 | /* Ether */ | 168 | /* Ether */ |
148 | PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", | 169 | PIN_MAP_MUX_GROUP_DEFAULT("r8a777x-ether", "pfc-r8a7778", |
@@ -174,6 +195,16 @@ static const struct pinctrl_map bockw_pinctrl_map[] = { | |||
174 | "sdhi0_cd", "sdhi0"), | 195 | "sdhi0_cd", "sdhi0"), |
175 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", | 196 | PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7778", |
176 | "sdhi0_wp", "sdhi0"), | 197 | "sdhi0_wp", "sdhi0"), |
198 | /* VIN0 */ | ||
199 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778", | ||
200 | "vin0_clk", "vin0"), | ||
201 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.0", "pfc-r8a7778", | ||
202 | "vin0_data8", "vin0"), | ||
203 | /* VIN1 */ | ||
204 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778", | ||
205 | "vin1_clk", "vin1"), | ||
206 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7778-vin.1", "pfc-r8a7778", | ||
207 | "vin1_data8", "vin1"), | ||
177 | }; | 208 | }; |
178 | 209 | ||
179 | #define FPGA 0x18200000 | 210 | #define FPGA 0x18200000 |
@@ -192,6 +223,16 @@ static void __init bockw_init(void) | |||
192 | r8a7778_add_i2c_device(0); | 223 | r8a7778_add_i2c_device(0); |
193 | r8a7778_add_hspi_device(0); | 224 | r8a7778_add_hspi_device(0); |
194 | r8a7778_add_mmc_device(&sh_mmcif_plat); | 225 | r8a7778_add_mmc_device(&sh_mmcif_plat); |
226 | r8a7778_add_vin_device(0, &vin_platform_data); | ||
227 | /* VIN1 has a pin conflict with Ether */ | ||
228 | if (!IS_ENABLED(CONFIG_SH_ETH)) | ||
229 | r8a7778_add_vin_device(1, &vin_platform_data); | ||
230 | platform_device_register_data(&platform_bus, "soc-camera-pdrv", 0, | ||
231 | &iclink0_ml86v7667, | ||
232 | sizeof(iclink0_ml86v7667)); | ||
233 | platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1, | ||
234 | &iclink1_ml86v7667, | ||
235 | sizeof(iclink1_ml86v7667)); | ||
195 | 236 | ||
196 | i2c_register_board_info(0, i2c0_devices, | 237 | i2c_register_board_info(0, i2c0_devices, |
197 | ARRAY_SIZE(i2c0_devices)); | 238 | ARRAY_SIZE(i2c0_devices)); |
diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c index a7d1010505bf..ca7fb2e63c60 100644 --- a/arch/arm/mach-shmobile/board-marzen.c +++ b/arch/arm/mach-shmobile/board-marzen.c | |||
@@ -1,8 +1,9 @@ | |||
1 | /* | 1 | /* |
2 | * marzen board support | 2 | * marzen board support |
3 | * | 3 | * |
4 | * Copyright (C) 2011 Renesas Solutions Corp. | 4 | * Copyright (C) 2011, 2013 Renesas Solutions Corp. |
5 | * Copyright (C) 2011 Magnus Damm | 5 | * Copyright (C) 2011 Magnus Damm |
6 | * Copyright (C) 2013 Cogent Embedded, Inc. | ||
6 | * | 7 | * |
7 | * This program is free software; you can redistribute it and/or modify | 8 | * 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 | * it under the terms of the GNU General Public License as published by |
@@ -37,6 +38,7 @@ | |||
37 | #include <linux/mmc/host.h> | 38 | #include <linux/mmc/host.h> |
38 | #include <linux/mmc/sh_mobile_sdhi.h> | 39 | #include <linux/mmc/sh_mobile_sdhi.h> |
39 | #include <linux/mfd/tmio.h> | 40 | #include <linux/mfd/tmio.h> |
41 | #include <media/soc_camera.h> | ||
40 | #include <mach/hardware.h> | 42 | #include <mach/hardware.h> |
41 | #include <mach/r8a7779.h> | 43 | #include <mach/r8a7779.h> |
42 | #include <mach/common.h> | 44 | #include <mach/common.h> |
@@ -178,12 +180,40 @@ static struct platform_device leds_device = { | |||
178 | }, | 180 | }, |
179 | }; | 181 | }; |
180 | 182 | ||
183 | static struct rcar_vin_platform_data vin_platform_data __initdata = { | ||
184 | .flags = RCAR_VIN_BT656, | ||
185 | }; | ||
186 | |||
187 | #define MARZEN_CAMERA(idx) \ | ||
188 | static struct i2c_board_info camera##idx##_info = { \ | ||
189 | I2C_BOARD_INFO("adv7180", 0x20 + (idx)), \ | ||
190 | }; \ | ||
191 | \ | ||
192 | static struct soc_camera_link iclink##idx##_adv7180 = { \ | ||
193 | .bus_id = 1 + 2 * (idx), \ | ||
194 | .i2c_adapter_id = 0, \ | ||
195 | .board_info = &camera##idx##_info, \ | ||
196 | }; \ | ||
197 | \ | ||
198 | static struct platform_device camera##idx##_device = { \ | ||
199 | .name = "soc-camera-pdrv", \ | ||
200 | .id = idx, \ | ||
201 | .dev = { \ | ||
202 | .platform_data = &iclink##idx##_adv7180, \ | ||
203 | }, \ | ||
204 | }; | ||
205 | |||
206 | MARZEN_CAMERA(0); | ||
207 | MARZEN_CAMERA(1); | ||
208 | |||
181 | static struct platform_device *marzen_devices[] __initdata = { | 209 | static struct platform_device *marzen_devices[] __initdata = { |
182 | ð_device, | 210 | ð_device, |
183 | &sdhi0_device, | 211 | &sdhi0_device, |
184 | &thermal_device, | 212 | &thermal_device, |
185 | &hspi_device, | 213 | &hspi_device, |
186 | &leds_device, | 214 | &leds_device, |
215 | &camera0_device, | ||
216 | &camera1_device, | ||
187 | }; | 217 | }; |
188 | 218 | ||
189 | static const struct pinctrl_map marzen_pinctrl_map[] = { | 219 | static const struct pinctrl_map marzen_pinctrl_map[] = { |
@@ -219,6 +249,16 @@ static const struct pinctrl_map marzen_pinctrl_map[] = { | |||
219 | /* USB2 */ | 249 | /* USB2 */ |
220 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.1", "pfc-r8a7779", | 250 | PIN_MAP_MUX_GROUP_DEFAULT("ehci-platform.1", "pfc-r8a7779", |
221 | "usb2", "usb2"), | 251 | "usb2", "usb2"), |
252 | /* VIN1 */ | ||
253 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.1", "pfc-r8a7779", | ||
254 | "vin1_clk", "vin1"), | ||
255 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.1", "pfc-r8a7779", | ||
256 | "vin1_data8", "vin1"), | ||
257 | /* VIN3 */ | ||
258 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.3", "pfc-r8a7779", | ||
259 | "vin3_clk", "vin3"), | ||
260 | PIN_MAP_MUX_GROUP_DEFAULT("r8a7779-vin.3", "pfc-r8a7779", | ||
261 | "vin3_data8", "vin3"), | ||
222 | }; | 262 | }; |
223 | 263 | ||
224 | static void __init marzen_init(void) | 264 | static void __init marzen_init(void) |
@@ -235,6 +275,8 @@ static void __init marzen_init(void) | |||
235 | 275 | ||
236 | r8a7779_add_standard_devices(); | 276 | r8a7779_add_standard_devices(); |
237 | r8a7779_add_usb_phy_device(&usb_phy_platform_data); | 277 | r8a7779_add_usb_phy_device(&usb_phy_platform_data); |
278 | r8a7779_add_vin_device(1, &vin_platform_data); | ||
279 | r8a7779_add_vin_device(3, &vin_platform_data); | ||
238 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); | 280 | platform_add_devices(marzen_devices, ARRAY_SIZE(marzen_devices)); |
239 | } | 281 | } |
240 | 282 | ||
diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c index a0e9eb72e46d..c4bf2d8fb111 100644 --- a/arch/arm/mach-shmobile/clock-r8a7778.c +++ b/arch/arm/mach-shmobile/clock-r8a7778.c | |||
@@ -106,6 +106,7 @@ enum { | |||
106 | MSTP331, | 106 | MSTP331, |
107 | MSTP323, MSTP322, MSTP321, | 107 | MSTP323, MSTP322, MSTP321, |
108 | MSTP114, | 108 | MSTP114, |
109 | MSTP110, MSTP109, | ||
109 | MSTP100, | 110 | MSTP100, |
110 | MSTP030, | 111 | MSTP030, |
111 | MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | 112 | MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, |
@@ -119,6 +120,8 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
119 | [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */ | 120 | [MSTP322] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 22, 0), /* SDHI1 */ |
120 | [MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */ | 121 | [MSTP321] = SH_CLK_MSTP32(&p_clk, MSTPCR3, 21, 0), /* SDHI2 */ |
121 | [MSTP114] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 14, 0), /* Ether */ | 122 | [MSTP114] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 14, 0), /* Ether */ |
123 | [MSTP110] = SH_CLK_MSTP32(&s_clk, MSTPCR1, 10, 0), /* VIN0 */ | ||
124 | [MSTP109] = SH_CLK_MSTP32(&s_clk, MSTPCR1, 9, 0), /* VIN1 */ | ||
122 | [MSTP100] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 0, 0), /* USB0/1 */ | 125 | [MSTP100] = SH_CLK_MSTP32(&p_clk, MSTPCR1, 0, 0), /* USB0/1 */ |
123 | [MSTP030] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 30, 0), /* I2C0 */ | 126 | [MSTP030] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 30, 0), /* I2C0 */ |
124 | [MSTP029] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 29, 0), /* I2C1 */ | 127 | [MSTP029] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 29, 0), /* I2C1 */ |
@@ -146,6 +149,8 @@ static struct clk_lookup lookups[] = { | |||
146 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ | 149 | CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP322]), /* SDHI1 */ |
147 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ | 150 | CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP321]), /* SDHI2 */ |
148 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ | 151 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ |
152 | CLKDEV_DEV_ID("r8a7778-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ | ||
153 | CLKDEV_DEV_ID("r8a7778-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ | ||
149 | CLKDEV_DEV_ID("ehci-platform", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ | 154 | CLKDEV_DEV_ID("ehci-platform", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ |
150 | CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ | 155 | CLKDEV_DEV_ID("ohci-platform", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */ |
151 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ | 156 | CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */ |
diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c index 10340f5becbb..bd6ad922eb7e 100644 --- a/arch/arm/mach-shmobile/clock-r8a7779.c +++ b/arch/arm/mach-shmobile/clock-r8a7779.c | |||
@@ -112,7 +112,9 @@ static struct clk *main_clks[] = { | |||
112 | }; | 112 | }; |
113 | 113 | ||
114 | enum { MSTP323, MSTP322, MSTP321, MSTP320, | 114 | enum { MSTP323, MSTP322, MSTP321, MSTP320, |
115 | MSTP120, | ||
115 | MSTP116, MSTP115, MSTP114, | 116 | MSTP116, MSTP115, MSTP114, |
117 | MSTP110, MSTP109, MSTP108, | ||
116 | MSTP103, MSTP101, MSTP100, | 118 | MSTP103, MSTP101, MSTP100, |
117 | MSTP030, | 119 | MSTP030, |
118 | MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, | 120 | MSTP029, MSTP028, MSTP027, MSTP026, MSTP025, MSTP024, MSTP023, MSTP022, MSTP021, |
@@ -125,9 +127,13 @@ static struct clk mstp_clks[MSTP_NR] = { | |||
125 | [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */ | 127 | [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */ |
126 | [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */ | 128 | [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */ |
127 | [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */ | 129 | [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */ |
130 | [MSTP120] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 20, 0), /* VIN3 */ | ||
128 | [MSTP116] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 16, 0), /* PCIe */ | 131 | [MSTP116] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 16, 0), /* PCIe */ |
129 | [MSTP115] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 15, 0), /* SATA */ | 132 | [MSTP115] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 15, 0), /* SATA */ |
130 | [MSTP114] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 14, 0), /* Ether */ | 133 | [MSTP114] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 14, 0), /* Ether */ |
134 | [MSTP110] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 10, 0), /* VIN0 */ | ||
135 | [MSTP109] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 9, 0), /* VIN1 */ | ||
136 | [MSTP108] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 8, 0), /* VIN2 */ | ||
131 | [MSTP103] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 3, 0), /* DU */ | 137 | [MSTP103] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 3, 0), /* DU */ |
132 | [MSTP101] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 1, 0), /* USB2 */ | 138 | [MSTP101] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 1, 0), /* USB2 */ |
133 | [MSTP100] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 0, 0), /* USB0/1 */ | 139 | [MSTP100] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 0, 0), /* USB0/1 */ |
@@ -162,10 +168,14 @@ static struct clk_lookup lookups[] = { | |||
162 | CLKDEV_CON_ID("peripheral_clk", &clkp_clk), | 168 | CLKDEV_CON_ID("peripheral_clk", &clkp_clk), |
163 | 169 | ||
164 | /* MSTP32 clocks */ | 170 | /* MSTP32 clocks */ |
171 | CLKDEV_DEV_ID("r8a7779-vin.3", &mstp_clks[MSTP120]), /* VIN3 */ | ||
165 | CLKDEV_DEV_ID("rcar-pcie", &mstp_clks[MSTP116]), /* PCIe */ | 172 | CLKDEV_DEV_ID("rcar-pcie", &mstp_clks[MSTP116]), /* PCIe */ |
166 | CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */ | 173 | CLKDEV_DEV_ID("sata_rcar", &mstp_clks[MSTP115]), /* SATA */ |
167 | CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */ | 174 | CLKDEV_DEV_ID("fc600000.sata", &mstp_clks[MSTP115]), /* SATA w/DT */ |
168 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ | 175 | CLKDEV_DEV_ID("r8a777x-ether", &mstp_clks[MSTP114]), /* Ether */ |
176 | CLKDEV_DEV_ID("r8a7779-vin.0", &mstp_clks[MSTP110]), /* VIN0 */ | ||
177 | CLKDEV_DEV_ID("r8a7779-vin.1", &mstp_clks[MSTP109]), /* VIN1 */ | ||
178 | CLKDEV_DEV_ID("r8a7779-vin.2", &mstp_clks[MSTP108]), /* VIN2 */ | ||
169 | CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */ | 179 | CLKDEV_DEV_ID("ehci-platform.1", &mstp_clks[MSTP101]), /* USB EHCI port2 */ |
170 | CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ | 180 | CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */ |
171 | CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ | 181 | CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */ |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/include/mach/r8a7778.h index 851d027a2f06..a7c6d151cdd5 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7778.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7778.h | |||
@@ -22,6 +22,7 @@ | |||
22 | #include <linux/mmc/sh_mobile_sdhi.h> | 22 | #include <linux/mmc/sh_mobile_sdhi.h> |
23 | #include <linux/sh_eth.h> | 23 | #include <linux/sh_eth.h> |
24 | #include <linux/platform_data/usb-rcar-phy.h> | 24 | #include <linux/platform_data/usb-rcar-phy.h> |
25 | #include <linux/platform_data/camera-rcar.h> | ||
25 | 26 | ||
26 | extern void r8a7778_add_standard_devices(void); | 27 | extern void r8a7778_add_standard_devices(void); |
27 | extern void r8a7778_add_standard_devices_dt(void); | 28 | extern void r8a7778_add_standard_devices_dt(void); |
@@ -30,6 +31,8 @@ extern void r8a7778_add_usb_phy_device(struct rcar_phy_platform_data *pdata); | |||
30 | extern void r8a7778_add_i2c_device(int id); | 31 | extern void r8a7778_add_i2c_device(int id); |
31 | extern void r8a7778_add_hspi_device(int id); | 32 | extern void r8a7778_add_hspi_device(int id); |
32 | extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info); | 33 | extern void r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info); |
34 | extern void r8a7778_add_vin_device(int id, | ||
35 | struct rcar_vin_platform_data *pdata); | ||
33 | 36 | ||
34 | extern void r8a7778_init_late(void); | 37 | extern void r8a7778_init_late(void); |
35 | extern void r8a7778_init_delay(void); | 38 | extern void r8a7778_init_delay(void); |
diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h index fc47073c7ba9..6d2b6417fe2a 100644 --- a/arch/arm/mach-shmobile/include/mach/r8a7779.h +++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/pm_domain.h> | 5 | #include <linux/pm_domain.h> |
6 | #include <linux/sh_eth.h> | 6 | #include <linux/sh_eth.h> |
7 | #include <linux/platform_data/usb-rcar-phy.h> | 7 | #include <linux/platform_data/usb-rcar-phy.h> |
8 | #include <linux/platform_data/camera-rcar.h> | ||
8 | 9 | ||
9 | struct platform_device; | 10 | struct platform_device; |
10 | 11 | ||
@@ -35,6 +36,8 @@ extern void r8a7779_add_standard_devices(void); | |||
35 | extern void r8a7779_add_standard_devices_dt(void); | 36 | extern void r8a7779_add_standard_devices_dt(void); |
36 | extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); | 37 | extern void r8a7779_add_ether_device(struct sh_eth_plat_data *pdata); |
37 | extern void r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata); | 38 | extern void r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata); |
39 | extern void r8a7779_add_vin_device(int idx, | ||
40 | struct rcar_vin_platform_data *pdata); | ||
38 | extern void r8a7779_init_late(void); | 41 | extern void r8a7779_init_late(void); |
39 | extern void r8a7779_clock_init(void); | 42 | extern void r8a7779_clock_init(void); |
40 | extern void r8a7779_pinmux_init(void); | 43 | extern void r8a7779_pinmux_init(void); |
diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c index 80c20392ad7c..0174f059eac3 100644 --- a/arch/arm/mach-shmobile/setup-r8a7778.c +++ b/arch/arm/mach-shmobile/setup-r8a7778.c | |||
@@ -333,6 +333,40 @@ void __init r8a7778_add_mmc_device(struct sh_mmcif_plat_data *info) | |||
333 | info, sizeof(*info)); | 333 | info, sizeof(*info)); |
334 | } | 334 | } |
335 | 335 | ||
336 | /* VIN */ | ||
337 | #define R8A7778_VIN(idx) \ | ||
338 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
339 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
340 | DEFINE_RES_IRQ(gic_iid(0x5a)), \ | ||
341 | }; \ | ||
342 | \ | ||
343 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
344 | .parent = &platform_bus, \ | ||
345 | .name = "r8a7778-vin", \ | ||
346 | .id = idx, \ | ||
347 | .res = vin##idx##_resources, \ | ||
348 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
349 | .dma_mask = DMA_BIT_MASK(32), \ | ||
350 | } | ||
351 | |||
352 | R8A7778_VIN(0); | ||
353 | R8A7778_VIN(1); | ||
354 | |||
355 | static struct platform_device_info *vin_info_table[] __initdata = { | ||
356 | &vin0_info, | ||
357 | &vin1_info, | ||
358 | }; | ||
359 | |||
360 | void __init r8a7778_add_vin_device(int id, struct rcar_vin_platform_data *pdata) | ||
361 | { | ||
362 | BUG_ON(id < 0 || id > 1); | ||
363 | |||
364 | vin_info_table[id]->data = pdata; | ||
365 | vin_info_table[id]->size_data = sizeof(*pdata); | ||
366 | |||
367 | platform_device_register_full(vin_info_table[id]); | ||
368 | } | ||
369 | |||
336 | void __init r8a7778_add_standard_devices(void) | 370 | void __init r8a7778_add_standard_devices(void) |
337 | { | 371 | { |
338 | int i; | 372 | int i; |
diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c index 398687761f50..3d8928895503 100644 --- a/arch/arm/mach-shmobile/setup-r8a7779.c +++ b/arch/arm/mach-shmobile/setup-r8a7779.c | |||
@@ -559,6 +559,33 @@ static struct resource ether_resources[] = { | |||
559 | }, | 559 | }, |
560 | }; | 560 | }; |
561 | 561 | ||
562 | #define R8A7779_VIN(idx) \ | ||
563 | static struct resource vin##idx##_resources[] __initdata = { \ | ||
564 | DEFINE_RES_MEM(0xffc50000 + 0x1000 * (idx), 0x1000), \ | ||
565 | DEFINE_RES_IRQ(gic_iid(0x5f + (idx))), \ | ||
566 | }; \ | ||
567 | \ | ||
568 | static struct platform_device_info vin##idx##_info __initdata = { \ | ||
569 | .parent = &platform_bus, \ | ||
570 | .name = "r8a7779-vin", \ | ||
571 | .id = idx, \ | ||
572 | .res = vin##idx##_resources, \ | ||
573 | .num_res = ARRAY_SIZE(vin##idx##_resources), \ | ||
574 | .dma_mask = DMA_BIT_MASK(32), \ | ||
575 | } | ||
576 | |||
577 | R8A7779_VIN(0); | ||
578 | R8A7779_VIN(1); | ||
579 | R8A7779_VIN(2); | ||
580 | R8A7779_VIN(3); | ||
581 | |||
582 | static struct platform_device_info *vin_info_table[] __initdata = { | ||
583 | &vin0_info, | ||
584 | &vin1_info, | ||
585 | &vin2_info, | ||
586 | &vin3_info, | ||
587 | }; | ||
588 | |||
562 | static struct platform_device *r8a7779_devices_dt[] __initdata = { | 589 | static struct platform_device *r8a7779_devices_dt[] __initdata = { |
563 | &scif0_device, | 590 | &scif0_device, |
564 | &scif1_device, | 591 | &scif1_device, |
@@ -610,6 +637,16 @@ void __init r8a7779_add_usb_phy_device(struct rcar_phy_platform_data *pdata) | |||
610 | pdata, sizeof(*pdata)); | 637 | pdata, sizeof(*pdata)); |
611 | } | 638 | } |
612 | 639 | ||
640 | void __init r8a7779_add_vin_device(int id, struct rcar_vin_platform_data *pdata) | ||
641 | { | ||
642 | BUG_ON(id < 0 || id > 3); | ||
643 | |||
644 | vin_info_table[id]->data = pdata; | ||
645 | vin_info_table[id]->size_data = sizeof(*pdata); | ||
646 | |||
647 | platform_device_register_full(vin_info_table[id]); | ||
648 | } | ||
649 | |||
613 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ | 650 | /* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */ |
614 | void __init __weak r8a7779_register_twd(void) { } | 651 | void __init __weak r8a7779_register_twd(void) { } |
615 | 652 | ||