From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Wed, 05 Aug 2015 10:37:56 +0200 Subject: [U-Boot] [PATCH] Do not mux and setup SPI if disabled in the config In-Reply-To: <20150805083334.GA25399@pqgruber.com> References: <1438709320-18454-1-git-send-email-clemens.gruber@pqgruber.com> <55C19CC6.5040506@denx.de> <20150805072822.GA22422@pqgruber.com> <55C1C3B6.6040606@denx.de> <20150805083334.GA25399@pqgruber.com> Message-ID: <55C1CB64.10205@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 05.08.2015 10:33, Clemens Gruber wrote: > On Wed, Aug 05, 2015 at 01:46:42PM +0530, Jagan Teki wrote: >> On 5 August 2015 at 13:35, Stefan Roese wrote: >>> How about this patch: >>> >>> diff --git a/board/tqc/tqma6/tqma6.c b/board/tqc/tqma6/tqma6.c >>> index 29db838..345930f 100644 >>> --- a/board/tqc/tqma6/tqma6.c >>> +++ b/board/tqc/tqma6/tqma6.c >>> @@ -28,6 +28,13 @@ >>> >>> #include "tqma6_bb.h" >>> >>> +#ifndef CONFIG_SF_DEFAULT_BUS >>> +#define CONFIG_SF_DEFAULT_BUS 0 >>> +#endif >>> +#ifndef CONFIG_SF_DEFAULT_CS >>> +#define CONFIG_SF_DEFAULT_CS 0 >>> +#endif >> >> Why would need this - it's already part of spi_flash.h > > I am also wondering about commit f85764cc1f6ab01ffc60dd78de9c4de4cff2b5ce, which > defines CONFIG_SPI_FLASH in the WRU4 defconfig file, even though it does not > need SPI flash support, just to work around undefined reference errors regarding > spi_flash_free, etc. > > Couldn't those workarounds be avoided by excluding the SPI parts via ifdefs, as > I did in my patch today? Right. But as mentioned before I really would like to avoid those ifdef's. So let me check if I can get this done in a more clean way. Thanks, Stefan