Merge tag 'efi-2020-07-rc6' of https://gitlab.denx.de/u-boot/custodians/u-boot-efi
[oweals/u-boot.git] / board / microchip / mpfs_icicle / mpfs_icicle.c
1 // SPDX-License-Identifier: GPL-2.0+
2 /*
3  * Copyright (C) 2019 Microchip Technology Inc.
4  * Padmarao Begari <padmarao.begari@microchip.com>
5  */
6
7 #include <common.h>
8 #include <dm.h>
9 #include <init.h>
10 #include <asm/io.h>
11
12 #define MPFS_SYSREG_SOFT_RESET  ((unsigned int *)0x20002088)
13
14 int board_init(void)
15 {
16         /* For now nothing to do here. */
17
18         return 0;
19 }
20
21 int board_early_init_f(void)
22 {
23         unsigned int val;
24
25         /* Reset uart peripheral */
26         val = readl(MPFS_SYSREG_SOFT_RESET);
27         val = (val & ~(1u << 5u));
28         writel(val, MPFS_SYSREG_SOFT_RESET);
29
30         return 0;
31 }