Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp704211ybl; Wed, 21 Aug 2019 04:25:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqzq2dauB00AqHFZ/D181nQrNzcS83DSF2GHHpf95+2ehtZ4DhUs5sVhhTKebo/NYyLRosIw X-Received: by 2002:a17:902:28a2:: with SMTP id f31mr18807635plb.44.1566386746245; Wed, 21 Aug 2019 04:25:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566386746; cv=none; d=google.com; s=arc-20160816; b=f+JAqXOrlUnv9zHCwIsBP8zsN9i1PbGEit67iiRUGKwWi0mX0bJnaNUlHjkcDO/kmN newWtIjfvpD4jS/BFJlwTbBd8+S4bRMQylwGZ8Ip01wXVRO5VDpfZlB7QdaRyUTkvMnj L2HiWIc8TdRHDDB4YC48Krx6Cu4OUDvgLhopaHdRENSNkb9t6PPwhXSG8AzkRL3dMHXf RZvWXO9dQ/oNQD7FDUG0QjSLbyzum9+xrygC0xSSlEUvxAG/+4e9eSarJWkOMqt9jgmY o7MlOTZ/5LsvDZCeex+6fIrp8DzaXlBJdwM9SkN3AKRJhncw72uVmka0BKiTG8kdD00m gW3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:organization:from:references:cc:to:subject; bh=wl3/2WRdmQnx7bB15lxnSwLIxgiHlpQvRX+Vd3rd91Y=; b=W/bxM9Drmoj37nDrK/CUVYc2HRF/PZ/3uliMGXdPipjTctpKysmDhUqK1sMLn5Xbli Jgs1h6PwgYmoWRdYraLvfc3dtVO0dE1tAw4xkGgxo1XrBWyPqtt50FzbqTfy+OMwFhgD Iq+FOp7iNjyNP2BjybfuGdt6ELJ/9mHrdss5B0CCPb8+/SzW8/7eN2L6pSgOP/2S3/Lr X0U29TAxH5Jnd5qnqQ5CheRV1Yio/K/99HOh4Yxamlk2+QVg5l6BJZrmBnqQxoprB9R6 5mcFSzHgFUSUQYA/I8WhV1xHM+7Bu5W2/v9vYJScHhfIWAvEIjqzm+MjKjLVPMWExTGj bCRw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o33si14030769pgb.381.2019.08.21.04.25.31; Wed, 21 Aug 2019 04:25:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727815AbfHULVu (ORCPT + 99 others); Wed, 21 Aug 2019 07:21:50 -0400 Received: from mga09.intel.com ([134.134.136.24]:48472 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727211AbfHULVt (ORCPT ); Wed, 21 Aug 2019 07:21:49 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga003.jf.intel.com ([10.7.209.27]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 Aug 2019 04:21:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,412,1559545200"; d="scan'208";a="181000285" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.122]) ([10.237.72.122]) by orsmga003.jf.intel.com with ESMTP; 21 Aug 2019 04:21:46 -0700 Subject: Re: Subject: [PATCH V7 1/3] mmc: sdhci-pci-o2micro: Change O2 Host PLL and DLL register name To: "Shirley Her (SC)" , "ulf.hansson@linaro.org" , "linux-mmc@vger.kernel.org" , "linux-kernel@vger.kernel.org" Cc: "Chevron Li (WH)" , "Shaper Liu (WH)" , "Louis Lu (TP)" , "Xiaoguang Yu (WH)" , "max.huang@bayhbutech.com" References: <1566252529-5074-1-git-send-email-shirley.her@bayhubtech.com> From: Adrian Hunter Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Message-ID: <3003d633-ac5a-be61-585b-02f96613c070@intel.com> Date: Wed, 21 Aug 2019 14:20:34 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <1566252529-5074-1-git-send-email-shirley.her@bayhubtech.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 20/08/19 1:08 AM, Shirley Her (SC) wrote: > Change O2 Host PLL and DLL register name > > Signed-off-by:Shirley Her Please do not prefix the subject by "Subject: " Please put a space after Signed-off-by: > --- > change in v7: > 1. change subject > > change in V6: > 1. change subject and commit message to match the patch > 2. change register name O2_PLL_WDT_CONTROL1 TO O2_PLL_DLL_WDT_CONTROL1 > > change in V5: > 1. split 2 patches into 3 patches > 2. make dll_adjust_count start from 0 > 3. fix ret overwritten issue > 4. use break instead of goto > > change in V4: > 1. add a bug fix for V3 > > change in V3: > 1. add more explanation in dll_recovery and execute_tuning function > 2. move dll_adjust_count to O2_host struct > 3. fix some coding style error > 4. renaming O2_PLL_WDT_CONTROL1 TO O2_PLL_DLL_WDT_CONTROL1 > > change in V2: > 1. use usleep_range instead of udelay > 2. move dll_adjust_count to sdhci-pci-o2micro.c > > chagne in V1: > 1. add error recovery function to relock DLL with correct phase > 2. retuning HS200 after DLL locked > --- > drivers/mmc/host/sdhci-pci-o2micro.c | 16 ++++++++-------- > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c > index 9dc4548..b3a33d9 100644 > --- a/drivers/mmc/host/sdhci-pci-o2micro.c > +++ b/drivers/mmc/host/sdhci-pci-o2micro.c > @@ -51,7 +51,7 @@ > #define O2_SD_VENDOR_SETTING2 0x1C8 > #define O2_SD_HW_TUNING_DISABLE BIT(4) > > -#define O2_PLL_WDT_CONTROL1 0x1CC > +#define O2_PLL_DLL_WDT_CONTROL1 0x1CC > #define O2_PLL_FORCE_ACTIVE BIT(18) > #define O2_PLL_LOCK_STATUS BIT(14) > #define O2_PLL_SOFT_RESET BIT(12) > @@ -316,23 +316,23 @@ static void sdhci_o2_enable_internal_clock(struct sdhci_host *host) > u32 scratch32; > > /* PLL software reset */ > - scratch32 = sdhci_readl(host, O2_PLL_WDT_CONTROL1); > + scratch32 = sdhci_readl(host, O2_PLL_DLL_WDT_CONTROL1); > scratch32 |= O2_PLL_SOFT_RESET; > - sdhci_writel(host, scratch32, O2_PLL_WDT_CONTROL1); > + sdhci_writel(host, scratch32, O2_PLL_DLL_WDT_CONTROL1); > udelay(1); > scratch32 &= ~(O2_PLL_SOFT_RESET); > - sdhci_writel(host, scratch32, O2_PLL_WDT_CONTROL1); > + sdhci_writel(host, scratch32, O2_PLL_DLL_WDT_CONTROL1); > > /* PLL force active */ > scratch32 |= O2_PLL_FORCE_ACTIVE; > - sdhci_writel(host, scratch32, O2_PLL_WDT_CONTROL1); > + sdhci_writel(host, scratch32, O2_PLL_DLL_WDT_CONTROL1); > > /* Wait max 20 ms */ > timeout = ktime_add_ms(ktime_get(), 20); > while (1) { > bool timedout = ktime_after(ktime_get(), timeout); > > - scratch = sdhci_readw(host, O2_PLL_WDT_CONTROL1); > + scratch = sdhci_readw(host, O2_PLL_DLL_WDT_CONTROL1); > if (scratch & O2_PLL_LOCK_STATUS) > break; > if (timedout) { > @@ -350,9 +350,9 @@ static void sdhci_o2_enable_internal_clock(struct sdhci_host *host) > > out: > /* Cancel PLL force active */ > - scratch32 = sdhci_readl(host, O2_PLL_WDT_CONTROL1); > + scratch32 = sdhci_readl(host, O2_PLL_DLL_WDT_CONTROL1); > scratch32 &= ~O2_PLL_FORCE_ACTIVE; > - sdhci_writel(host, scratch32, O2_PLL_WDT_CONTROL1); > + sdhci_writel(host, scratch32, O2_PLL_DLL_WDT_CONTROL1); > } > > static int sdhci_o2_get_cd(struct mmc_host *mmc) >