blob: 3ae7f6afbdb8e71a5b634dd8af697179a7ccbde8 [file] [log] [blame]
Álvaro Fernández Rojas9d466f22018-02-03 10:30:28 +01001/*
2 * Copyright (C) 2018 Álvaro Fernández Rojas <noltari@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0+
5 */
6
7#include <common.h>
8#include <asm/io.h>
9
10#define GPIO_BASE_6362 0x10000080
11
12#define GPIO_MODE_6362_REG 0x18
13#define GPIO_MODE_6362_SERIAL_LED_DATA BIT(2)
14#define GPIO_MODE_6362_SERIAL_LED_CLK BIT(3)
15
16#ifdef CONFIG_BOARD_EARLY_INIT_F
17int board_early_init_f(void)
18{
19 void __iomem *gpio_regs = map_physmem(GPIO_BASE_6362, 0, MAP_NOCACHE);
20
21 /* Enable Serial LEDs */
22 setbits_be32(gpio_regs + GPIO_MODE_6362_REG,
23 GPIO_MODE_6362_SERIAL_LED_DATA |
24 GPIO_MODE_6362_SERIAL_LED_CLK);
25
26 return 0;
27}
28#endif