Browse Source

platform: Enable all drivers by default.

The drivers and libfdt are built as libsbiutils.a
instead of libplatsbi.a.

libsbiutils.a are not built per platform specific. Thus,
enable all drivers by default.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Acked-by: Anup Patel <anup.patel@wdc.com>
Atish Patra 5 years ago
parent
commit
b2d0caf86b

+ 1 - 1
lib/utils/irqchip/objects.mk

@@ -7,4 +7,4 @@
 #   Anup Patel <anup.patel@wdc.com>
 #
 
-libsbiutils-objs-$(PLATFORM_IRQCHIP_PLIC) += irqchip/plic.o
+libsbiutils-objs-y += irqchip/plic.o

+ 2 - 2
lib/utils/libfdt/objects.mk

@@ -12,5 +12,5 @@ libfdt_files = fdt.o fdt_ro.o fdt_wip.o fdt_rw.o fdt_sw.o fdt_strerror.o \
 $(foreach file, $(libfdt_files), \
         $(eval CFLAGS_$(file) = -I$(src)/../../utils/libfdt))
 
-libsbiutils-objs-$(PLATFORM_INCLUDE_LIBFDT) += $(addprefix libfdt/,$(libfdt_files))
-libsbiutils-genflags-$(PLATFORM_INCLUDE_LIBFDT)  += -I$(libsbiutils_dir)/libfdt/
+libsbiutils-objs-y += $(addprefix libfdt/,$(libfdt_files))
+libsbiutils-genflags-y  += -I$(libsbiutils_dir)/libfdt/

+ 2 - 2
lib/utils/serial/objects.mk

@@ -7,5 +7,5 @@
 #   Anup Patel <anup.patel@wdc.com>
 #
 
-libsbiutils-objs-$(PLATFORM_SERIAL_UART8250) += serial/uart8250.o
-libsbiutils-objs-$(PLATFORM_SERIAL_SIFIVE_UART) += serial/sifive-uart.o
+libsbiutils-objs-y += serial/uart8250.o
+libsbiutils-objs-y += serial/sifive-uart.o

+ 1 - 1
lib/utils/sys/objects.mk

@@ -7,4 +7,4 @@
 #   Anup Patel <anup.patel@wdc.com>
 #
 
-libsbiutils-objs-$(PLATFORM_SYS_CLINT) += sys/clint.o
+libsbiutils-objs-y += sys/clint.o

+ 0 - 8
platform/kendryte/k210/config.mk

@@ -13,16 +13,8 @@ platform-cflags-y =
 platform-asflags-y =
 platform-ldflags-y =
 
-# Common drivers to enable
-PLATFORM_IRQCHIP_PLIC=y
-PLATFORM_SYS_CLINT=y
-
 # Blobs to build
 FW_TEXT_START=0x80000000
 FW_PAYLOAD=y
 FW_PAYLOAD_ALIGN=0x1000
 FW_PAYLOAD_FDT=k210.dtb
-
-# External Libraries to include
-PLATFORM_INCLUDE_LIBC=y
-

+ 0 - 8
platform/qemu/sifive_u/config.mk

@@ -17,11 +17,6 @@ platform-ldflags-y =
 platform-runcmd = qemu-system-riscv$(PLATFORM_RISCV_XLEN) -M sifive_u -m 256M \
   -nographic -kernel $(build_dir)/platform/qemu/sifive_u/firmware/fw_payload.elf
 
-# Common drivers to enable
-PLATFORM_IRQCHIP_PLIC=y
-PLATFORM_SERIAL_SIFIVE_UART=y
-PLATFORM_SYS_CLINT=y
-
 # Blobs to build
 FW_TEXT_START=0x80000000
 FW_DYNAMIC=y
@@ -43,6 +38,3 @@ else
   FW_PAYLOAD_OFFSET=0x200000
 endif
 FW_PAYLOAD_FDT_ADDR=0x82200000
-
-# External Libraries to include
-PLATFORM_INCLUDE_LIBC=y

+ 0 - 3
platform/qemu/virt/config.mk

@@ -43,6 +43,3 @@ else
   FW_PAYLOAD_OFFSET=0x200000
 endif
 FW_PAYLOAD_FDT_ADDR=0x82200000
-
-# External Libraries to include
-PLATFORM_INCLUDE_LIBC=y

+ 0 - 9
platform/sifive/fu540/config.mk

@@ -13,11 +13,6 @@ platform-cflags-y =
 platform-asflags-y =
 platform-ldflags-y =
 
-# Common drivers to enable
-PLATFORM_IRQCHIP_PLIC=y
-PLATFORM_SERIAL_SIFIVE_UART=y
-PLATFORM_SYS_CLINT=y
-
 # Blobs to build
 FW_TEXT_START=0x80000000
 FW_DYNAMIC=y
@@ -27,7 +22,3 @@ FW_JUMP_FDT_ADDR=0x82200000
 FW_PAYLOAD=y
 FW_PAYLOAD_OFFSET=0x200000
 FW_PAYLOAD_FDT_ADDR=0x82200000
-
-# External Libraries to include
-PLATFORM_INCLUDE_LIBFDT=y
-PLATFORM_INCLUDE_LIBC=y

+ 0 - 16
platform/template/config.mk

@@ -31,17 +31,6 @@ platform-ldflags-y =
 # PLATFORM_RISCV_ISA = rv64imafdc
 # PLATFORM_RISCV_CODE_MODEL = medany
 
-#
-# OpenSBI implements generic drivers for some common generic hardware. The
-# drivers currently available are the RISC-V Platform Level Interrupt
-# Controller (PLIC), RISC-V Core Local Interrupt controller (CLINT) and a UART
-# 8250 compliant serial line driver (UART8250). The following definitions allow
-# enabling the use of these generic drivers for the platform.
-#
-# PLATFORM_IRQCHIP_PLIC=<y|n>
-# PLATFORM_SYS_CLINT=<y|n>
-# PLATFORM_SERIAL_UART8250=<y|n>
-
 # Firmware load address configuration. This is mandatory.
 FW_TEXT_START=0x80000000
 
@@ -85,8 +74,3 @@ endif
 # FW_PAYLOAD_FDT_PATH="path to platform flattened device tree file"
 # FW_PAYLOAD_FDT="name of the platform defined flattened device tree file"
 # FW_PAYLOAD_FDT_ADDR=0x82200000
-
-#
-# Allow linking against static libc for standard functions (memset, memcpy, etc)
-#
-# PLATFORM_INCLUDE_LIBC=y