public inbox for linux-mtd@lists.infradead.org
 help / color / mirror / Atom feed
* starting address of mtd device
@ 2004-07-16 19:01 Mak Kar
  2004-07-19 12:30 ` Josh Boyer
  0 siblings, 1 reply; 11+ messages in thread
From: Mak Kar @ 2004-07-16 19:01 UTC (permalink / raw)
  To: linux-mtd

"cat /proc/mtd" would give me just the size of device
and erase size.
how can I get the starting address in flash of any
single mtd device?

Thanks,
-Mak


		
__________________________________
Do you Yahoo!?
Yahoo! Mail Address AutoComplete - You start. We finish.
http://promotions.yahoo.com/new_mail 

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

* Re: starting address of mtd device
  2004-07-16 19:01 starting address of mtd device Mak Kar
@ 2004-07-19 12:30 ` Josh Boyer
  2004-07-19 12:49   ` Dmitry A. Fedorov
  2004-07-19 21:55   ` Mak Kar
  0 siblings, 2 replies; 11+ messages in thread
From: Josh Boyer @ 2004-07-19 12:30 UTC (permalink / raw)
  To: Mak Kar; +Cc: linux-mtd

On Fri, 2004-07-16 at 14:01, Mak Kar wrote:
> "cat /proc/mtd" would give me just the size of device
> and erase size.
> how can I get the starting address in flash of any
> single mtd device?

The physical addresses for flash are usually provided by the user in the
form of a board map driver.  If there isn't a specific map driver for
your board, see physmap.c.

In other words, if you don't tell MTD where to look, it won't find
anything. :)

josh

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

* Re: starting address of mtd device
  2004-07-19 12:30 ` Josh Boyer
@ 2004-07-19 12:49   ` Dmitry A. Fedorov
  2004-07-19 13:28     ` Josh Boyer
  2004-07-19 21:55   ` Mak Kar
  1 sibling, 1 reply; 11+ messages in thread
From: Dmitry A. Fedorov @ 2004-07-19 12:49 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linux-mtd

On Mon, 19 Jul 2004, Josh Boyer wrote:

> The physical addresses for flash are usually provided by the user in the
> form of a board map driver.  If there isn't a specific map driver for
> your board, see physmap.c.

In previous MTD releases there was kernel config parameters
CONFIG_MTD_PHYSMAP_START and CONFIG_MTD_PHYSMAP_LEN
and it was enough to provide these parameters at kernel' .config
for physmap driver and new board worked. Now I should write my own board
map driver.
Why? It is better to restore this nice feature.

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

* Re: starting address of mtd device
  2004-07-19 12:49   ` Dmitry A. Fedorov
@ 2004-07-19 13:28     ` Josh Boyer
  2004-07-19 14:01       ` Dmitry A. Fedorov
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2004-07-19 13:28 UTC (permalink / raw)
  To: D.A.Fedorov; +Cc: linux-mtd

On Mon, 2004-07-19 at 07:49, Dmitry A. Fedorov wrote:
> On Mon, 19 Jul 2004, Josh Boyer wrote:
> 
> In previous MTD releases there was kernel config parameters
> CONFIG_MTD_PHYSMAP_START and CONFIG_MTD_PHYSMAP_LEN
> and it was enough to provide these parameters at kernel' .config
> for physmap driver and new board worked. Now I should write my own board
> map driver.
> Why? It is better to restore this nice feature.

That feature hasn't been removed...  that's why I said "If there isn't a
specific map driver for your board, see physmap.c".  So physmap is still
there.

However, some people prefer to write their own map drivers for their
boards for various reasons.  I was simply presenting all the options. 
Sorry for any confusion.

josh

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

* Re: starting address of mtd device
  2004-07-19 13:28     ` Josh Boyer
@ 2004-07-19 14:01       ` Dmitry A. Fedorov
  2004-07-19 15:50         ` Josh Boyer
  2004-07-20  3:22         ` Rainer Weikusat
  0 siblings, 2 replies; 11+ messages in thread
From: Dmitry A. Fedorov @ 2004-07-19 14:01 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linux-mtd

On Mon, 19 Jul 2004, Josh Boyer wrote:
> On Mon, 2004-07-19 at 07:49, Dmitry A. Fedorov wrote:
> > 
> > In previous MTD releases there was kernel config parameters
> > CONFIG_MTD_PHYSMAP_START and CONFIG_MTD_PHYSMAP_LEN
> > and it was enough to provide these parameters at kernel' .config
> > for physmap driver and new board worked. Now I should write my own board
> > map driver.
> > Why? It is better to restore this nice feature.
> 
> That feature hasn't been removed...  that's why I said "If there isn't a
> specific map driver for your board, see physmap.c".  So physmap is still
> there.
>
> However, some people prefer to write their own map drivers for their
> boards for various reasons.  I was simply presenting all the options. 

Yes, physmap.c, but now I can't specify address/length for it
from kernel .config parameters. Instead, I should create my own module
and place it before physmap.o in Makefile.

Well, what about generic physmap board module?
I can make patch.

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

* Re: starting address of mtd device
  2004-07-19 14:01       ` Dmitry A. Fedorov
@ 2004-07-19 15:50         ` Josh Boyer
  2004-07-21 12:32           ` Josh Boyer
  2004-07-20  3:22         ` Rainer Weikusat
  1 sibling, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2004-07-19 15:50 UTC (permalink / raw)
  To: D.A.Fedorov; +Cc: linux-mtd

On Mon, 2004-07-19 at 09:01, Dmitry A. Fedorov wrote:
> Yes, physmap.c, but now I can't specify address/length for it
> from kernel .config parameters. Instead, I should create my own module
> and place it before physmap.o in Makefile.

Ah, I see now.  I was only looking at the Kconfig file, which still has
the options in there.  Sorry, I must be especially dense today.

> 
> Well, what about generic physmap board module?
> I can make patch.

Jun Sun removed the CONFIG option support a while ago, and then
submitted a patch to the list that put it back.  Not sure why that patch
didn't make it into CVS...  it should have.

josh

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

* Re: starting address of mtd device
  2004-07-19 12:30 ` Josh Boyer
  2004-07-19 12:49   ` Dmitry A. Fedorov
@ 2004-07-19 21:55   ` Mak Kar
  1 sibling, 0 replies; 11+ messages in thread
From: Mak Kar @ 2004-07-19 21:55 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linux-mtd

So, basically If an application gets address as input,
it needs a board map driver to figure out which mtd
device this address belongs to.
So writing a board specific map driver seems a good
solution....


--- Josh Boyer <jdub@us.ibm.com> wrote:
> On Fri, 2004-07-16 at 14:01, Mak Kar wrote:
> > "cat /proc/mtd" would give me just the size of
> device
> > and erase size.
> > how can I get the starting address in flash of any
> > single mtd device?
> 
> The physical addresses for flash are usually
> provided by the user in the
> form of a board map driver.  If there isn't a
> specific map driver for
> your board, see physmap.c.
> 
> In other words, if you don't tell MTD where to look,
> it won't find
> anything. :)
> 
> josh
> 
> 



		
__________________________________
Do you Yahoo!?
Vote for the stars of Yahoo!'s next ad campaign!
http://advision.webevents.yahoo.com/yahoo/votelifeengine/

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

* Re: starting address of mtd device
  2004-07-19 14:01       ` Dmitry A. Fedorov
  2004-07-19 15:50         ` Josh Boyer
@ 2004-07-20  3:22         ` Rainer Weikusat
  2004-07-20  4:07           ` Dmitry A. Fedorov
  1 sibling, 1 reply; 11+ messages in thread
From: Rainer Weikusat @ 2004-07-20  3:22 UTC (permalink / raw)
  To: D.A.Fedorov; +Cc: linux-mtd

"Dmitry A. Fedorov" <D.A.Fedorov@inp.nsk.su> writes:
[...]

> Well, what about generic physmap board module?
> I can make patch.

I could provide you with one, if you wanted to use it (enables
configuration of arbitrarily mapped distinct flash chips via command
line, a sample looks like this:

CONFIG_CMDLINE="root=/dev/mtdblock2 physmap=phys_0:0x200000@0x2800000:2,phys_1:0x800000@0x2a00000:2 mtdparts=phys_0:128k(boot),-(root);phys_1:64k(top),8064k(main),64k(bottom)"

Patch is against 2.4.26-stock, but it should be reasonably to generic
to port it easily. I am actually using this with the board I am
working at the moment, and, except the fact that the *amdstd-functions
keep panicking my kernel (next work-step to do ;-), it seems to be
working fine.

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

* Re: starting address of mtd device
  2004-07-20  3:22         ` Rainer Weikusat
@ 2004-07-20  4:07           ` Dmitry A. Fedorov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry A. Fedorov @ 2004-07-20  4:07 UTC (permalink / raw)
  To: Rainer Weikusat; +Cc: linux-mtd

On Tue, 20 Jul 2004, Rainer Weikusat wrote:

> "Dmitry A. Fedorov" <D.A.Fedorov@inp.nsk.su> writes:
> 
> > Well, what about generic physmap board module?
> > I can make patch.
> 
> I could provide you with one, if you wanted to use it (enables
> configuration of arbitrarily mapped distinct flash chips via command
> line, a sample looks like this:
> 
> CONFIG_CMDLINE="root=/dev/mtdblock2 physmap=phys_0:0x200000@0x2800000:2,phys_1:0x800000@0x2a00000:2 mtdparts=phys_0:128k(boot),-(root);phys_1:64k(top),8064k(main),64k(bottom)"

Thanks a lot, give that to me.

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

* Re: starting address of mtd device
  2004-07-19 15:50         ` Josh Boyer
@ 2004-07-21 12:32           ` Josh Boyer
  2004-07-22  6:07             ` Dmitry A. Fedorov
  0 siblings, 1 reply; 11+ messages in thread
From: Josh Boyer @ 2004-07-21 12:32 UTC (permalink / raw)
  To: D.A.Fedorov; +Cc: linux-mtd

On Mon, 2004-07-19 at 10:50, Josh Boyer wrote:
> > 
> > Well, what about generic physmap board module?
> > I can make patch.
> 
> Jun Sun removed the CONFIG option support a while ago, and then
> submitted a patch to the list that put it back.  Not sure why that patch
> didn't make it into CVS...  it should have.

Jun Sun's patch is in CVS now.  CONFIG_MTD_PHSYMAP options are back.

josh

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

* Re: starting address of mtd device
  2004-07-21 12:32           ` Josh Boyer
@ 2004-07-22  6:07             ` Dmitry A. Fedorov
  0 siblings, 0 replies; 11+ messages in thread
From: Dmitry A. Fedorov @ 2004-07-22  6:07 UTC (permalink / raw)
  To: Josh Boyer; +Cc: linux-mtd

On Wed, 21 Jul 2004, Josh Boyer wrote:

> > Jun Sun removed the CONFIG option support a while ago, and then
> > submitted a patch to the list that put it back.  Not sure why that patch
> > didn't make it into CVS...  it should have.
> 
> Jun Sun's patch is in CVS now.  CONFIG_MTD_PHSYMAP options are back.

Great thanks, now it works.

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

end of thread, other threads:[~2004-07-22  6:18 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-16 19:01 starting address of mtd device Mak Kar
2004-07-19 12:30 ` Josh Boyer
2004-07-19 12:49   ` Dmitry A. Fedorov
2004-07-19 13:28     ` Josh Boyer
2004-07-19 14:01       ` Dmitry A. Fedorov
2004-07-19 15:50         ` Josh Boyer
2004-07-21 12:32           ` Josh Boyer
2004-07-22  6:07             ` Dmitry A. Fedorov
2004-07-20  3:22         ` Rainer Weikusat
2004-07-20  4:07           ` Dmitry A. Fedorov
2004-07-19 21:55   ` Mak Kar

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