mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Trent Piepho <tpiepho@kymetacorp.com>
To: Sascha Hauer <s.hauer@pengutronix.de>
Cc: barebox <barebox@lists.infradead.org>
Subject: Re: [PATCH] socfpga: Allow setting partition xloader boots from for mmc
Date: Fri, 11 Dec 2015 19:22:29 +0000	[thread overview]
Message-ID: <1449861755.26955.114.camel@rtred1test09.kymeta.local> (raw)
In-Reply-To: <20151211094142.GZ11966@pengutronix.de>

On Fri, 2015-12-11 at 10:41 +0100, Sascha Hauer wrote:
> On Thu, Dec 10, 2015 at 09:51:39PM +0000, Trent Piepho wrote:
> > The xloader boots the 2nd stage barebox from socfpga_barebox_part when
> > using NOR.  But when using MMC it boots from a hardcoded "disk0.1".
> > Add the mmc device name to the partition description and use it for
> > mmc booting.
> 
> What is the device string in your case? Is the device another one or is
> the partition another one? I'm asking because I rather have the code
> pushed into the "do the right thing" direction than in the "configure it
> correctly" direction.

On my device there are multiple partitions and I select which one to use
based on data from an eeprom.  It's disk0.boot0, disk0.boot1, etc.

The socfpga code was copied from omap. On omap the partition description
has both nand and nor.  socfpga doesn't have nand, but it does have mmc,
so it makes sense it should have both nor and mmc.

There is a board, phytec-som-am335x, that changes the default OMAP part
to something else.  See commit ed1618261b10888dba13bf97d3d316351b65eab5.

I want to do the same thing on by board, except:
SocFPGA should have mmc+nor instead of phytec's nand+nor.  Which is this
patch.
I want to select a different partition based on an eeprom, which is in
board specific code.  And doesn't have to modify the arch code.

Since SocFPGA has just one mmc controller, there is only disk0.  So one
could hard-code "disk0." and append the partition to it.  But it
increases code complexity and size in the preloader to do that.  I don't
see what the point would be.  "disk0.1" actually exists as a device
while "1" doesn't, so it seems more natural to use the former.
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2015-12-11 19:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-10 21:51 Trent Piepho
2015-12-11  9:41 ` Sascha Hauer
2015-12-11 19:22   ` Trent Piepho [this message]
2015-12-14 10:33 ` Sascha Hauer

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=1449861755.26955.114.camel@rtred1test09.kymeta.local \
    --to=tpiepho@kymetacorp.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.hauer@pengutronix.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