All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Heiko Stübner" <heiko@sntech.de>
To: Kukjin Kim <kgene.kim@samsung.com>
Cc: linux-arm-kernel@lists.infradead.org,
	linux-samsung-soc@vger.kernel.org,
	'Ben Dooks' <ben-linux@fluff.org>,
	rmk+kernel@arm.linux.org.uk
Subject: Re: [PATCH] ARM: restart: move SWRST based S3C platforms to machine_desc hook
Date: Mon, 19 Dec 2011 13:58:25 +0100	[thread overview]
Message-ID: <201112191358.26307.heiko@sntech.de> (raw)
In-Reply-To: <03de01ccbe4b$a8a5bb00$f9f13100$%kim@samsung.com>

Am Montag, 19. Dezember 2011, 13:42:24 schrieb Kukjin Kim:
> Heiko Stübner wrote:
> > S3C2412/S3C2416/S3C2443 use a special register to signal the reset to
> > the processor and used therefore the s3c24xx_reset_hook mechanism in the
> > s3c24xx-specific arch reset.
> > 
> > This patch introduces restart functions for these architectures,
> > moves the board files to them and removes the s3c24xx_reset_hook
> > infrastructure, as all users are gone.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> > @Kgene: This is my first cleanup step, done before your s3c64xx mail
> > arrived,
> > which transforms the 2412,2416 and 2443 arches which use the special
> > SWRST register to do the reset. Just if it helps :-)
> 
> Heiko, thanks.
> 
> I'm looking at S5P SoCs now and of course this helps. And if possible, let
> me do it with this.
>
> As a note, we need to implement local header file before using new restart
> hook and I'm thinking which one is better to us between all s3c24xx SoCs'
> common or each mach-s3c24xx's one.
For the three arches in the patch I put the function declaration into
s3c2412.h/s3c2416.h/s3c2443.h . They all use a SWRST register, but its
position and the value needed to be written to it differs for each SoC, so
they need to be separate like in the patch.
So these three arches do not seem to need a new header and seem to be ok
with this patch.


The other two S3C24xx-arches (s3c2410 and s3c2440) all use arch_wdt_reset
to do the reset, so I thought about declaring a 

void s3c24xx_default_restart(char mode, const char *cmd)
{
	if (mode == 's') {
		soft_restart(0);
	}

	arch_wdt_reset();

	/* we'll take a jump through zero as a poor second */
	soft_restart(0);
}

for these.

I thought about putting it into plat-s3c24xx/cpu.c and its extern
declaration into plat-samsung/include/plat/cpu.h, but I'm not really sure
if this would be the correct location.


Heiko

WARNING: multiple messages have this Message-ID (diff)
From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: restart: move SWRST based S3C platforms to machine_desc hook
Date: Mon, 19 Dec 2011 13:58:25 +0100	[thread overview]
Message-ID: <201112191358.26307.heiko@sntech.de> (raw)
In-Reply-To: <03de01ccbe4b$a8a5bb00$f9f13100$%kim@samsung.com>

Am Montag, 19. Dezember 2011, 13:42:24 schrieb Kukjin Kim:
> Heiko St?bner wrote:
> > S3C2412/S3C2416/S3C2443 use a special register to signal the reset to
> > the processor and used therefore the s3c24xx_reset_hook mechanism in the
> > s3c24xx-specific arch reset.
> > 
> > This patch introduces restart functions for these architectures,
> > moves the board files to them and removes the s3c24xx_reset_hook
> > infrastructure, as all users are gone.
> > 
> > Signed-off-by: Heiko Stuebner <heiko@sntech.de>
> > ---
> > @Kgene: This is my first cleanup step, done before your s3c64xx mail
> > arrived,
> > which transforms the 2412,2416 and 2443 arches which use the special
> > SWRST register to do the reset. Just if it helps :-)
> 
> Heiko, thanks.
> 
> I'm looking at S5P SoCs now and of course this helps. And if possible, let
> me do it with this.
>
> As a note, we need to implement local header file before using new restart
> hook and I'm thinking which one is better to us between all s3c24xx SoCs'
> common or each mach-s3c24xx's one.
For the three arches in the patch I put the function declaration into
s3c2412.h/s3c2416.h/s3c2443.h . They all use a SWRST register, but its
position and the value needed to be written to it differs for each SoC, so
they need to be separate like in the patch.
So these three arches do not seem to need a new header and seem to be ok
with this patch.


The other two S3C24xx-arches (s3c2410 and s3c2440) all use arch_wdt_reset
to do the reset, so I thought about declaring a 

void s3c24xx_default_restart(char mode, const char *cmd)
{
	if (mode == 's') {
		soft_restart(0);
	}

	arch_wdt_reset();

	/* we'll take a jump through zero as a poor second */
	soft_restart(0);
}

for these.

I thought about putting it into plat-s3c24xx/cpu.c and its extern
declaration into plat-samsung/include/plat/cpu.h, but I'm not really sure
if this would be the correct location.


Heiko

  reply	other threads:[~2011-12-19 12:58 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-19 11:58 [PATCH] ARM: restart: S3C64XX: use new restart hook Kukjin Kim
2011-12-19 11:58 ` Kukjin Kim
2011-12-19 12:12 ` Heiko Stübner
2011-12-19 12:12   ` Heiko Stübner
2011-12-19 12:20   ` Kukjin Kim
2011-12-19 12:20     ` Kukjin Kim
2011-12-19 12:25     ` [PATCH] ARM: restart: move SWRST based S3C platforms to machine_desc hook Heiko Stübner
2011-12-19 12:25       ` Heiko Stübner
2011-12-19 12:42       ` Kukjin Kim
2011-12-19 12:42         ` Kukjin Kim
2011-12-19 12:58         ` Heiko Stübner [this message]
2011-12-19 12:58           ` Heiko Stübner
2011-12-19 13:55 ` [PATCH] ARM: restart: S3C64XX: use new restart hook Russell King - ARM Linux
2011-12-19 13:55   ` Russell King - ARM Linux
2011-12-19 14:37   ` Kukjin Kim
2011-12-19 14:37     ` Kukjin Kim

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=201112191358.26307.heiko@sntech.de \
    --to=heiko@sntech.de \
    --cc=ben-linux@fluff.org \
    --cc=kgene.kim@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.