From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: None (no SPF record) identity=mailfrom; client-ip=2a00:1450:4864:20::129; helo=mail-lf1-x129.google.com; envelope-from=mw@semihalf.com; receiver=edk2-devel@lists.01.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) (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 C6D1E211350C4 for ; Fri, 9 Nov 2018 15:01:59 -0800 (PST) Received: by mail-lf1-x129.google.com with SMTP id p6so2490410lfc.1 for ; Fri, 09 Nov 2018 15:01:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=s9x924fPZdLalPHlfbQTyn12WeCJFSWYVVUt+aqvak0=; b=F0PruEbNHdhvq6d3/5DFBE2iyp0Jhg3c40Hl6hRQWYGofNgNqmbfaKEsVf8DuSQB9b MbjwgfpmGz0jCTayTpVtYwLwMK0ITLgcglt3gyH2CrjoMiI+fVPDoE9IiNBL36roGlav RFGEr+l1IzzI/xyFwpwxRyZxGU/jibFQ4iGSVpUK2ajydbSxJL7VLeU6rmS6615z/Bb2 2WihhOreFbRxH+2v8a0ZfpqNBXeApvqRGciq4tMJlNmHcyWltOEXnb0eU896lBDJnlLF 20Z13m538XMVPItld3KbTcVJmp/RltwbDna323kHCrwM/XvQKk77fqYQU8WqpMAJ68Od WjSw== 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=s9x924fPZdLalPHlfbQTyn12WeCJFSWYVVUt+aqvak0=; b=guHBq4WSBzo//lTdlCPQEja8m3+sP/l1gHJYUn8LXfj38CcaeTOzaW7tqnKA4ja9rb jolMEfW1eKFFsZeIwmKPvDzjdlGpSt3bZ+VxOfOXkzS3g5qXasBXpK4o/lRjYxoEEjmp aaeUfAfTnUd53BUKLXHKcRsRkrercxQibuUcHn2XmTTxUVXfWjI2mVCgAkG8DP3AQKTH zR/935rYEUGTWrOXKh7U5Kix7CryYw73ewegCM4GyffeAXYpgSnPqswZhwAzWpSt5b7v CyZLoXT/pvi3KBpW/fzyn2oXMVVFxTPb14d/sGS9rjXaJB+8hp4vp84Ab6R00Q1UFs2P pTjQ== X-Gm-Message-State: AGRZ1gLncyGZQLGaWRvULRAYd6cL0p1FP2XpAMO/FCiiNItI3AY23u4E Xjom0W6RjFuHOvc78OUfxIwTDisB64s= X-Google-Smtp-Source: AJdET5cunyn3mq8Q0PO17J/f58/OUKyrqSCNQvDKYxfej/Mt/LS9oeigdnlP15Y327UtQEosP9a7Ew== X-Received: by 2002:a19:945b:: with SMTP id w88mr6170529lfd.15.1541804516219; Fri, 09 Nov 2018 15:01:56 -0800 (PST) Received: from gilgamesh.semihalf.com (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id c22sm1574318lfd.88.2018.11.09.15.01.54 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 09 Nov 2018 15:01:55 -0800 (PST) From: Marcin Wojtas To: edk2-devel@lists.01.org Cc: leif.lindholm@linaro.org, hao.a.wu@intel.com, michael.d.kinney@intel.com, liming.gao@intel.com, ard.biesheuvel@linaro.org, nadavh@marvell.com, mw@semihalf.com, jsd@semihalf.com, tm@semihalf.com, jaz@semihalf.com Date: Sat, 10 Nov 2018 00:01:23 +0100 Message-Id: <1541804487-27458-1-git-send-email-mw@semihalf.com> X-Mailer: git-send-email 2.7.4 Subject: [PATCH v4 0/4] SdMmcOverride extension X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 X-List-Received-Date: Fri, 09 Nov 2018 23:02:00 -0000 Hi, Although I could've waited for Hao's remarks, I think it may be better if he takes a look at much cleaner code, which addresses v3 review comments. The newest version of the patchset cleans-up significantly patches 2&3 by removing code duplication and other minor improvements. Patches are available in the github: https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/sdmmc-override-upstream-r20181109 Please note that extending SdMmcOverride protocol was impacting so far the only user of it (Synquacer controller). In paralel edk2-platforms patchset, a patch can be found: ("Silicon/SynQuacer/PlatformDxe: adjust to updated SdMmcOverride") which adjust to the new API. https://github.com/MarvellEmbeddedProcessors/edk2-open-platform/commits/xenon-upstream-r20181109 I'm looking forward to the comments and remarks. Best regards, Marcin Changelog: v3->v4 * 2/4: - avoid duplication by calling SdMmcOverride callback in SdMmcHcUhsSignaling * 3/4: - avoid duplication by calling SdMmcOverride callback in EmmcSwitchClockFreq * 4/4: - add Ard's RB v2->v3 * 1/4: - rename new parameter to PhaseData - add Ard's RB * 2/4: - s/Controler/Controller/ - remove all references to MMC_SDR_50 mode - rename and reorder MMC bus modes - rename enum: s/SD_MMC_UHS_TIMING/SD_MMC_BUS_MODE/ and move it to protocol header in order to drop including private one - fix if condition in EmmcSwitchToHighSpeed - call SdMmcHcUhsSignaling unconditionally before SdMmcOverride callback, so that protocol producer can optionally modify only quirky timing mode values. *4/4 - bump protocol version to 2 - remove redundant assert from SdMmcPciHcDriverBindingStart (BaseClkFreq is already checked in SdMmcHcInitClockFreq) - update comment in SdMmcHcInitClockFreq - restore original DumpCapabilityReg and append v1 -> v2 * Rebase onto newest master * 1/4 [new patch] - preparation for extending NotifyPhase * 2/4 - UhsSignaling as a part of NotifyPhase * 3/4 - SwitchClockFreqPost as a part of NotifyPhase * 4/4 - Allow updating BaseClkFreq via Capability instead of the independent callback. Marcin Wojtas (2): MdeModulePkg/SdMmcPciHcDxe: Add an optional parameter in NotifyPhase MdeModulePkg/SdMmcPciHcDxe: Allow overriding base clock frequency Tomasz Michalec (2): MdeModulePkg/SdMmcPciHcDxe: Add UhsSignaling to SdMmcOverride protocol MdeModulePkg/SdMmcPciHcDxe: Add SwitchClockFreqPost to SdMmcOverride MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.h | 6 + MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.h | 42 ++++++- MdeModulePkg/Include/Protocol/SdMmcOverride.h | 29 ++++- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/EmmcDevice.c | 121 ++++++++++--------- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdDevice.c | 35 ++++-- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHcDxe.c | 13 +- MdeModulePkg/Bus/Pci/SdMmcPciHcDxe/SdMmcPciHci.c | 124 +++++++++++++++++--- 7 files changed, 280 insertions(+), 90 deletions(-) -- 2.7.4