blob: 41fc6d56a7dbc0788ccc13bae0fdb8389118623f [file] [log] [blame]
Gregory CLEMENTdc253e22018-12-14 16:16:50 +01001// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Microsemi Corporation
4 */
5
6#include <common.h>
7#include <asm/io.h>
8
9#define MSCC_GPIO_ALT0 0x88
10#define MSCC_GPIO_ALT1 0x8C
11
12DECLARE_GLOBAL_DATA_PTR;
13
14void board_debug_uart_init(void)
15{
16 /* too early for the pinctrl driver, so configure the UART pins here */
17 setbits_le32(BASE_DEVCPU_GCB + MSCC_GPIO_ALT0, BIT(30) | BIT(31));
18}
19
20int board_early_init_r(void)
21{
22 /* Prepare SPI controller to be used in master mode */
23 writel(0, BASE_CFG + ICPU_SW_MODE);
24
25 /* Address of boot parameters */
26 gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE;
27 return 0;
28}