From patchwork Wed Jan 25 15:12:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 92460 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp2253694qgi; Wed, 25 Jan 2017 07:12:37 -0800 (PST) X-Received: by 10.46.7.10 with SMTP id 10mr16069078ljh.58.1485357157469; Wed, 25 Jan 2017 07:12:37 -0800 (PST) Return-Path: Received: from mail-lf0-x235.google.com (mail-lf0-x235.google.com. [2a00:1450:4010:c07::235]) by mx.google.com with ESMTPS id e142si14850200lfd.54.2017.01.25.07.12.37 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 25 Jan 2017 07:12:37 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::235 as permitted sender) client-ip=2a00:1450:4010:c07::235; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org; spf=pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::235 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x235.google.com with SMTP id x1so43803275lff.0 for ; Wed, 25 Jan 2017 07:12:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VGtCg11iJk3y/2MYAhF1o+sobUg3Rz+S51oxeiZxvlE=; b=DIDYiZzRUeNUcISFgNAJHwNA6O0ALiRXP5uHkJd3tDLL6Q5hNXwDLc2j/87OUlIMSF FMwXnDe9pil1p3m+3sr1yXYHlYU4OZlEVIbXXjbLbflBo3iwga3qi8Vdz3HPI9RHOXEL WnI5CAedXSlUuv7mG0ZuEMyA26F1U935xUSu4= 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:in-reply-to :references; bh=VGtCg11iJk3y/2MYAhF1o+sobUg3Rz+S51oxeiZxvlE=; b=QWQ7kqPsbxVybmVQAGvxFtIcj6ci55VO/PZp+MDFLCTAusf6Xz3hE6glKS2jBlVZfX hUpLGvrsbtVFO/s12ZdHT3dspIx7Ls3yVbwc+72QjnCzWI0CpjjTPXR7tbRRRC4v4LZ6 vmbp+KD0BWsjz4tR8rZQJcc0GM1DQIoXavFS/PiNaS2jVv8oPkDuadsqt3idKif8CaNp 7mbvEndTb5tB4Cjw9AHJxqMC+PPPJ09LHfnKB/PmxW6rxLU+LPxBhJWyTdatCbhc+5Y7 SEahwd/0asfN0PbBRz1LpjFsG3p6eMRH3NlrSAWUnD6EOua1MebrolBaXCmrk99AUUF9 VyCQ== X-Gm-Message-State: AIkVDXITrSYy/lKC8gBe3lcGX3YcSwuduF9wUwtMQECiR2RXaWyBU2lmbonOuv1VF6VTXcq4CsQ= X-Received: by 10.25.19.67 with SMTP id j64mr13569761lfi.34.1485357157014; Wed, 25 Jan 2017 07:12:37 -0800 (PST) Return-Path: Received: from uffe-Latitude-E6430s.ideon.se ([85.235.10.227]) by smtp.gmail.com with ESMTPSA id u126sm8397687lja.25.2017.01.25.07.12.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 25 Jan 2017 07:12:33 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Shawn Lin , Stefan Wahren , Fabio Estevam , Jan Glauber Subject: [PATCH 3/6] mmc: core: Rename __mmc_set_signal_voltage() to mmc_set_signal_voltage() Date: Wed, 25 Jan 2017 16:12:20 +0100 Message-Id: <1485357143-23280-4-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1485357143-23280-1-git-send-email-ulf.hansson@linaro.org> References: <1485357143-23280-1-git-send-email-ulf.hansson@linaro.org> Earlier the mmc_set_signal_voltage() existed, but since it has been renamed to mmc_set_uhs_voltage(), we can now use that name instead. Signed-off-by: Ulf Hansson --- drivers/mmc/core/core.c | 10 +++++----- drivers/mmc/core/core.h | 2 +- drivers/mmc/core/mmc.c | 16 ++++++++-------- 3 files changed, 14 insertions(+), 14 deletions(-) -- 1.9.1 diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 82c1a02..1d44aa2 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -1631,7 +1631,7 @@ u32 mmc_select_voltage(struct mmc_host *host, u32 ocr) return ocr; } -int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage) +int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage) { int err = 0; int old_signal_voltage = host->ios.signal_voltage; @@ -1691,7 +1691,7 @@ int mmc_set_uhs_voltage(struct mmc_host *host, u32 ocr) host->ios.clock = 0; mmc_set_ios(host); - if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180)) { + if (mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180)) { /* * Voltages may not have been switched, but we've already * sent CMD11, so a power cycle is required anyway @@ -1800,11 +1800,11 @@ void mmc_power_up(struct mmc_host *host, u32 ocr) mmc_set_initial_state(host); /* Try to set signal voltage to 3.3V but fall back to 1.8v or 1.2v */ - if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330) == 0) + if (mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330) == 0) dev_dbg(mmc_dev(host), "Initial signal voltage of 3.3v\n"); - else if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180) == 0) + else if (mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180) == 0) dev_dbg(mmc_dev(host), "Initial signal voltage of 1.8v\n"); - else if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120) == 0) + else if (mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120) == 0) dev_dbg(mmc_dev(host), "Initial signal voltage of 1.2v\n"); /* diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index aee23f5..55f543f 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -49,7 +49,7 @@ struct device_node *mmc_of_find_child_device(struct mmc_host *host, void mmc_set_bus_width(struct mmc_host *host, unsigned int width); u32 mmc_select_voltage(struct mmc_host *host, u32 ocr); int mmc_set_uhs_voltage(struct mmc_host *host, u32 ocr); -int __mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage); +int mmc_set_signal_voltage(struct mmc_host *host, int signal_voltage); void mmc_set_timing(struct mmc_host *host, unsigned int timing); void mmc_set_driver_type(struct mmc_host *host, unsigned int drv_type); int mmc_select_drive_strength(struct mmc_card *card, unsigned int max_dtr, diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index b91abe0..5844f29 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c @@ -1122,14 +1122,14 @@ static int mmc_select_hs_ddr(struct mmc_card *card) */ err = -EINVAL; if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_DDR_1_2V) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); if (err && (card->mmc_avail_type & EXT_CSD_CARD_TYPE_DDR_1_8V)) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); /* make sure vccq is 3.3v after switching disaster */ if (err) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330); return err; } @@ -1296,10 +1296,10 @@ static int mmc_select_hs400es(struct mmc_card *card) } if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400_1_2V) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); if (err && card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS400_1_8V) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); /* If fails try again during next card power cycle */ if (err) @@ -1405,10 +1405,10 @@ static int mmc_select_hs200(struct mmc_card *card) old_signal_voltage = host->ios.signal_voltage; if (card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS200_1_2V) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120); if (err && card->mmc_avail_type & EXT_CSD_CARD_TYPE_HS200_1_8V) - err = __mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); + err = mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180); /* If fails try again during next card power cycle */ if (err) @@ -1450,7 +1450,7 @@ static int mmc_select_hs200(struct mmc_card *card) err: if (err) { /* fall back to the old signal voltage, if fails report error */ - if (__mmc_set_signal_voltage(host, old_signal_voltage)) + if (mmc_set_signal_voltage(host, old_signal_voltage)) err = -EIO; pr_err("%s: %s failed, error %d\n", mmc_hostname(card->host),