Some thoughts about the flash device driver and the flashdisk block driver

Astrid Hanssen Astrid.Hanssen at ghipsystems.com
Thu Jan 24 11:52:17 UTC 2008


Hello,

I am happy to find there was a new concept invented recently, the
libchip/flash device driver(s) and a flashdisk block driver.
Because I believe this to be a very nice thing and opens the door
to many new applications, I immediately decided to integrate this
to the BSP I am working on.

Its the Coldfire MCF5208 evaluation board, which contains an AMD
AM29BDD160G 16/32-bit flash device.
Although I already started writing my own flash chip driver, now
I like to switch over to the chip driver format defined by
flashdisk.h and the example that can be found in libchip/flash.
After the flash driver will be thoroughly tested, I feel like
submitting it to libchip/flash.

However, not the whole area of the flash chip shall be available
to the libblock flashdisk block driver. The device will also have
to contain the RTEMS software itself as well as some type of an
optimized flash parameter storage system.
The latter may also use the flash device driver, but not the
flashdisk block driver.

What I was now looking for is a way to let the flashdisk driver
know which area of the device(s) it may use and which not.
Unfortunately I found nothing like that yet.
As this might going to be a very common case (BSPs that contain a
flash chip tend to have their RTEMS software booting from it)
perhaps there should be a method to manage this.
Maybe I missed something.
Otherwise, a solution might become necessary.

A quick hack will be to define a board-specific chip driver that
contains only the segments the flashdisk shall have access to.
But I would prefer a general-purpose chip library and handle such
area definitions in the rtems_flashdisk_config structure.
Another useful idea might be to separate the libchip flash device
handlers definition from the libblock flashdisk to have it more
generally available, but to include it and use it in flashdisk.

I am wondering what you are thinking about this, or what I have
missed.

Astrid Hanssen



More information about the users mailing list