From patchwork Fri Mar 31 10:55:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Victor Shih X-Patchwork-Id: 77735 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp478880vqo; Fri, 31 Mar 2023 04:09:20 -0700 (PDT) X-Google-Smtp-Source: AKy350aMKsYEwtd6gl58F18nFSYCMv7M/1NNy49/k1GIJzcz9aMO7bqQMANemCbCE+UPCWD3FNAE X-Received: by 2002:a17:903:244f:b0:19f:3b86:4710 with SMTP id l15-20020a170903244f00b0019f3b864710mr33589880pls.49.1680260960407; Fri, 31 Mar 2023 04:09:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680260960; cv=none; d=google.com; s=arc-20160816; b=FcQS85kRqsJiIUw2IcJXdw340Y8g3unArtawUbGqb94AB8C1h+m7NREDeKhri6+Zwv c4O3MlCnAX3opDBwPP8a7l4gb8k3Dd1DMDgI1lBTxArh8XKr8/hTjAH6DRefkVz46FwT RmDh6+UgnvtnfhefooQwCl4kkBBrGBSwEF/9B3d5NKaXSo/WbeXmRG+gZKBn0/PaZCIj st6Gfv3z+CDonDdAaNNqUsfSfTprwKe6EOFh4L0ZMUx8O0eTj9J6oBeMaLeBCn4cvYSj c9EcEdF84V5NugFDptflUiC9ixDY8FIHrXNb4kqwJiWqEI7fcqirumxRmOg2gsqeWBqL sXpw== 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=T8o3QnZZe0BwtsQOwaSyBuN6haWTDyey9fLQnDZwlMg=; b=Xs9UOvl7K5BVrFAL4DYLItIw2bwpWRSduWfZGC6SIAracHNLZOSt5Qdhg17kJ9Be2N r2J2mIOKTdvvQtbRy364G6lye5TL0aiHWXZfq7W4Yfjk8JKIA7OM8r2zA7XRH3wdB6de 73WzMzLr1oMG/rkXUaosXZT7INp0d/nU0h96ZSZEQpMXu2w56XUiY4mwYwL5jmP9BjoE 40Erqy7BVb/VU13xHhnbeXUf5JFDKkAsXOXlQ7nlY6s7L94BIrV7jq3m73mpElbzQrlw FXuskohol3CeF10HxukJnuhZFrAw0ymIlynYqWslH1yZacIVZEBmO6s6/RFxVqOgQogV 86pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b="M/QFjr7Z"; 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 u6-20020a170902e5c600b001a23cfb3517si1904621plf.359.2023.03.31.04.09.07; Fri, 31 Mar 2023 04:09:20 -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="M/QFjr7Z"; 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 S231904AbjCaK5d (ORCPT + 99 others); Fri, 31 Mar 2023 06:57:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231538AbjCaK4r (ORCPT ); Fri, 31 Mar 2023 06:56:47 -0400 Received: from mail-pj1-x102a.google.com (mail-pj1-x102a.google.com [IPv6:2607:f8b0:4864:20::102a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 149A31EA1F; Fri, 31 Mar 2023 03:56:27 -0700 (PDT) Received: by mail-pj1-x102a.google.com with SMTP id mp3-20020a17090b190300b0023fcc8ce113so24960547pjb.4; Fri, 31 Mar 2023 03:56:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1680260187; 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=T8o3QnZZe0BwtsQOwaSyBuN6haWTDyey9fLQnDZwlMg=; b=M/QFjr7Zm2tc+5MCHdgnzK5JGqwd+tL4k1dOieeOdUeDAw9Da+YbFkP6xtUJ0eyhMe FHfyoj0bFkZaSeAUSaaeep2nFFSmW6ys5sIAZeZDI5G9U7LUpLSD2wxK0eJgcdyaWIoT q2eETYoIu6ZQhi8R9lV5Y3KQuXTLRhf9JAMkX9obYEone01CPe7AQGstvUJLnHgk0/YN 551OJouEdv2pIcoK/pmVDah8CKP7x6xconRwHC8O0uWbMKpDJetaSABGqOIHrjnKAjZH wNI7IUgNip/JhciohKf1X2Hu0oWBNG/3iHTGMzA/B5fKHmtDsUet9EHpalDGGpAZASVR n/mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680260187; 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=T8o3QnZZe0BwtsQOwaSyBuN6haWTDyey9fLQnDZwlMg=; b=daEHuwm22moxUDYVbcOPEi0whHowm9bsi13DoGaBB//4D3tM29vrSQQu4XbxuiE53l NSAD8oenrKSNYtgpI0OgBGNGfAISva5IG2Ipjb7fKvGvy/ANyC8y/FUmaEYpylFZvUOY lD4aT1FLwhgySHSvkxaD36viv4Aa/+TVgzbQWte3MOkVKUhGNx01wpDWsp/WaZwJz5RZ 8cQg8sfU9cJjFEd+uJSmRPUPxHlWbJkAi6IJIXxT+AI7S4R4lBmlMlgQLJxtWhCbzTod 3xsJwYAzJBIrQbVDJvFOleflU2TvPDnyFaELTwOW9SJvHIVILkVxKqvR+kVkK8CaxUUQ ZuRg== X-Gm-Message-State: AAQBX9fUYsX3ZNr6yAvYUyrVEbqySuhgZmaezKa6k9ueRz1hR3X7IID4 qlamwXkT9jEo/irnZn+Uoyw= X-Received: by 2002:a17:903:787:b0:1a1:b5ce:5d03 with SMTP id kn7-20020a170903078700b001a1b5ce5d03mr20502102plb.10.1680260187419; Fri, 31 Mar 2023 03:56:27 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e25c-983f-c7ff-3efd-77d9-6c16.emome-ip6.hinet.net. [2001:b400:e25c:983f:c7ff:3efd:77d9:6c16]) by smtp.gmail.com with ESMTPSA id f19-20020a170902e99300b0019acd3151d0sm1287665plb.114.2023.03.31.03.56.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 Mar 2023 03:56:27 -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 V7 08/23] mmc: sdhci: add UHS-II module and add a kernel configuration Date: Fri, 31 Mar 2023 18:55:31 +0800 Message-Id: <20230331105546.13607-9-victor.shih@genesyslogic.com.tw> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230331105546.13607-1-victor.shih@genesyslogic.com.tw> References: <20230331105546.13607-1-victor.shih@genesyslogic.com.tw> MIME-Version: 1.0 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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?1761881316965144932?= X-GMAIL-MSGID: =?utf-8?q?1761881316965144932?= 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 4745fe217ade..06ab111eba3b 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..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");