[PATCH]Probing at 0x0

Thomas Gleixner tglx at linutronix.de
Mon Oct 4 17:53:03 EDT 2004


On Mon, 2004-10-04 at 21:50, Nicolas Pouillon wrote:
> I updated to last CVS snapshot.
> After tweaking necessary declarations to interface with 2.6.7, I remade
> some modifications in order to be able to probe at 0x0.
> I made a patch for this (I hope that way is not too bad):
> http://nipo.ssji.net/patches/mtd/nulladdress.diff

Please add the patches to your mail. I'm not interested in collecting
outdated http references. Providing patches by http reference makes
sense for large modification which would either be rejected by the ML or
annoying the majority of readers.

> I still need to use readb and writeb, but this is not in the patch.

WTF did say you should not use readb/writeb ? 

> This time, chip is probed as a DoC-Mil+ 32MB, driver complains about it
> not being supported. It seems ok, and as mtd are much like rocket
> science to me, I'll wait a little until it is (i hope) supported...

It might be rocket science for you, but it still relies on simple
straight forward facts.

The DoC, which you pointed out, has Doc-chip-ID 0x41 according to the
datasheet.

from include/linux/mtd/doc2000.h
#define DOC_ChipID_DocMilPlus32	0x40
#define DOC_ChipID_DocMilPlus16	0x41

So how is it identified as a Mil+32 ? 
Same magic as the NAND-ID is 0x85 instead of 0x75 ? 
Same quick solution, by adding some magic code / hope ?

> I'll try to understand the mmio vs readb/writeb issue as a time
> holder. ;)

He, time holder. Did you mean placeholder ? 
It's neither nore. mmio is a technology. readb is a macro. writeb too.

mmio == Memory Mapped Input Output. That means you have no seperate IO
port instruction crap which was introduced by the worst CPU architecture
on this planet. Everything, even your Line Printer Port is accessible in
the memory space via a plain pointer without an extra IO-related
instruction like outb/inb.

see http://dri.sourceforge.net/cgi-bin/moin.cgi/MMIO 

and http://dri.sourceforge.net/cgi-bin/moin.cgi/PIO

possibly http://www.c-for-dummies.com

in any case see http://lxr.linux.no/ident?v=2.6.8.1;a=arm;i=readb
where you can find out following the refrences that readb resolves at
the end to
(*(volatile unsigned char  *)(a))

google for "volatile" yourself.


Sorry for being cynical, but I'm too old to believe in IT-witchcrafts.

tglx






More information about the linux-mtd mailing list