diff options
author | Arnd Bergmann <arnd@arndb.de> | 2016-01-28 17:17:04 +0100 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2016-03-04 15:14:29 +0200 |
commit | 65bc0fba4ed6e2ea7d89539985feb576ae2f84b9 (patch) | |
tree | f4caaf1f5f2db5b99a1d085ce70d31e4e9eeeac9 /drivers/usb/gadget/udc/pxa25x_udc.h | |
parent | a77af20e9e67caf79bd961c3d12938051b2c560e (diff) | |
download | op-kernel-dev-65bc0fba4ed6e2ea7d89539985feb576ae2f84b9.zip op-kernel-dev-65bc0fba4ed6e2ea7d89539985feb576ae2f84b9.tar.gz |
usb: gadget: pxa25x_udc: use readl/writel for mmio
This converts the pxa25x udc driver to use readl/writel as normal
driver should do, rather than dereferencing __iomem pointers
themselves.
Based on the earlier preparation work, we can now also pass
the register start in the device pointer so we no longer need
the global variable.
The unclear part here is for IXP4xx, which supports both big-endian
and little-endian configurations. So far, the driver has done
no byteswap in either case. I suspect that is wrong and it would
actually need to swap in one or the other case, but I don't know
which. It's also possible that there is some magic setting in
the chip that makes the endianess of the MMIO register match the
CPU, and in that case, the code actually does the right thing
for all configurations, both before and after this patch.
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/gadget/udc/pxa25x_udc.h')
-rw-r--r-- | drivers/usb/gadget/udc/pxa25x_udc.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.h b/drivers/usb/gadget/udc/pxa25x_udc.h index f884513..4b8b72d 100644 --- a/drivers/usb/gadget/udc/pxa25x_udc.h +++ b/drivers/usb/gadget/udc/pxa25x_udc.h @@ -125,6 +125,7 @@ struct pxa25x_udc { #ifdef CONFIG_USB_GADGET_DEBUG_FS struct dentry *debugfs_udc; #endif + void __iomem *regs; }; #define to_pxa25x(g) (container_of((g), struct pxa25x_udc, gadget)) |