提交 88555a63 编写于 作者: J Jingoo Han 提交者: Greg Kroah-Hartman

USB: ehci-s5p: add DMA burst support

DMA burst support is added to improve performance in EHCI data
transfer. The USB EHCI controller on Exynos SoCs can use INCR16,
INCR8, and INCR4 mode. These modes of INSNREG00 register should
be set in order to enable DMA burst transfer. This feature is
also related to AHB spec.
Signed-off-by: NJingoo Han <jg1.han@samsung.com>
Signed-off-by: NSangwook Lee <sangwook.lee@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 30e9eb19
...@@ -17,6 +17,15 @@ ...@@ -17,6 +17,15 @@
#include <plat/ehci.h> #include <plat/ehci.h>
#include <plat/usb-phy.h> #include <plat/usb-phy.h>
#define EHCI_INSNREG00(base) (base + 0x90)
#define EHCI_INSNREG00_ENA_INCR16 (0x1 << 25)
#define EHCI_INSNREG00_ENA_INCR8 (0x1 << 24)
#define EHCI_INSNREG00_ENA_INCR4 (0x1 << 23)
#define EHCI_INSNREG00_ENA_INCRX_ALIGN (0x1 << 22)
#define EHCI_INSNREG00_ENABLE_DMA_BURST \
(EHCI_INSNREG00_ENA_INCR16 | EHCI_INSNREG00_ENA_INCR8 | \
EHCI_INSNREG00_ENA_INCR4 | EHCI_INSNREG00_ENA_INCRX_ALIGN)
struct s5p_ehci_hcd { struct s5p_ehci_hcd {
struct device *dev; struct device *dev;
struct usb_hcd *hcd; struct usb_hcd *hcd;
...@@ -128,6 +137,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev) ...@@ -128,6 +137,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
ehci->regs = hcd->regs + ehci->regs = hcd->regs +
HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase));
/* DMA burst Enable */
writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
dbg_hcs_params(ehci, "reset"); dbg_hcs_params(ehci, "reset");
dbg_hcc_params(ehci, "reset"); dbg_hcc_params(ehci, "reset");
...@@ -234,6 +246,9 @@ static int s5p_ehci_resume(struct device *dev) ...@@ -234,6 +246,9 @@ static int s5p_ehci_resume(struct device *dev)
if (pdata && pdata->phy_init) if (pdata && pdata->phy_init)
pdata->phy_init(pdev, S5P_USB_PHY_HOST); pdata->phy_init(pdev, S5P_USB_PHY_HOST);
/* DMA burst Enable */
writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
if (time_before(jiffies, ehci->next_statechange)) if (time_before(jiffies, ehci->next_statechange))
msleep(100); msleep(100);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册