Hi Vladimir,

Le 15/11/26 00:47, Vincent Jardin a écrit :
> Hi Vladimir,
> 
> > I cannot agree with your API proposal. It exports to the rest of the
> > kernel a blanket API for RCW override of any RCWSR1-RCWSR31 register,
> > *including* the SerDes fields for which the fsl_guts module already
> > exposes an API. So with your proposal, what can be done with
> > fsl_guts_lane_set_mode() can also be (un)done with fsl_guts_rcw_override().
> > The possibilities of abusing this API design are endless, and I don't
> > want to have to deal with them when I can avoid them.
> > 
> > At a minimum, I would recommend renaming the API as 
> > fsl_guts_pmux_override(),
> > and make guts enforce which register fields it permits overriding via
> > this API. Example:
> > 
> > static const struct fsl_soc_pmux_mask lx2160a_pmux[] = {
> >     { 12, GENMASK(29, 0) }, /* IIC2..SDHC1_DIR */
> >     { 13, GENMASK(29, 0) }, /* SDHC2_DAT74..EVT43 */
> >     { 14, GENMASK(10, 0) }, /* EVT20..IIC1 */
> >     { 27, GENMASK(7, 0) },  /* EC1, EC2, USB_EXT, GTX_CLK, SDHC1_DS <- your 
> > series is missing these */
> >     {}
> > };
> 

I did test it on the board and sent the related v5 based on your suggestion.

For instance, when I did a forced bus recovery of IIC1, it
moves only its related field of RCWSR14, and the first override of RCWCR27
does not touch USB3_CLK_FSEL.

The v5 is here:
https://lore.kernel.org/all/20261115-for-upstream-lx2160a-rcw-pinmux-v1-v5-0-d246166ea...@free.fr/

thanks for you help,
  Vincent

Reply via email to