]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/arm/mach-davinci/devices-tnetv107x.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / arm / mach-davinci / devices-tnetv107x.c
index c9a86d8130d151795433d7833b2fb85911a2bec5..85503debda51084090010b57f212b28b8e5b397c 100644 (file)
@@ -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);