From nobody Fri Apr 26 05:00:27 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+70018+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70018+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=arm.com ARC-Seal: i=1; a=rsa-sha256; t=1610086470; cv=none; d=zohomail.com; s=zohoarc; b=Ntfmn02qcHAb6ph3cA17LaDJL78vLulvqbjLllAkMgNP3rCu19EGUO2sBuekVCL/3CidGqg9Zi5z9nsr8Mu9HBqGNPbERgAo0VgTDeAGlX9vGxDIpAB2kB0jwpIcJju2te0EIzCwvOuNxypaaQYEd0PbWT5Gh/NZqnaox2j23ak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610086470; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=3jK/WkEZQSb+cJwjG0WHvo+KqvjQAOTHw3FcSJt8u2E=; b=Ke8nzbHfhs+vy+ztdlSxootx8tTZyZuKuuv9Hn5sGD3AJFV3PnUK+vS65FL1+/CR4HPd+mPk9ozy4mV7mJyZ17OwakmiogyKG/6PUk6dIMNm4SINpni4hPeNn8IxU++uujLQYQS4W7qyB1zTT5T4e8Z74z/TC8IUM8ZNmiDtKyw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+70018+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1610086470045728.0284684272008; Thu, 7 Jan 2021 22:14:30 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id yIUiYY1788612xHZzkpa2a6C; Thu, 07 Jan 2021 22:14:29 -0800 X-Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mx.groups.io with SMTP id smtpd.web11.368.1610086463122271962 for ; Thu, 07 Jan 2021 22:14:23 -0800 X-Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B6BE6ED1; Thu, 7 Jan 2021 22:14:22 -0800 (PST) X-Received: from mammon-tx2.austin.arm.com (mammon-tx2.austin.arm.com [10.118.28.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id B019E3F66E; Thu, 7 Jan 2021 22:14:22 -0800 (PST) From: "Jeremy Linton" To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com, leif@nuviainc.com, pete@akeo.ie, samer.el-haj-mahmoud@arm.com, awarkentin@vmware.com, Jeremy Linton , Philippe Mathieu-Daude Subject: [edk2-devel] [PATCH v5 5/7] Platform/RaspberryPi/Arasan: Select the correct base frequency Date: Fri, 8 Jan 2021 00:14:09 -0600 Message-Id: <20210108061411.1721734-6-jeremy.linton@arm.com> In-Reply-To: <20210108061411.1721734-1-jeremy.linton@arm.com> References: <20210108061411.1721734-1-jeremy.linton@arm.com> MIME-Version: 1.0 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,jeremy.linton@arm.com X-Gm-Message-State: IsSoO2c9S9lFEEbFyquEuCi1x1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1610086469; bh=qmQ/j75oGjPqZXv1WsnL6VsbajVZjPec+dSBji7pt+8=; h=Cc:Date:From:Reply-To:Subject:To; b=Iw7EqfrbtzLhOBTtowJa/UANTGNbolvLJX1Ya5DlwSeUI2Am4xpIhxUpcB5RlSJGZQz jafPsvYxmVLlvHSjNz+JmLK8D0G4yySuU8Q44XxThCZ36mpU1x3SFzxANhMEelQC5rPJv r9txA7FB4QplBlF3aoAWtb9vWWGSFDAgN3w= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Type: text/plain; charset="utf-8" The firmware reports the eMMC2 frequency with a slightly different mailbox command, lets select the correct one based on which controller we are binding to. Signed-off-by: Jeremy Linton Reviewed-by: Andrei Warkentin Reviewed-by: Philippe Mathieu-Daude --- .../RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c | 10 ++++++= +--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe= .c b/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c index 91f7c41c6c..6d1c5e1d23 100644 --- a/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c +++ b/Platform/RaspberryPi/Drivers/ArasanMmcHostDxe/ArasanMmcHostDxe.c @@ -250,7 +250,11 @@ CalculateClockFrequencyDivisor ( UINT32 Divisor; UINT32 BaseFrequency =3D 0; =20 - Status =3D mFwProtocol->GetClockRate (RPI_MBOX_CLOCK_RATE_EMMC, &BaseFre= quency); + if (PcdGet32 (PcdSdIsArasan)) { + Status =3D mFwProtocol->GetClockRate (RPI_MBOX_CLOCK_RATE_EMMC, &BaseF= requency); + } else { + Status =3D mFwProtocol->GetClockRate (RPI_MBOX_CLOCK_RATE_EMMC2, &Base= Frequency); + } if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "Couldn't get RPI_MBOX_CLOCK_RATE_EMMC\n")); return Status; @@ -472,8 +476,8 @@ MMCNotifyState ( switch (State) { case MmcHwInitializationState: { - EFI_STATUS Status; - UINT32 Divisor; + + DEBUG ((DEBUG_MMCHOST_SD, "ArasanMMCHost: current divisor %x\n", Mmi= oRead32(MMCHS_SYSCTL))); =20 Status =3D SoftReset (SRA); if (EFI_ERROR (Status)) { --=20 2.13.7 -=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 (#70018): https://edk2.groups.io/g/devel/message/70018 Mute This Topic: https://groups.io/mt/79518681/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-