From mboxrd@z Thu Jan 1 00:00:00 1970 From: Vignesh R Date: Thu, 25 Aug 2016 15:40:06 +0530 Subject: [U-Boot] [PATCH v1] cmd/sf: probe flash with speed of last known flash or speed from devicetree In-Reply-To: <57BEBB44.4070400@schmelzer.or.at> References: <1472033154-31475-1-git-send-email-oe5hpm@oevsv.at> <86295f5e-70ad-e660-4ff4-2046e12a6780@ti.com> <57BD7C19.4030401@schmelzer.or.at> <196cb9a1-b5d9-f1bb-1d5a-ac2dfd2fe3a0@ti.com> <57BD9132.7030408@schmelzer.or.at> <57BDAAE3.8070607@schmelzer.or.at> <1cf2c49d-1a55-e7f6-235f-88ce2d153353@ti.com> <57BEBB44.4070400@schmelzer.or.at> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 25 August 2016 03:02 PM, Hannes Schmelzer wrote: > On 08/25/2016 10:39 AM, Vignesh R wrote: >> >> On Wednesday 24 August 2016 07:40 PM, Hannes Schmelzer wrote: >>> On 08/24/2016 02:21 PM, Hannes Schmelzer wrote: >>>> On 08/24/2016 01:12 PM, Vignesh R wrote: >>>>> On Wednesday 24 August 2016 04:21 PM, Hannes Schmelzer wrote: >>>>>> On 08/24/2016 12:35 PM, Vignesh R wrote: >> [...] >> >>>>> AFAIU, saveenv() uses CONFIG_ENV_SPI_MAX_HZ only when >>>>> CONFIG_DM_SPI_FLASH is not defined. Could please explain how >>>>> CONFIG_ENV_SPI_MAX_HZ takes precedence over spi-max-frequency >>>>> during sf >>>>> probe? >>>> Thanks the discussion, I think we coming closer to the problem. >>>> Your'e right saveenv() behaves as you described, but not so >>>> env_relocate_spec(). >>>> >>>> There the flash is probed like this: >>>> env_flash = spi_flash_probe(CONFIG_ENV_SPI_BUS, CONFIG_ENV_SPI_CS, >>>> CONFIG_ENV_SPI_MAX_HZ, CONFIG_ENV_SPI_MODE); >>>> >>>> and thats the point where some existing dt node becomes modified with >>>> those values. Thats probably wrong doing so. >>>> >>>> I think there should be same logic applied as in saveen(). >>> Tested again, and confirming this behaviour. >> Yeah, I think relocate_spec() was not updated during dm conversion. > looks like, should i submit some patch? Patches are welcome. Please Cc U-Boot SPI maintainer Jagan Teki . Thanks! -- Regards Vignesh