sh: pci io port base address code
Adds a __get_pci_io_base() function which is used to match a port range against struct pci_channel. This allows us to detect if a port range is assigned to pci or happens to be legacy port io. While at it, remove unused cpu-specific cruft. Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
This commit is contained in:
@ -12,6 +12,7 @@
|
||||
* for more details.
|
||||
*/
|
||||
#include <linux/module.h>
|
||||
#include <linux/pci.h>
|
||||
#include <asm/machvec.h>
|
||||
#include <asm/io.h>
|
||||
|
||||
@ -69,6 +70,10 @@ void __iomem *ioport_map(unsigned long port, unsigned int nr)
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = __get_pci_io_base(port, nr);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return __ioport_map(port, nr);
|
||||
}
|
||||
EXPORT_SYMBOL(ioport_map);
|
||||
|
Reference in New Issue
Block a user