diff options
author | Nicolas Thill <nico@openwrt.org> | 2007-08-18 15:40:31 +0000 |
---|---|---|
committer | Nicolas Thill <nico@openwrt.org> | 2007-08-18 15:40:31 +0000 |
commit | fbb67dca399e789c82a25c5844f6ea6db587ea24 (patch) | |
tree | 75f6fafee99fbfae46e5956de6fb470695868b4c /target/linux/ar7-2.6/files | |
parent | 27bde6dab9da477e00dc845c9132b2b8c41088bf (diff) | |
download | upstream-fbb67dca399e789c82a25c5844f6ea6db587ea24.tar.gz upstream-fbb67dca399e789c82a25c5844f6ea6db587ea24.tar.bz2 upstream-fbb67dca399e789c82a25c5844f6ea6db587ea24.zip |
fix vlynq initialization (closes: #2135)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@8423 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar7-2.6/files')
-rw-r--r-- | target/linux/ar7-2.6/files/arch/mips/ar7/vlynq.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/target/linux/ar7-2.6/files/arch/mips/ar7/vlynq.c b/target/linux/ar7-2.6/files/arch/mips/ar7/vlynq.c index 5856ece1d4..c9be214721 100644 --- a/target/linux/ar7-2.6/files/arch/mips/ar7/vlynq.c +++ b/target/linux/ar7-2.6/files/arch/mips/ar7/vlynq.c @@ -299,21 +299,20 @@ int vlynq_device_enable(struct vlynq_device *dev) dev->local->control = 0; dev->remote->control = 0; + dev->local->control = VLYNQ_CTRL_CLOCK_INT; div = ar7_dsp_freq() / 62500000; - if(ar7_dsp_freq() / div != 62500000) - { - printk(KERN_WARNING - "VLYNQ: Adjusted requested frequency %d to %d\n", - 62500000, ar7_dsp_freq() / div); - } + if (div != 0 ) { + if (ar7_dsp_freq() / div != 62500000) { + printk(KERN_WARNING + "VLYNQ: Adjusted requested frequency %d to %d\n", + 62500000, ar7_dsp_freq() / div); + } - printk("VLYNQ: Setting clock to %d (clock divider %u)\n", ar7_dsp_freq() / div, div); - dev->local->control = VLYNQ_CTRL_CLOCK_DIV((div - 1)) | - VLYNQ_CTRL_CLOCK_INT; -/* - dev->local->control = VLYNQ_CTRL_CLOCK_INT; -*/ + printk("VLYNQ: Setting clock to %d (clock divider %u)\n", + ar7_dsp_freq() / div, div); + dev->local->control |= VLYNQ_CTRL_CLOCK_DIV((div - 1)); + } if (vlynq_linked(dev)) return vlynq_setup_irq(dev); |