summaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2016-02-17 16:51:40 +0100
committerFelipe Balbi <balbi@kernel.org>2016-03-04 15:14:31 +0200
commita9458a3b33ea1a00fc9d1beb3c0bb1c2d18855c9 (patch)
tree8ceb089342384a43b05c384874c857dbaa803389 /drivers/usb
parent62a6abdd427b5fc4d8aad5dac874904e96273e6d (diff)
downloadop-kernel-dev-a9458a3b33ea1a00fc9d1beb3c0bb1c2d18855c9.zip
op-kernel-dev-a9458a3b33ea1a00fc9d1beb3c0bb1c2d18855c9.tar.gz
usb: gadget: pxa25x_udc: document endianess better
When I wrote the cleanup patch series, it was not clear how exactly big-endian mode works on ixp4xx, and whether the driver was doing this correctly. After discussing with Krzysztof Hałasa, this has been clarified, so I can update the comment let pxa25x big-endian (which we don't support) work the same way as ixp4xx. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/udc/pxa25x_udc.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/gadget/udc/pxa25x_udc.c b/drivers/usb/gadget/udc/pxa25x_udc.c
index 6d3acbf..a238da9 100644
--- a/drivers/usb/gadget/udc/pxa25x_udc.c
+++ b/drivers/usb/gadget/udc/pxa25x_udc.c
@@ -289,14 +289,14 @@ static void pullup_on(void)
mach->udc_command(PXA2XX_UDC_CMD_CONNECT);
}
-#if defined(CONFIG_ARCH_IXP4XX) && defined(CONFIG_CPU_BIG_ENDIAN)
+#if defined(CONFIG_CPU_BIG_ENDIAN)
/*
- * not sure if this is the correct behavior on ixp4xx in both
- * bit-endian and little-endian modes, but it's what the driver
- * has always done using direct pointer dereferences:
- * We assume that there is a byteswap done in hardware at the
- * MMIO register that matches what the CPU setting is, so we
- * never swap in software.
+ * IXP4xx has its buses wired up in a way that relies on never doing any
+ * byte swaps, independent of whether it runs in big-endian or little-endian
+ * mode, as explained by Krzysztof Hałasa.
+ *
+ * We only support pxa25x in little-endian mode, but it is very likely
+ * that it works the same way.
*/
static inline void udc_set_reg(struct pxa25x_udc *dev, u32 reg, u32 val)
{
OpenPOWER on IntegriCloud