Hi el.ign,
Okay, thank you for checking into the eMMC device compatibility.
Regarding the MMC controller registers, the differences between Linux 3.10 and Linux 4.20 are:
- The wait_priv_data bit in the CMD register seems to be normally set in Linux 3.10 but not in Linux 4.20.
- The msize field and rx and tx watermark fields in the FIFOTH register are set differently between Linux 3.10 and Linux 4.20. For example, nominally I see a value of 0x21ff0200 for Linux 3.10 and a value of 0x607f0200 for Linux 4.20.
- Interestingly, the PWREN register has a value of 0 for Linux 3.10 but a value of 1 (which I would expect) for Linux 4.20.
As a test, I tried modifying these registers for the Linux 4.20 based image to match those for Linux 3.10 but it did not help.
In addition, I noticed differences in the ext CSD mode set for the eMMC itself between Linux 3.10 and Linux 4.20. For Linux 3.10, HPI_MGMT is enabled but in Linux 4.20 it is not. Also, for Linux 4.20 CACHE_CTRL is enabled but it is not in Linux 3.10. Finally, for Linux 4.20 POWER_OFF_NOTIFICATION is enabled but it is not in Linux 3.10.
Also as a test, I tried modifying the switch commands used to configure these mode settings in the ext CSD for the eMMC device to match Linux 3.10 but it did not help.
Some examples of file corruption that are seen (note that the occurrences are random):
[ 1.130239] Waiting for root device /dev/mmcblk0p5...
[ 1.136248] mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 52000000Hz, actual 50000000HZ div = 0)
[ 1.150205] mmc0: new high speed MMC card at address 0001
[ 1.156915] mmcblk0: mmc0:0001 P1XXXX 3.60 GiB
[ 1.163152] mmcblk0boot0: mmc0:0001 P1XXXX partition 1 16.0 MiB
[ 1.170272] mmcblk0boot1: mmc0:0001 P1XXXX partition 2 16.0 MiB
[ 1.278405] mmcblk0: p1 p2 p3 p4 < >
[ 1.312344] VFS: Cannot open root device "mmcblk0p5" or unknown-block(179,5): error -6
[ 1.320237] Please append a correct "root=" boot option; here are the available partitions:
[ 1.328661] 0100 8192 ram0
[ 1.328663] (driver?)
[ 1.334759] 0101 8192 ram1
[ 1.334761] (driver?)
[ 1.340838] b300 3776512 mmcblk0
[ 1.340840] driver: mmcblk
[ 1.347618] b301 143360 mmcblk0p1 55af3d06-01
[ 1.347620]
[ 1.354398] b302 1024 mmcblk0p2 55af3d06-02
[ 1.354399]
[ 1.361168] b303 143360 mmcblk0p3 55af3d06-03
[ 1.361169]
[ 1.367945] b304 1 mmcblk0p4
[ 1.367946]
[ 1.373775] Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(179,5)
[ 46.336168] EXT4-fs error (device mmcblk0p5): htree_dirblock_to_tree:1007: inode #1999: block 10117: comm charon: bad entry in directory: directory entry overrun - offset=0, inode=3892174576, rec_len=57072, name_len=253, size=1024
[ 305.111761] EXT4-fs (mmcblk0p5): error count since last fsck: 1
[ 305.117683] EXT4-fs (mmcblk0p5): initial error at time 46: htree_dirblock_to_tree:1007: inode 1999: block 10117
[ 305.127746] EXT4-fs (mmcblk0p5): last error at time 46: htree_dirblock_to_tree:1007: inode 1999: block 10117
[ 1.257384] mmc0: new high speed MMC card at address 0001
[ 1.264015] mmcblk0: mmc0:0001 P1XXXX 3.60 GiB
[ 1.269703] mmcblk0boot0: mmc0:0001 P1XXXX partition 1 16.0 MiB
[ 1.276776] mmcblk0boot1: mmc0:0001 P1XXXX partition 2 16.0 MiB
[ 1.385343] mmcblk0: p1 p2 p3 p4 < p5 >
[ 1.402715] EXT4-fs (mmcblk0p5): mounting ext3 file system using the ext4 subsystem
[ 1.511161] EXT4-fs (mmcblk0p5): ext4_check_descriptors: Block bitmap for group 0 not in group (block 0)!
[ 1.520713] EXT4-fs (mmcblk0p5): group descriptors corrupted!
[ 1.526557] VFS: Cannot open root device "mmcblk0p5" or unknown-block(179,5): error -117
[ 1.534634] Please append a correct "root=" boot option; here are the available partitions:
[ 87.942916] EXT4-fs error (device mmcblk0p5): ext4_mb_generate_buddy:747: group 1, block bitmap and bg descriptor inconsistent: 81 vs 82 free clusters
[ 92.464179] JBD2: Spotted dirty metadata buffer (dev = mmcblk0p5, blocknr = 1). There's a risk of filesystem corruption in case of system crash.
[ 92.488648] JBD2: Spotted dirty metadata buffer (dev = mmcblk0p5, blocknr = 1). There's a risk of filesystem corruption in case of system crash.
Let me know if you need more information.
Thanks,
Ren