From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] dwc: ep0: Allocate and flush dwc->ep0_trb in a cache aligned manner
Date: Tue, 3 Oct 2017 15:18:23 +0200 [thread overview]
Message-ID: <807dfdf2-d002-e202-7e4b-054479b95ef1@denx.de> (raw)
In-Reply-To: <78dff6f0-6381-3aba-4b7d-f8146404a9f8@ti.com>
On 10/03/2017 03:17 PM, Faiz Abbas wrote:
> Hi,
>
> On Tuesday 03 October 2017 05:34 PM, Marek Vasut wrote:
>> On 09/19/2017 01:15 PM, Faiz Abbas wrote:
>>> A flush of the cache is required before any DMA access can take place.
>>
>> You mean invalidation for inbound DMA, flush for outbound DMA, right ?
>
> yes thats what i meant.
>
>
>>>
>>> - dwc3_flush_cache((uintptr_t)trb, sizeof(*trb));
>>> + dwc3_flush_cache((uintptr_t)dwc->ep0_trb_addr, sizeof(*trb) * 2);
>>
>> Why *2 ?
>
> Because its allocated as sizeof(*dwc->ep0_trb) * 2 below. This is not
> strictly required as dwc3_flush_cache() rounds up the size to
> CACHELINE_SIZE but from a caller POV, flush everything we allocated.
Can the other TRB be in use ? Maybe aligning the TRBs to cacheline size
would be better ?
--
Best regards,
Marek Vasut
next prev parent reply other threads:[~2017-10-03 13:18 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-19 11:15 [U-Boot] [PATCH] dwc: ep0: Allocate and flush dwc->ep0_trb in a cache aligned manner Faiz Abbas
2017-10-03 7:35 ` Faiz Abbas
2017-10-03 9:08 ` Andy Shevchenko
2017-10-03 9:43 ` Marek Vasut
2017-10-03 9:58 ` Faiz Abbas
2017-10-03 12:04 ` Marek Vasut
2017-10-03 12:18 ` Dr. Philipp Tomsich
2017-10-03 12:52 ` Marek Vasut
2017-10-03 13:17 ` Faiz Abbas
2017-10-03 13:18 ` Marek Vasut [this message]
2017-10-04 10:51 ` Faiz Abbas
2017-10-04 12:31 ` Marek Vasut
2017-10-04 13:11 ` Faiz Abbas
2017-10-05 11:27 ` Marek Vasut
2017-10-06 11:33 ` Faiz Abbas
2017-10-10 5:37 ` Faiz Abbas
2017-10-10 5:48 ` Kishon Vijay Abraham I
2017-10-10 8:00 ` Marek Vasut
2017-10-10 10:45 ` Faiz Abbas
2017-10-10 13:49 ` Marek Vasut
2017-10-11 8:23 ` Faiz Abbas
2017-10-11 8:58 ` Kishon Vijay Abraham I
2017-10-11 13:23 ` Faiz Abbas
2017-10-03 13:01 ` Marek Vasut
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=807dfdf2-d002-e202-7e4b-054479b95ef1@denx.de \
--to=marex@denx.de \
--cc=u-boot@lists.denx.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox