From patchwork Tue Sep 1 19:32:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vaibhav Hiremath X-Patchwork-Id: 7106691 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D4B839F1CD for ; Tue, 1 Sep 2015 19:37:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E79EB205EE for ; Tue, 1 Sep 2015 19:37:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 19FD8205EC for ; Tue, 1 Sep 2015 19:37:41 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZWrLS-0000se-6J; Tue, 01 Sep 2015 19:35:50 +0000 Received: from mail-pa0-f53.google.com ([209.85.220.53]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZWrLN-0000lk-Cl for linux-arm-kernel@lists.infradead.org; Tue, 01 Sep 2015 19:35:45 +0000 Received: by pacfv12 with SMTP id fv12so5377346pac.2 for ; Tue, 01 Sep 2015 12:35:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Pv97ZIOwFKFhJ/t84QUTpcQ6OF7QdQYdiq/N1UIZMpk=; b=lZQWrB/nF75cK8tR249dvKFBnR3GPF4IW0VYX9S21dn3KeD7zM7MTFfCHDNZHDy5Ke ++lumGr6hgYmFvSV3BEwJGv5WxALEXbvS5eKSZt7Zw/rWPB/93dV0MQosFKb8L4a+D8O aJZKsYkwC4uIMFB+wL60czxeSFe2hMp5J2KW4IzC2cmUYnuplVsuL8fu4CaHuvlR9S62 PfOo9cW32YY4K/THB+nxDuHEawTdIgJix/S4UDJbuao8e6pLVAmHioBq/OzMaTPSVbPA ch6S29Bw8CC/7DrYgIPwIR7csMweoeqeFjVJryndpXlECYmEKvKSU7AKQm6i/7Vfp3CM xcqg== X-Gm-Message-State: ALoCoQlQPwRpF/zbPnHIWyvuyDoDJVTE/ig9sgjsdFHqdbfOgoiQeZnFvkF34dLPF5jI3NZ+QuXo X-Received: by 10.66.221.193 with SMTP id qg1mr50695987pac.103.1441136124294; Tue, 01 Sep 2015 12:35:24 -0700 (PDT) Received: from localhost.localdomain ([202.62.93.143]) by smtp.gmail.com with ESMTPSA id gw3sm19019035pbc.46.2015.09.01.12.35.20 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 Sep 2015 12:35:23 -0700 (PDT) From: Vaibhav Hiremath To: linux-mmc@vger.kernel.org Subject: [RFC 1/3] mmc: sdhci: pass signal_voltage as an argument to voltage_switch callback Date: Wed, 2 Sep 2015 01:02:16 +0530 Message-Id: <1441135938-8056-2-git-send-email-vaibhav.hiremath@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1441135938-8056-1-git-send-email-vaibhav.hiremath@linaro.org> References: <1441135938-8056-1-git-send-email-vaibhav.hiremath@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150901_123545_487498_B7A5B7E9 X-CRM114-Status: GOOD ( 15.07 ) X-Spam-Score: -2.6 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ulf.hansson@linaro.org, Kevin Liu , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vaibhav Hiremath MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In order to do particular voltage specific configuration in sdhci_ops->voltage_switch() callback function, we need to pass respective voltage value as well. So this patch adds an extra argument for signal voltage to the callback function. Signed-off-by: Vaibhav Hiremath Signed-off-by: Kevin Liu --- drivers/mmc/host/sdhci.c | 2 +- drivers/mmc/host/sdhci.h | 2 +- drivers/mmc/host/sdhci_f_sdh30.c | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 1dbe932..3dd295f 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -1782,7 +1782,7 @@ static int sdhci_do_start_signal_voltage_switch(struct sdhci_host *host, /* Some controller need to do more when switching */ if (host->ops->voltage_switch) - host->ops->voltage_switch(host); + host->ops->voltage_switch(host, MMC_SIGNAL_VOLTAGE_180); /* 1.8V regulator output should be stable within 5 ms */ ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 5521d29..9b0e2a8 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -537,7 +537,7 @@ struct sdhci_ops { void (*adma_workaround)(struct sdhci_host *host, u32 intmask); void (*platform_init)(struct sdhci_host *host); void (*card_event)(struct sdhci_host *host); - void (*voltage_switch)(struct sdhci_host *host); + void (*voltage_switch)(struct sdhci_host *host, u8 signal_voltage); int (*select_drive_strength)(struct sdhci_host *host, struct mmc_card *card, unsigned int max_dtr, int host_drv, diff --git a/drivers/mmc/host/sdhci_f_sdh30.c b/drivers/mmc/host/sdhci_f_sdh30.c index 983b8b3..7ab1c20 100644 --- a/drivers/mmc/host/sdhci_f_sdh30.c +++ b/drivers/mmc/host/sdhci_f_sdh30.c @@ -49,7 +49,8 @@ struct f_sdhost_priv { struct device *dev; }; -static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host) +static void sdhci_f_sdh30_soft_voltage_switch(struct sdhci_host *host, + u8 signal_voltage) { struct f_sdhost_priv *priv = sdhci_priv(host); u32 ctrl = 0;