Hi Daniel, On Fri, Nov 02, 2018 at 03:07:19AM +0100, Daniel Golle wrote: > The RT6352 wireless core included in all MT7620 chips is implemented > differently in MT7620A (TFBGA) and MT7620N (DR-QFN). > Hence provide accessor functions similar to the already existing > mt7620_get_eco() function which allow the rt2x00 wireless driver to > figure out which WiSoC it is being run on. > > Signed-off-by: Daniel Golle <daniel@xxxxxxxxxxxxxx> > --- > arch/mips/include/asm/mach-ralink/mt7620.h | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/arch/mips/include/asm/mach-ralink/mt7620.h b/arch/mips/include/asm/mach-ralink/mt7620.h > index 66af4ccb5c6c..d0310a92a63f 100644 > --- a/arch/mips/include/asm/mach-ralink/mt7620.h > +++ b/arch/mips/include/asm/mach-ralink/mt7620.h > @@ -137,4 +137,16 @@ static inline int mt7620_get_eco(void) > return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK; > } > > +static inline int mt7620_get_chipver(void) > +{ > + return (rt_sysc_r32(SYSC_REG_CHIP_REV) >> CHIP_REV_VER_SHIFT) & > + CHIP_REV_VER_MASK; > +} > + > +static inline int mt7620_get_pkg(void) > +{ > + return (rt_sysc_r32(SYSC_REG_CHIP_REV) >> CHIP_REV_PKG_SHIFT) & > + CHIP_REV_PKG_MASK; > +} > + > #endif Is there an in-tree user for these? Looking at it I don't see any in-tree code which uses the existing mt7620_get_eco() function. I'm not fond of adding code which isn't used at all in-tree, I'd much rather we either: 1) Get the driver that needs these upstreamed, and these functions could be added at the same time. or 2) Keep functions only used by out-of-tree code out-of-tree. Thanks, Paul