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: 634088 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 36EF5C4332F for ; Tue, 13 Dec 2022 09:02:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234828AbiLMJCS (ORCPT ); Tue, 13 Dec 2022 04:02:18 -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-Google-Smtp-Source: AA0mqf5/TPOIWUvfoxFakeiSuHHzDBzjhxyNm5rEgQdeND6yhAtqIMXsvtawMc63WlKnmLbWFBLlIg== 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 Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org 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");