Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 3AC65C433F5 for ; Fri, 25 Feb 2022 08:14:24 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D246D83C58; Fri, 25 Feb 2022 09:14:13 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=microchip.com header.i=@microchip.com header.b="F3U62TKt"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id EE20B83055; Fri, 25 Feb 2022 09:14:09 +0100 (CET) Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) (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 ACAF2835EA for ; Fri, 25 Feb 2022 09:14:03 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=quarantine dis=none) header.from=microchip.com Authentication-Results: phobos.denx.de; spf=fail smtp.mailfrom=Tudor.Ambarus@microchip.com DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1645776844; x=1677312844; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=mXvJT9viC9FrTHzTI8NYQDj9QAiLy3Urh1wwnoi4cks=; b=F3U62TKtzwlMh2bWkqqIz3Ea+X30Dkx6P+MMgqm1JnRllhIRn+83z3iO XHqllZU8tJOwxTMIeoBEAQ0oh0cTFJnBMCHoh7Klg0pY0SgdWoiUG93cZ gA5js0RqpmzP/iGrRRXek9+A9F+hmypcNO1Vs22las+D1h8v8sHXIYASG 7HwHsGKWl1OAi3UxaemcIOLKTDG09BpJC459d5LjsdWWiwD/dYRNvvstS p5ZrLIwD+PnzO7InPDmmdy6hqX24obUax2yK5VXsStymkbesns5x9Yncb fdZt22vcXWOJBX4t9025WdVaXRYMpt/wZEMp5THiX8ULAuXUOxiCTOUf1 g==; X-IronPort-AV: E=Sophos;i="5.90,135,1643698800"; d="scan'208";a="154386051" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Feb 2022 01:14:02 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 25 Feb 2022 01:14:01 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 25 Feb 2022 01:14:00 -0700 From: Tudor Ambarus To: CC: , Tudor Ambarus Subject: [PATCH 0/2] ARM: at91: sama7g5: Reset external devices at software reset Date: Fri, 25 Feb 2022 10:13:55 +0200 Message-ID: <20220225081357.535317-1-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 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.5 at phobos.denx.de X-Virus-Status: Clean This fixes the following: => sf probe SF: Detected mx66lm1g45g with page size 256 Bytes, erase size 4 KiB, total 128 MiB => reset resetting ... RomBOOT What happened is that in u-boot the mx66lm1g45g NOR flash enters in Octal DTR mode. The user reset calls do_reset() method which does not call any driver's remove method, but merely resets the CPU. The flash remains in Octal DTR mode and RomCode can't recognize it, thus the boot will fail. More details in the commit messages. Tested after software reset the mx66lm1g45g NOR flash, but also GMAC0/1, all went fine. Tudor Ambarus (2): configs: Convert AT91RESET_EXTRST to Kconfig ARM: at91: sama7g5: Reset external devices at software reset arch/arm/mach-at91/Kconfig | 4 ++++ 1 file changed, 4 insertions(+) -- 2.25.1