* Finding flash type...
@ 2006-11-29 18:53 Siddharth Choudhuri
2006-11-30 9:53 ` Ricard Wanderlof
2006-12-01 8:22 ` Artem Bityutskiy
0 siblings, 2 replies; 8+ messages in thread
From: Siddharth Choudhuri @ 2006-11-29 18:53 UTC (permalink / raw)
To: linux-mtd
Hi,
Is it possible to know what kind of flash (NOR type or
NAND type) is installed on a system ? (may be using
lsmod -or- cat /proc/ksyms | grep ? )
thanks,
-siddharth
____________________________________________________________________________________
Cheap talk?
Check out Yahoo! Messenger's low PC-to-Phone call rates.
http://voice.yahoo.com
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-11-29 18:53 Finding flash type Siddharth Choudhuri
@ 2006-11-30 9:53 ` Ricard Wanderlof
2006-12-01 8:22 ` Artem Bityutskiy
1 sibling, 0 replies; 8+ messages in thread
From: Ricard Wanderlof @ 2006-11-30 9:53 UTC (permalink / raw)
To: Siddharth Choudhuri; +Cc: linux-mtd
On Wed, 29 Nov 2006, Siddharth Choudhuri wrote:
> Is it possible to know what kind of flash (NOR type or
> NAND type) is installed on a system ? (may be using
> lsmod -or- cat /proc/ksyms | grep ? )
There is an ioctl (MEMGETINFO) that provides information on the type of
flash memory among other info about the device. It is used by the
mtd_debug utility which is part of the mtd-utils package, which dumps the
information in human-readable form.
You can otherwise guess by checking the erasesize provided by
cat /proc/mtd, comparing the erasesize against expected erase sizes for
the devices you expect to find. As a general solution this doesn't work
well though.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-11-29 18:53 Finding flash type Siddharth Choudhuri
2006-11-30 9:53 ` Ricard Wanderlof
@ 2006-12-01 8:22 ` Artem Bityutskiy
2006-12-06 1:44 ` Siddharth Choudhuri
1 sibling, 1 reply; 8+ messages in thread
From: Artem Bityutskiy @ 2006-12-01 8:22 UTC (permalink / raw)
To: Siddharth Choudhuri; +Cc: linux-mtd
On Wed, 2006-11-29 at 10:53 -0800, Siddharth Choudhuri wrote:
> Hi,
>
> Is it possible to know what kind of flash (NOR type or
> NAND type) is installed on a system ? (may be using
> lsmod -or- cat /proc/ksyms | grep ? )
It would be ideal if somebody added sysfs support to MTD. Then you could
just look at sysfs and find it out. Now you should use ioctl's.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-12-01 8:22 ` Artem Bityutskiy
@ 2006-12-06 1:44 ` Siddharth Choudhuri
2006-12-06 2:05 ` Josh Boyer
0 siblings, 1 reply; 8+ messages in thread
From: Siddharth Choudhuri @ 2006-12-06 1:44 UTC (permalink / raw)
To: dedekind; +Cc: linux-mtd
--- Artem Bityutskiy <dedekind@infradead.org> wrote:
> It would be ideal if somebody added sysfs support to
> MTD. Then you could
> just look at sysfs and find it out. Now you should
> use ioctl's.
>
I could start adding the sysfs support to reflect
flash type. I have the following questions though:
1. Should the information be exported in the
/sys/block/mtd* directory ? The other place would be
/sys/class/mtd*.
2. Should any other information be also exported ? The
mtd_info_user structure [include/mtd-abi.h] has
additional fields that might be useful - size,
erasesize, oobblock(if present) ?
Any suggestions, pointers would be great.
thanks,
-siddharth
____________________________________________________________________________________
Yahoo! Music Unlimited
Access over 1 million songs.
http://music.yahoo.com/unlimited
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-12-06 1:44 ` Siddharth Choudhuri
@ 2006-12-06 2:05 ` Josh Boyer
2006-12-06 8:31 ` Ricard Wanderlof
2006-12-06 11:57 ` Artem Bityutskiy
0 siblings, 2 replies; 8+ messages in thread
From: Josh Boyer @ 2006-12-06 2:05 UTC (permalink / raw)
To: Siddharth Choudhuri; +Cc: linux-mtd
On Tue, 2006-12-05 at 17:44 -0800, Siddharth Choudhuri wrote:
> --- Artem Bityutskiy <dedekind@infradead.org> wrote:
> > It would be ideal if somebody added sysfs support to
> > MTD. Then you could
> > just look at sysfs and find it out. Now you should
> > use ioctl's.
> >
> I could start adding the sysfs support to reflect
> flash type. I have the following questions though:
>
> 1. Should the information be exported in the
> /sys/block/mtd* directory ? The other place would be
> /sys/class/mtd*.
/sys/class/mtd would be preferable. MTD isn't a block driver, so it
doesn't really belong under block.
> 2. Should any other information be also exported ? The
> mtd_info_user structure [include/mtd-abi.h] has
> additional fields that might be useful - size,
> erasesize, oobblock(if present) ?
Yes, most of mtd_info_user would be good to export.
josh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-12-06 2:05 ` Josh Boyer
@ 2006-12-06 8:31 ` Ricard Wanderlof
2006-12-06 11:58 ` Artem Bityutskiy
2006-12-06 11:57 ` Artem Bityutskiy
1 sibling, 1 reply; 8+ messages in thread
From: Ricard Wanderlof @ 2006-12-06 8:31 UTC (permalink / raw)
To: Linux mtd
On Tue, 5 Dec 2006, Josh Boyer wrote:
>> 2. Should any other information be also exported ? The
>> mtd_info_user structure [include/mtd-abi.h] has
>> additional fields that might be useful - size,
>> erasesize, oobblock(if present) ?
>
> Yes, most of mtd_info_user would be good to export.
For NAND flash chips I think it would also be nice to get a list of bad
blocks. This can be most useful when debugging.
/Ricard
--
Ricard Wolf Wanderlöf ricardw(at)axis.com
Axis Communications AB, Lund, Sweden www.axis.com
Phone +46 46 272 2016 Fax +46 46 13 61 30
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-12-06 2:05 ` Josh Boyer
2006-12-06 8:31 ` Ricard Wanderlof
@ 2006-12-06 11:57 ` Artem Bityutskiy
1 sibling, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2006-12-06 11:57 UTC (permalink / raw)
To: Siddharth Choudhuri; +Cc: linux-mtd
On Tue, 2006-12-05 at 20:05 -0600, Josh Boyer wrote:
> > 1. Should the information be exported in the
> > /sys/block/mtd* directory ? The other place would be
> > /sys/class/mtd*.
>
I am unsure it is /sys/class/. For MTD devices we should probably have
full device/driver/bus support so it'll go
at /sys/devices, /sys/drivers/, /sys/bus. In case of MTD the bus is so
called "platform" bus. Please, refer to linux device drivers v3.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Finding flash type...
2006-12-06 8:31 ` Ricard Wanderlof
@ 2006-12-06 11:58 ` Artem Bityutskiy
0 siblings, 0 replies; 8+ messages in thread
From: Artem Bityutskiy @ 2006-12-06 11:58 UTC (permalink / raw)
To: Ricard Wanderlof; +Cc: Linux mtd
On Wed, 2006-12-06 at 09:31 +0100, Ricard Wanderlof wrote:
> For NAND flash chips I think it would also be nice to get a list of bad
> blocks. This can be most useful when debugging.
Yeah. Once sysfs support is there we could export many useful
information without need to call these syscalls.
--
Best regards,
Artem Bityutskiy (Битюцкий Артём)
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2006-12-06 12:16 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-29 18:53 Finding flash type Siddharth Choudhuri
2006-11-30 9:53 ` Ricard Wanderlof
2006-12-01 8:22 ` Artem Bityutskiy
2006-12-06 1:44 ` Siddharth Choudhuri
2006-12-06 2:05 ` Josh Boyer
2006-12-06 8:31 ` Ricard Wanderlof
2006-12-06 11:58 ` Artem Bityutskiy
2006-12-06 11:57 ` Artem Bityutskiy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox