summaryrefslogtreecommitdiff
path: root/drivers/usb/chipidea/core.c
diff options
context:
space:
mode:
authorSvetoslav Neykov <svetoslav@neykov.name>2013-03-30 14:54:03 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-30 19:20:47 +0400
commit938d323f14480ca8dcb9dbbe48add35a09246d09 (patch)
tree7587f55fc821abb8940590430270f64f2612e94d /drivers/usb/chipidea/core.c
parentefccca4ff59e672a6b50e99f0f4cb61b60d09ec8 (diff)
downloadlinux-938d323f14480ca8dcb9dbbe48add35a09246d09.tar.xz
usb: chipidea: big-endian support
Convert between big-endian and little-endian format when accessing the usb controller structures which are little-endian by specification. Fix cases where the little-endian memory layout is taken for granted. The patch doesn't have any effect on the already supported little-endian architectures. Signed-off-by: Svetoslav Neykov <svetoslav@neykov.name> [Alex: minor cosmetic fixes] Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r--drivers/usb/chipidea/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c
index 114d4c43abc6..450107e5f657 100644
--- a/drivers/usb/chipidea/core.c
+++ b/drivers/usb/chipidea/core.c
@@ -178,7 +178,7 @@ static int hw_device_init(struct ci13xxx *ci, void __iomem *base)
ci->hw_bank.cap = ci->hw_bank.abs;
ci->hw_bank.cap += ci->platdata->capoffset;
- ci->hw_bank.op = ci->hw_bank.cap + ioread8(ci->hw_bank.cap);
+ ci->hw_bank.op = ci->hw_bank.cap + (ioread32(ci->hw_bank.cap) & 0xff);
hw_alloc_regmap(ci, false);
reg = hw_read(ci, CAP_HCCPARAMS, HCCPARAMS_LEN) >>