Changeset 8423


Ignore:
Timestamp:
2007-08-18T17:40:31+02:00 (9 years ago)
Author:
nico
Message:

fix vlynq initialization (closes: #2135)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar7-2.6/files/arch/mips/ar7/vlynq.c

    r8188 r8423  
    300300        dev->local->control = 0; 
    301301        dev->remote->control = 0; 
     302        dev->local->control = VLYNQ_CTRL_CLOCK_INT; 
    302303 
    303304        div = ar7_dsp_freq() / 62500000; 
    304         if(ar7_dsp_freq() / div != 62500000) 
    305         { 
    306                 printk(KERN_WARNING 
    307                         "VLYNQ: Adjusted requested frequency %d to %d\n", 
    308                         62500000, ar7_dsp_freq() / div); 
    309         } 
     305        if (div != 0 ) { 
     306                if (ar7_dsp_freq() / div != 62500000) { 
     307                        printk(KERN_WARNING 
     308                                "VLYNQ: Adjusted requested frequency %d to %d\n", 
     309                                62500000, ar7_dsp_freq() / div); 
     310                } 
    310311     
    311         printk("VLYNQ: Setting clock to %d (clock divider %u)\n", ar7_dsp_freq() / div, div); 
    312                 dev->local->control = VLYNQ_CTRL_CLOCK_DIV((div - 1)) | 
    313                 VLYNQ_CTRL_CLOCK_INT; 
    314 /* 
    315         dev->local->control = VLYNQ_CTRL_CLOCK_INT; 
    316 */ 
     312                printk("VLYNQ: Setting clock to %d (clock divider %u)\n",  
     313                        ar7_dsp_freq() / div, div); 
     314                dev->local->control |= VLYNQ_CTRL_CLOCK_DIV((div - 1)); 
     315        } 
    317316        if (vlynq_linked(dev))  
    318317                return vlynq_setup_irq(dev); 
Note: See TracChangeset for help on using the changeset viewer.