Re: [MTD] ofpart: Partitions at same address cannot have the same name

2009-04-29 Thread Benjamin Herrenschmidt
On Wed, 2009-04-22 at 10:05 +0200, Ricardo Ribalda Delgado wrote: Sometimes, an special partition is included in the device tree including all the partitions. Like in: partit...@ff00 { reg = 0x00 0x80 ; label = Root File System; }; partit...@ff80 {

Re: [MTD] ofpart: Partitions at same address cannot have the same name

2009-04-29 Thread David Woodhouse
On Thu, 2009-04-30 at 04:19 +0100, Benjamin Herrenschmidt wrote: I fail to see the point of this special partition in the first place... Things would make more sense if you had a full flash device whose child nodes are the partitions. That's the model I think I want to move to, and which

Re: [PATCH] [MTD] ofpart: Partitions at same address cannot have the same name v3

2009-04-28 Thread Segher Boessenkool
Sometimes, an special partition is included in the device tree including all the partitions. Like in: partit...@ff00 { reg = 0x00 0x80 ; label = Root File System; }; partit...@ff80 { reg = 0x80 0x1a ; label = Bitstream; }; ... f...@ff00

Re: [PATCH] [MTD] ofpart: Partitions at same address cannot have the same name v3

2009-04-27 Thread Benjamin Krill
--- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -48,7 +48,9 @@ int __devinit of_mtd_parse_partitions(struct device *dev, /* check if this is a partition node */ partname = of_get_property(pp, name, len); - if (strcmp(partname, partition) != 0)

[PATCH] [MTD] ofpart: Partitions at same address cannot have the same name v3

2009-04-24 Thread Ricardo Ribalda Delgado
Sometimes, an special partition is included in the device tree including all the partitions. Like in: partit...@ff00 { reg = 0x00 0x80 ; label = Root File System; }; partit...@ff80 { reg = 0x80 0x1a ; label = Bitstream; }; ... f...@ff00 {

[MTD] ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Ricardo Ribalda Delgado
Sometimes, an special partition is included in the device tree including all the partitions. Like in: partit...@ff00 { reg = 0x00 0x80 ; label = Root File System; }; partit...@ff80 { reg = 0x80 0x1a ; label = Bitstream; }; ...

Re: [MTD] ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Peter Korsgaard
Ricardo == Ricardo Ribalda Delgado ricardo.riba...@uam.es writes: Hi, Ricardo Sometimes, an special partition is included in the device Ricardo tree including all the partitions. Like in: Ricardo drivers/mtd/ofpart.c |3 ++- Ricardo 1 files changed, 2 insertions(+), 1 deletions(-)

ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Ricardo Ribalda Delgado
Sometimes, an special partition is included in the device tree including all the partitions. Like in: partit...@ff00 { reg = 0x00 0x80 ; label = Root File System; }; partit...@ff80 { reg = 0x80 0x1a ; label = Bitstream; }; ...

Re: [MTD] ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Ricardo Ribalda Delgado
Hello You are right, remove the -1. I thought that strlen gives the #of chars + 1 ('\0'). Thanks On Wed, Apr 22, 2009 at 11:24, Peter Korsgaard jac...@sunsite.dk wrote: Ricardo == Ricardo Ribalda Delgado ricardo.riba...@uam.es writes: Hi,  Ricardo Sometimes, an special partition is

Re: ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Benjamin Krill
--- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -48,7 +48,7 @@ int __devinit of_mtd_parse_partitions(struct device *dev, /* check if this is a partition node */ partname = of_get_property(pp, name, len); - if (strcmp(partname, partition) != 0)

Re: ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Scott Wood
Benjamin Krill wrote: --- a/drivers/mtd/ofpart.c +++ b/drivers/mtd/ofpart.c @@ -48,7 +48,7 @@ int __devinit of_mtd_parse_partitions(struct device *dev, /* check if this is a partition node */ partname = of_get_property(pp, name, len); - if

Re: ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Ricardo Ribalda Delgado
Hi Scott Perhaps compatible should be used instead? What do you mean? if (strcmp(partname, partition) || strcmp(partname, compatible) ) I can't see the advantages. Hi Recardo, I would suggest to do:                if (strcmp(partname, partition) = 0) { Check whether it sorts

Re: ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Ricardo Ribalda Delgado
Hello Benjamin Hi Recardo, I would suggest to do:                if (strcmp(partname, partition) = 0) { Anything alfabetically higher than partition (like z will pass the test :S) Regards cheers  ben -- Ricardo Ribalda http://www.eps.uam.es/~rribalda/

Re: ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Scott Wood
Ricardo Ribalda Delgado wrote: Hi Scott Perhaps compatible should be used instead? What do you mean? if (strcmp(partname, partition) || strcmp(partname, compatible) ) I can't see the advantages. No, I mean: foo { compatible = partition; ... }; -Scott

Re: ofpart: Partitions at same address cannot have the same name

2009-04-22 Thread Benjamin Krill
* Ricardo Ribalda Delgado | 2009-04-22 19:59:08 [+0200]:                if (strcmp(partname, partition) = 0) { Anything alfabetically higher than partition (like z will pass the test :S) You are totally right! cheers ben ___ Linuxppc-dev