public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Simon Baatz <gmbnomis@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/2] kirkwood: ib62x0: Invert SATA activity LEDs
Date: Fri, 20 Jul 2012 21:59:14 +0200	[thread overview]
Message-ID: <1342814355-25472-1-git-send-email-gmbnomis@gmail.com> (raw)

The hardware design of the IB-NAS62x0 causes the SATA activity
LEDs to be on when idle by default.  Reverse the polarity of the
activity LEDs in early init.

Signed-off-by: Simon Baatz <gmbnomis@gmail.com>
Cc: Luka Perkov <uboot@lukaperkov.net>
Cc: Prafulla Wadaskar <prafulla@marvell.com>
---
 board/raidsonic/ib62x0/ib62x0.c |    3 +++
 board/raidsonic/ib62x0/ib62x0.h |    4 ++++
 2 files changed, 7 insertions(+)

diff --git a/board/raidsonic/ib62x0/ib62x0.c b/board/raidsonic/ib62x0/ib62x0.c
index 1164d6b..b7e6e41 100644
--- a/board/raidsonic/ib62x0/ib62x0.c
+++ b/board/raidsonic/ib62x0/ib62x0.c
@@ -23,6 +23,7 @@
 
 #include <common.h>
 #include <miiphy.h>
+#include <asm/io.h>
 #include <asm/arch/cpu.h>
 #include <asm/arch/kirkwood.h>
 #include <asm/arch/mpp.h>
@@ -41,6 +42,8 @@ int board_early_init_f(void)
 			IB62x0_OE_VAL_HIGH,
 			IB62x0_OE_LOW, IB62x0_OE_HIGH);
 
+	/* Set SATA activity LEDs to default off */
+	writel(MVSATAHC_LED_POLARITY_CTRL, MVSATAHC_LED_CONF_REG);
 	/* Multi-Purpose Pins Functionality configuration */
 	u32 kwmpp_config[] = {
 		MPP0_NF_IO2,
diff --git a/board/raidsonic/ib62x0/ib62x0.h b/board/raidsonic/ib62x0/ib62x0.h
index 0c30690..0118c2b 100644
--- a/board/raidsonic/ib62x0/ib62x0.h
+++ b/board/raidsonic/ib62x0/ib62x0.h
@@ -37,4 +37,8 @@
 #define MV88E1116_RGMII_TXTM_CTRL	(1 << 4)
 #define MV88E1116_RGMII_RXTM_CTRL	(1 << 5)
 
+/* SATAHC related */
+#define MVSATAHC_LED_CONF_REG       (MV_SATA_BASE + 0x2C)
+#define MVSATAHC_LED_POLARITY_CTRL  (1 << 3)
+
 #endif /* __IB62x0_H */
-- 
1.7.9.5

             reply	other threads:[~2012-07-20 19:59 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-20 19:59 Simon Baatz [this message]
2012-07-20 19:59 ` [U-Boot] [PATCH 2/2] kirkwood: ib62x0: Support flattened devicetree Simon Baatz
2012-07-21  8:03   ` Luka Perkov
2012-07-21  8:30     ` DrEagle
2012-07-21  9:40       ` Simon Baatz
2012-07-21 12:54         ` Luka Perkov
2012-07-21  8:00 ` [U-Boot] [PATCH 1/2] kirkwood: ib62x0: Invert SATA activity LEDs Luka Perkov

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=1342814355-25472-1-git-send-email-gmbnomis@gmail.com \
    --to=gmbnomis@gmail.com \
    --cc=u-boot@lists.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox