Message ID | 20230331105546.13607-23-victor.shih@genesyslogic.com.tw |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp479650vqo; Fri, 31 Mar 2023 04:10:35 -0700 (PDT) X-Google-Smtp-Source: AKy350aOrV6kiCtI00bTFfMctwXMLt48HhJIT64TyxngQ3EUY62wXfqX5RW9s2RfYefO+9JAuM+o X-Received: by 2002:a62:7b52:0:b0:622:8a8e:8cf8 with SMTP id w79-20020a627b52000000b006228a8e8cf8mr10319719pfc.14.1680261035300; Fri, 31 Mar 2023 04:10:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680261035; cv=none; d=google.com; s=arc-20160816; b=VaP+OHLoFGK7Vt4Ql2oU12prK0CiY6IbWvm6+SKkNmrIUoHb574lsi2eMAcgrp5m+S 8p52O6MLvk37tKzTj1Ffm5ocPyYyXvcK5gkAV4fqbQR5jimHF9FPkO8VdxIMEVUl5Lit AJ3jSVWBuCuB6A6ZQqyL71ADhTc93TBgsBNw82z2gMbofc99eQ9qgMRFVmdytUd36igP g8EuILY43bY8xCxvieHjX5OfqUkcvOfifnHe8wZx1rKZKzw88BqUCCqJzEAmME7ijTmu SH98Bwk9FAy1H3FsvzlVR/chc5QjnL+h+K6CL0j47PLpF4QttoUVlcGFVMGWzxNEYbGd z0pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wYAJZrrmPDxkvadC2nk65J6PT+UmOKiqvEkS1eMtgqA=; b=RcgU6jdSUas10yeDCm4Jl9pmaJgjKLTkzlSWqNI1JUF757Ax7Ydtbf9cWTxJ/a2EfZ 8FOsH2VVZFiY49qS0wnbNbWLc3vVmBn0DSsqjXgopxCxrkH7bsIswiNXAmiYCvlsPEGp lHk8mNUXhx2NnlyVlbVSFUjTFORXIIyB0iYgWegyH9ze3MQPTYC6n4/mjw4Bj8XNK8HT o32aGGsUm/Mk+A0ysaDaChQ4+rOqYw0tzhYYoRSbc08IdF/503cGtAQui+LpffS9/jNl bFpLQ2WBdykokXWNrXZxxoP4PC5M5wN2TRcovNDfHIb6yg740i7WCREgvCkaZiMMugLW FAew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="p8gyTC/4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w71-20020a63824a000000b004dccf388f93si2188917pgd.522.2023.03.31.04.10.23; Fri, 31 Mar 2023 04:10:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="p8gyTC/4"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231913AbjCaK73 (ORCPT <rfc822;jimliu8233@gmail.com> + 99 others); Fri, 31 Mar 2023 06:59:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232017AbjCaK6o (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 31 Mar 2023 06:58:44 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 360FB1F792; Fri, 31 Mar 2023 03:57:06 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id n14so5007108plc.8; Fri, 31 Mar 2023 03:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680260223; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wYAJZrrmPDxkvadC2nk65J6PT+UmOKiqvEkS1eMtgqA=; b=p8gyTC/4ugFMOo0es9UFLm2LbJvpmSnkrRAuPb5Gu8IefYRfrWJQgGu0PviEsO3Dx5 8RNScoffG6T+tISDt9fR1eMzmf9n3ru7lXh/f/665cXZbAGV9AkTgcA1dIBNfpP/aiCx c/KqhR/tAsusPhX2K8mgwJDu1OavdLUXRff0YiQKoB1LmAPoCrZIs/cLcwvZZwJWY16M LArPmICAxbGoXpAzFUVyDnYHH3HAsLHqHJbqbDRlMTl7atlFCKHChjNOXvt7QuLn+Ai7 FCNBZ1B1f78GFdaxz0x6tuTTf4nSMqtlPtcZHaBTeUaaqpidGKxnjqs52ptKUkvgBpqN NTSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680260223; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wYAJZrrmPDxkvadC2nk65J6PT+UmOKiqvEkS1eMtgqA=; b=JVFLQ5BlegbYU9n1EUx34OKnb+f2McXi62FDj1mbSstGOX8f8xznF+fdXsrJeVraxg 7dsVddzNiYtRpxJudz6rvECbN0bpK1ZMeYWnqDLi4bnZxgNg5sPEQqkNkA+2Fp+bZiy7 S2tqIPTf7v5c2nLIoWpxZXGUidI6rmwovIgMK2ot4WeCYDaHLR6zpFxOCHeqFf2abnuh QFAhkIgFcjxyoxyyphSIsduQLabniDGylOMwQuU/3dC6Ia3wODIUG+iJzlIMgdGKgDvW x8wgeEhUE/IaroMedeE/nnFzZRoeFW/BKjUVSjAE73pw6gsxDIe4zq1X7+0gSal335XX 8g/Q== X-Gm-Message-State: AAQBX9f3cDabCoHUb+gyKQdG3CZfLplHEIIKTTix+uSAa3b9EDmOHqdJ dRI/whxg0ZkNeYbrF/jCZMo= X-Received: by 2002:a17:902:ce8e:b0:1a2:940c:e452 with SMTP id f14-20020a170902ce8e00b001a2940ce452mr4233954plg.9.1680260223728; Fri, 31 Mar 2023 03:57:03 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e25c-983f-c7ff-3efd-77d9-6c16.emome-ip6.hinet.net. [2001:b400:e25c:983f:c7ff:3efd:77d9:6c16]) by smtp.gmail.com with ESMTPSA id f19-20020a170902e99300b0019acd3151d0sm1287665plb.114.2023.03.31.03.57.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 03:57:03 -0700 (PDT) From: Victor Shih <victorshihgli@gmail.com> X-Google-Original-From: Victor Shih <victor.shih@genesyslogic.com.tw> To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, benchuanggli@gmail.com, HL.Liu@genesyslogic.com.tw, Greg.tu@genesyslogic.com.tw, takahiro.akashi@linaro.org, dlunev@chromium.org, Victor Shih <victor.shih@genesyslogic.com.tw>, Ben Chuang <ben.chuang@genesyslogic.com.tw> Subject: [PATCH V7 22/23] mmc: sdhci-pci: add UHS-II support framework Date: Fri, 31 Mar 2023 18:55:45 +0800 Message-Id: <20230331105546.13607-23-victor.shih@genesyslogic.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230331105546.13607-1-victor.shih@genesyslogic.com.tw> References: <20230331105546.13607-1-victor.shih@genesyslogic.com.tw> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761881395087687548?= X-GMAIL-MSGID: =?utf-8?q?1761881395087687548?= |
Series |
Add support UHS-II for GL9755
|
|
Commit Message
Victor Shih
March 31, 2023, 10:55 a.m. UTC
From: AKASHI Takahiro <takahiro.akashi@linaro.org> This patch prepares for adding UHS-II support at a specific UHS-II capable sdhci-pci controller, GL9755 for now. Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> --- drivers/mmc/host/sdhci-pci-core.c | 16 +++++++++++++++- drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-)
Comments
On 31/03/23 13:55, Victor Shih wrote: > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > This patch prepares for adding UHS-II support at a specific UHS-II > capable sdhci-pci controller, GL9755 for now. > > Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > --- > drivers/mmc/host/sdhci-pci-core.c | 16 +++++++++++++++- > drivers/mmc/host/sdhci-pci.h | 3 +++ > 2 files changed, 18 insertions(+), 1 deletion(-) > > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c > index 01975d145200..6b5109f7feef 100644 > --- a/drivers/mmc/host/sdhci-pci-core.c > +++ b/drivers/mmc/host/sdhci-pci-core.c > @@ -40,6 +40,7 @@ > #include "sdhci.h" > #include "sdhci-cqhci.h" > #include "sdhci-pci.h" > +#include "sdhci-uhs2.h" > > static void sdhci_pci_hw_reset(struct sdhci_host *host); > > @@ -2155,7 +2156,10 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot) > if (scratch == (u32)-1) > dead = 1; > > - sdhci_remove_host(slot->host, dead); > + if (slot->chip->fixes && slot->chip->fixes->remove_host) > + slot->chip->fixes->remove_host(slot, dead); > + else > + sdhci_remove_host(slot->host, dead); > > if (slot->chip->fixes && slot->chip->fixes->remove_slot) > slot->chip->fixes->remove_slot(slot, dead); > @@ -2163,6 +2167,16 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot) > sdhci_free_host(slot->host); > } > > +int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot) > +{ > + return sdhci_uhs2_add_host(slot->host); This patch does not compile because uhs2 functions cannot be called yet because config MMC_SDHCI_UHS2 is not yet selected. Please ensure all patches compile before submitting. > +} > + > +void sdhci_pci_uhs2_remove_host(struct sdhci_pci_slot *slot, int dead) > +{ > + sdhci_uhs2_remove_host(slot->host, dead); > +} > + > static void sdhci_pci_runtime_pm_allow(struct device *dev) > { > pm_suspend_ignore_children(dev, 1); > diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h > index 3661a224fb04..7f4a981c0e63 100644 > --- a/drivers/mmc/host/sdhci-pci.h > +++ b/drivers/mmc/host/sdhci-pci.h > @@ -140,6 +140,7 @@ struct sdhci_pci_fixes { > int (*probe_slot) (struct sdhci_pci_slot *); > int (*add_host) (struct sdhci_pci_slot *); > void (*remove_slot) (struct sdhci_pci_slot *, int); > + void (*remove_host) (struct sdhci_pci_slot *, int); > > #ifdef CONFIG_PM_SLEEP > int (*suspend) (struct sdhci_pci_chip *); > @@ -184,6 +185,8 @@ static inline void *sdhci_pci_priv(struct sdhci_pci_slot *slot) > return (void *)slot->private; > } > > +int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot); > +void sdhci_pci_uhs2_remove_host(struct sdhci_pci_slot *slot, int dead); > #ifdef CONFIG_PM_SLEEP > int sdhci_pci_resume_host(struct sdhci_pci_chip *chip); > #endif
Hi, Adrian On Wed, Apr 12, 2023 at 9:12 PM Adrian Hunter <adrian.hunter@intel.com> wrote: > > On 31/03/23 13:55, Victor Shih wrote: > > From: AKASHI Takahiro <takahiro.akashi@linaro.org> > > > > This patch prepares for adding UHS-II support at a specific UHS-II > > capable sdhci-pci controller, GL9755 for now. > > > > Signed-off-by: Ben Chuang <ben.chuang@genesyslogic.com.tw> > > Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> > > --- > > drivers/mmc/host/sdhci-pci-core.c | 16 +++++++++++++++- > > drivers/mmc/host/sdhci-pci.h | 3 +++ > > 2 files changed, 18 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c > > index 01975d145200..6b5109f7feef 100644 > > --- a/drivers/mmc/host/sdhci-pci-core.c > > +++ b/drivers/mmc/host/sdhci-pci-core.c > > @@ -40,6 +40,7 @@ > > #include "sdhci.h" > > #include "sdhci-cqhci.h" > > #include "sdhci-pci.h" > > +#include "sdhci-uhs2.h" > > > > static void sdhci_pci_hw_reset(struct sdhci_host *host); > > > > @@ -2155,7 +2156,10 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot) > > if (scratch == (u32)-1) > > dead = 1; > > > > - sdhci_remove_host(slot->host, dead); > > + if (slot->chip->fixes && slot->chip->fixes->remove_host) > > + slot->chip->fixes->remove_host(slot, dead); > > + else > > + sdhci_remove_host(slot->host, dead); > > > > if (slot->chip->fixes && slot->chip->fixes->remove_slot) > > slot->chip->fixes->remove_slot(slot, dead); > > @@ -2163,6 +2167,16 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot) > > sdhci_free_host(slot->host); > > } > > > > +int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot) > > +{ > > + return sdhci_uhs2_add_host(slot->host); > > This patch does not compile because uhs2 functions > cannot be called yet because config MMC_SDHCI_UHS2 > is not yet selected. > > Please ensure all patches compile before submitting. > I will fix it in the V8 version. > > +} > > + > > +void sdhci_pci_uhs2_remove_host(struct sdhci_pci_slot *slot, int dead) > > +{ > > + sdhci_uhs2_remove_host(slot->host, dead); > > +} > > + > > static void sdhci_pci_runtime_pm_allow(struct device *dev) > > { > > pm_suspend_ignore_children(dev, 1); > > diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h > > index 3661a224fb04..7f4a981c0e63 100644 > > --- a/drivers/mmc/host/sdhci-pci.h > > +++ b/drivers/mmc/host/sdhci-pci.h > > @@ -140,6 +140,7 @@ struct sdhci_pci_fixes { > > int (*probe_slot) (struct sdhci_pci_slot *); > > int (*add_host) (struct sdhci_pci_slot *); > > void (*remove_slot) (struct sdhci_pci_slot *, int); > > + void (*remove_host) (struct sdhci_pci_slot *, int); > > > > #ifdef CONFIG_PM_SLEEP > > int (*suspend) (struct sdhci_pci_chip *); > > @@ -184,6 +185,8 @@ static inline void *sdhci_pci_priv(struct sdhci_pci_slot *slot) > > return (void *)slot->private; > > } > > > > +int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot); > > +void sdhci_pci_uhs2_remove_host(struct sdhci_pci_slot *slot, int dead); > > #ifdef CONFIG_PM_SLEEP > > int sdhci_pci_resume_host(struct sdhci_pci_chip *chip); > > #endif > Thanks, Victor Shih
diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 01975d145200..6b5109f7feef 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -40,6 +40,7 @@ #include "sdhci.h" #include "sdhci-cqhci.h" #include "sdhci-pci.h" +#include "sdhci-uhs2.h" static void sdhci_pci_hw_reset(struct sdhci_host *host); @@ -2155,7 +2156,10 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot) if (scratch == (u32)-1) dead = 1; - sdhci_remove_host(slot->host, dead); + if (slot->chip->fixes && slot->chip->fixes->remove_host) + slot->chip->fixes->remove_host(slot, dead); + else + sdhci_remove_host(slot->host, dead); if (slot->chip->fixes && slot->chip->fixes->remove_slot) slot->chip->fixes->remove_slot(slot, dead); @@ -2163,6 +2167,16 @@ static void sdhci_pci_remove_slot(struct sdhci_pci_slot *slot) sdhci_free_host(slot->host); } +int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot) +{ + return sdhci_uhs2_add_host(slot->host); +} + +void sdhci_pci_uhs2_remove_host(struct sdhci_pci_slot *slot, int dead) +{ + sdhci_uhs2_remove_host(slot->host, dead); +} + static void sdhci_pci_runtime_pm_allow(struct device *dev) { pm_suspend_ignore_children(dev, 1); diff --git a/drivers/mmc/host/sdhci-pci.h b/drivers/mmc/host/sdhci-pci.h index 3661a224fb04..7f4a981c0e63 100644 --- a/drivers/mmc/host/sdhci-pci.h +++ b/drivers/mmc/host/sdhci-pci.h @@ -140,6 +140,7 @@ struct sdhci_pci_fixes { int (*probe_slot) (struct sdhci_pci_slot *); int (*add_host) (struct sdhci_pci_slot *); void (*remove_slot) (struct sdhci_pci_slot *, int); + void (*remove_host) (struct sdhci_pci_slot *, int); #ifdef CONFIG_PM_SLEEP int (*suspend) (struct sdhci_pci_chip *); @@ -184,6 +185,8 @@ static inline void *sdhci_pci_priv(struct sdhci_pci_slot *slot) return (void *)slot->private; } +int sdhci_pci_uhs2_add_host(struct sdhci_pci_slot *slot); +void sdhci_pci_uhs2_remove_host(struct sdhci_pci_slot *slot, int dead); #ifdef CONFIG_PM_SLEEP int sdhci_pci_resume_host(struct sdhci_pci_chip *chip); #endif