Skip to content

Commit

Permalink
[media] board-dm646x-evm.c: wrong register used in setup_vpif_input_c…
Browse files Browse the repository at this point in the history
…hannel_mode

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: Hans Verkuil <hans.verkuil@cisco.com>
Acked-by: Manjunath Hadli <manjunath.hadli@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Nov 24, 2011
1 parent e50f20e commit 37e2214
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions arch/arm/mach-davinci/board-dm646x-evm.c
Original file line number Diff line number Diff line change
Expand Up @@ -564,23 +564,23 @@ static int setup_vpif_input_channel_mode(int mux_mode)
int val;
u32 value;

if (!vpif_vsclkdis_reg || !cpld_client)
if (!vpif_vidclkctl_reg || !cpld_client)
return -ENXIO;

val = i2c_smbus_read_byte(cpld_client);
if (val < 0)
return val;

spin_lock_irqsave(&vpif_reg_lock, flags);
value = __raw_readl(vpif_vsclkdis_reg);
value = __raw_readl(vpif_vidclkctl_reg);
if (mux_mode) {
val &= VPIF_INPUT_TWO_CHANNEL;
value |= VIDCH1CLK;
} else {
val |= VPIF_INPUT_ONE_CHANNEL;
value &= ~VIDCH1CLK;
}
__raw_writel(value, vpif_vsclkdis_reg);
__raw_writel(value, vpif_vidclkctl_reg);
spin_unlock_irqrestore(&vpif_reg_lock, flags);

err = i2c_smbus_write_byte(cpld_client, val);
Expand Down

0 comments on commit 37e2214

Please sign in to comment.