SPDX: Convert all of our single license tags to Linux Kernel style
[oweals/u-boot.git] / board / netgear / dgnd3700v2 / dgnd3700v2.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2018 Ã\81lvaro Fernández Rojas <noltari@gmail.com>
4  */
5
6 #include <common.h>
7 #include <asm/io.h>
8
9 #define GPIO_BASE_6362                  0x10000080
10
11 #define GPIO_MODE_6362_REG              0x18
12 #define GPIO_MODE_6362_SERIAL_LED_DATA  BIT(2)
13 #define GPIO_MODE_6362_SERIAL_LED_CLK   BIT(3)
14
15 #ifdef CONFIG_BOARD_EARLY_INIT_F
16 int board_early_init_f(void)
17 {
18         void __iomem *gpio_regs = map_physmem(GPIO_BASE_6362, 0, MAP_NOCACHE);
19
20         /* Enable Serial LEDs */
21         setbits_be32(gpio_regs + GPIO_MODE_6362_REG,
22                      GPIO_MODE_6362_SERIAL_LED_DATA |
23                      GPIO_MODE_6362_SERIAL_LED_CLK);
24
25         return 0;
26 }
27 #endif