[U-Boot-Users] Re: about flash_port_width

okisoftxman okisoftxman at hotmail.com
Mon Mar 3 02:01:12 CET 2003


Hi,Denk:
        I read the example "board/lwmon/flash.c" for a configuration  of a
32 bit wide flash bank using 28F640J3A chips.
 "case INTEL_ID_28F640J3A:
  info->flash_id += FLASH_28F640J3A;
  info->sector_count = 64;
  info->size = 0x00800000 * 2;
  break;    /* => 16 MB  */  "

As you mentioned,there are two chips so it can operate 32bit width data
bus.Just as:

static int write_data (flash_info_t *info, ulong dest, ulong data)
{
 .......................................
 *addr = 0x00400040;  /* write setup */
 *addr = data;
.......................................................................
 return (0);
}

   But I find a another example for 28F640J3A chips "/board/nx823/flash.c",I
think there is one flash chips .Something like this:
#define FLASH_PORT_WIDTH  ulong
#define FLASH_PORT_WIDTHV  vu_long
#define FPW  FLASH_PORT_WIDTH
#define FPWV FLASH_PORT_WIDTHV

"   case (FPW)INTEL_ID_28F640J3A:
      info->flash_id += FLASH_28F640J3A;
      info->sector_count = 64;
      info->size = 0x00800000;
      break;            /* => 8 MB     */  "

static int write_data (flash_info_t *info, ulong dest, FPW data)
{
..............................................
 *addr = (FPW)0x00400040;  /* write setup */
 *addr = data;
...............................................
 return (0);
}

Since there is one chip,I think it must perform 16bit data operations.But
the variable "data" type is ulong(I think it is 32bits),it seems that it
still performs 32bit operation.Why???





----- Original Message -----
From: "Wolfgang Denk" <wd at denx.de>
To: "okisoftxman" <okisoftxman at hotmail.com>
Sent: Sunday, March 02, 2003 5:36 AM
Subject: Re: about flash_port_width


> In message <OE17nfWf17rSWEr9rAk00002644 at hotmail.com> you wrote:
> > I am very sorry for post ppcboot relations here.I can't find uboot or
> > ppcboot mail listing.because I think PPCBOOT is relate to embeded
linux,So I
>
> I do not want to accept this.
>
> Did you even try to find the U-Boot or PPCBoot mailing lists? Did you
> for example do the obvious - soear on  google  for  "ppcboot  mailing
> list" or something like that?
>
> > You tell me that there are
> > > two flash chips (one  for  the lower 16 bits, the other for the upper
16
> > bits) to give a 32 bit wide bus.
> > I find the flash chip is :
> >       info->flash_id += FLASH_28F640J3A;
> >       info->sector_count = 64;
> >       info->size = 0x00800000;
> >
> > you tell me there are two flash chip ,ans where is the other???Thank
you!
>
> As already mentioned, one flash chip is connected  to  the  lower  16
> bits  of  the  bus, and the other one serves the upper 16 bits of the
> bus, thus forming a 32 bit wide bank of flash memory.
>
> If you check with the specs you will find that the  28F640J3A  has  a
> capacity  of  64 Mbit in 64 x 128-Kbyte Erase Blocks; as you write it
> above the size is wrong, as this is just for ONE chip.
>
> See for example "board/lwmon/flash.c" for a correct configuration  of
> a 32 bit wide flash bank using 28F640J3A chips.
>
> Best regards,
>
> Wolfgang Denk
>
> --
> Software Engineering:  Embedded and Realtime Systems,  Embedded Linux
> Phone: (+49)-8142-4596-87  Fax: (+49)-8142-4596-88  Email: wd at denx.de
> Anyone can count the seeds in an apple.
> No one can count the apples in a seed.
>




More information about the U-Boot mailing list