mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Jason Cobham <cobham.jason@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: imx53 memory detection
Date: Thu, 14 Apr 2016 08:54:52 +0200	[thread overview]
Message-ID: <20160414065452.GA9102@pengutronix.de> (raw)
In-Reply-To: <CAKu_b=KQt3sA7LCUCb_-315n-=rohnyJxFUB4x41z-WthHrNWg@mail.gmail.com>

On Wed, Apr 13, 2016 at 09:38:35PM -0700, Jason Cobham wrote:
> Hi Sascha,
> 
> Thanks for the quick reply.
> 
> > So you replaced barebox_arm_entry with imx53_barebox_entry, right? What
> > memory size do you have and what size gets detected then?
> 
> Yes, I used imx53_barebox_entry. I have two boards, 512MB/1G. In
> further testing, I found the 512MB board was detected correctly, and
> the 1G board was detected at 2G.
> 
> ...
> 
> > As a first step you should remove the /memory node in
> > arch/arm/dts/imx53-ccxmx53.dtsi. Since there are different possible
> > memory setups for this board it is wrong anyway. Then it would be
> > interesting what imx_esdctl_v4_add_mem() detects. I believe it should be
> > possible to fix it if it detects the wrong memory size.
> 
> For the 1G board, I removed the memory node and looked into
> imx_esdctl_v4_add_mem(). I found:
> add_mem: cs0 base: 0x70000000 cs0 size: 0x40000000
> add_mem: cs1 base: 0xb0000000 cs1 size: 0x40000000
> 
> Going further into it, I found in the imx_v4_sdram_size() read the
> following from the esdctl registers:
> ctlval:0xc4110000, esdmisc:0xc00016d0 which is set from the
> appropriate flash-header file.
> 
> The ram populated on the 1G board is MT47H128M16 – 128 Meg x 16 (16
> Meg x 16 x 8 banks).
> Comparing the register setting against the datasheet for the ram chips
> looks like there was a mistake in the row setting of the 1G
> flash-header. After updating it to what I believe is correct setting:
> (ctlval:0xc3110000, esdmisc:0xc00016d0), the memory is now detected
> correctly.

So you say that the flash header sets up memory of twice the actual size
which then misleads the detection code? Then this is worth fixing, also
the /memory node should be removed. Care to send patches for this?

Thanks
 Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

      reply	other threads:[~2016-04-14  6:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-13  5:08 Jason Cobham
2016-04-13  6:36 ` Sascha Hauer
2016-04-14  4:38   ` Jason Cobham
2016-04-14  6:54     ` Sascha Hauer [this message]

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=20160414065452.GA9102@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=cobham.jason@gmail.com \
    /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