mtd/maps: ixp4xx partition parsing
PATCH 1/1 mtd/maps: ixp4xx partition parsing
If the amount of flash is not divisible by 2 then the mask in parse_mtd_partitions would fail to work as designed. Passing in the base address corrects this problem.
---
drivers/mtd/maps/ixp4xx.c 2006-07-10 13:34:09.000000000 -0400 renamed from drivers/mtd/maps/ixp4xx.c 2006-06-17 21:49:35.000000000 -0400 +1 -1
@@ -253,7 +253,7 @@ /* Use the fast version */ info->map.write = ixp4xx_write16, - err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); + err = parse_mtd_partitions(info->mtd, probes, &info->partitions,
dev->resouce->start);
if (err > 0) {
err = add_mtd_partitions(info->mtd, info->partitions, err);
if(err)Quoted 3 lines · Brian Walsh
If the amount of flash is not divisible by 2 then the mask in
parse_mtd_partitionswould fail to work as designed. Passing in the base address corrects this problem.
This patch is obviously buggy and untested. "resouce" is a typo.
Quoted 13 lines
diff -ur
a/drivers/mtd/maps/ixp4xx.cb/drivers/mtd/maps/ixp4xx.cdrivers/mtd/maps/ixp4xx.c 2006-07-10 13:34:09.000000000 -0400 renamed from drivers/mtd/maps/ixp4xx.c 2006-06-17 21:49:35.000000000 -0400 +1
-1@@ -253,7 +253,7 @@ /* Use the fast version */ info->map.write = ixp4xx_write16, - err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); + err = parse_mtd_partitions(info->mtd, probes, &info->partitions, dev->resouce->start); if (err > 0) { err = add_mtd_partitions(info->mtd, info->partitions, err);if(err)
Signature · 3 lines
Russell King Linux kernel 2.6 ARM Linux - http://www.arm.linux.org.uk/ maintainer of: 2.6 Serial core
Quoted 9 lines · Russell King
Quoted 4 lines · Brian Walsh
If the amount of flash is not divisible by 2 then the mask in
parse_mtd_partitionswould fail to work as designed. Passing in the base address corrects this problem.This patch is obviously buggy and untested. "resouce" is a typo.
??
Strange, not sure how that 'r' got dropped. I will resubmit it corrected.
Quoted 17 lines
Quoted 15 lines
diff -ur
a/drivers/mtd/maps/ixp4xx.cb/drivers/mtd/maps/ixp4xx.cdrivers/mtd/maps/ixp4xx.c 2006-07-10 13:34:09.000000000 -0400 renamed from drivers/mtd/maps/ixp4xx.c 2006-06-17 21:49:35.000000000 -0400 +1
-1@@ -253,7 +253,7 @@ /* Use the fast version */ info->map.write = ixp4xx_write16, - err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); + err = parse_mtd_partitions(info->mtd, probes, &info->partitions, dev->resouce->start); if (err > 0) { err = add_mtd_partitions(info->mtd, info->partitions, err);if(err)
PATCH 1/1 mtd/maps: ixp4xx partition parsing
In reply to Russell KingIf the amount of flash is not divisible by 2 then the mask in parse_mtd_partitions would fail to work as designed. Passing in the base address corrects this problem.
---
drivers/mtd/maps/ixp4xx.c 2006-07-10 16:29:47.000000000 -0400 renamed from drivers/mtd/maps/ixp4xx.c 2006-06-17 21:49:35.000000000 -0400 +1 -1
@@ -253,7 +253,7 @@ /* Use the fast version */ info->map.write = ixp4xx_write16, - err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); + err = parse_mtd_partitions(info->mtd, probes, &info->partitions, dev->resource->start); if (err > 0) { err = add_mtd_partitions(info->mtd, info->partitions, err); if(err)