summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorPeter Chen <peter.chen@freescale.com>2014-11-05 14:38:28 +0800
committerPeter Chen <peter.chen@freescale.com>2014-11-11 13:16:37 +0800
commit48ebdd800ff8f7075dfb7fa217e5b33a4b39bbc9 (patch)
tree5e56345bc7e827eddbc24949c70b788e59666907 /drivers
parenta6bf7a97a83a58b9fe6de91975e4203c235036be (diff)
MLK-9785-3 usb: chipidea: imx: change ahb burst setting
For imx6, below AHB burst setting are better performance: - Incremental burst of unspecified length, see SBUSCFG, $BASE + 0x90 - Set Both RX/TX burst size as 16 DWords, see BURSTSIZE, $BASE + 0x160 Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/chipidea/ci_hdrc_imx.c26
1 files changed, 23 insertions, 3 deletions
diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c b/drivers/usb/chipidea/ci_hdrc_imx.c
index 6040f6685d33..74a91e497318 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -33,6 +33,8 @@
struct ci_hdrc_imx_platform_flag {
unsigned int flags;
+ u32 ahbburst_config;
+ u32 burst_length;
};
static const struct ci_hdrc_imx_platform_flag imx27_usb_data = {
@@ -52,19 +54,31 @@ static const struct ci_hdrc_imx_platform_flag imx28_usb_data = {
static const struct ci_hdrc_imx_platform_flag imx6q_usb_data = {
.flags = CI_HDRC_SUPPORTS_RUNTIME_PM |
CI_HDRC_IMX_EHCI_QUIRK |
- CI_HDRC_DISABLE_STREAMING,
+ CI_HDRC_DISABLE_STREAMING |
+ CI_HDRC_OVERRIDE_AHB_BURST |
+ CI_HDRC_OVERRIDE_BURST_LENGTH,
+ .ahbburst_config = 0, /*bit0 - bit2 at $BASE + 0x90 */
+ .burst_length = 0x1010, /*bit0 - bit15 at $BASE + 0x160 */
};
static const struct ci_hdrc_imx_platform_flag imx6sl_usb_data = {
.flags = CI_HDRC_SUPPORTS_RUNTIME_PM |
CI_HDRC_IMX_EHCI_QUIRK |
- CI_HDRC_DISABLE_HOST_STREAMING,
+ CI_HDRC_DISABLE_HOST_STREAMING |
+ CI_HDRC_OVERRIDE_AHB_BURST |
+ CI_HDRC_OVERRIDE_BURST_LENGTH,
+ .ahbburst_config = 0,
+ .burst_length = 0x1010,
};
static const struct ci_hdrc_imx_platform_flag imx6sx_usb_data = {
.flags = CI_HDRC_SUPPORTS_RUNTIME_PM |
CI_HDRC_IMX_EHCI_QUIRK |
- CI_HDRC_DISABLE_HOST_STREAMING,
+ CI_HDRC_DISABLE_HOST_STREAMING |
+ CI_HDRC_OVERRIDE_AHB_BURST |
+ CI_HDRC_OVERRIDE_BURST_LENGTH,
+ .ahbburst_config = 0,
+ .burst_length = 0x1010,
};
static const struct of_device_id ci_hdrc_imx_dt_ids[] = {
@@ -388,6 +402,12 @@ static int ci_hdrc_imx_probe(struct platform_device *pdev)
}
}
+ if (imx_platform_flag->flags & CI_HDRC_OVERRIDE_AHB_BURST)
+ pdata.ahbburst_config = imx_platform_flag->ahbburst_config;
+
+ if (imx_platform_flag->flags & CI_HDRC_OVERRIDE_BURST_LENGTH)
+ pdata.burst_length = imx_platform_flag->burst_length;
+
data->ci_pdev = ci_hdrc_add_device(&pdev->dev,
pdev->resource, pdev->num_resources,
&pdata);