From patchwork Fri Nov 6 02:27:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AKASHI Takahiro X-Patchwork-Id: 320712 Delivered-To: patch@linaro.org Received: by 2002:a92:7b12:0:0:0:0:0 with SMTP id w18csp949029ilc; Thu, 5 Nov 2020 18:29:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIvghrQRoVnMRpzqjUkiLdM3CJvKh/vHVXcD94yMJdq8quOPW48P3gKYlwGdGN3LxN6Q7v X-Received: by 2002:aa7:c508:: with SMTP id o8mr5807485edq.339.1604629759154; Thu, 05 Nov 2020 18:29:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604629759; cv=none; d=google.com; s=arc-20160816; b=AAslsBTHO5DiwF46/KF/BkcODCJ4mGLZwtJX1QsFvv58fIq2jbdCJBAw95vKr73Tdl iNVztSURJ2sjP54UUvW7vERPw+GJ4gf44Ma02S7ASr/wEUyTj+iPJZraUjN4GhRlZ1nZ 1Lu5GHpPYusMG2aw65C7mhYI+s4LpWxb4hzW1L/dhUWf77iBMN1yrL4+H55b2HWoOxv8 r704uUCLjEj329hJJ7Ywe/9Cj+yE3gjsM7EOq4RnWYVeXISwvv5m6SRLKpbQ2Pyztq/2 FpBX/3JhiGiOv3mxQGq86bl5u5kCM3ZabsHjWTXTjq/YQwlZgyhu4MOT0dZ3IOgz47PG u5DQ== 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=b27GJGEmE1Mom6xyD9K+l/VA3DKeEcufnAZxDfWuSpA=; b=m2tepf9B0QbVRSbwF8arfIe/ZStjud9UR/YBddATBNSC1pWCdMVOKoRBotxxwzg2B2 pMOizK6ImOBjFxPojeYY4nKesJscRUruQXLK8UMLPgyzA87ikVqF4N3OXuT/9VNQkRip jyDtsomVBSyuZvNibTFYWfbOPLTGtPqa53tWbv1C22WsT0EPHpFbX9hlz5PrFuZ5bkEH R6fDo6FSZeDSXeu5y1yh6d+ghmS0g56+wcCVbG+ddRRvng65mJxTliYalWdpSO8j3UGv zgS1A0u5SvzlbXZE6PCF5WuP38X+jyJAMVo4mo/G+tlG7j88WgDnZxSzJyckZ0/uKs86 6yJA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QloUebj4; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id oz19si3044231ejb.738.2020.11.05.18.29.19; Thu, 05 Nov 2020 18:29:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=QloUebj4; spf=pass (google.com: domain of linux-mmc-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-mmc-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726412AbgKFC3S (ORCPT + 4 others); Thu, 5 Nov 2020 21:29:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44336 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726402AbgKFC3R (ORCPT ); Thu, 5 Nov 2020 21:29:17 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 77E80C0613D2 for ; Thu, 5 Nov 2020 18:29:17 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id u4so2768368pgr.9 for ; Thu, 05 Nov 2020 18:29:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=b27GJGEmE1Mom6xyD9K+l/VA3DKeEcufnAZxDfWuSpA=; b=QloUebj4KbG5jJRv0H8hCra2triZfLbfW8YzbN7Y8qwMNY7nfk7UPDQCEEo7y0Dyoy M7RwEGOd+lbQdUe3ko8l1jzzg2egeZ/LCN3t6mNuoBaC9WbpNs7RiLPqcz/3wpRoqfx/ dHOTXc6I6T7t7vMGDZ9iuu2Zull02bHOMMWq162+yW1i4hBq1gNZwy0mUiaYgmPSiCgj mKN0IVeOHmRoaEow/UPYyPm3BRfkGHtheIclmoo1rdIiJ3/EXbBdUJWjBmLYz4lhDpAV hYElcanv3jr12+UMMLPwTUaGF8WAigBqYsgQuYhUHNce7g6qLWsuHHu3ljNihLXyoU0I Uoyg== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=b27GJGEmE1Mom6xyD9K+l/VA3DKeEcufnAZxDfWuSpA=; b=nYMbZx5SiBDxCElWARlsyOXez0M8cU3C1XIVBnw8QXu05p/aHDEsRXHNlCV8Ba3LCq LXAFMsHdgyl3qJV0EgRaEsE7tvbd64xabYkBPfMb+yUYX1qmDtLkhxThX/gaQ2GBDKY2 MSti7sUAu6YHcyvLoZnW5I8fzaocxVw6UWudZ5lwWZogRsAr6nuZ38Iwq3ijRQJhcMGL n8ZB+S3PDF6XvjwP3nt/JZw77Hmhi+YVGV66q/2tKbalBwaZCrHkaKs2LUw5OfRMKpFc PqRot1XEsWTq77ofCTVhx6sqGaGo3aPIy4Oe0xjpkqo9Q8kEck8l1+Fl9AO94f3VrsIf RVYQ== X-Gm-Message-State: AOAM531nV9fwq8SFXsee+rdRsqvOtzbNoGl/yDoc85nzXf7C2Mub3L01 pGVNohyTdbSS8es05gdRminc/w== X-Received: by 2002:a17:90a:1f0b:: with SMTP id u11mr5388492pja.105.1604629757052; Thu, 05 Nov 2020 18:29:17 -0800 (PST) Received: from localhost.localdomain (p784a66b9.tkyea130.ap.so-net.ne.jp. [120.74.102.185]) by smtp.gmail.com with ESMTPSA id m13sm3703040pjr.30.2020.11.05.18.29.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Nov 2020 18:29:16 -0800 (PST) From: AKASHI Takahiro To: ulf.hansson@linaro.org, adrian.hunter@intel.com Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, ben.chuang@genesyslogic.com.tw, greg.tu@genesyslogic.com.tw, AKASHI Takahiro Subject: [RFC PATCH v3.1 26/27] mmc: sdhci-pci: add UHS-II support framework Date: Fri, 6 Nov 2020 11:27:25 +0900 Message-Id: <20201106022726.19831-27-takahiro.akashi@linaro.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20201106022726.19831-1-takahiro.akashi@linaro.org> References: <20201106022726.19831-1-takahiro.akashi@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.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 Signed-off-by: AKASHI Takahiro --- drivers/mmc/host/sdhci-pci-core.c | 16 +++++++++++++++- drivers/mmc/host/sdhci-pci.h | 3 +++ 2 files changed, 18 insertions(+), 1 deletion(-) -- 2.28.0 diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c index 23da7f7fe093..a896c7b325d0 100644 --- a/drivers/mmc/host/sdhci-pci-core.c +++ b/drivers/mmc/host/sdhci-pci-core.c @@ -39,6 +39,7 @@ #include "sdhci.h" #include "sdhci-pci.h" +#include "sdhci-uhs2.h" static void sdhci_pci_hw_reset(struct sdhci_host *host); @@ -2215,7 +2216,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); @@ -2226,6 +2230,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 d0ed232af0eb..c961ec3cec26 100644 --- a/drivers/mmc/host/sdhci-pci.h +++ b/drivers/mmc/host/sdhci-pci.h @@ -137,6 +137,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 *); @@ -186,6 +187,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