Changeset 20282


Ignore:
Timestamp:
2010-03-18T20:18:58+01:00 (8 years ago)
Author:
juhosg
Message:

ar71xx: move ar724x_pci_* helpers to ar724x-pci.c

Location:
trunk/target/linux/ar71xx/files/arch/mips
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/ar71xx/files/arch/mips/include/asm/mach-ar71xx/ar71xx.h

    r20279 r20282  
    357357#define AR724X_PCI_INT_DEV0             BIT(14) 
    358358 
    359 static inline void ar724x_pci_wr(unsigned reg, u32 val) 
    360 { 
    361         void __iomem *base; 
    362  
    363         base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); 
    364         __raw_writel(val, base + reg); 
    365         (void) __raw_readl(base + reg); 
    366         iounmap(base); 
    367 } 
    368  
    369 static inline void ar724x_pci_wr_nf(unsigned reg, u32 val) 
    370 { 
    371         void __iomem *base; 
    372  
    373         base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); 
    374         __raw_writel(val, base + reg); 
    375         iounmap(base); 
    376 } 
    377  
    378 static inline u32 ar724x_pci_rr(unsigned reg) 
    379 { 
    380         void __iomem *base; 
    381         u32 ret; 
    382  
    383         base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); 
    384         ret = __raw_readl(base + reg); 
    385         iounmap(base); 
    386         return ret; 
    387 } 
    388  
    389359/* 
    390360 * RESET block 
  • trunk/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c

    r20281 r20282  
    3535static DEFINE_SPINLOCK(ar724x_pci_lock); 
    3636 
     37static inline void ar724x_pci_wr(unsigned reg, u32 val) 
     38{ 
     39        void __iomem *base; 
     40 
     41        base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); 
     42        __raw_writel(val, base + reg); 
     43        (void) __raw_readl(base + reg); 
     44        iounmap(base); 
     45} 
     46 
     47static inline void ar724x_pci_wr_nf(unsigned reg, u32 val) 
     48{ 
     49        void __iomem *base; 
     50 
     51        base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); 
     52        __raw_writel(val, base + reg); 
     53        iounmap(base); 
     54} 
     55 
     56static inline u32 ar724x_pci_rr(unsigned reg) 
     57{ 
     58        void __iomem *base; 
     59        u32 ret; 
     60 
     61        base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); 
     62        ret = __raw_readl(base + reg); 
     63        iounmap(base); 
     64        return ret; 
     65} 
     66 
    3767static void ar724x_pci_read(void __iomem *base, int where, int size, u32 *value) 
    3868{ 
Note: See TracChangeset for help on using the changeset viewer.