From: Marek Vasut <marex@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: socfpga: Fix cache configuration
Date: Mon, 9 Nov 2015 17:02:12 +0100 [thread overview]
Message-ID: <201511091702.12416.marex@denx.de> (raw)
In-Reply-To: <5640BFEE.2050303@denx.de>
On Monday, November 09, 2015 at 04:46:54 PM, Stefan Roese wrote:
> Hi Marek,
Hi!
> On 09.11.2015 14:49, Marek Vasut wrote:
>
> <snip>
>
> >>>> --- a/include/configs/socfpga_common.h
> >>>> +++ b/include/configs/socfpga_common.h
> >>>> @@ -73,7 +73,6 @@
> >>>>
> >>>> /*
> >>>>
> >>>> * Cache
> >>>> */
> >>>>
> >>>> -#define CONFIG_SYS_ARM_CACHE_WRITEALLOC
> >>>>
> >>>> #define CONFIG_SYS_CACHELINE_SIZE 32
> >>>> #define CONFIG_SYS_L2_PL310
> >>>> #define CONFIG_SYS_PL310_BASE SOCFPGA_MPUL2_ADDRESS
> >>>
> >>> I hate to say it, but I am running into issues with this patch :-(
> >>
> >> I'm sorry to hear this.
> >>
> >>> I use a standard USB stick here and with this patch, I am getting the
> >>> following failure (with enabled and disabled cache):
> >>>
> >>> => usb reset
> >>> resetting USB...
> >>> USB0: Core Release: 2.93a
> >>> scanning bus 0 for devices... unable to get descriptor, error 0
> >>> usb_new_device: Cannot read configuration, skipping device 058f:6387
> >>> 1 USB Device(s) found
> >>>
> >>> scanning usb for storage devices... 0 Storage Device(s) found
> >>>
> >>> => dcache off
> >>> => usb reset
> >>> resetting USB...
> >>> USB0: Core Release: 2.93a
> >>> scanning bus 0 for devices... 2 USB Device(s) found
> >>>
> >>> scanning usb for storage devices... 1 Storage Device(s) found
> >>>
> >>> If I revert this patch, my USB stick works as well.
> >>>
> >>> I am also aware that Stefan mentions that without this patch, cache is
> >>> not enabled at all. On the other hand, I cannot find any obviously
> >>> faulty behavior in the dwc2 driver, it does
> >>> flush_dcache_range()/invalidate_dcache_range() in the right places.
> >>>
> >>> Any ideas please ?
> >>
> >> Perhaps its a timing related issue? As the code is executed faster
> >> with cache enabled. Just an idea - perhaps there is still some ugly
> >> code that doesn't do proper timer based loops / delays.
> >
> > I doubt that's not the case. If I disable cache just around the hcdma bit
> > in the driver (disable before the flush_dcache_range() and enable after
> > invalidate_dcache_range() in the driver), it still fails.
>
> Did you check if this problem is perhaps also related to Dinh's L2
> cache patch:
>
> 8d8e13e1 arm: socfpga: enable data/inst prefetch and shared override in the
> L2
>
> ?
Yes I did, but reverting this patch had no impact.
> I just noticed, that here the L2 cache gets disabled and is not
> enabled again in function v7_outer_cache_enable(). This looks a
> bit suspicious.
>
> Dinh, did you perhaps miss to re-enable the L2 cache after the
> aux_ctrl register setup again?
I guess we should pester Dinh now :-)
next prev parent reply other threads:[~2015-11-09 16:02 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 15:30 [U-Boot] [PATCH] arm: socfpga: Fix cache configuration Stefan Roese
2015-09-17 15:37 ` Marek Vasut
2015-09-18 6:16 ` Pavel Machek
2015-09-18 6:24 ` Stefan Roese
2015-09-18 6:34 ` Pavel Machek
2015-09-18 6:41 ` Stefan Roese
2015-11-09 0:10 ` Marek Vasut
2015-11-09 11:42 ` Stefan Roese
2015-11-09 13:49 ` Marek Vasut
2015-11-09 15:46 ` Stefan Roese
2015-11-09 16:02 ` Marek Vasut [this message]
2015-11-12 0:49 ` Chin Liang See
2015-11-12 0:53 ` Marek Vasut
2015-11-12 2:33 ` Chin Liang See
2015-11-12 3:48 ` Marek Vasut
2015-12-03 0:10 ` Marek Vasut
2015-12-03 16:11 ` Chin Liang See
2015-12-03 16:22 ` Marek Vasut
2015-12-07 14:37 ` Chin Liang See
2015-12-07 14:44 ` Marek Vasut
2015-12-07 14:47 ` Chin Liang See
2015-12-08 11:13 ` Pavel Machek
2015-12-08 12:04 ` Stefan Roese
2015-12-08 12:54 ` Marek Vasut
2015-12-09 13:48 ` Chin Liang See
2015-12-09 14:12 ` Marek Vasut
2015-12-08 12:53 ` Marek Vasut
2015-12-09 13:50 ` Chin Liang See
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=201511091702.12416.marex@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