summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/isp1760-core.c
diff options
context:
space:
mode:
authorLaurent Pinchart2015-01-20 23:56:00 +0100
committerFelipe Balbi2015-01-27 16:39:30 +0100
commit9a66e13290f16be59ac38e1955e15e8929076fc6 (patch)
tree6be844ee83adf7b847f75d04a0eb92b4aae5d1ae /drivers/usb/host/isp1760-core.c
parentusb: isp1760: Initialize the bus interface in core code (diff)
downloadkernel-qcow2-linux-9a66e13290f16be59ac38e1955e15e8929076fc6.tar.gz
kernel-qcow2-linux-9a66e13290f16be59ac38e1955e15e8929076fc6.tar.xz
kernel-qcow2-linux-9a66e13290f16be59ac38e1955e15e8929076fc6.zip
usb: isp1760: Move PORT1 configuration to core code
Configuring the mode of operation of port 1 doesn't belong to the HCD code, as it's related to the soon to come UDC support. Move the configuration to core code. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/usb/host/isp1760-core.c')
-rw-r--r--drivers/usb/host/isp1760-core.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/usb/host/isp1760-core.c b/drivers/usb/host/isp1760-core.c
index e840a1d3676b..1cba3e08898a 100644
--- a/drivers/usb/host/isp1760-core.c
+++ b/drivers/usb/host/isp1760-core.c
@@ -67,6 +67,14 @@ static void isp1760_init_core(struct isp1760_device *isp)
isp1760_write32(isp->regs, HC_HW_MODE_CTRL, hwmode);
isp1760_write32(isp->regs, HC_HW_MODE_CTRL, hwmode);
+ /*
+ * PORT 1 Control register of the ISP1760 is the OTG control register on
+ * ISP1761. Since there is no OTG or device controller support in this
+ * driver, we use port 1 as a "normal" USB host port on both chips.
+ */
+ isp1760_write32(isp->regs, HC_PORT1_CTRL, PORT1_POWER | PORT1_INIT2);
+ usleep_range(10000, 11000);
+
dev_info(isp->dev, "bus width: %u, oc: %s\n",
isp->devflags & ISP1760_FLAG_BUS_WIDTH_16 ? 16 : 32,
isp->devflags & ISP1760_FLAG_ANALOG_OC ? "analog" : "digital");