This is the mail archive of the ecos-discuss@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ Spam Mail ] Re: How can I initial the flashs of sst29vfxxx and intel_strata at do_flash_init() ? (This message is to be blocked by code: bkfkact590)


Hi Andrew,

    There are two flashs in my platform at the same time, one intel
strata, the other is sst 39vfxxx. But it only one strata flash or vf39xxx
flash can be initiated and work currently.

Q1 : Is only one driver initiated at the same time with multi-driver ??

The flash spec is as following:

chip : sst vf39xxx (Boot ROM)
start : 0xfff00000
end  : 0xfff80000
size  : 512K

chip : intel strata
start : 0x70000000
end  : 0x71000000
size  : 16MB

The target is announced in ecos.db as following:

target px {
 alias  { "Alpha pX PowerPC 8245" px8245 }
 packages        { CYGPKG_HAL_POWERPC
                          CYGPKG_HAL_POWERPC_PPC60x
                          CYGPKG_HAL_POWERPC_PX
                          CYGPKG_IO_PCI
                          CYGPKG_IO_FLASH
                          CYGPKG_DEVS_FLASH_SST_39VFXXX
                          CYGPKG_DEVS_FLASH_SST_POWERPC_PX
                          CYGPKG_DEVS_FLASH_STRATA
                          CYGPKG_DEVS_FLASH_STRATA_POWERPC_PX
                          CYGPKG_IO_ETH_DRIVERS
                          CYGPKG_DEVS_ETH_ICPLUS_IP1000
                          CYGPKG_DEVS_ETH_ICXIP1000_POWERPC_PX
        }
        description "
            The pX target provides the packages needed to run
            eCos on the Alpha pX (8245) board."
}

Q2 : And Do I need modify the following code in the
/io/flash/current/src/flash.c ??

cyg_flash_get_info(cyg_uint32 Nth, cyg_flash_info_t * info)
{
  struct cyg_flash_dev * dev;

  if (!init) return CYG_FLASH_ERR_NOT_INIT;

#if (1 == CYGHWR_IO_FLASH_DEVICE)
  if ((0 == Nth) && cyg_flashdevtab[0].init) {
      dev = &(cyg_flashdevtab[0]);
  } else {
      return CYG_FLASH_ERR_INVALID;
  }
#else
  // Only initialized devices are on the list.
  for (dev = flash_head; dev && Nth; dev=dev->next, Nth--)
    ;       <----------------------------------------- Do I need modify  it
????
  if (!dev) {
      return CYG_FLASH_ERR_INVALID;
  }
#endif
  info->start = dev->start;
  info->end = dev->end;
  info->num_block_infos = dev->num_block_infos;
  info->block_info = dev->block_info;
  return CYG_FLASH_ERR_OK;
}

Thank you~~

Steven Cheng

> Each flash driver is split into two parts. There is a generic part and
> a target specific part. You are probably missing the target specific
> part. Take a look at packages/devs/flash/arm/aim711/current
>
>         Andrew
>


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]