@ryder.lee have you found something in log or can you reproduce the problem?
maybe i can put some debug-messages in mtk-sd.c or enable the existing somehow, but currently i don’t know how the probing is working (which functions are called in which order, which function is the entrypoint). ~2000 line are much for my limited c+±knowledge ;(
as far as i know one of the main functions is “static int msdc_drv_probe(…)”, which seems similar except of new function msdc_of_property_parse which does the of_property-calls which are done in 4.4.70 with debug-messages “dev_dbg(…)”
i’ve found some strange definitions in include/linux/mmc/host.h:
4.4.70:
#define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */
#define MMC_CAP_1_8V_DDR (1 << 11) /* can support */
/* DDR mode at 1.8V */
#define MMC_CAP_1_2V_DDR (1 << 12) /* can support */
/* DDR mode at 1.2V */
#define MMC_CAP_POWER_OFF_CARD (1 << 13) /* Can power off after boot */
#define MMC_CAP_BUS_WIDTH_TEST (1 << 14) /* CMD14/CMD19 bus width ok */
#define MMC_CAP_UHS_SDR12 (1 << 15) /* Host supports UHS SDR12 mode */
#define MMC_CAP_UHS_SDR25 (1 << 16) /* Host supports UHS SDR25 mode */
#define MMC_CAP_UHS_SDR50 (1 << 17) /* Host supports UHS SDR50 mode */
#define MMC_CAP_UHS_SDR104 (1 << 18) /* Host supports UHS SDR104 mode */
#define MMC_CAP_UHS_DDR50 (1 << 19) /* Host supports UHS DDR50 mode */
#define MMC_CAP_RUNTIME_RESUME (1 << 20) /* Resume at runtime_resume. */
4.14:
#define MMC_CAP_ERASE (1 << 10) /* Allow erase/trim commands */
#define MMC_CAP_3_3V_DDR (1 << 11) /* Host supports eMMC DDR 3.3V */
#define MMC_CAP_1_8V_DDR (1 << 12) /* Host supports eMMC DDR 1.8V */
#define MMC_CAP_1_2V_DDR (1 << 13) /* Host supports eMMC DDR 1.2V */
#define MMC_CAP_POWER_OFF_CARD (1 << 14) /* Can power off after boot */
#define MMC_CAP_BUS_WIDTH_TEST (1 << 15) /* CMD14/CMD19 bus width ok */
#define MMC_CAP_UHS_SDR12 (1 << 16) /* Host supports UHS SDR12 mode */
#define MMC_CAP_UHS_SDR25 (1 << 17) /* Host supports UHS SDR25 mode */
#define MMC_CAP_UHS_SDR50 (1 << 18) /* Host supports UHS SDR50 mode */
#define MMC_CAP_UHS_SDR104 (1 << 19) /* Host supports UHS SDR104 mode */
#define MMC_CAP_UHS_DDR50 (1 << 20) /* Host supports UHS DDR50 mode */
as you can see MMC_CAP_ERASE is same, after that in 4.14 MMC_CAP_3_3V_DDR is inserted and the other constants are now 1 higher bit…maybe this is the Problem (seems it’s only for kernel-internal option-storing)?
trying to include code from 4.4.70, 1st step (not working so far, but maybe a help)
14.4.sd.diff (12,5 KB)
now merged near all different code to 4.14, but sd-card is still not visible:
[ 1.402661] msdc_drv_probe! << 1st probe
[ 1.461499] msdc_drv_probe! << 2nd probe
[ 1.464332] mtk-msdc 11240000.mmc: Got CD GPIO
[ 1.516294] mmc0: new high speed MMC card at address 0001 <<only mmc0 found
[ 1.523117] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB
[ 1.527916] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB
[ 1.534093] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB
14.4.patch11 (32,2 KB)
it seems that Problem is not in this file…or it is the code added to file, which i have not deleted
4.4_vs_4.14.diff (15,1 KB)
found out how to enable Debug-Messages simply by adding “#define DEBUG” at beginning of mtk-sd.c
here is the result:
[ 1.403619] msdc_drv_probe!
[ 1.407129] mtk-msdc 11230000.mmc: init hardware done!
[ 1.412443] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.417030] mtk-msdc 11230000.mmc: init hardware done!
[ 1.422176] mtk-msdc 11230000.mmc: Regulator set error -22 (3300000 - 3300000)
[ 1.450929] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.455563] mtk-msdc 11230000.mmc: sclk: 400000, timing: 0
[ 1.491471] msdc_drv_probe!
[ 1.494298] mtk-msdc 11240000.mmc: Got CD GPIO
[ 1.499159] mtk-msdc 11240000.mmc: init hardware done!
[ 1.499300] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.499367] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=52 arg=00000C00; rsp 00000B00; cmd_error=-110
[ 1.499376] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=52 arg=00000C00; host->error=0x00000002
[ 1.528006] mtk-msdc 11240000.mmc: Bus Width = 0
[ 1.532617] mtk-msdc 11240000.mmc: init hardware done!
[ 1.538096] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.543766] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=52 arg=80000C08; rsp 00000B00; cmd_error=-110
[ 1.552740] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=52 arg=80000C08; host->error=0x00000002
[ 1.560923] mtk-msdc 11240000.mmc: Bus Width = 0
[ 1.560984] mtk-msdc 11240000.mmc: sclk: 399999, timing: 0
[ 1.571737] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.577779] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 1.584411] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.590302] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.595973] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=8 arg=000001AA; rsp 00000B00; cmd_error=-110
[ 1.604861] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=8 arg=000001AA; host->error=0x00000002
[ 1.614081] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.614814] mtk-msdc 11240000.mmc: Bus Width = 0
[ 1.614833] mtk-msdc 11240000.mmc: set mclk to 0
[ 1.830813] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.836403] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 1.845379] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 1.854747] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.860424] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 1.869397] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 1.878863] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.884335] Freeing unused kernel memory: 6144K
[ 1.889021] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 1.897996] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 1.907460] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 1.913153] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 1.922135] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 1.931135] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.936047] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 1.941724] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.946311] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.952367] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 1.959021] mtk-msdc 11230000.mmc: Bus Width = 0
[ 1.965058] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
Starting logging: OK
Initializing random number generator... [ 1.991295] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 1.997476] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 2.003456] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 2.009103] mtk-msdc 11230000.mmc: Bus Width = 0
done.
[ 2.014287] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
Starting network[ 2.020287] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
...
[ 2.027291] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 2.033029] mtk-msdc 11230000.mmc: DMA start
[ 2.037265] mtk-msdc 11230000.mmc: msdc_start_data: cmd=8 DMA data: 1 blocks; read=1
[ 2.044944] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 2.050556] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 2.055910] mtk-msdc 11230000.mmc: DMA stop
[ 2.060402] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.066359] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.072298] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.078242] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.084191] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.089841] mtk-msdc 11230000.mmc: Bus Width = 0
[ 2.094516] mtk-msdc 11230000.mmc: sclk: 400000, timing: 1
[ 2.100291] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.105989] mtk-msdc 11230000.mmc: Bus Width = 0
[ 2.111262] mtk-msdc 11230000.mmc: sclk: 26000000, timing: 1
[ 2.116936] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.122637] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.128289] mtk-msdc 11230000.mmc: Bus Width = 3
[ 2.132933] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.138561] mtk-msdc 11230000.mmc: DMA start
[ 2.142796] mtk-msdc 11230000.mmc: msdc_start_data: cmd=8 DMA data: 1 blocks; read=1
[ 2.150476] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 2.156089] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 2.161442] mtk-msdc 11230000.mmc: DMA stop
[ 2.165643] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.171297] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.176939] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.182594] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 2.188240] mmc0: new high speed MMC card at address 0001
[ 2.194159] mmcblk0: mmc0:0001 8WPD3R 7.28 GiB
[ 2.198849] mmcblk0boot0: mmc0:0001 8WPD3R partition 1 4.00 MiB
[ 2.204959] mmcblk0boot1: mmc0:0001 8WPD3R partition 2 4.00 MiB
[ 2.211041] mmcblk0rpmb: mmc0:0001 8WPD3R partition 3 512 KiB
[ 2.217309] mtk-msdc 11230000.mmc: msdc_irq: events=00002148
[ 2.222936] mtk-msdc 11230000.mmc: DMA start
[ 2.227172] mtk-msdc 11230000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 2.234939] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 2.240550] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 2.245904] mtk-msdc 11230000.mmc: DMA stop
I don’t understand the event-messages but buswidth seems strange…i think it must be 4,or am i wrong?
also that looks not good:
msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
#./include/uapi/asm-generic/errno.h:93:#define ETIMEDOUT 110 /* Connection timed out */ ???
msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
fullboot log with unmodified kernel (same errors): 14.4.boot-debug.log (41,8 KB)
@garywang have you an idea where the problem can be?
edit now i tried debug-mode with 4.4.70…here is the probing part (also some timeouts, but sd is recognized):
[ 5.437360] msdc_drv_probe!
[ 5.440199] mtk-msdc 11240000.mmc: Got CD GPIO
[ 5.445074] mtk-msdc 11240000.mmc: init hardware done!
[ 5.450341] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.454964] mtk-msdc 11240000.mmc: init hardware done!
[ 5.470720] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.475396] mtk-msdc 11240000.mmc: sclk: 399999, timing: 0
[ 5.501448] mtk-msdc 11240000.mmc: msdc_irq: events=00000200
[ 5.501476] msdc_drv_probe!
[ 5.501849] mtk-msdc 11230000.mmc: init hardware done!
[ 5.501997] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.502010] mtk-msdc 11230000.mmc: init hardware done!
[ 5.502034] mtk-msdc 11230000.mmc: Regulator set error -22: 3300000 - 3300000
[ 5.520735] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.520794] mtk-msdc 11230000.mmc: sclk: 400000, timing: 0
[ 5.541433] hidraw: raw HID events driver (C) Jiri Kosina
[ 5.542044] usbcore: registered new interface driver usbhid
[ 5.542046] usbhid: USB HID core driver
[ 5.556477] mtk-msdc 11240000.mmc: msdc_cmd_done: cmd=52 arg=00000C00; rsp 00000900; cmd_error=-110
[ 5.565471] mtk-msdc 11240000.mmc: msdc_track_cmd_data: cmd=52 arg=00000C00; host->error=0x00000002
[ 5.574932] mtk-msdc 11240000.mmc: msdc_irq: events=00000200
[ 5.580618] mtk-msdc 11240000.mmc: msdc_cmd_done: cmd=52 arg=80000C08; rsp 00000900; cmd_error=-110
[ 5.589608] mtk-msdc 11240000.mmc: msdc_track_cmd_data: cmd=52 arg=80000C08; host->error=0x00000002
[ 5.598621] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.604748] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.611392] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.617281] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.623354] mtk-msdc 11240000.mmc: msdc_irq: events=00000200
[ 5.629037] mtk-msdc 11240000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 000001AA; cmd_error=-110
[ 5.637941] mtk-msdc 11240000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.647294] mtk-msdc 11240000.mmc: msdc_irq: events=00000200
[ 5.652977] mtk-msdc 11240000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 000001AA; cmd_error=-110
[ 5.661881] mtk-msdc 11240000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.671233] mtk-msdc 11240000.mmc: msdc_irq: events=00000200
[ 5.676917] mtk-msdc 11240000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 000001AA; cmd_error=-110
[ 5.685820] mtk-msdc 11240000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.695171] mtk-msdc 11240000.mmc: msdc_irq: events=00000200
[ 5.700849] mtk-msdc 11240000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 000001AA; cmd_error=-110
[ 5.709753] mtk-msdc 11240000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.718971] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.724901] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.730537] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.736604] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.743242] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.749123] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.755058] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.760988] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.781004] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.786931] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.793015] mt8521p-audio mediatek,mt7623_audio: mt8521p_audio_probe()
[ 5.793087] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.793415] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.793948] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.794260] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.794571] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.794888] mtk-msdc 11240000.mmc: msdc_irq: events=00000100
[ 5.794901] mtk-msdc 11240000.mmc: DMA start
[ 5.794906] mtk-msdc 11240000.mmc: msdc_start_data: cmd=51 DMA data: 1 blocks; read=1
[ 5.795305] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 5.795310] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 5.795314] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 5.795629] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.795941] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.795952] mtk-msdc 11240000.mmc: DMA start
[ 5.795957] mtk-msdc 11240000.mmc: msdc_start_data: cmd=13 DMA data: 1 blocks; read=1
[ 5.797375] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 5.797379] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 5.797383] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 5.797698] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.797710] mtk-msdc 11240000.mmc: DMA start
[ 5.797715] mtk-msdc 11240000.mmc: msdc_start_data: cmd=6 DMA data: 1 blocks; read=1
[ 5.799250] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 5.799254] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 5.799258] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 5.799275] mmc0: host does not support reading read-only switch, assuming write-enable
[ 5.799575] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.799587] mtk-msdc 11240000.mmc: DMA start
[ 5.799592] mtk-msdc 11240000.mmc: msdc_start_data: cmd=6 DMA data: 1 blocks; read=1
[ 5.801165] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 5.801169] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 5.801173] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 5.801193] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.801241] mtk-msdc 11240000.mmc: sclk: 399999, timing: 2
[ 5.801245] mtk-msdc 11240000.mmc: Bus Width = 0
[ 5.801614] mtk-msdc 11240000.mmc: sclk: 49999992, timing: 2
[ 5.801630] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.801653] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.801667] mtk-msdc 11240000.mmc: Bus Width = 2
[ 5.801679] mmc0: new high speed SDHC card at address 0007
[ 5.802277] mmcblk0: mmc0:0007 SL32G 29.0 GiB
[ 5.802807] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.802826] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 5.802838] mtk-msdc 11240000.mmc: DMA start
[ 5.802843] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 5.803492] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 5.803497] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 5.803502] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 5.803589] mmcblk0: p1 p2
[ 5.804697] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.804762] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=52 arg=00000C00; rsp 00000B00; cmd_error=-110
[ 5.804769] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=52 arg=00000C00; host->error=0x00000002
[ 5.805222] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.805287] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=52 arg=80000C08; rsp 00000B00; cmd_error=-110
[ 5.805293] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=52 arg=80000C08; host->error=0x00000002
[ 5.805311] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.806778] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.807793] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.809228] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.809292] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=8 arg=000001AA; rsp 00000B00; cmd_error=-110
[ 5.809297] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=8 arg=000001AA; host->error=0x00000002
[ 5.809743] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.809809] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.809815] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.810258] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.810319] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.810325] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.810768] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.810829] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.810835] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.811278] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.811339] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=5 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.811345] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=5 arg=00000000; host->error=0x00000002
[ 5.811791] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.811857] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.811862] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 5.812306] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.812367] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.812372] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 5.812815] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.812877] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.812882] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 5.813325] mtk-msdc 11230000.mmc: msdc_irq: events=00000200
[ 5.813387] mtk-msdc 11230000.mmc: msdc_cmd_done: cmd=55 arg=00000000; rsp 00000B00; cmd_error=-110
[ 5.813392] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=55 arg=00000000; host->error=0x00000002
[ 5.813407] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.813705] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.813726] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.813730] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.815195] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.816211] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.817508] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.840992] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.841521] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.841841] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.841856] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.842383] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.842701] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.843026] mtk-msdc 11230000.mmc: msdc_irq: events=00000100
[ 5.843038] mtk-msdc 11230000.mmc: DMA start
[ 5.843043] mtk-msdc 11230000.mmc: msdc_start_data: cmd=8 DMA data: 1 blocks; read=1
[ 5.853403] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 5.853408] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 5.853413] mtk-msdc 11230000.mmc: DMA stop event:0x3040
[ 5.853435] mmc1: MAN_BKOPS_EN bit is not set
[ 5.853746] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.854064] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.854381] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.854541] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.854556] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.854573] mtk-msdc 11230000.mmc: sclk: 400000, timing: 1
[ 5.854578] mtk-msdc 11230000.mmc: Bus Width = 0
[ 5.855222] mtk-msdc 11230000.mmc: sclk: 26000000, timing: 1
[ 5.855244] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855272] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855286] mtk-msdc 11230000.mmc: Bus Width = 3
[ 5.855308] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855319] mtk-msdc 11230000.mmc: DMA start
[ 5.855324] mtk-msdc 11230000.mmc: msdc_start_data: cmd=8 DMA data: 1 blocks; read=1
[ 5.855344] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 5.855348] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 5.855353] mtk-msdc 11230000.mmc: DMA stop event:0x3040
[ 5.855382] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855407] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855432] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855455] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.855475] mmc1: new high speed MMC card at address 0001
[ 5.856053] mmcblk1: mmc1:0001 8WPD3R 7.28 GiB
[ 5.856353] mmcblk1boot0: mmc1:0001 8WPD3R partition 1 4.00 MiB
[ 5.860771] mmcblk1boot1: mmc1:0001 8WPD3R partition 2 4.00 MiB
[ 5.861071] mmcblk1rpmb: mmc1:0001 8WPD3R partition 3 512 KiB
[ 5.861545] mtk-msdc 11230000.mmc: msdc_irq: events=00002148
[ 5.861559] mtk-msdc 11230000.mmc: DMA start
[ 5.861565] mtk-msdc 11230000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 5.861851] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 5.861856] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 5.861861] mtk-msdc 11230000.mmc: DMA stop event:0x3040
[ 5.862034] mtk-msdc 11230000.mmc: msdc_irq: events=00002048
[ 5.862039] mtk-msdc 11230000.mmc: msdc_irq: events=00002140
[ 5.862051] mtk-msdc 11230000.mmc: DMA start
[ 5.862056] mtk-msdc 11230000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 5.862226] mtk-msdc 11230000.mmc: msdc_irq: events=00003040
[ 5.862230] mtk-msdc 11230000.mmc: DMA status: 0x 6
[ 5.862235] mtk-msdc 11230000.mmc: DMA stop event:0x3040
....
[ 8.935515] md: Waiting for all devices to be available before autodetect
[ 8.942412] md: If you don't use raid, use raid=noautodetect
[ 8.948973] md: Autodetecting RAID arrays.
[ 8.953148] md: Scanned 0 and added 0 devices.
[ 8.957638] md: autorun ...
[ 8.960459] md: ... autorun DONE.
[ 8.964320] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 8.970072] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 8.975802] mtk-msdc 11240000.mmc: DMA start
[ 8.980120] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 2 blocks; read=1
[ 8.988033] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 8.993752] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 8.999207] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 9.008851] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.018628] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.028279] mtk-msdc 11240000.mmc: DMA start
[ 9.036452] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 9.048193] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 9.057719] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 9.066954] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 9.076211] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.085709] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.095130] mtk-msdc 11240000.mmc: DMA start
[ 9.103071] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 9.114580] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 9.123857] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 9.132865] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 9.142272] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.151529] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.160686] mtk-msdc 11240000.mmc: DMA start
[ 9.168355] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 9.179582] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 9.188570] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 9.197220] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 9.205725] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.214496] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.223151] mtk-msdc 11240000.mmc: DMA start
[ 9.230333] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 16 blocks; read=1
[ 9.241192] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 9.249744] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 9.257961] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 9.266053] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.274444] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.282744] mtk-msdc 11240000.mmc: DMA start
[ 9.289586] mtk-msdc 11240000.mmc: msdc_start_data: cmd=18 DMA data: 8 blocks; read=1
[ 9.300073] mtk-msdc 11240000.mmc: msdc_irq: events=00003040
[ 9.308406] mtk-msdc 11240000.mmc: DMA status: 0x 6
[ 9.316478] mtk-msdc 11240000.mmc: DMA stop event:0x3040
[ 9.324424] mtk-msdc 11240000.mmc: msdc_irq: events=00002140
[ 9.325121] EXT4-fs (mmcblk0p2): mounted filesystem without journal. Opts: (null)
[ 9.325168] VFS: Mounted root (ext4 filesystem) readonly on device 179:2.
4.14 is missing event 100 for SD-Card (1124) like that in 4.4.70
11240000.mmc: msdc_irq: events=00000100
while greping for the constants i’ve found out that 4.4.70 has also files in drivers/misc/mediatek/mtk_sdio/… these are missing in 4.14, but it seems is not activated in 4.4.70-kernel (# CONFIG_MMC_MTK_SDIO is not set)
currently i don’t know how msdc_irq works and where the events are set…because MSDC_INTEN seems to be an offset for the events, they may be set by that lines:
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:550: flags = readl(host->base + MSDC_INTEN);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:551: sdr_clr_bits(host->base + MSDC_INTEN, flags);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:601: sdr_set_bits(host->base + MSDC_INTEN, flags);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:717: sdr_set_bits(host->base + MSDC_INTEN, data_ints_mask);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:806: sdr_clr_bits(host->base + MSDC_INTEN, cmd_ints_mask);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:902: sdr_set_bits(host->base + MSDC_INTEN, cmd_ints_mask);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:1010: sdr_clr_bits(host->base + MSDC_INTEN, data_ints_mask);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:1135: event_mask = readl(host->base + MSDC_INTEN);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:1180: writel(0, host->base + MSDC_INTEN);
kernel_4.14/linux/drivers/mmc/host/mtk-sd.c:1212: writel(0, host->base + MSDC_INTEN);
i try to include “drivers/mmc/card” from 4.4.70