How to understand :interleave,numeraseregions and regions

Jonas Holmberg jonas.holmberg at axis.com
Thu Jan 24 03:57:34 EST 2002


On Thu, 2002-01-24 at 11:00, jmzhong at dtvia-usoft.com wrote:
> Hi,all,
>     Could you tell me where the notation about drivers/mtd/chips/amd_flash.c in the
> source code of uClinux  is?
>     I want to know about 	struct amd_flash_private {
> 	int device_type;	
> 	int interleave;	
> 	int numchips;	
> 	unsigned long chipshift;
> //	const char *im_name;
> 	struct flchip chips[0];
> };
> 
> struct amd_flash_info {
> 	const __u16 mfr_id;
> 	const __u16 dev_id;
> 	const char *name;
> 	const u_long size;
> 	const int numeraseregions;
> 	const struct mtd_erase_region_info regions[4];
> };
> How to understand :interleave,numeraseregions and regions?

numeraseregions is the number of elements in the regions array. A region
is an area of the chip that contains sectors of the same size (usually
there are a few regions in the boot block and one region for the other
sectors). interleave is the number of chips that are mounted in parallel
on the bus. The amd_flash driver only supports 16-bit devices with a
buswidth of 16 or 32 bits (interleave 1 or 2).

I would like to ask the MTD people why it's necessary to have a variable
for device_type? Isn't it always possible to calculate the device_type
(buswidth / interleave)?

Best regards
/Jonas





More information about the linux-mtd mailing list