aboutsummaryrefslogtreecommitdiff
path: root/arch/sh/boards/mach-migor/setup.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 10:20:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 10:20:15 -0700
commit36ec891895020f3bc9953c8b11d079c6d77d76bd (patch)
tree89961ee93d8bf5f4e924c2e02790ddd52d61da5c /arch/sh/boards/mach-migor/setup.c
parent70740d6c93030b339b4ad17fd58ee135dfc13913 (diff)
parente4b41dbd60e30463cc8fab21ed45b7d6227fc338 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (23 commits) sh: asm/gpio.h needs linux/kernel.h for might_sleep()/WARN_ON(). sh: mach-highlander: Handle SCIF pinmuxing on R7785RP. sh: sh7785 pinmux support sh: update defconfigs. sh: Kill off unused p1fc divisors from SH7763 clk fwk. sh: improve pinmux support for single direction pins sh: use 10MHz VIO_CLK for ov772x on Migo-R sh: Update gpio_set_value() pin value handling sh: update ov772x byte order on Migo-R rtc: Add R2025S/D comment to rs5c372 Kconfig entry. sh: Export cache flush routines needed by sh_eth on SH7619. sh: Wire up oops reporting in the die notifier chain. sh: ap325rxa: Kill off unused port definitions. sh: Hook up PB0->PB7 input-only pins in SH7203 PFC. sh: ap325rxa: Move off of hardcoded pinmux for flctl initialization. sh: add support FLCTL for ap325rxa board sh: gpio: Stub in dummy GPIO<->IRQ mapping routines. sh: rsk7203: leds-gpio support for RSK+ LEDs. sh: gpio: Include asm-generic/gpio.h for non-gpiolib stubs. sh: fix soc-camera compile breakage on Migo-R. ...
Diffstat (limited to 'arch/sh/boards/mach-migor/setup.c')
-rw-r--r--arch/sh/boards/mach-migor/setup.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/sh/boards/mach-migor/setup.c b/arch/sh/boards/mach-migor/setup.c
index 769d6304342..97528198029 100644
--- a/arch/sh/boards/mach-migor/setup.c
+++ b/arch/sh/boards/mach-migor/setup.c
@@ -288,8 +288,11 @@ static struct clk *camera_clk;
static void camera_power_on(void)
{
+ /* Use 10 MHz VIO_CKO instead of 24 MHz to work
+ * around signal quality issues on Panel Board V2.1.
+ */
camera_clk = clk_get(NULL, "video_clk");
- clk_set_rate(camera_clk, 24000000);
+ clk_set_rate(camera_clk, 10000000);
clk_enable(camera_clk); /* start VIO_CKO */
/* use VIO_RST to take camera out of reset */
@@ -307,10 +310,18 @@ static void camera_power_off(void)
gpio_set_value(GPIO_PTT3, 0);
}
+static void camera_power(int mode)
+{
+ if (mode)
+ camera_power_on();
+ else
+ camera_power_off();
+}
+
#ifdef CONFIG_I2C
static unsigned char camera_ov772x_magic[] =
{
- 0x09, 0x01, 0x0c, 0x10, 0x0d, 0x41, 0x0e, 0x01,
+ 0x09, 0x01, 0x0c, 0x20, 0x0d, 0x41, 0x0e, 0x01,
0x12, 0x00, 0x13, 0x8F, 0x14, 0x4A, 0x15, 0x00,
0x16, 0x00, 0x17, 0x23, 0x18, 0xa0, 0x19, 0x07,
0x1a, 0xf0, 0x1b, 0x40, 0x1f, 0x00, 0x20, 0x10,
@@ -386,6 +397,7 @@ static struct soc_camera_platform_info ov772x_info = {
},
.bus_param = SOCAM_PCLK_SAMPLE_RISING | SOCAM_HSYNC_ACTIVE_HIGH |
SOCAM_VSYNC_ACTIVE_HIGH | SOCAM_MASTER | SOCAM_DATAWIDTH_8,
+ .power = camera_power,
.set_capture = ov772x_set_capture,
};
@@ -400,8 +412,6 @@ static struct platform_device migor_camera_device = {
static struct sh_mobile_ceu_info sh_mobile_ceu_info = {
.flags = SOCAM_MASTER | SOCAM_DATAWIDTH_8 | SOCAM_PCLK_SAMPLE_RISING \
| SOCAM_HSYNC_ACTIVE_HIGH | SOCAM_VSYNC_ACTIVE_HIGH,
- .enable_camera = camera_power_on,
- .disable_camera = camera_power_off,
};
static struct resource migor_ceu_resources[] = {