X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=qemu%2Froms%2Fu-boot%2Fboard%2Fronetix%2Fpm9261%2Fled.c;fp=qemu%2Froms%2Fu-boot%2Fboard%2Fronetix%2Fpm9261%2Fled.c;h=cc4c2a072bb06298e0b8a46115b1a8e437f6b4b0;hb=e44e3482bdb4d0ebde2d8b41830ac2cdb07948fb;hp=0000000000000000000000000000000000000000;hpb=9ca8dbcc65cfc63d6f5ef3312a33184e1d726e00;p=kvmfornfv.git diff --git a/qemu/roms/u-boot/board/ronetix/pm9261/led.c b/qemu/roms/u-boot/board/ronetix/pm9261/led.c new file mode 100644 index 000000000..cc4c2a072 --- /dev/null +++ b/qemu/roms/u-boot/board/ronetix/pm9261/led.c @@ -0,0 +1,29 @@ +/* + * (C) Copyright 2007-2008 + * Stelian Pop + * Lead Tech Design + * Ilko Iliev + * + * SPDX-License-Identifier: GPL-2.0+ + */ + +#include +#include +#include +#include + +void coloured_LED_init(void) +{ + struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC; + + /* Enable clock */ + writel(1 << ATMEL_ID_PIOC, &pmc->pcer); + + gpio_direction_output(CONFIG_RED_LED, 1); + gpio_direction_output(CONFIG_GREEN_LED, 1); + gpio_direction_output(CONFIG_YELLOW_LED, 1); + + gpio_set_value(CONFIG_RED_LED, 0); + gpio_set_value(CONFIG_GREEN_LED, 1); + gpio_set_value(CONFIG_YELLOW_LED, 1); +}