diff options
author | Gabor Juhos <juhosg@openwrt.org> | 2010-03-18 19:18:58 +0000 |
---|---|---|
committer | Gabor Juhos <juhosg@openwrt.org> | 2010-03-18 19:18:58 +0000 |
commit | 11f888b68ea18bec4c98809e27cc95e9b3c52fb4 (patch) | |
tree | 394cb3683bddb85535a6e0d0251bf35f3f9e590b /target/linux/ar71xx/files/arch/mips/pci | |
parent | 72ce25d04e0cd2dacfdf1adce4c56ad9b1a9c377 (diff) | |
download | upstream-11f888b68ea18bec4c98809e27cc95e9b3c52fb4.tar.gz upstream-11f888b68ea18bec4c98809e27cc95e9b3c52fb4.tar.bz2 upstream-11f888b68ea18bec4c98809e27cc95e9b3c52fb4.zip |
ar71xx: move ar724x_pci_* helpers to ar724x-pci.c
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@20282 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ar71xx/files/arch/mips/pci')
-rw-r--r-- | target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c b/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c index 617d1eb8bf..9d37561aa0 100644 --- a/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c +++ b/target/linux/ar71xx/files/arch/mips/pci/pci-ar724x.c @@ -34,6 +34,36 @@ static int ar724x_pci_fixup_enable; static DEFINE_SPINLOCK(ar724x_pci_lock); +static inline void ar724x_pci_wr(unsigned reg, u32 val) +{ + void __iomem *base; + + base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); + __raw_writel(val, base + reg); + (void) __raw_readl(base + reg); + iounmap(base); +} + +static inline void ar724x_pci_wr_nf(unsigned reg, u32 val) +{ + void __iomem *base; + + base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); + __raw_writel(val, base + reg); + iounmap(base); +} + +static inline u32 ar724x_pci_rr(unsigned reg) +{ + void __iomem *base; + u32 ret; + + base = ioremap_nocache(AR724X_PCI_CTRL_BASE, AR724X_PCI_CTRL_SIZE); + ret = __raw_readl(base + reg); + iounmap(base); + return ret; +} + static void ar724x_pci_read(void __iomem *base, int where, int size, u32 *value) { unsigned long flags; |