Re: [PATCH 1/2] of: Create platform devices for OF framebuffers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi

Am 13.04.22 um 14:51 schrieb Rob Herring:
...
+
  /**
   * of_platform_populate() - Populate platform_devices from device tree data
   * @root: parent of the first level to probe or NULL for the root of the tree
@@ -541,9 +595,7 @@ static int __init of_platform_default_populate_init(void)
                 of_node_put(node);
         }

-       node = of_get_compatible_child(of_chosen, "simple-framebuffer");
-       of_platform_device_create(node, NULL, NULL);
-       of_node_put(node);
+       of_platform_populate_framebuffers();

         /* Populate everything else. */
         of_platform_default_populate(NULL, NULL, NULL);

I'm pretty sure it's just this call that's the problem for PPC though
none of the above existed when adding this caused a regression. Can we
remove the ifdef and just make this call conditional on
!IS_ENABLED(CONFIG_PPC).

That didn't work. The boot process stops at some point. I'll send you an updated patch that covers most of the function with IS_ENABLED(CONFIG_PPC)

Best regards
Thomas



@@ -551,6 +603,20 @@ static int __init of_platform_default_populate_init(void)
         return 0;
  }
  arch_initcall_sync(of_platform_default_populate_init);
+#else
+static int __init of_platform_default_populate_init(void)
+{
+       device_links_supplier_sync_state_pause();
+
+       if (!of_have_populated_dt())
+               return -ENODEV;
+
+       of_platform_populate_framebuffers();
+
+       return 0;
+}
+arch_initcall_sync(of_platform_default_populate_init);
+#endif

  static int __init of_platform_sync_state_init(void)
  {
@@ -558,7 +624,6 @@ static int __init of_platform_sync_state_init(void)
         return 0;
  }
  late_initcall_sync(of_platform_sync_state_init);
-#endif

  int of_platform_device_destroy(struct device *dev, void *data)
  {

--
Thomas Zimmermann
Graphics Driver Developer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5, 90409 Nürnberg, Germany
(HRB 36809, AG Nürnberg)
Geschäftsführer: Ivo Totev

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux