Changeset 13556


Ignore:
Timestamp:
2008-12-09T02:53:02+01:00 (8 years ago)
Author:
nbd
Message:

atheros: fix reboot on ar2315 devices which do not implement the atheros reference design workaround for the buggy reset logic (e.g. some senao stuff)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/atheros/files/arch/mips/atheros/ar5315/board.c

    r12881 r13556  
    2222#include <linux/kernel.h> 
    2323#include <linux/reboot.h> 
     24#include <linux/delay.h> 
    2425#include <asm/bootinfo.h> 
    2526#include <asm/reboot.h> 
     
    280281static void ar5315_restart(char *command) 
    281282{ 
    282         for(;;) { 
    283                 /* reset the system */ 
    284                 sysRegWrite(AR5315_COLD_RESET,AR5317_RESET_SYSTEM); 
    285  
    286                 /* 
    287                  * Cold reset does not work on the AR2315/6, use the GPIO reset bits a workaround. 
    288                  */ 
    289                 gpio_direction_output(AR5315_RESET_GPIO, 0); 
    290         } 
     283        void (*mips_reset_vec)(void) = (void *) 0xbfc00000; 
     284 
     285        /* reset the system */ 
     286        sysRegWrite(AR5315_COLD_RESET,AR5317_RESET_SYSTEM); 
     287 
     288        /* Cold reset does not work on the AR2315/6, use the GPIO reset bits a workaround. 
     289         * give it some time to attempt a gpio based hardware reset 
     290         * (atheros reference design workaround) */ 
     291        gpio_direction_output(AR5315_RESET_GPIO, 0); 
     292        mdelay(100); 
     293 
     294        /* Some boards (e.g. Senao EOC-2610) don't implement the reset logic 
     295         * workaround. Attempt to jump to the mips reset location - 
     296         * the boot loader itself might be able to recover the system */ 
     297        mips_reset_vec(); 
    291298} 
    292299 
Note: See TracChangeset for help on using the changeset viewer.