summaryrefslogtreecommitdiffstats
path: root/arch/ppc/boards
diff options
context:
space:
mode:
authorRenaud Barbier <renaud.barbier@ge.com>2014-04-02 15:18:41 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2014-04-03 07:53:52 +0200
commit3e445eb1c78a1916acd2ec5238af58cd83509e94 (patch)
treee7e5463cf642b02b339fe6b5c235e061e53d60be /arch/ppc/boards
parent18156665c00ce14a47af1ec80a735098c98bdf4c (diff)
downloadbarebox-3e445eb1c78a1916acd2ec5238af58cd83509e94.tar.gz
barebox-3e445eb1c78a1916acd2ec5238af58cd83509e94.tar.xz
ppc: P2020RDB: add environment partition support
Add an environment partition and support commands so that the system configuration can be permanent. Signed-off-by: Renaud Barbier <renaud.barbier@ge.com> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/boards')
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/env/bin/init2
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/env/config2
-rw-r--r--arch/ppc/boards/freescale-p2020rdb/p2020rdb.c9
3 files changed, 9 insertions, 4 deletions
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/bin/init b/arch/ppc/boards/freescale-p2020rdb/env/bin/init
new file mode 100644
index 0000000000..4d7b03e26d
--- /dev/null
+++ b/arch/ppc/boards/freescale-p2020rdb/env/bin/init
@@ -0,0 +1,2 @@
+#!/bin/sh
+source /env/config \ No newline at end of file
diff --git a/arch/ppc/boards/freescale-p2020rdb/env/config b/arch/ppc/boards/freescale-p2020rdb/env/config
new file mode 100644
index 0000000000..23e0ba2a5d
--- /dev/null
+++ b/arch/ppc/boards/freescale-p2020rdb/env/config
@@ -0,0 +1,2 @@
+#!/bin/sh
+export bootargs="root=/dev/nfs rw ip=bootp" \ No newline at end of file
diff --git a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
index 4d2ff222c2..229ae41f08 100644
--- a/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
+++ b/arch/ppc/boards/freescale-p2020rdb/p2020rdb.c
@@ -83,7 +83,10 @@ struct i2c_platform_data i2cplat = {
static int devices_init(void)
{
add_cfi_flash_device(DEVICE_ID_DYNAMIC, CFG_FLASH_BASE, 16 << 20, 0);
-
+ devfs_add_partition("nor0", 0xf60000, 0x8000, DEVFS_PARTITION_FIXED,
+ "env0");
+ devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED,
+ "self0");
add_generic_device("i2c-fsl", 0, NULL, I2C1_BASE_ADDR,
0x100, IORESOURCE_MEM, &i2cplat);
add_generic_device("i2c-fsl", 1, NULL, I2C2_BASE_ADDR,
@@ -92,8 +95,6 @@ static int devices_init(void)
fsl_eth_init(2, &gfar_info[0]);
fsl_eth_init(3, &gfar_info[1]);
- devfs_add_partition("nor0", 0xf80000, 0x80000, DEVFS_PARTITION_FIXED,
- "self0");
return 0;
}
@@ -106,7 +107,7 @@ static struct NS16550_plat serial_plat = {
static int p2020_console_init(void)
{
- barebox_set_model("Freescale P2020 RDB");
+ barebox_set_model("Freescale P2020RDB");
barebox_set_hostname("p2020rdb");
serial_plat.clock = fsl_get_bus_freq(0);