Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-11-05 Thread Arnd Bergmann
On Tuesday 04 November 2014 10:33:18 Al Stone wrote: > On 11/03/2014 10:14 AM, Arnd Bergmann wrote: > > On Monday 03 November 2014 09:15:51 Mark Salter wrote: > >> On Thu, 2014-10-30 at 22:05 +0100, Arnd Bergmann wrote: > >>> Note that the discussions about merging ACPI support on ARM64 > >>> are b

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-11-04 Thread Al Stone
On 11/03/2014 10:14 AM, Arnd Bergmann wrote: > On Monday 03 November 2014 09:15:51 Mark Salter wrote: >> On Thu, 2014-10-30 at 22:05 +0100, Arnd Bergmann wrote: >>> You should definitely make sure that this also works with DT, as >>> I don't think it's possible to support X-Gene with ACPI. I know >

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-11-03 Thread Mark Salter
On Mon, 2014-11-03 at 18:14 +0100, Arnd Bergmann wrote: > On Monday 03 November 2014 09:15:51 Mark Salter wrote: > > On Thu, 2014-10-30 at 22:05 +0100, Arnd Bergmann wrote: > > > You should definitely make sure that this also works with DT, as > > > I don't think it's possible to support X-Gene wit

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-11-03 Thread Arnd Bergmann
On Monday 03 November 2014 09:15:51 Mark Salter wrote: > On Thu, 2014-10-30 at 22:05 +0100, Arnd Bergmann wrote: > > You should definitely make sure that this also works with DT, as > > I don't think it's possible to support X-Gene with ACPI. I know > > that Al Stone has experimented with it in the

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-11-03 Thread Mark Salter
On Thu, 2014-10-30 at 22:05 +0100, Arnd Bergmann wrote: > You should definitely make sure that this also works with DT, as > I don't think it's possible to support X-Gene with ACPI. I know > that Al Stone has experimented with it in the past, but he never > came back with any results, so I assume t

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-31 Thread Arnd Bergmann
On Friday 31 October 2014 12:32:47 Mark Langsdorf wrote: > On 10/31/2014 10:49 AM, Arnd Bergmann wrote: > > On Friday 31 October 2014 09:22:26 Mark Langsdorf wrote: > >> On 10/30/2014 04:05 PM, Arnd Bergmann wrote: > >>> On Thursday 30 October 2014 15:09:33 Mark Langsdorf wrote: > >>> > >>> You sho

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-31 Thread Mark Langsdorf
On 10/31/2014 10:49 AM, Arnd Bergmann wrote: On Friday 31 October 2014 09:22:26 Mark Langsdorf wrote: On 10/30/2014 04:05 PM, Arnd Bergmann wrote: On Thursday 30 October 2014 15:09:33 Mark Langsdorf wrote: You should not access pdev->dev.dma_mask here, that gets set by the platform code. You s

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-31 Thread Arnd Bergmann
On Friday 31 October 2014 09:22:26 Mark Langsdorf wrote: > On 10/30/2014 04:05 PM, Arnd Bergmann wrote: > > On Thursday 30 October 2014 15:09:33 Mark Langsdorf wrote: > > > > You should not access pdev->dev.dma_mask here, that gets set > > by the platform code. You should be able to just use > > dm

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-31 Thread Mark Langsdorf
On 10/30/2014 04:05 PM, Arnd Bergmann wrote: On Thursday 30 October 2014 15:09:33 Mark Langsdorf wrote: On 10/30/2014 02:05 PM, Arnd Bergmann wrote: On Thursday 30 October 2014 13:16:28 Mark Langsdorf wrote: - /* Initialize dma_mask and coherent_dma_mask to 32-bits */ - ret = dma_s

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-30 Thread Arnd Bergmann
On Thursday 30 October 2014 15:09:33 Mark Langsdorf wrote: > On 10/30/2014 02:05 PM, Arnd Bergmann wrote: > > On Thursday 30 October 2014 13:16:28 Mark Langsdorf wrote: > >> - /* Initialize dma_mask and coherent_dma_mask to 32-bits */ > >> - ret = dma_set_coherent_mask(&pdev->dev, DMA_B

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-30 Thread Mark Langsdorf
On 10/30/2014 02:05 PM, Arnd Bergmann wrote: On Thursday 30 October 2014 13:16:28 Mark Langsdorf wrote: - /* Initialize dma_mask and coherent_dma_mask to 32-bits */ - ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); - if (ret) - return ret; + /* Tr

Re: [PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-30 Thread Arnd Bergmann
On Thursday 30 October 2014 13:16:28 Mark Langsdorf wrote: > - /* Initialize dma_mask and coherent_dma_mask to 32-bits */ > - ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32)); > - if (ret) > - return ret; > + /* Try setting the coherent_dma_mask to 64

[PATCH 1/2] [usb] make xhci platform driver use 64 bit or 32 bit DMA

2014-10-30 Thread Mark Langsdorf
The xhci platform driver needs to work on systems that either only support 64-bit DMA or only support 32-bit DMA. Attempt to set a coherent dma mask for 64-bit DMA, and attempt again with 32-bit DMA if that fails. Signed-off-by: Mark Langsdorf --- drivers/usb/host/xhci-plat.c | 13 -