Tool/software: Linux
Can anyone give me some hints about the proper way to auto boot pru firmware from a driver? I have a custom driver with an rpmsg implementation that uses pru-rproc. Previously I was relying on pru_rproc_probe() to load the pru firmware. However when updating to a more recent kernel I noticed that pru_rproc.c now contains the following:
/*
* rproc_add will auto-boot the processor normally, but this is
* not desired with PRU client driven boot-flow methodoly. A PRU
* application/client driver will boot the corresponding PRU
* remote-processor as part of its state machine either through
* the remoteproc sysfs interface or through the equivalent kernel API
*/
rproc->auto_boot = false;
I can use sysfs if need be, but I would prefer to keep this in the driver. It looks like a call to rproc_boot() will do what I want. However since I am using pru-rproc I need the rproc struct that is generated by rproc_alloc() in pru_rproc_probe(). I am guessing I need some combination of deferred driver probe and maybe an extra phandle in my driver's device tree node to get the necessary rproc pointer? Does anybody have advice about the proper way to do this?