Received: by 2002:a05:6358:7058:b0:131:369:b2a3 with SMTP id 24csp10707092rwp; Fri, 21 Jul 2023 03:49:44 -0700 (PDT) X-Google-Smtp-Source: APBJJlFniTjXDanIXNXZ8CNoZfoTnszO/74r6EU3wP1hrEV+nqUDHCTpYBFhcLw9W0w4UrHQeXyi X-Received: by 2002:a05:6a20:4f04:b0:137:72b2:8bfe with SMTP id gi4-20020a056a204f0400b0013772b28bfemr1130494pzb.48.1689936584328; Fri, 21 Jul 2023 03:49:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689936584; cv=none; d=google.com; s=arc-20160816; b=DFmzUdjScLBBTtXDTZFeQtKC8tOQBPvyW65a2oAiOcCrYwG07g7pMDunPIgN9T2ee3 ezFjb62DhfBQQo3pKl3AT/+zhV9hAwubTVD2hhnoakLRqySrjpwffo0oo0qLvuPR37Yc C5zV/JjDdNty3pXfqFuopWtL8Dg4OoJ6kXrcy0G/5feFfQcAffenJPFVZFyfMLY38zB1 tRaCzWSxLMXqunjp7nGGWmU7FFn2FuiM4JA4gXR7kREHEujg2KNqSCl0b1hXuNU188YK n49ovS608JEZZK4pnoi+3jhlimJyiGWo+P9drtRFbwAlKQ/rpyWy0i1O2e7q9Js6N5S/ nDeA== 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=YQx1I5mYFyUXq9s8azfS6Q/MKRFPbt2R52tEexNcMEA=; fh=fI4q009785iZEQbMo9mPiCtk2O+O6Kfjq5womanK3eI=; b=1JQ4Hpmi2RcpS6E0hDVq3uRjnAFNepI4QwSJmJIP2uyD4Ppbt9ByZQmLuM5VYvxXRJ JSCPA0B0NhJPGw4bD3KX6ZWAvnVrlDa+RuybhUhOPZZYx8SCFCso/g/+9jXgI9wGkEAZ 4UhDfPwxL8tFQu3RdQ5e45mmGDfhBemgs+sKOl+gOpryhUeCCt+oKAJSZlwoa6QOQSm3 g31YyZcX71dY2LnTAXP/lh5nFHs+7P2aW+i8KTgFrf78OGCCXPeXcWJ+5ZIZ6aBAdUSu 651BMRl/tmjxhrqkQiQXPFZN77VrlSKd8ZQ1ZcSCfHj2EwYZJmhXtH6THeEKWrcQHnTQ orSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=a6sHYlcW; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a16-20020a63e410000000b00553b54585e9si2655265pgi.696.2023.07.21.03.49.31; Fri, 21 Jul 2023 03:49:44 -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=20221208 header.b=a6sHYlcW; 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 S230287AbjGUKPR (ORCPT + 99 others); Fri, 21 Jul 2023 06:15:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231379AbjGUKOk (ORCPT ); Fri, 21 Jul 2023 06:14:40 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F3B7111D; Fri, 21 Jul 2023 03:14:37 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id d9443c01a7336-1b9cdef8619so12028405ad.0; Fri, 21 Jul 2023 03:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689934477; x=1690539277; 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=YQx1I5mYFyUXq9s8azfS6Q/MKRFPbt2R52tEexNcMEA=; b=a6sHYlcW0YZBq46tA4H1O8EWH2QfQwK+3vNzzBteSdxV7ldM9gCofuhsn1WzSzi2aL sOqD/JPeW2Ysc3InMz+H1RrdiBuWxZhSdNijaL/Fi3DPhRAF0DYOLiZnOfOEY/4jAA00 bLulgVdcJZ8LmYMqSu7/OhQ3+z7Z58webeCmSMk+6sDo274fTYkVmPyWlCHEXbiLsw2W OGc2CVbcyzDSzlyMZFrnPSEErwbLYpTauOCDlwQFBHJoQNcEepwi4BpgPRdqqVjidwlO OTvpxD/OV6KdYKMQ+08wUdi2VmhD33PjgcmI1zc2S9jGcF3PrxWOlyv61NjKJM44DET9 sBmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689934477; x=1690539277; 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=YQx1I5mYFyUXq9s8azfS6Q/MKRFPbt2R52tEexNcMEA=; b=LC/SqhWmIOjaR36tIR+T8VefVTIL4k3BoNNRgyjPPMN3ldPkjCybacN1u4WO/9X9oW 3RKGEHHlyUP1zJ7k8kiAC4SPxtbZeoG6mBY3GqtJclE+OZUTVUTSr+CpRDzxpsHDV67j R4HMUQmd3IboMBGD6f/cl4sqTuqSiJz8kjr6pB4iZ6QyQwoCM1Ie4I0jfCUg0UGMYAUO x/ds483bR2jhFkTiizXoi6S+UJYSAYVfLgaBi3fGDUrFGinuClZkp6jzSbqcZaH/TjLi 8z6N5wb8hhzzQwtDNvw46Opza9EfJz3Papcr9mPti1PjGaX6dJGR3IIEo77iyEAB5l4d G0vw== X-Gm-Message-State: ABy/qLa36q5mqUD0ckfT0smm91YUF19Q+6kai8CSCt9U3Y5Lg0BS1MCz qmymt23p5+QGcNlzntimYIs= X-Received: by 2002:a17:903:1cf:b0:1ba:1704:8a12 with SMTP id e15-20020a17090301cf00b001ba17048a12mr1366399plh.45.1689934477445; Fri, 21 Jul 2023 03:14:37 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e23e-6b0d-6c46-3684-497a-06ee.emome-ip6.hinet.net. [2001:b400:e23e:6b0d:6c46:3684:497a:6ee]) by smtp.gmail.com with ESMTPSA id y1-20020a170902b48100b001b86492d724sm3050719plr.223.2023.07.21.03.14.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Jul 2023 03:14:37 -0700 (PDT) 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 , Victor Shih Subject: [PATCH V9 08/23] mmc: sdhci: add UHS-II module and add a kernel configuration Date: Fri, 21 Jul 2023 18:13:34 +0800 Message-Id: <20230721101349.12387-9-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230721101349.12387-1-victorshihgli@gmail.com> References: <20230721101349.12387-1-victorshihgli@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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_BLOCKED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 From: Victor Shih This patch adds sdhci-uhs2.c as a module for UHS-II support. This is a skeleton for further development in this patch series. This kernel configuration, CONFIG_MMC_SDHCI_UHS2, will be used in the following commits to indicate UHS-II specific code in sdhci controllers. Signed-off-by: Ben Chuang Signed-off-by: AKASHI Takahiro Signed-off-by: Victor Shih --- Updates in V9: - Modify the commit message. Updates in V8: - Modify MODULE_LICENSE from "GPL v2" to "GPL". Updates in V6: - Merage V5 of patch[7] and patch[9] in to V6 of patch[8]. --- drivers/mmc/host/Kconfig | 9 +++++++ drivers/mmc/host/Makefile | 1 + drivers/mmc/host/sdhci-uhs2.c | 46 +++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 drivers/mmc/host/sdhci-uhs2.c diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 159a3e9490ae..215f1ab011dd 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -98,6 +98,15 @@ config MMC_SDHCI_BIG_ENDIAN_32BIT_BYTE_SWAPPER This is the case for the Nintendo Wii SDHCI. +config MMC_SDHCI_UHS2 + tristate "UHS2 support on SDHCI controller" + depends on MMC_SDHCI + help + This option is selected by SDHCI controller drivers that want to + support UHS2-capable devices. + + If you have a controller with this feature, say Y or M here. + config MMC_SDHCI_PCI tristate "SDHCI support on PCI bus" depends on MMC_SDHCI && PCI diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile index a693fa3d3f1c..799f21d1f81f 100644 --- a/drivers/mmc/host/Makefile +++ b/drivers/mmc/host/Makefile @@ -11,6 +11,7 @@ obj-$(CONFIG_MMC_PXA) += pxamci.o obj-$(CONFIG_MMC_MXC) += mxcmmc.o obj-$(CONFIG_MMC_MXS) += mxs-mmc.o obj-$(CONFIG_MMC_SDHCI) += sdhci.o +obj-$(CONFIG_MMC_SDHCI_UHS2) += sdhci-uhs2.o obj-$(CONFIG_MMC_SDHCI_PCI) += sdhci-pci.o sdhci-pci-y += sdhci-pci-core.o sdhci-pci-o2micro.o sdhci-pci-arasan.o \ sdhci-pci-dwc-mshc.o sdhci-pci-gli.o diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c new file mode 100644 index 000000000000..608f8ad5aaed --- /dev/null +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -0,0 +1,46 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* + * linux/drivers/mmc/host/sdhci_uhs2.c - Secure Digital Host Controller + * Interface driver + * + * Copyright (C) 2014 Intel Corp, All Rights Reserved. + * Copyright (C) 2020 Genesys Logic, Inc. + * Authors: Ben Chuang + * Copyright (C) 2020 Linaro Limited + * Author: AKASHI Takahiro + */ + +#include + +#include "sdhci.h" +#include "sdhci-uhs2.h" + +#define DRIVER_NAME "sdhci_uhs2" +#define DBG(f, x...) \ + pr_debug(DRIVER_NAME " [%s()]: " f, __func__, ## x) + +/*****************************************************************************\ + * * + * Driver init/exit * + * * +\*****************************************************************************/ + +static int sdhci_uhs2_host_ops_init(struct sdhci_host *host) +{ + return 0; +} + +static int __init sdhci_uhs2_mod_init(void) +{ + return 0; +} +module_init(sdhci_uhs2_mod_init); + +static void __exit sdhci_uhs2_mod_exit(void) +{ +} +module_exit(sdhci_uhs2_mod_exit); + +MODULE_AUTHOR("Intel, Genesys Logic, Linaro"); +MODULE_DESCRIPTION("MMC UHS-II Support"); +MODULE_LICENSE("GPL"); -- 2.25.1