* [MPC8272ADS]Problem adding flash partitions inside the device tree
@ 2009-02-12 9:23 Jean-Michel Hautbois
2009-02-12 11:05 ` Pieter
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2009-02-12 9:23 UTC (permalink / raw)
To: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 2422 bytes --]
Hi everybody !
I am currently trying to add the support of partitions for the Flash chip on
my MPC8272ADS board (the chips are Sharp LH28F016SCT-L90).
I have added this part:
flash@0,0 {
compatible = "jedec-flash";
reg = <0x0 0x0 0x2000000>;
bank-width = <4>;
device-width = <1>;
partition@ff800000 {
label = "kernel";
reg = <0xff800000 0x00400000>;
read-only;
};
partition@ffc00000 {
label = "user";
reg = <0xffc00000 0x00300000>;
};
partition@fff00000 {
label = "u-boot";
reg = <0xfff00000 0x00100000>;
read-only;
};
};
But when I am compiling, I have these warnings:
Warning (reg_format): "reg" property in /localbus@f0010100/flash@0
,0/partition@ff800000 has invalid length (8 bytes) (#address-cells == 2,
#size-cells == 1)
Warning (reg_format): "reg" property in /localbus@f0010100/flash@0
,0/partition@ffc00000 has invalid length (8 bytes) (#address-cells == 2,
#size-cells == 1)
Warning (reg_format): "reg" property in /localbus@f0010100/flash@0
,0/partition@fff00000 has invalid length (8 bytes) (#address-cells == 2,
#size-cells == 1)
Warning (avoid_default_addr_size): Relying on default #address-cells value
for /localbus@f0010100/flash@0,0/partition@ff800000
Warning (avoid_default_addr_size): Relying on default #size-cells value for
/localbus@f0010100/flash@0,0/partition@ff800000
Warning (avoid_default_addr_size): Relying on default #address-cells value
for /localbus@f0010100/flash@0,0/partition@ffc00000
Warning (avoid_default_addr_size): Relying on default #size-cells value for
/localbus@f0010100/flash@0,0/partition@ffc00000
Warning (avoid_default_addr_size): Relying on default #address-cells value
for /localbus@f0010100/flash@0,0/partition@fff00000
Warning (avoid_default_addr_size): Relying on default #size-cells value for
/localbus@f0010100/flash@0,0/partition@fff00000
Can anyone help me ?
I can't understand what the "address-cells" is.
Thanks in advance !
Best Regards.
JM
[-- Attachment #2: Type: text/html, Size: 5159 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 9:23 [MPC8272ADS]Problem adding flash partitions inside the device tree Jean-Michel Hautbois
@ 2009-02-12 11:05 ` Pieter
2009-02-12 11:10 ` Jean-Michel Hautbois
0 siblings, 1 reply; 10+ messages in thread
From: Pieter @ 2009-02-12 11:05 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jean-Michel Hautbois
[-- Attachment #1: Type: text/plain, Size: 3373 bytes --]
Jean-Michel Hautbois wrote:
> Hi everybody !
> I am currently trying to add the support of partitions for the Flash
> chip on my MPC8272ADS board (the chips are Sharp LH28F016SCT-L90).
>
> I have added this part:
>
> flash@0,0 {
> compatible = "jedec-flash";
> reg = <0x0 0x0 0x2000000>;
> bank-width = <4>;
> device-width = <1>;
>
> partition@ff800000 {
> label = "kernel";
> reg = <0xff800000 0x00400000>;
> read-only;
> };
> partition@ffc00000 {
> label = "user";
> reg = <0xffc00000 0x00300000>;
> };
> partition@fff00000 {
> label = "u-boot";
> reg = <0xfff00000 0x00100000>;
> read-only;
> };
> };
>
> But when I am compiling, I have these warnings:
> Warning (reg_format): "reg" property in
> /localbus@f0010100/flash@0,0/partition@ff800000 has invalid length (8
> bytes) (#address-cells == 2, #size-cells == 1)
> Warning (reg_format): "reg" property in
> /localbus@f0010100/flash@0,0/partition@ffc00000 has invalid length (8
> bytes) (#address-cells == 2, #size-cells == 1)
> Warning (reg_format): "reg" property in
> /localbus@f0010100/flash@0,0/partition@fff00000 has invalid length (8
> bytes) (#address-cells == 2, #size-cells == 1)
> Warning (avoid_default_addr_size): Relying on default #address-cells
> value for /localbus@f0010100/flash@0,0/partition@ff800000
> Warning (avoid_default_addr_size): Relying on default #size-cells
> value for /localbus@f0010100/flash@0,0/partition@ff800000
> Warning (avoid_default_addr_size): Relying on default #address-cells
> value for /localbus@f0010100/flash@0,0/partition@ffc00000
> Warning (avoid_default_addr_size): Relying on default #size-cells
> value for /localbus@f0010100/flash@0,0/partition@ffc00000
> Warning (avoid_default_addr_size): Relying on default #address-cells
> value for /localbus@f0010100/flash@0,0/partition@fff00000
> Warning (avoid_default_addr_size): Relying on default #size-cells
> value for /localbus@f0010100/flash@0,0/partition@fff00000
>
>
> Can anyone help me ?
> I can't understand what the "address-cells" is.
>
> Thanks in advance !
> Best Regards.
> JM
You are missing some definitions, The #address-cells and #size-cells = <1>;
tis is a snippet of teh dts i defined for my board.
flash@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x08000000>;
bank-width = <4>;
device-width = <1>;
/* set flash partition to correspond tu mtd parts in
u-boot*/
/* 0xf8000000 */
partition@0x0 {
label = "factory-image";
reg = <0x00000000 0x01000000>;
};
/* 0xf9000000 */
partition@0x01000000 {
label = "app-image-1";
reg = <0x01000000 0x01000000>;
};
cheers pieter
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2722 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 11:05 ` Pieter
@ 2009-02-12 11:10 ` Jean-Michel Hautbois
2009-02-12 13:30 ` David Gibson
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2009-02-12 11:10 UTC (permalink / raw)
To: Pieter; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1502 bytes --]
2009/2/12 Pieter <phenning@vastech.co.za>
> Jean-Michel Hautbois wrote:
> > Warning (reg_format): "reg" property in
> > /localbus@f0010100/flash@0,0/partition@ff800000 has invalid length (8
> > JM
> You are missing some definitions, The #address-cells and #size-cells = <1>;
> tis is a snippet of teh dts i defined for my board.
>
> flash@0,0 {
> #address-cells = <1>;
> #size-cells = <1>;
> compatible = "cfi-flash";
> reg = <0x0 0x0 0x08000000>;
> bank-width = <4>;
> device-width = <1>;
>
> /* set flash partition to correspond tu mtd parts in
> u-boot*/
> /* 0xf8000000 */
> partition@0x0 {
> label = "factory-image";
> reg = <0x00000000 0x01000000>;
> };
> /* 0xf9000000 */
> partition@0x01000000 {
> label = "app-image-1";
> reg = <0x01000000 0x01000000>;
> };
> cheers pieter
>
Hi do have these definitions, at a higher level:
localbus@f0010100 {
compatible = "fsl,mpc8272-localbus",
"fsl,pq2-localbus";
#address-cells = <2>;
#size-cells = <1>;
reg = <0xf0010100 0x40>;
ranges = <0x0 0x0 0xfe000000 0x2000000
0x1 0x0 0xf4500000 0x8000
0x3 0x0 0xf8200000 0x8000>;
flash@0,0 {
etc.
Regards,
JM
[-- Attachment #2: Type: text/html, Size: 3629 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 11:10 ` Jean-Michel Hautbois
@ 2009-02-12 13:30 ` David Gibson
2009-02-12 13:36 ` Jean-Michel Hautbois
0 siblings, 1 reply; 10+ messages in thread
From: David Gibson @ 2009-02-12 13:30 UTC (permalink / raw)
To: Jean-Michel Hautbois; +Cc: linuxppc-dev
On Thu, Feb 12, 2009 at 12:10:58PM +0100, Jean-Michel Hautbois wrote:
> 2009/2/12 Pieter <phenning@vastech.co.za>
>
> > Jean-Michel Hautbois wrote:
> > > Warning (reg_format): "reg" property in
> > > /localbus@f0010100/flash@0,0/partition@ff800000 has invalid length (8
> > > JM
> > You are missing some definitions, The #address-cells and #size-cells = <1>;
> > tis is a snippet of teh dts i defined for my board.
> >
> > flash@0,0 {
> > #address-cells = <1>;
> > #size-cells = <1>;
> > compatible = "cfi-flash";
> > reg = <0x0 0x0 0x08000000>;
> > bank-width = <4>;
> > device-width = <1>;
> >
> > /* set flash partition to correspond tu mtd parts in
> > u-boot*/
> > /* 0xf8000000 */
> > partition@0x0 {
> > label = "factory-image";
> > reg = <0x00000000 0x01000000>;
> > };
> > /* 0xf9000000 */
> > partition@0x01000000 {
> > label = "app-image-1";
> > reg = <0x01000000 0x01000000>;
> > };
> > cheers pieter
> >
>
> Hi do have these definitions, at a higher level:
The address-cells and size-cells definitions are not inherited. They
cover only the immediate children of the node where they appear.
Otherwise the default values apply (address-cells == 2, size-cells ==
1), which are not right for your case.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 13:30 ` David Gibson
@ 2009-02-12 13:36 ` Jean-Michel Hautbois
2009-02-12 14:08 ` Pieter
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2009-02-12 13:36 UTC (permalink / raw)
To: Jean-Michel Hautbois, Pieter, linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]
2009/2/12 David Gibson <david@gibson.dropbear.id.au>
> On Thu, Feb 12, 2009 at 12:10:58PM +0100, Jean-Michel Hautbois wrote:
> > 2009/2/12 Pieter <phenning@vastech.co.za>
> >
> > > Jean-Michel Hautbois wrote:
> > > > Warning (reg_format): "reg" property in
> > > > /localbus@f0010100/flash@0,0/partition@ff800000 has invalid length
> (8
> > > > JM
> > > You are missing some definitions, The #address-cells and #size-cells =
> <1>;
> > > tis is a snippet of teh dts i defined for my board.
> > >
> > > flash@0,0 {
> > > #address-cells = <1>;
> > > #size-cells = <1>;
> > > compatible = "cfi-flash";
> > > reg = <0x0 0x0 0x08000000>;
> > > bank-width = <4>;
> > > device-width = <1>;
> > >
> > > /* set flash partition to correspond tu mtd parts in
> > > u-boot*/
> > > /* 0xf8000000 */
> > > partition@0x0 {
> > > label = "factory-image";
> > > reg = <0x00000000 0x01000000>;
> > > };
> > > /* 0xf9000000 */
> > > partition@0x01000000 {
> > > label = "app-image-1";
> > > reg = <0x01000000 0x01000000>;
> > > };
> > > cheers pieter
> > >
> >
> > Hi do have these definitions, at a higher level:
>
> The address-cells and size-cells definitions are not inherited. They
> cover only the immediate children of the node where they appear.
> Otherwise the default values apply (address-cells == 2, size-cells ==
> 1), which are not right for your case.
>
> --
> David Gibson | I'll have my music baroque, and my code
> david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_
> _other_
> | _way_ _around_!
> http://www.ozlabs.org/~dgibson <http://www.ozlabs.org/%7Edgibson>
>
OK, so, after having tested, I can't see any changes when booting.
I do not have more mtd in /proc/mtd.
JM
[-- Attachment #2: Type: text/html, Size: 3601 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 13:36 ` Jean-Michel Hautbois
@ 2009-02-12 14:08 ` Pieter
2009-02-12 14:26 ` Jean-Michel Hautbois
0 siblings, 1 reply; 10+ messages in thread
From: Pieter @ 2009-02-12 14:08 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Jean-Michel Hautbois
[-- Attachment #1: Type: text/plain, Size: 2439 bytes --]
Jean-Michel Hautbois wrote:
> 2009/2/12 David Gibson <david@gibson.dropbear.id.au
> <mailto:david@gibson.dropbear.id.au>>
>
> On Thu, Feb 12, 2009 at 12:10:58PM +0100, Jean-Michel Hautbois wrote:
> > 2009/2/12 Pieter <phenning@vastech.co.za
> <mailto:phenning@vastech.co.za>>
> >
> > > Jean-Michel Hautbois wrote:
> > > > Warning (reg_format): "reg" property in
> > > > /localbus@f0010100/flash@0,0/partition@ff800000 has invalid
> length (8
> > > > JM
> > > You are missing some definitions, The #address-cells and
> #size-cells = <1>;
> > > tis is a snippet of teh dts i defined for my board.
> > >
> > > flash@0,0 {
> > > #address-cells = <1>;
> > > #size-cells = <1>;
> > > compatible = "cfi-flash";
> > > reg = <0x0 0x0 0x08000000>;
> > > bank-width = <4>;
> > > device-width = <1>;
> > >
> > > /* set flash partition to correspond tu mtd parts in
> > > u-boot*/
> > > /* 0xf8000000 */
> > > partition@0x0 {
> > > label = "factory-image";
> > > reg = <0x00000000 0x01000000>;
> > > };
> > > /* 0xf9000000 */
> > > partition@0x01000000 {
> > > label = "app-image-1";
> > > reg = <0x01000000 0x01000000>;
> > > };
> > > cheers pieter
> > >
> >
> > Hi do have these definitions, at a higher level:
>
> The address-cells and size-cells definitions are not inherited. They
> cover only the immediate children of the node where they appear.
> Otherwise the default values apply (address-cells == 2, size-cells ==
> 1), which are not right for your case.
>
> --
> David Gibson | I'll have my music baroque, and
> my code
> david AT gibson.dropbear.id.au <http://gibson.dropbear.id.au> |
> minimalist, thank you. NOT _the_ _other_
> | _way_ _around_!
> http://www.ozlabs.org/~dgibson <http://www.ozlabs.org/%7Edgibson>
>
> OK, so, after having tested, I can't see any changes when booting.
> I do not have more mtd in /proc/mtd.
>
> JM
have you defined the following in your kernel config
CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_PARTITIONS=y
CONFIG_MTD_OF_PARTS=y
cheers pieter
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/x-pkcs7-signature, Size: 2722 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 14:08 ` Pieter
@ 2009-02-12 14:26 ` Jean-Michel Hautbois
2009-02-12 22:24 ` Scott Wood
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2009-02-12 14:26 UTC (permalink / raw)
To: Pieter; +Cc: linuxppc-dev
[-- Attachment #1: Type: text/plain, Size: 3670 bytes --]
2009/2/12 Pieter <phenning@vastech.co.za>
> Jean-Michel Hautbois wrote:
> > 2009/2/12 David Gibson <david@gibson.dropbear.id.au
> > <mailto:david@gibson.dropbear.id.au>>
> >
> > On Thu, Feb 12, 2009 at 12:10:58PM +0100, Jean-Michel Hautbois wrote:
> > > 2009/2/12 Pieter <phenning@vastech.co.za
> > <mailto:phenning@vastech.co.za>>
> > >
> > > > Jean-Michel Hautbois wrote:
> > > > > Warning (reg_format): "reg" property in
> > > > > /localbus@f0010100/flash@0,0/partition@ff800000 has invalid
> > length (8
> > > > > JM
> > > > You are missing some definitions, The #address-cells and
> > #size-cells = <1>;
> > > > tis is a snippet of teh dts i defined for my board.
> > > >
> > > > flash@0,0 {
> > > > #address-cells = <1>;
> > > > #size-cells = <1>;
> > > > compatible = "cfi-flash";
> > > > reg = <0x0 0x0 0x08000000>;
> > > > bank-width = <4>;
> > > > device-width = <1>;
> > > >
> > > > /* set flash partition to correspond tu mtd parts in
> > > > u-boot*/
> > > > /* 0xf8000000 */
> > > > partition@0x0 {
> > > > label = "factory-image";
> > > > reg = <0x00000000 0x01000000>;
> > > > };
> > > > /* 0xf9000000 */
> > > > partition@0x01000000 {
> > > > label = "app-image-1";
> > > > reg = <0x01000000 0x01000000>;
> > > > };
> > > > cheers pieter
> > > >
> > >
> > > Hi do have these definitions, at a higher level:
> >
> > The address-cells and size-cells definitions are not inherited. They
> > cover only the immediate children of the node where they appear.
> > Otherwise the default values apply (address-cells == 2, size-cells ==
> > 1), which are not right for your case.
> >
> > --
> > David Gibson | I'll have my music baroque, and
> > my code
> > david AT gibson.dropbear.id.au <http://gibson.dropbear.id.au> |
> > minimalist, thank you. NOT _the_ _other_
> > | _way_ _around_!
> > http://www.ozlabs.org/~dgibson <http://www.ozlabs.org/%7Edgibson> <
> http://www.ozlabs.org/%7Edgibson>
> >
> > OK, so, after having tested, I can't see any changes when booting.
> > I do not have more mtd in /proc/mtd.
> >
> > JM
> have you defined the following in your kernel config
>
> CONFIG_MTD_PHYSMAP_OF=y
> CONFIG_MTD_PARTITIONS=y
> CONFIG_MTD_OF_PARTS=y
>
> cheers pieter
>
I didn't have CONFIG_MTD_OF_PARTS=y.
Know, I have this output:
Found: Intel I28F016S3
fe000000.flash: Found 4 x8 devices at 0x0 in 32-bit bank
fe000000.flash: Found an alias at 0x800000 for the chip at 0x0
fe000000.flash: Found an alias at 0x1000000 for the chip at 0x0
fe000000.flash: Found an alias at 0x1800000 for the chip at 0x0
erase region 0: offset=0x0,size=0x40000,blocks=32
RedBoot partition parsing not available
Creating 3 MTD partitions on "fe000000.flash":
0x0000ff800000-0x0000ffc00000 : "kernel"
mtd: partition "kernel" is out of reach -- disabled
mtd: Giving out device 0 to kernel
0x0000ffc00000-0x0000fff00000 : "user"
mtd: partition "sofrel" is out of reach -- disabled
mtd: Giving out device 1 to user
0x0000fff00000-0x000100000000 : "u-boot"
mtd: partition "u-boot" is out of reach -- disabled
mtd: Giving out device 2 to u-boot
I think that the problem is in the reg part, but I can't understand why.
Isn't it the RAM mpping of my MTD that is the first address ?
Thanks agains,
Regards,
JM
[-- Attachment #2: Type: text/html, Size: 6574 bytes --]
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 14:26 ` Jean-Michel Hautbois
@ 2009-02-12 22:24 ` Scott Wood
2009-02-13 9:25 ` Jean-Michel Hautbois
0 siblings, 1 reply; 10+ messages in thread
From: Scott Wood @ 2009-02-12 22:24 UTC (permalink / raw)
To: Jean-Michel Hautbois; +Cc: linuxppc-dev
On Thu, Feb 12, 2009 at 03:26:58PM +0100, Jean-Michel Hautbois wrote:
> I think that the problem is in the reg part, but I can't understand why.
> Isn't it the RAM mpping of my MTD that is the first address ?
No, it's the offset into the chipselect.
-Scott
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-12 22:24 ` Scott Wood
@ 2009-02-13 9:25 ` Jean-Michel Hautbois
2009-02-13 16:53 ` Scott Wood
0 siblings, 1 reply; 10+ messages in thread
From: Jean-Michel Hautbois @ 2009-02-13 9:25 UTC (permalink / raw)
To: Scott Wood; +Cc: linuxppc-dev
2009/2/12 Scott Wood <scottwood@freescale.com>:
> On Thu, Feb 12, 2009 at 03:26:58PM +0100, Jean-Michel Hautbois wrote:
>> I think that the problem is in the reg part, but I can't understand why.
>> Isn't it the RAM mpping of my MTD that is the first address ?
>
> No, it's the offset into the chipselect.
>
> -Scott
>
OK.
What means the word #adress-cells BTW ?
When should I have 1, 2 or anything else ?
Regards,
JM
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [MPC8272ADS]Problem adding flash partitions inside the device tree
2009-02-13 9:25 ` Jean-Michel Hautbois
@ 2009-02-13 16:53 ` Scott Wood
0 siblings, 0 replies; 10+ messages in thread
From: Scott Wood @ 2009-02-13 16:53 UTC (permalink / raw)
To: Jean-Michel Hautbois; +Cc: linuxppc-dev
Jean-Michel Hautbois wrote:
> 2009/2/12 Scott Wood <scottwood@freescale.com>:
>> On Thu, Feb 12, 2009 at 03:26:58PM +0100, Jean-Michel Hautbois wrote:
>>> I think that the problem is in the reg part, but I can't understand why.
>>> Isn't it the RAM mpping of my MTD that is the first address ?
>> No, it's the offset into the chipselect.
>>
>> -Scott
>>
>
> OK.
> What means the word #adress-cells BTW ?
It's the number of cells that make up an address. 1 cell for 32-bit
addresses, 2 for 64-bit.
> When should I have 1, 2 or anything else ?
1 cell is sufficient in this case.
-Scott
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-02-13 16:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-12 9:23 [MPC8272ADS]Problem adding flash partitions inside the device tree Jean-Michel Hautbois
2009-02-12 11:05 ` Pieter
2009-02-12 11:10 ` Jean-Michel Hautbois
2009-02-12 13:30 ` David Gibson
2009-02-12 13:36 ` Jean-Michel Hautbois
2009-02-12 14:08 ` Pieter
2009-02-12 14:26 ` Jean-Michel Hautbois
2009-02-12 22:24 ` Scott Wood
2009-02-13 9:25 ` Jean-Michel Hautbois
2009-02-13 16:53 ` Scott Wood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).