From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-bw0-f168.google.com (mail-bw0-f168.google.com [209.85.218.168]) by ozlabs.org (Postfix) with ESMTP id 5A3A1DDDB9 for ; Fri, 13 Feb 2009 01:27:02 +1100 (EST) Received: by bwz12 with SMTP id 12so1870300bwz.9 for ; Thu, 12 Feb 2009 06:27:00 -0800 (PST) MIME-Version: 1.0 In-Reply-To: <49942D68.7080706@vastech.co.za> References: <8cad0aa0902120123p27cfe32fg6bf08d458178c937@mail.gmail.com> <49940265.1020700@vastech.co.za> <8cad0aa0902120310g44a3bf3cla4ffa94ea9bf5dc6@mail.gmail.com> <20090212133037.GA3651@yookeroo.seuss> <8cad0aa0902120536p3303322cvf9a7307391d195b9@mail.gmail.com> <49942D68.7080706@vastech.co.za> Date: Thu, 12 Feb 2009 15:26:58 +0100 Message-ID: <8cad0aa0902120626v733011a5u669fc30096565d86@mail.gmail.com> Subject: Re: [MPC8272ADS]Problem adding flash partitions inside the device tree From: Jean-Michel Hautbois To: Pieter Content-Type: multipart/alternative; boundary=0016e6d376615091340462b9837b Cc: linuxppc-dev@ozlabs.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , --0016e6d376615091340462b9837b Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 2009/2/12 Pieter > Jean-Michel Hautbois wrote: > > 2009/2/12 David Gibson > > > > > > On Thu, Feb 12, 2009 at 12:10:58PM +0100, Jean-Michel Hautbois wrote: > > > 2009/2/12 Pieter > > > > > > > > > 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 > 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 --0016e6d376615091340462b9837b Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
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 Ha= utbois wrote:
>     > 2009/2/12 Pieter <phenning@vastech.co.za
>     <mailto:phenning@vastech.co.za>>
>     >
>     > > Jean-Michel Hautbois wrote:
>     > > > Warning (reg_format): "reg" pro= perty in
>     > > > /localbus@f0010100/flash@0,0/partition@ff= 800000 has invalid
>     length (8
>     > > > JM
>     > > You are missing some definitions, The #address= -cells and
>     #size-cells =3D <1>;
>     > > tis is a snippet of teh dts i defined for my b= oard.
>     > >
>     > >        flash@0,0 {
>     > >            #addr= ess-cells =3D <1>;
>     > >            #size= -cells =3D <1>;
>     > >            compa= tible =3D "cfi-flash";
>     > >            reg = =3D <0x0 0x0 0x08000000>;
>     > >             bank= -width =3D <4>;
>     > >            devic= e-width =3D <1>;
>     > >
>     > >             /* s= et flash partition to correspond tu mtd parts in
>     > > u-boot*/
>     > >            /* &n= bsp;   0xf8000000 */
>     > >            parti= tion@0x0 {
>     > >             &nbs= p;  label =3D "factory-image";
>     > >             &nbs= p;  reg =3D <0x00000000 0x01000000>;
>     > >            }; >     > >            /* &n= bsp;   0xf9000000 */
>     > >            parti= tion@0x01000000 {
>     > >             &nbs= p;  label =3D "app-image-1";
>     > >             &nbs= p;  reg =3D <0x01000000 0x01000000>;
>     > >            }; >     > > cheers pieter
>     > >
>     >
>     > Hi do have these definitions, at a higher level: >
>     The address-cells and size-cells definitions are not inh= erited.  They
>     cover only the immediate children of the node where they= appear.
>     Otherwise the default values apply (address-cells =3D=3D= 2, size-cells =3D=3D
>     1), which are not right for your case.
>
>     --
>     David Gibson             &= nbsp;      | 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=3Dy
CONFIG_MTD_PARTITIONS=3Dy
CONFIG_MTD_OF_PARTS=3Dy

cheers pieter

I didn't have CONFIG_MTD_OF_PARTS=3Dy.

Kno= w, I have this output:

 Found: Intel I28F016S3
fe000000.flas= h: Found 4 x8 devices at 0x0 in 32-bit bank
fe000000.flash: Found an ali= as 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=3D0x0,size=3D0x40000,blocks=3D32
RedBoot partition parsing not av= ailable
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
0x0000ff= c00000-0x0000fff00000 : "user"
mtd: partition "sofrel" is out of reach -- disabled
mtd: Givin= g 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 unde= rstand why.
Isn't it the RAM mpping of my MTD that is the first addr= ess ?

Thanks agains,
Regards,
JM
--0016e6d376615091340462b9837b--