From: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
To: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
barebox@lists.infradead.org
Subject: Re: [PATCH v2 06/10] ARM: a9m2410: convert to devfs_create_partitions
Date: Thu, 27 Feb 2014 21:41:59 +0100 [thread overview]
Message-ID: <530FA317.5060604@gmail.com> (raw)
In-Reply-To: <1393533550-1865-7-git-send-email-u.kleine-koenig@pengutronix.de>
On 02/27/2014 09:39 PM, Uwe Kleine-König wrote:
> Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
> ---
> arch/arm/boards/a9m2410/a9m2410.c | 27 ++++++++++++++++++++-------
> 1 file changed, 20 insertions(+), 7 deletions(-)
>
> diff --git a/arch/arm/boards/a9m2410/a9m2410.c b/arch/arm/boards/a9m2410/a9m2410.c
> index b2b6c87117a3..943b7709bf2e 100644
> --- a/arch/arm/boards/a9m2410/a9m2410.c
> +++ b/arch/arm/boards/a9m2410/a9m2410.c
> @@ -82,6 +82,24 @@ static int a9m2410_mem_init(void)
> }
> mem_initcall(a9m2410_mem_init);
>
> +static const struct devfs_partition a9m2410_nand0_partitions[] = {
> + {
> + .offset = 0,
> + .size = 0x40000,
> + .flags = DEVFS_PARTITION_FIXED,
> + .name = "self_raw",
> + .bbname = "self0",
> + }, {
> + .offset = DEVFS_PARTITION_APPEND,
> + .size = 0x20000,
> + .flags = DEVFS_PARTITION_FIXED,
> + .name = "env_raw",
> + .bbname = "env0",
> + }, {
> + /* sentinel */
> + }
> +};
> +
> static int a9m2410_devices_init(void)
> {
> uint32_t reg;
> @@ -116,14 +134,9 @@ static int a9m2410_devices_init(void)
> add_generic_device("smc91c111", DEVICE_ID_DYNAMIC, NULL, S3C_CS1_BASE + 0x300,
> 16, IORESOURCE_MEM, NULL);
>
> -#ifdef CONFIG_NAND
> - /* ----------- add some vital partitions -------- */
> - devfs_add_partition("nand0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self_raw");
> - dev_add_bb_dev("self_raw", "self0");
> + if (IS_ENABLED(CONFIG_NAND))
> + devfs_create_partitions("nand0", a9m2410_nand0_partitions);
A lot more "readable", thanks for considering the review!
Sebastian
> - devfs_add_partition("nand0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env_raw");
> - dev_add_bb_dev("env_raw", "env0");
> -#endif
> armlinux_set_architecture(MACH_TYPE_A9M2410);
>
> return 0;
>
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2014-02-27 20:42 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-27 20:39 [PATCH v2 00/10] new partitioning helper Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 01/10] devfs: partitioning: add missing free in error path Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 02/10] devfs_add_partition: make flags parameter unsigned Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 03/10] Documentation: fix example call to devfs_add_partition Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 04/10] mtd/nand: constify filename parameter Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 05/10] devfs: partitioning: add new helper devfs_create_partitions Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 06/10] ARM: a9m2410: convert to devfs_create_partitions Uwe Kleine-König
2014-02-27 20:41 ` Sebastian Hesselbarth [this message]
2014-02-27 20:39 ` [PATCH v2 07/10] ARM: freescale-mx35-3-stack: " Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 08/10] ARM: pca100: " Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 09/10] ARM: pcm038: " Uwe Kleine-König
2014-02-27 20:39 ` [PATCH v2 10/10] ARM: sama5d3xek: " Uwe Kleine-König
2014-02-28 7:25 ` [PATCH v2 00/10] new partitioning helper Sascha Hauer
2014-02-28 7:45 ` Sascha Hauer
2014-02-28 14:09 ` 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=530FA317.5060604@gmail.com \
--to=sebastian.hesselbarth@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.