Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Alim Akhtar
Hi Krzysztof/Ulf/Kukjin

On Thu, Oct 22, 2015 at 5: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
>>  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 
> 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 
> ---
 Looks good.
 Reviewed-by: Alim Akhtar 

>>>
>
> +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



-- 
Regards,
Alim
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Javier Martinez Canillas
Hello Alim,

On Thu, Nov 19, 2015 at 3:06 PM, Alim Akhtar  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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Krzysztof Kozlowski
On 20.11.2015 03:06, Alim Akhtar wrote:
> Hi Krzysztof/Ulf/Kukjin
> 
> On Thu, Oct 22, 2015 at 5: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
>>>  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 
>> 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 
>> ---
> Looks good.
> Reviewed-by: Alim Akhtar 
>

>>
>> +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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-11-19 Thread Alim Akhtar

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
 wrote:

On 22.10.2015 00:01, Alim Akhtar wrote:

On Wed, Oct 21, 2015 at 8:25 PM, 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 
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 
---

Looks good.
Reviewed-by: Alim Akhtar 





+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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-23 Thread Kukjin Kim
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 
>>> 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 
>>> ---
>> Looks good.
>> Reviewed-by: Alim Akhtar 
>>
> 
> 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-23 Thread Kukjin Kim
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 
 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 
 ---
>>> Looks good.
>>> Reviewed-by: Alim Akhtar 
>>>
>>
>> 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 nowlet 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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar
Hi Javier,

On Wed, Oct 21, 2015 at 6:53 PM, Javier Martinez Canillas
 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



-- 
Regards,
Alim
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar
Hi Javier,

On Wed, Oct 21, 2015 at 3: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-6-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:
>
> notifierpriority
> 
> pmu_restart_notify  128
> mmc_pwrseq_emmc_reset_nb129
> 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 
> 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 
> ---
Looks good.
Reviewed-by: Alim Akhtar 

>  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(>reset_nb);
>
> pwrseq->pwrseq.ops = _pwrseq_emmc_ops;
> --
> 2.4.3



-- 
Regards,
Alim
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info 

Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Javier Martinez Canillas
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 
>> 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 
>> ---
> Looks good.
> Reviewed-by: Alim Akhtar 
>

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,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar
On Wed, Oct 21, 2015 at 8:25 PM, 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 
>>> 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 
>>> ---
>> Looks good.
>> Reviewed-by: Alim Akhtar 
>>
>
> 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



-- 
Regards,
Alim
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar



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
 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 
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 
---

Looks good.
Reviewed-by: Alim Akhtar 





+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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Krzysztof Kozlowski
On 22.10.2015 00:01, Alim Akhtar wrote:
> On Wed, Oct 21, 2015 at 8:25 PM, 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 
 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 
 ---
>>> Looks good.
>>> Reviewed-by: Alim Akhtar 
>>>
>>

+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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Javier Martinez Canillas
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
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Javier Martinez Canillas
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 
>>>
>>> Thanks,
>>> --
>>> Markus
>>>
>>>

 Best regards,

>>>
> 
> Tested on OdroidXU3 emmc. Reboot success.
> 
> Tested-by: Anand Moon 
> 

Thanks a lot to both for testing the patch.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Markus Reichl
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-6-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:
> 
> notifierpriority
> 
> pmu_restart_notify  128
> mmc_pwrseq_emmc_reset_nb129
> 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 

Thanks,
--
Markus


> 
> Best regards,
> 


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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread 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-6-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:

notifierpriority

pmu_restart_notify  128
mmc_pwrseq_emmc_reset_nb129
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 
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 
---
 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(>reset_nb);
 
pwrseq->pwrseq.ops = _pwrseq_emmc_ops;
-- 
2.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar

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-6-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:

notifierpriority

pmu_restart_notify  128
mmc_pwrseq_emmc_reset_nb129
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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Anand Moon
Hi Javier,

On 21 October 2015 at 16:16, Alim Akhtar  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-6-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:
>>>
>>> notifierpriority
>>> 
>>> pmu_restart_notify  128
>>> mmc_pwrseq_emmc_reset_nb129
>>> 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 
>>
>> Thanks,
>> --
>> Markus
>>
>>
>>>
>>> Best regards,
>>>
>>

Tested on OdroidXU3 emmc. Reboot success.

Tested-by: Anand Moon 

-Anand Moon
>>
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc"
> in
> the body of a message to majord...@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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar



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-6-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:

notifierpriority

pmu_restart_notify  128
mmc_pwrseq_emmc_reset_nb129
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 

Thanks,
--
Markus




Best regards,






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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-21 Thread Alim Akhtar



On 10/20/2015 10:53 PM, Markus Reichl wrote:

Am Dienstag, 20. Oktober 2015, 21:22:05 schrieb Alim Akhtar:

On Tue, Oct 20, 2015 at 9:17 PM, Alim Akhtar  wrote:

Hi Markus,

On Tue, Oct 20, 2015 at 8:29 PM, Markus Reichl  wrote:

Am 20.10.2015 um 11:24 schrieb Alim Akhtar:

Now we have a nice way to reboot/poweroff system using a generic
syscon regmap based drivers, this series moves exynos SoCs to
make use of the same.

Changes since v1:
* Added a comment about the register information
* Droped defconfig changes as disscussed
* Collected various Reviewed-by, Tested-by and Acked-by tags
* Added SYSCON-{RESET, POWEROFF} to select from Kconfig

Alim Akhtar (6):
   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
   ARM: exynos: select POWER_RESET_SYSCON and
 POWER_RESET_SYSCON_POWEROFF
   ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs

  arch/arm/boot/dts/exynos3250.dtsi |   14 
  arch/arm/boot/dts/exynos4.dtsi|   14 
  arch/arm/boot/dts/exynos5.dtsi|   14 
  arch/arm/boot/dts/exynos5410.dtsi |   14 
  arch/arm/mach-exynos/Kconfig  |3 +++
  arch/arm/mach-exynos/pmu.c|   43 -
  6 files changed, 59 insertions(+), 43 deletions(-)



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-6-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.



As far as I can see there in __no__ functional changes that my patch introduce.
So ideally it should have work. My patches are based on the top on
vanilla v4.3-rc5.
(25cb62b Linux 4.3-rc5), can you check at this commit?


Will try tomorrow.



Will check with the commit mentioned by you tomorrow.



Without your patch set reboot worked.


Thanks,
--
Markus Reichl
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html




--
Regards,
Alim






Thanks,
--
Markus


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


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-20 Thread Javier Martinez Canillas
Hello Alim,

On 10/20/2015 11:24 AM, Alim Akhtar wrote:
> Now we have a nice way to reboot/poweroff system using a generic
> syscon regmap based drivers, this series moves exynos SoCs to
> make use of the same.
> 

I tested this series on an Exynos5800 Peach Pi and an Exynos5422 Odroid XU.
Reboot and poweroff are working correctly on both boards with these patches.

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-20 Thread Alim Akhtar
Hi Markus,

On Tue, Oct 20, 2015 at 8:29 PM, Markus Reichl  wrote:
> Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
>> Now we have a nice way to reboot/poweroff system using a generic
>> syscon regmap based drivers, this series moves exynos SoCs to
>> make use of the same.
>>
>> Changes since v1:
>> * Added a comment about the register information
>> * Droped defconfig changes as disscussed
>> * Collected various Reviewed-by, Tested-by and Acked-by tags
>> * Added SYSCON-{RESET, POWEROFF} to select from Kconfig
>>
>> Alim Akhtar (6):
>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
>>   ARM: exynos: select POWER_RESET_SYSCON and
>> POWER_RESET_SYSCON_POWEROFF
>>   ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
>>
>>  arch/arm/boot/dts/exynos3250.dtsi |   14 
>>  arch/arm/boot/dts/exynos4.dtsi|   14 
>>  arch/arm/boot/dts/exynos5.dtsi|   14 
>>  arch/arm/boot/dts/exynos5410.dtsi |   14 
>>  arch/arm/mach-exynos/Kconfig  |3 +++
>>  arch/arm/mach-exynos/pmu.c|   43 
>> -
>>  6 files changed, 59 insertions(+), 43 deletions(-)
>>
>
> 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?

> "halt -p" worked (power 0.0W).
> "reboot" got stuck at 0.5W.
>
reboot stuck mean system does not reboot any more?
As far as I can see there in __no__ functional changes that my patch introduce.
So ideally it should have work. My patches are based on the top on
vanilla v4.3-rc5.
(25cb62b Linux 4.3-rc5), can you check at this commit?

Will check with the commit mentioned by you tomorrow.

>
> Without your patch set reboot worked.
>
>
> Thanks,
> --
> Markus Reichl
> --
> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
> in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Regards,
Alim
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-20 Thread Markus Reichl
Am Dienstag, 20. Oktober 2015, 21:22:05 schrieb Alim Akhtar:
> On Tue, Oct 20, 2015 at 9:17 PM, Alim Akhtar  wrote:
> > Hi Markus,
> >
> > On Tue, Oct 20, 2015 at 8:29 PM, Markus Reichl  
> > wrote:
> >> Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
> >>> Now we have a nice way to reboot/poweroff system using a generic
> >>> syscon regmap based drivers, this series moves exynos SoCs to
> >>> make use of the same.
> >>>
> >>> Changes since v1:
> >>> * Added a comment about the register information
> >>> * Droped defconfig changes as disscussed
> >>> * Collected various Reviewed-by, Tested-by and Acked-by tags
> >>> * Added SYSCON-{RESET, POWEROFF} to select from Kconfig
> >>>
> >>> Alim Akhtar (6):
> >>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
> >>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
> >>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
> >>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
> >>>   ARM: exynos: select POWER_RESET_SYSCON and
> >>> POWER_RESET_SYSCON_POWEROFF
> >>>   ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
> >>>
> >>>  arch/arm/boot/dts/exynos3250.dtsi |   14 
> >>>  arch/arm/boot/dts/exynos4.dtsi|   14 
> >>>  arch/arm/boot/dts/exynos5.dtsi|   14 
> >>>  arch/arm/boot/dts/exynos5410.dtsi |   14 
> >>>  arch/arm/mach-exynos/Kconfig  |3 +++
> >>>  arch/arm/mach-exynos/pmu.c|   43 
> >>> -
> >>>  6 files changed, 59 insertions(+), 43 deletions(-)
> >>>
> >>
> >> 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.

> > As far as I can see there in __no__ functional changes that my patch 
> > introduce.
> > So ideally it should have work. My patches are based on the top on
> > vanilla v4.3-rc5.
> > (25cb62b Linux 4.3-rc5), can you check at this commit?

Will try tomorrow.

> >
> > Will check with the commit mentioned by you tomorrow.
> >
> >>
> >> Without your patch set reboot worked.
> >>
> >>
> >> Thanks,
> >> --
> >> Markus Reichl
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe 
> >> linux-samsung-soc" in
> >> the body of a message to majord...@vger.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> >
> >
> > --
> > Regards,
> > Alim
> 
> 
> 
> 
Thanks,
--
Markus
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-20 Thread Alim Akhtar
On Tue, Oct 20, 2015 at 9:17 PM, Alim Akhtar  wrote:
> Hi Markus,
>
> On Tue, Oct 20, 2015 at 8:29 PM, Markus Reichl  wrote:
>> Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
>>> Now we have a nice way to reboot/poweroff system using a generic
>>> syscon regmap based drivers, this series moves exynos SoCs to
>>> make use of the same.
>>>
>>> Changes since v1:
>>> * Added a comment about the register information
>>> * Droped defconfig changes as disscussed
>>> * Collected various Reviewed-by, Tested-by and Acked-by tags
>>> * Added SYSCON-{RESET, POWEROFF} to select from Kconfig
>>>
>>> Alim Akhtar (6):
>>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
>>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
>>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
>>>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
>>>   ARM: exynos: select POWER_RESET_SYSCON and
>>> POWER_RESET_SYSCON_POWEROFF
>>>   ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
>>>
>>>  arch/arm/boot/dts/exynos3250.dtsi |   14 
>>>  arch/arm/boot/dts/exynos4.dtsi|   14 
>>>  arch/arm/boot/dts/exynos5.dtsi|   14 
>>>  arch/arm/boot/dts/exynos5410.dtsi |   14 
>>>  arch/arm/mach-exynos/Kconfig  |3 +++
>>>  arch/arm/mach-exynos/pmu.c|   43 
>>> -
>>>  6 files changed, 59 insertions(+), 43 deletions(-)
>>>
>>
>> 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?
> As far as I can see there in __no__ functional changes that my patch 
> introduce.
> So ideally it should have work. My patches are based on the top on
> vanilla v4.3-rc5.
> (25cb62b Linux 4.3-rc5), can you check at this commit?
>
> Will check with the commit mentioned by you tomorrow.
>
>>
>> Without your patch set reboot worked.
>>
>>
>> Thanks,
>> --
>> Markus Reichl
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" 
>> in
>> the body of a message to majord...@vger.kernel.org
>> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>
>
>
> --
> Regards,
> Alim



-- 
Regards,
Alim
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-20 Thread Markus Reichl
Am 20.10.2015 um 11:24 schrieb Alim Akhtar:
> Now we have a nice way to reboot/poweroff system using a generic
> syscon regmap based drivers, this series moves exynos SoCs to
> make use of the same.
> 
> Changes since v1:
> * Added a comment about the register information
> * Droped defconfig changes as disscussed
> * Collected various Reviewed-by, Tested-by and Acked-by tags
> * Added SYSCON-{RESET, POWEROFF} to select from Kconfig
> 
> Alim Akhtar (6):
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
>   ARM: exynos: select POWER_RESET_SYSCON and
> POWER_RESET_SYSCON_POWEROFF
>   ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
> 
>  arch/arm/boot/dts/exynos3250.dtsi |   14 
>  arch/arm/boot/dts/exynos4.dtsi|   14 
>  arch/arm/boot/dts/exynos5.dtsi|   14 
>  arch/arm/boot/dts/exynos5410.dtsi |   14 
>  arch/arm/mach-exynos/Kconfig  |3 +++
>  arch/arm/mach-exynos/pmu.c|   43 
> -
>  6 files changed, 59 insertions(+), 43 deletions(-)
> 

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.

"halt -p" worked (power 0.0W).
"reboot" got stuck at 0.5W.


Without your patch set reboot worked.  


Thanks,
-- 
Markus Reichl
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH v2 0/6] Switch to generic syscon regmap based drivers

2015-10-20 Thread Krzysztof Kozlowski
On 20.10.2015 18:24, Alim Akhtar wrote:
> Now we have a nice way to reboot/poweroff system using a generic
> syscon regmap based drivers, this series moves exynos SoCs to
> make use of the same.
> 
> Changes since v1:
> * Added a comment about the register information
> * Droped defconfig changes as disscussed
> * Collected various Reviewed-by, Tested-by and Acked-by tags
> * Added SYSCON-{RESET, POWEROFF} to select from Kconfig
> 
> Alim Akhtar (6):
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos3250 SoCs
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos4
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5
>   arm: dts: Add syscon-{reboot, poweroff} nodes for exynos5410 SoC
>   ARM: exynos: select POWER_RESET_SYSCON and
> POWER_RESET_SYSCON_POWEROFF
>   ARM: EXYNOS: Remove code for restart and poweroff for exynos SoCs
> 
>  arch/arm/boot/dts/exynos3250.dtsi |   14 
>  arch/arm/boot/dts/exynos4.dtsi|   14 
>  arch/arm/boot/dts/exynos5.dtsi|   14 
>  arch/arm/boot/dts/exynos5410.dtsi |   14 
>  arch/arm/mach-exynos/Kconfig  |3 +++
>  arch/arm/mach-exynos/pmu.c|   43 
> -
>  6 files changed, 59 insertions(+), 43 deletions(-)
> 

Entire patchset tested on Odroid XU3-Lite and Trats2 boards:

Tested-by: Krzysztof Kozlowski 

Best regards,
Krzysztof

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