Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp14077996ybl; Mon, 30 Dec 2019 03:41:52 -0800 (PST) X-Google-Smtp-Source: APXvYqzNm4AcUn+XDp2UKvQB8lL16D4fkZt7CsUeB1clrxOFkRDw1+hXgnVVGrzl5d9FUm1gD6kZ X-Received: by 2002:a05:6830:1d91:: with SMTP id y17mr70046355oti.276.1577706112524; Mon, 30 Dec 2019 03:41:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577706112; cv=none; d=google.com; s=arc-20160816; b=ImAnSgrI4dEh86cf1SHYpk3shm+8pN8wZrR55mOOs389L/r3Kzqqke/NOaStyQ4Z+9 B7ZfKt0X1Ylwvf9YSOaEHfmmwPhnhqR5hOARb9ZVuyl6Oby7TSaA4IJ08QkHEqy/KshJ n3lWvLCD+IPcXB0mbT7zx0KGFPjFF0mt3NrgTDVptrzvYhpMcUirNP2u71lWc4E8jgNj 4qkRbqUQTbTVZjhfmRA7dSifj96dmOqlyj0DVcxfKnTg5B06KjiRPiHh4uKwBUJLjaxv MiMzBNb43mtKiBHx2ZTHNPONwz5TjGCUVYFJJrInYhIC6oKNKId99JL2ze7t8e/Nme4M dnVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=5Tf8YHcGOJoCskDvrArX1HeDQELyzh/fIJsLpatwNjo=; b=YkgHHPuS9R9iPHarz3EZAS/lBYahgf+1wf0Aa+asxOL3yjaKpN1LJJCSeWCwLEqYWW 0ABUk4p8YvbnYhMQmaLc3TXuM8gPx3E/3Vm1JqmqtasyiIXI0eclAaVFF3NPuOlEj0ar GyZCeLnse+o6xfF/lrN+k9I0958qdrH6k76VRqIETZDK14DActyPGzFCQUE1AY39eEic h2LrdjL6jppi+9Db/RQzbRXR/CKrSv2BgUAaHFtzFUjGi/qCSdxErWWJmR24xgnB6Sdw qkr/aa3nbGTCq0WcmH67GNur0eNYXwr/HbjKHXr9edNfDNmHlrb08ygcDioDAGIN4nBU 98aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zyj1sSag; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si12054254oth.246.2019.12.30.03.41.41; Mon, 30 Dec 2019 03:41:52 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Zyj1sSag; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727497AbfL3Ljt (ORCPT + 99 others); Mon, 30 Dec 2019 06:39:49 -0500 Received: from mail-pg1-f196.google.com ([209.85.215.196]:40501 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727360AbfL3Ljt (ORCPT ); Mon, 30 Dec 2019 06:39:49 -0500 Received: by mail-pg1-f196.google.com with SMTP id k25so17856902pgt.7; Mon, 30 Dec 2019 03:39:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5Tf8YHcGOJoCskDvrArX1HeDQELyzh/fIJsLpatwNjo=; b=Zyj1sSagjq9IPjQsK4++LDAfXeH/3fdIzayTxQArXRhMuIeFdIzVf4h9YqYmru/wK6 a1pjT1+zBsCbailwJrzd4HdaV+ZjwsW6tSrbPm5PbvfgQkPdBXQX379Ti5AgMlMRBNec uz4XX95aAMgndfklZtaSHHBn8DKvVZyJ8Js752b+hecaP1Smk/t4Hj8dLBIzm+lBhMYo 33lDBiKx1j0SofS31ZqhrfhJctgWYX21t+TbtXftOqizpRqpNOK40xIet8tx2C82txf2 P21CvBjIg/YZIN/GbE/k0v1U9WuNVVRtBEywFyPnHuemVVtU/39cYyphvhBfbJ98Ts9N M6uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5Tf8YHcGOJoCskDvrArX1HeDQELyzh/fIJsLpatwNjo=; b=W2ThiqreHaEk1OHmZq38d0VGNNxyJ40cFLTHviQVSFpyQaX7CAX8eJwMvMz42i1LVG WiQbXjulI03I/IcebBPM/W5McocO2kzcI1c4lOuETpSTMC/J2h93f8gP4lWaMY6f1Ptk kIhxoSDADO9Vdt+bKBLugyPyd4hlXodBGuP3ipvSMnkutsLFQ6x8JM/T7RVYxZMcUA11 Z9Q2/5lhu1OWYwHUrVkSJgdBXdy4e2bRJ5T97rgfu2L8uuehYoBSG9iQcPQLWI/NQrQ1 HZToEXd7sSwQTGvs0FW0zt1UXAQBxaDhooZsBoygytFFw5eNAzpqRJXhR+hWp7OsfW8d dW9w== X-Gm-Message-State: APjAAAV2KC9UOlqPTanz5MR1M3eww+nc4Gvz8othw4h+laPrSfHBs4uN JOsITEICjNB29uIONL7T1oE= X-Received: by 2002:a63:a4b:: with SMTP id z11mr68298958pgk.97.1577705988645; Mon, 30 Dec 2019 03:39:48 -0800 (PST) Received: from gli-arch.genesyslogic.com.tw (60-251-58-169.HINET-IP.hinet.net. [60.251.58.169]) by smtp.gmail.com with ESMTPSA id a10sm48329528pgm.81.2019.12.30.03.39.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Dec 2019 03:39:48 -0800 (PST) From: Ben Chuang To: adrian.hunter@intel.com, ulf.hansson@linaro.org Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, ben.chuang@genesyslogic.com.tw, greg.tu@genesyslogic.com.tw, Ben Chuang Subject: [RFC,PATCH 5/6] mmc: sdhci-uhs2: Introduce a uhs2_pre_detec_init function Date: Mon, 30 Dec 2019 19:39:59 +0800 Message-Id: <20191230113959.38150-1-benchuanggli@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Ben Chuang Introduce a uhs2_pre_detect_init function before detect uhs2 interface. Signed-off-by: Ben Chuang --- 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 49bda02dd305..d0cccc358cf2 100644 --- a/drivers/mmc/host/sdhci-uhs2.c +++ b/drivers/mmc/host/sdhci-uhs2.c @@ -506,6 +506,9 @@ int sdhci_uhs2_do_detect_init(struct sdhci_host *host) DBG("%s: begin UHS2 init.\n", __func__); spin_lock_irqsave(&host->lock, flags); + 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)); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index ea5e2119e1c9..3b5b9c8e6663 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -904,6 +904,7 @@ struct sdhci_ops { void (*voltage_switch)(struct sdhci_host *host); void (*adma_write_desc)(struct sdhci_host *host, void **desc, dma_addr_t addr, int len, unsigned int cmd); + void (*uhs2_pre_detect_init)(struct sdhci_host *host); void (*uhs2_post_attach_sd)(struct sdhci_host *host); }; -- 2.24.1