Skip to contentSkip to conversation

mtd/maps: ixp4xx partition parsing

PATCH In review Brian Walsh 2 participants 4 messages Jul 10, 2006 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

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
diff -ur a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
@@ -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)
#1 lore raw
Quoted 3 lines · Brian Walsh

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.

This patch is obviously buggy and untested. "resouce" is a typo.

Quoted 13 lines

diff -ur a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c

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)
Signature · 3 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core
#2 lore raw
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_partitions would 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.c b/drivers/mtd/maps/ixp4xx.c

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)
#3 lore raw

PATCH 1/1 mtd/maps: ixp4xx partition parsing

In reply to Russell King

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 16:29:47.000000000 -0400 renamed from drivers/mtd/maps/ixp4xx.c 2006-06-17 21:49:35.000000000 -0400 +1 -1
diff -ur a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
@@ -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)