Make CONFIG_OF user selectable
Subsystems (2)
Rob Herring
maintainercover Make CONFIG_OF user selectable
There are a couple of reasons we'd like to have CONFIG_OF be user visible and enabled. The first is DT overlays can be used on architectures regardless of whether they use DT for booting. One example is running DT unittests on x86. The second is simply to expand the compile coverage of the DT code. This change enables building DT code on x86 allyesconfig and allmodconfig.
Rob
Rob Herring (3):
MIPS: prepare for user enabling of CONFIG_OF
of: make CONFIG_OF user selectable
of: make unittest select OF_EARLY_FLATTREE instead of depend on it
arch/mips/include/asm/prom.h | 2 +- arch/mips/kernel/prom.c | 1 + drivers/of/Kconfig | 12 ++++++------ 3 files changed, 8 insertions(+), 7 deletions(-)
Signature · 6 lines
2.1.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Rob Herring
maintainerPATCH 1/3 MIPS: prepare for user enabling of CONFIG_OF
In preparation to allow users to enable DeviceTree without arch or machine selecting it, we need to fix build errors on MIPS. When CONFIG_OF is enabled, device_tree_init cannot be resolved. This is trivially fixed by using CONFIG_USE_OF instead of CONFIG_OF for prom.h.
--- arch/mips/include/asm/prom.h | 2 +- arch/mips/kernel/prom.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
arch/mips/include/asm/prom.h +1 -1
@@ -11,7 +11,7 @@#ifndef __ASM_PROM_H#define __ASM_PROM_H -#ifdef CONFIG_OF +#ifdef CONFIG_USE_OF #include <linux/bug.h> #include <linux/io.h> #include <linux/types.h>
arch/mips/kernel/prom.c +1 -0
@@ -18,6 +18,7 @@#include <linux/of_fdt.h> #include <linux/of_platform.h> +#include <asm/bootinfo.h> #include <asm/page.h> #include <asm/prom.h>
Signature · 1 line
2.1.0
Re: [PATCH 1/3] MIPS: prepare for user enabling of CONFIG_OF
Quoted 4 lines · Rob Herring
In preparation to allow users to enable DeviceTree without arch or machine selecting it, we need to fix build errors on MIPS. When
CONFIG_OFis enabled,device_tree_initcannot be resolved. This is trivially fixed by usingCONFIG_USE_OFinstead ofCONFIG_OFforprom.h.
Want to take this through your tree? If so,
Ralf
Grant Likely
Acked-byRe: [PATCH 1/3] MIPS: prepare for user enabling of CONFIG_OF
Quoted 7 lines · Ralf Baechle
Quoted 4 lines · Rob Herring
In preparation to allow users to enable DeviceTree without arch or machine selecting it, we need to fix build errors on MIPS. When
CONFIG_OFis enabled,device_tree_initcannot be resolved. This is trivially fixed by usingCONFIG_USE_OFinstead ofCONFIG_OFforprom.h.
Quoted 5 lines
Want to take this through your tree? If so,
Acked-by Ralf Baechle <[email protected]>Ralf
For the whole series:
Rob Herring
maintainerPATCH 2/3 of: make CONFIG_OF user selectable
In reply to Rob HerringWith the addition of overlays, it is now plausible to use DT on any arch and without an arch using it at boot time. It is also desirable to expand the compile coverage of the DT code. Make CONFIG_OF user selectable by converting the menu to menuconfig.
--- drivers/of/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/of/Kconfig +4 -5
@@ -1,11 +1,10 @@ config DTC bool -config OF - bool +menuconfig OF + bool "Device Tree and Open Firmware support" -menu "Device Tree and Open Firmware support" - depends on OF +if OF config OF_UNITTEST bool "Device Tree runtime unit tests"
@@ -97,4 +96,4 @@ config OF_OVERLAY While this option is selected automatically when needed, you can enable it manually to improve device tree unit test coverage. -endmenu # OF +endif # OF
Signature · 6 lines
2.1.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] of: make CONFIG_OF user selectable
Hi Rob,
Quoted 4 lines · Rob Herring
With the addition of overlays, it is now plausible to use DT on any arch and without an arch using it at boot time. It is also desirable to expand the compile coverage of the DT code. Make
CONFIG_OFuser selectable by converting the menu to menuconfig.
Thanks!
Quoted 4 lines
Signed-off-by Rob Herring <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Pantelis Antoniou <pantelis.antoniou-OWPKS81ov/FWk0Htik3J/[email protected]>Cc Grant Likely <[email protected]>
with one minor docu nit below.
Quoted 9 lines
--- drivers/of/Kconfig | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)drivers/of/Kconfig +0
-0
drivers/of/Kconfig line 5
Quoted 7 lines
drivers/of/Kconfig +2
-2@@ -1,11 +1,10 @@ config DTC bool -config OF - bool +menuconfig OF + bool "Device Tree and Open Firmware support"
This needs a help text. In "[PATCH 1/3] of: Allow OF to be enabled if COMPILE_TEST to increase coverage", I had:
+ This option enables the device tree infrastructure. + If is automatically selected by platforms that need it, but can + be enabled manually to increase compile-coverage.
Feel free to adapt...
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] of: make CONFIG_OF user selectable
In reply to Rob HerringHi Rob,
Quoted 43 lines · Rob Herring
With the addition of overlays, it is now plausible to use DT on any arch and without an arch using it at boot time. It is also desirable to expand the compile coverage of the DT code. Make
CONFIG_OFuser selectable by converting the menu to menuconfig.Signed-off-by Rob Herring <[email protected]>Cc Geert Uytterhoeven <[email protected]>Cc Pantelis Antoniou <[email protected]>Cc Grant Likely <[email protected]>---
drivers/of/Kconfig| 9 ++++-----1 file changed, 4 insertions(+), 5 deletions(-)drivers/of/Kconfig +0
-0@@ -1,11 +1,10 @@config DTC
booldrivers/of/Kconfig +3
-4-config OF - bool +menuconfig OF + bool "Device Tree and Open Firmware support" -menu "Device Tree and Open Firmware support" - depends on OF +if OFconfig
OF_UNITTEST
bool "Device Tree runtime unit tests"drivers/of/Kconfig +1
-1@@ -97,4 +96,4 @@ config OF_OVERLAY While this option is selected automatically when needed, you can enable it manually to improve device tree unit test coverage. -endmenu # OF +endif # OFSignature · 1 line
2.1.0
Rob Herring
maintainerPATCH 3/3 of: make unittest select OF_EARLY_FLATTREE instead of depend on it
In reply to Rob HerringThe DT unittest currently requires an arch (typically) to select OF_EARLY_FLATTREE. Remove this dependency by selecting it directly so that the unittest can be enabled easily on any architecture. With this and the prior commit, we can easily enable and run unittests starting with x86 defconfig rather than hunting for the combination of config options to enable OF on x86.
--- drivers/of/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/of/Kconfig +2 -1
@@ -8,7 +8,8 @@ if OF config OF_UNITTEST bool "Device Tree runtime unit tests" - depends on OF_IRQ && OF_EARLY_FLATTREE + depends on OF_IRQ + select OF_EARLY_FLATTREE select OF_RESOLVE help This option builds in test cases for the device tree infrastructure
Signature · 6 lines
2.1.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html