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

Thomas Zimmermann tzimmermann at suse.de
Tue Apr 19 04:09:28 AEST 2022


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20220418/0f3db8db/attachment.sig>


More information about the Linuxppc-dev mailing list