From: Angelo Subject: Question on flash node on device tree source Date: Tue, 8 Sep 2009 12:18:33 +0000 (GMT) Message-ID: <859952.87558.qm@web23106.mail.ird.yahoo.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============7446691088279302030==" Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Errors-To: devicetree-discuss-bounces+gldd-devicetree-discuss=m.gmane.org-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org To: devicetree-discuss-mnsaURCQ41sdnm+yROfE0A@public.gmane.org List-Id: devicetree@vger.kernel.org --===============7446691088279302030== Content-Type: multipart/alternative; boundary="0-2011298778-1252412313=:87558" --0-2011298778-1252412313=:87558 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Hi all. I need some info about device tree blob. I'm testing a powerpc board (very similar to mpc512xev) with the following = feature: =A0- 256MB flash (only 1 bank) Changes some lines of device tree source about flash localbus@80000020 { =A0=A0=A0 =A0=A0=A0 compatible =3D "fsl,mpc5121ads-localbus"; =A0=A0=A0 =A0=A0=A0 #address-cells =3D <2>; =A0=A0=A0 =A0=A0=A0 #size-cells =3D <1>; =A0=A0=A0 =A0=A0=A0 reg =3D <0000020 40>; =A0=A0=A0 =A0=A0=A0 ranges =3D <0 0 fc000000 04000000 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0 2 0 82000000 00008000>; =A0=A0=A0 =A0=A0=A0 flash@0,0 { =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 device_type =3D "rom"; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 compatible =3D "direct-mapped"; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 probe-type =3D "CFI"; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 reg =3D <0 0 4000000>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 #address-cells =3D <1>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 #size-cells =3D <1>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 bank-width =3D <4>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 device-width =3D <2>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 partitions =3D <00000000 00040000=A0=A0=A0 = =A0=A0=A0 // first sector is protected =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 00040000 03c00000= =A0=A0=A0 =A0=A0=A0 // 60 Mb for filesystem =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 03c40000 00280000= =A0=A0=A0 =A0=A0=A0 // 2.5 Mb for kernel =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 03ec0000 00040000= =A0=A0=A0 =A0=A0=A0 // one sector for device tree =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0=A0=A0 03f00000 00100000>;= =A0=A0=A0 // one Mb for u-boot =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 partition-names =3D "protected", "filesystem"= , "kernel", "device-tree", "u-boot"; =A0=A0=A0 =A0=A0=A0 }; ..... with these changes: ..... =A0=A0=A0 =A0=A0=A0 flash@0,0 { =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 device_type =3D "rom"; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 compatible =3D "direct-mapped"; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 probe-type =3D "CFI"; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 reg =3D <0 0 1000000>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 #address-cells =3D <1>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 #size-cells =3D <1>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 bank-width =3D <1>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 device-width =3D <1>; =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 partitions =3D <300000 200000=A0=A0=A0 =A0=A0= =A0 //uimage =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 400000 3200000>= ;=A0=A0=A0 // fs =A0=A0=A0 =A0=A0=A0 =A0=A0=A0 partition-names =3D "uimage", "fs"; =A0=A0=A0 =A0=A0=A0 }; ..... The problem is that on bootstrap stage, kernel truncate the flash memory to= 16MB, so i cannot access to the whole flash. kernel messages: mtd: partition "fs" extends=A0 beyond the end of device "60000000.flash" si= ze truncated to 0xc00000. I'd like to know if i have to specify into the dtb file the size of flash m= em. What about nand flash controller and its functionality?=20 If you have more info about this, please write to me. Thanks in advance, @s =0A=0A=0A --0-2011298778-1252412313=:87558 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Hi all.

I need some info about device = tree blob.
I'm testing a powerpc board (very similar to mpc512xev) with = the following feature:
 - 256MB flash (only 1 bank)

Changes = some lines of device tree source about flash

localbus@80000020 {
=         compatible =3D "fsl,mpc5121ads-localb= us";
        #address-cells =3D <2>;=
        #size-cells =3D <1>;
&nb= sp;       reg =3D <0000020 40>;

 = ;       ranges =3D <0 0 fc000000 04000000
&n= bsp;             2 0 82000000 = 00008000>;

        flash@0,0 {
&= nbsp;           device_type =3D "rom";
            compati= ble =3D "direct-mapped";
         &nb= sp;  probe-type =3D "CFI";
        &n= bsp;   reg =3D <0 0 4000000>;
     &= nbsp;      #address-cells =3D <1>;
  = ;          #size-cells =3D <1>;            bank-width =3D &l= t;4>;
            device= -width =3D <2>;
          =   partitions =3D <00000000 00040000      &= nbsp; // first sector is protected
       =               00040= 000 03c00000        // 60 Mb for filesystem
            &nb= sp;         03c40000 00280000  = ;      // 2.5 Mb for kernel
     = ;               = ;  03ec0000 00040000        // one secto= r for device tree
          &nbs= p;           03f00000 00100000>;=     // one Mb for u-boot
      &= nbsp;     partition-names =3D "protected", "filesystem", "ke= rnel", "device-tree", "u-boot";
        };=
....
with these changes:
....
      &= nbsp; flash@0,0 {
          &nbs= p; device_type =3D "rom";
            compatible =3D "direct-mapped";
    &= nbsp;       probe-type =3D "CFI";
  &= nbsp;         reg =3D <0 0 1000000>;            #address-cells = =3D <1>;
            = #size-cells =3D <1>;
         &= nbsp;  bank-width =3D <1>;
      &nb= sp;     device-width =3D <1>;
    &n= bsp;       partitions =3D <300000 200000 &= nbsp;      //uimage
      &= nbsp;               =   400000 3200000>;    // fs
    &n= bsp;       partition-names =3D "uimage", "fs";
        };
....

The probl= em is that on bootstrap stage, kernel truncate the flash memory to 16MB, so= i cannot access to the whole flash. kernel messages:

mtd: partition= "fs" extends  beyond the end of device "60000000.flash" size truncate= d to 0xc00000.

I'd like to know if i have to specify into the dtb fi= le the size of flash mem. What about nand flash controller and its function= ality?
If you have more info about this, please write to me.

Tha= nks in advance,
@s


=0A=0A=0A=0A --0-2011298778-1252412313=:87558-- --===============7446691088279302030== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ devicetree-discuss mailing list devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org https://lists.ozlabs.org/listinfo/devicetree-discuss --===============7446691088279302030==--