Modification to Doc2000.c for Virgin Webplayer

David Griffith dgriffith at ccimackay.com
Sun Apr 29 02:22:53 EDT 2001


Hi,
    Apologies for this note if someone else has been there / done that.

I have a few Virgin Webplayers with 48MB doc2000's in them.
(Basically a MediaGX 200Mhz sbc)

Anyways, I've been having trouble with the detection of the DOC. The MTD
drivers in the linux kernel have trouble finding
partitions on the DOC. (When I say "Have trouble" its means 99 out of 100
times the nftl layer can't find a valid boot record, gets all grumpy, and
gives up).

So I turned on debugging,  liberally sprinkled a few more printk's around..
and hmmm.... turning on level 3 debugging makes it work.

So, I says to meself, "Self, it must be some interaction with some sort of
delay thingy with the DoC :-)",  a quick poke through the source showed this
in doc2000.c in one of the functions near the front (I can't remember the
name! sorry - my code is at home!)

 what makes it work is to change this line (about 75 lines down in kernel
2.4.4):

    for (i = 0; i < cycles ; i++) {

    to this :

    for (i = 0; i < cycles*4 ; i++) {


This effectively *quadruples* the delay time for all sorts of things in the
code it seems.
With this in - I can detect partitions, mount them , read / write to them
just fine.
I did try just doubling it, and I could read it, but it wasn't very happy
about writing to it.
I'd post logs , but currently I boot to a ramdisk...

So,
Any ideas as to why? ;-)

Regards,
    David



To unsubscribe, send "unsubscribe mtd" to majordomo at infradead.org



More information about the linux-mtd mailing list