summaryrefslogtreecommitdiffstats
path: root/drivers/usb/chipidea/host.c
diff options
context:
space:
mode:
authorPeter Chen2015-03-17 03:40:50 +0100
committerPeter Chen2015-08-14 03:13:11 +0200
commitbf9c85e78d0fec61360ece46dacf9ab71ba89361 (patch)
tree1356a3a4348e74f3539c194b9a969fe3864cb088 /drivers/usb/chipidea/host.c
parentusb: chipidea: otg_fsm: delete the duplicated reset controller operation (diff)
downloadkernel-qcow2-linux-bf9c85e78d0fec61360ece46dacf9ab71ba89361.tar.gz
kernel-qcow2-linux-bf9c85e78d0fec61360ece46dacf9ab71ba89361.tar.xz
kernel-qcow2-linux-bf9c85e78d0fec61360ece46dacf9ab71ba89361.zip
usb: chipidea: introduce ci_platform_configure
It is used to configure controller parameters according to platform data, like speed, stream mode, etc, both host and device's initialization need it, most of code are the same for both roles, with this new interface, it can reduce the duplicated code and be easy to maintain in future. Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers/usb/chipidea/host.c')
-rw-r--r--drivers/usb/chipidea/host.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/usb/chipidea/host.c b/drivers/usb/chipidea/host.c
index b01716c8c66b..44554318db8a 100644
--- a/drivers/usb/chipidea/host.c
+++ b/drivers/usb/chipidea/host.c
@@ -153,14 +153,7 @@ static int host_start(struct ci_hdrc *ci)
}
}
- if (ci->platdata->flags & CI_HDRC_DISABLE_STREAMING)
- hw_write(ci, OP_USBMODE, USBMODE_CI_SDIS, USBMODE_CI_SDIS);
-
- if (ci->platdata->flags & CI_HDRC_FORCE_FULLSPEED)
- hw_write(ci, OP_PORTSC, PORTSC_PFSC, PORTSC_PFSC);
-
- if (ci->platdata->flags & CI_HDRC_SET_NON_ZERO_TTHA)
- hw_write(ci, OP_TTCTRL, TTCTRL_TTHA_MASK, TTCTRL_TTHA);
+ ci_platform_configure(ci);
return ret;