public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 5/5] DockStar: LED support
Date: Wed, 08 Sep 2010 14:24:47 +0400	[thread overview]
Message-ID: <4C87646F.4020008@mvista.com> (raw)
In-Reply-To: <1283869696-10077-6-git-send-email-ecc@cmu.edu>

Hello.

On 07-09-2010 18:28, Eric Cooper wrote:

> derived from patches posted by Jeff Doozan
> in the uBoot forum at http://forum.doozan.com

> Signed-off-by: Eric Cooper<ecc@cmu.edu>
[...]
> diff --git a/board/Marvell/dockstar/dockstar.c b/board/Marvell/dockstar/dockstar.c
> index 13cd347..7788837 100644
> --- a/board/Marvell/dockstar/dockstar.c
> +++ b/board/Marvell/dockstar/dockstar.c
> @@ -153,3 +153,33 @@ void reset_phy(void)
>   	printf("88E1116 Initialized on %s\n", name);
>   }
>   #endif /* CONFIG_RESET_PHY_R */
> +
> +#define GREEN_LED	(1<<  14)
> +#define ORANGE_LED	(1<<  15)
> +#define BOTH_LEDS	(GREEN_LED | ORANGE_LED)
> +#define NEITHER_LED	0
> +
> +static void set_leds(u32 leds, u32 blinking)
> +{
> +	struct kwgpio_registers *r = (struct kwgpio_registers *)KW_GPIO1_BASE;
> +	u32 oe = readl(&r->oe) | BOTH_LEDS;
> +	writel(oe&  ~leds,&r->oe);	/* active low */
> +	u32 bl = readl(&r->blink_en)&  ~BOTH_LEDS;
> +	writel(bl | blinking,&r->blink_en);
> +}
> +
> +void show_boot_progress(int val)
> +{
> +	switch (val) {
> +	    case 15:	/* booting Linux */

    *case* should be aligned with *switch*. Don't align using spaces.

> +		set_leds(BOTH_LEDS, NEITHER_LED);
> +		break;
> +	    case 64:	/* Ethernet initialization */
> +		set_leds(GREEN_LED, GREEN_LED);
> +		break;
> +	    default:
> +		if (val < 0)	/* error */
> +			set_leds(ORANGE_LED, ORANGE_LED);
> +		break;
> +	}
> +}

WBR, Sergei

  parent reply	other threads:[~2010-09-08 10:24 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-07 14:28 [U-Boot] [PATCH 0/5] Add support for Seagate FreeAgent DockStar Eric Cooper
2010-09-07 14:28 ` [U-Boot] [PATCH 1/5] add DOCKSTAR machine type Eric Cooper
2010-09-07 15:07   ` Wolfgang Denk
2010-09-07 14:28 ` [U-Boot] [PATCH 2/5] DockStar: board support (derived from sheevaplug) Eric Cooper
2010-09-07 15:11   ` Wolfgang Denk
     [not found]     ` <20100908010601.GG8903@localhost>
2010-09-08 10:19       ` Wolfgang Denk
2010-09-07 14:28 ` [U-Boot] [PATCH 3/5] DockStar: change RAM definitions to one bank (128 MB) Eric Cooper
2010-09-07 15:12   ` Wolfgang Denk
2010-09-07 14:28 ` [U-Boot] [PATCH 4/5] DockStar: config Eric Cooper
2010-09-07 15:52   ` Wolfgang Denk
2010-09-07 14:28 ` [U-Boot] [PATCH 5/5] DockStar: LED support Eric Cooper
2010-09-07 15:53   ` Wolfgang Denk
2010-09-08 10:24   ` Sergei Shtylyov [this message]
2010-09-27  9:07 ` [U-Boot] [PATCH 0/5] Add support for Seagate FreeAgent DockStar Thomas Weber
2010-09-27  9:36   ` [U-Boot] How to debug u-boot with GDB & BDI3000 sywang
2010-09-27 10:08     ` Wolfgang Denk
2010-09-28  4:20       ` sywang
2010-09-27 11:03   ` [U-Boot] [PATCH 0/5] Add support for Seagate FreeAgent DockStar Eric Cooper
2010-10-20 14:54   ` [U-Boot] [PATCH v2] Seagate FreeAgent DockStar support Eric Cooper
2010-10-21  4:52     ` Prafulla Wadaskar
2010-10-21 15:01       ` Eric Cooper
2010-10-21 15:07         ` Wolfgang Denk
2010-10-21  6:17     ` Wolfgang Denk
2010-10-21  6:26       ` Prafulla Wadaskar
2010-10-21  6:35         ` Wolfgang Denk
2010-10-21  6:38         ` [U-Boot] [RFC] [PATCH] kirkwood: get rid of config.mk files Wolfgang Denk
2010-10-21  7:43           ` Prafulla Wadaskar
2010-10-21  8:21             ` Wolfgang Denk
2010-10-21  8:37               ` Prafulla Wadaskar
2010-10-21  9:34                 ` Wolfgang Denk

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=4C87646F.4020008@mvista.com \
    --to=sshtylyov@mvista.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