[Touch Diamond, MDA Compact IV ROM Development] lavender.t:
diamond mmc sees the light from the end of the tunnel

i had to use my best guess to crunch the A0/A4 numbers and then out of sudden saw a big step. if the debug log didnt lie to me, the diamond seems to have the moviNAND on SDC2. i got the device /dev/mmcblk0 created and part of the MMC commands ran successfully. although if i "dd if=/dev/mmcblk0" it still times out.

got the following logs:

[ 5.678819] mmc0: new MMC card at address 0001
[ 5.680091] device: 'mmc0:0001': device_add
[ 5.700396] PM: Adding info for mmc:mmc0:0001
[ 5.700427] bus: 'mmc': add device mmc0:0001
[ 5.700641] bus: 'mmc': driver_probe_device: matched device mmc0:0001 with driver mmcblk
[ 5.700671] bus: 'mmc': really_probe: probing driver mmcblk with device mmc0:0001
[ 5.710457] mmcblk0: mmc0:0001 XEE0AM 3932160KiB
[ 5.710518] device: 'mmcblk0': device_add
[ 5.710854] PM: Adding info for No Bus:mmcblk0
[ 5.731190] mmcblk0:<7>mmc0: starting CMD18 arg 00000000 flags 000000b5
[ 5.740152] mmc0: blksz 512 blocks 8 flags 00000a00 tsac 15 ms nsac 1000
[ 5.760122] mmc0: CMD12 arg 00000000 flags 0000049d
[ 5.760183] +msmsdcc_request
[ 5.760213] MSMSDCC: poll=0
[ 5.760244] mmc0: msmsdcc_start_command: op 12 arg 00000000 flags 000000b5
[ 5.760305] mmc0: msmsdcc_irq: irq0 00082040
[ 5.760335] mmc0: msmsdcc_irq: irq0 00082000
[ 5.760824] mmc0: msmsdcc_start_command: op 0c arg 00000000 flags 0000049d
[ 5.760885] mmc0: msmsdcc_irq: irq0 00400040
[ 5.760915] mmc0: req done (CMD18): 0: 00000900 0f5903bf f6dbffe7 964040b8
[ 5.760946] mmc0: 4096 bytes transferred: 0
[ 5.760976] mmc0: (CMD12): 0: 00000b00 0f5903bf f6dbffe7 964040b8
[ 5.761037] mmc0: msmsdcc_irq: irq0 00400000
[ 5.785157]
[ 5.785767] driver: 'mmc0:0001': driver_bound: bound to device 'mmcblk'
[ 5.790091] bus: 'mmc': really_probe: bound device mmc0:0001 to driver mmcblk

the line "[ 5.710457] mmcblk0: mmc0:0001 XEE0AM 3932160KiB" suggested a 4GB MMC was online. there is only one 4GB block, i think. :)

the dd failure logs are:

[ 43.243570] mmc0: starting CMD18 arg 00000000 flags 000000b5
[ 43.250244] mmc0: blksz 512 blocks 32 flags 00000a00 tsac 15 ms nsac 1000
[ 43.262441] mmc0: CMD12 arg 00000000 flags 0000049d
[ 43.270946] +msmsdcc_request
[ 43.281465] MSMSDCC: poll=0
[ 43.289613] mmc0: msmsdcc_start_command: op 12 arg 00000000 flags 000000b5
[ 43.290091] mmc0: msmsdcc_irq: irq0 00400048
[ 43.290091] mmc0: Data timeout
[ 43.290091] mmc0: msmsdcc_irq: irq0 00400000
[ 43.290244] mmc0: DMA channel flushed (0x80000004)
[ 43.298087] mmc0: DATACNT = 16384, FIFOCNT = 0, STATUS = 0x00400000
[ 43.300091] Flush data: 0000c003 1562e000 00000000 00400040 00400040 00000003
[ 43.300091] mmc0: msmsdcc_start_command: op 0c arg 00000000 flags 0000049d
[ 43.300152] mmc0: msmsdcc_irq: irq0 00400040
[ 43.308118] mmc0: req done (CMD18): 0: 00000900 0f5903bf f6dbffe7 964040b8
[ 43.310091] mmc0: 0 bytes transferred: -110
[ 43.310091] mmc0: (CMD12): 0: 00000b00 0f5903bf f6dbffe7 964040b8
[ 43.310091] mmc0: msmsdcc_irq: irq0 00400000
[ 43.321495] mmcblk0: error -110 transferring data
[ 43.330610] end_request: I/O error, dev mmcblk0, sector 0
[ 43.338789] Buffer I/O error on device mmcblk0, logical block 0
[ 43.340091] end_request: I/O error, dev mmcblk0, sector 8
[ 43.340091] Buffer I/O error on device mmcblk0, logical block 1
[ 43.340091] end_request: I/O error, dev mmcblk0, sector 16
[ 43.340091] Buffer I/O error on device mmcblk0, logical block 2
[ 43.340091] end_request: I/O error, dev mmcblk0, sector 24
[ 43.340091] Buffer I/O error on device mmcblk0, logical block 3
[ 43.350336] mmc0: starting CMD18 arg 00000000 flags 000000b5
[ 43.360213] mmc0: blksz 512 blocks 8 flags 00000a00 tsac 15 ms nsac 1000
[ 43.373967] mmc0: CMD12 arg 00000000 flags 0000049d
[ 43.380915] +msmsdcc_request
[ 43.391007] MSMSDCC: poll=0
[ 43.399796] mmc0: msmsdcc_start_command: op 12 arg 00000000 flags 000000b5
[ 43.400091] mmc0: msmsdcc_irq: irq0 00400048
[ 43.400091] mmc0: Data timeout
[ 43.400091] mmc0: msmsdcc_irq: irq0 00400000
[ 43.400305] mmc0: DMA channel flushed (0x80000004)
[ 43.409033] mmc0: DATACNT = 4096, FIFOCNT = 0, STATUS = 0x00400000
[ 43.410091] Flush data: 0000c003 1562e000 00000000 00400040 00400040 00000003
[ 43.410091] mmc0: msmsdcc_start_command: op 0c arg 00000000 flags 0000049d
[ 43.410152] mmc0: msmsdcc_irq: irq0 00400040
[ 43.419277] mmc0: req done (CMD18): 0: 00000900 0f5903bf f6dbffe7 964040b8
[ 43.420091] mmc0: 0 bytes transferred: -110
[ 43.420091] mmc0: (CMD12): 0: 00000b00 0f5903bf f6dbffe7 964040b8
[ 43.420091] mmc0: msmsdcc_irq: irq0 00400000
[ 43.432350] mmcblk0: error -110 transferring data
[ 43.440915] end_request: I/O error, dev mmcblk0, sector 0
[ 43.450091] Buffer I/O error on device mmcblk0, logical block 0

i guess it could be the 20MHz clock not entirely correct. will look into it further.

phew ...

- lt