From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.5 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 200A9C07E99 for ; Fri, 9 Jul 2021 15:00:19 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 89CF0613BE for ; Fri, 9 Jul 2021 15:00:18 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 89CF0613BE Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=nic.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 31054832D4; Fri, 9 Jul 2021 17:00:16 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; secure) header.d=nic.cz header.i=@nic.cz header.b="L934fXOE"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 66612832E4; Fri, 9 Jul 2021 17:00:14 +0200 (CEST) Received: from mail.nic.cz (lists.nic.cz [IPv6:2001:1488:800:400::400]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 23600832E5 for ; Fri, 9 Jul 2021 17:00:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=nic.cz Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.behun@nic.cz Received: from dellmb (unknown [IPv6:2001:1488:fffe:6:8747:7254:5571:3010]) by mail.nic.cz (Postfix) with ESMTPSA id CABF11411C2; Fri, 9 Jul 2021 17:00:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=nic.cz; s=default; t=1625842809; bh=5qe++0PZMu/BLdYviDwqUHaF6DRmYYx4oLOZVGoZbQc=; h=Date:From:To; b=L934fXOEDFyFFrEw6WVul5ub1Qw+MS4PDkjrAE5dcHhACqVCZc6G/Gt93Z1cO9il6 Pc6yaON+bT1mzgRd/SpEn9wmQJuJeTKgyd/I+CxlgBldmo8ChW59PWmgwnT0HvRs5c uDmzOZdhONMkcslw1/M+zsEqKAv+/C8bSR/M+1MQ= Date: Fri, 9 Jul 2021 17:00:09 +0200 From: Marek =?UTF-8?B?QmVow7pu?= To: u-boot@lists.denx.de, Stefan Roese Cc: Tom Rini , Marek Vasut , Jagan Teki , Patrick Delaunay , Pali =?UTF-8?B?Um9ow6Fy?= Subject: Re: [PATCH u-boot-mvebu 1/2] arm: mvebu: turris_omnia: force 40 MHz speed on SPI NOR Message-ID: <20210709170009.0154f192@dellmb> In-Reply-To: <20210709145614.7529-1-marek.behun@nic.cz> References: <20210709145614.7529-1-marek.behun@nic.cz> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Fri, 9 Jul 2021 16:56:13 +0200 Marek Beh=C3=BAn wrote: > Commit e2e95e5e2542 ("spi: Update speed/mode on change") changed the > boot time on Turris Omnia from ~2.3s to over 8s, due to SPL loading > main U-Boot from SPI NOR at 1 MHz instead of 40 MHz. >=20 > This is because the SPL code passes the CONFIG_SF_DEFAULT_SPEED option > to spi_flash_probe(), and with the above commit spi_flash_probe() > starts prefering this parameter instead of the one specified in > device-tree. >=20 > The proper solution here would probably be to fix the SF subsystem to > prefer the frequency specified in the device-tree, if it is present, > but I am not sure what else will be affected on other boards with > such a change. So until then we need a more simple fix. >=20 > Since the CONFIG_SF_DEFAULT_SPEED option is used by the code, put the > correct value there for Turris Omnia. Also put the correct value to > CONFIG_SF_DEFAULT_MODE and use 40 MHz when reading environment. BTW this change is currently needed even if the other series (making use of BootROM code to load main U-Boot instead of SPL doing it) is accepted: commit e2e95e5e2542 also changed the behavior of the sf read / sf update command - it is slower since it operates at 1 MHz now instead of 40 MHz as specified in the device-tree. Marek