1
0

604-MIPS-ath79-no-of.patch 1.7 KB

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