Commit 327c62c5 authored by Jonas Gorski's avatar Jonas Gorski Committed by David Woodhouse

mtd: bcm63xxpart: don't assume NVRAM is always the fourth partition

Instead of referencing the sizes of fixed partitions, use the
precomputed CFE/NVRAM lengths.
Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 678eb9bb
...@@ -165,8 +165,8 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master, ...@@ -165,8 +165,8 @@ static int bcm63xx_parse_cfe_partitions(struct mtd_info *master,
/* Global partition "linux" to make easy firmware upgrade */ /* Global partition "linux" to make easy firmware upgrade */
curpart++; curpart++;
parts[curpart].name = "linux"; parts[curpart].name = "linux";
parts[curpart].offset = parts[0].size; parts[curpart].offset = cfelen;
parts[curpart].size = master->size - parts[0].size - parts[3].size; parts[curpart].size = master->size - cfelen - nvramlen;
for (i = 0; i < nrparts; i++) for (i = 0; i < nrparts; i++)
pr_info("Partition %d is %s offset %lx and length %lx\n", i, pr_info("Partition %d is %s offset %lx and length %lx\n", i,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment