SHARE
TWEET

ARV752DPW22-enable_model_dts.patch

a guest Mar 26th, 2013 169 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --- /dev/null   2013-03-25 07:44:29.698331012 +0100
  2. +++ target/linux/lantiq/patches-3.8/0100-MIPS-lantiq-honour-model-property-inside-devicetree-.patch     2013-03-25 22:47:42.992373476 +0100
  3. @@ -0,0 +1,54 @@
  4. +From 60bc3043590bf74ca1c9dd88a4e5f28a40d5b348 Mon Sep 17 00:00:00 2001
  5. +From: John Crispin <blogic@openwrt.org>
  6. +Date: Thu, 6 Dec 2012 10:26:05 +0100
  7. +Subject: [PATCH 100/123] MIPS: lantiq: honour model property inside
  8. + devicetree during board init
  9. +
  10. +---
  11. + arch/mips/lantiq/prom.c |   20 ++++++++++++++++++--
  12. + 1 file changed, 18 insertions(+), 2 deletions(-)
  13. +
  14. +--- a/arch/mips/lantiq/prom.c
  15. ++++ b/arch/mips/lantiq/prom.c
  16. +@@ -59,6 +59,21 @@ static void __init prom_init_cmdline(voi
  17. +
  18. + extern struct boot_param_header __image_dtb;
  19. +
  20. ++int __init early_init_dt_scan_model(unsigned long node,
  21. ++                                      const char *uname, int depth,
  22. ++                                      void *data)
  23. ++{
  24. ++      if (!depth) {
  25. ++              char *model = of_get_flat_dt_prop(node, "model", NULL);
  26. ++              if (model) {
  27. ++                      pr_info("Board: %s\n", model);
  28. ++                      snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN, "%s - %s",
  29. ++                              soc_info.sys_type, model);
  30. ++              }
  31. ++      }
  32. ++      return 0;
  33. ++}
  34. ++
  35. + void __init plat_mem_setup(void)
  36. + {
  37. +       ioport_resource.start = IOPORT_RESOURCE_START;
  38. +@@ -73,6 +88,8 @@ void __init plat_mem_setup(void)
  39. +        * parsed resulting in our memory appearing
  40. +        */
  41. +       __dt_setup_arch(&__image_dtb);
  42. ++
  43. ++      of_scan_flat_dt(early_init_dt_scan_model, NULL);
  44. + }
  45. +
  46. + void __init device_tree_init(void)
  47. +@@ -95,9 +112,8 @@ void __init prom_init(void)
  48. + {
  49. +       /* call the soc specific detetcion code and get it to fill soc_info */
  50. +       ltq_soc_detect(&soc_info);
  51. +-      snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN - 1, "%s rev %s",
  52. ++      snprintf(soc_info.sys_type, LTQ_SYS_TYPE_LEN, "%s rev %s",
  53. +               soc_info.name, soc_info.rev_type);
  54. +-      soc_info.sys_type[LTQ_SYS_TYPE_LEN - 1] = '\0';
  55. +       pr_info("SoC: %s\n", soc_info.sys_type);
  56. +       prom_init_cmdline();
  57. +
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top