Commit dc3119e700216a70e82fe07a79f1618852058354

Authored by Thomas Gleixner
1 parent fe239545a1

x86: OLPC: Cleanup config maze completely

Neither CONFIG_OLPC_OPENFIRMWARE nor CONFIG_OLPC_OPENFIRMWARE_DT are
really necessary.

OLPC selects OLPC_OPENFIRMWARE unconditionally, so move the "select
OF" part under OLPC config option and fixup the dependencies in
Makefiles and code.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andres Salomon <dilinger@queued.net>

Showing 4 changed files with 5 additions and 20 deletions Side-by-side Diff

... ... @@ -2066,9 +2066,10 @@
2066 2066  
2067 2067 config OLPC
2068 2068 bool "One Laptop Per Child support"
2069   - select GPIOLIB
2070   - select OLPC_OPENFIRMWARE
2071 2069 depends on !X86_PAE
  2070 + select GPIOLIB
  2071 + select OF
  2072 + select OLPC_OPENFIRMWARE_DT if PROC_DEVICETREE
2072 2073 ---help---
2073 2074 Add support for detecting the unique features of the OLPC
2074 2075 XO hardware.
... ... @@ -2078,11 +2079,6 @@
2078 2079 depends on OLPC && MFD_CS5535
2079 2080 ---help---
2080 2081 Add support for non-essential features of the OLPC XO-1 laptop.
2081   -
2082   -config OLPC_OPENFIRMWARE
2083   - bool
2084   - select OF
2085   - select OLPC_OPENFIRMWARE_DT if PROC_DEVICETREE
2086 2082  
2087 2083 config OLPC_OPENFIRMWARE_DT
2088 2084 bool
arch/x86/include/asm/olpc_ofw.h
... ... @@ -6,8 +6,6 @@
6 6  
7 7 #define OLPC_OFW_SIG 0x2057464F /* aka "OFW " */
8 8  
9   -#ifdef CONFIG_OLPC_OPENFIRMWARE
10   -
11 9 extern bool olpc_ofw_is_installed(void);
12 10  
13 11 /* run an OFW command by calling into the firmware */
... ... @@ -25,15 +23,6 @@
25 23  
26 24 /* check if OFW was detected during boot */
27 25 extern bool olpc_ofw_present(void);
28   -
29   -#else /* !CONFIG_OLPC_OPENFIRMWARE */
30   -
31   -static inline bool olpc_ofw_is_installed(void) { return false; }
32   -static inline void olpc_ofw_detect(void) { }
33   -static inline void setup_olpc_ofw_pgd(void) { }
34   -static inline bool olpc_ofw_present(void) { return false; }
35   -
36   -#endif /* !CONFIG_OLPC_OPENFIRMWARE */
37 26  
38 27 #ifdef CONFIG_OLPC_OPENFIRMWARE_DT
39 28 extern void olpc_dt_build_devicetree(void);
arch/x86/kernel/head_32.S
... ... @@ -137,7 +137,7 @@
137 137 movsl
138 138 1:
139 139  
140   -#ifdef CONFIG_OLPC_OPENFIRMWARE
  140 +#ifdef CONFIG_OLPC
141 141 /* save OFW's pgdir table for later use when calling into OFW */
142 142 movl %cr3, %eax
143 143 movl %eax, pa(olpc_ofw_pgd)
arch/x86/platform/olpc/Makefile
1 1 obj-$(CONFIG_OLPC) += olpc.o
2 2 obj-$(CONFIG_OLPC_XO1) += olpc-xo1.o
3   -obj-$(CONFIG_OLPC_OPENFIRMWARE) += olpc_ofw.o
  3 +obj-$(CONFIG_OLPC) += olpc_ofw.o
4 4 obj-$(CONFIG_OLPC_OPENFIRMWARE_DT) += olpc_dt.o