vpl: Add Kconfig options for VPL
Add VPL versions of commonly used Kconfig options.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/core/Kconfig b/drivers/core/Kconfig
index 5c34004..408a8d8 100644
--- a/drivers/core/Kconfig
+++ b/drivers/core/Kconfig
@@ -35,6 +35,16 @@
CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
Disable this for very small implementations.
+config VPL_DM
+ bool "Enable Driver Model for VPL"
+ depends on DM && VPL
+ default y if SPL_DM
+ help
+ Enable driver model in VPL. You will need to provide a
+ suitable malloc() implementation. If you are not using the
+ full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
+ consider using CONFIG_SYS_MALLOC_SIMPLE.
+
config DM_WARN
bool "Enable warnings in driver model"
depends on DM
@@ -121,6 +131,15 @@
numbered devices (e.g. serial0 = &serial0). This feature can be
disabled if it is not required, to save code space in SPL.
+config VPL_DM_SEQ_ALIAS
+ bool "Support numbered aliases in device tree in VPL"
+ depends on VPL_DM
+ default y
+ help
+ Most boards will have a '/aliases' node containing the path to
+ numbered devices (e.g. serial0 = &serial0). This feature can be
+ disabled if it is not required, to save code space in VPL.
+
config SPL_DM_INLINE_OFNODE
bool "Inline some ofnode functions which are seldom used in SPL"
depends on SPL_DM
@@ -176,6 +195,16 @@
support any bus type (I2C, SPI) but so far this only supports
direct memory access.
+config VPL_REGMAP
+ bool "Support register maps in VPL"
+ depends on VPL_DM
+ help
+ Hardware peripherals tend to have one or more sets of registers
+ which can be accessed to control the hardware. A register map
+ models this with a simple read/write interface. It can in principle
+ support any bus type (I2C, SPI) but so far this only supports
+ direct memory access.
+
config SYSCON
bool "Support system controllers"
depends on REGMAP
@@ -196,13 +225,22 @@
config TPL_SYSCON
bool "Support system controllers in TPL"
- depends on TPL_REGMAP
+ depends on SPL_REGMAP
help
Many SoCs have a number of system controllers which are dealt with
as a group by a single driver. Some common functionality is provided
by this uclass, including accessing registers via regmap and
assigning a unique number to each.
+config VPL_SYSCON
+ bool "Support system controllers in VPL"
+ depends on VPL_REGMAP
+ help
+ Many SoCs have a number of system controllers which are dealt with
+ as a group by a single driver. Some common functionality is provided
+ by this uclass, including accessing registers via regmap and
+ assigning a unique number to each.
+
config DEVRES
bool "Managed device resources"
depends on DM
@@ -292,6 +330,20 @@
used for the address translation. This function is faster and
smaller in size than fdt_translate_address().
+config VPL_OF_TRANSLATE
+ bool "Translate addresses using fdt_translate_address in SPL"
+ depends on SPL_DM && VPL_OF_CONTROL
+ help
+ If this option is enabled, the reg property will be translated
+ using the fdt_translate_address() function. This is necessary
+ on some platforms (e.g. MVEBU) using complex "ranges"
+ properties in many nodes. As this translation is not handled
+ correctly in the default simple_bus_translate() function.
+
+ If this option is not enabled, simple_bus_translate() will be
+ used for the address translation. This function is faster and
+ smaller in size than fdt_translate_address().
+
config TRANSLATION_OFFSET
bool "Platforms specific translation offset"
depends on DM && OF_CONTROL
diff --git a/drivers/core/Makefile b/drivers/core/Makefile
index 7099073..bce0a3f 100644
--- a/drivers/core/Makefile
+++ b/drivers/core/Makefile
@@ -5,7 +5,7 @@
obj-y += device.o fdtaddr.o lists.o root.o uclass.o util.o tag.o
obj-$(CONFIG_$(SPL_TPL_)ACPIGEN) += acpi.o
obj-$(CONFIG_$(SPL_TPL_)DEVRES) += devres.o
-obj-$(CONFIG_$(SPL_)DM_DEVICE_REMOVE) += device-remove.o
+obj-$(CONFIG_$(SPL_TPL_)DM_DEVICE_REMOVE) += device-remove.o
obj-$(CONFIG_$(SPL_)SIMPLE_BUS) += simple-bus.o
obj-$(CONFIG_SIMPLE_PM_BUS) += simple-pm-bus.o
obj-$(CONFIG_DM) += dump.o