All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Cartwright <joshc@codeaurora.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Pramod Gurav <pramod.gurav@smartplayin.com>,
	linux-arm-msm@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org,
	Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] pinctrl: qcom: use restart_notifier mechanism for ps_hold
Date: Fri, 19 Sep 2014 10:09:14 -0500	[thread overview]
Message-ID: <20140919150914.GG3749@joshc.qualcomm.com> (raw)
In-Reply-To: <541B9ADA.2070107@roeck-us.net>

On Thu, Sep 18, 2014 at 07:54:18PM -0700, Guenter Roeck wrote:
> On 09/18/2014 03:32 PM, Josh Cartwright wrote:
> >By converting to the restart_notifier mechanism for restart, we allow
> >for other mechanisms, like the watchdog, to be used for restart in the
> >case where PS_HOLD has failed to reset the chip.
> >
> >Choose priority 128, as according to documentation, this mechanism "is
> >sufficient to restart the entire system".
> >
> >Cc: Pramod Gurav <pramod.gurav@smartplayin.com>
> >Cc: Guenter Roeck <linux@roeck-us.net>
> >Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> >---
[..]
> >
> >-#ifdef CONFIG_ARM
> 
> Unrelated to this patch, but is this going to be executed (and potentially used)
> on any non-arm architectures ?

No.  Not for now.  The only other conceivable platform that could make
use of this would be hexagon, but I think there would be other hurdles
to getting this driver working before even tackling the restart handler.

[..]
> >+static int msm_ps_hold_restart(struct notifier_block *nb, unsigned long action,
> >+			       void *data)
> >  {
> >-	writel(0, msm_ps_hold);
> >+	struct msm_pinctrl *pctrl = container_of(nb, struct msm_pinctrl, restart_nb);
> >+
> >+	writel(0, pctrl->regs + PS_HOLD_OFFSET);
> >  	mdelay(10000);
> 
> Sure you still want to wait for 10 seconds here ?
> Would it make sense to choose a more reasonable timeout ?

Yeah, 10s is a bit extreme.  I don't quite know what a reasonable
timeout is, so I'll do some rough measurements, and shorten it down in
v2.

Thanks again,
  Josh

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

WARNING: multiple messages have this Message-ID (diff)
From: joshc@codeaurora.org (Josh Cartwright)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] pinctrl: qcom: use restart_notifier mechanism for ps_hold
Date: Fri, 19 Sep 2014 10:09:14 -0500	[thread overview]
Message-ID: <20140919150914.GG3749@joshc.qualcomm.com> (raw)
In-Reply-To: <541B9ADA.2070107@roeck-us.net>

On Thu, Sep 18, 2014 at 07:54:18PM -0700, Guenter Roeck wrote:
> On 09/18/2014 03:32 PM, Josh Cartwright wrote:
> >By converting to the restart_notifier mechanism for restart, we allow
> >for other mechanisms, like the watchdog, to be used for restart in the
> >case where PS_HOLD has failed to reset the chip.
> >
> >Choose priority 128, as according to documentation, this mechanism "is
> >sufficient to restart the entire system".
> >
> >Cc: Pramod Gurav <pramod.gurav@smartplayin.com>
> >Cc: Guenter Roeck <linux@roeck-us.net>
> >Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> >---
[..]
> >
> >-#ifdef CONFIG_ARM
> 
> Unrelated to this patch, but is this going to be executed (and potentially used)
> on any non-arm architectures ?

No.  Not for now.  The only other conceivable platform that could make
use of this would be hexagon, but I think there would be other hurdles
to getting this driver working before even tackling the restart handler.

[..]
> >+static int msm_ps_hold_restart(struct notifier_block *nb, unsigned long action,
> >+			       void *data)
> >  {
> >-	writel(0, msm_ps_hold);
> >+	struct msm_pinctrl *pctrl = container_of(nb, struct msm_pinctrl, restart_nb);
> >+
> >+	writel(0, pctrl->regs + PS_HOLD_OFFSET);
> >  	mdelay(10000);
> 
> Sure you still want to wait for 10 seconds here ?
> Would it make sense to choose a more reasonable timeout ?

Yeah, 10s is a bit extreme.  I don't quite know what a reasonable
timeout is, so I'll do some rough measurements, and shorten it down in
v2.

Thanks again,
  Josh

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

WARNING: multiple messages have this Message-ID (diff)
From: Josh Cartwright <joshc@codeaurora.org>
To: Guenter Roeck <linux@roeck-us.net>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>,
	Linus Walleij <linus.walleij@linaro.org>,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	Pramod Gurav <pramod.gurav@smartplayin.com>
Subject: Re: [PATCH] pinctrl: qcom: use restart_notifier mechanism for ps_hold
Date: Fri, 19 Sep 2014 10:09:14 -0500	[thread overview]
Message-ID: <20140919150914.GG3749@joshc.qualcomm.com> (raw)
In-Reply-To: <541B9ADA.2070107@roeck-us.net>

On Thu, Sep 18, 2014 at 07:54:18PM -0700, Guenter Roeck wrote:
> On 09/18/2014 03:32 PM, Josh Cartwright wrote:
> >By converting to the restart_notifier mechanism for restart, we allow
> >for other mechanisms, like the watchdog, to be used for restart in the
> >case where PS_HOLD has failed to reset the chip.
> >
> >Choose priority 128, as according to documentation, this mechanism "is
> >sufficient to restart the entire system".
> >
> >Cc: Pramod Gurav <pramod.gurav@smartplayin.com>
> >Cc: Guenter Roeck <linux@roeck-us.net>
> >Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
> >---
[..]
> >
> >-#ifdef CONFIG_ARM
> 
> Unrelated to this patch, but is this going to be executed (and potentially used)
> on any non-arm architectures ?

No.  Not for now.  The only other conceivable platform that could make
use of this would be hexagon, but I think there would be other hurdles
to getting this driver working before even tackling the restart handler.

[..]
> >+static int msm_ps_hold_restart(struct notifier_block *nb, unsigned long action,
> >+			       void *data)
> >  {
> >-	writel(0, msm_ps_hold);
> >+	struct msm_pinctrl *pctrl = container_of(nb, struct msm_pinctrl, restart_nb);
> >+
> >+	writel(0, pctrl->regs + PS_HOLD_OFFSET);
> >  	mdelay(10000);
> 
> Sure you still want to wait for 10 seconds here ?
> Would it make sense to choose a more reasonable timeout ?

Yeah, 10s is a bit extreme.  I don't quite know what a reasonable
timeout is, so I'll do some rough measurements, and shorten it down in
v2.

Thanks again,
  Josh

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by The Linux Foundation

  parent reply	other threads:[~2014-09-19 15:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-18 22:32 [PATCH] pinctrl: qcom: use restart_notifier mechanism for ps_hold Josh Cartwright
2014-09-18 22:32 ` Josh Cartwright
2014-09-18 22:47 ` Kumar Gala
2014-09-18 22:47   ` Kumar Gala
2014-09-18 22:49   ` Josh Cartwright
2014-09-18 22:49     ` Josh Cartwright
2014-09-18 23:02     ` Kumar Gala
2014-09-18 23:02       ` Kumar Gala
2014-09-19  2:54 ` Guenter Roeck
2014-09-19  2:54   ` Guenter Roeck
2014-09-19  3:34   ` Guenter Roeck
2014-09-19  3:34     ` Guenter Roeck
2014-09-19 15:19     ` Josh Cartwright
2014-09-19 15:19       ` Josh Cartwright
2014-09-19 15:09   ` Josh Cartwright [this message]
2014-09-19 15:09     ` Josh Cartwright
2014-09-19 15:09     ` Josh Cartwright
2014-09-19 12:28 ` Pramod Gurav
2014-09-19 12:28   ` Pramod Gurav

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=20140919150914.GG3749@joshc.qualcomm.com \
    --to=joshc@codeaurora.org \
    --cc=bjorn.andersson@sonymobile.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@roeck-us.net \
    --cc=pramod.gurav@smartplayin.com \
    /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.