aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/uhci-hcd.h
diff options
context:
space:
mode:
authorJan Andersson <jan@gaisler.com>2011-05-06 06:00:16 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-06 21:24:01 -0400
commit9faa091a409851ac6b3812164d53644074bc89b1 (patch)
treec7d95c20e9b476261a1ccd7a5f02286be5b7502d /drivers/usb/host/uhci-hcd.h
parentc31a65f869f7b8a7039007411c76d7b6f9a63323 (diff)
USB: UHCI: Wrap I/O register accesses
This patch is part of a series that extend the UHCI HCD to support non-PCI controllers. This patch replaces in{b,w,l} and out{b,wl} with calls to local inline functions. This is done so that the register access functions can be extended to support register areas not mapped in PCI I/O space. Signed-off-by: Jan Andersson <jan@gaisler.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/host/uhci-hcd.h')
-rw-r--r--drivers/usb/host/uhci-hcd.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h
index 56943795457..a6de241bf96 100644
--- a/drivers/usb/host/uhci-hcd.h
+++ b/drivers/usb/host/uhci-hcd.h
@@ -481,4 +481,34 @@ struct urb_priv {
481#define PCI_VENDOR_ID_GENESYS 0x17a0 481#define PCI_VENDOR_ID_GENESYS 0x17a0
482#define PCI_DEVICE_ID_GL880S_UHCI 0x8083 482#define PCI_DEVICE_ID_GL880S_UHCI 0x8083
483 483
484static inline u32 uhci_readl(struct uhci_hcd *uhci, int reg)
485{
486 return inl(uhci->io_addr + reg);
487}
488
489static inline void uhci_writel(struct uhci_hcd *uhci, u32 val, int reg)
490{
491 outl(val, uhci->io_addr + reg);
492}
493
494static inline u16 uhci_readw(struct uhci_hcd *uhci, int reg)
495{
496 return inw(uhci->io_addr + reg);
497}
498
499static inline void uhci_writew(struct uhci_hcd *uhci, u16 val, int reg)
500{
501 outw(val, uhci->io_addr + reg);
502}
503
504static inline u8 uhci_readb(struct uhci_hcd *uhci, int reg)
505{
506 return inb(uhci->io_addr + reg);
507}
508
509static inline void uhci_writeb(struct uhci_hcd *uhci, u8 val, int reg)
510{
511 outb(val, uhci->io_addr + reg);
512}
513
484#endif 514#endif