diff options
Diffstat (limited to 'board/synopsys')
-rw-r--r-- | board/synopsys/Kconfig | 9 | ||||
-rw-r--r-- | board/synopsys/axs10x/config.mk | 6 | ||||
-rw-r--r-- | board/synopsys/emsdp/config.mk | 2 | ||||
-rw-r--r-- | board/synopsys/hsdk/config.mk | 4 | ||||
-rw-r--r-- | board/synopsys/iot_devkit/config.mk | 3 | ||||
-rw-r--r-- | board/synopsys/nsim/Kconfig | 21 | ||||
-rw-r--r-- | board/synopsys/nsim/MAINTAINERS | 6 | ||||
-rw-r--r-- | board/synopsys/nsim/Makefile | 7 | ||||
-rw-r--r-- | board/synopsys/nsim/config.mk | 8 | ||||
-rw-r--r-- | board/synopsys/nsim/nsim.c | 26 |
10 files changed, 81 insertions, 11 deletions
diff --git a/board/synopsys/Kconfig b/board/synopsys/Kconfig deleted file mode 100644 index 27e5509b26..0000000000 --- a/board/synopsys/Kconfig +++ /dev/null @@ -1,9 +0,0 @@ -if TARGET_NSIM - -config SYS_VENDOR - default "synopsys" - -config SYS_CONFIG_NAME - default "nsim" - -endif diff --git a/board/synopsys/axs10x/config.mk b/board/synopsys/axs10x/config.mk index 81ff498f81..ccac544290 100644 --- a/board/synopsys/axs10x/config.mk +++ b/board/synopsys/axs10x/config.mk @@ -2,6 +2,12 @@ # # Copyright (C) 2018 Synopsys, Inc. All rights reserved. +ifdef CONFIG_TARGET_AXS103 + PLATFORM_CPPFLAGS += -mcpu=archs +else + PLATFORM_CPPFLAGS += -mcpu=arc700 -mlock -mswape +endif + bsp-generate: u-boot u-boot.bin ifdef CONFIG_ISA_ARCV2 $(Q)python3 $(srctree)/board/$(BOARDDIR)/headerize-axs.py \ diff --git a/board/synopsys/emsdp/config.mk b/board/synopsys/emsdp/config.mk index 67fd7bf82a..5bd10442af 100644 --- a/board/synopsys/emsdp/config.mk +++ b/board/synopsys/emsdp/config.mk @@ -1,2 +1,2 @@ -PLATFORM_CPPFLAGS += -mlittle-endian -mnorm -mswap -mmpy-option=3 \ +PLATFORM_CPPFLAGS += -mcpu=arcem -mlittle-endian -mnorm -mswap -mmpy-option=3 \ -mbarrel-shifter -mfpu=fpuda_all -mcode-density diff --git a/board/synopsys/hsdk/config.mk b/board/synopsys/hsdk/config.mk index 9e280f921a..5ae22fa2b7 100644 --- a/board/synopsys/hsdk/config.mk +++ b/board/synopsys/hsdk/config.mk @@ -2,6 +2,10 @@ # # Copyright (C) 2018 Synopsys, Inc. All rights reserved. +PLATFORM_CPPFLAGS += -mcpu=hs38_linux -mlittle-endian -matomic -mll64 \ + -mdiv-rem -mswap -mnorm -mmpy-option=9 -mbarrel-shifter \ + -mfpu=fpud_all + bsp-generate: u-boot u-boot.bin $(Q)python3 $(srctree)/board/$(BOARDDIR)/headerize-hsdk.py \ --arc-id 0x52 --image $(srctree)/u-boot.bin \ diff --git a/board/synopsys/iot_devkit/config.mk b/board/synopsys/iot_devkit/config.mk index 120733538a..bd8f09ec7a 100644 --- a/board/synopsys/iot_devkit/config.mk +++ b/board/synopsys/iot_devkit/config.mk @@ -1,2 +1,3 @@ -PLATFORM_CPPFLAGS += -mlittle-endian -mcode-density -mdiv-rem -mswap -mnorm -mmpy-option=6 -mbarrel-shifter +PLATFORM_CPPFLAGS += -mcpu=arcem -mlittle-endian -mcode-density -mdiv-rem \ + -mswap -mnorm -mmpy-option=6 -mbarrel-shifter LDSCRIPT = $(srctree)/board/synopsys/iot_devkit/u-boot.lds diff --git a/board/synopsys/nsim/Kconfig b/board/synopsys/nsim/Kconfig new file mode 100644 index 0000000000..b6966b2991 --- /dev/null +++ b/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/board/synopsys/nsim/MAINTAINERS b/board/synopsys/nsim/MAINTAINERS new file mode 100644 index 0000000000..ad23c8338e --- /dev/null +++ b/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/board/synopsys/nsim/Makefile b/board/synopsys/nsim/Makefile new file mode 100644 index 0000000000..6aaffffa73 --- /dev/null +++ b/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/board/synopsys/nsim/config.mk b/board/synopsys/nsim/config.mk new file mode 100644 index 0000000000..40f9578a25 --- /dev/null +++ b/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/board/synopsys/nsim/nsim.c b/board/synopsys/nsim/nsim.c new file mode 100644 index 0000000000..f384f707f6 --- /dev/null +++ b/board/synopsys/nsim/nsim.c @@ -0,0 +1,26 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2020 Synopsys, Inc. All rights reserved. + */ + +#include <common.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; +}; |