aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2012-03-04 20:40:14 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 16:05:47 -0500
commit88555a63caafcc86b93b045dfc26cd7a8fa16350 (patch)
tree2b4fab781d3897dc12b993215d0c51f27bdbae18 /drivers/usb/host
parent30e9eb190f7930bf1edb0ec2d0ce10e300391abd (diff)
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: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Sangwook Lee <sangwook.lee@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/host')
-rw-r--r--drivers/usb/host/ehci-s5p.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/usb/host/ehci-s5p.c b/drivers/usb/host/ehci-s5p.c
index 293f7412992e..f098e2a291a0 100644
--- a/drivers/usb/host/ehci-s5p.c
+++ b/drivers/usb/host/ehci-s5p.c
@@ -17,6 +17,15 @@
17#include <plat/ehci.h> 17#include <plat/ehci.h>
18#include <plat/usb-phy.h> 18#include <plat/usb-phy.h>
19 19
20#define EHCI_INSNREG00(base) (base + 0x90)
21#define EHCI_INSNREG00_ENA_INCR16 (0x1 << 25)
22#define EHCI_INSNREG00_ENA_INCR8 (0x1 << 24)
23#define EHCI_INSNREG00_ENA_INCR4 (0x1 << 23)
24#define EHCI_INSNREG00_ENA_INCRX_ALIGN (0x1 << 22)
25#define EHCI_INSNREG00_ENABLE_DMA_BURST \
26 (EHCI_INSNREG00_ENA_INCR16 | EHCI_INSNREG00_ENA_INCR8 | \
27 EHCI_INSNREG00_ENA_INCR4 | EHCI_INSNREG00_ENA_INCRX_ALIGN)
28
20struct s5p_ehci_hcd { 29struct s5p_ehci_hcd {
21 struct device *dev; 30 struct device *dev;
22 struct usb_hcd *hcd; 31 struct usb_hcd *hcd;
@@ -128,6 +137,9 @@ static int __devinit s5p_ehci_probe(struct platform_device *pdev)
128 ehci->regs = hcd->regs + 137 ehci->regs = hcd->regs +
129 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase)); 138 HC_LENGTH(ehci, readl(&ehci->caps->hc_capbase));
130 139
140 /* DMA burst Enable */
141 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
142
131 dbg_hcs_params(ehci, "reset"); 143 dbg_hcs_params(ehci, "reset");
132 dbg_hcc_params(ehci, "reset"); 144 dbg_hcc_params(ehci, "reset");
133 145
@@ -234,6 +246,9 @@ static int s5p_ehci_resume(struct device *dev)
234 if (pdata && pdata->phy_init) 246 if (pdata && pdata->phy_init)
235 pdata->phy_init(pdev, S5P_USB_PHY_HOST); 247 pdata->phy_init(pdev, S5P_USB_PHY_HOST);
236 248
249 /* DMA burst Enable */
250 writel(EHCI_INSNREG00_ENABLE_DMA_BURST, EHCI_INSNREG00(hcd->regs));
251
237 if (time_before(jiffies, ehci->next_statechange)) 252 if (time_before(jiffies, ehci->next_statechange))
238 msleep(100); 253 msleep(100);
239 254