diff options
Diffstat (limited to 'arch/sh/boards')
-rw-r--r-- | arch/sh/boards/mach-kfr2r09/setup.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/arch/sh/boards/mach-kfr2r09/setup.c b/arch/sh/boards/mach-kfr2r09/setup.c index 87438d6603d6..9038d768a525 100644 --- a/arch/sh/boards/mach-kfr2r09/setup.c +++ b/arch/sh/boards/mach-kfr2r09/setup.c | |||
@@ -19,6 +19,7 @@ | |||
19 | #include <linux/input/sh_keysc.h> | 19 | #include <linux/input/sh_keysc.h> |
20 | #include <linux/i2c.h> | 20 | #include <linux/i2c.h> |
21 | #include <linux/usb/r8a66597.h> | 21 | #include <linux/usb/r8a66597.h> |
22 | #include <media/rj54n1cb0c.h> | ||
22 | #include <media/soc_camera.h> | 23 | #include <media/soc_camera.h> |
23 | #include <media/sh_mobile_ceu.h> | 24 | #include <media/sh_mobile_ceu.h> |
24 | #include <video/sh_mobile_lcdc.h> | 25 | #include <video/sh_mobile_lcdc.h> |
@@ -255,6 +256,9 @@ static struct i2c_board_info kfr2r09_i2c_camera = { | |||
255 | 256 | ||
256 | static struct clk *camera_clk; | 257 | static struct clk *camera_clk; |
257 | 258 | ||
259 | /* set VIO_CKO clock to 25MHz */ | ||
260 | #define CEU_MCLK_FREQ 25000000 | ||
261 | |||
258 | #define DRVCRB 0xA405018C | 262 | #define DRVCRB 0xA405018C |
259 | static int camera_power(struct device *dev, int mode) | 263 | static int camera_power(struct device *dev, int mode) |
260 | { | 264 | { |
@@ -267,8 +271,7 @@ static int camera_power(struct device *dev, int mode) | |||
267 | if (IS_ERR(camera_clk)) | 271 | if (IS_ERR(camera_clk)) |
268 | return PTR_ERR(camera_clk); | 272 | return PTR_ERR(camera_clk); |
269 | 273 | ||
270 | /* set VIO_CKO clock to 25MHz */ | 274 | rate = clk_round_rate(camera_clk, CEU_MCLK_FREQ); |
271 | rate = clk_round_rate(camera_clk, 25000000); | ||
272 | ret = clk_set_rate(camera_clk, rate); | 275 | ret = clk_set_rate(camera_clk, rate); |
273 | if (ret < 0) | 276 | if (ret < 0) |
274 | goto eclkrate; | 277 | goto eclkrate; |
@@ -318,11 +321,17 @@ eclkrate: | |||
318 | return ret; | 321 | return ret; |
319 | } | 322 | } |
320 | 323 | ||
324 | static struct rj54n1_pdata rj54n1_priv = { | ||
325 | .mclk_freq = CEU_MCLK_FREQ, | ||
326 | .ioctl_high = false, | ||
327 | }; | ||
328 | |||
321 | static struct soc_camera_link rj54n1_link = { | 329 | static struct soc_camera_link rj54n1_link = { |
322 | .power = camera_power, | 330 | .power = camera_power, |
323 | .board_info = &kfr2r09_i2c_camera, | 331 | .board_info = &kfr2r09_i2c_camera, |
324 | .i2c_adapter_id = 1, | 332 | .i2c_adapter_id = 1, |
325 | .module_name = "rj54n1cb0c", | 333 | .module_name = "rj54n1cb0c", |
334 | .priv = &rj54n1_priv, | ||
326 | }; | 335 | }; |
327 | 336 | ||
328 | static struct platform_device kfr2r09_camera = { | 337 | static struct platform_device kfr2r09_camera = { |