Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Pintu Kumar
On Wed, Nov 22, 2017 at 9:45 PM, Jon Hunter  wrote:
>
> On 22/11/17 12:26, Pintu Kumar wrote:
>> Hello Jon,
>> Yes I raised my query there almost 1 week back here.
>> https://devtalk.nvidia.com/default/topic/1026527/jetson-tx2/-jetson-tx2-mmc-resume-errors-after-booting-from-suspend/
>>
>> But no response.
>> So, I thought to discuss it here.
>> May be some pointers may help to find the root cause.
>> One point is that, I am able to resume the board with the sd-card, but
>> resume from emmc is returning -110 (may be CMD5 timeout).
>> Whether there is any difference between sd-card resume and emmc resume ?
>> Do we need to check the card initialization sequence for emmc ?
> OK great. There should be a team looking at these so please bare with

Ok thanks. Can you put your comments there, so that somebody can start
responding.
It will be really helpful.
I have already sent the reminder, but still no response.
I know it will be difficult to debug like this, but at least some
pointers or support will definitely help.
Basically I wanted to know, if there is any problem from SoC side
itself, or it is specific to emmc driver issue.
Because, with the kernel 4.4 (and our internal patches), other SoC
(such as hikey), it is working fine.

> them. I noticed that you did not state which release you are using for
> TX2 and there are two available (r27 and r28.1 [0]), unless I missed it.
> So it is worth stating the release you are using.
>

I am using tegra-l4t-r27.1 release, and on top of that we have our
internal patches for snapshot image.
However, I also compared with r28 repo under drivers/mmc/*
There were not major difference. Still I tried to manually apply few
of the changes to r27, but it still it did not help much.
That is the reason I thought to discuss, so that somebody can point
me, if I am missing any right fixes.
Because from r27 to r28, with our internal patches is again a painful task.
So first I wanted to make sure if some patches backing from r28 works,
then I can recommend to upgrade to r28.

> What command are you using to suspend to disk?

Its actually our internal command, something like:
# echo snap > /sys/power/state
This internally create our snapshot image and save it on disk.
Then we boot the system normally with this image.
Note: currently to debug the emmc issue, we are right now booting with sd-card.


>

> Cheers
> Jon
>
> [0] https://developer.nvidia.com/embedded/linux-tegra-archive
> --
> nvpublic


Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Pintu Kumar
On Wed, Nov 22, 2017 at 9:45 PM, Jon Hunter  wrote:
>
> On 22/11/17 12:26, Pintu Kumar wrote:
>> Hello Jon,
>> Yes I raised my query there almost 1 week back here.
>> https://devtalk.nvidia.com/default/topic/1026527/jetson-tx2/-jetson-tx2-mmc-resume-errors-after-booting-from-suspend/
>>
>> But no response.
>> So, I thought to discuss it here.
>> May be some pointers may help to find the root cause.
>> One point is that, I am able to resume the board with the sd-card, but
>> resume from emmc is returning -110 (may be CMD5 timeout).
>> Whether there is any difference between sd-card resume and emmc resume ?
>> Do we need to check the card initialization sequence for emmc ?
> OK great. There should be a team looking at these so please bare with

Ok thanks. Can you put your comments there, so that somebody can start
responding.
It will be really helpful.
I have already sent the reminder, but still no response.
I know it will be difficult to debug like this, but at least some
pointers or support will definitely help.
Basically I wanted to know, if there is any problem from SoC side
itself, or it is specific to emmc driver issue.
Because, with the kernel 4.4 (and our internal patches), other SoC
(such as hikey), it is working fine.

> them. I noticed that you did not state which release you are using for
> TX2 and there are two available (r27 and r28.1 [0]), unless I missed it.
> So it is worth stating the release you are using.
>

I am using tegra-l4t-r27.1 release, and on top of that we have our
internal patches for snapshot image.
However, I also compared with r28 repo under drivers/mmc/*
There were not major difference. Still I tried to manually apply few
of the changes to r27, but it still it did not help much.
That is the reason I thought to discuss, so that somebody can point
me, if I am missing any right fixes.
Because from r27 to r28, with our internal patches is again a painful task.
So first I wanted to make sure if some patches backing from r28 works,
then I can recommend to upgrade to r28.

> What command are you using to suspend to disk?

Its actually our internal command, something like:
# echo snap > /sys/power/state
This internally create our snapshot image and save it on disk.
Then we boot the system normally with this image.
Note: currently to debug the emmc issue, we are right now booting with sd-card.


>

> Cheers
> Jon
>
> [0] https://developer.nvidia.com/embedded/linux-tegra-archive
> --
> nvpublic


Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Jon Hunter

On 22/11/17 12:26, Pintu Kumar wrote:
> Hello Jon,
> Yes I raised my query there almost 1 week back here.
> https://devtalk.nvidia.com/default/topic/1026527/jetson-tx2/-jetson-tx2-mmc-resume-errors-after-booting-from-suspend/
> 
> But no response.
> So, I thought to discuss it here.
> May be some pointers may help to find the root cause.
> One point is that, I am able to resume the board with the sd-card, but
> resume from emmc is returning -110 (may be CMD5 timeout).
> Whether there is any difference between sd-card resume and emmc resume ?
> Do we need to check the card initialization sequence for emmc ?
OK great. There should be a team looking at these so please bare with
them. I noticed that you did not state which release you are using for
TX2 and there are two available (r27 and r28.1 [0]), unless I missed it.
So it is worth stating the release you are using.

What command are you using to suspend to disk?

Cheers
Jon

[0] https://developer.nvidia.com/embedded/linux-tegra-archive
-- 
nvpublic


Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Jon Hunter

On 22/11/17 12:26, Pintu Kumar wrote:
> Hello Jon,
> Yes I raised my query there almost 1 week back here.
> https://devtalk.nvidia.com/default/topic/1026527/jetson-tx2/-jetson-tx2-mmc-resume-errors-after-booting-from-suspend/
> 
> But no response.
> So, I thought to discuss it here.
> May be some pointers may help to find the root cause.
> One point is that, I am able to resume the board with the sd-card, but
> resume from emmc is returning -110 (may be CMD5 timeout).
> Whether there is any difference between sd-card resume and emmc resume ?
> Do we need to check the card initialization sequence for emmc ?
OK great. There should be a team looking at these so please bare with
them. I noticed that you did not state which release you are using for
TX2 and there are two available (r27 and r28.1 [0]), unless I missed it.
So it is worth stating the release you are using.

What command are you using to suspend to disk?

Cheers
Jon

[0] https://developer.nvidia.com/embedded/linux-tegra-archive
-- 
nvpublic


Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Pintu Kumar
On Wed, Nov 22, 2017 at 4:10 PM, Jon Hunter  wrote:
> Hi Pintu,
>
> I think that the appropriate place to ask about this issue is on the TX2
> forum [0]. Someone should be able to help you there.
>

Hello Jon,
Yes I raised my query there almost 1 week back here.
https://devtalk.nvidia.com/default/topic/1026527/jetson-tx2/-jetson-tx2-mmc-resume-errors-after-booting-from-suspend/

But no response.
So, I thought to discuss it here.
May be some pointers may help to find the root cause.
One point is that, I am able to resume the board with the sd-card, but
resume from emmc is returning -110 (may be CMD5 timeout).
Whether there is any difference between sd-card resume and emmc resume ?
Do we need to check the card initialization sequence for emmc ?


> Cheers
> Jon
>
> [0] https://devtalk.nvidia.com/default/board/188/jetson-tx2/
>
> On 22/11/17 09:11, Mikko Perttunen wrote:
>> The upstream kernel currently has no core rail suspend support (LP0/SC7)
>> on Tegras - in general the downstream kernel (used e.g. in L4T) is the
>> reference that has the most functionality on Tegra.
>>
>> IIRC the MMC subsystem and Tegra MMC driver between upstream and
>> downstream are currently quite diverged so the upstream folks are
>> unlikely to be able to help with issues with the downstream code.
>>
>> Mikko
>>
>> On 22.11.2017 08:41, Pintu Kumar wrote:
>>> Hi,
>>>
>>> I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
>>> board (nvidia tegra186).
>>> Suspend is working fine, but during boot with snapshot image, emmc
>>> resume is failing.
>>> Kernel version: 4.4
>>> Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
>>> repo: tegra-l4t-r27.1
>>>
>>>
>>> It returns with:
>>> mmc0: error -110 during resume (card was removed?)
>>>
>>> Please see the complete logs below.
>>>
>>> I tried to add some prints in mmc driver to check the cause.
>>> It seems that mmc is not responding during resume.
>>> [  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
>>> When I check more, I found that CMD5 (Sleep/Awake) is failing to
>>> response.
>>> It is not able to wakeup the mmc from sleep.
>>>
>>> What could be cause of this problem?
>>> Any pointers or suggestions about this issue will be really helpful
>>>
>>> When I see the linux kernel mainline kernel-4.14 (latest), I could see
>>> that there are some patches in drivers/mmc/core/* which are missing in
>>> jetson tx2 kernel version-4.4.
>>> Do you think any of the latest patches may help to solve this issue?
>>> If yes, can you point to some of relevant once?
>>>
>>>
>>> Please help.
>>>
>>>
>>> Thanks,
>>> Pintu
>>>
>>> LOGS:
>>> ---
>>> ## Booting ...
>>> [ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
>>> restoring the best tap value : 112
>>> [ 117.081179] xhci-tegra 353.xhci: exiting ELPG
>>> [ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
>>> 11:32:41 UTC, Version: 55.05 release
>>> [ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
>>> [ 117.085204] xhci-tegra 353.xhci: entering ELPG
>>> [ 117.087770] xhci-tegra 353.xhci: entering ELPG done
>>> [ 117.087775] Wake76 for irq=199
>>> [ 117.08] Wake77 for irq=199
>>> [ 117.087778] Wake78 for irq=199
>>> [ 117.087779] Wake79 for irq=199
>>> [ 117.087780] Wake80 for irq=199
>>> [ 117.087781] Wake81 for irq=199
>>> [ 117.087782] Wake82 for irq=199
>>> [ 117.087784] Enabling wake76
>>> [ 117.087785] Enabling wake77
>>> [ 117.087786] Enabling wake78
>>> [ 117.087787] Enabling wake79
>>> [ 117.087788] Enabling wake80
>>> [ 117.087789] Enabling wake81
>>> [ 117.087790] Enabling wake82
>>> [ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
>>> [ 117.090012] Wake24 for irq=241
>>> [ 117.090015] Enabling wake24
>>> [ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
>>> [ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
>>> [ 117.090655] Enabling wake29
>>> [ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
>>> [ 117.090775] Enabling wake53
>>> [ 117.111219] tegradc 1521.nvdisplay: suspend
>>> [ 117.111422] Wake73 for irq=42
>>> [ 117.111424] Enabling wake73
>>> [ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
>>> [ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
>>> [ 117.113535] Enabling wake71
>>> [ 117.113632] PM: suspend of devices complete after 34.680 msecs
>>> [ 117.114829] host1x 13e1.host1x: suspended
>>> [ 117.114898] PM: late suspend of devices complete after 1.262 msecs
>>> [ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
>>> [ 117.133971] Disabling non-boot CPUs ...
>>> [ 117.134249] CPU3: shutdown
>>> [ 117.148582] psci: Retrying again to check for CPU kill
>>> [ 117.148586] psci: CPU3 killed.
>>> [ 117.149097] CPU4: shutdown
>>> [ 117.164584] psci: Retrying again to check for CPU kill
>>> [ 117.164589] psci: CPU4 killed.
>>> [ 117.165041] CPU5: shutdown

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Pintu Kumar
On Wed, Nov 22, 2017 at 4:10 PM, Jon Hunter  wrote:
> Hi Pintu,
>
> I think that the appropriate place to ask about this issue is on the TX2
> forum [0]. Someone should be able to help you there.
>

Hello Jon,
Yes I raised my query there almost 1 week back here.
https://devtalk.nvidia.com/default/topic/1026527/jetson-tx2/-jetson-tx2-mmc-resume-errors-after-booting-from-suspend/

But no response.
So, I thought to discuss it here.
May be some pointers may help to find the root cause.
One point is that, I am able to resume the board with the sd-card, but
resume from emmc is returning -110 (may be CMD5 timeout).
Whether there is any difference between sd-card resume and emmc resume ?
Do we need to check the card initialization sequence for emmc ?


> Cheers
> Jon
>
> [0] https://devtalk.nvidia.com/default/board/188/jetson-tx2/
>
> On 22/11/17 09:11, Mikko Perttunen wrote:
>> The upstream kernel currently has no core rail suspend support (LP0/SC7)
>> on Tegras - in general the downstream kernel (used e.g. in L4T) is the
>> reference that has the most functionality on Tegra.
>>
>> IIRC the MMC subsystem and Tegra MMC driver between upstream and
>> downstream are currently quite diverged so the upstream folks are
>> unlikely to be able to help with issues with the downstream code.
>>
>> Mikko
>>
>> On 22.11.2017 08:41, Pintu Kumar wrote:
>>> Hi,
>>>
>>> I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
>>> board (nvidia tegra186).
>>> Suspend is working fine, but during boot with snapshot image, emmc
>>> resume is failing.
>>> Kernel version: 4.4
>>> Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
>>> repo: tegra-l4t-r27.1
>>>
>>>
>>> It returns with:
>>> mmc0: error -110 during resume (card was removed?)
>>>
>>> Please see the complete logs below.
>>>
>>> I tried to add some prints in mmc driver to check the cause.
>>> It seems that mmc is not responding during resume.
>>> [  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
>>> When I check more, I found that CMD5 (Sleep/Awake) is failing to
>>> response.
>>> It is not able to wakeup the mmc from sleep.
>>>
>>> What could be cause of this problem?
>>> Any pointers or suggestions about this issue will be really helpful
>>>
>>> When I see the linux kernel mainline kernel-4.14 (latest), I could see
>>> that there are some patches in drivers/mmc/core/* which are missing in
>>> jetson tx2 kernel version-4.4.
>>> Do you think any of the latest patches may help to solve this issue?
>>> If yes, can you point to some of relevant once?
>>>
>>>
>>> Please help.
>>>
>>>
>>> Thanks,
>>> Pintu
>>>
>>> LOGS:
>>> ---
>>> ## Booting ...
>>> [ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
>>> restoring the best tap value : 112
>>> [ 117.081179] xhci-tegra 353.xhci: exiting ELPG
>>> [ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
>>> 11:32:41 UTC, Version: 55.05 release
>>> [ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
>>> [ 117.085204] xhci-tegra 353.xhci: entering ELPG
>>> [ 117.087770] xhci-tegra 353.xhci: entering ELPG done
>>> [ 117.087775] Wake76 for irq=199
>>> [ 117.08] Wake77 for irq=199
>>> [ 117.087778] Wake78 for irq=199
>>> [ 117.087779] Wake79 for irq=199
>>> [ 117.087780] Wake80 for irq=199
>>> [ 117.087781] Wake81 for irq=199
>>> [ 117.087782] Wake82 for irq=199
>>> [ 117.087784] Enabling wake76
>>> [ 117.087785] Enabling wake77
>>> [ 117.087786] Enabling wake78
>>> [ 117.087787] Enabling wake79
>>> [ 117.087788] Enabling wake80
>>> [ 117.087789] Enabling wake81
>>> [ 117.087790] Enabling wake82
>>> [ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
>>> [ 117.090012] Wake24 for irq=241
>>> [ 117.090015] Enabling wake24
>>> [ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
>>> [ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
>>> [ 117.090655] Enabling wake29
>>> [ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
>>> [ 117.090775] Enabling wake53
>>> [ 117.111219] tegradc 1521.nvdisplay: suspend
>>> [ 117.111422] Wake73 for irq=42
>>> [ 117.111424] Enabling wake73
>>> [ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
>>> [ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
>>> [ 117.113535] Enabling wake71
>>> [ 117.113632] PM: suspend of devices complete after 34.680 msecs
>>> [ 117.114829] host1x 13e1.host1x: suspended
>>> [ 117.114898] PM: late suspend of devices complete after 1.262 msecs
>>> [ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
>>> [ 117.133971] Disabling non-boot CPUs ...
>>> [ 117.134249] CPU3: shutdown
>>> [ 117.148582] psci: Retrying again to check for CPU kill
>>> [ 117.148586] psci: CPU3 killed.
>>> [ 117.149097] CPU4: shutdown
>>> [ 117.164584] psci: Retrying again to check for CPU kill
>>> [ 117.164589] psci: CPU4 killed.
>>> [ 117.165041] CPU5: shutdown
>>> [ 117.180572] psci: 

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Jon Hunter
Hi Pintu,

I think that the appropriate place to ask about this issue is on the TX2
forum [0]. Someone should be able to help you there.

Cheers
Jon

[0] https://devtalk.nvidia.com/default/board/188/jetson-tx2/

On 22/11/17 09:11, Mikko Perttunen wrote:
> The upstream kernel currently has no core rail suspend support (LP0/SC7)
> on Tegras - in general the downstream kernel (used e.g. in L4T) is the
> reference that has the most functionality on Tegra.
> 
> IIRC the MMC subsystem and Tegra MMC driver between upstream and
> downstream are currently quite diverged so the upstream folks are
> unlikely to be able to help with issues with the downstream code.
> 
> Mikko
> 
> On 22.11.2017 08:41, Pintu Kumar wrote:
>> Hi,
>>
>> I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
>> board (nvidia tegra186).
>> Suspend is working fine, but during boot with snapshot image, emmc
>> resume is failing.
>> Kernel version: 4.4
>> Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
>> repo: tegra-l4t-r27.1
>>
>>
>> It returns with:
>> mmc0: error -110 during resume (card was removed?)
>>
>> Please see the complete logs below.
>>
>> I tried to add some prints in mmc driver to check the cause.
>> It seems that mmc is not responding during resume.
>> [  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
>> When I check more, I found that CMD5 (Sleep/Awake) is failing to
>> response.
>> It is not able to wakeup the mmc from sleep.
>>
>> What could be cause of this problem?
>> Any pointers or suggestions about this issue will be really helpful
>>
>> When I see the linux kernel mainline kernel-4.14 (latest), I could see
>> that there are some patches in drivers/mmc/core/* which are missing in
>> jetson tx2 kernel version-4.4.
>> Do you think any of the latest patches may help to solve this issue?
>> If yes, can you point to some of relevant once?
>>
>>
>> Please help.
>>
>>
>> Thanks,
>> Pintu
>>
>> LOGS:
>> ---
>> ## Booting ...
>> [ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
>> restoring the best tap value : 112
>> [ 117.081179] xhci-tegra 353.xhci: exiting ELPG
>> [ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
>> 11:32:41 UTC, Version: 55.05 release
>> [ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
>> [ 117.085204] xhci-tegra 353.xhci: entering ELPG
>> [ 117.087770] xhci-tegra 353.xhci: entering ELPG done
>> [ 117.087775] Wake76 for irq=199
>> [ 117.08] Wake77 for irq=199
>> [ 117.087778] Wake78 for irq=199
>> [ 117.087779] Wake79 for irq=199
>> [ 117.087780] Wake80 for irq=199
>> [ 117.087781] Wake81 for irq=199
>> [ 117.087782] Wake82 for irq=199
>> [ 117.087784] Enabling wake76
>> [ 117.087785] Enabling wake77
>> [ 117.087786] Enabling wake78
>> [ 117.087787] Enabling wake79
>> [ 117.087788] Enabling wake80
>> [ 117.087789] Enabling wake81
>> [ 117.087790] Enabling wake82
>> [ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
>> [ 117.090012] Wake24 for irq=241
>> [ 117.090015] Enabling wake24
>> [ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
>> [ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
>> [ 117.090655] Enabling wake29
>> [ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
>> [ 117.090775] Enabling wake53
>> [ 117.111219] tegradc 1521.nvdisplay: suspend
>> [ 117.111422] Wake73 for irq=42
>> [ 117.111424] Enabling wake73
>> [ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
>> [ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
>> [ 117.113535] Enabling wake71
>> [ 117.113632] PM: suspend of devices complete after 34.680 msecs
>> [ 117.114829] host1x 13e1.host1x: suspended
>> [ 117.114898] PM: late suspend of devices complete after 1.262 msecs
>> [ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
>> [ 117.133971] Disabling non-boot CPUs ...
>> [ 117.134249] CPU3: shutdown
>> [ 117.148582] psci: Retrying again to check for CPU kill
>> [ 117.148586] psci: CPU3 killed.
>> [ 117.149097] CPU4: shutdown
>> [ 117.164584] psci: Retrying again to check for CPU kill
>> [ 117.164589] psci: CPU4 killed.
>> [ 117.165041] CPU5: shutdown
>> [ 117.180572] psci: Retrying again to check for CPU kill
>> [ 117.180576] psci: CPU5 killed.
>> [ 117.180834] Entered SC7
>> [ 117.180834] Wake[31-0] level=0x4000
>> [ 117.180834] Wake[63-32] level=0x0
>> [ 117.180834] Wake[95-64] level=0x7f2a0
>> [ 117.180834] Wake[31-0] enable=0x2100
>> [ 117.180834] Wake[63-32] enable=0x20
>> [ 117.180834] Wake[95-64] enable=0x7f280
>> [ 117.180834] Wake[31-0] route=0x2100
>> [ 117.180834] Wake[63-32] route=0x20
>> [ 117.180834] Wake[95-64] route=0x7f280
>> 
>> [ 117.180834] Wake[32:0] status=0x0
>> [ 117.180834] Wake[64:32] status=0x0
>> [ 117.180834] Wake[96:64] status=0x0
>> [ 117.180834] Exited SC7
>> [ 117.180834] bpmp: waiting for handshake
>> [ 117.180834] bpmp: 

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Jon Hunter
Hi Pintu,

I think that the appropriate place to ask about this issue is on the TX2
forum [0]. Someone should be able to help you there.

Cheers
Jon

[0] https://devtalk.nvidia.com/default/board/188/jetson-tx2/

On 22/11/17 09:11, Mikko Perttunen wrote:
> The upstream kernel currently has no core rail suspend support (LP0/SC7)
> on Tegras - in general the downstream kernel (used e.g. in L4T) is the
> reference that has the most functionality on Tegra.
> 
> IIRC the MMC subsystem and Tegra MMC driver between upstream and
> downstream are currently quite diverged so the upstream folks are
> unlikely to be able to help with issues with the downstream code.
> 
> Mikko
> 
> On 22.11.2017 08:41, Pintu Kumar wrote:
>> Hi,
>>
>> I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
>> board (nvidia tegra186).
>> Suspend is working fine, but during boot with snapshot image, emmc
>> resume is failing.
>> Kernel version: 4.4
>> Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
>> repo: tegra-l4t-r27.1
>>
>>
>> It returns with:
>> mmc0: error -110 during resume (card was removed?)
>>
>> Please see the complete logs below.
>>
>> I tried to add some prints in mmc driver to check the cause.
>> It seems that mmc is not responding during resume.
>> [  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
>> When I check more, I found that CMD5 (Sleep/Awake) is failing to
>> response.
>> It is not able to wakeup the mmc from sleep.
>>
>> What could be cause of this problem?
>> Any pointers or suggestions about this issue will be really helpful
>>
>> When I see the linux kernel mainline kernel-4.14 (latest), I could see
>> that there are some patches in drivers/mmc/core/* which are missing in
>> jetson tx2 kernel version-4.4.
>> Do you think any of the latest patches may help to solve this issue?
>> If yes, can you point to some of relevant once?
>>
>>
>> Please help.
>>
>>
>> Thanks,
>> Pintu
>>
>> LOGS:
>> ---
>> ## Booting ...
>> [ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
>> restoring the best tap value : 112
>> [ 117.081179] xhci-tegra 353.xhci: exiting ELPG
>> [ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
>> 11:32:41 UTC, Version: 55.05 release
>> [ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
>> [ 117.085204] xhci-tegra 353.xhci: entering ELPG
>> [ 117.087770] xhci-tegra 353.xhci: entering ELPG done
>> [ 117.087775] Wake76 for irq=199
>> [ 117.08] Wake77 for irq=199
>> [ 117.087778] Wake78 for irq=199
>> [ 117.087779] Wake79 for irq=199
>> [ 117.087780] Wake80 for irq=199
>> [ 117.087781] Wake81 for irq=199
>> [ 117.087782] Wake82 for irq=199
>> [ 117.087784] Enabling wake76
>> [ 117.087785] Enabling wake77
>> [ 117.087786] Enabling wake78
>> [ 117.087787] Enabling wake79
>> [ 117.087788] Enabling wake80
>> [ 117.087789] Enabling wake81
>> [ 117.087790] Enabling wake82
>> [ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
>> [ 117.090012] Wake24 for irq=241
>> [ 117.090015] Enabling wake24
>> [ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
>> [ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
>> [ 117.090655] Enabling wake29
>> [ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
>> [ 117.090775] Enabling wake53
>> [ 117.111219] tegradc 1521.nvdisplay: suspend
>> [ 117.111422] Wake73 for irq=42
>> [ 117.111424] Enabling wake73
>> [ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
>> [ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
>> [ 117.113535] Enabling wake71
>> [ 117.113632] PM: suspend of devices complete after 34.680 msecs
>> [ 117.114829] host1x 13e1.host1x: suspended
>> [ 117.114898] PM: late suspend of devices complete after 1.262 msecs
>> [ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
>> [ 117.133971] Disabling non-boot CPUs ...
>> [ 117.134249] CPU3: shutdown
>> [ 117.148582] psci: Retrying again to check for CPU kill
>> [ 117.148586] psci: CPU3 killed.
>> [ 117.149097] CPU4: shutdown
>> [ 117.164584] psci: Retrying again to check for CPU kill
>> [ 117.164589] psci: CPU4 killed.
>> [ 117.165041] CPU5: shutdown
>> [ 117.180572] psci: Retrying again to check for CPU kill
>> [ 117.180576] psci: CPU5 killed.
>> [ 117.180834] Entered SC7
>> [ 117.180834] Wake[31-0] level=0x4000
>> [ 117.180834] Wake[63-32] level=0x0
>> [ 117.180834] Wake[95-64] level=0x7f2a0
>> [ 117.180834] Wake[31-0] enable=0x2100
>> [ 117.180834] Wake[63-32] enable=0x20
>> [ 117.180834] Wake[95-64] enable=0x7f280
>> [ 117.180834] Wake[31-0] route=0x2100
>> [ 117.180834] Wake[63-32] route=0x20
>> [ 117.180834] Wake[95-64] route=0x7f280
>> 
>> [ 117.180834] Wake[32:0] status=0x0
>> [ 117.180834] Wake[64:32] status=0x0
>> [ 117.180834] Wake[96:64] status=0x0
>> [ 117.180834] Exited SC7
>> [ 117.180834] bpmp: waiting for handshake
>> [ 117.180834] bpmp: 

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Mikko Perttunen
The upstream kernel currently has no core rail suspend support (LP0/SC7) 
on Tegras - in general the downstream kernel (used e.g. in L4T) is the 
reference that has the most functionality on Tegra.


IIRC the MMC subsystem and Tegra MMC driver between upstream and 
downstream are currently quite diverged so the upstream folks are 
unlikely to be able to help with issues with the downstream code.


Mikko

On 22.11.2017 08:41, Pintu Kumar wrote:

Hi,

I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
board (nvidia tegra186).
Suspend is working fine, but during boot with snapshot image, emmc
resume is failing.
Kernel version: 4.4
Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
repo: tegra-l4t-r27.1


It returns with:
mmc0: error -110 during resume (card was removed?)

Please see the complete logs below.

I tried to add some prints in mmc driver to check the cause.
It seems that mmc is not responding during resume.
[  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
When I check more, I found that CMD5 (Sleep/Awake) is failing to response.
It is not able to wakeup the mmc from sleep.

What could be cause of this problem?
Any pointers or suggestions about this issue will be really helpful

When I see the linux kernel mainline kernel-4.14 (latest), I could see
that there are some patches in drivers/mmc/core/* which are missing in
jetson tx2 kernel version-4.4.
Do you think any of the latest patches may help to solve this issue?
If yes, can you point to some of relevant once?


Please help.


Thanks,
Pintu

LOGS:
---
## Booting ...
[ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
restoring the best tap value : 112
[ 117.081179] xhci-tegra 353.xhci: exiting ELPG
[ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
[ 117.085204] xhci-tegra 353.xhci: entering ELPG
[ 117.087770] xhci-tegra 353.xhci: entering ELPG done
[ 117.087775] Wake76 for irq=199
[ 117.08] Wake77 for irq=199
[ 117.087778] Wake78 for irq=199
[ 117.087779] Wake79 for irq=199
[ 117.087780] Wake80 for irq=199
[ 117.087781] Wake81 for irq=199
[ 117.087782] Wake82 for irq=199
[ 117.087784] Enabling wake76
[ 117.087785] Enabling wake77
[ 117.087786] Enabling wake78
[ 117.087787] Enabling wake79
[ 117.087788] Enabling wake80
[ 117.087789] Enabling wake81
[ 117.087790] Enabling wake82
[ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
[ 117.090012] Wake24 for irq=241
[ 117.090015] Enabling wake24
[ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
[ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
[ 117.090655] Enabling wake29
[ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
[ 117.090775] Enabling wake53
[ 117.111219] tegradc 1521.nvdisplay: suspend
[ 117.111422] Wake73 for irq=42
[ 117.111424] Enabling wake73
[ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
[ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
[ 117.113535] Enabling wake71
[ 117.113632] PM: suspend of devices complete after 34.680 msecs
[ 117.114829] host1x 13e1.host1x: suspended
[ 117.114898] PM: late suspend of devices complete after 1.262 msecs
[ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
[ 117.133971] Disabling non-boot CPUs ...
[ 117.134249] CPU3: shutdown
[ 117.148582] psci: Retrying again to check for CPU kill
[ 117.148586] psci: CPU3 killed.
[ 117.149097] CPU4: shutdown
[ 117.164584] psci: Retrying again to check for CPU kill
[ 117.164589] psci: CPU4 killed.
[ 117.165041] CPU5: shutdown
[ 117.180572] psci: Retrying again to check for CPU kill
[ 117.180576] psci: CPU5 killed.
[ 117.180834] Entered SC7
[ 117.180834] Wake[31-0] level=0x4000
[ 117.180834] Wake[63-32] level=0x0
[ 117.180834] Wake[95-64] level=0x7f2a0
[ 117.180834] Wake[31-0] enable=0x2100
[ 117.180834] Wake[63-32] enable=0x20
[ 117.180834] Wake[95-64] enable=0x7f280
[ 117.180834] Wake[31-0] route=0x2100
[ 117.180834] Wake[63-32] route=0x20
[ 117.180834] Wake[95-64] route=0x7f280

[ 117.180834] Wake[32:0] status=0x0
[ 117.180834] Wake[64:32] status=0x0
[ 117.180834] Wake[96:64] status=0x0
[ 117.180834] Exited SC7
[ 117.180834] bpmp: waiting for handshake
[ 117.180834] bpmp: synchronizing channels
[ 117.180834] bpmp: channels synchronized
[ 117.180869] Enabling non-boot CPUs ...
[ 117.181067] CPU3: Booted secondary processor [411fd073]
[ 117.181198] CPU3 is up
[ 117.181353] CPU4: Booted secondary processor [411fd073]
[ 117.181455] CPU4 is up
[ 117.181609] CPU5: Booted secondary processor [411fd073]
[ 117.181721] CPU5 is up
[ 117.182740] xhci-tegra 353.xhci: exiting ELPG
[ 117.183221] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.381630] xhci-tegra 353.xhci: XHCI Controller not ready.
Falcon 

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-22 Thread Mikko Perttunen
The upstream kernel currently has no core rail suspend support (LP0/SC7) 
on Tegras - in general the downstream kernel (used e.g. in L4T) is the 
reference that has the most functionality on Tegra.


IIRC the MMC subsystem and Tegra MMC driver between upstream and 
downstream are currently quite diverged so the upstream folks are 
unlikely to be able to help with issues with the downstream code.


Mikko

On 22.11.2017 08:41, Pintu Kumar wrote:

Hi,

I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
board (nvidia tegra186).
Suspend is working fine, but during boot with snapshot image, emmc
resume is failing.
Kernel version: 4.4
Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
repo: tegra-l4t-r27.1


It returns with:
mmc0: error -110 during resume (card was removed?)

Please see the complete logs below.

I tried to add some prints in mmc driver to check the cause.
It seems that mmc is not responding during resume.
[  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
When I check more, I found that CMD5 (Sleep/Awake) is failing to response.
It is not able to wakeup the mmc from sleep.

What could be cause of this problem?
Any pointers or suggestions about this issue will be really helpful

When I see the linux kernel mainline kernel-4.14 (latest), I could see
that there are some patches in drivers/mmc/core/* which are missing in
jetson tx2 kernel version-4.4.
Do you think any of the latest patches may help to solve this issue?
If yes, can you point to some of relevant once?


Please help.


Thanks,
Pintu

LOGS:
---
## Booting ...
[ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
restoring the best tap value : 112
[ 117.081179] xhci-tegra 353.xhci: exiting ELPG
[ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
[ 117.085204] xhci-tegra 353.xhci: entering ELPG
[ 117.087770] xhci-tegra 353.xhci: entering ELPG done
[ 117.087775] Wake76 for irq=199
[ 117.08] Wake77 for irq=199
[ 117.087778] Wake78 for irq=199
[ 117.087779] Wake79 for irq=199
[ 117.087780] Wake80 for irq=199
[ 117.087781] Wake81 for irq=199
[ 117.087782] Wake82 for irq=199
[ 117.087784] Enabling wake76
[ 117.087785] Enabling wake77
[ 117.087786] Enabling wake78
[ 117.087787] Enabling wake79
[ 117.087788] Enabling wake80
[ 117.087789] Enabling wake81
[ 117.087790] Enabling wake82
[ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
[ 117.090012] Wake24 for irq=241
[ 117.090015] Enabling wake24
[ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
[ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
[ 117.090655] Enabling wake29
[ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
[ 117.090775] Enabling wake53
[ 117.111219] tegradc 1521.nvdisplay: suspend
[ 117.111422] Wake73 for irq=42
[ 117.111424] Enabling wake73
[ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
[ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
[ 117.113535] Enabling wake71
[ 117.113632] PM: suspend of devices complete after 34.680 msecs
[ 117.114829] host1x 13e1.host1x: suspended
[ 117.114898] PM: late suspend of devices complete after 1.262 msecs
[ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
[ 117.133971] Disabling non-boot CPUs ...
[ 117.134249] CPU3: shutdown
[ 117.148582] psci: Retrying again to check for CPU kill
[ 117.148586] psci: CPU3 killed.
[ 117.149097] CPU4: shutdown
[ 117.164584] psci: Retrying again to check for CPU kill
[ 117.164589] psci: CPU4 killed.
[ 117.165041] CPU5: shutdown
[ 117.180572] psci: Retrying again to check for CPU kill
[ 117.180576] psci: CPU5 killed.
[ 117.180834] Entered SC7
[ 117.180834] Wake[31-0] level=0x4000
[ 117.180834] Wake[63-32] level=0x0
[ 117.180834] Wake[95-64] level=0x7f2a0
[ 117.180834] Wake[31-0] enable=0x2100
[ 117.180834] Wake[63-32] enable=0x20
[ 117.180834] Wake[95-64] enable=0x7f280
[ 117.180834] Wake[31-0] route=0x2100
[ 117.180834] Wake[63-32] route=0x20
[ 117.180834] Wake[95-64] route=0x7f280

[ 117.180834] Wake[32:0] status=0x0
[ 117.180834] Wake[64:32] status=0x0
[ 117.180834] Wake[96:64] status=0x0
[ 117.180834] Exited SC7
[ 117.180834] bpmp: waiting for handshake
[ 117.180834] bpmp: synchronizing channels
[ 117.180834] bpmp: channels synchronized
[ 117.180869] Enabling non-boot CPUs ...
[ 117.181067] CPU3: Booted secondary processor [411fd073]
[ 117.181198] CPU3 is up
[ 117.181353] CPU4: Booted secondary processor [411fd073]
[ 117.181455] CPU4 is up
[ 117.181609] CPU5: Booted secondary processor [411fd073]
[ 117.181721] CPU5 is up
[ 117.182740] xhci-tegra 353.xhci: exiting ELPG
[ 117.183221] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.381630] xhci-tegra 353.xhci: XHCI Controller not ready.
Falcon 

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-21 Thread Pintu Kumar
Hi,

I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
board (nvidia tegra186).
Suspend is working fine, but during boot with snapshot image, emmc
resume is failing.
Kernel version: 4.4
Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
repo: tegra-l4t-r27.1


It returns with:
mmc0: error -110 during resume (card was removed?)

Please see the complete logs below.

I tried to add some prints in mmc driver to check the cause.
It seems that mmc is not responding during resume.
[  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
When I check more, I found that CMD5 (Sleep/Awake) is failing to response.
It is not able to wakeup the mmc from sleep.

What could be cause of this problem?
Any pointers or suggestions about this issue will be really helpful

When I see the linux kernel mainline kernel-4.14 (latest), I could see
that there are some patches in drivers/mmc/core/* which are missing in
jetson tx2 kernel version-4.4.
Do you think any of the latest patches may help to solve this issue?
If yes, can you point to some of relevant once?


Please help.


Thanks,
Pintu

LOGS:
---
## Booting ...
[ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
restoring the best tap value : 112
[ 117.081179] xhci-tegra 353.xhci: exiting ELPG
[ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
[ 117.085204] xhci-tegra 353.xhci: entering ELPG
[ 117.087770] xhci-tegra 353.xhci: entering ELPG done
[ 117.087775] Wake76 for irq=199
[ 117.08] Wake77 for irq=199
[ 117.087778] Wake78 for irq=199
[ 117.087779] Wake79 for irq=199
[ 117.087780] Wake80 for irq=199
[ 117.087781] Wake81 for irq=199
[ 117.087782] Wake82 for irq=199
[ 117.087784] Enabling wake76
[ 117.087785] Enabling wake77
[ 117.087786] Enabling wake78
[ 117.087787] Enabling wake79
[ 117.087788] Enabling wake80
[ 117.087789] Enabling wake81
[ 117.087790] Enabling wake82
[ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
[ 117.090012] Wake24 for irq=241
[ 117.090015] Enabling wake24
[ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
[ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
[ 117.090655] Enabling wake29
[ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
[ 117.090775] Enabling wake53
[ 117.111219] tegradc 1521.nvdisplay: suspend
[ 117.111422] Wake73 for irq=42
[ 117.111424] Enabling wake73
[ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
[ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
[ 117.113535] Enabling wake71
[ 117.113632] PM: suspend of devices complete after 34.680 msecs
[ 117.114829] host1x 13e1.host1x: suspended
[ 117.114898] PM: late suspend of devices complete after 1.262 msecs
[ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
[ 117.133971] Disabling non-boot CPUs ...
[ 117.134249] CPU3: shutdown
[ 117.148582] psci: Retrying again to check for CPU kill
[ 117.148586] psci: CPU3 killed.
[ 117.149097] CPU4: shutdown
[ 117.164584] psci: Retrying again to check for CPU kill
[ 117.164589] psci: CPU4 killed.
[ 117.165041] CPU5: shutdown
[ 117.180572] psci: Retrying again to check for CPU kill
[ 117.180576] psci: CPU5 killed.
[ 117.180834] Entered SC7
[ 117.180834] Wake[31-0] level=0x4000
[ 117.180834] Wake[63-32] level=0x0
[ 117.180834] Wake[95-64] level=0x7f2a0
[ 117.180834] Wake[31-0] enable=0x2100
[ 117.180834] Wake[63-32] enable=0x20
[ 117.180834] Wake[95-64] enable=0x7f280
[ 117.180834] Wake[31-0] route=0x2100
[ 117.180834] Wake[63-32] route=0x20
[ 117.180834] Wake[95-64] route=0x7f280

[ 117.180834] Wake[32:0] status=0x0
[ 117.180834] Wake[64:32] status=0x0
[ 117.180834] Wake[96:64] status=0x0
[ 117.180834] Exited SC7
[ 117.180834] bpmp: waiting for handshake
[ 117.180834] bpmp: synchronizing channels
[ 117.180834] bpmp: channels synchronized
[ 117.180869] Enabling non-boot CPUs ...
[ 117.181067] CPU3: Booted secondary processor [411fd073]
[ 117.181198] CPU3 is up
[ 117.181353] CPU4: Booted secondary processor [411fd073]
[ 117.181455] CPU4 is up
[ 117.181609] CPU5: Booted secondary processor [411fd073]
[ 117.181721] CPU5 is up
[ 117.182740] xhci-tegra 353.xhci: exiting ELPG
[ 117.183221] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.381630] xhci-tegra 353.xhci: XHCI Controller not ready.
Falcon state: 0x10
[ 117.381633] xhci-tegra 353.xhci: exiting ELPG failed
[ 117.381643] dpm_run_callback(): tegra_xhci_resume_noirq+0x0/0x48 returns -14
[ 117.381653] PM: Device 353.xhci failed to resume noirq: error -14
[ 117.381724] PM: noirq resume of devices complete after 199.999 msecs
[ 117.383100] PM: early resume of devices complete after 1.236 msecs
[ 117.390964] gpio tegra-gpio wake71 for gpio=125(P:6)
[ 117.390966] Disabling wake71
[ 

Re: [tegra186]: emmc resume failing after booting from snapshot image

2017-11-21 Thread Pintu Kumar
Hi,

I am trying to bring up suspend-to-disk (snapshot boot) on jetson-tx2
board (nvidia tegra186).
Suspend is working fine, but during boot with snapshot image, emmc
resume is failing.
Kernel version: 4.4
Repo: https://nv-tegra.nvidia.com/gitweb/?p=linux-4.4.git;a=summary
repo: tegra-l4t-r27.1


It returns with:
mmc0: error -110 during resume (card was removed?)

Please see the complete logs below.

I tried to add some prints in mmc driver to check the cause.
It seems that mmc is not responding during resume.
[  137.125314] mmc_sleep: ERROR: mmc_wait_for_cmd, ret: -110
When I check more, I found that CMD5 (Sleep/Awake) is failing to response.
It is not able to wakeup the mmc from sleep.

What could be cause of this problem?
Any pointers or suggestions about this issue will be really helpful

When I see the linux kernel mainline kernel-4.14 (latest), I could see
that there are some patches in drivers/mmc/core/* which are missing in
jetson tx2 kernel version-4.4.
Do you think any of the latest patches may help to solve this issue?
If yes, can you point to some of relevant once?


Please help.


Thanks,
Pintu

LOGS:
---
## Booting ...
[ 117.079061] sdhci-tegra 340.sdhci: Tuning already done,
restoring the best tap value : 112
[ 117.081179] xhci-tegra 353.xhci: exiting ELPG
[ 117.081798] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.085202] xhci-tegra 353.xhci: exiting ELPG done
[ 117.085204] xhci-tegra 353.xhci: entering ELPG
[ 117.087770] xhci-tegra 353.xhci: entering ELPG done
[ 117.087775] Wake76 for irq=199
[ 117.08] Wake77 for irq=199
[ 117.087778] Wake78 for irq=199
[ 117.087779] Wake79 for irq=199
[ 117.087780] Wake80 for irq=199
[ 117.087781] Wake81 for irq=199
[ 117.087782] Wake82 for irq=199
[ 117.087784] Enabling wake76
[ 117.087785] Enabling wake77
[ 117.087786] Enabling wake78
[ 117.087787] Enabling wake79
[ 117.087788] Enabling wake80
[ 117.087789] Enabling wake81
[ 117.087790] Enabling wake82
[ 117.087891] tegra186-cam-rtcpu b00.rtcpu: sce gets halted
[ 117.090012] Wake24 for irq=241
[ 117.090015] Enabling wake24
[ 117.090598] nct1008_nct72 7-004c: success in disabling tmp451 VDD rail
[ 117.090654] gpio tegra-gpio-aon wake29 for gpio=56(FF:0)
[ 117.090655] Enabling wake29
[ 117.090774] gpio tegra-gpio wake53 for gpio=159(X:5)
[ 117.090775] Enabling wake53
[ 117.111219] tegradc 1521.nvdisplay: suspend
[ 117.111422] Wake73 for irq=42
[ 117.111424] Enabling wake73
[ 117.111597] bcm54xx_low_power_mode(): put phy in iddq-lp mode
[ 117.113533] gpio tegra-gpio wake71 for gpio=125(P:6)
[ 117.113535] Enabling wake71
[ 117.113632] PM: suspend of devices complete after 34.680 msecs
[ 117.114829] host1x 13e1.host1x: suspended
[ 117.114898] PM: late suspend of devices complete after 1.262 msecs
[ 117.133746] PM: noirq suspend of devices complete after 18.841 msecs
[ 117.133971] Disabling non-boot CPUs ...
[ 117.134249] CPU3: shutdown
[ 117.148582] psci: Retrying again to check for CPU kill
[ 117.148586] psci: CPU3 killed.
[ 117.149097] CPU4: shutdown
[ 117.164584] psci: Retrying again to check for CPU kill
[ 117.164589] psci: CPU4 killed.
[ 117.165041] CPU5: shutdown
[ 117.180572] psci: Retrying again to check for CPU kill
[ 117.180576] psci: CPU5 killed.
[ 117.180834] Entered SC7
[ 117.180834] Wake[31-0] level=0x4000
[ 117.180834] Wake[63-32] level=0x0
[ 117.180834] Wake[95-64] level=0x7f2a0
[ 117.180834] Wake[31-0] enable=0x2100
[ 117.180834] Wake[63-32] enable=0x20
[ 117.180834] Wake[95-64] enable=0x7f280
[ 117.180834] Wake[31-0] route=0x2100
[ 117.180834] Wake[63-32] route=0x20
[ 117.180834] Wake[95-64] route=0x7f280

[ 117.180834] Wake[32:0] status=0x0
[ 117.180834] Wake[64:32] status=0x0
[ 117.180834] Wake[96:64] status=0x0
[ 117.180834] Exited SC7
[ 117.180834] bpmp: waiting for handshake
[ 117.180834] bpmp: synchronizing channels
[ 117.180834] bpmp: channels synchronized
[ 117.180869] Enabling non-boot CPUs ...
[ 117.181067] CPU3: Booted secondary processor [411fd073]
[ 117.181198] CPU3 is up
[ 117.181353] CPU4: Booted secondary processor [411fd073]
[ 117.181455] CPU4 is up
[ 117.181609] CPU5: Booted secondary processor [411fd073]
[ 117.181721] CPU5 is up
[ 117.182740] xhci-tegra 353.xhci: exiting ELPG
[ 117.183221] xhci-tegra 353.xhci: Firmware timestamp: 2016-09-01
11:32:41 UTC, Version: 55.05 release
[ 117.381630] xhci-tegra 353.xhci: XHCI Controller not ready.
Falcon state: 0x10
[ 117.381633] xhci-tegra 353.xhci: exiting ELPG failed
[ 117.381643] dpm_run_callback(): tegra_xhci_resume_noirq+0x0/0x48 returns -14
[ 117.381653] PM: Device 353.xhci failed to resume noirq: error -14
[ 117.381724] PM: noirq resume of devices complete after 199.999 msecs
[ 117.383100] PM: early resume of devices complete after 1.236 msecs
[ 117.390964] gpio tegra-gpio wake71 for gpio=125(P:6)
[ 117.390966] Disabling wake71
[