public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* Re: How to understand :interleave,numeraseregions and regions
       [not found] <200201240304.g0O349RM018586@krynn.axis.se>
@ 2002-01-24  8:57 ` Jonas Holmberg
  2002-01-24  9:13   ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Jonas Holmberg @ 2002-01-24  8:57 UTC (permalink / raw)
  To: jmzhong; +Cc: jffs-dev, linux-mtd

On Thu, 2002-01-24 at 11:00, jmzhong@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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to understand :interleave,numeraseregions and regions
  2002-01-24  8:57 ` Jonas Holmberg
@ 2002-01-24  9:13   ` David Woodhouse
  0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2002-01-24  9:13 UTC (permalink / raw)
  To: Jonas Holmberg; +Cc: jmzhong, jffs-dev, linux-mtd

jonas.holmberg@axis.com said:
>  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)? 

You can use 16-bit devices in 8-bit mode. And it matters. 

--
dwmw2

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: How to understand :interleave,numeraseregions and regions
@ 2002-01-24 18:49 Jonas Holmberg
  2002-01-24 21:22 ` David Woodhouse
  0 siblings, 1 reply; 4+ messages in thread
From: Jonas Holmberg @ 2002-01-24 18:49 UTC (permalink / raw)
  To: 'David Woodhouse '; +Cc: 'linux-mtd@lists.infradead.org '

> jonas.holmberg@axis.com said:
> >  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)? 
>
> You can use 16-bit devices in 8-bit mode. And it matters. 

I thought that device_type==(buswidth/interleave) even in that case.
Is device type X8 or X16 if a 16-bit device is in 8-bit mode?
Buswidth must be interleave*1 bytes in that case, right?

/Jonas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to understand :interleave,numeraseregions and regions
  2002-01-24 18:49 How to understand :interleave,numeraseregions and regions Jonas Holmberg
@ 2002-01-24 21:22 ` David Woodhouse
  0 siblings, 0 replies; 4+ messages in thread
From: David Woodhouse @ 2002-01-24 21:22 UTC (permalink / raw)
  To: Jonas Holmberg; +Cc: 'linux-mtd@lists.infradead.org '

jonas.holmberg@axis.com said:
>  I thought that device_type==(buswidth/interleave) even in that case.

No. I've been known to think that occasionally, but I generally get shouted
at because stuff breaks :)

> Is device type X8 or X16 if a 16-bit device is in 8-bit mode? 

X16.

> Buswidth must be interleave*1 bytes in that case, right? 

Yes.



--
dwmw2

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-01-24 21:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-24 18:49 How to understand :interleave,numeraseregions and regions Jonas Holmberg
2002-01-24 21:22 ` David Woodhouse
     [not found] <200201240304.g0O349RM018586@krynn.axis.se>
2002-01-24  8:57 ` Jonas Holmberg
2002-01-24  9:13   ` David Woodhouse

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox