Changeset 9759


Ignore:
Timestamp:
2007-12-14T22:49:03+01:00 (9 years ago)
Author:
blogic
Message:

made the danube pmu f00 generic

Location:
trunk/target/linux/danube/files
Files:
2 added
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/danube/files/arch/mips/danube/dma-core.c

    r9704 r9759  
    2323#include <asm/danube/danube_irq.h> 
    2424#include <asm/danube/danube_dma.h> 
     25#include <asm/danube/danube_pmu.h> 
    2526 
    2627/*25 descriptors for each dma channel,4096/8/20=25.xx*/ 
     
    685686 
    686687        // enable DMA from PMU 
    687         writel(readl(DANUBE_PMU_PWDCR) & ~DANUBE_PMU_PWDCR_DMA, DANUBE_PMU_PWDCR); 
     688        danube_pmu_enable(DANUBE_PMU_PWDCR_DMA); 
    688689 
    689690        // reset DMA 
  • trunk/target/linux/danube/files/arch/mips/danube/setup.c

    r9704 r9759  
    3333#include <asm/danube/danube.h> 
    3434#include <asm/danube/danube_irq.h> 
     35#include <asm/danube/danube_pmu.h> 
    3536 
    3637static unsigned int r4k_offset; /* Amount to increment compare reg each time */ 
     
    139140        write_c0_compare(r4k_cur); 
    140141 
    141         writel(readl(DANUBE_PMU_PWDCR) & ~(DANUBE_PMU_PWDCR_GPT|DANUBE_PMU_PWDCR_FPI), DANUBE_PMU_PWDCR); 
     142        danube_pmu_enable(DANUBE_PMU_PWDCR_GPT | DANUBE_PMU_PWDCR_FPI); 
    142143 
    143144        writel(0x100, DANUBE_GPTU_GPT_CLC); 
  • trunk/target/linux/danube/files/drivers/char/danube_led.c

    r9758 r9759  
    3030#include <asm/danube/danube.h> 
    3131#include <asm/danube/danube_gpio.h> 
    32 #include <asm/delay.h> 
     32#include <asm/danube/danube_pmu.h> 
    3333 
    3434#define DANUBE_LED_CLK_EDGE                             DANUBE_LED_FALLING 
     
    8686                danube_port_set_open_drain(DANUBE_LED_GPIO_PORT, i); 
    8787        } 
    88 } 
    89  
    90 static void 
    91 danube_led_enable (void) 
    92 { 
    93         int err = 1000000; 
    94  
    95         writel(readl(DANUBE_PMU_PWDCR) & ~DANUBE_PMU_PWDCR_LED, DANUBE_PMU_PWDCR); 
    96         while (--err && (readl(DANUBE_PMU_PWDSR) & DANUBE_PMU_PWDCR_LED)) {} 
    97  
    98         if (!err) 
    99                 panic("Activating LED in PMU failed!"); 
    100 } 
    101  
    102 static inline void 
    103 danube_led_disable (void) 
    104 { 
    105         writel(readl(DANUBE_PMU_PWDCR) | DANUBE_PMU_PWDCR_LED, DANUBE_PMU_PWDCR); 
    10688} 
    10789 
     
    188170 
    189171        /* per default, the leds are turned on */ 
    190         danube_led_enable(); 
     172        danube_pmu_enable(DANUBE_PMU_PWDCR_LED); 
    191173 
    192174        danube_led_major = register_chrdev(0, "danube_led", &danube_led_fops); 
  • trunk/target/linux/danube/files/drivers/net/danube_mii0.c

    r9704 r9759  
    4545#include <asm/danube/danube_mii0.h> 
    4646#include <asm/danube/danube_dma.h> 
     47#include <asm/danube/danube_pmu.h> 
    4748 
    4849static struct net_device danube_mii0_dev; 
     
    373374danube_sw_chip_init (int mode) 
    374375{ 
    375         writel(readl(DANUBE_PMU_PWDCR) & ~DANUBE_PMU_PWDCR_DMA, DANUBE_PMU_PWDCR); 
    376         writel(readl(DANUBE_PMU_PWDCR) & ~DANUBE_PMU_PWDCR_PPE, DANUBE_PMU_PWDCR); 
    377         wmb(); 
     376        danube_pmu_enable(DANUBE_PMU_PWDCR_DMA); 
     377        danube_pmu_enable(DANUBE_PMU_PWDCR_PPE); 
    378378 
    379379        if(mode == REV_MII_MODE) 
  • trunk/target/linux/danube/files/include/asm-mips/danube/danube.h

    r9757 r9759  
    164164#define DANUBE_PMU_PWDSR                ((u32*)(DANUBE_PMU_BASE_ADDR + 0x0020)) 
    165165 
    166 #define DANUBE_PMU_PWDCR_DMA    0x20 
    167 #define DANUBE_PMU_PWDCR_LED    0x800 
    168 #define DANUBE_PMU_PWDCR_GPT    0x1000 
    169 #define DANUBE_PMU_PWDCR_PPE    0x2000 
    170 #define DANUBE_PMU_PWDCR_FPI    0x4000 
    171  
    172166 
    173167/*------------ ICU */ 
Note: See TracChangeset for help on using the changeset viewer.