From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Juergen Beisert <jbe@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] Add two architectures which can detect the reset source
Date: Wed, 20 Jun 2012 17:09:54 +0200 [thread overview]
Message-ID: <4FE1E7C2.70400@pengutronix.de> (raw)
In-Reply-To: <201206201705.45842.jbe@pengutronix.de>
[-- Attachment #1.1: Type: text/plain, Size: 1370 bytes --]
On 06/20/2012 05:05 PM, Juergen Beisert wrote:
> Marc Kleine-Budde wrote:
>> [...]
>>> +static int s3c_detect_reset_source(void)
>>> +{
>>> + u32 reg = readl(S3C_GPIO_BASE + S3C2440_GSTATUS2);
>>> +
>>> + if (reg & S3C2440_GSTATUS2_PWRST) {
>>> + set_reset_source(RESET_POR);
>>> + writel(S3C2440_GSTATUS2_PWRST,
> ^^^^^
>>> + S3C_GPIO_BASE + S3C2440_GSTATUS2);
>>> + return 0;
>>> + }
>>> +
>>> + if (reg & S3C2440_GSTATUS2_SLEEPRST) {
>>> + set_reset_source(RESET_WKE);
>>> + writel(S3C2440_GSTATUS2_SLEEPRST,
> ^^^^^^^^
>>> + S3C_GPIO_BASE + S3C2440_GSTATUS2);
>>> + return 0;
>>> + }
>>> +
>>> + if (reg & S3C2440_GSTATUS2_WDRST) {
>>> + set_reset_source(RESET_WDG);
>>> + writel(S3C2440_GSTATUS2_WDRST,
> ^^^^^
>>> + S3C_GPIO_BASE + S3C2440_GSTATUS2);
>>> + return 0;
>>> + }
>>
>> That "writel(S3C2440_GSTATUS2_WDRST...)" is the same in each line, isn't
>> it?
>
> Take a closer look. ;)
tnx - you're rifht
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
[-- Attachment #2: Type: text/plain, Size: 149 bytes --]
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
next prev parent reply other threads:[~2012-06-20 15:10 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-20 14:32 [PATCH] Enable a way to provide the reason for "being here" Juergen Beisert
2012-06-20 14:32 ` [PATCH 1/2] " Juergen Beisert
2012-06-20 14:53 ` Marc Kleine-Budde
2012-06-20 15:08 ` Juergen Beisert
2012-06-20 18:50 ` Uwe Kleine-König
2012-06-20 19:09 ` Juergen Beisert
2012-06-20 19:27 ` Uwe Kleine-König
2012-06-20 19:59 ` Juergen Beisert
2012-06-20 20:09 ` Uwe Kleine-König
2012-06-20 20:57 ` Juergen Beisert
2012-06-20 14:32 ` [PATCH 2/2] Add two architectures which can detect the reset source Juergen Beisert
2012-06-20 14:59 ` Marc Kleine-Budde
2012-06-20 15:05 ` Juergen Beisert
2012-06-20 15:09 ` Marc Kleine-Budde [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-06-21 9:16 [PATCHv2] Enable a way to provide the reason for "being here" Juergen Beisert
2012-06-21 9:16 ` [PATCH 2/2] Add two architectures which can detect the reset source Juergen Beisert
2012-06-21 18:27 ` Sascha Hauer
2012-06-21 19:01 ` Juergen Beisert
2012-06-21 19:03 ` Sascha Hauer
2012-06-21 21:50 ` Roberto Nibali
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=4FE1E7C2.70400@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=jbe@pengutronix.de \
/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.