xref: /openbmc/u-boot/board/mscc/luton/luton.c (revision e7ab6dfc)
1 // 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 
12 DECLARE_GLOBAL_DATA_PTR;
13 
14 void 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 
20 int 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 }
29