On Mon, Apr 28, 2025 at 04:22:47PM +0200, Casey Connolly wrote: > > > On 4/10/25 14:02, Varadarajan Narayanan wrote: > > Add SYSRESET_EDL to sysreset_t and handle the different SYSRESET_xxx > > requests in sysreset_qcom-psci.c. > > To be honest, I'm not really excited about this. Copying the entire PSCI > reset code and polluting the global sysreset reason enum with entirely > platform specific symbols is not good practise. > > Additionally, while this specific EDL implementation works on your platform, > it does not work on (for example) sdm845 and sm8250 which are platforms we > still very much care about. I'm also not sure if it works on SC7280. > > I think this should be handled in an/the SCM driver like it is in Linux, not > sure if Sam is working on that or if I can send a barebones version of the > one I have in my tree. It will need to be based on the compatible string for > the scm node in DT (and checking for the qcom,dload-mode property too I > think). > > As I proposed before on IRC, I think it makes sense to pass the "reset" > arguments into sysreset and allow the sysreset driver to implement a > callback/handler for them, this way the "edl" argument makes it all the way > to our platform-specific driver which can then call "psci_system_reset2()" > > I would implement this by adding a new op to sysreset_ops, something like > .request_args, then have a second for loop which calls this, since we want > any reset handler which /can/ parse the args to do so before we call the > normal .request callback (otherwise some other handler might do a normal > reset before we have parsed the arguments). > > For now I'm fine with this new sysreset-qcom.c driver being specific to > qcs9100, but please include a comment that the psci reset2 call is only > supported on some newer qualcomm platforms and that others can be supported > via SCM. > > On that note, how does this new driver actually get bound? It doesn't have > any compatible strings associated? Or am I missing something here... Please > explain this. > > Otherwise, I'm looking forward to v2.
Sumit & Casey, Have posted V2 addressing the comments. Please take a look. Thanks Varada [ . . . ]