aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ar71xx/patches-4.14/604-MIPS-ath79-no-of.patch
blob: 499145ecd0f89226074415dabf59a16ded2c36e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -202,7 +202,6 @@ config ATH79
 	select SYS_SUPPORTS_BIG_ENDIAN
 	select SYS_SUPPORTS_MIPS16
 	select SYS_SUPPORTS_ZBOOT_UART_PROM
-	select USE_OF
 	help
 	  Support for the Atheros AR71XX/AR724X/AR913X SoCs.
 
--- a/arch/mips/ath79/setup.c
+++ b/arch/mips/ath79/setup.c
@@ -196,16 +196,20 @@ unsigned int get_c0_compare_int(void)
 
 void __init plat_mem_setup(void)
 {
+#ifdef CONFIG_OF
 	unsigned long fdt_start;
+#endif
 
 	set_io_port_base(KSEG1);
 
+#ifdef CONFIG_OF
 	/* Get the position of the FDT passed by the bootloader */
 	fdt_start = fw_getenvl("fdt_start");
 	if (fdt_start)
 		__dt_setup_arch((void *)KSEG0ADDR(fdt_start));
 	else if (fw_passed_dtb)
 		__dt_setup_arch((void *)KSEG0ADDR(fw_passed_dtb));
+#endif
 
 	if (mips_machtype != ATH79_MACH_GENERIC_OF) {
 		ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE,
@@ -301,17 +305,21 @@ static int __init ath79_setup(void)
 
 arch_initcall(ath79_setup);
 
+#ifdef CONFIG_OF
 void __init device_tree_init(void)
 {
 	unflatten_and_copy_device_tree();
 }
+#endif
 
 MIPS_MACHINE(ATH79_MACH_GENERIC,
 	     "Generic",
 	     "Generic AR71XX/AR724X/AR913X based board",
 	     NULL);
 
+#ifdef CONFIG_OF
 MIPS_MACHINE(ATH79_MACH_GENERIC_OF,
 	     "DTB",
 	     "Generic AR71XX/AR724X/AR913X based board (DT)",
 	     NULL);
+#endif
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -32,10 +32,12 @@
 #define AR724X_BASE_FREQ	40000000
 
 static struct clk *clks[ATH79_CLK_END];
+#ifdef CONFIG_OF
 static struct clk_onecell_data clk_data = {
 	.clks = clks,
 	.clk_num = ARRAY_SIZE(clks),
 };
+#endif
 
 static struct clk *__init ath79_add_sys_clkdev(
 	const char *id, unsigned long rate)