diff mbox

[v2,0/6] Switch to generic syscon regmap based drivers

Message ID 562765F3.9010306@osg.samsung.com (mailing list archive)
State New, archived
Headers show

Commit Message

Javier Martinez Canillas Oct. 21, 2015, 10:16 a.m. UTC
Hello Alim,

On 10/21/2015 08:09 AM, Alim Akhtar wrote:

[snip]

>>>>>
>>>>> Hi Alim,
>>>>>
>>>>> I have installed your patch set above with git am on top of
>>>>> 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today
>>>>> with make exynos_defconfig on Odroid U3.
>>>>>
>>>> which exynos soc Odroid U3 uses?
>>>>
>>> OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does
>>> include exynos4.dtsi,
>>> so these should have worked.
>>>
>>>>> "halt -p" worked (power 0.0W).
>>>>> "reboot" got stuck at 0.5W.
>>>>>
>>>> reboot stuck mean system does not reboot any more?
>>
>> It freezes when going for reboot.
>> Have to power off/on to boot again.
>>
>> Btw I use an mmc, not an sd-card.
>> No other HW connected, just LAN-cable.
>> Bootloader is u-boot v2015.10.
>> o
> Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
> Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
> 

Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an
Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).

Having said that I think I know what is the issue here. Markus said that
he is using an eMMC instead of an uSD (which is what I used and my guess
is that Krzysztof did too).

Now, there is a subtle difference between the old PMU restart handler
and the syscon-reboot one, and that is the restart handler priorities:

notifier                    priority
------------------------------------
pmu_restart_notify          128
mmc_pwrseq_emmc_reset_nb    129
syscon_restart_handle       192

So, without Alim's patches, first the eMMC reset handler will be called
and then the PMU restart handler but after his series, the syscon reset
handler has a higher priority so the eMMC reset will never be called.

But the problem is that the eMMC card has to be properly reset on system
restart to allow the SoC iROM to be able to read the bootloader from the
eMMC since the iROM doesn't have restart logic and the card shouldn't be
left in an unknown state.

So the problem here is not that the system is not being reset (that I
think that works) but that on reboot, the system is not able to boot
again since the ROM is not able to read the second stage bootloader.

Markus, 

Can you please test following patch [0] on top of Alim's series? If that
works then it should either be part of Alim's series or the patches will
have to wait until that patch lands into mainline. I don't have an eMMC
to test it in XU4 but I'm pretty confident that it will solve the issue.

Best regards,

Comments

Markus Reichl Oct. 21, 2015, 10:42 a.m. UTC | #1
Am 21.10.2015 um 12:16 schrieb Javier Martinez Canillas:
> Hello Alim,
> 
> On 10/21/2015 08:09 AM, Alim Akhtar wrote:
> 
> [snip]
> 
>>>>>>
>>>>>> Hi Alim,
>>>>>>
>>>>>> I have installed your patch set above with git am on top of
>>>>>> 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today
>>>>>> with make exynos_defconfig on Odroid U3.
>>>>>>
>>>>> which exynos soc Odroid U3 uses?
>>>>>
>>>> OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does
>>>> include exynos4.dtsi,
>>>> so these should have worked.
>>>>
>>>>>> "halt -p" worked (power 0.0W).
>>>>>> "reboot" got stuck at 0.5W.
>>>>>>
>>>>> reboot stuck mean system does not reboot any more?
>>>
>>> It freezes when going for reboot.
>>> Have to power off/on to boot again.
>>>
>>> Btw I use an mmc, not an sd-card.
>>> No other HW connected, just LAN-cable.
>>> Bootloader is u-boot v2015.10.
>>> o
>> Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
>> Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
>>
> 
> Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an
> Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
> 
> Having said that I think I know what is the issue here. Markus said that
> he is using an eMMC instead of an uSD (which is what I used and my guess
> is that Krzysztof did too).
> 
> Now, there is a subtle difference between the old PMU restart handler
> and the syscon-reboot one, and that is the restart handler priorities:
> 
> notifier                    priority
> ------------------------------------
> pmu_restart_notify          128
> mmc_pwrseq_emmc_reset_nb    129
> syscon_restart_handle       192
> 
> So, without Alim's patches, first the eMMC reset handler will be called
> and then the PMU restart handler but after his series, the syscon reset
> handler has a higher priority so the eMMC reset will never be called.
> 
> But the problem is that the eMMC card has to be properly reset on system
> restart to allow the SoC iROM to be able to read the bootloader from the
> eMMC since the iROM doesn't have restart logic and the card shouldn't be
> left in an unknown state.
> 
> So the problem here is not that the system is not being reset (that I
> think that works) but that on reboot, the system is not able to boot
> again since the ROM is not able to read the second stage bootloader.
> 
> Markus, 
> 
> Can you please test following patch [0] on top of Alim's series? If that
> works then it should either be part of Alim's series or the patches will
> have to wait until that patch lands into mainline. I don't have an eMMC
> to test it in XU4 but I'm pretty confident that it will solve the issue.

Hi Javier,

your patch fixes the issue, reboot works now on U3.

Tested-by: Markus Reichl <m.reichl@fivetechno.de>

Thanks,
--
Markus


> 
> Best regards,
> 


--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alim Akhtar Oct. 21, 2015, 10:44 a.m. UTC | #2
Hi Javier,

On 10/21/2015 03:46 PM, Javier Martinez Canillas wrote:
> Hello Alim,
>
> On 10/21/2015 08:09 AM, Alim Akhtar wrote:
>
> [snip]
>
>>>>>>
>>>>>> Hi Alim,
>>>>>>
>>>>>> I have installed your patch set above with git am on top of
>>>>>> 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today
>>>>>> with make exynos_defconfig on Odroid U3.
>>>>>>
>>>>> which exynos soc Odroid U3 uses?
>>>>>
>>>> OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does
>>>> include exynos4.dtsi,
>>>> so these should have worked.
>>>>
>>>>>> "halt -p" worked (power 0.0W).
>>>>>> "reboot" got stuck at 0.5W.
>>>>>>
>>>>> reboot stuck mean system does not reboot any more?
>>>
>>> It freezes when going for reboot.
>>> Have to power off/on to boot again.
>>>
>>> Btw I use an mmc, not an sd-card.
>>> No other HW connected, just LAN-cable.
>>> Bootloader is u-boot v2015.10.
>>> o
>> Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
>> Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
>>
>
> Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an
> Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
>
> Having said that I think I know what is the issue here. Markus said that
> he is using an eMMC instead of an uSD (which is what I used and my guess
> is that Krzysztof did too).
>
> Now, there is a subtle difference between the old PMU restart handler
> and the syscon-reboot one, and that is the restart handler priorities:
>
> notifier                    priority
> ------------------------------------
> pmu_restart_notify          128
> mmc_pwrseq_emmc_reset_nb    129
> syscon_restart_handle       192
>
> So, without Alim's patches, first the eMMC reset handler will be called
> and then the PMU restart handler but after his series, the syscon reset
> handler has a higher priority so the eMMC reset will never be called.
>
> But the problem is that the eMMC card has to be properly reset on system
> restart to allow the SoC iROM to be able to read the bootloader from the
> eMMC since the iROM doesn't have restart logic and the card shouldn't be
> left in an unknown state.
>
> So the problem here is not that the system is not being reset (that I
> think that works) but that on reboot, the system is not able to boot
> again since the ROM is not able to read the second stage bootloader.
>
Thanks for nailing it down, this make lots of sense and probably the 
main cause of Odroid U3 reboot failure.
I was going to suggest Markus to try a uSD boot. But looks like your 
suggested patch will do the trick for him.

> Markus,
>
> Can you please test following patch [0] on top of Alim's series? If that
> works then it should either be part of Alim's series or the patches will
> have to wait until that patch lands into mainline. I don't have an eMMC
> to test it in XU4 but I'm pretty confident that it will solve the issue.
>
I am fine with including this with my series or lowering 
syscon_restart_handler priority to 128.
It also make sense to increase eMMC priority as you suggested as before 
system reboot, devices should have reseted itself.
Thanks!


> Best regards,
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alim Akhtar Oct. 21, 2015, 10:46 a.m. UTC | #3
On 10/21/2015 04:12 PM, Markus Reichl wrote:
> Am 21.10.2015 um 12:16 schrieb Javier Martinez Canillas:
>> Hello Alim,
>>
>> On 10/21/2015 08:09 AM, Alim Akhtar wrote:
>>
>> [snip]
>>
>>>>>>>
>>>>>>> Hi Alim,
>>>>>>>
>>>>>>> I have installed your patch set above with git am on top of
>>>>>>> 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today
>>>>>>> with make exynos_defconfig on Odroid U3.
>>>>>>>
>>>>>> which exynos soc Odroid U3 uses?
>>>>>>
>>>>> OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does
>>>>> include exynos4.dtsi,
>>>>> so these should have worked.
>>>>>
>>>>>>> "halt -p" worked (power 0.0W).
>>>>>>> "reboot" got stuck at 0.5W.
>>>>>>>
>>>>>> reboot stuck mean system does not reboot any more?
>>>>
>>>> It freezes when going for reboot.
>>>> Have to power off/on to boot again.
>>>>
>>>> Btw I use an mmc, not an sd-card.
>>>> No other HW connected, just LAN-cable.
>>>> Bootloader is u-boot v2015.10.
>>>> o
>>> Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
>>> Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
>>>
>>
>> Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an
>> Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
>>
>> Having said that I think I know what is the issue here. Markus said that
>> he is using an eMMC instead of an uSD (which is what I used and my guess
>> is that Krzysztof did too).
>>
>> Now, there is a subtle difference between the old PMU restart handler
>> and the syscon-reboot one, and that is the restart handler priorities:
>>
>> notifier                    priority
>> ------------------------------------
>> pmu_restart_notify          128
>> mmc_pwrseq_emmc_reset_nb    129
>> syscon_restart_handle       192
>>
>> So, without Alim's patches, first the eMMC reset handler will be called
>> and then the PMU restart handler but after his series, the syscon reset
>> handler has a higher priority so the eMMC reset will never be called.
>>
>> But the problem is that the eMMC card has to be properly reset on system
>> restart to allow the SoC iROM to be able to read the bootloader from the
>> eMMC since the iROM doesn't have restart logic and the card shouldn't be
>> left in an unknown state.
>>
>> So the problem here is not that the system is not being reset (that I
>> think that works) but that on reboot, the system is not able to boot
>> again since the ROM is not able to read the second stage bootloader.
>>
>> Markus,
>>
>> Can you please test following patch [0] on top of Alim's series? If that
>> works then it should either be part of Alim's series or the patches will
>> have to wait until that patch lands into mainline. I don't have an eMMC
>> to test it in XU4 but I'm pretty confident that it will solve the issue.
>
> Hi Javier,
>
> your patch fixes the issue, reboot works now on U3.
>
Good to know that.
Thanks
> Tested-by: Markus Reichl <m.reichl@fivetechno.de>
>
> Thanks,
> --
> Markus
>
>
>>
>> Best regards,
>>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Anand Moon Oct. 21, 2015, 11:46 a.m. UTC | #4
Hi Javier,

On 21 October 2015 at 16:16, Alim Akhtar <alim.akhtar@samsung.com> wrote:
>
>
> On 10/21/2015 04:12 PM, Markus Reichl wrote:
>>
>> Am 21.10.2015 um 12:16 schrieb Javier Martinez Canillas:
>>>
>>> Hello Alim,
>>>
>>> On 10/21/2015 08:09 AM, Alim Akhtar wrote:
>>>
>>> [snip]
>>>
>>>>>>>>
>>>>>>>> Hi Alim,
>>>>>>>>
>>>>>>>> I have installed your patch set above with git am on top of
>>>>>>>> 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today
>>>>>>>> with make exynos_defconfig on Odroid U3.
>>>>>>>>
>>>>>>> which exynos soc Odroid U3 uses?
>>>>>>>
>>>>>> OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does
>>>>>> include exynos4.dtsi,
>>>>>> so these should have worked.
>>>>>>
>>>>>>>> "halt -p" worked (power 0.0W).
>>>>>>>> "reboot" got stuck at 0.5W.
>>>>>>>>
>>>>>>> reboot stuck mean system does not reboot any more?
>>>>>
>>>>>
>>>>> It freezes when going for reboot.
>>>>> Have to power off/on to boot again.
>>>>>
>>>>> Btw I use an mmc, not an sd-card.
>>>>> No other HW connected, just LAN-cable.
>>>>> Bootloader is u-boot v2015.10.
>>>>> o
>>>>
>>>> Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach
>>>> boards.
>>>> Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might
>>>> help here to check whats wrong. To me its looks more of a board specific
>>>> issue for now.
>>>>
>>>
>>> Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an
>>> Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
>>>
>>> Having said that I think I know what is the issue here. Markus said that
>>> he is using an eMMC instead of an uSD (which is what I used and my guess
>>> is that Krzysztof did too).
>>>
>>> Now, there is a subtle difference between the old PMU restart handler
>>> and the syscon-reboot one, and that is the restart handler priorities:
>>>
>>> notifier                    priority
>>> ------------------------------------
>>> pmu_restart_notify          128
>>> mmc_pwrseq_emmc_reset_nb    129
>>> syscon_restart_handle       192
>>>
>>> So, without Alim's patches, first the eMMC reset handler will be called
>>> and then the PMU restart handler but after his series, the syscon reset
>>> handler has a higher priority so the eMMC reset will never be called.
>>>
>>> But the problem is that the eMMC card has to be properly reset on system
>>> restart to allow the SoC iROM to be able to read the bootloader from the
>>> eMMC since the iROM doesn't have restart logic and the card shouldn't be
>>> left in an unknown state.
>>>
>>> So the problem here is not that the system is not being reset (that I
>>> think that works) but that on reboot, the system is not able to boot
>>> again since the ROM is not able to read the second stage bootloader.
>>>
>>> Markus,
>>>
>>> Can you please test following patch [0] on top of Alim's series? If that
>>> works then it should either be part of Alim's series or the patches will
>>> have to wait until that patch lands into mainline. I don't have an eMMC
>>> to test it in XU4 but I'm pretty confident that it will solve the issue.
>>
>>
>> Hi Javier,
>>
>> your patch fixes the issue, reboot works now on U3.
>>
> Good to know that.
> Thanks
>>
>> Tested-by: Markus Reichl <m.reichl@fivetechno.de>
>>
>> Thanks,
>> --
>> Markus
>>
>>
>>>
>>> Best regards,
>>>
>>

Tested on OdroidXU3 emmc. Reboot success.

Tested-by: Anand Moon <linux.amoon@gmail.com>

-Anand Moon
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Javier Martinez Canillas Oct. 21, 2015, 1:23 p.m. UTC | #5
Hello Alim,

On 10/21/2015 12:44 PM, Alim Akhtar wrote:

[snip]

>>
>> Can you please test following patch [0] on top of Alim's series? If that
>> works then it should either be part of Alim's series or the patches will
>> have to wait until that patch lands into mainline. I don't have an eMMC
>> to test it in XU4 but I'm pretty confident that it will solve the issue.
>>
> I am fine with including this with my series or lowering syscon_restart_handler priority to 128.

Yes, I also considered changing the syscon-reboot handler priority to 128 but
then I noticed this commit:

b81180b3fd48 ("power: reset: adjust priority of simple syscon reboot driver").

So as you can see, it was 128 before but was bumped to 192 so it was called
before restart handlers registered by watchdogs. So, changing to 128 would
break other people use cases.

Now, I don't know if that is the right fix since register_restart_handler()
explanation about the policy used for restart handler priority numbers is
scarce. It only mentions 0, 128 and 255 so probably the correct thing to do
is to change all watchdog restart handler to 0 but that is a separate issue.

> It also make sense to increase eMMC priority as you suggested as before system reboot, devices should have reseted itself.

That was my rationale as well and is why I think the handler for devices
should use the highest priority regardless if the syscon-reboot is later
changed to prio 128 and the watchdog handlers to 0.

Best regards,

[0]: http://lxr.free-electrons.com/source/kernel/reboot.c#L113

Best regards,
Javier Martinez Canillas Oct. 21, 2015, 1:25 p.m. UTC | #6
Hello Anand and Markus,

On 10/21/2015 01:46 PM, Anand Moon wrote:

[snip]

>>>>
>>>> Markus,
>>>>
>>>> Can you please test following patch [0] on top of Alim's series? If that
>>>> works then it should either be part of Alim's series or the patches will
>>>> have to wait until that patch lands into mainline. I don't have an eMMC
>>>> to test it in XU4 but I'm pretty confident that it will solve the issue.
>>>
>>>
>>> Hi Javier,
>>>
>>> your patch fixes the issue, reboot works now on U3.
>>>
>> Good to know that.
>> Thanks
>>>
>>> Tested-by: Markus Reichl <m.reichl@fivetechno.de>
>>>
>>> Thanks,
>>> --
>>> Markus
>>>
>>>
>>>>
>>>> Best regards,
>>>>
>>>
> 
> Tested on OdroidXU3 emmc. Reboot success.
> 
> Tested-by: Anand Moon <linux.amoon@gmail.com>
> 

Thanks a lot to both for testing the patch.

Best regards,
Alim Akhtar Oct. 21, 2015, 2:50 p.m. UTC | #7
Hi Javier,

On Wed, Oct 21, 2015 at 3:46 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Alim,
>
> On 10/21/2015 08:09 AM, Alim Akhtar wrote:
>
> [snip]
>
>>>>>>
>>>>>> Hi Alim,
>>>>>>
>>>>>> I have installed your patch set above with git am on top of
>>>>>> 4.3.0-rc6-00108-gce1fad2 torvalds/linux of today
>>>>>> with make exynos_defconfig on Odroid U3.
>>>>>>
>>>>> which exynos soc Odroid U3 uses?
>>>>>
>>>> OK, I can see its uses exynos4412 and exynos4412-odroidu3.dts does
>>>> include exynos4.dtsi,
>>>> so these should have worked.
>>>>
>>>>>> "halt -p" worked (power 0.0W).
>>>>>> "reboot" got stuck at 0.5W.
>>>>>>
>>>>> reboot stuck mean system does not reboot any more?
>>>
>>> It freezes when going for reboot.
>>> Have to power off/on to boot again.
>>>
>>> Btw I use an mmc, not an sd-card.
>>> No other HW connected, just LAN-cable.
>>> Bootloader is u-boot v2015.10.
>>> o
>> Have checked on 4.3.0-rc6-00006-gd03c139e7e77, still works on peach boards.
>> Sorry I don't have Odroid U3 with me, may be Javier or Krzysztof might help here to check whats wrong. To me its looks more of a board specific issue for now.
>>
>
> Krzysztof has an Odroid XU3 lite and I have an Odroid XU4, both uses an
> Exynos5422 so we can't check what's wrong with Odroid U3 (Exynos4412).
>
> Having said that I think I know what is the issue here. Markus said that
> he is using an eMMC instead of an uSD (which is what I used and my guess
> is that Krzysztof did too).
>
> Now, there is a subtle difference between the old PMU restart handler
> and the syscon-reboot one, and that is the restart handler priorities:
>
> notifier                    priority
> ------------------------------------
> pmu_restart_notify          128
> mmc_pwrseq_emmc_reset_nb    129
> syscon_restart_handle       192
>
> So, without Alim's patches, first the eMMC reset handler will be called
> and then the PMU restart handler but after his series, the syscon reset
> handler has a higher priority so the eMMC reset will never be called.
>
> But the problem is that the eMMC card has to be properly reset on system
> restart to allow the SoC iROM to be able to read the bootloader from the
> eMMC since the iROM doesn't have restart logic and the card shouldn't be
> left in an unknown state.
>
> So the problem here is not that the system is not being reset (that I
> think that works) but that on reboot, the system is not able to boot
> again since the ROM is not able to read the second stage bootloader.
>
> Markus,
>
> Can you please test following patch [0] on top of Alim's series? If that
> works then it should either be part of Alim's series or the patches will
> have to wait until that patch lands into mainline. I don't have an eMMC
> to test it in XU4 but I'm pretty confident that it will solve the issue.
>
> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
>
> [0]:
> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
> From: Javier Martinez Canillas <javier@osg.samsung.com>
> Date: Wed, 21 Oct 2015 11:59:44 +0200
> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>  handler
>
> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
> logic, to be able to read the second stage from the eMMC.
>
> But this has to be called before a system reboot handler and while most
> of them use the priority 128, there are other restart handlers (such as
> the syscon-reboot one) that use a higher priority. So, use the highest
> priority to make sure that the eMMC hw is reset before a system reboot.
>
> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
> ---
Looks good.
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>

>  drivers/mmc/core/pwrseq_emmc.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c
> index 137c97fb7aa8..ad4f94ec7e8d 100644
> --- a/drivers/mmc/core/pwrseq_emmc.c
> +++ b/drivers/mmc/core/pwrseq_emmc.c
> @@ -84,11 +84,11 @@ struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,
>
>         /*
>          * register reset handler to ensure emmc reset also from
> -        * emergency_reboot(), priority 129 schedules it just before
> -        * system reboot
> +        * emergency_reboot(), priority 255 is the highest priority
> +        * so it will be executed before any system reboot handler.
>          */
>         pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb;
> -       pwrseq->reset_nb.priority = 129;
> +       pwrseq->reset_nb.priority = 255;
>         register_restart_handler(&pwrseq->reset_nb);
>
>         pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops;
> --
> 2.4.3
Javier Martinez Canillas Oct. 21, 2015, 2:55 p.m. UTC | #8
Hello Alim,

On 10/21/2015 04:50 PM, Alim Akhtar wrote:

[snip]

>>
>> [0]:
>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>  handler
>>
>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>> logic, to be able to read the second stage from the eMMC.
>>
>> But this has to be called before a system reboot handler and while most
>> of them use the priority 128, there are other restart handlers (such as
>> the syscon-reboot one) that use a higher priority. So, use the highest
>> priority to make sure that the eMMC hw is reset before a system reboot.
>>
>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>> ---
> Looks good.
> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>

Thanks, should I post it as a proper patch or are adding it to your
series? I think the latter is more reasonable so with an ack from Ulf,
all patches can go through the linux-samsung tree.
 
Best regards,
Alim Akhtar Oct. 21, 2015, 2:56 p.m. UTC | #9
Hi Javier,

On Wed, Oct 21, 2015 at 6:53 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Alim,
>
> On 10/21/2015 12:44 PM, Alim Akhtar wrote:
>
> [snip]
>
>>>
>>> Can you please test following patch [0] on top of Alim's series? If that
>>> works then it should either be part of Alim's series or the patches will
>>> have to wait until that patch lands into mainline. I don't have an eMMC
>>> to test it in XU4 but I'm pretty confident that it will solve the issue.
>>>
>> I am fine with including this with my series or lowering syscon_restart_handler priority to 128.
>
> Yes, I also considered changing the syscon-reboot handler priority to 128 but
> then I noticed this commit:
>
> b81180b3fd48 ("power: reset: adjust priority of simple syscon reboot driver").
>
> So as you can see, it was 128 before but was bumped to 192 so it was called
> before restart handlers registered by watchdogs. So, changing to 128 would
> break other people use cases.
>
> Now, I don't know if that is the right fix since register_restart_handler()
> explanation about the policy used for restart handler priority numbers is
> scarce. It only mentions 0, 128 and 255 so probably the correct thing to do
> is to change all watchdog restart handler to 0 but that is a separate issue.
>
>> It also make sense to increase eMMC priority as you suggested as before system reboot, devices should have reseted itself.
>
> That was my rationale as well and is why I think the handler for devices
> should use the highest priority regardless if the syscon-reboot is later
> changed to prio 128 and the watchdog handlers to 0.
>
I agree, in any case dumping up eMMC reset priority make sense.
If all is good here, over to Krzysztof and Ulf to handle these patches.
Thanks.
> Best regards,
>
> [0]: http://lxr.free-electrons.com/source/kernel/reboot.c#L113
>
> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
Alim Akhtar Oct. 21, 2015, 3:01 p.m. UTC | #10
On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
<javier@osg.samsung.com> wrote:
> Hello Alim,
>
> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>
> [snip]
>
>>>
>>> [0]:
>>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>  handler
>>>
>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>> logic, to be able to read the second stage from the eMMC.
>>>
>>> But this has to be called before a system reboot handler and while most
>>> of them use the priority 128, there are other restart handlers (such as
>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>
>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>> ---
>> Looks good.
>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>
>
> Thanks, should I post it as a proper patch or are adding it to your
> series?
Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
for maintainers to pickup ) and probably CCing Ulf for his feedback.

> I think the latter is more reasonable so with an ack from Ulf,
> all patches can go through the linux-samsung tree.
>
yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.

> Best regards,
> --
> Javier Martinez Canillas
> Open Source Group
> Samsung Research America
Krzysztof Kozlowski Oct. 22, 2015, 12:17 a.m. UTC | #11
On 22.10.2015 00:01, Alim Akhtar wrote:
> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
> <javier@osg.samsung.com> wrote:
>> Hello Alim,
>>
>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>
>> [snip]
>>
>>>>
>>>> [0]:
>>>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>>  handler
>>>>
>>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>>> logic, to be able to read the second stage from the eMMC.
>>>>
>>>> But this has to be called before a system reboot handler and while most
>>>> of them use the priority 128, there are other restart handlers (such as
>>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>>
>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>> ---
>>> Looks good.
>>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>>
>>

+Cc Ulf,

Javier,

First of all, thanks Javier for digging into the issue. Actually I have
Odroid U3 but because of user-space limitations (which I need for other
work) I cannot test all of mainline patches there.


>> Thanks, should I post it as a proper patch or are adding it to your
>> series?
> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
> for maintainers to pickup ) and probably CCing Ulf for his feedback.
> 
>> I think the latter is more reasonable so with an ack from Ulf,
>> all patches can go through the linux-samsung tree.
>>
> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.

Javier, Alim, Ulf,

I am not grabbing any more patches for v4.4 because I doubt that they
could be merged to arm-soc for this cycle. My last pull requests for
v4.4 is still pending...

This means that I plan to pick up these series for v4.5, after closing
v4.4 merge window (unless Kukjin picks it also). Because of that, we
have plenty of time, so my idea is:
1. Wait for some comments from Ulf on Javier's fix.
2. If the fix goes into v4.4, then problem solved.
3. If not and it get acked, then it can go with this set.
4. If not and it get applied by Ulf for v4.5, then a tag from him would
be a nice way to solve dependency.

Either way we don't have to hurry, I think.

Best regards,
Krzysztof
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alim Akhtar Oct. 22, 2015, 3:54 a.m. UTC | #12
On 10/22/2015 05:47 AM, Krzysztof Kozlowski wrote:
> On 22.10.2015 00:01, Alim Akhtar wrote:
>> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
>> <javier@osg.samsung.com> wrote:
>>> Hello Alim,
>>>
>>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>>
>>> [snip]
>>>
>>>>>
>>>>> [0]:
>>>>>  From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>>>   handler
>>>>>
>>>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>>>> logic, to be able to read the second stage from the eMMC.
>>>>>
>>>>> But this has to be called before a system reboot handler and while most
>>>>> of them use the priority 128, there are other restart handlers (such as
>>>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>>>
>>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>> ---
>>>> Looks good.
>>>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>>>
>>>
>
> +Cc Ulf,
>
> Javier,
>
> First of all, thanks Javier for digging into the issue. Actually I have
> Odroid U3 but because of user-space limitations (which I need for other
> work) I cannot test all of mainline patches there.
>
>
>>> Thanks, should I post it as a proper patch or are adding it to your
>>> series?
>> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
>> for maintainers to pickup ) and probably CCing Ulf for his feedback.
>>
>>> I think the latter is more reasonable so with an ack from Ulf,
>>> all patches can go through the linux-samsung tree.
>>>
>> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
>
> Javier, Alim, Ulf,
>
> I am not grabbing any more patches for v4.4 because I doubt that they
> could be merged to arm-soc for this cycle. My last pull requests for
> v4.4 is still pending...
>
> This means that I plan to pick up these series for v4.5, after closing
> v4.4 merge window (unless Kukjin picks it also). Because of that, we
> have plenty of time, so my idea is:
> 1. Wait for some comments from Ulf on Javier's fix.
> 2. If the fix goes into v4.4, then problem solved.
> 3. If not and it get acked, then it can go with this set.
> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
> be a nice way to solve dependency.
>
> Either way we don't have to hurry, I think.
>
I am fine, no hurry, lets give these a bit more time to hear from other.
Thanks
> Best regards,
> Krzysztof
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
kgene@kernel.org Oct. 23, 2015, 6:52 p.m. UTC | #13
On 10/21/15 23:55, Javier Martinez Canillas wrote:
> Hello Alim,
> 
> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
> 
> [snip]
> 
>>>
>>> [0]:
>>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>  handler
>>>
>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>> logic, to be able to read the second stage from the eMMC.
>>>
>>> But this has to be called before a system reboot handler and while most
>>> of them use the priority 128, there are other restart handlers (such as
>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>
>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>> ---
>> Looks good.
>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>
> 
> Thanks, should I post it as a proper patch or are adding it to your
> series? I think the latter is more reasonable so with an ack from Ulf,
> all patches can go through the linux-samsung tree.
>  
Javier,

Can you please post your fix right now? so that I could take this series
for v4.4 of late pull-request...

Thanks,
Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
kgene@kernel.org Oct. 23, 2015, 6:59 p.m. UTC | #14
On 10/24/15 03:52, Kukjin Kim wrote:
> On 10/21/15 23:55, Javier Martinez Canillas wrote:
>> Hello Alim,
>>
>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>
>> [snip]
>>
>>>>
>>>> [0]:
>>>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>>  handler
>>>>
>>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>>> logic, to be able to read the second stage from the eMMC.
>>>>
>>>> But this has to be called before a system reboot handler and while most
>>>> of them use the priority 128, there are other restart handlers (such as
>>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>>
>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>> ---
>>> Looks good.
>>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>>
>>
>> Thanks, should I post it as a proper patch or are adding it to your
>> series? I think the latter is more reasonable so with an ack from Ulf,
>> all patches can go through the linux-samsung tree.
>>  
> Javier,
> 
> Can you please post your fix right now? so that I could take this series
> for v4.4 of late pull-request...
> 
I found the patch in linux-arm-kernel ml just now....let me see. Please
kindly ignore previous my comments...

Thanks,
Kukjin
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alim Akhtar Nov. 19, 2015, 6:06 p.m. UTC | #15
Hi Krzysztof/Ulf/Kukjin

On Thu, Oct 22, 2015 at 5:47 AM, Krzysztof Kozlowski
<k.kozlowski@samsung.com> wrote:
> On 22.10.2015 00:01, Alim Akhtar wrote:
>> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
>> <javier@osg.samsung.com> wrote:
>>> Hello Alim,
>>>
>>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>>
>>> [snip]
>>>
>>>>>
>>>>> [0]:
>>>>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>>>  handler
>>>>>
>>>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>>>> logic, to be able to read the second stage from the eMMC.
>>>>>
>>>>> But this has to be called before a system reboot handler and while most
>>>>> of them use the priority 128, there are other restart handlers (such as
>>>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>>>
>>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>> ---
>>>> Looks good.
>>>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>>>
>>>
>
> +Cc Ulf,
>
> Javier,
>
> First of all, thanks Javier for digging into the issue. Actually I have
> Odroid U3 but because of user-space limitations (which I need for other
> work) I cannot test all of mainline patches there.
>
>
>>> Thanks, should I post it as a proper patch or are adding it to your
>>> series?
>> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
>> for maintainers to pickup ) and probably CCing Ulf for his feedback.
>>
>>> I think the latter is more reasonable so with an ack from Ulf,
>>> all patches can go through the linux-samsung tree.
>>>
>> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
>
> Javier, Alim, Ulf,
>
> I am not grabbing any more patches for v4.4 because I doubt that they
> could be merged to arm-soc for this cycle. My last pull requests for
> v4.4 is still pending...
>
> This means that I plan to pick up these series for v4.5, after closing
> v4.4 merge window (unless Kukjin picks it also). Because of that, we
> have plenty of time, so my idea is:
> 1. Wait for some comments from Ulf on Javier's fix.
> 2. If the fix goes into v4.4, then problem solved.
> 3. If not and it get acked, then it can go with this set.
> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
> be a nice way to solve dependency.
>
> Either way we don't have to hurry, I think.
>

Is It the right time to get this series in?
Thanks!!

> Best regards,
> Krzysztof
Javier Martinez Canillas Nov. 19, 2015, 6:18 p.m. UTC | #16
Hello Alim,

On Thu, Nov 19, 2015 at 3:06 PM, Alim Akhtar <alim.akhtar@gmail.com> wrote:

[snip]

>>
>> Javier, Alim, Ulf,
>>
>> I am not grabbing any more patches for v4.4 because I doubt that they
>> could be merged to arm-soc for this cycle. My last pull requests for
>> v4.4 is still pending...
>>
>> This means that I plan to pick up these series for v4.5, after closing
>> v4.4 merge window (unless Kukjin picks it also). Because of that, we
>> have plenty of time, so my idea is:
>> 1. Wait for some comments from Ulf on Javier's fix.
>> 2. If the fix goes into v4.4, then problem solved.
>> 3. If not and it get acked, then it can go with this set.
>> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
>> be a nice way to solve dependency.
>>
>> Either way we don't have to hurry, I think.
>>
>
> Is It the right time to get this series in?

The patch that the series had as a dependency made it to v4.4-rc1 as
commit 1c6e58d83615 ("mmc: pwrseq: Use highest priority for eMMC
restart handler") so it should be safe now to pick this series for
v4.5.

> Thanks!!
>

Best regards,
Javier
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski Nov. 20, 2015, 12:46 a.m. UTC | #17
On 20.11.2015 03:06, Alim Akhtar wrote:
> Hi Krzysztof/Ulf/Kukjin
> 
> On Thu, Oct 22, 2015 at 5:47 AM, Krzysztof Kozlowski
> <k.kozlowski@samsung.com> wrote:
>> On 22.10.2015 00:01, Alim Akhtar wrote:
>>> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
>>> <javier@osg.samsung.com> wrote:
>>>> Hello Alim,
>>>>
>>>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>>>
>>>> [snip]
>>>>
>>>>>>
>>>>>> [0]:
>>>>>> From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>>>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>>>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>>>>  handler
>>>>>>
>>>>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>>>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>>>>> logic, to be able to read the second stage from the eMMC.
>>>>>>
>>>>>> But this has to be called before a system reboot handler and while most
>>>>>> of them use the priority 128, there are other restart handlers (such as
>>>>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>>>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>>>>
>>>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>>> ---
>>>>> Looks good.
>>>>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>>>>
>>>>
>>
>> +Cc Ulf,
>>
>> Javier,
>>
>> First of all, thanks Javier for digging into the issue. Actually I have
>> Odroid U3 but because of user-space limitations (which I need for other
>> work) I cannot test all of mainline patches there.
>>
>>
>>>> Thanks, should I post it as a proper patch or are adding it to your
>>>> series?
>>> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
>>> for maintainers to pickup ) and probably CCing Ulf for his feedback.
>>>
>>>> I think the latter is more reasonable so with an ack from Ulf,
>>>> all patches can go through the linux-samsung tree.
>>>>
>>> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
>>
>> Javier, Alim, Ulf,
>>
>> I am not grabbing any more patches for v4.4 because I doubt that they
>> could be merged to arm-soc for this cycle. My last pull requests for
>> v4.4 is still pending...
>>
>> This means that I plan to pick up these series for v4.5, after closing
>> v4.4 merge window (unless Kukjin picks it also). Because of that, we
>> have plenty of time, so my idea is:
>> 1. Wait for some comments from Ulf on Javier's fix.
>> 2. If the fix goes into v4.4, then problem solved.
>> 3. If not and it get acked, then it can go with this set.
>> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
>> be a nice way to solve dependency.
>>
>> Either way we don't have to hurry, I think.
>>
> 
> Is It the right time to get this series in?
> Thanks!!

I started applying it but stopped at #5. It should be squashed with #6
to get rid of (not important) conflict between syscon reboot and
existing Exynos restart handler:

syscon-poweroff syscon-poweroff: pm_power_off already claimed c001e52c
exynos_power_off
syscon-poweroff: probe of syscon-poweroff failed with error -16

The conflict is not really an issue because of ordering of init calls
the Exynos will register itself before syscon. Nevertheless splitting
the patches does not really make sense... so please merge #5 with #6.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Alim Akhtar Nov. 20, 2015, 5:08 a.m. UTC | #18
Hi Krzysztof,

On 11/20/2015 06:16 AM, Krzysztof Kozlowski wrote:
> On 20.11.2015 03:06, Alim Akhtar wrote:
>> Hi Krzysztof/Ulf/Kukjin
>>
>> On Thu, Oct 22, 2015 at 5:47 AM, Krzysztof Kozlowski
>> <k.kozlowski@samsung.com> wrote:
>>> On 22.10.2015 00:01, Alim Akhtar wrote:
>>>> On Wed, Oct 21, 2015 at 8:25 PM, Javier Martinez Canillas
>>>> <javier@osg.samsung.com> wrote:
>>>>> Hello Alim,
>>>>>
>>>>> On 10/21/2015 04:50 PM, Alim Akhtar wrote:
>>>>>
>>>>> [snip]
>>>>>
>>>>>>>
>>>>>>> [0]:
>>>>>>>  From c9b250ee03bae338339b70693e906145c719f783 Mon Sep 17 00:00:00 2001
>>>>>>> From: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>>>> Date: Wed, 21 Oct 2015 11:59:44 +0200
>>>>>>> Subject: [RFT PATCH] mmc: pwrseq: Use highest priority for eMMC restart
>>>>>>>   handler
>>>>>>>
>>>>>>> The pwrseq_emmc driver does a eMMC card reset before a system reboot to
>>>>>>> allow broken or limited ROM boot-loaders, that don't have an eMMC reset
>>>>>>> logic, to be able to read the second stage from the eMMC.
>>>>>>>
>>>>>>> But this has to be called before a system reboot handler and while most
>>>>>>> of them use the priority 128, there are other restart handlers (such as
>>>>>>> the syscon-reboot one) that use a higher priority. So, use the highest
>>>>>>> priority to make sure that the eMMC hw is reset before a system reboot.
>>>>>>>
>>>>>>> Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com>
>>>>>>> ---
>>>>>> Looks good.
>>>>>> Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
>>>>>>
>>>>>
>>>
>>> +Cc Ulf,
>>>
>>> Javier,
>>>
>>> First of all, thanks Javier for digging into the issue. Actually I have
>>> Odroid U3 but because of user-space limitations (which I need for other
>>> work) I cannot test all of mainline patches there.
>>>
>>>
>>>>> Thanks, should I post it as a proper patch or are adding it to your
>>>>> series?
>>>> Suggest you to post as a patch collecting {Tested, Reviewed}-by (easy
>>>> for maintainers to pickup ) and probably CCing Ulf for his feedback.
>>>>
>>>>> I think the latter is more reasonable so with an ack from Ulf,
>>>>> all patches can go through the linux-samsung tree.
>>>>>
>>>> yes, that is reasonable, as I said, let Krzysztof and Ulf take a call here.
>>>
>>> Javier, Alim, Ulf,
>>>
>>> I am not grabbing any more patches for v4.4 because I doubt that they
>>> could be merged to arm-soc for this cycle. My last pull requests for
>>> v4.4 is still pending...
>>>
>>> This means that I plan to pick up these series for v4.5, after closing
>>> v4.4 merge window (unless Kukjin picks it also). Because of that, we
>>> have plenty of time, so my idea is:
>>> 1. Wait for some comments from Ulf on Javier's fix.
>>> 2. If the fix goes into v4.4, then problem solved.
>>> 3. If not and it get acked, then it can go with this set.
>>> 4. If not and it get applied by Ulf for v4.5, then a tag from him would
>>> be a nice way to solve dependency.
>>>
>>> Either way we don't have to hurry, I think.
>>>
>>
>> Is It the right time to get this series in?
>> Thanks!!
>
> I started applying it but stopped at #5. It should be squashed with #6
> to get rid of (not important) conflict between syscon reboot and
> existing Exynos restart handler:
>
> syscon-poweroff syscon-poweroff: pm_power_off already claimed c001e52c
> exynos_power_off
> syscon-poweroff: probe of syscon-poweroff failed with error -16
>
> The conflict is not really an issue because of ordering of init calls
> the Exynos will register itself before syscon. Nevertheless splitting
> the patches does not really make sense... so please merge #5 with #6.
>
Hmm...nice catch..will send v3 shortly after merging patch #5 and #6.

> Best regards,
> Krzysztof
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/core/pwrseq_emmc.c b/drivers/mmc/core/pwrseq_emmc.c
index 137c97fb7aa8..ad4f94ec7e8d 100644
--- a/drivers/mmc/core/pwrseq_emmc.c
+++ b/drivers/mmc/core/pwrseq_emmc.c
@@ -84,11 +84,11 @@  struct mmc_pwrseq *mmc_pwrseq_emmc_alloc(struct mmc_host *host,
 
 	/*
 	 * register reset handler to ensure emmc reset also from
-	 * emergency_reboot(), priority 129 schedules it just before
-	 * system reboot
+	 * emergency_reboot(), priority 255 is the highest priority
+	 * so it will be executed before any system reboot handler.
 	 */
 	pwrseq->reset_nb.notifier_call = mmc_pwrseq_emmc_reset_nb;
-	pwrseq->reset_nb.priority = 129;
+	pwrseq->reset_nb.priority = 255;
 	register_restart_handler(&pwrseq->reset_nb);
 
 	pwrseq->pwrseq.ops = &mmc_pwrseq_emmc_ops;