1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-11-27 20:04:05 +02:00

vlynq: probe for an external clock first, needed to enable acx on the Leonardo board

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@10707 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
matteo 2008-04-02 11:06:50 +00:00
parent 4e758fef01
commit 1927554d27

View File

@ -369,6 +369,14 @@ static int __vlynq_enable_device(struct vlynq_device *dev)
if (result)
return result;
vlynq_reg_write(dev->local->control, 0);
vlynq_reg_write(dev->remote->control, 0);
if (vlynq_linked(dev)) {
printk(KERN_DEBUG "%s: using external clock\n",
dev->dev.bus_id);
return 0;
}
switch (dev->divisor) {
case vlynq_div_auto:
/* Only try locally supplied clock, others cause problems */
@ -413,15 +421,6 @@ static int __vlynq_enable_device(struct vlynq_device *dev)
return 0;
}
break;
case vlynq_div_external:
vlynq_reg_write(dev->local->control, 0);
vlynq_reg_write(dev->remote->control, 0);
if (vlynq_linked(dev)) {
printk(KERN_DEBUG "%s: using external clock\n",
dev->dev.bus_id);
return 0;
}
break;
}
ops->off(dev);