All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Dooks <ben.dooks@codethink.co.uk>
To: linux-sh@vger.kernel.org
Subject: Re: [PATCH RFC 0/2] ARM: shmobile: lager: Enable DMA bounce for PCI
Date: Wed, 29 Jan 2014 16:57:29 +0000	[thread overview]
Message-ID: <52E932F9.7040809@codethink.co.uk> (raw)
In-Reply-To: <1390935213-12896-1-git-send-email-valentine.barshak@cogentembedded.com>

On 29/01/14 16:37, Valentine wrote:
> On 01/29/2014 08:03 PM, Ben Dooks wrote:
>> On 29/01/14 12:47, Valentine wrote:
>>> On 01/29/2014 04:45 PM, Ben Dooks wrote:
>>>> On 29/01/14 11:15, Valentine wrote:
>>>>> On 01/29/2014 12:03 PM, Ben Dooks wrote:
>>>>>> On 29/01/14 06:45, Simon Horman wrote:
>>>>>>> On Tue, Jan 28, 2014 at 10:53:31PM +0400, Valentine Barshak wrote:
>>>>>>>> This enables DMA bounce for PCI since the controller does
>>>>>>>> not support more than 2G PCI-AHB memory window.
>>>>>>>> The problems with DMA transfers can be observed when
>>>>>>>> setting 2G/2G user/kernel memory split model
>>>>>>>> (CONFIG_VMSPLIT_2G=y)
>>>>>>>> These patches help to avoid it.
>>>>>>>
>>>>>>> Are these patches compatible with other user/kernel splits?
>>>>>>
>>>>>> PS, the bridge is only actually capable of seeing 1GiB of
>>>>>> RAM due to alignment issues in the window. You can have either
>>>>>> 0x4..0x8 or 0x8..0xc but not /both/. If you open the window to
>>>>>> 2GiB then you can see either 0x0..0x8 or 0x8..0xF range.
>>>>>>
>>>>>
>>>>> I don't think this is relater to the user/kernel space memory split.
>>>>>
>>>>> Currently the R-Car Gen2 PCI driver uses 0x40000000 - 0x7fffffff
>>>>> PCI-AHB region. We can set it to 0x00000000 - 0x7fffffff,
>>>>> but there's no RAM below 0x40000000 so no DMA access to that area is
>>>>> actually legal from the PCI USB host driver.
>>>>> So the change wouldn't give us much.
>>>>
>>>> Well, there's IO areas but probably not wanting to DMA to them anyway.
>>>>
>>>>> The 31-bit DMA mask takes care of forbidding any DMA transfers
>>>>> to the area above 0x7fffffff.
>>>>
>>>> I will add this to our current patch series and see if it helps.
>>>
>>> Helps with what?
>>>
>>> I don't see any issues with the current patches.
>>
>> We're clearly not testing the same configurations, as all your patches
>> either are not DT enabled or are for the non-multiplatform kernel
>> builds. I've tried porting your DMA bounce changes to the
>> multiplatform board-lager-reference.c file but that has not fixed
>> the issue for me.
>
> Yes, my patches are not for the DT support. They have been around for quite
> a while and my goal is to have them applied first and add DT later.
>
> You've probably done something wrong while trying to support multiplatform.
> It looks like you're either missing the patches mentioned here:
> http://marc.info/?l=linux-sh&m\x139060253506760&w=2
> or you're not binding the PCI devices to the USB phy.
> Do you have USB R-Car Gen2 phy driver enabled?
> I don't see ehci/ochi probe being deferred until USB phy is ready.
> That's why you see this error.
>
> Please, discard your own follow the steps from the link above.
> I think you mentioned lately that you had tried the non-multiplatform
> version
> and it had not worked for you. Did you actually try it?
>
> Thanks,
> Val.

I have a local patch that forces the PHY on as soon as it gets
probed by the device tree because I have not had the time to sort
out the link between the DT and the PCI.

> $ grep GEN2 out/test/.config
> CONFIG_PCI_RCAR_GEN2=y
> # CONFIG_PCI_RCAR_GEN2_ERRIRQ is not set
> CONFIG_USB_RCAR_GEN2_PHY=y

I /will/ go and check the driver is actually being probed in
case there is an issue there.

-- 
Ben Dooks				http://www.codethink.co.uk/
Senior Engineer				Codethink - Providing Genius

  parent reply	other threads:[~2014-01-29 16:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-28 18:53 [PATCH RFC 0/2] ARM: shmobile: lager: Enable DMA bounce for PCI Valentine Barshak
2014-01-29  6:45 ` Simon Horman
2014-01-29  8:03 ` Ben Dooks
2014-01-29  9:38 ` Valentine
2014-01-29 11:15 ` Valentine
2014-01-29 12:45 ` Ben Dooks
2014-01-29 12:47 ` Valentine
2014-01-29 16:03 ` Ben Dooks
2014-01-29 16:37 ` Valentine
2014-01-29 16:57 ` Ben Dooks [this message]
2014-01-29 17:05 ` Valentine

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E932F9.7040809@codethink.co.uk \
    --to=ben.dooks@codethink.co.uk \
    --cc=linux-sh@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.