From ced98628bf6ca7705b2d06df9c71a80cd1cd49bb Mon Sep 17 00:00:00 2001 From: Cyril Chemparathy Date: Wed, 20 Oct 2010 17:49:57 -0400 Subject: davinci: minor tnetv107x clock tree fixes This patch applies the following modifications to the tnetv107x clock tree: - reparent tnetv107x usb clocks to usbss - mark timer1 as always enabled - enable set_rate on pll divider output clocks - adjust tnetv107x tsc sysclk rate lower to fix invalid reset defaults Signed-off-by: Cyril Chemparathy Signed-off-by: Kevin Hilman --- arch/arm/mach-davinci/devices-tnetv107x.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-davinci/devices-tnetv107x.c') diff --git a/arch/arm/mach-davinci/devices-tnetv107x.c b/arch/arm/mach-davinci/devices-tnetv107x.c index c9a86d8130d1..85503debda51 100644 --- a/arch/arm/mach-davinci/devices-tnetv107x.c +++ b/arch/arm/mach-davinci/devices-tnetv107x.c @@ -344,7 +344,20 @@ static struct platform_device tsc_device = { void __init tnetv107x_devices_init(struct tnetv107x_device_info *info) { - int i; + int i, error; + struct clk *tsc_clk; + + /* + * The reset defaults for tnetv107x tsc clock divider is set too high. + * This forces the clock down to a range that allows the ADC to + * complete sample conversion in time. + */ + tsc_clk = clk_get(NULL, "sys_tsc_clk"); + if (tsc_clk) { + error = clk_set_rate(tsc_clk, 5000000); + WARN_ON(error < 0); + clk_put(tsc_clk); + } platform_device_register(&edma_device); platform_device_register(&tnetv107x_wdt_device); -- cgit v1.2.1