On Mon, Jan 6, 2020 at 6:59 AM Andre Przywara <[email protected]> wrote: > > So far we were using the CONFIG_SUNXI_GEN_SUN6I symbol to select between > the two SPI controller generations used on Allwinner SoCs. This is a > convenience symbol to roughly differentiate between "older" and "newer" > generation of SoCs. > > The H6 SoCs is the newest SoC so far, but is sufficiently different to > not define this symbol. However it is using a SPI controller compatible > to the "new gen" SoCs. > > To prepare for H6 support, we replace the check for this single symbol > with an explicit function, which can later be extended. > For now we just return CONFIG_SUNXI_GEN_SUN6I in there, so this does not > create a functional change. > > Signed-off-by: Andre Przywara <[email protected]> > --- > arch/arm/mach-sunxi/spl_spi_sunxi.c | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-) > > diff --git a/arch/arm/mach-sunxi/spl_spi_sunxi.c > b/arch/arm/mach-sunxi/spl_spi_sunxi.c > index 5b4598a25b..b19f1bf4af 100644 > --- a/arch/arm/mach-sunxi/spl_spi_sunxi.c > +++ b/arch/arm/mach-sunxi/spl_spi_sunxi.c > @@ -100,9 +100,14 @@ static void spi0_pinmux_setup(unsigned int pin_function) > sunxi_gpio_set_cfgpin(SUNXI_GPC(3), pin_function); > } > > +static bool is_new_gen_spi(void) > +{ > + return IS_ENABLED(CONFIG_SUNXI_GEN_SUN6I); > +}
Doesn't it confusing? new gen is H6, but it returns 6I? -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/CAMty3ZAfZrA9-SV16hU7_eEBG83do2SHiJVd7UdA9ROfrH2wOA%40mail.gmail.com.
