Commit 58d423b88e5bc1b6e43aa04a05feccd0e737c061

Authored by Masahiro Yamada
Committed by Simon Glass
1 parent b3d023b405

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

... ... @@ -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  
... ... @@ -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
... ... @@ -14,15 +14,6 @@
14 14  
15 15 endchoice
16 16  
17   -config DM
18   - default y
19   -
20   -config DM_SERIAL
21   - default y
22   -
23   -config DM_GPIO
24   - default y
25   -
26 17 config PHYS_TO_BUS
27 18 default y
28 19  
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
... ... @@ -43,6 +43,8 @@
43 43  
44 44 config TARGET_CANYONLANDS
45 45 bool "Support canyonlands"
  46 + select DM
  47 + select DM_SERIAL
46 48  
47 49 config TARGET_EBONY
48 50 bool "Support ebony"
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  
... ... @@ -81,18 +81,6 @@
81 81  
82 82 endchoice
83 83  
84   -config DM
85   - default y
86   -
87   -config DM_GPIO
88   - default y
89   -
90   -config DM_SERIAL
91   - default y
92   -
93   -config DM_SERIAL
94   - default y
95   -
96 84 config DM_SPI
97 85 default y
98 86  
board/amcc/canyonlands/Kconfig
... ... @@ -33,11 +33,5 @@
33 33 bool
34 34 default y
35 35  
36   -config DM
37   - default y
38   -
39   -config DM_SERIAL
40   - default y
41   -
42 36 endif
board/compulab/cm_t335/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "cm_t335"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/gumstix/pepper/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "pepper"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/isee/igep0033/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "am335x_igep0033"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/phytec/pcm051/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "pcm051"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/samsung/goni/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "s5p_goni"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/samsung/smdkc100/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "smdkc100"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/silica/pengwyn/Kconfig
... ... @@ -12,14 +12,5 @@
12 12 config SYS_CONFIG_NAME
13 13 default "pengwyn"
14 14  
15   -config DM
16   - default y
17   -
18   -config DM_GPIO
19   - default y
20   -
21   -config DM_SERIAL
22   - default y
23   -
24 15 endif
board/ti/am335x/Kconfig
... ... @@ -38,14 +38,5 @@
38 38 as the ROM only partially sets up pinmux. We also default to using
39 39 NOR for environment.
40 40  
41   -config DM
42   - default y
43   -
44   -config DM_GPIO
45   - default y if DM
46   -
47   -config DM_SERIAL
48   - default y if DM
49   -
50 41 endif
configs/am335x_boneblack_vboot_defconfig
... ... @@ -9,5 +9,4 @@
9 9 CONFIG_FIT=y
10 10 CONFIG_FIT_VERBOSE=y
11 11 CONFIG_FIT_SIGNATURE=y
12   -CONFIG_DM=y
configs/am3517_crane_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_AM3517_CRANE=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/am3517_evm_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_AM3517_EVM=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/cm_t3517_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_CM_T3517=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/cm_t35_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_CM_T35=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/devkit8000_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_DEVKIT8000=y
5   -CONFIG_DM=y
6   -CONFIG_DM_SERIAL=y
7   -CONFIG_DM_GPIO=y
configs/dig297_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_OMAP34XX=y
3 3 CONFIG_TARGET_DIG297=y
4   -CONFIG_DM=n
5   -CONFIG_DM_SERIAL=n
6   -CONFIG_DM_GPIO=n
configs/eco5pk_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_ECO5PK=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/mcx_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_MCX=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/mt_ventoux_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_MT_VENTOUX=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/nokia_rx51_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_OMAP34XX=y
3 3 CONFIG_TARGET_NOKIA_RX51=y
4   -CONFIG_DM=n
5   -CONFIG_DM_SERIAL=n
6   -CONFIG_DM_GPIO=n
configs/omap3_beagle_defconfig
... ... @@ -3,7 +3,4 @@
3 3 CONFIG_ARM=y
4 4 CONFIG_OMAP34XX=y
5 5 CONFIG_TARGET_OMAP3_BEAGLE=y
6   -CONFIG_DM=y
7   -CONFIG_DM_GPIO=y
8   -CONFIG_DM_SERIAL=y
configs/omap3_evm_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_OMAP3_EVM=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/omap3_evm_quick_mmc_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_OMAP3_EVM_QUICK_MMC=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/omap3_evm_quick_nand_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_OMAP3_EVM_QUICK_NAND=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/omap3_ha_defconfig
... ... @@ -3,7 +3,4 @@
3 3 CONFIG_ARM=y
4 4 CONFIG_OMAP34XX=y
5 5 CONFIG_TARGET_TAO3530=y
6   -CONFIG_DM=n
7   -CONFIG_DM_SERIAL=n
8   -CONFIG_DM_GPIO=n
configs/omap3_logic_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_OMAP34XX=y
3 3 CONFIG_TARGET_OMAP3_LOGIC=y
4   -CONFIG_DM=n
5   -CONFIG_DM_SERIAL=n
6   -CONFIG_DM_GPIO=n
configs/omap3_mvblx_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_OMAP34XX=y
3 3 CONFIG_TARGET_OMAP3_MVBLX=y
4   -CONFIG_DM=n
5   -CONFIG_DM_SERIAL=n
6   -CONFIG_DM_GPIO=n
configs/omap3_pandora_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_OMAP34XX=y
3 3 CONFIG_TARGET_OMAP3_PANDORA=y
4   -CONFIG_DM=n
5   -CONFIG_DM_SERIAL=n
6   -CONFIG_DM_GPIO=n
configs/omap3_sdp3430_defconfig
1 1 CONFIG_ARM=y
2 2 CONFIG_OMAP34XX=y
3 3 CONFIG_TARGET_OMAP3_SDP3430=y
4   -CONFIG_DM=n
5   -CONFIG_DM_SERIAL=n
6   -CONFIG_DM_GPIO=n
configs/sandbox_defconfig
... ... @@ -3,7 +3,6 @@
3 3 CONFIG_FIT=y
4 4 CONFIG_FIT_VERBOSE=y
5 5 CONFIG_FIT_SIGNATURE=y
6   -CONFIG_DM=y
7 6 CONFIG_DEFAULT_DEVICE_TREE="sandbox"
8 7 CONFIG_CROS_EC=y
9 8 CONFIG_CROS_EC_SANDBOX=y
configs/tao3530_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_TAO3530=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/tricorder_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_TRICORDER=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n
configs/tricorder_flash_defconfig
... ... @@ -3,7 +3,4 @@
3 3 CONFIG_ARM=y
4 4 CONFIG_OMAP34XX=y
5 5 CONFIG_TARGET_TRICORDER=y
6   -CONFIG_DM=n
7   -CONFIG_DM_SERIAL=n
8   -CONFIG_DM_GPIO=n
configs/twister_defconfig
... ... @@ -2,7 +2,4 @@
2 2 CONFIG_ARM=y
3 3 CONFIG_OMAP34XX=y
4 4 CONFIG_TARGET_TWISTER=y
5   -CONFIG_DM=n
6   -CONFIG_DM_SERIAL=n
7   -CONFIG_DM_GPIO=n