diff options
author | Jan Andersson <jan@gaisler.com> | 2011-05-06 06:00:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-06 21:24:01 -0400 |
commit | 9faa091a409851ac6b3812164d53644074bc89b1 (patch) | |
tree | c7d95c20e9b476261a1ccd7a5f02286be5b7502d /drivers/usb/host/uhci-hcd.h | |
parent | c31a65f869f7b8a7039007411c76d7b6f9a63323 (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.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/usb/host/uhci-hcd.h b/drivers/usb/host/uhci-hcd.h index 569437954578..a6de241bf966 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 | ||
484 | static inline u32 uhci_readl(struct uhci_hcd *uhci, int reg) | ||
485 | { | ||
486 | return inl(uhci->io_addr + reg); | ||
487 | } | ||
488 | |||
489 | static inline void uhci_writel(struct uhci_hcd *uhci, u32 val, int reg) | ||
490 | { | ||
491 | outl(val, uhci->io_addr + reg); | ||
492 | } | ||
493 | |||
494 | static inline u16 uhci_readw(struct uhci_hcd *uhci, int reg) | ||
495 | { | ||
496 | return inw(uhci->io_addr + reg); | ||
497 | } | ||
498 | |||
499 | static inline void uhci_writew(struct uhci_hcd *uhci, u16 val, int reg) | ||
500 | { | ||
501 | outw(val, uhci->io_addr + reg); | ||
502 | } | ||
503 | |||
504 | static inline u8 uhci_readb(struct uhci_hcd *uhci, int reg) | ||
505 | { | ||
506 | return inb(uhci->io_addr + reg); | ||
507 | } | ||
508 | |||
509 | static 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 |