aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux
diff options
context:
space:
mode:
authorMatteo Croce <matteo@openwrt.org>2008-04-02 11:06:50 +0000
committerMatteo Croce <matteo@openwrt.org>2008-04-02 11:06:50 +0000
commitce2fa33305ea2f717e513cb7b8c0741e7935887b (patch)
treeaeae792fb24a50835c470253a9b417a1e063a330 /target/linux
parent25e156e1cf43da5cc23027c5620a46008bca6de3 (diff)
downloadupstream-ce2fa33305ea2f717e513cb7b8c0741e7935887b.tar.gz
upstream-ce2fa33305ea2f717e513cb7b8c0741e7935887b.tar.bz2
upstream-ce2fa33305ea2f717e513cb7b8c0741e7935887b.zip
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
Diffstat (limited to 'target/linux')
-rw-r--r--target/linux/ar7/files/drivers/vlynq/vlynq.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/target/linux/ar7/files/drivers/vlynq/vlynq.c b/target/linux/ar7/files/drivers/vlynq/vlynq.c
index 374562c6cd..c2ac536ba1 100644
--- a/target/linux/ar7/files/drivers/vlynq/vlynq.c
+++ b/target/linux/ar7/files/drivers/vlynq/vlynq.c
@@ -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);