public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Dalon Westergreen <dwesterg@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v3] arm: socfpga: fix issue with warm reset when CSEL is 0
Date: Sun, 05 Mar 2017 18:25:45 -0800	[thread overview]
Message-ID: <1488767145.16517.96.camel@gmail.com> (raw)
In-Reply-To: <31ea46a1-90a5-6b8a-0b73-046a72dc552f@denx.de>

On Sun, 2017-03-05 at 18:49 +0100, Marek Vasut wrote:
> On 03/05/2017 06:38 PM, Dalon Westergreen wrote:
> > 
> > On Tue, 2017-02-28 at 06:45 -0800, Dalon Westergreen wrote:
> > > 
> > > On Mon, 2017-02-20 at 06:35 -0800, Dalon Westergreen wrote:
> > > > 
> > > > 
> > > > On Mon, 2017-02-20 at 15:24 +0100, Marek Vasut wrote:
> > > > > 
> > > > > 
> > > > > 
> > > > > On 02/20/2017 03:21 PM, Dalon Westergreen wrote:
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > On Mon, 2017-02-20 at 15:14 +0100, Marek Vasut wrote:
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > On 02/20/2017 03:10 PM, Dalon Westergreen wrote:
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > On Mon, 2017-02-20 at 10:07 +0100, Marek Vasut wrote:
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > 
> > > > > > > > > On 02/18/2017 02:34 AM, Dalon Westergreen wrote:
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > 
> > > > > > > > > > When CSEL=0x0 the socfpga bootrom does not touch the clock
> > > > > > > > > > configuration for the device.  This can lead to a boot
> > > > > > > > > > failure
> > > > > > > > > > on warm resets. This patch disables warm resets when CSEL=0.
> > > > > > > > > > This results in the clock and pll configurations being reset
> > > > > > > > > > on any reset issued when CSEL=0.
> > > > > > > > > > 
> > > > > > > > > > Signed-off-by: Dalon Westergreen <dwesterg@gmail.com>
> > > > > > > > > 
> > > > > > > > > What about my suggestion for V2 about just loading function
> > > > > > > > > pointer
> > > > > > > > > into
> > > > > > > > > the reset jump address register ?
> > > > > > > > 
> > > > > > > > Frankly, i really dont like relying on the existence of a
> > > > > > > > snippet of
> > > > > > > > code in
> > > > > > > > the
> > > > > > > > onchip ram being untouched to ensure a reboot/reset will occur
> > > > > > > > for
> > > > > > > > this
> > > > > > > > csel=0
> > > > > > > > case.  i am certain this case is rarely used, and confident that
> > > > > > > > it
> > > > > > > > isnt
> > > > > > > > being
> > > > > > > > used while trying to preserve sdram contents.
> > > > > > > 
> > > > > > > Well, you already rely on such snippet, it's SPL. If you corrupt
> > > > > > > SPL
> > > > > > > and
> > > > > > > do warm reset, your system hangs, I had that multiple times :)
> > > > > > 
> > > > > > True.  I would argue to just use cold resets but i think arria 10
> > > > > > has
> > > > > > more
> > > > > > use
> > > > > > for the warm reset case.
> > > > > 
> > > > > OK
> > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > 
> > > > > > > > the downside is that the scorecard is reset every boot. so the
> > > > > > > > bootrom
> > > > > > > > will
> > > > > > > > retry all the spl images again resulting in possibly longer boot
> > > > > > > > times.
> > > > > > > 
> > > > > > > Is that significant ?
> > > > > > 
> > > > > > The watchdog timeout is on the order of 1.5 seconds.  That would be
> > > > > > for
> > > > > > each
> > > > > > failed spl.
> > > > > 
> > > > > Hm, OK. But then your system is kinda broken, so you should expect
> > > > > this
> > > > > I guess.
> > > > 
> > > > My thought exactly...  I would like to see if Chin Liang or Dinh have
> > > > any
> > > > comments?
> > > 
> > > Chin Liang, Dinh, any comments?
> > 
> > Marek, I would like to propose we move forward with this patch?
> 
> TBH I'm still thinking if you turned the V2 into C code and passed a 
> function pointer into the warm reset jump address register, that'd be 
> the best.
> 
I will give it a shot, i just dont like relying on the spl image still
being present in the onchip ram.  There is nothing preventing an errant
process or user from overwriting it and i have run into customers using
that memory for their own purposes.

-dalon

> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/listinfo/u-boot

  reply	other threads:[~2017-03-06  2:25 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-18  1:34 [U-Boot] [PATCH v3] arm: socfpga: fix issue with warm reset when CSEL is 0 Dalon Westergreen
2017-02-20  9:07 ` Marek Vasut
2017-02-20 14:10   ` Dalon Westergreen
2017-02-20 14:14     ` Marek Vasut
2017-02-20 14:21       ` Dalon Westergreen
2017-02-20 14:24         ` Marek Vasut
2017-02-20 14:35           ` Dalon Westergreen
2017-02-20 14:38             ` Marek Vasut
2017-02-28 14:45             ` Dalon Westergreen
2017-03-05 17:38               ` Dalon Westergreen
2017-03-05 17:49                 ` Marek Vasut
2017-03-06  2:25                   ` Dalon Westergreen [this message]
2017-03-07  3:46                     ` 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=1488767145.16517.96.camel@gmail.com \
    --to=dwesterg@gmail.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