xref: /openbmc/linux/drivers/base/Kconfig (revision 79543cf2)
11da177e4SLinus Torvaldsmenu "Generic Driver Options"
21da177e4SLinus Torvalds
386d56134SMichael Marineauconfig UEVENT_HELPER
486d56134SMichael Marineau	bool "Support for uevent helper"
586d56134SMichael Marineau	default y
66a8d8abbSKay Sievers	help
786d56134SMichael Marineau	  The uevent helper program is forked by the kernel for
86a8d8abbSKay Sievers	  every uevent.
97934779aSKay Sievers	  Before the switch to the netlink-based uevent source, this was
107934779aSKay Sievers	  used to hook hotplug scripts into kernel device events. It
117934779aSKay Sievers	  usually pointed to a shell script at /sbin/hotplug.
127934779aSKay Sievers	  This should not be used today, because usual systems create
137934779aSKay Sievers	  many events at bootup or device discovery in a very short time
147934779aSKay Sievers	  frame. One forked process per event can create so many processes
157934779aSKay Sievers	  that it creates a high system load, or on smaller systems
167934779aSKay Sievers	  it is known to create out-of-memory situations during bootup.
176a8d8abbSKay Sievers
1886d56134SMichael Marineauconfig UEVENT_HELPER_PATH
1986d56134SMichael Marineau	string "path to uevent helper"
2086d56134SMichael Marineau	depends on UEVENT_HELPER
2186d56134SMichael Marineau	default ""
2286d56134SMichael Marineau	help
2386d56134SMichael Marineau	  To disable user space helper program execution at by default
2486d56134SMichael Marineau	  specify an empty string here. This setting can still be altered
25573c9774SMárton Németh	  via /proc/sys/kernel/hotplug or via /sys/kernel/uevent_helper
26573c9774SMárton Németh	  later at runtime.
27573c9774SMárton Németh
282b2af54aSKay Sieversconfig DEVTMPFS
294237e5fdSKay Sievers	bool "Maintain a devtmpfs filesystem to mount at /dev"
302b2af54aSKay Sievers	help
31da5e4ef7SPeter Korsgaard	  This creates a tmpfs/ramfs filesystem instance early at bootup.
324237e5fdSKay Sievers	  In this filesystem, the kernel driver core maintains device
334237e5fdSKay Sievers	  nodes with their default names and permissions for all
344237e5fdSKay Sievers	  registered devices with an assigned major/minor number.
354237e5fdSKay Sievers	  Userspace can modify the filesystem content as needed, add
364237e5fdSKay Sievers	  symlinks, and apply needed permissions.
374237e5fdSKay Sievers	  It provides a fully functional /dev directory, where usually
384237e5fdSKay Sievers	  udev runs on top, managing permissions and adding meaningful
394237e5fdSKay Sievers	  symlinks.
404237e5fdSKay Sievers	  In very limited environments, it may provide a sufficient
414237e5fdSKay Sievers	  functional /dev without any further help. It also allows simple
424237e5fdSKay Sievers	  rescue systems, and reliably handles dynamic major/minor numbers.
432b2af54aSKay Sievers
44da5e4ef7SPeter Korsgaard	  Notice: if CONFIG_TMPFS isn't enabled, the simpler ramfs
45da5e4ef7SPeter Korsgaard	  file system will be used instead.
46da5e4ef7SPeter Korsgaard
472b2af54aSKay Sieversconfig DEVTMPFS_MOUNT
484237e5fdSKay Sievers	bool "Automount devtmpfs at /dev, after the kernel mounted the rootfs"
492b2af54aSKay Sievers	depends on DEVTMPFS
502b2af54aSKay Sievers	help
514237e5fdSKay Sievers	  This will instruct the kernel to automatically mount the
524237e5fdSKay Sievers	  devtmpfs filesystem at /dev, directly after the kernel has
534237e5fdSKay Sievers	  mounted the root filesystem. The behavior can be overridden
544237e5fdSKay Sievers	  with the commandline parameter: devtmpfs.mount=0|1.
554237e5fdSKay Sievers	  This option does not affect initramfs based booting, here
564237e5fdSKay Sievers	  the devtmpfs filesystem always needs to be mounted manually
570feb03afSEmilio López	  after the rootfs is mounted.
584237e5fdSKay Sievers	  With this option enabled, it allows to bring up a system in
594237e5fdSKay Sievers	  rescue mode with init=/bin/sh, even when the /dev directory
604237e5fdSKay Sievers	  on the rootfs is completely empty.
612b2af54aSKay Sievers
621da177e4SLinus Torvaldsconfig STANDALONE
63967857dfSKees Cook	bool "Select only drivers that don't need compile-time external firmware"
641da177e4SLinus Torvalds	default y
651da177e4SLinus Torvalds	help
661da177e4SLinus Torvalds	  Select this option if you don't have magic firmware for drivers that
671da177e4SLinus Torvalds	  need it.
681da177e4SLinus Torvalds
691da177e4SLinus Torvalds	  If unsure, say Y.
701da177e4SLinus Torvalds
711da177e4SLinus Torvaldsconfig PREVENT_FIRMWARE_BUILD
721da177e4SLinus Torvalds	bool "Prevent firmware from being built"
731da177e4SLinus Torvalds	default y
741da177e4SLinus Torvalds	help
751da177e4SLinus Torvalds	  Say yes to avoid building firmware. Firmware is usually shipped
76113647a2Smatt mooney	  with the driver and only when updating the firmware should a
77113647a2Smatt mooney	  rebuild be made.
78113647a2Smatt mooney	  If unsure, say Y here.
791da177e4SLinus Torvalds
801da177e4SLinus Torvaldsconfig FW_LOADER
816a108a14SDavid Rientjes	tristate "Userspace firmware loading support" if EXPERT
82d9b19199SAdrian Bunk	default y
831da177e4SLinus Torvalds	---help---
84113647a2Smatt mooney	  This option is provided for the case where none of the in-tree modules
85113647a2Smatt mooney	  require userspace firmware loading support, but a module built
86113647a2Smatt mooney	  out-of-tree does.
871da177e4SLinus Torvalds
88d172e7f5SDavid Woodhouseconfig FIRMWARE_IN_KERNEL
89d172e7f5SDavid Woodhouse	bool "Include in-kernel firmware blobs in kernel binary"
90d172e7f5SDavid Woodhouse	depends on FW_LOADER
91d172e7f5SDavid Woodhouse	default y
92d172e7f5SDavid Woodhouse	help
93d172e7f5SDavid Woodhouse	  The kernel source tree includes a number of firmware 'blobs'
94113647a2Smatt mooney	  that are used by various drivers. The recommended way to
95156faf90Smatt mooney	  use these is to run "make firmware_install", which, after
96156faf90Smatt mooney	  converting ihex files to binary, copies all of the needed
97156faf90Smatt mooney	  binary files in firmware/ to /lib/firmware/ on your system so
98d172e7f5SDavid Woodhouse	  that they can be loaded by userspace helpers on request.
99d172e7f5SDavid Woodhouse
100d172e7f5SDavid Woodhouse	  Enabling this option will build each required firmware blob
101d172e7f5SDavid Woodhouse	  into the kernel directly, where request_firmware() will find
102d172e7f5SDavid Woodhouse	  them without having to call out to userspace. This may be
103113647a2Smatt mooney	  useful if your root file system requires a device that uses
104113647a2Smatt mooney	  such firmware and do not wish to use an initrd.
105d172e7f5SDavid Woodhouse
106d172e7f5SDavid Woodhouse	  This single option controls the inclusion of firmware for
107113647a2Smatt mooney	  every driver that uses request_firmware() and ships its
108113647a2Smatt mooney	  firmware in the kernel source tree, which avoids a
109113647a2Smatt mooney	  proliferation of 'Include firmware for xxx device' options.
110d172e7f5SDavid Woodhouse
111d172e7f5SDavid Woodhouse	  Say 'N' and let firmware be loaded from userspace.
112d172e7f5SDavid Woodhouse
1134d2acfbfSDavid Woodhouseconfig EXTRA_FIRMWARE
1144d2acfbfSDavid Woodhouse	string "External firmware blobs to build into the kernel binary"
1154d2acfbfSDavid Woodhouse	depends on FW_LOADER
1164d2acfbfSDavid Woodhouse	help
117113647a2Smatt mooney	  This option allows firmware to be built into the kernel for the case
118113647a2Smatt mooney	  where the user either cannot or doesn't want to provide it from
1194d2acfbfSDavid Woodhouse	  userspace at runtime (for example, when the firmware in question is
1204d2acfbfSDavid Woodhouse	  required for accessing the boot device, and the user doesn't want to
1214d2acfbfSDavid Woodhouse	  use an initrd).
1224d2acfbfSDavid Woodhouse
123113647a2Smatt mooney	  This option is a string and takes the (space-separated) names of the
124113647a2Smatt mooney	  firmware files -- the same names that appear in MODULE_FIRMWARE()
1254d2acfbfSDavid Woodhouse	  and request_firmware() in the source. These files should exist under
1264d2acfbfSDavid Woodhouse	  the directory specified by the EXTRA_FIRMWARE_DIR option, which is
127113647a2Smatt mooney	  by default the firmware subdirectory of the kernel source tree.
1284d2acfbfSDavid Woodhouse
129113647a2Smatt mooney	  For example, you might set CONFIG_EXTRA_FIRMWARE="usb8388.bin", copy
130113647a2Smatt mooney	  the usb8388.bin file into the firmware directory, and build the kernel.
131113647a2Smatt mooney	  Then any request_firmware("usb8388.bin") will be satisfied internally
132113647a2Smatt mooney	  without needing to call out to userspace.
1334d2acfbfSDavid Woodhouse
1344d2acfbfSDavid Woodhouse	  WARNING: If you include additional firmware files into your binary
135113647a2Smatt mooney	  kernel image that are not available under the terms of the GPL,
1364d2acfbfSDavid Woodhouse	  then it may be a violation of the GPL to distribute the resulting
137113647a2Smatt mooney	  image since it combines both GPL and non-GPL work. You should
1384d2acfbfSDavid Woodhouse	  consult a lawyer of your own before distributing such an image.
1394d2acfbfSDavid Woodhouse
1404d2acfbfSDavid Woodhouseconfig EXTRA_FIRMWARE_DIR
1414d2acfbfSDavid Woodhouse	string "Firmware blobs root directory"
1424d2acfbfSDavid Woodhouse	depends on EXTRA_FIRMWARE != ""
1434d2acfbfSDavid Woodhouse	default "firmware"
1444d2acfbfSDavid Woodhouse	help
1454d2acfbfSDavid Woodhouse	  This option controls the directory in which the kernel build system
1464d2acfbfSDavid Woodhouse	  looks for the firmware files listed in the EXTRA_FIRMWARE option.
147113647a2Smatt mooney	  The default is firmware/ in the kernel source tree, but by changing
148113647a2Smatt mooney	  this option you can point it elsewhere, such as /lib/firmware/ or
149113647a2Smatt mooney	  some other directory containing the firmware files.
1504d2acfbfSDavid Woodhouse
1517b1269f7STakashi Iwaiconfig FW_LOADER_USER_HELPER
1525a1379e8STakashi Iwai	bool
1535a1379e8STakashi Iwai
1545a1379e8STakashi Iwaiconfig FW_LOADER_USER_HELPER_FALLBACK
1557b1269f7STakashi Iwai	bool "Fallback user-helper invocation for firmware loading"
1567b1269f7STakashi Iwai	depends on FW_LOADER
1575a1379e8STakashi Iwai	select FW_LOADER_USER_HELPER
1587b1269f7STakashi Iwai	help
1597b1269f7STakashi Iwai	  This option enables / disables the invocation of user-helper
1607b1269f7STakashi Iwai	  (e.g. udev) for loading firmware files as a fallback after the
1617b1269f7STakashi Iwai	  direct file loading in kernel fails.  The user-mode helper is
1627b1269f7STakashi Iwai	  no longer required unless you have a special firmware file that
1635a1379e8STakashi Iwai	  resides in a non-standard path. Moreover, the udev support has
1645a1379e8STakashi Iwai	  been deprecated upstream.
1655a1379e8STakashi Iwai
1665a1379e8STakashi Iwai	  If you are unsure about this, say N here.
1677b1269f7STakashi Iwai
168833c9545SJohannes Bergconfig WANT_DEV_COREDUMP
169833c9545SJohannes Berg	bool
170833c9545SJohannes Berg	help
171833c9545SJohannes Berg	  Drivers should "select" this option if they desire to use the
172833c9545SJohannes Berg	  device coredump mechanism.
173833c9545SJohannes Berg
174cd3d9ea1SJohannes Bergconfig ALLOW_DEV_COREDUMP
175cd3d9ea1SJohannes Berg	bool "Allow device coredump" if EXPERT
1769c602699SAristeu Rozanski	default y
177833c9545SJohannes Berg	help
1789c602699SAristeu Rozanski	  This option controls if the device coredump mechanism is available or
1799c602699SAristeu Rozanski	  not; if disabled, the mechanism will be omitted even if drivers that
1809c602699SAristeu Rozanski	  can use it are enabled.
1819c602699SAristeu Rozanski	  Say 'N' for more sensitive systems or systems that don't want
1829c602699SAristeu Rozanski	  to ever access the information to not have the code, nor keep any
1839c602699SAristeu Rozanski	  data.
184833c9545SJohannes Berg
1859c602699SAristeu Rozanski	  If unsure, say Y.
186833c9545SJohannes Berg
187833c9545SJohannes Bergconfig DEV_COREDUMP
188833c9545SJohannes Berg	bool
189833c9545SJohannes Berg	default y if WANT_DEV_COREDUMP
190cd3d9ea1SJohannes Berg	depends on ALLOW_DEV_COREDUMP
191833c9545SJohannes Berg
1921da177e4SLinus Torvaldsconfig DEBUG_DRIVER
1931da177e4SLinus Torvalds	bool "Driver Core verbose debug messages"
1941da177e4SLinus Torvalds	depends on DEBUG_KERNEL
1951da177e4SLinus Torvalds	help
1961da177e4SLinus Torvalds	  Say Y here if you want the Driver core to produce a bunch of
1971da177e4SLinus Torvalds	  debug messages to the system log. Select this if you are having a
1981da177e4SLinus Torvalds	  problem with the driver core and want to see more of what is
1991da177e4SLinus Torvalds	  going on.
2001da177e4SLinus Torvalds
2011da177e4SLinus Torvalds	  If you are unsure about this, say N here.
2021da177e4SLinus Torvalds
2039ac7849eSTejun Heoconfig DEBUG_DEVRES
2049ac7849eSTejun Heo	bool "Managed device resources verbose debug messages"
2059ac7849eSTejun Heo	depends on DEBUG_KERNEL
2069ac7849eSTejun Heo	help
2079ac7849eSTejun Heo	  This option enables kernel parameter devres.log. If set to
2089ac7849eSTejun Heo	  non-zero, devres debug messages are printed. Select this if
2099ac7849eSTejun Heo	  you are having a problem with devres or want to debug
2109ac7849eSTejun Heo	  resource management for a managed device. devres.log can be
2119ac7849eSTejun Heo	  switched on and off from sysfs node.
2129ac7849eSTejun Heo
2139ac7849eSTejun Heo	  If you are unsure about this, Say N here.
2149ac7849eSTejun Heo
215bea5b158SRob Herringconfig DEBUG_TEST_DRIVER_REMOVE
216248ff021SLaura Abbott	bool "Test driver remove calls during probe (UNSTABLE)"
217bea5b158SRob Herring	depends on DEBUG_KERNEL
218bea5b158SRob Herring	help
219bea5b158SRob Herring	  Say Y here if you want the Driver core to test driver remove functions
220bea5b158SRob Herring	  by calling probe, remove, probe. This tests the remove path without
221bea5b158SRob Herring	  having to unbind the driver or unload the driver module.
222bea5b158SRob Herring
223248ff021SLaura Abbott	  This option is expected to find errors and may render your system
224248ff021SLaura Abbott	  unusable. You should say N here unless you are explicitly looking to
225248ff021SLaura Abbott	  test this functionality.
226bea5b158SRob Herring
22779543cf2SDmitry Torokhovsource "drivers/base/test/Kconfig"
22879543cf2SDmitry Torokhov
2294039483fSMichael Holzheuconfig SYS_HYPERVISOR
2304039483fSMichael Holzheu	bool
2314039483fSMichael Holzheu	default n
232eba6cd67SRandy Dunlap
2339f13a1fdSBen Hutchingsconfig GENERIC_CPU_DEVICES
2349f13a1fdSBen Hutchings	bool
2359f13a1fdSBen Hutchings	default n
2369f13a1fdSBen Hutchings
23767bad2fdSArd Biesheuvelconfig GENERIC_CPU_AUTOPROBE
23867bad2fdSArd Biesheuvel	bool
23967bad2fdSArd Biesheuvel
24074d1d82cSLee Jonesconfig SOC_BUS
24174d1d82cSLee Jones	bool
24274d1d82cSLee Jones
243b83a313bSMark Brownsource "drivers/base/regmap/Kconfig"
244b83a313bSMark Brown
245d15bd7eeSSumit Semwalconfig DMA_SHARED_BUFFER
2463b32a592SDave Airlie	bool
247d15bd7eeSSumit Semwal	default n
248d15bd7eeSSumit Semwal	select ANON_INODES
249d15bd7eeSSumit Semwal	help
250d15bd7eeSSumit Semwal	  This option enables the framework for buffer-sharing between
251d15bd7eeSSumit Semwal	  multiple drivers. A buffer is associated with a file using driver
252d15bd7eeSSumit Semwal	  APIs extension; the file's descriptor can then be passed on to other
253d15bd7eeSSumit Semwal	  driver.
254d15bd7eeSSumit Semwal
255e941759cSMaarten Lankhorstconfig FENCE_TRACE
256e941759cSMaarten Lankhorst	bool "Enable verbose FENCE_TRACE messages"
257e941759cSMaarten Lankhorst	depends on DMA_SHARED_BUFFER
258e941759cSMaarten Lankhorst	help
259e941759cSMaarten Lankhorst	  Enable the FENCE_TRACE printks. This will add extra
260e941759cSMaarten Lankhorst	  spam to the console log, but will make it easier to diagnose
261e941759cSMaarten Lankhorst	  lockup related problems for dma-buffers shared across multiple
262e941759cSMaarten Lankhorst	  devices.
263e941759cSMaarten Lankhorst
264f825c736SAneesh Kumar K.Vconfig DMA_CMA
265f825c736SAneesh Kumar K.V	bool "DMA Contiguous Memory Allocator"
266f825c736SAneesh Kumar K.V	depends on HAVE_DMA_CONTIGUOUS && CMA
267c64be2bbSMarek Szyprowski	help
268c64be2bbSMarek Szyprowski	  This enables the Contiguous Memory Allocator which allows drivers
269c64be2bbSMarek Szyprowski	  to allocate big physically-contiguous blocks of memory for use with
270c64be2bbSMarek Szyprowski	  hardware components that do not support I/O map nor scatter-gather.
271c64be2bbSMarek Szyprowski
272f0d6d1f6SJean Delvare	  You can disable CMA by specifying "cma=0" on the kernel's command
273f0d6d1f6SJean Delvare	  line.
274f0d6d1f6SJean Delvare
275c64be2bbSMarek Szyprowski	  For more information see <include/linux/dma-contiguous.h>.
276c64be2bbSMarek Szyprowski	  If unsure, say "n".
277c64be2bbSMarek Szyprowski
278f825c736SAneesh Kumar K.Vif  DMA_CMA
279c64be2bbSMarek Szyprowskicomment "Default contiguous memory area size:"
280c64be2bbSMarek Szyprowski
281c64be2bbSMarek Szyprowskiconfig CMA_SIZE_MBYTES
282c64be2bbSMarek Szyprowski	int "Size in Mega Bytes"
283c64be2bbSMarek Szyprowski	depends on !CMA_SIZE_SEL_PERCENTAGE
284d7be003aSAkinobu Mita	default 0 if X86
285c64be2bbSMarek Szyprowski	default 16
286c64be2bbSMarek Szyprowski	help
287c64be2bbSMarek Szyprowski	  Defines the size (in MiB) of the default memory area for Contiguous
288d7be003aSAkinobu Mita	  Memory Allocator.  If the size of 0 is selected, CMA is disabled by
289d7be003aSAkinobu Mita	  default, but it can be enabled by passing cma=size[MG] to the kernel.
290d7be003aSAkinobu Mita
291c64be2bbSMarek Szyprowski
292c64be2bbSMarek Szyprowskiconfig CMA_SIZE_PERCENTAGE
293c64be2bbSMarek Szyprowski	int "Percentage of total memory"
294c64be2bbSMarek Szyprowski	depends on !CMA_SIZE_SEL_MBYTES
295d7be003aSAkinobu Mita	default 0 if X86
296c64be2bbSMarek Szyprowski	default 10
297c64be2bbSMarek Szyprowski	help
298c64be2bbSMarek Szyprowski	  Defines the size of the default memory area for Contiguous Memory
299c64be2bbSMarek Szyprowski	  Allocator as a percentage of the total memory in the system.
300d7be003aSAkinobu Mita	  If 0 percent is selected, CMA is disabled by default, but it can be
301d7be003aSAkinobu Mita	  enabled by passing cma=size[MG] to the kernel.
302c64be2bbSMarek Szyprowski
303c64be2bbSMarek Szyprowskichoice
304c64be2bbSMarek Szyprowski	prompt "Selected region size"
3055e97f3f9SLaurent Pinchart	default CMA_SIZE_SEL_MBYTES
306c64be2bbSMarek Szyprowski
307c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MBYTES
308c64be2bbSMarek Szyprowski	bool "Use mega bytes value only"
309c64be2bbSMarek Szyprowski
310c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_PERCENTAGE
311c64be2bbSMarek Szyprowski	bool "Use percentage value only"
312c64be2bbSMarek Szyprowski
313c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MIN
314c64be2bbSMarek Szyprowski	bool "Use lower value (minimum)"
315c64be2bbSMarek Szyprowski
316c64be2bbSMarek Szyprowskiconfig CMA_SIZE_SEL_MAX
317c64be2bbSMarek Szyprowski	bool "Use higher value (maximum)"
318c64be2bbSMarek Szyprowski
319c64be2bbSMarek Szyprowskiendchoice
320c64be2bbSMarek Szyprowski
321c64be2bbSMarek Szyprowskiconfig CMA_ALIGNMENT
322c64be2bbSMarek Szyprowski	int "Maximum PAGE_SIZE order of alignment for contiguous buffers"
323fe54b1fdSMarc Carino	range 4 12
324c64be2bbSMarek Szyprowski	default 8
325c64be2bbSMarek Szyprowski	help
326c64be2bbSMarek Szyprowski	  DMA mapping framework by default aligns all buffers to the smallest
327c64be2bbSMarek Szyprowski	  PAGE_SIZE order which is greater than or equal to the requested buffer
328c64be2bbSMarek Szyprowski	  size. This works well for buffers up to a few hundreds kilobytes, but
329c64be2bbSMarek Szyprowski	  for larger buffers it just a memory waste. With this parameter you can
330c64be2bbSMarek Szyprowski	  specify the maximum PAGE_SIZE order for contiguous buffers. Larger
331c64be2bbSMarek Szyprowski	  buffers will be aligned only to this specified order. The order is
332c64be2bbSMarek Szyprowski	  expressed as a power of two multiplied by the PAGE_SIZE.
333c64be2bbSMarek Szyprowski
334c64be2bbSMarek Szyprowski	  For example, if your system defaults to 4KiB pages, the order value
335c64be2bbSMarek Szyprowski	  of 8 means that the buffers will be aligned up to 1MiB only.
336c64be2bbSMarek Szyprowski
337c64be2bbSMarek Szyprowski	  If unsure, leave the default value "8".
338c64be2bbSMarek Szyprowski
339c64be2bbSMarek Szyprowskiendif
340c64be2bbSMarek Szyprowski
341eba6cd67SRandy Dunlapendmenu
342