Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp4487567rdb; Fri, 15 Sep 2023 04:01:21 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFruBbyHU2E3xJZAk+ODc0efpMvfCFNO9z2yGNOMiDz2x7GSsu/v+5ti1AD+U5t2OtygECv X-Received: by 2002:a17:90a:528c:b0:268:352c:9d13 with SMTP id w12-20020a17090a528c00b00268352c9d13mr1125037pjh.0.1694775680590; Fri, 15 Sep 2023 04:01:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694775680; cv=none; d=google.com; s=arc-20160816; b=i6faKEkeAtkxpW19hEPWzL0e9a05cbDhdFOJHGiFvNCWx++KqNSRyTxb9Iw/xq6hSR 0NTu2D2nhTZ60Cl4yilzhnSI5E2A8J8WZA9VlhxAGtXe35pKni6wVlWxRwIPf9sou4kf G2xmwhcIbZ3SdOZRwJKKSnaa2GCFd2zOiXfxeHMug8te80rIoSVsk62wqtbncbYo0mvT +n5/Hzkr66jMAU+dELj0vJBbVb+XRy2EtcfJnADXb+1GqdM7oTXNZvfMz4l+1jVrHVFi NxdiSnEPnCCjTcvHj9BERGUjvnauUHMmq/gBky9/qrqJiKDOOBbGBtqGR3a3sXwrnWcT +g9Q== 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=I8s+ls8Yw6NMJtaPKq6UHyd+YkBQYdgGHT2EXOl3gig=; fh=BYTnePkxB2rt5d4Qz2+JKkABGjvViCq4AUS9O+RAbtQ=; b=F5KmfJVFwNoHXJPdJYFSVX1fW3P9pAvnBN5LVB3c33rbEqOm+0EprYDi+ECgXLyWyD rMbDCfFoN+UdeyvDgbab//sCMcZJuuklLh3CmdTJd1YMWQbG9/ln9O5/42raaFLC4SRU 5H1GfFv1aNdwitTJNvT5dwcM21BR/zntJuNclsz0X8HJkyWmyEf/pfmcwIOLJPgj1Dg6 7McYBpeJwHLEww+RBJYLdPmv2Mt7QMu49eiFGuRo+FGcxLMq66YAZloX/+Q7J99DXsiR dhPush9LR65no8zHRj+WKmbXqnAd5QQQ9hL+C8eVchmluspSQ4oI54iLFo/7ucz3rDj2 Cplw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FOKspa50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id z9-20020a1709028f8900b001bba894ac4asi3125412plo.274.2023.09.15.04.01.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 04:01:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FOKspa50; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id 3C5538410276; Fri, 15 Sep 2023 02:48:07 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233771AbjIOJri (ORCPT + 99 others); Fri, 15 Sep 2023 05:47:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233866AbjIOJrh (ORCPT ); Fri, 15 Sep 2023 05:47:37 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6B1923AA7; Fri, 15 Sep 2023 02:44:57 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1c0db66af1bso15040415ad.2; Fri, 15 Sep 2023 02:44:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1694771097; x=1695375897; 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=I8s+ls8Yw6NMJtaPKq6UHyd+YkBQYdgGHT2EXOl3gig=; b=FOKspa50HhSoe2yrFF0QK5naXLp/k6uGrVR89+mc1ShxWvvjYFcCgU7oYvFTPmCGM7 /x+5LjlWBvpgKN8Ey2CWeWHtHj7RnOKt0sC6coQvpu9z2lljIGIb/Wz6IeXTjovIWKNI 3rT6Li6IhRNYbw0mAojWk6dGnXFHW481fnnJNvQIXC783guMK7sTg4u1XTdfY6J0n2zb LcOf/FPyJ3zof28cVXMeEXq/9s/goDNFewmmhIsShutHdQ/AFChDRcRPmazgYkFK830p zcy9KNbRwoZ4X7AzW817yPHVJGS7MVPMmrlpQnbU/WJAlxAEOMJPAHtoRtV8KCdUjV7l ljvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694771097; x=1695375897; 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=I8s+ls8Yw6NMJtaPKq6UHyd+YkBQYdgGHT2EXOl3gig=; b=hcLpsrPm+WNM76D2ZAwsgZzItIU8CoxzSaVoHGpSAldMcrfg/M7RGBPW1PpYahaoBZ F+ZQ3Rui+zkK9il9xcUhLzJV2KCMzfiYOjDwqQzuYLHw2RQfQUl8dFYZhyJTdbFl1ckF 1p0U74Qc3Sax/CIjz9HgUKsI54x8hfVqIb+lbx9jqu2TRqBB0FdOsKep6j7IGFktjNV9 RLR5UYUCM3TbWsY9MUBsWtw1y9MQPSk47bt2N5xlqj+bEeNg0EcQ5187449V4jUEEsUx 7TL3a+MYK+GmrDk0SaaN/1T7bZh8fIqpL7AcRQckxivPW6lGWFDE+kpjx+b8q7uMRI8W 7H3g== X-Gm-Message-State: AOJu0YyegsXLvJI+XwNbFKNIeM41Vgz89S2JcuKa4OFxtZ+bhMcpYR8d SyVP9+I5W5DszafgfuLq5xc= X-Received: by 2002:a17:90b:1e10:b0:268:4314:2dc6 with SMTP id pg16-20020a17090b1e1000b0026843142dc6mr932807pjb.37.1694771096797; Fri, 15 Sep 2023 02:44:56 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Sep 2023 02:44:56 -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 Subject: [PATCH V12 21/23] mmc: sdhci-uhs2: add pre-detect_init hook Date: Fri, 15 Sep 2023 17:43:49 +0800 Message-Id: <20230915094351.11120-22-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=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,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 pete.vger.email 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 (pete.vger.email [0.0.0.0]); Fri, 15 Sep 2023 02:48:07 -0700 (PDT) From: Ben Chuang This "pre" hook for detect_init(), uhs2_pre_detect_init, will be required to enable UHS-II support, at least, on GL9755. Signed-off-by: Ben Chuang Signed-off-by: AKASHI Takahiro Acked-by: Adrian Hunter --- drivers/mmc/host/sdhci-uhs2.c | 3 +++ drivers/mmc/host/sdhci.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/mmc/host/sdhci-uhs2.c b/drivers/mmc/host/sdhci-uhs2.c index add0eea55b24..517c497112f4 100644 --- a/drivers/mmc/host/sdhci-uhs2.c +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -1267,6 +1267,9 @@ static int sdhci_uhs2_do_detect_init(struct mmc_host *mmc) DBG("Begin do uhs2 detect init.\n"); + if (host->ops && host->ops->uhs2_pre_detect_init) + host->ops->uhs2_pre_detect_init(host); + if (sdhci_uhs2_interface_detect(host)) { pr_warn("%s: cannot detect UHS2 interface.\n", mmc_hostname(host->mmc)); return -EIO; diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 5235f2da6568..300108cc255d 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -724,6 +724,7 @@ struct sdhci_ops { struct mmc_request *mrq); void (*dump_vendor_regs)(struct sdhci_host *host); void (*dump_uhs2_regs)(struct sdhci_host *host); + void (*uhs2_pre_detect_init)(struct sdhci_host *host); }; #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS -- 2.25.1