From patchwork Tue Dec 13 09:00:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Shih X-Patchwork-Id: 32699 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:8188:b0:89:790f:f786 with SMTP id m8csp3857542dye; Tue, 13 Dec 2022 01:03:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf4BjjlOTAJfcnR8EWRU4UyS+kydwwQsHmXAa1Kcs3uvaMswXFZ+siiyYiHBkHmrqTP7NDFG X-Received: by 2002:a17:902:d706:b0:189:e55d:ec72 with SMTP id w6-20020a170902d70600b00189e55dec72mr21353423ply.20.1670922219951; Tue, 13 Dec 2022 01:03:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670922219; cv=none; d=google.com; s=arc-20160816; b=pIpwyCJB+eiNGPYyrzZqe/8EuSDLOamfn1mp73w3O1wwWf7Qq54lb953bgPtdzatVD tC6pq2VaI6vEkWn2L32gqo8D8D9ScyWWQrJHM770YF6olwo9BJridDaCv3uHljliqd1z CnBJes/a0Yy+amHTbJD9LALXyDQ4MHG3Qu1rEqahX1AxwGPfSQTUlBuKdYNgCxzXVVOv pIqXe2sreLfkh12Sx25+0MDZ2XkTHvVSYKzajxk5BgdLElZq/kiK6x1nC6r56/2u4MYk 4W5OnQFYc68ooCFJpB45NVgpEm7bYfhICEr4dtHvN7PqH6m+ontaBGI1Omw3u/hi4ix3 ZMmg== 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=2sXYhJoMzlxiwjXEZUM0Ha5ReBVwS6vY1uXLUoOzHOc=; b=RdG0kKhG4yPi5q3QA775I6v9PJ9TeVmK2zVQCUqflGz+mqTITUUvo/YFS7fPK2qyZ/ RwTly/YXwnGdNydJEwGCzhdWntXyantvYEWjGcyYQKEic5chqP/B/ZROl4bEyjn8gCXm GlUIPIQyfbbYE+MLzxYvz17X5XHtSHJYn/oA1wWDZDQQb+47yKXE9NOtG3Dpm6LoBUby UMHV0QBnAf09oGtyRoxy74JC5iNKxpUQFVIiS0Fo8m0vMJyyigELsVuFAZR4bJVazXUH n/7YM7t0PFO2RDXuBTVJt8HUp1ZrwUTLRioMu1+wQmVpOBI2Z5bsX32fpZXackUz043N OgMg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="S/OM8wgc"; 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 u14-20020a170903124e00b001836e510540si13058367plh.114.2022.12.13.01.03.26; Tue, 13 Dec 2022 01:03:39 -0800 (PST) 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="S/OM8wgc"; 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 S234909AbiLMJC3 (ORCPT + 99 others); Tue, 13 Dec 2022 04:02:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36130 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234916AbiLMJBw (ORCPT ); Tue, 13 Dec 2022 04:01:52 -0500 Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CEE59186EE; Tue, 13 Dec 2022 01:01:32 -0800 (PST) Received: by mail-pj1-x102e.google.com with SMTP id w4-20020a17090ac98400b002186f5d7a4cso2903998pjt.0; Tue, 13 Dec 2022 01:01:32 -0800 (PST) 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=2sXYhJoMzlxiwjXEZUM0Ha5ReBVwS6vY1uXLUoOzHOc=; b=S/OM8wgcUV6b12rVdm+rLyNcWnPdg461uEV9DLlcAK2tAT2OylxVZKWYow7/A8iS/t IsxnaY84X+0MF6ZmEVaczan3YLH0IiVeN+ceuafYrpBySNtsHUXFhTfOBXM+e+ChBvsz TB1JvN6ZQ7w++VuOIC7uXt0m0c3J1+BOXPCzexKt0jfdfs8sc/2YFsOX3YtiWX899lkb uH16WPVSun34z1GOB5GLOP25nvJzArenMlpEeJKbZSZkSI78/1ATf62Qv/NTEZFOIIal t3H705Tdwz+8VGr3s/pxOkLEGyCGHLXCIuCWH/W9tT224MVKvDgeYOiwSFf72HxWMSsf us0A== 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=2sXYhJoMzlxiwjXEZUM0Ha5ReBVwS6vY1uXLUoOzHOc=; b=B0mhJ2qNTL4dLJjgLG5Qxe85B36/DgOAbPXYyYIAtQfDLs6iZieUJYIFqYRqi9OVqB hI9XiHYK/ByMSl/nWtj5leHRkZ+8u/Y7pjfF/o1344HSE48/a8FRGyHhAzqb2W1et6sL QE+l8qTmB/7D4x7Gv6GvnSEQ+7nLMI5+sdd2NQccF+5OKQ9rmEdtniC1UHobh04yJERz v5jieCYz4WOxYva0KYd7TXX7s7Rj4RK0hFa0esM+Wkayp9jURr1VSRa9F/qD/I/MJcO3 HWsoPI5hDkOuhYi0rXgvoCnRz5KX08qKqPieCpNO7CkeJP8OmSS0lulUTS9c42cWPKiS 697g== X-Gm-Message-State: ANoB5pkvw6WsIwer1fzekbTbK+ypERyQU6JJOPr7EU4lGRdntnvlxlcC Mww4OfTrnYeagpTkfSrPzPU= X-Received: by 2002:a05:6a20:4e1c:b0:ac:82ff:9f88 with SMTP id gk28-20020a056a204e1c00b000ac82ff9f88mr23736903pzb.12.1670922092177; Tue, 13 Dec 2022 01:01:32 -0800 (PST) Received: from localhost.localdomain (2001-b400-e2dc-5c03-264b-f684-a8c9-21ae.emome-ip6.hinet.net. [2001:b400:e2dc:5c03:264b:f684:a8c9:21ae]) by smtp.gmail.com with ESMTPSA id 81-20020a621954000000b0056b9ec7e2desm7141682pfz.125.2022.12.13.01.01.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Dec 2022 01:01:31 -0800 (PST) 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 V6 08/24] mmc: sdhci: add UHS-II module and add a kernel configuration Date: Tue, 13 Dec 2022 17:00:31 +0800 Message-Id: <20221213090047.3805-9-victor.shih@genesyslogic.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221213090047.3805-1-victor.shih@genesyslogic.com.tw> References: <20221213090047.3805-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?1752088937699806814?= X-GMAIL-MSGID: =?utf-8?q?1752088937699806814?= This patch adds sdhci-uhs2.c as a module for UHS-II support. This is a skelton 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 --- 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 5e19a961c34d..9c22370fb778 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 ba0c6d0cd85d..ac1dd27fca3a 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..8e15bd0dadee --- /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 v2");