mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: Uwe Kleine-K??nig <u.kleine-koenig@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/5] ARM: sama5d3xek: convert to devfs_append_partition
Date: Tue, 18 Feb 2014 11:43:46 +0100	[thread overview]
Message-ID: <20140218104346.GN9671@ns203013.ovh.net> (raw)
In-Reply-To: <1392719775-16886-3-git-send-email-u.kleine-koenig@pengutronix.de>

On 11:36 Tue 18 Feb     , Uwe Kleine-K??nig wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
I like it and not

can we simply use an struct now

like in linux
> ---
>  arch/arm/boards/sama5d3xek/init.c | 18 ++++++++++++++----
>  1 file changed, 14 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boards/sama5d3xek/init.c b/arch/arm/boards/sama5d3xek/init.c
> index 4f866aa6f85d..ba5f90c7063c 100644
> --- a/arch/arm/boards/sama5d3xek/init.c
> +++ b/arch/arm/boards/sama5d3xek/init.c
> @@ -402,6 +402,8 @@ static void ek_add_device_hdmi(void)
>  
>  static int at91sama5d3xek_devices_init(void)
>  {
> +	loff_t offset = 0x0;
> +
>  	ek_add_device_w1();
>  	ek_add_device_hdmi();
>  	ek_add_device_nand();
> @@ -411,13 +413,21 @@ static int at91sama5d3xek_devices_init(void)
>  	ek_add_device_mci();
>  	ek_add_device_lcdc();
>  
> -	devfs_add_partition("nand0", 0x00000, SZ_256K, DEVFS_PARTITION_FIXED, "at91bootstrap_raw");
> +	devfs_append_partition("nand0", &offset, 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");
> +	devfs_append_partition("nand0", &offset, 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");
> +
> +	/* there is a hole in the partition layout of 128K */
> +	offset = SZ_512K + SZ_256K;
> +
> +	devfs_append_partition("nand0", &offset, 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");
> +	devfs_append_partition("nand0", &offset, SZ_256K,
> +			DEVFS_PARTITION_FIXED, "env_raw1");
>  	dev_add_bb_dev("env_raw1", "env1");
>  
>  	return 0;
> -- 
> 1.8.5.3
> 
> 
> _______________________________________________
> 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:[~2014-02-18 10:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-18 10:36 [PATCH 0/5] Introduce devfs_append_partition and a few users Uwe Kleine-König
2014-02-18 10:36 ` [PATCH 1/5] devfs-core: introduce devfs_append_partition Uwe Kleine-König
2014-02-18 10:36 ` [PATCH 2/5] ARM: sama5d3xek: convert to devfs_append_partition Uwe Kleine-König
2014-02-18 10:43   ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2014-02-18 10:36 ` [PATCH 3/5] ARM: a9m2410: " Uwe Kleine-König
2014-02-18 10:36 ` [PATCH 4/5] ARM: freescale-mx35-3-stack: " Uwe Kleine-König
2014-02-18 10:36 ` [PATCH 5/5] ARM: pca100: " Uwe Kleine-König

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=20140218104346.GN9671@ns203013.ovh.net \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@lists.infradead.org \
    --cc=u.kleine-koenig@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