From nobody Sun Apr 28 13:53:08 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 151206831964372.81751786830603; Thu, 30 Nov 2017 10:58:39 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 21F1F21A04E2F; Thu, 30 Nov 2017 10:54:13 -0800 (PST) Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id AF65D221786B1 for ; Thu, 30 Nov 2017 10:54:11 -0800 (PST) Received: by mail-wr0-x242.google.com with SMTP id z34so7656763wrz.10 for ; Thu, 30 Nov 2017 10:58:37 -0800 (PST) Received: from localhost.localdomain ([105.150.171.234]) by smtp.gmail.com with ESMTPSA id d17sm2430784wrc.14.2017.11.30.10.58.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Nov 2017 10:58:34 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::242; helo=mail-wr0-x242.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5VZgtmna198xpWrsZHcDrePcWNyObGzdXEe32hondT4=; b=XAHHYIy6qV+ZqVbt9yRK84Jx/hHVzU/qkdpzbReMy9ZlN8YrZlQRXVGN3bTxby7knd lA6CO3KFNyDhOkj/1tQx7ZrhP+UwPDlYLzg0HxpxwGHpCEEuvGh55Xv1PqyCkOe0rTGh 7TgIgzVsxCidZQ13C9xguGRtvkn6nT5lgcddU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=5VZgtmna198xpWrsZHcDrePcWNyObGzdXEe32hondT4=; b=cxNQzEBwsLFkmDAAzCh4MvYL38r/X9D9EjejZeaG0wA/KMpWZKc26yTtGDzBN9sADY qoQOcFkB8D6rgaepJVKrG1El+Q5riRPCDgXogonr+7FWlTtVJiADmBc8IRRcsUobyO0g 9Dw5KudnRQpJRibyxdhFxtBlQ3BYVWnqW0rbkhF94oz5vAxeR6vDZaE5XrTAghTHCuTD 1CkXhhpFkUF0uPgy334MyyU1hy1xbge8a4dYHhssCoUAIN0shPKhOCITLI7gd2Qhhub+ VGd4fvifNhlkDQIi9RsuLoe60y1t0qXNcGeMX+OPvb9QEtRbmFe6fFwqEbIllJH3bYuQ ZcRw== X-Gm-Message-State: AJaThX4C2Hthxhgp7x9nV3NWLOJiYDzZT8qCjy9rVOI/q5qMRS7HexH9 9obuZekjyZNF8bdlT3s8MigiJpNrZYk= X-Google-Smtp-Source: AGs4zMaBGy0g9XbNv7gvIavX9JCDTQIHMadg0UoqrVZwPNYwWOeJfrJD6P34FIeR3VMCADif1HAYwQ== X-Received: by 10.223.172.115 with SMTP id v106mr3006320wrc.195.1512068315556; Thu, 30 Nov 2017 10:58:35 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org Date: Thu, 30 Nov 2017 18:58:28 +0000 Message-Id: <20171130185828.21277-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH edk2-platforms] Silicon/Fip006Dxe: map NOR_FLASH_INFO FSR flag with instance flag X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: leif.lindholm@linaro.org, Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" From: Pipat Methavanitpong Now that we incorporated NorFlashInfoLib into the Fip006Dxe driver, replace the code that explicitly enables flag status register polling for Micron NOR flash with a test of the flags field provided by NorFlashInfoLib, which carries the same information. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Pipat Methavanitpong Signed-off-by: Ard Biesheuvel Reviewed-by: Leif Lindholm --- Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c | 22 +++++++--= ----------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c b/= Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c index a521b1f3d167..8d6bca8739d0 100644 --- a/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c +++ b/Silicon/Socionext/SynQuacer/Drivers/Fip006Dxe/NorFlashDxe.c @@ -1129,6 +1129,7 @@ NorFlashCreateInstance ( { EFI_STATUS Status; NOR_FLASH_INSTANCE* Instance; + NOR_FLASH_INFO *FlashInfo; UINT8 JedecId[3]; =20 ASSERT(NorFlashInstance !=3D NULL); @@ -1157,23 +1158,15 @@ NorFlashCreateInstance ( NorFlashReset (Instance); =20 NorFlashReadID (Instance, JedecId); + Status =3D NorFlashGetInfo (JedecId, &FlashInfo, FALSE); + if (EFI_ERROR (Status)) { + goto FreeInstance; + } =20 - DEBUG_CODE_BEGIN (); - { - NOR_FLASH_INFO *FlashInfo; - - Status =3D NorFlashGetInfo (JedecId, &FlashInfo, FALSE); - if (EFI_ERROR (Status)) { - goto FreeInstance; - } - - NorFlashPrintInfo (FlashInfo); - FreePool (FlashInfo); - } - DEBUG_CODE_END (); + NorFlashPrintInfo (FlashInfo); =20 Instance->Flags =3D 0; - if (JedecId[0] =3D=3D NOR_FLASH_ID_STMICRO) { + if (FlashInfo->Flags & NOR_FLASH_WRITE_FSR) { Instance->Flags =3D NOR_FLASH_POLL_FSR; } =20 @@ -1198,6 +1191,7 @@ NorFlashCreateInstance ( } =20 *NorFlashInstance =3D Instance; + FreePool (FlashInfo); return EFI_SUCCESS; =20 FreeInstance: --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel