linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sata_mv: enable active LED blink mode for SoC
@ 2008-09-07 11:19 Saeed Bishara
  2008-09-07 11:31 ` saeed bishara
  2008-09-08  0:32 ` Frans Pop
  0 siblings, 2 replies; 10+ messages in thread
From: Saeed Bishara @ 2008-09-07 11:19 UTC (permalink / raw)
  To: linux-ide, linux-arm, jeff
  Cc: liml, grundler, elendil, buytenh, nico, tbm, Saeed Bishara

Enabling blink mode makes the SATA active LED more human visible.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
---
 drivers/ata/sata_mv.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 13c1d2a..302e1f8 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -208,6 +208,10 @@ enum {
 	DMA_IRQ			= (1 << 0),	/* shift by port # */
 	HC_COAL_IRQ		= (1 << 4),	/* IRQ coalescing */
 	DEV_IRQ			= (1 << 8),	/* shift by port # */
+	SOC_LED_CTRL_OFS	= 0x2c,
+	SOC_LED_CTRL_BLINK	= (1 << 0),	/* Active LED blink */
+	SOC_LED_CTRL_ACT_PRESENCE = (1 << 2),	/* Multiplex presence with */
+						/* the active LED */
 
 	/* Shadow block registers */
 	SHD_BLK_OFS		= 0x100,
@@ -2616,7 +2620,11 @@ static void mv6_phy_errata(struct mv_host_priv *hpriv, void __iomem *mmio,
 static void mv_soc_enable_leds(struct mv_host_priv *hpriv,
 				      void __iomem *mmio)
 {
-	return;
+	void __iomem *hc_mmio = mv_hc_base(mmio, 0);
+	u32 tmp = readl(hc_mmio + SOC_LED_CTRL_OFS);
+
+	/* enable blinking mode */
+	writel(tmp | SOC_LED_CTRL_BLINK, hc_mmio + SOC_LED_CTRL_OFS);
 }
 
 static void mv_soc_read_preamp(struct mv_host_priv *hpriv, int idx,
-- 
1.5.2.5


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2008-09-08 18:47 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-07 11:19 [PATCH] sata_mv: enable active LED blink mode for SoC Saeed Bishara
2008-09-07 11:31 ` saeed bishara
2008-09-08  0:32 ` Frans Pop
2008-09-08 13:40   ` Mark Lord
2008-09-08 14:16     ` Frans Pop
2008-09-08 14:25       ` Frans Pop
2008-09-08 15:18         ` Simon Farnsworth
2008-09-08 15:37           ` Saeed Bishara
2008-09-08 18:44           ` Mark Lord
2008-09-08 18:47         ` Mark Lord

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).