Hi Julien, On Wed, Sep 22, 2021 at 11:54 AM Julien Massot <julien.massot@xxxxxxx> wrote: > > In general, I think this looks like a good abstraction, which we can > > also use for further abstraction of R-Car Gen2 (cfr. [1]). > Yes I was also thinking about future generation like Gen4, but I don't have the documentation > at this point. > From what I understand in [1]: CA7BAR in Gen2 is managed by the SYSC module and not by the RST module > as for CR7BAR in Gen3. So despite the fact that the procedure is similar, we won't be able to set CA7BAR in > rcar-rst.c. On R-Car Gen2, CA7BAR is managed by the RST module. On R-Mobile APE6, it is managed by the SYSC module. > > I'm just wondering if we should pass the BAR offset to > > rcar_rst_set_rproc_boot_addr() explicitly (and rename the function), > > or have multiple functions for the different BARs. > Passing BAR offset will imply to spread RST module offsets across different subsystems, > and the second question will be to be able to do the correct boundary check for the targeted > processor: CR7BAR is aligned on 4k an it looks like CA7BAR is on 256k. It looks like it's > manageable thanks to the driver data which already holds the 'mode monitor register' offset per SoC generation. > > One missing point will be for future R-Car SoCs: trends on others SoC seems to be to go to have > several 'realtime', or remote processor. In this case this function will not scale up. On R-Car V3U, CR52BAR is managed by the APMU module. There's not much we can do about future processors yet ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds