summaryrefslogtreecommitdiff
path: root/target/linux/ifxmips/files/arch/mips
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2008-06-28 17:28:31 +0000
committerJohn Crispin <john@openwrt.org>2008-06-28 17:28:31 +0000
commitebc9555b5ec811bc619ce1aa61a1e91dd4cfe3de (patch)
treee562c1d009233f73de2477c843efc1df61bd0fd2 /target/linux/ifxmips/files/arch/mips
parent185ca444e3696eed9ccb01618a99584f76709f0f (diff)
downloadmtk-20170518-ebc9555b5ec811bc619ce1aa61a1e91dd4cfe3de.zip
mtk-20170518-ebc9555b5ec811bc619ce1aa61a1e91dd4cfe3de.tar.gz
mtk-20170518-ebc9555b5ec811bc619ce1aa61a1e91dd4cfe3de.tar.bz2
add proper ebu locking to ifxmips
SVN-Revision: 11597
Diffstat (limited to 'target/linux/ifxmips/files/arch/mips')
-rw-r--r--target/linux/ifxmips/files/arch/mips/ifxmips/board.c23
-rw-r--r--target/linux/ifxmips/files/arch/mips/pci/ops-ifxmips.c5
2 files changed, 6 insertions, 22 deletions
diff --git a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
index 28f2e26..8d12ebd 100644
--- a/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
+++ b/target/linux/ifxmips/files/arch/mips/ifxmips/board.c
@@ -43,6 +43,9 @@
static unsigned int chiprev;
static struct platform_device *ifxmips_devs[MAX_IFXMIPS_DEVS];
+spinlock_t ebu_lock = SPIN_LOCK_UNLOCKED;
+EXPORT_SYMBOL_GPL(ebu_lock);
+
static struct platform_device
ifxmips_led[] =
{
@@ -79,24 +82,6 @@ ifxmips_wdt[] =
},
};
-static struct platform_device
-ifxmips_asc0[] =
-{
- {
- .id = 0,
- .name = "ifxmips_asc",
- },
-};
-
-static struct platform_device
-ifxmips_asc1[] =
-{
- {
- .id = 1,
- .name = "ifxmips_asc",
- },
-};
-
static struct physmap_flash_data
ifxmips_mtd_data = {
.width = 2,
@@ -173,8 +158,6 @@ ifxmips_init_devices(void)
ifxmips_devs[dev++] = ifxmips_mii;
ifxmips_devs[dev++] = ifxmips_mtd;
ifxmips_devs[dev++] = ifxmips_wdt;
- //ifxmips_devs[dev++] = ifxmips_asc0;
- ifxmips_devs[dev++] = ifxmips_asc1;
#ifdef CONFIG_GPIO_DEVICE
ifxmips_devs[dev++] = ifxmips_gpio_dev;
#endif
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 3eb2582..e04c246 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;