mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH v1 7/8] ARM: at91: Add initialize function to sdramc
Date: Mon, 16 May 2022 17:13:06 +0200	[thread overview]
Message-ID: <YoJqAhGGJ4Qfd7Cq@ravnborg.org> (raw)
In-Reply-To: <24dc9774-0a3e-b699-e933-1bbb4e3d65e7@pengutronix.de>

Hi Ahmad,

On Mon, May 16, 2022 at 12:47:52PM +0200, Ahmad Fatoum wrote:
> Hello Sam,
> 
> On 15.05.22 21:38, Sam Ravnborg wrote:
> > +int at91sam9_sdramc_initialize(const struct at91sam9_sdramc_config *config,
> > +			       unsigned int sdram_address)
> > +{
> > +	unsigned int i;
> > +
> > +	/* Step#1 SDRAM feature must be in the configuration register */
> > +	sdramc_wr(config, AT91_SDRAMC_CR, config->cr);
> > +
> > +	/* Step#2 For mobile SDRAM, temperature-compensated self refresh(TCSR),... */
> > +
> > +	/* Step#3 The SDRAM memory type must be set in the Memory Device Register */
> > +	sdramc_wr(config, AT91_SDRAMC_MDR, config->mdr);
> > +
> > +	/* Step#4 The minimum pause of 200 us is provided to precede any single toggle */
> > +	for (i = 0; i < 1000; i++) ;
> 
> This and similar instances below must be replaced by proper delays.
> You can use early_udelay for this as you already initialize the PIT.
> 
> Did you test SDRAM worked with this setup? I assumed this to be at least
> one of the reasons current at91bootstrap fails to work with current compilers
> for the 9263. (Newer SoCs use a different DRAM controller and thus a different
> driver that doesn't use compile-time removable delay loops).

Thanks, I already looked at these with a question mark in my head but
then forgot about them - will fix.

And no - this is not yet tested, just ported from at91bootstrap.

	Sam

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox


  reply	other threads:[~2022-05-16 15:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-15 19:37 [RFC PATCH v1 0/8] ARM: at91: Add pbl support to skov-arm9cpu Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 1/8] pwm: atmel: Fix build and update Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 2/8] ARM: at91: Provide at91_mux_pio_pin for use in lowlevel Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 3/8] ARM: at91: Add at91sam9 xload_mmc for PBL use Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 4/8] ARM: at91: Add extra register definitions Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 5/8] ARM: at91: Add lowlevel helpers for at91sam9263 Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 6/8] ARM: at91: Make sdramc.h useable in multi image builds Sam Ravnborg
2022-05-15 19:38 ` [PATCH v1 7/8] ARM: at91: Add initialize function to sdramc Sam Ravnborg
2022-05-16 10:47   ` Ahmad Fatoum
2022-05-16 15:13     ` Sam Ravnborg [this message]
2022-05-15 19:38 ` [PATCH v1 8/8] ARM: at91: Add xload support to skov-arm9cpu Sam Ravnborg
2022-05-16 11:15   ` Ahmad Fatoum
2022-05-16 15:28     ` Sam Ravnborg
2022-05-16 15:35       ` Ahmad Fatoum
2022-05-16 15:47         ` Ahmad Fatoum
2022-05-30  7:20 ` [RFC PATCH v1 0/8] ARM: at91: Add pbl " Sam Ravnborg
2022-06-28 19:23 ` Sam Ravnborg
2022-06-28 21:12   ` Ahmad Fatoum
2022-06-28 21:18     ` Sam Ravnborg
2022-06-28 21:20       ` Ahmad Fatoum

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=YoJqAhGGJ4Qfd7Cq@ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=a.fatoum@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /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