diff options
Diffstat (limited to 'arch/sh/drivers/pci/pci.c')
-rw-r--r-- | arch/sh/drivers/pci/pci.c | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/arch/sh/drivers/pci/pci.c b/arch/sh/drivers/pci/pci.c index 1f5e23e8b163..285dffd12bd8 100644 --- a/arch/sh/drivers/pci/pci.c +++ b/arch/sh/drivers/pci/pci.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * arch/sh/drivers/pci/pci.c | 2 | * arch/sh/drivers/pci/pci.c |
3 | * | 3 | * |
4 | * Copyright (c) 2002 M. R. Brown <mrbrown@linux-sh.org> | 4 | * Copyright (c) 2002 M. R. Brown <mrbrown@linux-sh.org> |
5 | * Copyright (c) 2004, 2005 Paul Mundt <lethal@linux-sh.org> | 5 | * Copyright (c) 2004 - 2006 Paul Mundt <lethal@linux-sh.org> |
6 | * | 6 | * |
7 | * These functions are collected here to reduce duplication of common | 7 | * These functions are collected here to reduce duplication of common |
8 | * code amongst the many platform-specific PCI support code files. | 8 | * code amongst the many platform-specific PCI support code files. |
@@ -172,10 +172,23 @@ void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) | |||
172 | return NULL; | 172 | return NULL; |
173 | if (maxlen && len > maxlen) | 173 | if (maxlen && len > maxlen) |
174 | len = maxlen; | 174 | len = maxlen; |
175 | if (flags & IORESOURCE_IO) | 175 | |
176 | /* | ||
177 | * Presently the IORESOURCE_MEM case is a bit special, most | ||
178 | * SH7751 style PCI controllers have PCI memory at a fixed | ||
179 | * location in the address space where no remapping is desired | ||
180 | * (traditionally at 0xfd000000). Once this changes, the | ||
181 | * IORESOURCE_MEM case will have to switch to using ioremap() and | ||
182 | * more care will have to be taken to inhibit page table mapping | ||
183 | * for legacy cores. | ||
184 | * | ||
185 | * For now everything wraps to ioport_map(), since boards that | ||
186 | * have PCI will be able to check the address range properly on | ||
187 | * their own. | ||
188 | * -- PFM. | ||
189 | */ | ||
190 | if (flags & (IORESOURCE_IO | IORESOURCE_MEM)) | ||
176 | return ioport_map(start, len); | 191 | return ioport_map(start, len); |
177 | if (flags & IORESOURCE_MEM) | ||
178 | return ioremap(start, len); | ||
179 | 192 | ||
180 | return NULL; | 193 | return NULL; |
181 | } | 194 | } |