summaryrefslogtreecommitdiff
path: root/target/linux/ifxmips/files/arch/mips/pci
diff options
context:
space:
mode:
authorblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-06-28 17:28:31 +0000
committerblogic <blogic@3c298f89-4303-0410-b956-a3cf2f4a3e73>2008-06-28 17:28:31 +0000
commit22c1090f91c625ea0922df56653758c142234271 (patch)
tree281f1363fa968df433684a06a8fd44a4abc66595 /target/linux/ifxmips/files/arch/mips/pci
parent6ddec82f97677610a82261d7c22cf2dd82b407b5 (diff)
add proper ebu locking to ifxmips
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@11597 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/ifxmips/files/arch/mips/pci')
-rw-r--r--target/linux/ifxmips/files/arch/mips/pci/ops-ifxmips.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/pci/ops-ifxmips.c b/target/linux/ifxmips/files/arch/mips/pci/ops-ifxmips.c
index 3eb25821dd..e04c246eae 100644
--- a/target/linux/ifxmips/files/arch/mips/pci/ops-ifxmips.c
+++ b/target/linux/ifxmips/files/arch/mips/pci/ops-ifxmips.c
@@ -8,6 +8,7 @@
#include <asm/ifxmips/ifxmips_irq.h>
#include <asm/addrspace.h>
#include <linux/vmalloc.h>
+#include <asm/ifxmips/ifxmips_ebu.h>
#define IFXMIPS_PCI_CFG_BUSNUM_SHF 16
#define IFXMIPS_PCI_CFG_DEVNUM_SHF 11
@@ -33,7 +34,7 @@ ifxmips_pci_config_access(unsigned char access_type,
|| ((devfn & 0xf8) == 0) || ((devfn & 0xf8) == 0x68))
return 1;
- local_irq_save(flags);
+ spin_lock_irqsave(&ebu_lock, flags);
cfg_base = ifxmips_pci_mapped_cfg;
cfg_base |= (bus->number << IFXMIPS_PCI_CFG_BUSNUM_SHF) | (devfn <<
@@ -64,7 +65,7 @@ ifxmips_pci_config_access(unsigned char access_type,
cfg_base = (ifxmips_pci_mapped_cfg | (0x68 << IFXMIPS_PCI_CFG_FUNNUM_SHF)) + 4;
ifxmips_w32(temp, ((u32*)cfg_base));
- local_irq_restore(flags);
+ spin_unlock_irqrestore(&ebu_lock, flags);
if (((*data) == 0xffffffff) && (access_type == PCI_ACCESS_READ))
return 1;