]> git.karo-electronics.de Git - karo-tx-linux.git/commit
xhci: replace xhci_read_64() with readq()
authorXenia Ragiadakou <burzalodowa@gmail.com>
Fri, 15 Nov 2013 03:34:08 +0000 (05:34 +0200)
committerSarah Sharp <sarah.a.sharp@linux.intel.com>
Mon, 2 Dec 2013 20:59:49 +0000 (12:59 -0800)
commite8b373326d8efcaf9ec1da8b618556c89bd5ffc4
treef1c72d9427799f7dfcacbb7fe77ac35b60154c23
parent204b7793f2a9935e9a08524d0b4bb51b990d518e
xhci: replace xhci_read_64() with readq()

Function xhci_read_64() is used to read 64bit xHC registers residing in MMIO.
On 32bit systems, xHC registers need to be read with 32bit accesses by
reading first the lower 32bits and then the higher 32bits.

Replace all calls to xhci_read_64() with calls to readq() and include
asm-generic/io-64-nonatomic-lo-hi.h header file, so that if the system
is not 64bit, readq() will read registers in 32bit chunks with low-high order.

This is done to reduce code duplication since 64bit low-high read logic
is already implemented and to take advantage of inherent "atomic" 64bit
read operations on 64bit systems.

Signed-off-by: Xenia Ragiadakou <burzalodowa@gmail.com>
Signed-off-by: Sarah Sharp <sarah.a.sharp@linux.intel.com>
drivers/usb/host/xhci-dbg.c
drivers/usb/host/xhci-mem.c
drivers/usb/host/xhci-ring.c
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h