diff options
author | Tom Rini <trini@konsulko.com> | 2019-01-23 17:24:31 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-01-23 17:24:31 -0500 |
commit | aff66f22d6eeb27c6329c0a3c1ebc52914c8affa (patch) | |
tree | 1c98306ac2c12c2654bf37e65f19de77faaab28f /board/mscc/servalt/servalt.c | |
parent | 7794fe2c8c1303d303dbc515955c6c5be706da88 (diff) | |
parent | a834cb817fb1a11607ea8e6394235843be079fdd (diff) |
Merge tag 'mips-pull-2019-01-23' of git://git.denx.de/u-boot-mips
- MIPS: mscc: ocelot: add ethernet switch and network support
- MIPS: mscc: add support for ServalT SoC family
- MIPS: mscc: add support for Serval SoC family
Diffstat (limited to 'board/mscc/servalt/servalt.c')
-rw-r--r-- | board/mscc/servalt/servalt.c | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/board/mscc/servalt/servalt.c b/board/mscc/servalt/servalt.c new file mode 100644 index 0000000000..566f9765c2 --- /dev/null +++ b/board/mscc/servalt/servalt.c @@ -0,0 +1,52 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright (c) 2018 Microsemi Corporation + */ + +#include <common.h> +#include <asm/io.h> +#include <led.h> + +enum { + BOARD_TYPE_PCB116 = 0xAABBCE00, +}; + +int board_early_init_r(void) +{ + /* Prepare SPI controller to be used in master mode */ + writel(0, BASE_CFG + ICPU_SW_MODE); + + /* Address of boot parameters */ + gd->bd->bi_boot_params = CONFIG_SYS_SDRAM_BASE; + + /* LED setup */ + if (IS_ENABLED(CONFIG_LED)) + led_default_state(); + + return 0; +} + +static void do_board_detect(void) +{ + gd->board_type = BOARD_TYPE_PCB116; /* ServalT */ +} + +#if defined(CONFIG_MULTI_DTB_FIT) +int board_fit_config_name_match(const char *name) +{ + if (gd->board_type == BOARD_TYPE_PCB116 && + strcmp(name, "servalt_pcb116") == 0) + return 0; + return -1; +} +#endif + +#if defined(CONFIG_DTB_RESELECT) +int embedded_dtb_select(void) +{ + do_board_detect(); + fdtdec_setup(); + + return 0; +} +#endif |