vmxnet3: round down # of queues to power of two
[linux-2.6/btrfs-unstable.git] / arch / sh / kernel / ioport.c
blobe3ad6103e7c181ba955b2c9967a41a8a61659eb7
1 /*
2 * arch/sh/kernel/ioport.c
4 * Copyright (C) 2000 Niibe Yutaka
5 * Copyright (C) 2005 - 2007 Paul Mundt
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file "COPYING" in the main directory of this archive
9 * for more details.
11 #include <linux/module.h>
12 #include <linux/io.h>
14 const unsigned long sh_io_port_base __read_mostly = -1;
15 EXPORT_SYMBOL(sh_io_port_base);
17 void __iomem *__ioport_map(unsigned long addr, unsigned int size)
19 if (sh_mv.mv_ioport_map)
20 return sh_mv.mv_ioport_map(addr, size);
22 return (void __iomem *)(addr + sh_io_port_base);
24 EXPORT_SYMBOL(__ioport_map);
26 void __iomem *ioport_map(unsigned long port, unsigned int nr)
28 void __iomem *ret;
30 ret = __ioport_map_trapped(port, nr);
31 if (ret)
32 return ret;
34 return __ioport_map(port, nr);
36 EXPORT_SYMBOL(ioport_map);
38 void ioport_unmap(void __iomem *addr)
40 if (sh_mv.mv_ioport_unmap)
41 sh_mv.mv_ioport_unmap(addr);
43 EXPORT_SYMBOL(ioport_unmap);