[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: jffs for amd Am29LV160BB



Nicolas Pitre wrote:
> 
> On Tue, 24 Apr 2001, dhammika wrote:
> 
> >
> > i did a small test. i tried to completely ignore my flash bank 0. this
> > is what i did,
> >
> > static struct map_desc brutus_io_desc[] __initdata = {
> >  /* virtual     physical    length      domain     r  w  c  b */
> >   { 0xe8000000, 0x08000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /*
> > flash bank 1 */
> >   { 0xf1000000, 0x18000000, 0x01000000, DOMAIN_IO, 1, 1, 0, 0 }, /* BCR
> > */
> >   LAST_DESC
> > };
> >
> > and set up a partition as,
> >
> > static unsigned long brutus_max_flash_size = 0x00400000;
> > static struct mtd_partition brutus_partitions[] = {
> >  { name:"root-fs",  offset: 0x00000000,       size: 0x400000  },
> > };
> >
> > then i boot with the resulting kernel. and now jffs2 seems to be
> > initializing properly.
> >
> > SA1100 flash: probing for 1 partitions (buswidth = 4)
> > SA1100: Found 2 x16 CFI devices at location 0 in 16 bit mode
> >  Amd/Fujitsu Extended Query Table v1.0 at 0x0040
> > number of CFI chips: 1
> > mtd: Giving out device 0 to root-fs
> > SA1100 flash access initialized
> 
> Good.  Now try the following:
> 
> static struct map_desc brutus_io_desc[] __initdata = {
>  /* virtual     physical    length      domain     r  w  c  b */
>   { 0xe8000000, 0x00000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /* flash bank 0 */
>   { 0xe8400000, 0x08000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /* flash bank 1 */
>   { 0xf1000000, 0x18000000, 0x01000000, DOMAIN_IO, 1, 1, 0, 0 }, /* BCR */
>   LAST_DESC
> };
> 
> static unsigned long brutus_max_flash_size = 0x00800000;
> 
> ... plus your assorted partition definitions.
> 
> Then you should get: "number of CFI chips: 2" and your full 8MB should be
> available.  This assumes, of course, that you have the same flash chips in
> both bank 0 and bank 1.
> 

something weird happened, i defined the brutus_io_desc as,

static struct map_desc brutus_io_desc[] __initdata = {
 /* virtual     physical    length      domain     r  w  c  b */
  { 0xe8000000, 0x04000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /*
flash bank 0 */  
  { 0xe8400000, 0x08000000, 0x00400000, DOMAIN_IO, 1, 1, 0, 0 }, /*
flash bank 1 */ 
  { 0xf1000000, 0x18000000, 0x01000000, DOMAIN_IO, 1, 1, 0, 0 }, /* BCR
*/ 
  LAST_DESC
};

and defined partions as 

static unsigned long brutus_max_flash_size = 0x00800000;
static struct mtd_partition brutus_partitions[] = {
 { name: "blob + zImage ", offset: 0x00000000,		size: 0x80000   }, 
 { name: "ramdisk" 	 , offset: MTDPART_OFS_APPEND,	size: 0x120000  }, 
 { name: "root-fs"	 , offset: MTDPART_OFS_APPEND,	size: 0x400000  },
};
 
when i boot with this image,

mtd: Giving out device 0 to Raw memory
Registered physmem device from 98304Kb to 131072Kb
Mapped from 0xc1816000 to 0xc3816000
SA1100 flash: probing for 3 partitions (buswidth = 4)
SA1100: Found 2 x16 CFI devices at location 0 in 16 bit mode
SA1100: Found 2 x16 CFI devices at location 400000 in 16 bit mode
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 2
mtd: Giving out device 1 to blob + zImage 
mtd: Giving out device 2 to ramdisk
mtd: Giving out device 3 to root-fs
SA1100 flash access initialized

now everything seems to be ok, but when i reboot with the _same_ image
it wouldn't detect my flash bank 1

mtd: Giving out device 0 to Raw memory
Registered physmem device from 98304Kb to 131072Kb
Mapped from 0xc1816000 to 0xc3816000
SA1100 flash: probing for 3 partitions (buswidth = 4)
SA1100: Found 2 x16 CFI devices at location 0 in 16 bit mode
 Amd/Fujitsu Extended Query Table v1.0 at 0x0040
number of CFI chips: 1
mtd: Giving out device 1 to blob + zImage 
mtd: Giving out device 2 to ramdisk
mtd: partition "root-fs" extends beyond the end of device "SA1100" --
size truncated to 0x260000
mtd: Giving out device 3 to root-fs
SA1100 flash access initialized

> > /proc/mtd gives
> > dev:    size   erasesize  name
> > mtd0: 00400000 00020000 "root-fs"
> 
> Does it say the same if you define a mapping for bank 0 only?
> 

yap, why does cfi_probe fail to detect my flash banks ??

tia 

dhammika

To unsubscribe from this list: send the line "unsubscribe jffs-dev" in
the body of a message to majordomo@xxxxxxx.com