* [PATCH] arm: at91: fix environment location in flash for multiple boards
@ 2011-10-13 9:51 Thomas Petazzoni
2011-10-13 9:51 ` [PATCH] arm: at91: Add Atmel NAND support in config for at91sam9m10g45ek Thomas Petazzoni
2011-10-14 7:29 ` [PATCH] arm: at91: fix environment location in flash for multiple boards Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2011-10-13 9:51 UTC (permalink / raw)
To: barebox
The environment partition was overlapping the Barebox partition in
those three Atmel boards. Saving the environment resulted in the
Barebox being overwritten.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/boards/at91sam9260ek/init.c | 2 +-
arch/arm/boards/at91sam9263ek/init.c | 2 +-
arch/arm/boards/at91sam9m10g45ek/init.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
index ea80a1b..958319e 100644
--- a/arch/arm/boards/at91sam9260ek/init.c
+++ b/arch/arm/boards/at91sam9260ek/init.c
@@ -158,7 +158,7 @@ static int at91sam9260ek_devices_init(void)
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
- devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw");
+ devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
return 0;
diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
index 40c0b7b..bb564d7 100644
--- a/arch/arm/boards/at91sam9263ek/init.c
+++ b/arch/arm/boards/at91sam9263ek/init.c
@@ -134,7 +134,7 @@ static int at91sam9263ek_devices_init(void)
#elif defined(CONFIG_NAND_ATMEL)
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
- devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw");
+ devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
#endif
diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
index 073ff42..5fdc960 100644
--- a/arch/arm/boards/at91sam9m10g45ek/init.c
+++ b/arch/arm/boards/at91sam9m10g45ek/init.c
@@ -142,7 +142,7 @@ static int at91sam9m10g45ek_devices_init(void)
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
dev_add_bb_dev("self_raw", "self0");
- devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw");
+ devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
dev_add_bb_dev("env_raw", "env0");
armlinux_set_bootparams((void *)(AT91_CHIPSELECT_6 + 0x100));
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH] arm: at91: Add Atmel NAND support in config for at91sam9m10g45ek
2011-10-13 9:51 [PATCH] arm: at91: fix environment location in flash for multiple boards Thomas Petazzoni
@ 2011-10-13 9:51 ` Thomas Petazzoni
2011-10-14 7:29 ` [PATCH] arm: at91: fix environment location in flash for multiple boards Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2011-10-13 9:51 UTC (permalink / raw)
To: barebox
Contrary to other Atmel boards, the AT91SAM9M10G45EK board file only
describes the case where NAND is used as the storage for Barebox and
its environment. Therefore, it makes sense to enable the Atmel NAND
driver in the default configuration for this board.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/configs/at91sam9m10g45ek_defconfig | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/arch/arm/configs/at91sam9m10g45ek_defconfig b/arch/arm/configs/at91sam9m10g45ek_defconfig
index deca884..9699f5b 100644
--- a/arch/arm/configs/at91sam9m10g45ek_defconfig
+++ b/arch/arm/configs/at91sam9m10g45ek_defconfig
@@ -52,6 +52,7 @@ CONFIG_DRIVER_CFI=y
CONFIG_CFI_BUFFER_WRITE=y
CONFIG_MTD=y
CONFIG_NAND=y
+CONFIG_NAND_ATMEL=y
CONFIG_UBI=y
CONFIG_MCI=y
CONFIG_MCI_WRITE=y
--
1.7.4.1
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm: at91: fix environment location in flash for multiple boards
2011-10-13 9:51 [PATCH] arm: at91: fix environment location in flash for multiple boards Thomas Petazzoni
2011-10-13 9:51 ` [PATCH] arm: at91: Add Atmel NAND support in config for at91sam9m10g45ek Thomas Petazzoni
@ 2011-10-14 7:29 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2011-10-14 7:29 UTC (permalink / raw)
To: Thomas Petazzoni; +Cc: barebox
On Thu, Oct 13, 2011 at 11:51:52AM +0200, Thomas Petazzoni wrote:
> The environment partition was overlapping the Barebox partition in
> those three Atmel boards. Saving the environment resulted in the
> Barebox being overwritten.
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Applied to master.
Sascha
> ---
> arch/arm/boards/at91sam9260ek/init.c | 2 +-
> arch/arm/boards/at91sam9263ek/init.c | 2 +-
> arch/arm/boards/at91sam9m10g45ek/init.c | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/arch/arm/boards/at91sam9260ek/init.c b/arch/arm/boards/at91sam9260ek/init.c
> index ea80a1b..958319e 100644
> --- a/arch/arm/boards/at91sam9260ek/init.c
> +++ b/arch/arm/boards/at91sam9260ek/init.c
> @@ -158,7 +158,7 @@ static int at91sam9260ek_devices_init(void)
>
> devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
> dev_add_bb_dev("self_raw", "self0");
> - devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw");
> + devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
> dev_add_bb_dev("env_raw", "env0");
>
> return 0;
> diff --git a/arch/arm/boards/at91sam9263ek/init.c b/arch/arm/boards/at91sam9263ek/init.c
> index 40c0b7b..bb564d7 100644
> --- a/arch/arm/boards/at91sam9263ek/init.c
> +++ b/arch/arm/boards/at91sam9263ek/init.c
> @@ -134,7 +134,7 @@ static int at91sam9263ek_devices_init(void)
> #elif defined(CONFIG_NAND_ATMEL)
> devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
> dev_add_bb_dev("self_raw", "self0");
> - devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw");
> + devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
> dev_add_bb_dev("env_raw", "env0");
> #endif
>
> diff --git a/arch/arm/boards/at91sam9m10g45ek/init.c b/arch/arm/boards/at91sam9m10g45ek/init.c
> index 073ff42..5fdc960 100644
> --- a/arch/arm/boards/at91sam9m10g45ek/init.c
> +++ b/arch/arm/boards/at91sam9m10g45ek/init.c
> @@ -142,7 +142,7 @@ static int at91sam9m10g45ek_devices_init(void)
>
> devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
> dev_add_bb_dev("self_raw", "self0");
> - devfs_add_partition("nand0", 0x40000, 0x40000, PARTITION_FIXED, "env_raw");
> + devfs_add_partition("nand0", 0x80000, 0x20000, PARTITION_FIXED, "env_raw");
> dev_add_bb_dev("env_raw", "env0");
>
> armlinux_set_bootparams((void *)(AT91_CHIPSELECT_6 + 0x100));
> --
> 1.7.4.1
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox
>
--
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-10-14 7:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-13 9:51 [PATCH] arm: at91: fix environment location in flash for multiple boards Thomas Petazzoni
2011-10-13 9:51 ` [PATCH] arm: at91: Add Atmel NAND support in config for at91sam9m10g45ek Thomas Petazzoni
2011-10-14 7:29 ` [PATCH] arm: at91: fix environment location in flash for multiple boards Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox