Commit 8b373ffc authored by Peter Chen's avatar Peter Chen Committed by Greg Kroah-Hartman

usb: ehci: use bus->sysdev for DMA configuration

Set the dma for ehci from sysdev. The sysdev is pointing to device that
is known to the system firmware or hardware.

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Sriram Dash <sriram.dash@nxp.com>
Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 4c39d4b9
...@@ -138,7 +138,7 @@ static void ehci_mem_cleanup (struct ehci_hcd *ehci) ...@@ -138,7 +138,7 @@ static void ehci_mem_cleanup (struct ehci_hcd *ehci)
ehci->sitd_pool = NULL; ehci->sitd_pool = NULL;
if (ehci->periodic) if (ehci->periodic)
dma_free_coherent (ehci_to_hcd(ehci)->self.controller, dma_free_coherent(ehci_to_hcd(ehci)->self.sysdev,
ehci->periodic_size * sizeof (u32), ehci->periodic_size * sizeof (u32),
ehci->periodic, ehci->periodic_dma); ehci->periodic, ehci->periodic_dma);
ehci->periodic = NULL; ehci->periodic = NULL;
...@@ -155,7 +155,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) ...@@ -155,7 +155,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
/* QTDs for control/bulk/intr transfers */ /* QTDs for control/bulk/intr transfers */
ehci->qtd_pool = dma_pool_create ("ehci_qtd", ehci->qtd_pool = dma_pool_create ("ehci_qtd",
ehci_to_hcd(ehci)->self.controller, ehci_to_hcd(ehci)->self.sysdev,
sizeof (struct ehci_qtd), sizeof (struct ehci_qtd),
32 /* byte alignment (for hw parts) */, 32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */); 4096 /* can't cross 4K */);
...@@ -165,7 +165,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) ...@@ -165,7 +165,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
/* QHs for control/bulk/intr transfers */ /* QHs for control/bulk/intr transfers */
ehci->qh_pool = dma_pool_create ("ehci_qh", ehci->qh_pool = dma_pool_create ("ehci_qh",
ehci_to_hcd(ehci)->self.controller, ehci_to_hcd(ehci)->self.sysdev,
sizeof(struct ehci_qh_hw), sizeof(struct ehci_qh_hw),
32 /* byte alignment (for hw parts) */, 32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */); 4096 /* can't cross 4K */);
...@@ -179,7 +179,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) ...@@ -179,7 +179,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
/* ITD for high speed ISO transfers */ /* ITD for high speed ISO transfers */
ehci->itd_pool = dma_pool_create ("ehci_itd", ehci->itd_pool = dma_pool_create ("ehci_itd",
ehci_to_hcd(ehci)->self.controller, ehci_to_hcd(ehci)->self.sysdev,
sizeof (struct ehci_itd), sizeof (struct ehci_itd),
32 /* byte alignment (for hw parts) */, 32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */); 4096 /* can't cross 4K */);
...@@ -189,7 +189,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) ...@@ -189,7 +189,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
/* SITD for full/low speed split ISO transfers */ /* SITD for full/low speed split ISO transfers */
ehci->sitd_pool = dma_pool_create ("ehci_sitd", ehci->sitd_pool = dma_pool_create ("ehci_sitd",
ehci_to_hcd(ehci)->self.controller, ehci_to_hcd(ehci)->self.sysdev,
sizeof (struct ehci_sitd), sizeof (struct ehci_sitd),
32 /* byte alignment (for hw parts) */, 32 /* byte alignment (for hw parts) */,
4096 /* can't cross 4K */); 4096 /* can't cross 4K */);
...@@ -199,7 +199,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags) ...@@ -199,7 +199,7 @@ static int ehci_mem_init (struct ehci_hcd *ehci, gfp_t flags)
/* Hardware periodic table */ /* Hardware periodic table */
ehci->periodic = (__le32 *) ehci->periodic = (__le32 *)
dma_alloc_coherent (ehci_to_hcd(ehci)->self.controller, dma_alloc_coherent(ehci_to_hcd(ehci)->self.sysdev,
ehci->periodic_size * sizeof(__le32), ehci->periodic_size * sizeof(__le32),
&ehci->periodic_dma, flags); &ehci->periodic_dma, flags);
if (ehci->periodic == NULL) { if (ehci->periodic == NULL) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment