Changeset 8969


Ignore:
Timestamp:
2007-09-23T02:32:31+02:00 (10 years ago)
Author:
blogic
Message:

added option to atheros kernel to be able to disable reset button from inside the fon mp3 driver

Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/fonera-mp3-drv/src/mp3_drv.c

    r8753 r8969  
    3232#include <linux/genhd.h> 
    3333#include <linux/device.h>  
     34#include <asm-mips/mach-atheros/reset.h> 
    3435 
    3536// do we want debuging info ? 
     
    283284        printk("mp3_drv.ko : Starting ...\n"); 
    284285         
     286        printk("disabling atheros reset button irq\n"); 
     287 
     288        ar531x_disable_reset_button(); 
     289 
    285290        if(register_chrdev(DEV_MAJOR, DEV_NAME, &modulemp3_fops)) { 
    286291                printk( "mp3_drv.ko : Error whilst opening %s (%d)\n", DEV_NAME, DEV_MAJOR); 
  • trunk/target/linux/atheros/files/arch/mips/atheros/reset.c

    r7869 r8969  
    1111#include "ar5315/ar5315.h" 
    1212 
     13#define AR531X_RESET_GPIO_IRQ   (AR531X_GPIO_IRQ_BASE + bcfg->resetConfigGpio) 
     14 
    1315struct event_t { 
    1416        struct work_struct wq; 
     
    1618        long int jiffies; 
    1719}; 
     20 
     21static struct ar531x_boarddata *bcfg; 
    1822 
    1923extern struct sock *uevent_sock; 
     
    9599} 
    96100 
     101void ar531x_disable_reset_button(void) 
     102{ 
     103        disable_irq(AR531X_RESET_GPIO_IRQ);      
     104} 
     105 
     106EXPORT_SYMBOL(ar531x_disable_reset_button); 
     107 
    97108int __init ar531x_init_reset(void) 
    98109{ 
    99         struct ar531x_boarddata *bcfg; 
    100110        bcfg = (struct ar531x_boarddata *) board_config; 
    101111 
    102112        seen = jiffies; 
    103         request_irq(AR531X_GPIO_IRQ_BASE + bcfg->resetConfigGpio, &button_handler, IRQF_SAMPLE_RANDOM, "ar531x_reset", NULL); 
     113         
     114        request_irq(AR531X_RESET_GPIO_IRQ, &button_handler, IRQF_SAMPLE_RANDOM, "ar531x_reset", NULL); 
    104115 
    105116        return 0; 
    106117} 
    107118 
     119 
     120 
    108121module_init(ar531x_init_reset); 
Note: See TracChangeset for help on using the changeset viewer.