aboutsummaryrefslogtreecommitdiffstats
path: root/roms/u-boot/board/synopsys/nsim
diff options
context:
space:
mode:
Diffstat (limited to 'roms/u-boot/board/synopsys/nsim')
-rw-r--r--roms/u-boot/board/synopsys/nsim/Kconfig21
-rw-r--r--roms/u-boot/board/synopsys/nsim/MAINTAINERS6
-rw-r--r--roms/u-boot/board/synopsys/nsim/Makefile7
-rw-r--r--roms/u-boot/board/synopsys/nsim/config.mk8
-rw-r--r--roms/u-boot/board/synopsys/nsim/nsim.c27
5 files changed, 69 insertions, 0 deletions
diff --git a/roms/u-boot/board/synopsys/nsim/Kconfig b/roms/u-boot/board/synopsys/nsim/Kconfig
new file mode 100644
index 000000000..b6966b299
--- /dev/null
+++ b/roms/u-boot/board/synopsys/nsim/Kconfig
@@ -0,0 +1,21 @@
+if TARGET_NSIM
+
+config SYS_BOARD
+ default "nsim"
+
+config SYS_VENDOR
+ default "synopsys"
+
+config SYS_CONFIG_NAME
+ default "nsim"
+
+config NSIM_BOARD_CPPFLAGS
+ string "board arc-specific compiler options"
+ help
+ For nSIM we allow to set custom arc-specific compiler options
+ (like -mcpu=) instead of hardcoding them in its makefile as nSIM
+ target is used for representing targets without fixed CPU version
+ like FPGA-based boards and software simulators.
+ This variable takes space separated compiler options list.
+
+endif
diff --git a/roms/u-boot/board/synopsys/nsim/MAINTAINERS b/roms/u-boot/board/synopsys/nsim/MAINTAINERS
new file mode 100644
index 000000000..ad23c8338
--- /dev/null
+++ b/roms/u-boot/board/synopsys/nsim/MAINTAINERS
@@ -0,0 +1,6 @@
+ARC SIMULATION & PROTOTYPING PLATFORMS
+M: Alexey Brodkin <abrodkin@synopsys.com>
+S: Maintained
+F: arch/arc/dts/nsim.dts
+F: board/synopsys/nsim/
+F: configs/nsim_*_defconfig
diff --git a/roms/u-boot/board/synopsys/nsim/Makefile b/roms/u-boot/board/synopsys/nsim/Makefile
new file mode 100644
index 000000000..6aaffffa7
--- /dev/null
+++ b/roms/u-boot/board/synopsys/nsim/Makefile
@@ -0,0 +1,7 @@
+#
+# Copyright (C) 2020 Synopsys, Inc. All rights reserved.
+#
+# SPDX-License-Identifier: GPL-2.0+
+#
+
+obj-y += nsim.o
diff --git a/roms/u-boot/board/synopsys/nsim/config.mk b/roms/u-boot/board/synopsys/nsim/config.mk
new file mode 100644
index 000000000..40f9578a2
--- /dev/null
+++ b/roms/u-boot/board/synopsys/nsim/config.mk
@@ -0,0 +1,8 @@
+# SPDX-License-Identifier: GPL-2.0+
+#
+# Copyright (C) 2020 Synopsys, Inc. All rights reserved.
+
+# CONFIG_NSIM_BOARD_CPPFLAGS is a string variable which comes from defconfig
+# with double quotes. We use echo to remove them so CONFIG_NSIM_BOARD_CPPFLAGS
+# won't be treated by compiler as a single option.
+PLATFORM_CPPFLAGS += $(shell echo $(CONFIG_NSIM_BOARD_CPPFLAGS))
diff --git a/roms/u-boot/board/synopsys/nsim/nsim.c b/roms/u-boot/board/synopsys/nsim/nsim.c
new file mode 100644
index 000000000..00e5cc364
--- /dev/null
+++ b/roms/u-boot/board/synopsys/nsim/nsim.c
@@ -0,0 +1,27 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Copyright (C) 2020 Synopsys, Inc. All rights reserved.
+ */
+
+#include <common.h>
+#include <init.h>
+#include <dm/device.h>
+#include <virtio_types.h>
+#include <virtio.h>
+
+int board_early_init_r(void)
+{
+ /*
+ * Make sure virtio bus is enumerated so that peripherals
+ * on the virtio bus can be discovered by their drivers
+ */
+ virtio_init();
+
+ return 0;
+}
+
+int checkboard(void)
+{
+ printf("Board: ARC virtual or prototyping platform\n");
+ return 0;
+};