From patchwork Fri Oct 14 11:45:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Shih X-Patchwork-Id: 2683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp138562wrs; Fri, 14 Oct 2022 04:51:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7ZFAtUnfLDq5EGY+rtusNr5hSCtIP3/urwZBveigL5DHdC0rtBGfXRpqx+QrdVFTMhJj7K X-Received: by 2002:a63:4850:0:b0:45d:6ee6:1c18 with SMTP id x16-20020a634850000000b0045d6ee61c18mr4364758pgk.255.1665748263008; Fri, 14 Oct 2022 04:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665748263; cv=none; d=google.com; s=arc-20160816; b=0CoL5lKbC6aTJoiZk55TNkRB/q8swLCLoCd3BUycfMRmxTSwAyhfMrQGwARfKlQz78 K4KOOsCY1l53teHY4Qmfu/Qniaw/q4wEaNOnCLN/TFd10MHZdn2JvY6KtfHXtyEW37DB z1PVIiOEPiM8y0uMgvXhz9bUdNduV3Mb9RfavkO2ZTmpgX6WAaRcXx/YS695oADKhdFx yaBHHdm3ZXsdl1Vv95BU5I35uAMIXuHX5+5q3P9M0eAu9GIH/jECBJLMYiZAKFnK7fkQ v45lW1QJrr3WEmAQUo64hFjWGZ3COQL9EfCrt2Tc/Cg43zL52G4gGF5hvjf3cc84VG33 r7Hw== 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=qlMejhYMrsXeQZKhuEF1RsJsIGglk9iDSAvDuHs7gfk=; b=yjKkj/+Yaujr2GIfyoatJTXAduarxD9CGCGFTNqawRKVAOGols0ismJYablWoTEoSe zkE06Drb/4+dmtJ77TzVy1jPQTO8QZEs/RwXa9oveSi19BMHBRnxjkJlKDJw3UqSuH2C rZbsQDV9aEOVOGY7jnctnnfiGBNgH/e4FuhLNEISE/gJOVk5AqWdWKSGSTXXANyeW8d4 tI2Kt9mddC6h/vhlEXlpjVzZ9WDouX1jUCs9jwJCE7oeqXNimsvAwVZR3iW0bFf8biU1 wh4cYk35B6s1GYmBWlulROujQsE2UWnfhLXijWqgtmGJsidyJpweg3WLIC1NQ9Dv/aT0 RW/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=G8Hw4b2L; 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 fu21-20020a17090ad19500b0020acb709898si2413481pjb.184.2022.10.14.04.50.48; Fri, 14 Oct 2022 04:51:02 -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=G8Hw4b2L; 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 S230063AbiJNLtb (ORCPT + 99 others); Fri, 14 Oct 2022 07:49:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230155AbiJNLsg (ORCPT ); Fri, 14 Oct 2022 07:48:36 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3A916EAC8E; Fri, 14 Oct 2022 04:48:21 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id d24so4506030pls.4; Fri, 14 Oct 2022 04:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; 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=qlMejhYMrsXeQZKhuEF1RsJsIGglk9iDSAvDuHs7gfk=; b=G8Hw4b2L2H0lG9SfcHxalBmc2wtHIOFBxmsUbWYkxjDFlW/aEWp6sQDCG8kruTGgBR 6s42BULDi2LwMaDd4Efod//lUTLO5tU1gDhMRo5pgDkZRPbP1vKFKTg3ra4+ykqgfFY6 mQTk96hwXLFj9ZcJuqOZCxcIDR9JF/SuSQWXsHpHhPieK2561O4SIVzeugVhU1m7/ee8 +uK1TX3VY60R9OKoUAoUr7biI3GFIbsHd5kzYTN3M1qYdSiQHGKYbIJupEBC8EDtG3Kc ppb7406iGC6CwF+lAyQmrzSYSu32C1E9pgsu3n65du9C6AqoEXK76Q+lAbhcmprIY0hu ADeQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=qlMejhYMrsXeQZKhuEF1RsJsIGglk9iDSAvDuHs7gfk=; b=y296INPI1noRt8CjomI94CfYGIpRw6QsJcBiZ1y0kWigGHdM0c01zxOYLrhXEuOYW+ bfu6d+BKj0Hf7jA7e+pVurJCTvP1RMQ4ZWI1tuiCh7IfC2/sCADGB9rA8jIkaQnSO2jq X5t10LSg7clkSh2w0vV896aQZsFf7tJM2sJ0FAGmJu/wCk0i1UN/OQtEmg35S6bY9LE2 lh3PzY6E4KQ7QUIqEhoymNtVEc3Wu92aNSuyYaA0LZAVTVwUqDbR7q/L3W6j3Fh1W50F byj4rqTfdye9BIbFpsE/AowmlyvlRRTHAe3aOwYv5z0hlHRWIkZqQj+HXwnZiqTj0NnV grzw== X-Gm-Message-State: ACrzQf0Dz3tL3zj0gEETZAis57a7BVBKOjzsHne0DLwnUdF5Fps3Xcz8 DyYs9iidOS+LCxFRhdFJfjg= X-Received: by 2002:a17:90b:1d88:b0:20d:7449:c0ef with SMTP id pf8-20020a17090b1d8800b0020d7449c0efmr16746550pjb.103.1665748094976; Fri, 14 Oct 2022 04:48:14 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e282-2aaa-c1aa-06c8-0e68-c5ee.emome-ip6.hinet.net. [2001:b400:e282:2aaa:c1aa:6c8:e68:c5ee]) by smtp.gmail.com with ESMTPSA id x8-20020a170902ec8800b001746f66244asm1606678plg.18.2022.10.14.04.48.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 14 Oct 2022 04:48:14 -0700 (PDT) From: Victor Shih X-Google-Original-From: Victor Shih 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 , Ben Chuang Subject: [PATCH V5 22/26] mmc: sdhci-uhs2: add pre-detect_init hook Date: Fri, 14 Oct 2022 19:45:57 +0800 Message-Id: <20221014114601.15594-23-victor.shih@genesyslogic.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221014114601.15594-1-victor.shih@genesyslogic.com.tw> References: <20221014114601.15594-1-victor.shih@genesyslogic.com.tw> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1746663650661570749?= X-GMAIL-MSGID: =?utf-8?q?1746663650661570749?= This "pre" hook for detect_init(), uhs2_pre_detect_init, will be required to enable UHS-II support, at least, on GL9755. Signed-off-by: Ben Chuang Signed-off-by: AKASHI Takahiro Signed-off-by: Victor Shih --- drivers/mmc/Kconfig | 22 ---------------------- drivers/mmc/Makefile | 7 ------- drivers/mmc/host/sdhci-uhs2.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 4 files changed, 4 insertions(+), 29 deletions(-) delete mode 100644 drivers/mmc/Kconfig delete mode 100644 drivers/mmc/Makefile diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig deleted file mode 100644 index 2436eb4996a4..000000000000 --- a/drivers/mmc/Kconfig +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# MMC subsystem configuration -# - -menuconfig MMC - tristate "MMC/SD/SDIO card support" - depends on HAS_IOMEM - help - This selects MultiMediaCard, Secure Digital and Secure - Digital I/O support. - - If you want MMC/SD/SDIO support, you should say Y here and - also to your specific host controller driver. - -if MMC - -source "drivers/mmc/core/Kconfig" - -source "drivers/mmc/host/Kconfig" - -endif # MMC diff --git a/drivers/mmc/Makefile b/drivers/mmc/Makefile deleted file mode 100644 index 3ea0126a9a72..000000000000 --- a/drivers/mmc/Makefile +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0-only -# -# Makefile for the kernel mmc device drivers. -# - -obj-$(CONFIG_MMC) += core/ -obj-$(subst m,y,$(CONFIG_MMC)) += host/ diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c index 8e547b672574..88decfba1880 100644 --- a/drivers/mmc/host/sdhci-uhs2.c +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -1570,6 +1570,9 @@ static int sdhci_uhs2_do_detect_init(struct mmc_host *mmc) DBG("%s: begin UHS2 init.\n", __func__); + if (host->ops && host->ops->uhs2_pre_detect_init) + host->ops->uhs2_pre_detect_init(host); + if (sdhci_uhs2_interface_detect(host)) { pr_warn("%s: cannot detect UHS2 interface.\n", mmc_hostname(host->mmc)); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index bc4be80bf0af..943701aef22a 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -745,6 +745,7 @@ struct sdhci_ops { struct mmc_request *mrq); void (*dump_vendor_regs)(struct sdhci_host *host); void (*dump_uhs2_regs)(struct sdhci_host *host); + void (*uhs2_pre_detect_init)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS