0103-MIPS-OWRTDTB.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. From c174d2250e402399ad7dbdd57d51883d8804bba0 Mon Sep 17 00:00:00 2001
  2. From: John Crispin <blogic@openwrt.org>
  3. Date: Mon, 15 Jul 2013 00:40:37 +0200
  4. Subject: [PATCH 31/33] owrt: MIPS: add OWRTDTB secion
  5. Signed-off-by: John Crispin <blogic@openwrt.org>
  6. ---
  7. arch/mips/kernel/head.S | 3 +++
  8. arch/mips/ralink/Makefile | 2 +-
  9. arch/mips/ralink/of.c | 4 +++-
  10. 3 files changed, 7 insertions(+), 2 deletions(-)
  11. --- a/arch/mips/kernel/head.S
  12. +++ b/arch/mips/kernel/head.S
  13. @@ -86,6 +86,9 @@ EXPORT(__image_cmdline)
  14. .fill 0x400
  15. #endif /* CONFIG_IMAGE_CMDLINE_HACK */
  16. + .ascii "OWRTDTB:"
  17. + EXPORT(__image_dtb)
  18. + .fill 0x4000
  19. __REF
  20. NESTED(kernel_entry, 16, sp) # kernel entry point
  21. --- a/arch/mips/ralink/of.c
  22. +++ b/arch/mips/ralink/of.c
  23. @@ -66,6 +66,8 @@ static int __init early_init_dt_find_mem
  24. return 0;
  25. }
  26. +extern struct boot_param_header __image_dtb;
  27. +
  28. void __init plat_mem_setup(void)
  29. {
  30. set_io_port_base(KSEG1);
  31. @@ -74,7 +76,7 @@ void __init plat_mem_setup(void)
  32. * Load the builtin devicetree. This causes the chosen node to be
  33. * parsed resulting in our memory appearing
  34. */
  35. - __dt_setup_arch(__dtb_start);
  36. + __dt_setup_arch(&__image_dtb);
  37. strlcpy(arcs_cmdline, boot_command_line, COMMAND_LINE_SIZE);