From nobody Sat May 4 19:46:06 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) client-ip=66.175.222.12; envelope-from=bounce+27952+39939+1787277+3901457@groups.io; helo=web01.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39939+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1556854096; cv=none; d=zoho.com; s=zohoarc; b=RwARNJ4uSMJlRag93Aa5QRBAhEasjB/ainUkryjQ0SJ4YjIw5ag34jCAnl6OXCAWYl1kCk7gUYiCyhoH6PMErNCDBNV3OhGeUDZ6MEsKZwpcFRIDqanfZ7SP6JEp5uffD6OY6Pc+BoVQeYXzzN1bVbkvazlog9noA3Qzys8VX+8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556854096; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To:ARC-Authentication-Results; bh=PmZvw1LhRC0e2ofQTyYIB6o0S8tvpqS7F4Egzak6x1M=; b=AuOyAdKTXtIcVObzBUMEdy8+KF22oK+leTqdQvVp3HOhYB1dMi2DQSPqyEQqz3ROgCYKHulav8fl0zXGdLOAgw2WQYuI2MHTZGgVb4AurN3q9pHu1CKEtEYzir80XGWa5DK+vI2RVYiQqP/iwPU+iHARLvxfDR9ddU8R8NmKLd0= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass; spf=pass (zoho.com: domain of groups.io designates 66.175.222.12 as permitted sender) smtp.mailfrom=bounce+27952+39939+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from web01.groups.io (web01.groups.io [66.175.222.12]) by mx.zohomail.com with SMTPS id 1556854096536622.420287435182; Thu, 2 May 2019 20:28:16 -0700 (PDT) Return-Path: X-Received: from mga14.intel.com (mga14.intel.com []) by groups.io with SMTP; Thu, 02 May 2019 20:28:15 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False X-Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 02 May 2019 20:28:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,424,1549958400"; d="scan'208";a="167124889" X-Received: from pg-iccf0195.altera.com ([10.104.4.90]) by fmsmga002.fm.intel.com with ESMTP; 02 May 2019 20:28:14 -0700 From: "Loh, Tien Hock" To: devel@edk2.groups.io, thloh85@gmail.com Cc: "Tien Hock, Loh" , Leif Lindholm , Ard Biesheuvel Subject: [edk2-devel] [[PATCH v2] 5/7] EmbeddedPkg: Fix DwEmmc driver bugs Date: Fri, 3 May 2019 11:27:01 +0800 Message-Id: <1556854023-5486-6-git-send-email-tien.hock.loh@intel.com> In-Reply-To: <1556854023-5486-1-git-send-email-tien.hock.loh@intel.com> References: <1556854023-5486-1-git-send-email-tien.hock.loh@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,tien.hock.loh@intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1556854096; bh=MUzKvBi6hgAH6aD8xEo5W+nhlxMpjhF4gg93fGFKM+c=; h=Cc:Date:From:Reply-To:Subject:To; b=eHNElMMknmN/xxT39WoiZPCSYpfn/ahhSKUdCTH74Y1y4Vc/1iwarcprSxeJST/Lzwm 8rh6xElWlxZAXpG0LzrCMqWRihhsVy4o/+92yhKel3RLoA7yhUlkPU+VtJjzVf5FgRFcR NMnltrltDnPv6NLnOiItt/48REfq+nBXRdk= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Tien Hock, Loh" Send command when MMC ask for response in DwEmmcReceiveResponse, and command is a pending command (eg. DMA needs to be set up first) Signed-off-by: "Tien Hock, Loh" Cc: Leif Lindholm Cc: Ard Biesheuvel --- EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c b/EmbeddedPkg/Driver= s/DwEmmcDxe/DwEmmcDxe.c index 32572a9..a69d9ab 100644 --- a/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c +++ b/EmbeddedPkg/Drivers/DwEmmcDxe/DwEmmcDxe.c @@ -398,8 +398,11 @@ DwEmmcSendCommand ( mDwEmmcCommand =3D Cmd; mDwEmmcArgument =3D Argument; } else { + mDwEmmcCommand =3D Cmd; + mDwEmmcArgument =3D Argument; Status =3D SendCommand (Cmd, Argument); } + return Status; } =20 @@ -410,6 +413,11 @@ DwEmmcReceiveResponse ( IN UINT32* Buffer ) { + EFI_STATUS Status =3D EFI_SUCCESS; + + if(IsPendingReadCommand (mDwEmmcCommand) || IsPendingWriteCommand(mDwEmm= cCommand)) + Status =3D SendCommand (mDwEmmcCommand, mDwEmmcArgument); + if (Buffer =3D=3D NULL) { return EFI_INVALID_PARAMETER; } @@ -427,7 +435,7 @@ DwEmmcReceiveResponse ( Buffer[2] =3D MmioRead32 (DWEMMC_RESP2); Buffer[3] =3D MmioRead32 (DWEMMC_RESP3); } - return EFI_SUCCESS; + return Status; } =20 VOID --=20 2.2.2 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#39939): https://edk2.groups.io/g/devel/message/39939 Mute This Topic: https://groups.io/mt/31480081/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-