Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame^] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Álvaro Fernández Rojas | 5317fb9 | 2018-02-03 10:30:28 +0100 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2018 Ãlvaro Fernández Rojas <noltari@gmail.com> |
Álvaro Fernández Rojas | 5317fb9 | 2018-02-03 10:30:28 +0100 | [diff] [blame] | 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 |