[PATCH 08/10] ARM: pca100: convert to devfs_create_partitions
Uwe Kleine-König
u.kleine-koenig at pengutronix.de
Tue Feb 25 17:51:19 EST 2014
Signed-off-by: Uwe Kleine-König <u.kleine-koenig at pengutronix.de>
---
arch/arm/boards/phycard-i.MX27/pca100.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/arch/arm/boards/phycard-i.MX27/pca100.c b/arch/arm/boards/phycard-i.MX27/pca100.c
index 2ff1b793291c..66ad0c772b96 100644
--- a/arch/arm/boards/phycard-i.MX27/pca100.c
+++ b/arch/arm/boards/phycard-i.MX27/pca100.c
@@ -178,7 +178,6 @@ static void pca100_usb_init(void)
static int pca100_devices_init(void)
{
int i;
- struct device_d *nand;
unsigned int mode[] = {
PD0_AIN_FEC_TXD0,
@@ -286,12 +285,22 @@ static int pca100_devices_init(void)
pca100_usb_register();
#endif
- nand = get_device_by_name("nand0");
- devfs_add_partition("nand0", 0x00000, 0x40000, DEVFS_PARTITION_FIXED, "self_raw");
- dev_add_bb_dev("self_raw", "self0");
-
- devfs_add_partition("nand0", 0x40000, 0x20000, DEVFS_PARTITION_FIXED, "env_raw");
- dev_add_bb_dev("env_raw", "env0");
+ devfs_create_partitions("nand0", (struct devfs_partition[]){
+ {
+ .offset = 0x00000,
+ .size = 0x40000,
+ .flags = DEVFS_PARTITION_FIXED,
+ .name = "self_raw",
+ .bbname = "self0",
+ }, {
+ .offset = DEVFS_PARTITION_APPEND, /* 0x40000 */
+ .size = 0x20000,
+ .flags = DEVFS_PARTITION_FIXED,
+ .name = "env_raw",
+ .bbname = "env0",
+ }, {
+ /* sentinel */
+ }});
armlinux_set_architecture(2149);
--
1.8.5.3
More information about the barebox
mailing list