device info in /proc/mtd

Jörn Engel joern at wohnheim.fh-wedel.de
Mon Apr 21 07:44:14 EDT 2003


On Wed, 16 April 2003 11:25:45 -0600, Thayne Harbaugh wrote:
> 
> It's nice that loading the amd76xrom module outputs probe information
> about a device manufacturer and chip:
> 
> [root at 172 2466]# modprobe amd76xrom
> Found: PMC Pm49FL004
> number of JEDEC chips: 1
> amd76xrom chip at offset: 480000
> 
> I hoped this same information would be in /proc/mtd - it's not.
> 
> [root at 172 2466]# cat /proc/mtd
> dev:    size   erasesize  name
> mtd0: 00080000 00001000 "AMD76X rom"
> 
> Is there someplace where the manufacturer and chip are available other
> than in the printk() messages?  It would be nice to be able to query
> this information at any time - a specific model of motherboard might
> socket a different chip depending on cost/availability and I'd like to
> be able to track which BIOS flash chip is being used.
> 
> Something like this in /proc/mtd might be nice:
> 
> dev:    size   erasesize  name       manufacturer chip chip_name
> mtd0: 00080000 00001000 "AMD76X rom" 009d         006e "PMC Pm49FL004"
> 
> Am I crazey?  Is this plain wrong?  Does anyone have objections if I
> submit a patch?

You are not crazy, but I consider this to be the wrong spot for the
information. /proc/mtd should hold those informations that mtd core
code knows about. Device specifics should go somewhere else.

Or could you find a nice common interface for mtdblock (which hard
drive?), mtdram (physical ram addresses), mtdram2 (dynamic allocation,
print the whole list?), NAND (no idea), NOR (manufacturer, chip),
really odd stuff like NOR with hardware ECC and all the nice goodies
that are yet to appear?

Put it into /proc/<find a nice name>, make it as general as possible,
but not more.

Jörn

-- 
Eighty percent of success is showing up.
-- Woody Allen



More information about the linux-mtd mailing list