Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2000962ybl; Thu, 15 Aug 2019 05:00:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqw/g+zMRD6BSKfeuJMegg5TNtZY8CrukNw0asYzgsrAbfNfK8vrvPgBfibZKhcO5gJx95WD X-Received: by 2002:a17:90a:cc0c:: with SMTP id b12mr1847430pju.138.1565870448466; Thu, 15 Aug 2019 05:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565870448; cv=none; d=google.com; s=arc-20160816; b=qfqfQdkXvPeK1X+6MSB+4dUwDr8pKYO4XNQFyBtY45T4YjPBRYOvkBtMYfeEXHt/+Z h+lMUPn7CgitLxKS71WVnyX9RnrOAZjJhDkStzRzlQgWxbceayKzsMf6rK8bZiE0cdTY 1qn9WwBNwy6hxU3TLwOP/O9NXRPPqu4GLtsAqjJeh9BXwyj8bMp15UkM/9MNJmcsYWy9 Y+QVLuZnNRT/+iYSXz/LKnczjlOKqkFH8MtgUlw3ErVba9saYXm1/SQ7WX+fOqHfIY51 /26Y2R/lGXvjgc5keZzaiDe4YBXwBYtPKjt4VkMmKaO/HjTC4ilgwKKTbjVikRHoqD3z mtzw== 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=0qBctUE6YitazVL22r/hwHvlcQD4nCs72rTNbXuuFM0=; b=suUse0oSjKX1xdYKSfftYrVECr2OjGDDOGI/jV940cwe01P62G72t9oGFVWyxgR+Kv BcN6kcNUh3NuUBwbofUOkWeXMKDCviotpSmzXS6BXBFvyQpq1/tP0Kxw7PbelO3j4jSM 4jNPF2IwgNy/b3Tvf979nX82JuwchtInjA39MHH7lY6RdAj0PcvqHO57oXMQBGeYo4ny s5yte3pc3jgzb0WQN2Cv5/EnOjai+qdgNyMdj6AF6y2BpIt68uNmDxt4nQmiRTKcGoak KdyAScvBQG0uCNzdoaDS8WCzfB9Ukdp6Vh9rOb5v8KbdiEI2HMxiq764A39ZTYkX4IS5 PzGQ== 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 r62si1851665plb.363.2019.08.15.05.00.32; Thu, 15 Aug 2019 05:00:48 -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 S1730064AbfHOLIT (ORCPT + 99 others); Thu, 15 Aug 2019 07:08:19 -0400 Received: from mga03.intel.com ([134.134.136.65]:39394 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725875AbfHOLIT (ORCPT ); Thu, 15 Aug 2019 07:08:19 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 15 Aug 2019 04:08:18 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,389,1559545200"; d="scan'208";a="184593296" Received: from ahunter-desktop.fi.intel.com (HELO [10.237.72.122]) ([10.237.72.122]) by FMSMGA003.fm.intel.com with ESMTP; 15 Aug 2019 04:08:15 -0700 Subject: Re: [PATCH V6 1/3] mmc: sdhci: 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)" , "Xiaoguang Yu (WH)" , "Max Huang (SC)" References: <1565372245-4598-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: <242852f2-a70e-c233-7893-eb7b346950a9@intel.com> Date: Thu, 15 Aug 2019 14:07:06 +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: <1565372245-4598-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 9/08/19 8:37 PM, Shirley Her (SC) wrote: > Change register name O2_PLL_WDT_CONTROL1 to O2_PLL_DLL_WDT_CONTROL1 > > Signed-off-by:Shirley Her Please change the subject to: mmc: sdhci-pci-o2micro: Change O2 Host PLL and DLL register name > --- > 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) >