mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Alexander Aring <alex.aring@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 3/3] sama5d3: detect boot mode
Date: Wed, 6 Feb 2013 14:14:43 +0100	[thread overview]
Message-ID: <20130206131443.GE19322@game.jcrosoft.org> (raw)
In-Reply-To: <20130206100548.GA18648@x61s.8.8.8.8>

On 11:05 Wed 06 Feb     , Alexander Aring wrote:
> Hi,
> 
> On Tue, Feb 05, 2013 at 07:03:00PM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > and dynamised where we are stored
> > 
> > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> > ---
> >  arch/arm/boards/sama5d3xek/init.c |   24 ++++++++++++++++--------
> >  1 file changed, 16 insertions(+), 8 deletions(-)
> > 
> > diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
> > index 110a83f..165aaac 100644
> > --- a/arch/arm/boards/sama5d3xek/init.c
> > +++ b/arch/arm/boards/sama5d3xek/init.c
> > @@ -36,6 +36,7 @@
> >  #include <mach/at91_pmc.h>
> >  #include <mach/at91_rstc.h>
> >  #include <mach/at91sam9x5_matrix.h>
> > +#include <mach/bootmode.h>
> >  #include <input/qt1070.h>
> >  #include <readkey.h>
> >  #include <poller.h>
> > @@ -381,14 +382,21 @@ static int at91sama5d3xek_devices_init(void)
> >  
> >  	armlinux_set_bootparams((void *)(SAMA5_DDRCS + 0x100));
> >  
> > -	devfs_add_partition("nand0", 0x00000, SZ_256K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
> > -	dev_add_bb_dev("at91bootstrap_raw", "at91bootstrap");
> > -	devfs_add_partition("nand0", SZ_256K, SZ_256K + SZ_128K, DEVFS_PARTITION_FIXED, "self_raw");
> > -	dev_add_bb_dev("self_raw", "self0");
> > -	devfs_add_partition("nand0", SZ_512K + SZ_256K, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw");
> > -	dev_add_bb_dev("env_raw", "env0");
> > -	devfs_add_partition("nand0", SZ_1M, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw1");
> > -	dev_add_bb_dev("env_raw1", "env1");
> > +	if (at91_boot_media_at25() && IS_ENABLED(CONFIG_DRIVER_SPI_ATMEL)) {
> 
> I don't know, but is it better to use (at91_boot_media_at25() && at91_boot_from_spi())
> instead of checking if SPI driver is enabled at compile time?

simple I want one binary whtat work when we boot from mmc/spi/nand

so all the drivers are enabled

Best Regards,
J.
> 
> Regards
> Alex
> 
> > +		devfs_add_partition("m25p0", 0x00000, SZ_64K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
> > +		devfs_add_partition("m25p0", SZ_64K, SZ_256K + SZ_128K, DEVFS_PARTITION_FIXED, "self_raw");
> > +		devfs_add_partition("m25p0", SZ_64K + SZ_256K + SZ_128K, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw");
> > +		devfs_add_partition("m25p0", SZ_64K + SZ_512K + SZ_128K, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw1");
> > +	} else {
> > +		devfs_add_partition("nand0", 0x00000, SZ_256K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
> > +		dev_add_bb_dev("at91bootstrap_raw", "at91bootstrap");
> > +		devfs_add_partition("nand0", SZ_256K, SZ_256K + SZ_128K, DEVFS_PARTITION_FIXED, "self_raw");
> > +		dev_add_bb_dev("self_raw", "self0");
> > +		devfs_add_partition("nand0", SZ_512K + SZ_256K, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw");
> > +		dev_add_bb_dev("env_raw", "env0");
> > +		devfs_add_partition("nand0", SZ_1M, SZ_256K, DEVFS_PARTITION_FIXED, "env_raw1");
> > +		dev_add_bb_dev("env_raw1", "env1");
> > +	}
> >  
> >  	return 0;
> >  }
> > -- 
> > 1.7.10.4
> > 
> > 
> > _______________________________________________
> > barebox mailing list
> > barebox@lists.infradead.org
> > http://lists.infradead.org/mailman/listinfo/barebox

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

  reply	other threads:[~2013-02-06 13:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-05 17:59 [PATCH 0/3] at91: add boot mode detection support Jean-Christophe PLAGNIOL-VILLARD
2013-02-05 18:02 ` [PATCH 1/3] " Jean-Christophe PLAGNIOL-VILLARD
2013-02-05 18:02   ` [PATCH 2/3] sama5d3: add boot mode supprot Jean-Christophe PLAGNIOL-VILLARD
2013-02-05 18:03   ` [PATCH 3/3] sama5d3: detect boot mode Jean-Christophe PLAGNIOL-VILLARD
2013-02-06 10:05     ` Alexander Aring
2013-02-06 13:14       ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2013-02-05 18:08   ` [PATCH 1/3] at91: add boot mode detection support Marc Kleine-Budde
2013-02-06 18:27   ` Sascha Hauer
2013-02-06 18:45     ` Jean-Christophe PLAGNIOL-VILLARD

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=20130206131443.GE19322@game.jcrosoft.org \
    --to=plagnioj@jcrosoft.com \
    --cc=alex.aring@gmail.com \
    --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