From: Magnus Damm <magnus.damm@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] sh: LED9, LED10 and LED11 support for Solution Engine 7724
Date: Thu, 06 Aug 2009 15:03:43 +0000 [thread overview]
Message-ID: <20090806150343.4770.1714.sendpatchset@rx1.opensource.se> (raw)
From: Magnus Damm <damm@igel.co.jp>
This patch adds support for LED9, LED10 and LED11 on
the Solution Engine 7724 board. If CONFIG_PM is enabled
then these LEDs are used to show the hardware sleep
mode used by the processor. Useful to debug cpuidle.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
arch/sh/boards/mach-se/7724/setup.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
--- 0001/arch/sh/boards/mach-se/7724/setup.c
+++ work/arch/sh/boards/mach-se/7724/setup.c 2009-08-05 15:22:48.000000000 +0900
@@ -429,6 +429,32 @@ static int __init devices_setup(void)
/* turn on USB clocks, use external clock */
ctrl_outw((ctrl_inw(PORT_MSELCRB) & ~0xc000) | 0x8000, PORT_MSELCRB);
+#ifdef CONFIG_PM
+ /* Let LED9 show STATUS2 */
+ gpio_request(GPIO_FN_STATUS2, NULL);
+
+ /* Lit LED10 show STATUS0 */
+ gpio_request(GPIO_FN_STATUS0, NULL);
+
+ /* Lit LED11 show PDSTATUS */
+ gpio_request(GPIO_FN_PDSTATUS, NULL);
+#else
+ /* Lit LED9 */
+ gpio_request(GPIO_PTJ6, NULL);
+ gpio_direction_output(GPIO_PTJ6, 1);
+ gpio_export(GPIO_PTJ6, 0);
+
+ /* Lit LED10 */
+ gpio_request(GPIO_PTJ5, NULL);
+ gpio_direction_output(GPIO_PTJ5, 1);
+ gpio_export(GPIO_PTJ5, 0);
+
+ /* Lit LED11 */
+ gpio_request(GPIO_PTJ7, NULL);
+ gpio_direction_output(GPIO_PTJ7, 1);
+ gpio_export(GPIO_PTJ7, 0);
+#endif
+
/* enable USB0 port */
ctrl_outw(0x0600, 0xa40501d4);
next prev reply other threads:[~2009-08-06 15:03 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 15:16 [PATCH] sh: clean up Migo-R header file Magnus Damm
2009-08-06 15:12 ` [PATCH] sh: fix romImage mach dir usage Magnus Damm
2009-08-06 15:03 ` Magnus Damm [this message]
2009-08-06 14:58 ` [PATCH] sh: kfr2r09 board support - NAND flash Magnus Damm
2009-08-06 14:51 ` [PATCH] sh: kfr2r09 board support - LCDC panel Magnus Damm
2009-08-06 14:34 ` [PATCH] sh: 18-bit SYS panel fix for SuperH Mobile LCDC Magnus Damm
2009-08-06 14:28 ` [PATCH] sh: LCDC SYS bus access wait fix Magnus Damm
2009-08-13 3:03 ` Paul Mundt
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=20090806150343.4770.1714.sendpatchset@rx1.opensource.se \
--to=magnus.damm@gmail.com \
--cc=linux-sh@vger.kernel.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