Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp266383lqp; Wed, 22 May 2024 04:11:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWtynLN3O49tvQCbuF9vEk9v3H+mTyBOOo4XxaSDIlVq8CJu7frngrDh/TJoee6dlOIgppNRbQElnWyHSrEEuwM78jYSKTmyM9lx5cM4w== X-Google-Smtp-Source: AGHT+IFDOe6zdmukFX0DbdD+Rem3ILb56GEW2NHg/d0V7n3VpTWPEYXDDx84l+0PRndfaQxJp/Zl X-Received: by 2002:a05:6a20:3247:b0:1af:e3f1:9af7 with SMTP id adf61e73a8af0-1b1f88200b0mr1446737637.36.1716376317381; Wed, 22 May 2024 04:11:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716376317; cv=pass; d=google.com; s=arc-20160816; b=Wh3LJyjt5YVpcKWDoC7njdagJTg9zcFyBTMZ4879QI9yofdJeVSLOtp0OkitWZOfDR ax0jfcWDSCKWDoaTOzt495d7GJI8rgWT2MU8sujck35qzDcMu1KlC9DJB0g00GJgnU6Z aiS39hvHDljK1wHcCtUUs+NXahRM2QwbZmnOeRLdIx+I1rnd/x6rMgo7yPJtNw8JZ1yi 240I8SQkM2NL3VjJiUKs9y/SEljF5cn8ho75nvhK2uqQ8L2LVMX0bbx/7Qu/qYxUc337 GJTMIAudM/uYePPWCAbi3vvS/Pj0A89BosMnT6fiGpQ3ZQK4N5a2clN2+22g23iyZd7B Yj8Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=u4ulBUi6egoC57FE+2wADM8HkpJFXf6Ty5HbDsYr4Os=; fh=w38FUgnn2E8xVJXH4Ht6/kql6SI4PCHTLCuTiTqBztM=; b=IiYduor0xsTGwpkt5LxYI55y1RLDrMNYq9q9rhGz4c5uGnSCsMWZW/YbgLfbS5PSMa X4l3MVNxQxYSl16mxvOmwzyM/DEaJUmZNpzBEz77xSRvRSaagSStNZvbJdK8ifWXutxq +YjqK0LxbR2EQJ6LiEgmZFYczsAOmywfnKX+gndFskcFtU2iAAmoqw9nnbdvJNO5hg/s 4gsdY0TVpBgzMh1hKNUGnzdwJ4M5BJvfRKOrvpW+lVHHN7IuhjfO9QFTvh3zWK7Cr5XY gIvmMQ4fj5mJ2BKXb66MObRtoqqV70P5DsePoMsabswhI6Stv78KmelU9zijVOihu0Tb wM8g==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J54+6YIy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-186105-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id 41be03b00d2f7-65acf13ee46si30073a12.390.2024.05.22.04.11.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 04:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186105-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=J54+6YIy; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-186105-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186105-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 5F3BD283B6E for ; Wed, 22 May 2024 11:11:30 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00F3684D37; Wed, 22 May 2024 11:09:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="J54+6YIy" Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9012C84D0A; Wed, 22 May 2024 11:09:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.166.170 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716376197; cv=none; b=cOdSfWm0x8eBF6Nl+j7VWZmpYIVOhIgutYdqJ0WeSER4wfFR9bSqUUFYOgyLZdCCI72mg4w0eBmDJmTpca0cZJjwE4O4Lx0oleClzxpYDASn+/oXRfm0x46qU/+LkUPyuL2RtK1aXa13DOLxb2N86vZJTL29QlvrWiz8nopgQIs= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716376197; c=relaxed/simple; bh=vENF9HCmcpJXEqgwxvddYUAdwYA+NrUfNCsZT+T4wFw=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=JBEEdEehRZR8NUke1HKLTuR6Ee4LEF2zUQjWeIqaZ251ELPu+GR2rkUJYZV2SdhhPO/aTbBJSX6aJ4qqivJJULXj94UP7ziKr8CaEyKzXJqB54/LPR1cwJ1eKfp9domYH33GWa0O0kte6zUB/2Pk57Y8HiCyJ+XBl51nxWxzpAU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=J54+6YIy; arc=none smtp.client-ip=209.85.166.170 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-il1-f170.google.com with SMTP id e9e14a558f8ab-36cc8dbe09aso22872205ab.2; Wed, 22 May 2024 04:09:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1716376195; x=1716980995; 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=u4ulBUi6egoC57FE+2wADM8HkpJFXf6Ty5HbDsYr4Os=; b=J54+6YIyIvVh3eBlf9vgh66dINCHMM8pppcP8sE8YIcagTBV0feVj7Z58Aareq110b rk0uWddQncIOF8uew/eCNamGWfwbO8qAB10tT1DwKga8YqYqSlkZTa63fUJ/bAV16xdp 2+vUWsewKIUZ6ddQdWQlUwjQ/4wag4Wuj8hpNJ0dB8NWQcTRdzin3WZ9mMJYmeMInBll 0NeOa5wGckfnLIzpFIQ2mbh2RrbPMLehvHa414GRIV88ju+0O5d0xTVDzqxpU0LAoCc1 vvGjv5BpfJumZUihcXgP7CHlNVmbeBMInUF/wMNNLOW+j/7rFX5R9Ig2qgRaViGsJ7Cm NG8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716376195; x=1716980995; 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=u4ulBUi6egoC57FE+2wADM8HkpJFXf6Ty5HbDsYr4Os=; b=FqC/oDXSV95cFWBLkocxE3r1xNyMChtji8b/UG9d6D25xm3Q+TkzvcuzHdsq1pY7fW 3dtV9JSOUFsLlC4XKlpd4UMYW6bxGaaiDBI3HbVO6ojsDjPstnzM/5wZwhB/BQ0vmGnw JjlnpLuE8yww+Qk1m1gcyI5XYVVrljQAKnSEIg1VnIHei/K/PWXMb7avgRWrj79lQuFn EJF4aV1vT3HkXBcNzSoteL4oAC2razQNDibqyy4rEoT6mSxhrYDZmRm2jl5bY26Cd4Io AV47V0jt9dSyiSKZN+9rcL2bV7CXPRJ5SSwoAJ3WSmdmLez33eE9rSJXRSApnhMCooqK TSjQ== X-Forwarded-Encrypted: i=1; AJvYcCXc42K0CaIJ+U95bytwuY1+qdkhr7xGbPjSlxLKuoh4iPgd08CeTlzT8S2ca3C9D+Rf4ESdNCxIGwDKnKNv8bB+EKu5/Usl+EvGEiBz X-Gm-Message-State: AOJu0YxJkXnwvcQNGGsO1AWqyaLUOTjdbHIz+viDKeKZnW0juo7qFFSw L6NIHK8jT3nKHUCdfyV24XFQjJyZ91Z8hrZ0XJRB/hu50HlS4XC3 X-Received: by 2002:a05:6e02:20eb:b0:36b:46b:1338 with SMTP id e9e14a558f8ab-371f9dda871mr19732825ab.9.1716376194794; Wed, 22 May 2024 04:09:54 -0700 (PDT) Received: from localhost.localdomain (2001-b400-e283-0474-753d-295c-237e-167b.emome-ip6.hinet.net. [2001:b400:e283:474:753d:295c:237e:167b]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f4d2af2a98sm22223760b3a.169.2024.05.22.04.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 04:09:54 -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 V16 10/23] mmc: sdhci: add UHS-II module and add a kernel configuration Date: Wed, 22 May 2024 19:08:56 +0800 Message-Id: <20240522110909.10060-11-victorshihgli@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240522110909.10060-1-victorshihgli@gmail.com> References: <20240522110909.10060-1-victorshihgli@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 bb0d4fb0892a..342bbc3ef577 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 f53f86d200ac..fc064a3030ca 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