Отладка контроллера MMC Xperia XA2 Ultra - PullRequest
0 голосов
/ 30 сентября 2018

Эй, сейчас я пытаюсь исправить модуль контроллера aosp mmc контроллера XA2 Ultra / Plus, чтобы он обнаруживал мою карту micro SD.Проблема заключается в том, что контроллер находит какой-то IRQ, но прерывает переход, как видно из моего первого журнала.

После применения обходного пути из стандартного ядра контроллер прерывает работу после CMD1.Как видно в журнале рядом с ним.

Дело в том, что на сестринском устройстве (также принадлежащем платформе Sony Nile) контроллер mmc прекрасно читает карту micro SD.

Так что мой вопрос - почему прерывается контроллер mmcвместо того, чтобы читать дальше, и почему эти обходные пути для этих двух конкретных устройств?(SM22 и SM42).

Моя версия обходного пути находится здесь .

dmesg | grep mmc1 перед обходным решением:

    [    1.615003] mmc1: clk: 0 clk-gated: 0 claimer: (null) pwr: 0 host->irq = 16384
[    1.615140] mmc1: rpmstatus[pltfm](runtime-suspend:usage_count:disable_depth)(2:0:1)
[    1.615216] sdhci: ===========================================
[    1.615432] mmc1: SDHCI controller on c084000.sdhci [c084000.sdhci] using 64-bit ADMA in legacy mode
[    1.615721] mmc1: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 18 width 0 timing 0
[    1.615734] mmc1: sdhci_msm_check_power_status: request 2 curr_pwr_state 0 curr_io_level 0
[    1.615772] mmc1: Received IRQ(215), status=0x2
[    1.616130] mmc1: Handled IRQ(215), ret=0, ack=0x1
[    1.616150] mmc1: sdhci_msm_check_power_status: request 2 done
[    1.616159] mmc1: sdhci_msm_check_power_status: request 8 curr_pwr_state 2 curr_io_level 8
[    1.616162] mmc1: sdhci_msm_check_power_status: request 8 done
[    1.621697] sdhci_msm c084000.sdhci: Initial signal voltage of 3.3v
[    1.632049] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 18 width 0 timing 0
[    1.632127] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.643265] mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
[    1.643275] c084000.sdhci: Exit sdhci_msm_probe
[    1.643285] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.643291] mmc1: sdhci_msm_check_power_status: request 1 curr_pwr_state 2 curr_io_level 8
[    1.643562] mmc1: Received IRQ(215), status=0x1
[    1.643667] bimc-bwmon 1008000.qcom,cpu-bwmon: BW HWmon governor registered.
[    1.643690] mmc1: Handled IRQ(215), ret=0, ack=0x1
[    1.643744] mmc1: sdhci_msm_check_power_status: request 1 done
[    1.643750] mmc1: sdhci_msm_check_power_status: request 1 curr_pwr_state 1 curr_io_level 4
[    1.643759] mmc1: sdhci_msm_check_power_status: request 1 done
[    1.643772] mmc1: request to disable clocks

dmesg | grep mmc1 после обходного пути:

[    1.585850] ## mmc1: gpio_is_valid(pdata->uim2_gpio)=-2: failure
[    1.599193] ## mmc1: can't set uim2_gpio: -2
[    1.600391] sdhci [sdhci_add_host()]: mmc1: Auto-CMD23 available
[    1.601067] sdhci: =========== REGISTER DUMP (mmc1)===========
[    1.604778] mmc1: clk: 0 clk-gated: 0 claimer: (null) pwr: 0 host->irq = 16384
[    1.604904] mmc1: rpmstatus[pltfm](runtime-suspend:usage_count:disable_depth)(2:0:1)
[    1.605206] mmc1: SDHCI controller on c084000.sdhci [c084000.sdhci] using 64-bit ADMA in legacy mode
[    1.605475] mmc1: clock 0Hz busmode 1 powermode 1 cs 0 Vdd 18 width 0 timing 0
[    1.605487] mmc1: sdhci_msm_check_power_status: request 2 curr_pwr_state 0 curr_io_level 0
[    1.605527] mmc1: Received IRQ(215), status=0x2
[    1.605875] mmc1: Handled IRQ(215), ret=0, ack=0x1
[    1.605894] mmc1: sdhci_msm_check_power_status: request 2 done
[    1.605903] mmc1: sdhci_msm_check_power_status: request 8 curr_pwr_state 2 curr_io_level 8
[    1.605906] mmc1: sdhci_msm_check_power_status: request 8 done
[    1.622052] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 18 width 0 timing 0
[    1.622135] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.633232] mmc1: mmc_rescan_try_freq: trying to init card at 400000 Hz
[    1.633362] mmc1: starting CMD52 arg 00000c00 flags 00000195
[    1.633733] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.633853] mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[    1.633880] mmc1: starting CMD52 arg 80000c08 flags 00000195
[    1.634247] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.634364] mmc1: req done (CMD52): -110: 00000000 00000000 00000000 00000000
[    1.634392] mmc1: clock 400000Hz busmode 1 powermode 2 cs 1 Vdd 18 width 0 timing 0
[    1.634415] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.636478] mmc1: starting CMD0 arg 00000000 flags 000000c0
[    1.636637] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00000001
[    1.636656] mmc1: req done (CMD0): 0: 00000000 00000000 00000000 00000000
[    1.638702] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 18 width 0 timing 0
[    1.638721] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.640781] mmc1: starting CMD8 arg 000001aa flags 000002f5
[    1.641147] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.641266] mmc1: req done (CMD8): -110: 00000000 00000000 00000000 00000000
[    1.641289] mmc1: starting CMD5 arg 00000000 flags 000002e1
[    1.641651] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.641783] mmc1: req failed (CMD5): -110, retrying...
[    1.642143] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.642272] mmc1: req failed (CMD5): -110, retrying...
[    1.642633] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.642762] mmc1: req failed (CMD5): -110, retrying...
[    1.643122] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.643238] mmc1: req done (CMD5): -110: 00000000 00000000 00000000 00000000
[    1.643261] mmc1: starting CMD55 arg 00000000 flags 000000f5
[    1.643623] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.643739] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[    1.643759] mmc1: starting CMD55 arg 00000000 flags 000000f5
[    1.644120] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.644237] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[    1.644258] mmc1: starting CMD55 arg 00000000 flags 000000f5
[    1.644618] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.644731] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[    1.644751] mmc1: starting CMD55 arg 00000000 flags 000000f5
[    1.645113] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.645230] mmc1: req done (CMD55): -110: 00000000 00000000 00000000 00000000
[    1.645254] mmc1: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 18 width 0 timing 0
[    1.645273] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.645310] mmc1: starting CMD1 arg 00000000 flags 000000e1
[    1.645670] sdhci [sdhci_irq()]: *** mmc1 got interrupt: 0x00018000
[    1.645785] mmc1: req done (CMD1): -110: 00000000 00000000 00000000 00000000
[    1.645809] mmc1: clock 0Hz busmode 1 powermode 0 cs 0 Vdd 0 width 0 timing 0
[    1.645828] mmc1: sdhci_msm_set_uhs_signaling-clock:400000 uhs mode:0 ctrl_2:0x0
[    1.645834] mmc1: sdhci_msm_check_power_status: request 1 curr_pwr_state 2 curr_io_level 8
[    1.645995] mmc1: Received IRQ(215), status=0x1
[    1.646144] mmc1: Handled IRQ(215), ret=0, ack=0x1
[    1.646168] mmc1: sdhci_msm_check_power_status: request 1 done
[    1.646175] mmc1: sdhci_msm_check_power_status: request 1 curr_pwr_state 1 curr_io_level 4
[    1.646182] mmc1: sdhci_msm_check_power_status: request 1 done
[    1.646193] mmc1: request to disable clocks
[    1.849060] mmc1: frequency set to 0 in disable function, this means the clock is already disabled.

РЕДАКТИРОВАТЬ: Оказывается, Sony забыла переопределить вывод gpio контроллера mmc по сравнению с эталонной платой в дереве устройств.

...