blob: 9e73c57b8789466ec1802b2444ea3f35d36ede94 [file] [log] [blame]
Peter Meerwald06399322010-09-20 14:08:57 -04001/*
2 * cled.c - control color led
3 *
4 * Copyright (c) 2010 BCT Electronic GmbH
5 *
6 * Licensed under the GPL-2 or later.
7 */
8
9#include <common.h>
10#include <command.h>
11#include <asm/blackfin.h>
12#include <asm/io.h>
13
14int do_cled(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
15{
16 ulong addr = 0x20000000 + 0x200000; // AMS2
17 uchar data;
18
19 if (argc < 2)
20 return cmd_usage(cmdtp);
21
22 data = simple_strtoul(argv[1], NULL, 10);
23 outb(data, addr);
24
25 printf("cled, write %02x\n", data);
26
27 return 0;
28}
29
30U_BOOT_CMD(cled, 2, 0, do_cled,
31 "set/clear color LED",
32 "");