All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dalon L Westergreen <dalon.westergreen@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: socfpga: move gen5 SDR driver to DM
Date: Fri, 08 Feb 2019 14:51:29 -0800	[thread overview]
Message-ID: <70af5270f59aee8ed9f9786161ffb5193929cec5.camel@linux.intel.com> (raw)
In-Reply-To: <CAAh8qsxFGvbU6f_bt2S-LCEgOZ=qao=L_fWQM6Od0Oqq0bA9dA@mail.gmail.com>

On Fri, 2019-02-08 at 21:36 +0100, Simon Goldschmidt wrote:
> 
> 
> Am Fr., 8. Feb. 2019, 21:28 hat Dalon L Westergreen <
> dalon.westergreen at linux.intel.com> geschrieben:
> > On Thu, 2019-02-07 at 22:23 +0100, Simon Goldschmidt wrote:
> > > To clean up reset handling for socfpga gen5, let's move the code snippet
> > > taking the DDR controller out of reset from SPL to the DDR driver.
> > > 
> > > While at it, port the ddr driver to UCLASS_RAM and use dts.
> > > 
> > > Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
> > > ---
> > > 
> > > This is an RFC to show what the SDRAM driver moved to DM (UCLASS_RAM)
> > would
> > > look like. It's RFC both because Dinh did not seem too fond of changing
> > the
> > > register address of the SDR in devicetree to include what the undocumented
> > > registers 'sequencer.c' uses as well as because of my observed code
> > growth.
> > > 
> > > Basically, I want to move this to UCLASS_RAM and I want to read the reset
> > > property for SDR from devicetree. What remains RFC is: do we want/need to
> > > read the base address from devicetree, or can we live with it being hard-
> > > coded (and maybe sanity-checked during probe)?
> > > 
> > 
> > My 2 cents, i love the idea of moving all of the socfgpa sdram code to DM.
> > Looking at the code, i would suggest that we should handle the case where
> > there is no HPS sdram controller, and instead an FPGA based controller is
> > used.  Although not common, it is a use case i have seen repeatedly.
> 
> While I haven't used it like that (I did use an FPGA RAM controller, but that
> was with a NIOS and not Linux, not HPS), I guess it should work with my
> changed. Just disable the 'sdr' node in the devicetree. You'll need a driver
> for the FPGA based RAM controller though.
> 
> Or, in the setup you mentioned, would the existing driver be the same? I.e.
> just use a different base address? Or is it a different IP?

All you need is to have the h2f bridge enabled during the boot.  We used to do
this for you if spl found that the FPGA was already configured.  On the FPGA
side, a nios in the ddr controller runs the ddr calibration code.

-dalon

> 
> Regards,
> Simon

  reply	other threads:[~2019-02-08 22:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-07 21:23 [U-Boot] [PATCH] arm: socfpga: move gen5 SDR driver to DM Simon Goldschmidt
2019-02-08 20:28 ` Dalon L Westergreen
2019-02-08 20:36   ` Simon Goldschmidt
2019-02-08 22:51     ` Dalon L Westergreen [this message]
2019-02-09 10:02       ` Marek Vasut
2019-02-11 18:38         ` Dalon L Westergreen
2019-02-11 19:38           ` Simon Goldschmidt
2019-02-09 10:01 ` Marek Vasut
2019-02-09 10:38   ` Simon Goldschmidt
2019-02-13 21:10     ` Simon Goldschmidt
2019-02-14 15:37   ` Dinh Nguyen
2019-02-14 15:39     ` Simon Goldschmidt

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=70af5270f59aee8ed9f9786161ffb5193929cec5.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 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.