linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function
Date: Thu, 23 Jan 2014 23:35:29 +0100	[thread overview]
Message-ID: <52E19931.80803@gmail.com> (raw)
In-Reply-To: <3955130.WSqWacB8SI@phil>



On 23.01.2014 20:02, Heiko St?bner wrote:
> Am Donnerstag, 23. Januar 2014, 19:51:34 schrieb Tomasz Figa:
>> On 23.01.2014 19:36, Heiko St?bner wrote:
>>> Am Donnerstag, 23. Januar 2014, 19:12:04 schrieb Tomasz Figa:
>>>> Hi Heiko,
>>>>
>>>> On 06.01.2014 19:40, Heiko St?bner wrote:
>>>>> This converts all boards to use the new common restart function instead
>>>>> of SoC specific ones.
>>>>>
>>>>> The mach-s3c2416-dt board now tries to setup either a swrst- or
>>>>> watchdog-
>>>>> reset so that it will be able to handle more s3c24xx-SoCs later on.
>>>>
>>>> [snip]
>>>>
>>>>> diff --git a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>>>> b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c index 0a86953..88716fa4 100644
>>>>> --- a/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>>>> +++ b/arch/arm/mach-s3c24xx/mach-s3c2416-dt.c
>>>>> @@ -24,6 +24,7 @@
>>>>>
>>>>>     #include <plat/cpu.h>
>>>>>     #include <plat/pm.h>
>>>>>
>>>>> +#include <plat/watchdog-reset.h>
>>>>>
>>>>>     #include "common.h"
>>>>>
>>>>> @@ -34,6 +35,14 @@ static void __init s3c2416_dt_map_io(void)
>>>>>
>>>>>     static void __init s3c2416_dt_machine_init(void)
>>>>>     {
>>>>>
>>>>> +	s3c24xx_swrst_reset_of_init();
>>>>> +
>>>>> +#ifdef CONFIG_SAMSUNG_WDT_RESET
>>>>> +	/* if no special swrst-device exists try to find a watchdog */
>>>>> +	if (!s3c24xx_swrst_reset_available())
>>>>> +		samsung_wdt_reset_of_init();
>>>>> +#endif
>>>>
>>>> Hmm... I think it would be safe to assume availability of soft reset,
>>>> especially if you could move the restart code to the clock driver.
>>>
>>> ok, so something like the following:
>>>
>>> the boards would simply use samsung_watchdog_reset, which should according
>>> to the manuals be available on all architectures. And the ccf-driver on
>>> appropriate architectures would simple replace the arm_pm_restart
>>> callback with its own SoC specific one?
>>>
>>> For the s3c2412 this also means that the clock-logic would get simplified.
>>>
>>>
>>> Like this, or do I overlook something?
>>
>> Hmm, this would mean a dependency on CONFIG_SAMSUNG_WDT_RESET then. Is
>> there a need to fall back to it on platforms which support soft reset
>> (assuming that CCF driver would always install its restart handler on
>> applicable platforms)?
>
> s3c2410, s3c2440 and s3c2442 do not have the swrst facility. They always use
> samsung_wdt_reset.
>
> In general, I want to try establishing some sort of general restart way, as in
> the future one dt-board should hopefully be enough to cover all s3c24xx soc
> variants.

If you make SAMSUNG_WDT_RESET always selected on S3C24XX then I guess 
it's fine.

>
>
>> Note that you can make the restart field NULL in mach_desc in board files.
>
> As I said above, this is mainly meant for the dt-case. The legacy-board files
> are more or less only secondary, and the affected boards can of course then
> have a NULL restart handle :-) .
>
> So for this the dt-board could simply use the wdt-reset, which then gets
> replaced by the ccf-based reset if appropriate.

OK. By the way, are there any benefits of using this software reset over 
watchdog reset? Maybe all S3C24xx could simply use watchdog reset and no 
special handling of those with swrst would be needed.

Best regards,
Tomasz

  reply	other threads:[~2014-01-23 22:35 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-06 18:35 [PATCH 0/5] ARM: S3C24XX: unify restart functions Heiko Stübner
2014-01-06 18:37 ` [PATCH 1/5] dt-bindings: document the s3c24xx software-reset register Heiko Stübner
2014-01-23 18:09   ` Tomasz Figa
2014-01-06 18:38 ` [PATCH 2/5] ARM: S3C24XX: add generic handler for swrst resets Heiko Stübner
2014-01-06 18:39 ` [PATCH 3/5] ARM: S3C24XX: add common reset function Heiko Stübner
2014-01-06 18:40 ` [PATCH 4/5] ARM: S3C24XX: convert boards to use common restart function Heiko Stübner
2014-01-23 18:12   ` Tomasz Figa
2014-01-23 18:36     ` Heiko Stübner
2014-01-23 18:51       ` Tomasz Figa
2014-01-23 19:02         ` Heiko Stübner
2014-01-23 22:35           ` Tomasz Figa [this message]
2014-01-24  8:03             ` Heiko Stübner
2014-01-24 10:08               ` Tomasz Figa
2014-01-06 18:40 ` [PATCH 5/5] ARM: S3C24XX: remove obsolete SoC-specific restart functions Heiko Stübner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52E19931.80803@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).