dm: core: remove redundant if statement
[platform/kernel/u-boot.git] / drivers / core / Kconfig
index 8749561..3b95b53 100644 (file)
@@ -16,10 +16,24 @@ config SPL_DM
          suitable malloc() implementation. If you are not using the
          full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
          consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you
-         must provide CONFIG_SYS_MALLOC_F_LEN to set the size.
+         must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size.
          In most cases driver model will only allocate a few uclasses
          and devices in SPL, so 1KB should be enable. See
-         CONFIG_SYS_MALLOC_F_LEN for more details on how to enable it.
+         CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
+
+config TPL_DM
+       bool "Enable Driver Model for TPL"
+       depends on DM && TPL
+       help
+         Enable driver model in TPL. 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. In that case you
+         must provide CONFIG_SPL_SYS_MALLOC_F_LEN to set the size.
+         In most cases driver model will only allocate a few uclasses
+         and devices in SPL, so 1KB should be enough. See
+         CONFIG_SPL_SYS_MALLOC_F_LEN for more details on how to enable it.
+         Disable this for very small implementations.
 
 config DM_WARN
        bool "Enable warnings in driver model"
@@ -31,19 +45,33 @@ config DM_WARN
          This will cause dm_warn() to be compiled out - it will do nothing
          when called.
 
+config DM_DEBUG
+       bool "Enable debug messages in driver model core"
+       depends on DM
+       help
+         Say Y here if you want to compile in debug messages in DM core.
+
 config DM_DEVICE_REMOVE
        bool "Support device removal"
        depends on DM
        default y
        help
          We can save some code space by dropping support for removing a
-         device. This is not normally required in SPL, so by default this
-         option is disabled for SPL.
+         device.
 
          Note that this may have undesirable results in the USB subsystem as
          it causes unplugged devices to linger around in the dm-tree, and it
          causes USB host controllers to not be stopped when booting the OS.
 
+config SPL_DM_DEVICE_REMOVE
+       bool "Support device removal in SPL"
+       depends on SPL_DM
+       default n
+       help
+         We can save some code space by dropping support for removing a
+         device. This is not normally required in SPL, so by default this
+         option is disabled for SPL.
+
 config DM_STDIO
        bool "Support stdio registration"
        depends on DM
@@ -64,7 +92,7 @@ config DM_SEQ_ALIAS
 
 config SPL_DM_SEQ_ALIAS
        bool "Support numbered aliases in device tree in SPL"
-       depends on DM
+       depends on SPL_DM
        default n
        help
          Most boards will have a '/aliases' node containing the path to
@@ -83,7 +111,17 @@ config REGMAP
 
 config SPL_REGMAP
        bool "Support register maps in SPL"
-       depends on DM
+       depends on SPL_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 TPL_REGMAP
+       bool "Support register maps in TPL"
+       depends on TPL_DM
        help
          Hardware peripherals tend to have one or more sets of registers
          which can be accessed to control the hardware. A register map
@@ -102,7 +140,16 @@ config SYSCON
 
 config SPL_SYSCON
        bool "Support system controllers in SPL"
-       depends on 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 TPL_SYSCON
+       bool "Support system controllers in TPL"
+       depends on TPL_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
@@ -178,6 +225,15 @@ config SPL_OF_TRANSLATE
          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
+       help
+         Some platforms need a special address translation. Those
+         platforms (e.g. mvebu in SPL) can configure a translation
+         offset by enabling this option and setting the translation_offset
+         variable in the GD in their platform- / board-specific code.
+
 config OF_ISA_BUS
        bool
        depends on OF_TRANSLATE
@@ -185,7 +241,7 @@ config OF_ISA_BUS
          Is this option is enabled then support for the ISA bus will
          be included for addresses read from DT. This is something that
          should be known to be required or not based upon the board
-         being targetted, and whether or not it makes use of an ISA bus.
+         being targeted, and whether or not it makes use of an ISA bus.
 
          The bus is matched based upon its node name equalling "isa". The
          busses #address-cells should equal 2, with the first cell being
@@ -201,4 +257,8 @@ config OF_ISA_BUS
          mistranslation of device addresses, so ensure that this is
          enabled if your board does include an ISA bus.
 
+config DM_DEV_READ_INLINE
+       bool
+       default y if !OF_LIVE
+
 endmenu