Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4730008rdb; Fri, 15 Sep 2023 10:26:37 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEYSWr1sML3/xogZpf090TWIQiRJzvfFxFznJn6kJyEyRlzUFtLSPColBPmnexyMxkAcxY4 X-Received: by 2002:a92:d38b:0:b0:34f:7ba2:50e8 with SMTP id o11-20020a92d38b000000b0034f7ba250e8mr2686211ilo.2.1694798797586; Fri, 15 Sep 2023 10:26:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694798797; cv=none; d=google.com; s=arc-20160816; b=fncjpLCaZ3pgA7uo1XrROj7+erOqBQ0JV0cmrtBlAkz+d9qQmOINaeCuakTwmzHNYR dPqB6jttrwD9uvK+/5FNSK7SM5UgvPUhTjFQAVUBOv0H8VQGv7nsUXyqpPGXYwdubHCX fnRR4MG8ABtjOjd6AmkYBXnoNisTvjoxNuYmkSI6PlHY3rIimoAwzwi0oHXPVuiPKDod 5AVUo48EASZnd23zfQpHM3cAv0ZpcKyyh1hIrY6B44Xw8bZytEYGbzz/zv4eWh3x/f4k tGTeI6LgFQ61GTNW5ufNxMki+je0fbJ3agQlveMonL4fIyBr6GYv7tEB5MBTURkVuLHV UtUA== 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=8GUpZlucStL9KR+7oGIKOo+if7aiaSmdUfuwVMlcn28=; fh=y5fk6vguAkbcel7KoRWpitGO8B8BpGYTQpzSdaI/dY4=; b=IAObTuwzbpsaDxDPoa/MPI5lH6fpMcqMZLri5SCxXcZaT1lmD1WOYq2ydNSyFr6VJn P575Q5N271XMerjNB0HeOhD+AhJWr6NcCOc0u6/WRKV3VyptKbGBvwrNrrbutluh/xgj 1TgGSXkcLuU2HL5iVUn0i7J8nUqXluECg2nXqcDCPXw4uG16a7zMDxTeOBw5/9ZWk54E V7yGEvLTZdOgd3fG1QSpn2K/xVD7fAVlqnVb0pLvAwwwoiwgtTY6ZkDLqB0P229HagRR /w/j6xd4Ex4LjMRZPmHFBgfqhUUtBca/R2G1PkZ8M/uuNswRNb0fJ68HchdEr/MBysVd WQWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KiRNZ4GI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id b20-20020a6567d4000000b00573fcfd4a19si3551852pgs.878.2023.09.15.10.26.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 10:26:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=KiRNZ4GI; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 819B38364D4D; Fri, 15 Sep 2023 02:45:08 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233930AbjIOJpA (ORCPT + 99 others); Fri, 15 Sep 2023 05:45:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233841AbjIOJom (ORCPT ); Fri, 15 Sep 2023 05:44:42 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BCA1B268A; Fri, 15 Sep 2023 02:44:20 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id 98e67ed59e1d1-2746af1b835so1324104a91.2; Fri, 15 Sep 2023 02:44:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694771060; x=1695375860; darn=vger.kernel.org; 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=8GUpZlucStL9KR+7oGIKOo+if7aiaSmdUfuwVMlcn28=; b=KiRNZ4GIwlecYCFEJkdFg8JPjS6Fjyrbzp9MLliHT5NyquJVAoyN/Kuv47kBukZ9v1 8HfvLIDE4cdvbsm9xXO9D1polKab9X+3DGa7aghry7AFlFQC08Muk8P+IKyZ7OHCfrmO 4RUSHuJOp++SF1Vyh7KA8on/1qGpDY9lxR6HFuYvwegkJ/DA0O3oHbXLgraiOpGvJhyW cdpb+4TSazGhdj7my2+Miarbmey5X3dgeTpR3VTlWNdJgCvBYqeLxLhX7R3dXl8Uv4Pl 9v+HHjZVXlW0TWi8ggKFi9RbvqjPKrNei9kbOcMmzQImpNtQ09Wt8gLRXtlXMUdw8CDH iQzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694771060; x=1695375860; 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=8GUpZlucStL9KR+7oGIKOo+if7aiaSmdUfuwVMlcn28=; b=HB39Utg7Wpw3PstaprWvUQd8c9yBEpoTny5RKBUTwLg7tA10R1tcZU2P8ksYaLbaEe /qEiH8ox/mU9OYphuAKLgkcQGKDohSi4cJ9vWHWgM+UoVByes9qll/3MVF6tEtlm7yFK +sVP4icfyw5YoMjXGbjf7kZ/QvTFopq0f/HdJAXTRzVD2txu2vjCC8yzzkUhKd0WPewV 1tMdx5Sm0LMt67Q83aZCv2mtZ84k9GPz+gRtz76hbtFd4FMvu3MmDmLXlQCKnOoHbKTa ioKyh+UjMZ8cZEEXFtYySNgAI74Ck51lB2LODid9GdL2pAKXb8rte20AMFa0z6E29CwN iuGw== X-Gm-Message-State: AOJu0YyhESNJtTNHUKbLwBIwHzA+NhunjUeOJa9JE9s2dJ0Weu0x4CKx yvPEZXAFG6u29Hv+oGVHBv4= X-Received: by 2002:a17:90a:fc8a:b0:268:ac3:b1f6 with SMTP id ci10-20020a17090afc8a00b002680ac3b1f6mr902126pjb.24.1694771060147; Fri, 15 Sep 2023 02:44:20 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e2a6-6d77-d32f-f490-6688-3d32.emome-ip6.hinet.net. [2001:b400:e2a6:6d77:d32f:f490:6688:3d32]) by smtp.gmail.com with ESMTPSA id x4-20020a17090a530400b0025023726fc4sm4432794pjh.26.2023.09.15.02.44.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 02:44:19 -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 V12 08/23] mmc: sdhci: add UHS-II module and add a kernel configuration Date: Fri, 15 Sep 2023 17:43:36 +0800 Message-Id: <20230915094351.11120-9-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230915094351.11120-1-victorshihgli@gmail.com> References: <20230915094351.11120-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 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 15 Sep 2023 02:45:08 -0700 (PDT) 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 Acked-by: Adrian Hunter --- 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 2e8476db2381..1aeded48ec99 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