Subject: Re: Support for S29JL064 in MPC8272ADS?

From: Scott Wood <[email-masked]>
Date: Fri, 16 Oct 2009 11:18:03 -0500

Roberto Guerra wrote:
> mtdparts=phys:1600K(ROM)ro,6M(root),512K(U-Boot)ro,512K(unused)
> rootfstype=jffs2
> => bootm 200000 - 400000
> <snip>
> physmap platform flash device: 00800000 at ff800000
> physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank
>  Amd/Fujitsu Extended Query Table at 0x0040
> physmap-flash.0: CFI does not contain boot bank location. Assuming
> top.

Hmm, you seem to be using physmap rather than physmap_of -- so it won't 
even be looking at your device tree node.

> List of all partitions:
> 0100       4096 ram0 (driver?)
> 0101       4096 ram1 (driver?)
> 0102       4096 ram2 (driver?)
> 0103       4096 ram3 (driver?)
> 0104       4096 ram4 (driver?)
> 0105       4096 ram5 (driver?)
> 0106       4096 ram6 (driver?)
> 0107       4096 ram7 (driver?)
> 0108       4096 ram8 (driver?)
> 0109       4096 ram9 (driver?)
> 010a       4096 ram10 (driver?)
> 010b       4096 ram11 (driver?)
> 010c       4096 ram12 (driver?)
> 010d       4096 ram13 (driver?)
> 010e       4096 ram14 (driver?)
> 010f       4096 ram15 (driver?)

Where are all these coming from?

> The key change in my kernel config was the BIG_ENDIAN=Y.
> The kernel probes the AMD chip, but it can't see the partitions.

Even without partiitons, you should see the whole flash device...

> I guess now I will have to define my mtd partitions in either FDT or
> in the kernel arguments.
> Which is the best way to define them?

If you're defining a standard layout for the platform that's unlikely to 
change, I'd go with the device tree.  Otherwise, I'd go with whatever's 
most convenient.

> If the partitions are defined in
> both FDT and bootargs, which one takes precedence?

The command line takes precedence.

-Scott