mirror of
https://github.com/riscv-software-src/opensbi.git
synced 2025-08-24 15:31:22 +01:00
lib: utils/gpio: Use kconfig for enabling/disabling drivers
We update gpio drivers makefile to use kconfig for enabling/disabling drivers. To avoid compile errors, we also enable appropriate gpio drivers for each platform. Signed-off-by: Anup Patel <apatel@ventanamicro.com> Tested-by: Andrew Jones <ajones@ventanamicro.com> Acked-by: Atish Patra <atishp@rivosinc.com> Tested-by: Atish Patra <atishp@rivosinc.com>
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
menu "Utils and Drivers Support"
|
||||
|
||||
source "$(OPENSBI_SRC_DIR)/lib/utils/gpio/Kconfig"
|
||||
|
||||
source "$(OPENSBI_SRC_DIR)/lib/utils/i2c/Kconfig"
|
||||
|
||||
source "$(OPENSBI_SRC_DIR)/lib/utils/ipi/Kconfig"
|
||||
|
22
lib/utils/gpio/Kconfig
Normal file
22
lib/utils/gpio/Kconfig
Normal file
@@ -0,0 +1,22 @@
|
||||
# SPDX-License-Identifier: BSD-2-Clause
|
||||
|
||||
menu "GPIO Support"
|
||||
|
||||
config FDT_GPIO
|
||||
bool "FDT based GPIO drivers"
|
||||
select GPIO
|
||||
default n
|
||||
|
||||
if FDT_GPIO
|
||||
|
||||
config FDT_GPIO_SIFIVE
|
||||
bool "SiFive GPIO FDT driver"
|
||||
default n
|
||||
|
||||
endif
|
||||
|
||||
config GPIO
|
||||
bool "GPIO support"
|
||||
default n
|
||||
|
||||
endmenu
|
@@ -7,10 +7,10 @@
|
||||
# Anup Patel <anup.patel@wdc.com>
|
||||
#
|
||||
|
||||
libsbiutils-objs-y += gpio/fdt_gpio.o
|
||||
libsbiutils-objs-y += gpio/fdt_gpio_drivers.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_GPIO) += gpio/fdt_gpio.o
|
||||
libsbiutils-objs-$(CONFIG_FDT_GPIO) += gpio/fdt_gpio_drivers.o
|
||||
|
||||
carray-fdt_gpio_drivers-y += fdt_gpio_sifive
|
||||
libsbiutils-objs-y += gpio/fdt_gpio_sifive.o
|
||||
carray-fdt_gpio_drivers-$(CONFIG_FDT_GPIO_SIFIVE) += fdt_gpio_sifive
|
||||
libsbiutils-objs-$(CONFIG_FDT_GPIO_SIFIVE) += gpio/fdt_gpio_sifive.o
|
||||
|
||||
libsbiutils-objs-y += gpio/gpio.o
|
||||
libsbiutils-objs-$(CONFIG_GPIO) += gpio/gpio.o
|
||||
|
@@ -10,6 +10,7 @@ if FDT_RESET
|
||||
|
||||
config FDT_RESET_GPIO
|
||||
bool "GPIO FDT reset driver"
|
||||
depends on FDT_GPIO
|
||||
default n
|
||||
|
||||
config FDT_RESET_HTIF
|
||||
|
@@ -1,3 +1,5 @@
|
||||
CONFIG_FDT_GPIO=y
|
||||
CONFIG_FDT_GPIO_SIFIVE=y
|
||||
CONFIG_FDT_I2C=y
|
||||
CONFIG_FDT_I2C_SIFIVE=y
|
||||
CONFIG_FDT_IPI=y
|
||||
|
Reference in New Issue
Block a user