Re: [PATCH -next 13/24] spi: rockchip: switch to use modern name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Am Mittwoch, 16. August 2023, 12:20:55 CEST schrieb Geert Uytterhoeven:
> Hi Yang,
> 
> CC Heiko
> 
> On Wed, Aug 16, 2023 at 11:43 AM Yang Yingliang
> <yangyingliang@xxxxxxxxxx> wrote:
> > Change legacy name master/slave to modern name host/target or controller.
> >
> > No functional changed.
> >
> > Signed-off-by: Yang Yingliang <yangyingliang@xxxxxxxxxx>
> 
> Thanks for your patch!
> 
> > --- a/drivers/spi/spi-rockchip.c
> > +++ b/drivers/spi/spi-rockchip.c
> > @@ -104,8 +104,8 @@
> >  #define CR0_XFM_RO                                     0x2
> >
> >  #define CR0_OPM_OFFSET                         20
> > -#define CR0_OPM_MASTER                         0x0
> > -#define CR0_OPM_SLAVE                          0x1
> > +#define CR0_OPM_HOST                           0x0
> > +#define CR0_OPM_TARGET                         0x1
> >
> >  #define CR0_SOI_OFFSET                         23
> >
> > @@ -125,7 +125,7 @@
> >  #define SR_TF_EMPTY                                    (1 << 2)
> >  #define SR_RF_EMPTY                                    (1 << 3)
> >  #define SR_RF_FULL                                     (1 << 4)
> > -#define SR_SLAVE_TX_BUSY                               (1 << 5)
> > +#define SR_TARGET_TX_BUSY                              (1 << 5)
> 
> I assume the register bit names come straight from the hardware
> documentation, so you cannot just change them without making future
> maintenance harder.

Not necessarily. I.e. the TRM up to the most recent rk3588 does talk about
that bit as master/slave, but the bit itself is just named OPM.

----- 8< -----
opm
Master and slave mode select.
1'b0: Master Mode
1'b1: Slave Mode
----- 8< -----

So I'd call that a grey area. I.e. grepping for the field in the manual
won't work directly, but when reading people need to make the connection
every time that master in the TRM means host in the kernel etc.

If that is the way to go is a call for someone else, I guess


Regards,
Heiko





[Index of Archives]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux