* Issues with a Doc Milplus
@ 2004-10-01 13:46 Nicolas Pouillon
2004-10-01 13:57 ` David Woodhouse
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pouillon @ 2004-10-01 13:46 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 2066 bytes --]
Hello list !
I'm porting Linux to my PDA (Asus A620).
It has a DocMilPlus inside.
I'm running handhelds.org kernel, which has a non-up-to-date mtd part.
http://cvs.handhelds.org/cgi-bin/viewcvs.cgi/linux/kernel26/drivers/mtd/
(It still has Self-contained drivers)
When trying to make MTD part work, I bumped in different problems:
1/ Doc is mapped to mem address 0x0, in docprobe.c there is an
expression like:
if (doc_config_location) {
[probe at specified address]
} else {
[probe hardlisted addresses]
}
So it never probes for my chip at 0. I noticed the same construct is
present in newer probing routines.
Is there a special way of declaring a chip at 0x0 ?
2/ It was not known by nan_ids, I had to add the following line:
{"NAND 64MiB 3,3V", 0xa5, 26, 0x4000, 0},
Then the chip is detected as:
INFTL: inftlcore.c $Revision: 1.14 $, inftlmount.c $Revision: 1.12 $
Using configured DiskOnChip probe address 0x0
DiskOnChip Millennium Plus found at address 0x0
Flash chip found: Manufacturer ID: 98, Chip ID: A5 (Toshiba:MyNAND 64MiB
3,3V)
Flash chip found: Manufacturer ID: 98, Chip ID: A5 (Toshiba:MyNAND64MiB
3,3V)
2 flash chips found. Total DiskOnChip size: 128 MiB
INFTL: could not find valid boot record?
INFTL: could not mount device
slram: not enough parameters.
3/ It seems to be detected twice, it should be 64MiB total, and there is
physically one chip on the board.
Could one chip be virtually two 32MiB chips ?
Is there some special tweaking I missed ?
4/ Using arm part in doc2000.h which is:
#define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32
*)(((unsigned long)adr)+((reg)<<2))))
#define WriteDOC_(d, adr, reg) do{ *(volatile __u32 *)(((unsigned
#long)adr)+((reg)<<2)) = (__u32)d; wmb();} while(0)
makes the machine crash, I have to use readb/writeb in order to make the
device work.
I'm sorry for this so-long mail, dont hesitate to flame me with some
RTFMs if I need them, but I've not found similar solved entries ;)
Thanks !
--
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Issues with a Doc Milplus
2004-10-01 13:46 Issues with a Doc Milplus Nicolas Pouillon
@ 2004-10-01 13:57 ` David Woodhouse
2004-10-01 14:27 ` Nicolas Pouillon
0 siblings, 1 reply; 12+ messages in thread
From: David Woodhouse @ 2004-10-01 13:57 UTC (permalink / raw)
To: Nicolas Pouillon; +Cc: linux-mtd
On Fri, 2004-10-01 at 15:46 +0200, Nicolas Pouillon wrote:
> 1/ Doc is mapped to mem address 0x0, in docprobe.c there is an
> expression like:
> if (doc_config_location) {
> [probe at specified address]
> } else {
> [probe hardlisted addresses]
> }
>
> So it never probes for my chip at 0. I noticed the same construct is
> present in newer probing routines.
> Is there a special way of declaring a chip at 0x0 ?
Hmmm. We should probably use -1 for 'unconfigured' instead of zero. Want
to provide a patch accordingly?
> 2/ It was not known by nan_ids, I had to add the following line:
> {"NAND 64MiB 3,3V", 0xa5, 26, 0x4000, 0},
Are you sure that's a 64MiB chip?
> 3/ It seems to be detected twice, it should be 64MiB total, and there is
> physically one chip on the board.
> Could one chip be virtually two 32MiB chips ?
I think that might actually be the case for the 64MiB DiskOnChip M+,
yes.
> 4/ Using arm part in doc2000.h which is:
> #define ReadDOC_(adr, reg) ((unsigned char)(*(volatile __u32
> *)(((unsigned long)adr)+((reg)<<2))))
> #define WriteDOC_(d, adr, reg) do{ *(volatile __u32 *)(((unsigned
> #long)adr)+((reg)<<2)) = (__u32)d; wmb();} while(0)
>
> makes the machine crash, I have to use readb/writeb in order to make the
> device work.
If provide that in 'diff -u' form we can change that too.
--
dwmw2
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Issues with a Doc Milplus
2004-10-01 13:57 ` David Woodhouse
@ 2004-10-01 14:27 ` Nicolas Pouillon
2004-10-02 13:55 ` Patch ! Nicolas Pouillon
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pouillon @ 2004-10-01 14:27 UTC (permalink / raw)
To: David Woodhouse; +Cc: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1386 bytes --]
[Fri, 01 Oct 2004 14:57:45 +0100]
David Woodhouse <dwmw2@infradead.org> eut le bonheur d'écrire:
> Hmmm. We should probably use -1 for 'unconfigured' instead of zero.
> Want to provide a patch accordingly?
I could do so, but it could break current configs where 0 meant "probing
at prelisted addresses"... (but users should read docs anyway ;))
> > 2/ It was not known by nan_ids, I had to add the following line:
> > {"NAND 64MiB 3,3V", 0xa5, 26, 0x4000, 0},
>
> Are you sure that's a 64MiB chip?
In CE, there are 32Mib for system rom, and 32Mib for user, and chip is
alone on the board, so yes it is 64. I have chip ref somewhere if it can
help...
> > Could one chip be virtually two 32MiB chips ?
>
> I think that might actually be the case for the 64MiB DiskOnChip M+,
> yes.
Right then, it explains both points. I'll declare it as a 32Mib chip in
list.
[mmio - readb/writeb]
> If provide that in 'diff -u' form we can change that too.
Hm, there is already #ifdef-ing using
-32bit mmio for __arm__
-16bit mmio for __ppc__
-readb/writeb else.
I read other PDA's config based on the same arch (Xscale), where it
seems to work. This issue seems quite "local" to my works, could this be
a side effect of something else ?
I'll submit a patch for these.
--
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread* Patch !
2004-10-01 14:27 ` Nicolas Pouillon
@ 2004-10-02 13:55 ` Nicolas Pouillon
2004-10-02 20:42 ` Thomas Gleixner
0 siblings, 1 reply; 12+ messages in thread
From: Nicolas Pouillon @ 2004-10-02 13:55 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 580 bytes --]
[Fri, 1 Oct 2004 16:27:05 +0200]
Nicolas Pouillon <nipo@ssji.net> eut le bonheur d'écrire:
> I'll submit a patch for these.
Here it is, but I dont like changing 0 to -1 for undefined.
Maybe adding (another) config option could be better (like "force null
address probing")... thoughts ?
I made two patches, for different handleds.org kernel dates (fall July,
(the one I'm working on): 2.6.7, and now: 2.6.8.1)
http://nipo.ssji.net/mtd/patches/
(I've not tried 2.6.8.1 version)
--
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: Patch !
2004-10-02 13:55 ` Patch ! Nicolas Pouillon
@ 2004-10-02 20:42 ` Thomas Gleixner
2004-10-03 1:11 ` Nicolas Pouillon
[not found] ` <20041003030653.2e0452a7.nipo@ssji.net>
0 siblings, 2 replies; 12+ messages in thread
From: Thomas Gleixner @ 2004-10-02 20:42 UTC (permalink / raw)
To: Nicolas Pouillon; +Cc: linux-mtd
On Sat, 2004-10-02 at 15:55, Nicolas Pouillon wrote:
> I made two patches, for different handleds.org kernel dates (fall July,
> (the one I'm working on): 2.6.7, and now: 2.6.8.1)
>
> (I've not tried 2.6.8.1 version)
You should have tried 2.6.8.1 !!
Did you notice the DEPRECATED NOTE in Kconfig ????
INFTL in 2.6.8.1 tells you:
"INFTL no longer supports the old DiskOnChip drivers loaded via
docprobe.\n"
"Please use the new diskonchip driver under the NAND subsystem.\n");
Please follow this advise. The docxx stuff in mtd/devices will be
removed in the near future and INFTL with the old drivers was missing
some functionality anyway, AFAIK.
The chip ID part of your patch is giving me a bit more headache. The ID
0xA5 is a valid ID for NAND 2GiB 1,8V 8-bit.
Since NAND is available _all_ manufacturers use the same Chip ID codes
for chips with the same specifications. All Cardreaders, MP3-Players and
Digicams rely on those ID's.
I doubt that there are 32 MiB chips around with chip ID 0xA5. The Chip
ID in all Toshiba datasheets of their various 32MiB NAND chips is 0x75.
I'm not going to put this line into the code without sensible
confirmation that this is the real ID. Please figure out the DoC
partnumber and let M-Sys confirm this. If they confirm that some moron
started to break the ID rules, then we have to figure out a way to make
this work. Putting this line without any further modifications into the
code would break other drivers.
tglx
^ permalink raw reply [flat|nested] 12+ messages in thread* Re: Patch !
2004-10-02 20:42 ` Thomas Gleixner
@ 2004-10-03 1:11 ` Nicolas Pouillon
[not found] ` <20041003030653.2e0452a7.nipo@ssji.net>
1 sibling, 0 replies; 12+ messages in thread
From: Nicolas Pouillon @ 2004-10-03 1:11 UTC (permalink / raw)
To: linux-mtd
[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]
[Sat, 02 Oct 2004 22:42:09 +0200]
Thomas Gleixner <tglx@linutronix.de> eut le bonheur d'écrire:
> You should have tried 2.6.8.1 !!
I have.
2.6.8.1 kernel from hh.org just crashes on my device, (MTD in or not),
and I have no time to investigate this issue, so I keep to 2.6.7 (no
interesting changes in 2.6.8.1 to me anyway)
> Did you notice the DEPRECATED NOTE in Kconfig ????
[..]
> "Please use the new diskonchip driver under the NAND subsystem.\n");
Indeed, and the other one is marked experimental ;)
> Please follow this advise. The docxx stuff in mtd/devices will be
> removed in the near future and INFTL with the old drivers was missing
> some functionality anyway, AFAIK.
Yes, sure, I will switch to new drivers ASAP, but we (project people)
have taken 2.6.7 as reference, so we'll use this patch for a few
more weeks.
I've tried to update to newer MTD kernel part, keeping the rest in 2.6.7
state, but some of the API seems to have changed.
> The chip ID part of your patch is giving me a bit more headache. The
> ID 0xA5 is a valid ID for NAND 2GiB 1,8V 8-bit.
Whoops, didn't pay attention to this :(
[...]
> Please figure out the DoC
> partnumber and let M-Sys confirm this. If they confirm that some moron
> started to break the ID rules, then we have to figure out a way to
> make this work. Putting this line without any further modifications
> into the code would break other drivers.
Is there some means to determine chip type by software ?
Things I can read on the chip (hoping i'm correct, it is not very
readable) are:
"M-Systems
Disc-on-chip
MD333-D64-V3-X
Japan 033-----" (dunno what's under "----")
--
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread[parent not found: <20041003030653.2e0452a7.nipo@ssji.net>]
end of thread, other threads:[~2004-10-04 21:12 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-01 13:46 Issues with a Doc Milplus Nicolas Pouillon
2004-10-01 13:57 ` David Woodhouse
2004-10-01 14:27 ` Nicolas Pouillon
2004-10-02 13:55 ` Patch ! Nicolas Pouillon
2004-10-02 20:42 ` Thomas Gleixner
2004-10-03 1:11 ` Nicolas Pouillon
[not found] ` <20041003030653.2e0452a7.nipo@ssji.net>
[not found] ` <1096768161.21297.129.camel@thomas>
2004-10-03 20:18 ` Nicolas Pouillon
2004-10-04 8:05 ` Thomas Gleixner
2004-10-04 16:38 ` Nicolas Pouillon
2004-10-04 17:59 ` Thomas Gleixner
2004-10-04 20:47 ` Nicolas Pouillon
2004-10-04 21:04 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox