Hi, > -----Original Message----- > From: Andreas Schwab <sch...@linux-m68k.org> > Sent: Wednesday, May 6, 2020 12:57 PM > To: Anup Patel <a...@brainfault.org> > Cc: Sagar Kadam <sagar.ka...@sifive.com>; Palmer Dabbelt > <pal...@dabbelt.com>; vigne...@ti.com; tudor.amba...@microchip.com; > rich...@nod.at; Paul Walmsley <paul.walms...@sifive.com>; linux- > ker...@vger.kernel.org; linux-...@lists.infradead.org; > miquel.ray...@bootlin.com; linux-ri...@lists.infradead.org > Subject: Re: [PATCH 1/2] riscv: defconfig: enable spi nor on Hifive Unleashed > A00 board. > > [External Email] Do not click links or attachments unless you recognize the > sender and know the content is safe > > On Mai 06 2020, Anup Patel wrote: >
Thanks for suggestions Anup and Andreas. I missed to reply, sorry for that. > > We had build issues in past by selecting major driver subsystems > > in Kconfig.socs > > Please let me know if I am wrong, are you stating about the build issues, fixed in commit bd6f20333c67 ("RISC-V: Only select essential drivers for SOC_VIRT config") which was due to all platform dependent and independent driver's enabled in Kconfig.soc for virtual platform. Kconfig.socs as meant for platform drivers we can guard SPI_SIFIVE with a guard "if SPI" so that come across " WARNING: unmet direct dependencies detected for SPI_SIFIVE" --- a/arch/riscv/Kconfig.socs +++ b/arch/riscv/Kconfig.socs @@ -7,6 +7,7 @@ config SOC_SIFIVE select CLK_SIFIVE select CLK_SIFIVE_FU540_PRCI select SIFIVE_PLIC + imply SPI_SIFIVE if SPI help This enables support for SiFive SoC platform hardware. > > I suggest to select SPI_SIFIVE from Kconfig.socs > > SPI_SIFIVE can be m, don't override that. > > Andreas. > Currently SPI and SPI_SIFIVE are default enabled via defconfig. In Kconfig.socs if we force the config option using "select" SPI_SIFIVE will lose its configurable option. So I was thinking of using the weak dependency using "imply" as above, so that SPI_SIFIVE can still be modular if required i.e 'm'. We can then have other platform independent driver's ( SPI, MTD and MTD_SPI_NOR) required for enabling SPI_NOR flash into the defconfig. This way we can have SPI_SIFIVE in Kconfig.soc's and SPI_SIFIVE will also be modular Please let me know your views on this, or if I am missing something. Thanks & BR, Sagar Kadam > -- > Andreas Schwab, sch...@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA > AEC1 > "And now for something completely different."