Commit 464986c2 authored by Hans Verkuil's avatar Hans Verkuil Committed by Greg Kroah-Hartman

ARM: davinci: dm646x evm: wrong register used in setup_vpif_input_channel_mode

commit 83713fc9 upstream.

The function setup_vpif_input_channel_mode() used the VSCLKDIS register
instead of VIDCLKCTL. This meant that when in HD mode videoport channel 0
used a different clock from channel 1.

Clearly a copy-and-paste error.
Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Acked-by: default avatarManjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: default avatarSekhar Nori <nsekhar@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 950f10d7
...@@ -563,7 +563,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) ...@@ -563,7 +563,7 @@ static int setup_vpif_input_channel_mode(int mux_mode)
int val; int val;
u32 value; u32 value;
if (!vpif_vsclkdis_reg || !cpld_client) if (!vpif_vidclkctl_reg || !cpld_client)
return -ENXIO; return -ENXIO;
val = i2c_smbus_read_byte(cpld_client); val = i2c_smbus_read_byte(cpld_client);
...@@ -571,7 +571,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) ...@@ -571,7 +571,7 @@ static int setup_vpif_input_channel_mode(int mux_mode)
return val; return val;
spin_lock_irqsave(&vpif_reg_lock, flags); spin_lock_irqsave(&vpif_reg_lock, flags);
value = __raw_readl(vpif_vsclkdis_reg); value = __raw_readl(vpif_vidclkctl_reg);
if (mux_mode) { if (mux_mode) {
val &= VPIF_INPUT_TWO_CHANNEL; val &= VPIF_INPUT_TWO_CHANNEL;
value |= VIDCH1CLK; value |= VIDCH1CLK;
...@@ -579,7 +579,7 @@ static int setup_vpif_input_channel_mode(int mux_mode) ...@@ -579,7 +579,7 @@ static int setup_vpif_input_channel_mode(int mux_mode)
val |= VPIF_INPUT_ONE_CHANNEL; val |= VPIF_INPUT_ONE_CHANNEL;
value &= ~VIDCH1CLK; value &= ~VIDCH1CLK;
} }
__raw_writel(value, vpif_vsclkdis_reg); __raw_writel(value, vpif_vidclkctl_reg);
spin_unlock_irqrestore(&vpif_reg_lock, flags); spin_unlock_irqrestore(&vpif_reg_lock, flags);
err = i2c_smbus_write_byte(cpld_client, val); err = i2c_smbus_write_byte(cpld_client, val);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment