2006-02-03 01:38:35 +02:00
|
|
|
diff -Nur linux-2.6.15/arch/mips/pci/Makefile linux-2.6.15-openwrt/arch/mips/pci/Makefile
|
|
|
|
--- linux-2.6.15/arch/mips/pci/Makefile 2006-01-03 04:21:10.000000000 +0100
|
|
|
|
+++ linux-2.6.15-openwrt/arch/mips/pci/Makefile 2006-01-10 00:32:32.000000000 +0100
|
2006-12-14 18:41:33 +02:00
|
|
|
@@ -53,3 +53,4 @@
|
2006-02-03 01:38:35 +02:00
|
|
|
obj-$(CONFIG_VICTOR_MPC30X) += fixup-mpc30x.o
|
|
|
|
obj-$(CONFIG_ZAO_CAPCELLA) += fixup-capcella.o
|
2006-12-14 18:41:33 +02:00
|
|
|
obj-$(CONFIG_WR_PPMC) += fixup-wrppmc.o
|
2006-02-03 01:38:35 +02:00
|
|
|
+obj-$(CONFIG_MACH_ARUBA) += fixup-aruba.o ops-aruba.o pci-aruba.o
|
|
|
|
diff -Nur linux-2.6.15/drivers/pci/access.c linux-2.6.15-openwrt/drivers/pci/access.c
|
|
|
|
--- linux-2.6.15/drivers/pci/access.c 2006-01-03 04:21:10.000000000 +0100
|
|
|
|
+++ linux-2.6.15-openwrt/drivers/pci/access.c 2006-01-10 00:43:10.000000000 +0100
|
|
|
|
@@ -21,6 +21,7 @@
|
|
|
|
#define PCI_word_BAD (pos & 1)
|
|
|
|
#define PCI_dword_BAD (pos & 3)
|
|
|
|
|
|
|
|
+#ifdef __MIPSEB__
|
|
|
|
#define PCI_OP_READ(size,type,len) \
|
|
|
|
int pci_bus_read_config_##size \
|
|
|
|
(struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
|
|
|
|
@@ -31,11 +32,32 @@
|
|
|
|
if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \
|
|
|
|
spin_lock_irqsave(&pci_lock, flags); \
|
|
|
|
res = bus->ops->read(bus, devfn, pos, len, &data); \
|
|
|
|
+ if (len == 1) \
|
|
|
|
+ *value = (type)((data >> 24) & 0xff); \
|
|
|
|
+ else if (len == 2) \
|
|
|
|
+ *value = (type)((data >> 16) & 0xffff); \
|
|
|
|
+ else \
|
|
|
|
*value = (type)data; \
|
|
|
|
spin_unlock_irqrestore(&pci_lock, flags); \
|
|
|
|
return res; \
|
|
|
|
}
|
|
|
|
+#else
|
|
|
|
|
|
|
|
+#define PCI_OP_READ(size,type,len) \
|
|
|
|
+int pci_bus_read_config_##size \
|
|
|
|
+ (struct pci_bus *bus, unsigned int devfn, int pos, type *value) \
|
|
|
|
+{ \
|
|
|
|
+ int res; \
|
|
|
|
+ unsigned long flags; \
|
|
|
|
+ u32 data = 0; \
|
|
|
|
+ if (PCI_##size##_BAD) return PCIBIOS_BAD_REGISTER_NUMBER; \
|
|
|
|
+ spin_lock_irqsave(&pci_lock, flags); \
|
|
|
|
+ res = bus->ops->read(bus, devfn, pos, len, &data); \
|
|
|
|
+ *value = (type)data; \
|
|
|
|
+ spin_unlock_irqrestore(&pci_lock, flags); \
|
|
|
|
+ return res; \
|
|
|
|
+}
|
|
|
|
+#endif
|
|
|
|
#define PCI_OP_WRITE(size,type,len) \
|
|
|
|
int pci_bus_write_config_##size \
|
|
|
|
(struct pci_bus *bus, unsigned int devfn, int pos, type value) \
|