[U-Boot-Users] Re: about flash_port_width

Wolfgang Denk wd at denx.de
Mon Mar 3 09:07:44 CET 2003


Hello,

in message <OE46FvpV02m6DKdu3cg000034a7 at hotmail.com> you wrote:
>
>         I read the example "board/lwmon/flash.c" for a configuration  of a
> 32 bit wide flash bank using 28F640J3A chips.
...
>    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???

I think this board uses 2 chips in 16  bit  configuration,  too.  The
setting  of  "info->size"  is probably wrong. I cannot check, since I
don't know the hardware.

The MAINTAINERS file lists the NX823 board as orphaned,  which  means
that nobody actively maintains this port - it may be buggy. There are
several poor ports in the code, but I can only fix those where I have
access  to the documentation and to the hardware and probably someone
who pays for the time.


I know that the LWMON configuration is working fine,  so  you  better
use this one as a model ;-)


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
It's a small world, but I wouldn't want to paint it.




More information about the U-Boot mailing list