There is not a standard non-volatile driver configuration table but some
fields are common across different drivers. The non-volatile memory driver
configuration table is typically an array of structures with each
structure containing the information for a particular area of
non-volatile memory.
The following is a list of the type of information normally required
to configure each area of non-volatile memory.
memory_type
is the type of memory device in this area. Choices are battery backed RAM,
EEPROM, Flash, or an optional user-supplied type. If the user-supplied type
is configured, then the user is responsible for providing a set of
routines to program the memory.
memory
is the base address of this memory area.
attributes
is a pointer to a memory type specific attribute block. Some of
the fields commonly contained in this memory type specific attribute
structure area:
use_protection_algorithm
is set to TRUE to indicate that the protection (i.e. locking) algorithm
should be used for this area of non-volatile memory. A particular
type of non-volatile memory may not have a protection algorithm.
access
is an enumerated type to indicate the organization of the memory
devices in this memory area. The following is a list of the
access types supported by the current driver implementation:
simple unsigned8
simple unsigned16
simple unsigned32
simple unsigned64
single unsigned8 at offset 0 in an unsigned16
single unsigned8 at offset 1 in an unsigned16
single unsigned8 at offset 0 in an unsigned32
single unsigned8 at offset 1 in an unsigned32
single unsigned8 at offset 2 in an unsigned32
single unsigned8 at offset 3 in an unsigned32
depth
is the depth of the progamming FIFO on this particular chip. Some
chips, particularly EEPROMs, have the same programming algorithm but
vary in the depth of the amount of data that can be programmed in a single
block.
number_of_partitions
is the number of logical partitions within this area.
Partitions
is the address of the table that contains an entry to describe each
partition in this area. Fields within each element of this
table are defined as follows:
offset
is the offset of this partition from the base address of this area.
length
is the length of this partition.
By dividing an area of memory into multiple partitions, it is possible
to easily divide the non-volatile memory for different purposes.