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: 52942 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 3722C2300F for ; Tue, 1 Sep 2015 19:35:54 +0000 (UTC) Received: by lamp12 with SMTP id p12sf4207963lam.2 for ; Tue, 01 Sep 2015 12:35:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=Zoe26GpIDmtiNLV1N4IxzVB/da6ZcL6PgfpGm/E2mC0=; b=nBWS1ZZSpwUFHi/ja/RMPAl1QvdHDF9nb49jbX4LLul6BP5y/lfv5coAFa6wMjD5yS Xd7BsimqFfX9+EKKpSZk1nuVbi/2cssJ5N1Mc6jePl6otsH/bqspPjoA9V4xUpQr5d2F prr7gpj8HKfGDJELtJQ6QpAsStmoh8SqSstc6yhqJFYV9/7yJpueJD0P19yUWLm2orXL d2AYaFBp/+zkBYwEiNrnZ2gipC9jPv7JUYUVBrTTmmj8L9UvDvprwr6Lrsg04aAapRDU ApmsKxvmBVBUtQt263sVaWkuL5mURwlp4f8592AioQw1n8tNwK+GL2KBJjHFbv/aaZn9 GUUA== X-Gm-Message-State: ALoCoQn/rHfxCaWw1uZYjwLmCcOiljZU6S8/dIuRatZr7t3+QeU242tj+qHFZhZ+ooE+v4tP/aNM X-Received: by 10.112.144.99 with SMTP id sl3mr417797lbb.12.1441136153156; Tue, 01 Sep 2015 12:35:53 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.43.170 with SMTP id x10ls642080lal.61.gmail; Tue, 01 Sep 2015 12:35:53 -0700 (PDT) X-Received: by 10.153.8.168 with SMTP id dl8mr7738187lad.5.1441136153020; Tue, 01 Sep 2015 12:35:53 -0700 (PDT) Received: from mail-la0-f43.google.com (mail-la0-f43.google.com. [209.85.215.43]) by mx.google.com with ESMTPS id b9si9736150lae.115.2015.09.01.12.35.52 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 01 Sep 2015 12:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) client-ip=209.85.215.43; Received: by lanb10 with SMTP id b10so7029370lan.3 for ; Tue, 01 Sep 2015 12:35:52 -0700 (PDT) X-Received: by 10.112.141.136 with SMTP id ro8mr14036994lbb.88.1441136152875; Tue, 01 Sep 2015 12:35:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.164.42 with SMTP id yn10csp73604lbb; Tue, 1 Sep 2015 12:35:50 -0700 (PDT) X-Received: by 10.66.90.166 with SMTP id bx6mr48596945pab.133.1441136148158; Tue, 01 Sep 2015 12:35:48 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ix3si747471pbb.46.2015.09.01.12.35.47; Tue, 01 Sep 2015 12:35:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-mmc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753569AbbIATfd (ORCPT + 2 others); Tue, 1 Sep 2015 15:35:33 -0400 Received: from mail-pa0-f45.google.com ([209.85.220.45]:34383 "EHLO mail-pa0-f45.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752941AbbIATfZ (ORCPT ); Tue, 1 Sep 2015 15:35:25 -0400 Received: by padhy1 with SMTP id hy1so5419131pad.1 for ; Tue, 01 Sep 2015 12:35:24 -0700 (PDT) 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 Cc: ulf.hansson@linaro.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Vaibhav Hiremath , Kevin Liu 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> Sender: linux-mmc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: vaibhav.hiremath@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.43 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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;