From: Heiko Schocher <hs@denx.de>
To: "Mehaffey, John" <John_Mehaffey@mentor.com>
Cc: "linux-embedded@vger.kernel.org" <linux-embedded@vger.kernel.org>,
Wolfgang Denk <wd@denx.de>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: GPIO triggers kernel reboot
Date: Mon, 27 Jan 2014 07:17:18 +0100 [thread overview]
Message-ID: <52E5F9EE.2020707@denx.de> (raw)
In-Reply-To: <371E240E6FC1D44DA5E51EE9DCDCB7845E5EA0E1@NA-MBX-01.mgc.mentorg.com>
Hello John,
Am 25.01.2014 21:24, schrieb Mehaffey, John:
>> -----Original Message-----
>> From: linux-embedded-owner@vger.kernel.org
>> [mailto:linux-embedded-owner@vger.kernel.org] On Behalf Of Heiko
>> Schocher
>> Sent: Saturday, January 25, 2014 8:03 AM
>> To: linux-embedded@vger.kernel.org
>> Cc: Wolfgang Denk; linux-arm-kernel@lists.infradead.org
>> Subject: GPIO triggers kernel reboot
>>
>> Hello all,
>>
>> is it possible to reboot current mainline kernel triggered from a GPIO in kernel space?
>>
>> If not, how can be done this, so that it has a chance to go into mainline?
>>
>> Thanks for any suggestions
>>
>> bye,
>> Heiko
>
> Hi Heiko,
> Call kexec() from the GPIO driver.
> It will take some effort to get it right :)
Thanks for your answer!
Hmm.. but has this a chance to go into mainline?
> Or if a simple reboot is all that you want, examine the several reboot APIs in kernel/reboot.c
A current implementation from a customer is for an arm, am335x based board
to add in board setup code:
ret = request_irq(OMAP_GPIO_IRQ(RESET_BUTTON_IRQ_GPIO)
, (irq_handler_t)arm_pm_restart, IRQF_TRIGGER_LOW, "reset button", NULL);
and as I want to bring this board to mainline, I think this is not
an acceptable/good way ... or?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
WARNING: multiple messages have this Message-ID (diff)
From: hs@denx.de (Heiko Schocher)
To: linux-arm-kernel@lists.infradead.org
Subject: GPIO triggers kernel reboot
Date: Mon, 27 Jan 2014 07:17:18 +0100 [thread overview]
Message-ID: <52E5F9EE.2020707@denx.de> (raw)
In-Reply-To: <371E240E6FC1D44DA5E51EE9DCDCB7845E5EA0E1@NA-MBX-01.mgc.mentorg.com>
Hello John,
Am 25.01.2014 21:24, schrieb Mehaffey, John:
>> -----Original Message-----
>> From: linux-embedded-owner at vger.kernel.org
>> [mailto:linux-embedded-owner at vger.kernel.org] On Behalf Of Heiko
>> Schocher
>> Sent: Saturday, January 25, 2014 8:03 AM
>> To: linux-embedded at vger.kernel.org
>> Cc: Wolfgang Denk; linux-arm-kernel at lists.infradead.org
>> Subject: GPIO triggers kernel reboot
>>
>> Hello all,
>>
>> is it possible to reboot current mainline kernel triggered from a GPIO in kernel space?
>>
>> If not, how can be done this, so that it has a chance to go into mainline?
>>
>> Thanks for any suggestions
>>
>> bye,
>> Heiko
>
> Hi Heiko,
> Call kexec() from the GPIO driver.
> It will take some effort to get it right :)
Thanks for your answer!
Hmm.. but has this a chance to go into mainline?
> Or if a simple reboot is all that you want, examine the several reboot APIs in kernel/reboot.c
A current implementation from a customer is for an arm, am335x based board
to add in board setup code:
ret = request_irq(OMAP_GPIO_IRQ(RESET_BUTTON_IRQ_GPIO)
, (irq_handler_t)arm_pm_restart, IRQF_TRIGGER_LOW, "reset button", NULL);
and as I want to bring this board to mainline, I think this is not
an acceptable/good way ... or?
bye,
Heiko
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
next prev parent reply other threads:[~2014-01-27 6:17 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-25 16:02 GPIO triggers kernel reboot Heiko Schocher
2014-01-25 16:02 ` Heiko Schocher
2014-01-25 19:11 ` Mehaffey, John
2014-01-25 19:11 ` Mehaffey, John
2014-01-25 20:24 ` Mehaffey, John
2014-01-25 20:24 ` Mehaffey, John
2014-01-27 6:17 ` Heiko Schocher [this message]
2014-01-27 6:17 ` Heiko Schocher
2014-01-26 2:54 ` Florian Fainelli
2014-01-26 2:54 ` Florian Fainelli
[not found] ` <CALLGbRKK_ZcOB6nAiV67njrphXMQXN7Y2s81n5k3PWoSVrsrUw@mail.gmail.com>
2014-01-27 6:22 ` Heiko Schocher
2014-01-27 6:22 ` Heiko Schocher
2014-01-27 8:08 ` Arnaud Patard
2014-01-27 8:08 ` Arnaud Patard (Rtp)
2014-01-27 8:25 ` Geert Uytterhoeven
2014-01-27 8:25 ` Geert Uytterhoeven
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=52E5F9EE.2020707@denx.de \
--to=hs@denx.de \
--cc=John_Mehaffey@mentor.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-embedded@vger.kernel.org \
--cc=wd@denx.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.