Commit 58d423b88e5bc1b6e43aa04a05feccd0e737c061
Committed by
Simon Glass
1 parent
b3d023b405
Exists in
v2017.01-smarct4x
and in
34 other branches
dm: select CONFIG_DM* options
As mentioned in the previous commit, adding default values in each Kconfig causes problems because it does not co-exist with the "depends on" syntax. (Please note this is not a bug of Kconfig.) We should not do so unless we have a special reason. Actually, for CONFIG_DM*, we have no good reason to do so. Generally, CONFIG_DM is not a user-configurable option. Once we convert a driver into Driver Model, the board only works with Driver Model, i.e. CONFIG_DM must be always enabled for that board. So, using "select DM" is more suitable rather than allowing users to modify it. Another good thing is, Kconfig warns unmet dependencies for "select" syntax, so we easily notice bugs. Actually, CONFIG_DM and other related options have been added without consistency: some into arch/*/Kconfig, some into board/*/Kconfig, and some into configs/*_defconfig. This commit prefers "select" and cleans up the following issues. [1] Never use "CONFIG_DM=n" in defconfig files It is really rare to add "CONFIG_FOO=n" to disable CONFIG options. It is more common to use "# CONFIG_FOO is not set". But here, we do not even have to do it. Less than half of OMAP3 boards have been converted to Driver Model. Adding the default values to arch/arm/cpu/armv7/omap3/Kconfig is weird. Instead, add "select DM" only to appropriate boards, which eventually eliminates "CONFIG_DM=n", etc. [2] Delete redundant CONFIGs Sandbox sets CONFIG_DM in arch/sandbox/Kconfig and defines it again in configs/sandbox_defconfig. Likewise, OMAP3 sets CONFIG_DM arch/arm/cpu/armv7/omap3/Kconfig and defines it also in omap3_beagle_defconfig and devkit8000_defconfig. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Showing 43 changed files with 64 additions and 230 deletions Side-by-side Diff
- arch/Kconfig
- arch/arm/Kconfig
- arch/arm/cpu/armv7/exynos/Kconfig
- arch/arm/cpu/armv7/omap3/Kconfig
- arch/arm/mach-bcm283x/Kconfig
- arch/arm/mach-tegra/Kconfig
- arch/powerpc/cpu/ppc4xx/Kconfig
- arch/sandbox/Kconfig
- arch/x86/Kconfig
- board/amcc/canyonlands/Kconfig
- board/compulab/cm_t335/Kconfig
- board/gumstix/pepper/Kconfig
- board/isee/igep0033/Kconfig
- board/phytec/pcm051/Kconfig
- board/samsung/goni/Kconfig
- board/samsung/smdkc100/Kconfig
- board/silica/pengwyn/Kconfig
- board/ti/am335x/Kconfig
- configs/am335x_boneblack_vboot_defconfig
- configs/am3517_crane_defconfig
- configs/am3517_evm_defconfig
- configs/cm_t3517_defconfig
- configs/cm_t35_defconfig
- configs/devkit8000_defconfig
- configs/dig297_defconfig
- configs/eco5pk_defconfig
- configs/mcx_defconfig
- configs/mt_ventoux_defconfig
- configs/nokia_rx51_defconfig
- configs/omap3_beagle_defconfig
- configs/omap3_evm_defconfig
- configs/omap3_evm_quick_mmc_defconfig
- configs/omap3_evm_quick_nand_defconfig
- configs/omap3_ha_defconfig
- configs/omap3_logic_defconfig
- configs/omap3_mvblx_defconfig
- configs/omap3_pandora_defconfig
- configs/omap3_sdp3430_defconfig
- configs/sandbox_defconfig
- configs/tao3530_defconfig
- configs/tricorder_defconfig
- configs/tricorder_flash_defconfig
- configs/twister_defconfig
arch/Kconfig
... | ... | @@ -70,6 +70,12 @@ |
70 | 70 | select HAVE_GENERIC_BOARD |
71 | 71 | select SYS_GENERIC_BOARD |
72 | 72 | select SUPPORT_OF_CONTROL |
73 | + select DM | |
74 | + select DM_SPI_FLASH | |
75 | + select DM_SERIAL | |
76 | + select DM_I2C | |
77 | + select DM_SPI | |
78 | + select DM_GPIO | |
73 | 79 | |
74 | 80 | config SH |
75 | 81 | bool "SuperH architecture" |
... | ... | @@ -84,6 +90,9 @@ |
84 | 90 | select HAVE_GENERIC_BOARD |
85 | 91 | select SYS_GENERIC_BOARD |
86 | 92 | select SUPPORT_OF_CONTROL |
93 | + select DM | |
94 | + select DM_SERIAL | |
95 | + select DM_GPIO | |
87 | 96 | |
88 | 97 | endchoice |
89 | 98 |
arch/arm/Kconfig
... | ... | @@ -293,6 +293,9 @@ |
293 | 293 | |
294 | 294 | config ARCH_BCM283X |
295 | 295 | bool "Broadcom BCM283X family" |
296 | + select DM | |
297 | + select DM_SERIAL | |
298 | + select DM_GPIO | |
296 | 299 | |
297 | 300 | config TARGET_INTEGRATORAP_CM946ES |
298 | 301 | bool "Support integratorap_cm946es" |
299 | 302 | |
300 | 303 | |
301 | 304 | |
... | ... | @@ -330,21 +333,33 @@ |
330 | 333 | bool "Support cm_t335" |
331 | 334 | select CPU_V7 |
332 | 335 | select SUPPORT_SPL |
336 | + select DM | |
337 | + select DM_SERIAL | |
338 | + select DM_GPIO | |
333 | 339 | |
334 | 340 | config TARGET_PEPPER |
335 | 341 | bool "Support pepper" |
336 | 342 | select CPU_V7 |
337 | 343 | select SUPPORT_SPL |
344 | + select DM | |
345 | + select DM_SERIAL | |
346 | + select DM_GPIO | |
338 | 347 | |
339 | 348 | config TARGET_AM335X_IGEP0033 |
340 | 349 | bool "Support am335x_igep0033" |
341 | 350 | select CPU_V7 |
342 | 351 | select SUPPORT_SPL |
352 | + select DM | |
353 | + select DM_SERIAL | |
354 | + select DM_GPIO | |
343 | 355 | |
344 | 356 | config TARGET_PCM051 |
345 | 357 | bool "Support pcm051" |
346 | 358 | select CPU_V7 |
347 | 359 | select SUPPORT_SPL |
360 | + select DM | |
361 | + select DM_SERIAL | |
362 | + select DM_GPIO | |
348 | 363 | |
349 | 364 | config TARGET_DRACO |
350 | 365 | bool "Support draco" |
351 | 366 | |
... | ... | @@ -370,11 +385,17 @@ |
370 | 385 | bool "Support pengwyn" |
371 | 386 | select CPU_V7 |
372 | 387 | select SUPPORT_SPL |
388 | + select DM | |
389 | + select DM_SERIAL | |
390 | + select DM_GPIO | |
373 | 391 | |
374 | 392 | config TARGET_AM335X_EVM |
375 | 393 | bool "Support am335x_evm" |
376 | 394 | select CPU_V7 |
377 | 395 | select SUPPORT_SPL |
396 | + select DM | |
397 | + select DM_SERIAL | |
398 | + select DM_GPIO | |
378 | 399 | |
379 | 400 | config TARGET_AM43XX_EVM |
380 | 401 | bool "Support am43xx_evm" |
381 | 402 | |
... | ... | @@ -419,10 +440,18 @@ |
419 | 440 | config ARCH_EXYNOS |
420 | 441 | bool "Samsung EXYNOS" |
421 | 442 | select CPU_V7 |
443 | + select DM | |
444 | + select DM_SPI_FLASH | |
445 | + select DM_SERIAL | |
446 | + select DM_SPI | |
447 | + select DM_GPIO | |
422 | 448 | |
423 | 449 | config ARCH_S5PC1XX |
424 | 450 | bool "Samsung S5PC1XX" |
425 | 451 | select CPU_V7 |
452 | + select DM | |
453 | + select DM_SERIAL | |
454 | + select DM_GPIO | |
426 | 455 | |
427 | 456 | config ARCH_HIGHBANK |
428 | 457 | bool "Calxeda Highbank" |
... | ... | @@ -632,6 +661,12 @@ |
632 | 661 | select SPL |
633 | 662 | select OF_CONTROL |
634 | 663 | select CPU_V7 |
664 | + select DM | |
665 | + select DM_SPI_FLASH | |
666 | + select DM_SERIAL | |
667 | + select DM_I2C | |
668 | + select DM_SPI | |
669 | + select DM_GPIO | |
635 | 670 | |
636 | 671 | config TARGET_VEXPRESS64_AEMV8A |
637 | 672 | bool "Support vexpress_aemv8a" |
arch/arm/cpu/armv7/exynos/Kconfig
... | ... | @@ -65,21 +65,6 @@ |
65 | 65 | config SYS_SOC |
66 | 66 | default "exynos" |
67 | 67 | |
68 | -config DM | |
69 | - default y | |
70 | - | |
71 | -config DM_SERIAL | |
72 | - default y | |
73 | - | |
74 | -config DM_SPI | |
75 | - default y | |
76 | - | |
77 | -config DM_SPI_FLASH | |
78 | - default y | |
79 | - | |
80 | -config DM_GPIO | |
81 | - default y | |
82 | - | |
83 | 68 | config DM_USB |
84 | 69 | default y |
85 | 70 |
arch/arm/cpu/armv7/omap3/Kconfig
... | ... | @@ -17,6 +17,9 @@ |
17 | 17 | config TARGET_OMAP3_BEAGLE |
18 | 18 | bool "TI OMAP3 BeagleBoard" |
19 | 19 | select SUPPORT_SPL |
20 | + select DM | |
21 | + select DM_SERIAL | |
22 | + select DM_GPIO | |
20 | 23 | |
21 | 24 | config TARGET_CM_T35 |
22 | 25 | bool "CompuLab CM-T3530 and CM-T3730 boards" |
... | ... | @@ -28,6 +31,9 @@ |
28 | 31 | config TARGET_DEVKIT8000 |
29 | 32 | bool "TimLL OMAP3 Devkit8000" |
30 | 33 | select SUPPORT_SPL |
34 | + select DM | |
35 | + select DM_SERIAL | |
36 | + select DM_GPIO | |
31 | 37 | |
32 | 38 | config TARGET_OMAP3_EVM |
33 | 39 | bool "TI OMAP3 EVM" |
34 | 40 | |
35 | 41 | |
... | ... | @@ -44,13 +50,22 @@ |
44 | 50 | config TARGET_OMAP3_IGEP00X0 |
45 | 51 | bool "IGEP" |
46 | 52 | select SUPPORT_SPL |
53 | + select DM | |
54 | + select DM_SERIAL | |
55 | + select DM_GPIO | |
47 | 56 | |
48 | 57 | config TARGET_OMAP3_OVERO |
49 | 58 | bool "OMAP35xx Gumstix Overo" |
50 | 59 | select SUPPORT_SPL |
60 | + select DM | |
61 | + select DM_SERIAL | |
62 | + select DM_GPIO | |
51 | 63 | |
52 | 64 | config TARGET_OMAP3_ZOOM1 |
53 | 65 | bool "TI Zoom1" |
66 | + select DM | |
67 | + select DM_SERIAL | |
68 | + select DM_GPIO | |
54 | 69 | |
55 | 70 | config TARGET_AM3517_CRANE |
56 | 71 | bool "am3517_crane" |
57 | 72 | |
... | ... | @@ -94,17 +109,11 @@ |
94 | 109 | config TARGET_OMAP3_CAIRO |
95 | 110 | bool "QUIPOS CAIRO" |
96 | 111 | select SUPPORT_SPL |
112 | + select DM | |
113 | + select DM_SERIAL | |
114 | + select DM_GPIO | |
97 | 115 | |
98 | 116 | endchoice |
99 | - | |
100 | -config DM | |
101 | - default y | |
102 | - | |
103 | -config DM_GPIO | |
104 | - default y if DM | |
105 | - | |
106 | -config DM_SERIAL | |
107 | - default y if DM | |
108 | 117 | |
109 | 118 | config SYS_SOC |
110 | 119 | default "omap3" |
arch/arm/mach-bcm283x/Kconfig
arch/arm/mach-tegra/Kconfig
... | ... | @@ -23,25 +23,7 @@ |
23 | 23 | config USE_PRIVATE_LIBGCC |
24 | 24 | default y |
25 | 25 | |
26 | -config DM | |
27 | - default y | |
28 | - | |
29 | 26 | config SPL_DM |
30 | - default y | |
31 | - | |
32 | -config DM_SERIAL | |
33 | - default y | |
34 | - | |
35 | -config DM_SPI | |
36 | - default y | |
37 | - | |
38 | -config DM_SPI_FLASH | |
39 | - default y | |
40 | - | |
41 | -config DM_I2C | |
42 | - default y | |
43 | - | |
44 | -config DM_GPIO | |
45 | 27 | default y |
46 | 28 | |
47 | 29 | source "arch/arm/mach-tegra/tegra20/Kconfig" |
arch/powerpc/cpu/ppc4xx/Kconfig
arch/sandbox/Kconfig
... | ... | @@ -10,24 +10,6 @@ |
10 | 10 | config SYS_CONFIG_NAME |
11 | 11 | default "sandbox" |
12 | 12 | |
13 | -config DM | |
14 | - default y | |
15 | - | |
16 | -config DM_GPIO | |
17 | - default y | |
18 | - | |
19 | -config DM_SERIAL | |
20 | - default y | |
21 | - | |
22 | -config DM_SPI | |
23 | - default y | |
24 | - | |
25 | -config DM_SPI_FLASH | |
26 | - default y | |
27 | - | |
28 | -config DM_I2C | |
29 | - default y | |
30 | - | |
31 | 13 | config DM_TEST |
32 | 14 | default y |
33 | 15 |
arch/x86/Kconfig
board/amcc/canyonlands/Kconfig
board/compulab/cm_t335/Kconfig
board/gumstix/pepper/Kconfig
board/isee/igep0033/Kconfig
board/phytec/pcm051/Kconfig
board/samsung/goni/Kconfig
board/samsung/smdkc100/Kconfig
board/silica/pengwyn/Kconfig
board/ti/am335x/Kconfig
configs/am335x_boneblack_vboot_defconfig
configs/am3517_crane_defconfig
configs/am3517_evm_defconfig
configs/cm_t3517_defconfig
configs/cm_t35_defconfig
configs/devkit8000_defconfig
configs/dig297_defconfig
configs/eco5pk_defconfig
configs/mcx_defconfig
configs/mt_ventoux_defconfig
configs/nokia_rx51_defconfig
configs/omap3_beagle_defconfig
configs/omap3_evm_defconfig
configs/omap3_evm_quick_mmc_defconfig
configs/omap3_evm_quick_nand_defconfig
configs/omap3_ha_defconfig
configs/omap3_logic_defconfig
configs/omap3_mvblx_defconfig
configs/omap3_pandora_defconfig
configs/omap3_sdp3430_defconfig
configs/sandbox_defconfig
configs/tao3530_defconfig
configs/tricorder_defconfig
configs/tricorder_flash_defconfig