diff options
Diffstat (limited to 'include/asm-arm')
-rw-r--r-- | include/asm-arm/arch-ixp2000/io.h | 20 | ||||
-rw-r--r-- | include/asm-arm/arch-ixp2000/ixp2000-regs.h | 2 |
2 files changed, 15 insertions, 7 deletions
diff --git a/include/asm-arm/arch-ixp2000/io.h b/include/asm-arm/arch-ixp2000/io.h index 5e56b47446e0..3241cd6f0778 100644 --- a/include/asm-arm/arch-ixp2000/io.h +++ b/include/asm-arm/arch-ixp2000/io.h | |||
@@ -17,16 +17,21 @@ | |||
17 | 17 | ||
18 | #define IO_SPACE_LIMIT 0xffffffff | 18 | #define IO_SPACE_LIMIT 0xffffffff |
19 | #define __mem_pci(a) (a) | 19 | #define __mem_pci(a) (a) |
20 | #define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
21 | 20 | ||
22 | /* | 21 | /* |
23 | * The IXP2400 before revision B0 asserts byte lanes for PCI I/O | 22 | * The A? revisions of the IXP2000s assert byte lanes for PCI I/O |
24 | * transactions the other way round (MEM transactions don't have this | 23 | * transactions the other way round (MEM transactions don't have this |
25 | * issue), so we need to override the standard functions. B0 and later | 24 | * issue), so if we want to support those models, we need to override |
26 | * have a bit that can be set to 1 to get the 'proper' behavior, but | 25 | * the standard I/O functions. |
27 | * since that isn't available on the A? revisions we just keep doing | 26 | * |
28 | * things manually. | 27 | * B0 and later have a bit that can be set to 1 to get the proper |
28 | * behavior for I/O transactions, which then allows us to use the | ||
29 | * standard I/O functions. This is what we do if the user does not | ||
30 | * explicitly ask for support for pre-B0. | ||
29 | */ | 31 | */ |
32 | #ifdef CONFIG_IXP2000_SUPPORT_BROKEN_PCI_IO | ||
33 | #define ___io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
34 | |||
30 | #define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3) | 35 | #define alignb(addr) (void __iomem *)((unsigned long)(addr) ^ 3) |
31 | #define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2) | 36 | #define alignw(addr) (void __iomem *)((unsigned long)(addr) ^ 2) |
32 | 37 | ||
@@ -119,6 +124,9 @@ | |||
119 | #define ioport_map(port, nr) ___io(port) | 124 | #define ioport_map(port, nr) ___io(port) |
120 | 125 | ||
121 | #define ioport_unmap(addr) | 126 | #define ioport_unmap(addr) |
127 | #else | ||
128 | #define __io(p) ((void __iomem *)((p)+IXP2000_PCI_IO_VIRT_BASE)) | ||
129 | #endif | ||
122 | 130 | ||
123 | 131 | ||
124 | #ifdef CONFIG_ARCH_IXDP2X01 | 132 | #ifdef CONFIG_ARCH_IXDP2X01 |
diff --git a/include/asm-arm/arch-ixp2000/ixp2000-regs.h b/include/asm-arm/arch-ixp2000/ixp2000-regs.h index a1d9e181b10f..5eb47d4bfbf6 100644 --- a/include/asm-arm/arch-ixp2000/ixp2000-regs.h +++ b/include/asm-arm/arch-ixp2000/ixp2000-regs.h | |||
@@ -241,7 +241,7 @@ | |||
241 | #define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */ | 241 | #define PCI_CONTROL_BE_DEI (1 << 21) /* Big Endian Data Enable In */ |
242 | #define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */ | 242 | #define PCI_CONTROL_BE_BEO (1 << 20) /* Big Endian Byte Enable Out */ |
243 | #define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */ | 243 | #define PCI_CONTROL_BE_BEI (1 << 19) /* Big Endian Byte Enable In */ |
244 | #define PCI_CONTROL_PNR (1 << 17) /* PCI Not Reset bit */ | 244 | #define PCI_CONTROL_IEE (1 << 17) /* I/O cycle Endian swap Enable */ |
245 | 245 | ||
246 | #define IXP2000_PCI_RST_REL (1 << 2) | 246 | #define IXP2000_PCI_RST_REL (1 << 2) |
247 | #define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF) | 247 | #define CFG_RST_DIR (*IXP2000_PCI_CONTROL & IXP2000_PCICNTL_PCF) |