From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Kiryanov Date: Wed, 06 Aug 2014 13:53:19 +0300 Subject: [U-Boot] [PATCH 01/18] spl: improve spi configuration In-Reply-To: <201408051611.15051.marex@denx.de> References: <1407051288-17324-1-git-send-email-nikita@compulab.co.il> <201408031544.08782.marex@denx.de> <53E0DBE4.6040109@compulab.co.il> <201408051611.15051.marex@denx.de> Message-ID: <53E2091F.4080701@compulab.co.il> 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/14 17:11, Marek Vasut wrote: > On Tuesday, August 05, 2014 at 03:28:04 PM, Nikita Kiryanov wrote: >> On 03/08/14 16:44, Marek Vasut wrote: >>> On Sunday, August 03, 2014 at 09:34:31 AM, Nikita Kiryanov wrote: >>>> Currently we can define CONFIG_SPL_SPI_. >>>> Define CONFIG_SPL_SPI_MODE option, and provide a default value for >>>> backwards compatibility. >>>> Default values are also provided for the rest of the spi_flash_probe >>>> parameters (like we do in cmd_sf), to help with config file brevity. >>>> >>>> Cc: Jagannadha Sutradharudu Teki >>>> Cc: Tom Rini >>>> Signed-off-by: Nikita Kiryanov >>> >>> You might actually be even more bold and check if you cannot fall back to >>> the CONFIG_DEFAULT_SPI_MODE etc. What do you think ? >> >> Not a fan of the idea. It will: >> - Complicate the #ifdefs >> - Complicate the relationship between CONFIG_DEFAULT_SPI_* and >> CONFIG_SPL_SPI_* #defines >> - Not get much use: most boards do not #define CONFIG_DEFAULT_SPI_* >> values in the config files, and of the ones that do, only two >> (dra7xx_evm and cm_fx6) use SPI in SPL. > > On the other hand, it's now only a matter of time until we get CONFIG_TPL_SPI_* > m which gives us _another_ set of defines. So the question is -- what is your > proposition to keep the amount of new ad-hoc defines low and cater for this > case? OK I think I may have misunderstood your suggestion. You wanted to replace CONFIG_SPL_SPI_* #defines with CONFIG_DEFAULT_SPI_* #defines, not use both, right? Based on cursory grepping, this seems possible, though I think CONFIG_SF_DEFAULT_* is a better candidate. I'll prepare a patch.. > > Best regards, > Marek Vasut >