aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 13:09:16 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2009-12-16 13:09:16 -0500
commit6a5df38f5f07981dda5457ec6c05efe1c4200d84 (patch)
treed82c3862f7ba719d7723111140a0c89e6387cb19 /arch
parent9cfc86249f32d984339c6d1f8a1fd1326989b3b8 (diff)
parent262ab9ac0daadebcece8e3cbf3ae66ee8774cfd7 (diff)
Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (116 commits) V4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h V4L/DVB (13690): radio/si470x: #include <sched.h> V4L/DVB (13688): au8522: modify the attributes of local filter coefficients V4L/DVB (13687): cx231xx: use NULL when pointer is needed V4L/DVB: Davinci VPFE Capture: remove unused #include <linux/version.h> V4L/DVB (13685): Correct code taking the size of a pointer V4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h V4L/DVB (13683): sanio-ms: clean up init, exit and id_table V4L/DVB (13682): dib8000: make some constant static V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible V4L/DVB (13680b): DocBook/media: create links for included sources V4L/DVB (13680a): DocBook/media: copy images after building HTML V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices V4L/DVB (13676): configurable IRQ mode on NetUP Dual DVB-S2 CI; IRQ from CAM processing (CI interface works faster) V4L/DVB (13674): stv090x: Add DiSEqC envelope mode V4L/DVB (13673): lnbp21: Implement 22 kHz tone control V4L/DVB (13671): sh_mobile_ceu_camera: Remove frame size page alignment V4L/DVB (13670): soc-camera: Add mt9t112 camera driver V4L/DVB (13669): tw9910: Add sync polarity support V4L/DVB (13668): tw9910: remove cropping ...
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/boards/mach-ap325rxa/setup.c41
-rw-r--r--arch/sh/boards/mach-kfr2r09/setup.c13
-rw-r--r--arch/sh/boards/mach-migor/setup.c32
3 files changed, 52 insertions, 34 deletions
diff --git a/arch/sh/boards/mach-ap325rxa/setup.c b/arch/sh/boards/mach-ap325rxa/setup.c
index cf9dc12dfeb1..7a9f69663f1a 100644
--- a/arch/sh/boards/mach-ap325rxa/setup.c
+++ b/arch/sh/boards/mach-ap325rxa/setup.c
@@ -316,20 +316,23 @@ static struct soc_camera_platform_info camera_info = {
316 .format_name = "UYVY", 316 .format_name = "UYVY",
317 .format_depth = 16, 317 .format_depth = 16,
318 .format = { 318 .format = {
319 .pixelformat = V4L2_PIX_FMT_UYVY, 319 .code = V4L2_MBUS_FMT_YUYV8_2X8_BE,
320 .colorspace = V4L2_COLORSPACE_SMPTE170M, 320 .colorspace = V4L2_COLORSPACE_SMPTE170M,
321 .field = V4L2_FIELD_NONE,
321 .width = 640, 322 .width = 640,
322 .height = 480, 323 .height = 480,
323 }, 324 },
324 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH | 325 .bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
325 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8, 326 SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
326 .set_capture = camera_set_capture, 327 .set_capture = camera_set_capture,
327 .link = { 328};
328 .bus_id = 0, 329
329 .add_device = ap325rxa_camera_add, 330struct soc_camera_link camera_link = {
330 .del_device = ap325rxa_camera_del, 331 .bus_id = 0,
331 .module_name = "soc_camera_platform", 332 .add_device = ap325rxa_camera_add,
332 }, 333 .del_device = ap325rxa_camera_del,
334 .module_name = "soc_camera_platform",
335 .priv = &camera_info,
333}; 336};
334 337
335static void dummy_release(struct device *dev) 338static void dummy_release(struct device *dev)
@@ -347,7 +350,7 @@ static struct platform_device camera_device = {
347static int ap325rxa_camera_add(struct soc_camera_link *icl, 350static int ap325rxa_camera_add(struct soc_camera_link *icl,
348 struct device *dev) 351 struct device *dev)
349{ 352{
350 if (icl != &camera_info.link || camera_probe() <= 0) 353 if (icl != &camera_link || camera_probe() <= 0)
351 return -ENODEV; 354 return -ENODEV;
352 355
353 camera_info.dev = dev; 356 camera_info.dev = dev;
@@ -357,7 +360,7 @@ static int ap325rxa_camera_add(struct soc_camera_link *icl,
357 360
358static void ap325rxa_camera_del(struct soc_camera_link *icl) 361static void ap325rxa_camera_del(struct soc_camera_link *icl)
359{ 362{
360 if (icl != &camera_info.link) 363 if (icl != &camera_link)
361 return; 364 return;
362 365
363 platform_device_unregister(&camera_device); 366 platform_device_unregister(&camera_device);
@@ -470,13 +473,15 @@ static struct ov772x_camera_info ov7725_info = {
470 .buswidth = SOCAM_DATAWIDTH_8, 473 .buswidth = SOCAM_DATAWIDTH_8,
471 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP, 474 .flags = OV772X_FLAG_VFLIP | OV772X_FLAG_HFLIP,
472 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0), 475 .edgectrl = OV772X_AUTO_EDGECTRL(0xf, 0),
473 .link = { 476};
474 .bus_id = 0, 477
475 .power = ov7725_power, 478static struct soc_camera_link ov7725_link = {
476 .board_info = &ap325rxa_i2c_camera[0], 479 .bus_id = 0,
477 .i2c_adapter_id = 0, 480 .power = ov7725_power,
478 .module_name = "ov772x", 481 .board_info = &ap325rxa_i2c_camera[0],
479 }, 482 .i2c_adapter_id = 0,
483 .module_name = "ov772x",
484 .priv = &ov7725_info,
480}; 485};
481 486
482static struct platform_device ap325rxa_camera[] = { 487static struct platform_device ap325rxa_camera[] = {
@@ -484,13 +489,13 @@ static struct platform_device ap325rxa_camera[] = {
484 .name = "soc-camera-pdrv", 489 .name = "soc-camera-pdrv",
485 .id = 0, 490 .id = 0,
486 .dev = { 491 .dev = {
487 .platform_data = &ov7725_info.link, 492 .platform_data = &ov7725_link,
488 }, 493 },
489 }, { 494 }, {
490 .name = "soc-camera-pdrv", 495 .name = "soc-camera-pdrv",
491 .id = 1, 496 .id = 1,
492 .dev = { 497 .dev = {
493 .platform_data = &camera_info.link, 498 .platform_data = &camera_link,
494 }, 499 },
495 }, 500 },
496}; 501};
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
256static struct clk *camera_clk; 257static 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
259static int camera_power(struct device *dev, int mode) 263static 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
324static struct rj54n1_pdata rj54n1_priv = {
325 .mclk_freq = CEU_MCLK_FREQ,
326 .ioctl_high = false,
327};
328
321static struct soc_camera_link rj54n1_link = { 329static 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
328static struct platform_device kfr2r09_camera = { 337static struct platform_device kfr2r09_camera = {
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 9099b6da9957..507c77be476d 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -432,23 +432,27 @@ static struct i2c_board_info migor_i2c_camera[] = {
432 432
433static struct ov772x_camera_info ov7725_info = { 433static struct ov772x_camera_info ov7725_info = {
434 .buswidth = SOCAM_DATAWIDTH_8, 434 .buswidth = SOCAM_DATAWIDTH_8,
435 .link = { 435};
436 .power = ov7725_power, 436
437 .board_info = &migor_i2c_camera[0], 437static struct soc_camera_link ov7725_link = {
438 .i2c_adapter_id = 0, 438 .power = ov7725_power,
439 .module_name = "ov772x", 439 .board_info = &migor_i2c_camera[0],
440 }, 440 .i2c_adapter_id = 0,
441 .module_name = "ov772x",
442 .priv = &ov7725_info,
441}; 443};
442 444
443static struct tw9910_video_info tw9910_info = { 445static struct tw9910_video_info tw9910_info = {
444 .buswidth = SOCAM_DATAWIDTH_8, 446 .buswidth = SOCAM_DATAWIDTH_8,
445 .mpout = TW9910_MPO_FIELD, 447 .mpout = TW9910_MPO_FIELD,
446 .link = { 448};
447 .power = tw9910_power, 449
448 .board_info = &migor_i2c_camera[1], 450static struct soc_camera_link tw9910_link = {
449 .i2c_adapter_id = 0, 451 .power = tw9910_power,
450 .module_name = "tw9910", 452 .board_info = &migor_i2c_camera[1],
451 } 453 .i2c_adapter_id = 0,
454 .module_name = "tw9910",
455 .priv = &tw9910_info,
452}; 456};
453 457
454static struct platform_device migor_camera[] = { 458static struct platform_device migor_camera[] = {
@@ -456,13 +460,13 @@ static struct platform_device migor_camera[] = {
456 .name = "soc-camera-pdrv", 460 .name = "soc-camera-pdrv",
457 .id = 0, 461 .id = 0,
458 .dev = { 462 .dev = {
459 .platform_data = &ov7725_info.link, 463 .platform_data = &ov7725_link,
460 }, 464 },
461 }, { 465 }, {
462 .name = "soc-camera-pdrv", 466 .name = "soc-camera-pdrv",
463 .id = 1, 467 .id = 1,
464 .dev = { 468 .dev = {
465 .platform_data = &tw9910_info.link, 469 .platform_data = &tw9910_link,
466 }, 470 },
467 }, 471 },
468}; 472};