xref: /openbmc/u-boot/drivers/core/Kconfig (revision 91a91ff804d50d7a4b7560d10fa6863fc4c04307)
1da333ae7SMasahiro Yamadaconfig DM
2da333ae7SMasahiro Yamada	bool "Enable Driver Model"
3da333ae7SMasahiro Yamada	depends on !SPL_BUILD
4da333ae7SMasahiro Yamada	help
5f94a1bedSSimon Glass	  This config option enables Driver Model. This brings in the core
6f94a1bedSSimon Glass	  support, including scanning of platform data on start-up. If
7f94a1bedSSimon Glass	  CONFIG_OF_CONTROL is enabled, the device tree will be scanned also
8f94a1bedSSimon Glass	  when available.
9*91a91ff8SSimon Glass
10*91a91ff8SSimon Glassconfig SPL_DM
11*91a91ff8SSimon Glass	bool "Enable Driver Model for SPL"
12*91a91ff8SSimon Glass	depends on DM && SPL
13*91a91ff8SSimon Glass	help
14*91a91ff8SSimon Glass	  Enable driver model in SPL. You will need to provide a
15*91a91ff8SSimon Glass	  suitable malloc() implementation. If you are not using the
16*91a91ff8SSimon Glass	  full malloc() enabled by CONFIG_SYS_SPL_MALLOC_START,
17*91a91ff8SSimon Glass	  consider using CONFIG_SYS_MALLOC_SIMPLE. In that case you
18*91a91ff8SSimon Glass	  must provide CONFIG_SYS_MALLOC_F_LEN to set the size.
19*91a91ff8SSimon Glass	  In most cases driver model will only allocate a few uclasses
20*91a91ff8SSimon Glass	  and devices in SPL, so 1KB should be enable. See
21*91a91ff8SSimon Glass	  CONFIG_SYS_MALLOC_F_LEN for more details on how to enable it.
22*91a91ff8SSimon Glass
23*91a91ff8SSimon Glassconfig DM_WARN
24*91a91ff8SSimon Glass	bool "Enable warnings in driver model"
25*91a91ff8SSimon Glass	help
26*91a91ff8SSimon Glass	  The dm_warn() function can use up quite a bit of space for its
27*91a91ff8SSimon Glass	  strings. By default this is disabled for SPL builds to save space.
28*91a91ff8SSimon Glass	  This will cause dm_warn() to be compiled out - it will do nothing
29*91a91ff8SSimon Glass	  when called.
30*91a91ff8SSimon Glass	depends on DM
31*91a91ff8SSimon Glass	default y if !SPL_BUILD
32*91a91ff8SSimon Glass	default n if SPL_BUILD
33*91a91ff8SSimon Glass
34*91a91ff8SSimon Glassconfig DM_DEVICE_REMOVE
35*91a91ff8SSimon Glass	bool "Support device removal"
36*91a91ff8SSimon Glass	help
37*91a91ff8SSimon Glass	  We can save some code space by dropping support for removing a
38*91a91ff8SSimon Glass	  device. This is not normally required in SPL, so by default this
39*91a91ff8SSimon Glass	  option is disabled for SPL.
40*91a91ff8SSimon Glass	depends on DM
41*91a91ff8SSimon Glass	default y if !SPL_BUILD
42*91a91ff8SSimon Glass	default n if SPL_BUILD
43*91a91ff8SSimon Glass
44*91a91ff8SSimon Glassconfig DM_STDIO
45*91a91ff8SSimon Glass	bool "Support stdio registration"
46*91a91ff8SSimon Glass	help
47*91a91ff8SSimon Glass	  Normally serial drivers register with stdio so that they can be used
48*91a91ff8SSimon Glass	  as normal output devices. In SPL we don't normally use stdio, so
49*91a91ff8SSimon Glass	  we can omit this feature.
50*91a91ff8SSimon Glass	depends on DM
51*91a91ff8SSimon Glass	default y if !SPL_BUILD
52*91a91ff8SSimon Glass	default n if SPL_BUILD
53