Hi Laurent, On Mon, Aug 6, 2018 at 4:40 PM Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx> wrote: > On Monday, 6 August 2018 17:34:34 EEST Geert Uytterhoeven wrote: > > On Mon, Aug 6, 2018 at 4:16 PM Laurent Pinchart wrote: > > > On Monday, 6 August 2018 17:07:54 EEST Geert Uytterhoeven wrote: > > >> This reverts commit dfc80387aefb78161f83732804c6d01c89c24595. > > >> > > >> Deriving the proper regshift value from the register block size is > > >> fragile, as it may have been rounded up. > > >> > > >> Furthermore we will need plat_sci_port.regshift again. > > > > > > Won't this break bisection ? Shouldn't you squash patches 3 and 4 together > > > ? > > > > > > Does this mechanism break anything on non-DT platforms ? If not I'd rather > > > keep it for them, and only use compat strings for DT platforms, to > > > avoiding adding back a platform data field. > > > > Actually I think the original commit broke SCI on H8/300, as regshift should > > be zero on that platform. > > But that was not discovered until recently. > > So there are still people booting H3/800 ? :-) Yes, remember, H8/300 was resurrected with full DT support. SuperH is the legacy one ;-) > Could we still keep the mechanism for SH and fix H8/300 with special handling > somewhere ? An independent H8/300 fix is "[PATCH v2] serial: sh-sci: byte allocated register support" (https://www.spinics.net/lists/linux-sh/msg53175.html). The main issue is: do we bother with regshift or not? If yes, we have to handle it correctly for both normal serial port handling and earlycon. For the latter, we don't have the register block size available. As of commit 2eaa790989e03900 ("earlycon: Use common framework for earlycon declarations"), DT and non-DT based earlycon have been merged, so your original commit may have impacted earlycon on non-DT based systems, too. I don't know for sure... 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