This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
RE: Flash Device field definitions (ie like "device_id :")
- From: Rycerz Roman-G11565 <roman dot rycerz at motorola dot com>
- To: ecos-discuss at sources dot redhat dot com
- Date: Fri, 19 Mar 2004 13:47:53 -0600
- Subject: RE: [ECOS] Flash Device field definitions (ie like "device_id :")
mmm no mind readers eh ???
Here is a example of the what I was referring to...
#ifdef CYGHWR_DEVS_FLASH_AMD_AM29BL802
{ // AM29BL802-C must be mapped on even addr boundary to 1MB
device_id : FLASHWORD(0x2281),
block_size : 0x20000 * CYGNUM_FLASH_INTERLEAVE, // 128k blocks
block_count: 8, // 8 * 2 blocks
device_size: 0x00100000 * CYGNUM_FLASH_INTERLEAVE, // 1Mb * 2
base_mask : ~(0x100000 * CYGNUM_FLASH_INTERLEAVE - 1),
bootblock : true,
bootblocks : { 0x000000 * CYGNUM_FLASH_INTERLEAVE,
0x004000 * CYGNUM_FLASH_INTERLEAVE, // 16k
0x002000 * CYGNUM_FLASH_INTERLEAVE, // 8k
0x002000 * CYGNUM_FLASH_INTERLEAVE, // 8k
0x018000 * CYGNUM_FLASH_INTERLEAVE, // 96k
_LAST_BOOTBLOCK
},
banked : false
},
#endif
how does the above construct get turnned in to initialized struct like below ??
typedef struct flash_dev_info {
cyg_bool long_device_id;
flash_data_t device_id;
flash_data_t device_id2;
flash_data_t device_id3;
cyg_uint32 block_size;
cyg_int32 block_count;
cyg_uint32 base_mask;
cyg_uint32 device_size;
cyg_bool bootblock;
cyg_uint32 bootblocks[64]; // 0 is bootblock offset, 1-11 sub-sector sizes (or 0)
cyg_bool banked;
cyg_uint32 banks[8]; // bank offsets, highest to lowest (lowest should be 0)
// (only one entry for now, increase to support devices
// with more banks).
} flash_dev_info_t;
Roman F. Rycerz
Motorola IESS, ACES, PCSG, PCG
21440 West Lake Cook Rd
Deer Park IL 60010
-----Original Message-----
From: Gary Thomas [mailto:gary@mlbassoc.com]
Sent: Friday, March 19, 2004 11:48 AM
To: Rycerz Roman-G11565
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] Flash Device field definitions (ie like "device_id :")
On Fri, 2004-03-19 at 10:44, Rycerz Roman-G11565 wrote:
> Hi..
>
> Was wondering where these fields are defined and how they get
> turned into a structure initialization
Your question is a bit vague - exactly what field (what structure, file, etc)? are you referring to?
--
Gary Thomas <gary@mlbassoc.com>
MLB Associates
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss