aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-11-04 18:37:05 +0000
committerGabor Juhos <juhosg@openwrt.org>2013-11-04 18:37:05 +0000
commit49c7b92ff64cbea9f66436130cab375716875407 (patch)
treec62f30861c8da40a9ae791e91d07e71fe8cdcd6b /target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch
parent0986dff6ec307d608b65bc71617f1253fab06ad2 (diff)
downloadmaster-187ad058-49c7b92ff64cbea9f66436130cab375716875407.tar.gz
master-187ad058-49c7b92ff64cbea9f66436130cab375716875407.tar.bz2
master-187ad058-49c7b92ff64cbea9f66436130cab375716875407.zip
kernel/3.1[02]: move MTD root device setup code to mtdcore
The current code only allows to automatically set root device on MTD partitions. Move the code to MTD core to allow to use it with all MTD devices. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@38643 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch')
-rw-r--r--target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch22
1 files changed, 7 insertions, 15 deletions
diff --git a/target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch b/target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch
index 6a4c16134e..6c17b01e53 100644
--- a/target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch
+++ b/target/linux/generic/patches-3.10/400-mtd-add-rootfs-split-support.patch
@@ -35,16 +35,15 @@
depends on m
--- a/drivers/mtd/mtdpart.c
+++ b/drivers/mtd/mtdpart.c
-@@ -29,6 +29,8 @@
+@@ -29,6 +29,7 @@
#include <linux/kmod.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/partitions.h>
-+#include <linux/root_dev.h>
+#include <linux/magic.h>
#include <linux/err.h>
#include "mtdcore.h"
-@@ -45,13 +47,14 @@ struct mtd_part {
+@@ -45,13 +46,14 @@ struct mtd_part {
struct list_head list;
};
@@ -60,7 +59,7 @@
/*
* MTD methods which simply translate the effective address and pass through
* to the _real_ device.
-@@ -533,8 +536,10 @@ out_register:
+@@ -533,8 +535,10 @@ out_register:
return slave;
}
@@ -73,7 +72,7 @@
{
struct mtd_partition part;
struct mtd_part *p, *new;
-@@ -566,21 +571,24 @@ int mtd_add_partition(struct mtd_info *m
+@@ -566,21 +570,24 @@ int mtd_add_partition(struct mtd_info *m
end = offset + length;
mutex_lock(&mtd_partitions_mutex);
@@ -108,7 +107,7 @@
return ret;
err_inv:
-@@ -590,6 +598,12 @@ err_inv:
+@@ -590,6 +597,12 @@ err_inv:
}
EXPORT_SYMBOL_GPL(mtd_add_partition);
@@ -121,7 +120,7 @@
int mtd_del_partition(struct mtd_info *master, int partno)
{
struct mtd_part *slave, *next;
-@@ -613,6 +627,151 @@ int mtd_del_partition(struct mtd_info *m
+@@ -613,6 +626,144 @@ int mtd_del_partition(struct mtd_info *m
}
EXPORT_SYMBOL_GPL(mtd_del_partition);
@@ -252,13 +251,6 @@
+ if (!strcmp(part->mtd.name, "rootfs")) {
+ rootfs_found = 1;
+
-+ if (config_enabled(CONFIG_MTD_ROOTFS_ROOT_DEV) &&
-+ ROOT_DEV == 0) {
-+ printk(KERN_NOTICE "mtd: partition \"rootfs\" "
-+ "set to be root filesystem\n");
-+ ROOT_DEV = MKDEV(MTD_BLOCK_MAJOR, part->mtd.index);
-+ }
-+
+ if (config_enabled(CONFIG_MTD_ROOTFS_SPLIT))
+ split_rootfs_data(master, part);
+ }
@@ -273,7 +265,7 @@
/*
* This function, given a master MTD object and a partition table, creates
* and registers slave MTD objects which are bound to the master according to
-@@ -642,6 +801,7 @@ int add_mtd_partitions(struct mtd_info *
+@@ -642,6 +793,7 @@ int add_mtd_partitions(struct mtd_info *
mutex_unlock(&mtd_partitions_mutex);
add_mtd_device(&slave->mtd);