From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ARM: socfpga: Remove socfpga_sdram_apply_static_cfg()
Date: Mon, 16 Mar 2020 11:04:55 -0700 [thread overview]
Message-ID: <aa6ecd85a852b533cb368042e1238da298a0a76a.camel@linux.intel.com> (raw)
In-Reply-To: <ab1775be-7227-9ff0-e8dc-9f54fa3cd08b@denx.de>
On Thu, 2020-03-12 at 16:57 +0100, Marek Vasut wrote:
> On 3/12/20 4:54 PM, Dalon L Westergreen wrote:
> [...]
>
> (thanks for fixing your mailer :))
>
> > > > > > > The problem was that this was causing weird sporadic hangs on
> > > > > > > Gen5,
> > > > > > > which is why it was removed. So until there is an explanation for
> > > > > > > those
> > > > > > > hangs, I'm not really OK with this.
> > > > > >
> > > > > > These sporadic hangs you saw were on devices without an FPGA image
> > > > > > directly
> > > > > > accessing the SDRAM ports, right?
> > > > >
> > > > > Yes
> > > > >
> > > > > > > Maybe the application of static config should happen in SPL,
> > > > > > > before
> > > > > > > the
> > > > > > > DRAM is running, or something like that ?
> > > > > >
> > > > > > Thinking this further, limiting it to applying in SPL is not a good
> > > > > > idea
> > > > > > since
> > > > > > that prevents us from implementing different FPGA images/configs by
> > > > > > loading a
> > > > > > config later in the boot (i.e. in U-Boot from a FIT-image).
> > > > >
> > > > > Well, but later we have SDRAM running and we cannot make it go idle,
> > > > > can
> > > > > we?
> > > > >
> >
> > Unfortunately the sdram cfg apply must occur AFTER the fpga is
> > configured. This
> > is because the FPGA drives configuration bits, around the interfaces
> > datawidth
> > for example, that are used in setting up the dram interface. I believe the
> > intent is for the command to only run when the ridge enable function is
> > called.
>
> So that's one part of the fix -- only run this apply_static_cfg if the
> bitstream uses the F2S bridge.
actually, the restriction is to apply this only if the FPGA is configured,
whether the bridge is used is irrelevant. you can further restrict this
to only when the bridge is used, but to me that means devicetree entries
or something to determine whether it is used.
>
> > > > > > Would it work to make setting this optional, i.e. only write the bit
> > > > > > if
> > > > > > an FPGA
> > > > > > config actually uses these ports? Then it couldn't lead to problems
> > > > > > on
> > > > > > other
> > > > > > hardware...
> > > > >
> > > > > Can you make SDRAM bus really idle ?
> > > >
> > > > From the CPU side, that should work, no? Of course you have to make sure
> > > > no
> > > > other peripheraly (including FPGA!) are using the RAM.
> > > >
> > > > And if this would be an explicit command, people needing this could
> > > > experiment with it - and hopefully give better hints as to what's going
> > > > wrong
> > > > if we *do* see problems again.
> > >
> > > Maybe altera has something hidden somewhere in the bus tunables ? :)
> >
> > The only trick i am aware of, and Ley Foon, please comment, is isolating
> > relevant code to the caches before executing.
>
> How do you make sure some DMA doesn't do something funny or some pending
> write doesn't trigger DRAM write ? There is more than the CPU that can
> access the DRAM and cause bus traffic.
True, and it is unclear how we could ensure there is absolutely no traffic.
--dalon
next prev parent reply other threads:[~2020-03-16 18:04 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-06 10:50 [U-Boot] [PATCH] ARM: socfpga: Remove socfpga_sdram_apply_static_cfg() Nico Becker
2020-02-06 11:53 ` Marek Vasut
2020-02-06 12:57 ` Nico Becker
2020-02-06 13:00 ` Marek Vasut
2020-02-06 14:13 ` Nico Becker
2020-02-06 14:57 ` Simon Goldschmidt
2020-02-07 7:55 ` Marek Vasut
2020-02-07 12:09 ` Simon Goldschmidt
2020-02-07 12:27 ` Marek Vasut
2020-02-07 13:44 ` Simon Goldschmidt
2020-02-07 13:49 ` Marek Vasut
2020-02-12 18:52 ` Dalon L Westergreen
2020-03-09 8:50 ` Ley Foon Tan
2020-03-09 12:57 ` Marek Vasut
2020-03-09 14:10 ` Simon Goldschmidt
2020-03-09 14:15 ` Marek Vasut
2020-03-09 14:24 ` Simon Goldschmidt
2020-03-09 14:25 ` Marek Vasut
2020-03-12 15:54 ` Dalon L Westergreen
2020-03-12 15:57 ` Marek Vasut
2020-03-16 18:04 ` Dalon L Westergreen [this message]
2020-03-16 19:04 ` Simon Goldschmidt
2020-03-16 19:06 ` Marek Vasut
2020-03-16 19:09 ` Simon Goldschmidt
2020-03-16 19:19 ` Marek Vasut
2020-03-16 19:55 ` Dalon L Westergreen
2020-03-16 20:01 ` Simon Goldschmidt
2020-03-20 7:52 ` Ley Foon Tan
2020-03-31 8:13 ` Ley Foon Tan
2020-03-31 11:27 ` Marek Vasut
2020-03-11 9:54 ` Ley Foon Tan
2020-03-11 9:58 ` Marek Vasut
2020-03-12 9:31 ` Ley Foon Tan
2020-03-12 11:34 ` Marek Vasut
-- strict thread matches above, loose matches on Subject: below --
2019-04-23 16:14 Marek Vasut
2019-04-26 6:39 ` Simon Goldschmidt
2019-04-29 8:34 ` Marek Vasut
2019-04-29 13:02 ` See, Chin Liang
2019-04-29 21:29 ` 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=aa6ecd85a852b533cb368042e1238da298a0a76a.camel@linux.intel.com \
--to=dalon.westergreen@linux.intel.com \
--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