diff options
author | Peter Chen <peter.chen@freescale.com> | 2015-03-17 14:21:00 +0800 |
---|---|---|
committer | Peter Chen <peter.chen@freescale.com> | 2015-08-14 10:03:55 +0800 |
commit | 65668718f2c5b76d5f4513564a3c56672bb07892 (patch) | |
tree | 3127be1b1ec7956f71fb382d28494c3718e3718a /drivers/usb/chipidea/core.c | |
parent | c6fba7b750efe64a69dd83e0ff7249abd0e783aa (diff) |
usb: chipidea: add ahb burst configuration interface
The users can change it through dts or platform data if they
want to change the default value.
Signed-off-by: Peter Chen <peter.chen@freescale.com>
Diffstat (limited to 'drivers/usb/chipidea/core.c')
-rw-r--r-- | drivers/usb/chipidea/core.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/usb/chipidea/core.c b/drivers/usb/chipidea/core.c index 7a2c217fb150..ce0489754fde 100644 --- a/drivers/usb/chipidea/core.c +++ b/drivers/usb/chipidea/core.c @@ -438,6 +438,9 @@ void ci_platform_configure(struct ci_hdrc *ci) hw_write(ci, OP_USBCMD, 0xff0000, ci->platdata->itc_setting << 16); + if (ci->platdata->flags & CI_HDRC_OVERRIDE_AHB_BURST) + hw_write_id_reg(ci, ID_SBUSCFG, AHBBRST_MASK, + ci->platdata->ahb_burst_config); } /** @@ -633,6 +636,17 @@ static int ci_get_platdata(struct device *dev, } } + if (of_find_property(dev->of_node, "ahb-burst-config", NULL)) { + ret = of_property_read_u32(dev->of_node, "ahb-burst-config", + &platdata->ahb_burst_config); + if (ret) { + dev_err(dev, + "failed to get ahb-burst-config\n"); + return ret; + } + platdata->flags |= CI_HDRC_OVERRIDE_AHB_BURST; + } + return 0; } |