From patchwork Fri Dec 30 12:47:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 89348 Delivered-To: patches@linaro.org Received: by 10.140.20.101 with SMTP id 92csp6424749qgi; Fri, 30 Dec 2016 04:48:26 -0800 (PST) X-Received: by 10.25.193.194 with SMTP id r185mr12160412lff.103.1483102106322; Fri, 30 Dec 2016 04:48:26 -0800 (PST) Return-Path: Received: from mail-lf0-x233.google.com (mail-lf0-x233.google.com. [2a00:1450:4010:c07::233]) by mx.google.com with ESMTPS id e39si27505807lji.52.2016.12.30.04.48.26 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 30 Dec 2016 04:48:26 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::233 as permitted sender) client-ip=2a00:1450:4010:c07::233; 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::233 as permitted sender) smtp.mailfrom=ulf.hansson@linaro.org; dmarc=pass (p=NONE dis=NONE) header.from=linaro.org Received: by mail-lf0-x233.google.com with SMTP id y21so236381803lfa.1 for ; Fri, 30 Dec 2016 04:48:26 -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=SeoSQ3wTgrt7DjEiEnlJoqy9QVupqDVmF7saobOuNTk=; b=apBhu5tv+YnTu7S8pRf5Uw4QffSyr9hGR3Pk+2Ga9xs7wulnQ02oNwjRupF9ea6CkM pAeeEUjDnxKoZark3QG9AsJhea+yJO1xo9thzWWeYA4i3at9/WXqmHwhMSs6cmsBZLe2 CKf/lHwRGOMQPOvHL0PCCT0SyoLDtnyx3xftA= 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=SeoSQ3wTgrt7DjEiEnlJoqy9QVupqDVmF7saobOuNTk=; b=jdBVPTSBfuh1ttJObATPnT00ergSbTo0NqSR0xYA0yFRSTw+iec4ZjJ4lEix9tIlZ+ sUm5PL8i6AP/6HblWg2JYvi/hF93ntBIE/quBl59wLr8xCd+qStsZyUhRpL5E5BwL18E arIASHTkEroEbGJrYQWXMMMd9XL5KSGrvd3K25Tpbx638i1A+qeV41ZzC5+V+idYZvK6 28bWantZfvopHmcB7tKuV8g1j/pHJ+9eGobLunU+rFcDH6/vZ36mKQUndzQj5N6QuKWd NKRCmzK4pSnLe1L1+A7gqOZx8RBQYedgvs6AduD1kCB+XBUEE5U4BaD2fUlXO+f1gSQg 32tg== X-Gm-Message-State: AIkVDXIu7NNwYSb/mnXvVx2kxiqcsGPpRO06fWVqH9TAmrbKODuvmXKZwLVqFkVO7KnDQMJ0bow= X-Received: by 10.25.19.170 with SMTP id 42mr13611589lft.174.1483102105930; Fri, 30 Dec 2016 04:48:25 -0800 (PST) Return-Path: Received: from localhost.localdomain (h-155-4-221-67.na.cust.bahnhof.se. [155.4.221.67]) by smtp.gmail.com with ESMTPSA id a79sm7450069ljb.46.2016.12.30.04.48.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 30 Dec 2016 04:48:24 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH 14/21] mmc: core: Move some host specific public functions to host.h Date: Fri, 30 Dec 2016 13:47:27 +0100 Message-Id: <1483102054-1752-15-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> References: <1483102054-1752-1-git-send-email-ulf.hansson@linaro.org> Ideally the public mmc header file, core.h, shouldn't contain interfaces particularly intended to be used by host drivers. Instead those should remain in the host.h header file. Therefore, let's move a couple functions from core.h to host.h. Signed-off-by: Ulf Hansson --- include/linux/mmc/core.h | 6 ------ include/linux/mmc/host.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) -- 1.9.1 Reviewed-by: Linus Walleij diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index e679a86..faacc90 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -163,8 +163,6 @@ extern struct mmc_async_req *mmc_start_req(struct mmc_host *, enum mmc_blk_status *); extern void mmc_wait_for_req(struct mmc_host *, struct mmc_request *); extern int mmc_wait_for_cmd(struct mmc_host *, struct mmc_command *, int); -extern int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); -extern int mmc_abort_tuning(struct mmc_host *host, u32 opcode); #define MMC_ERASE_ARG 0x00000000 #define MMC_SECURE_ERASE_ARG 0x80000000 @@ -179,8 +177,4 @@ extern struct mmc_async_req *mmc_start_req(struct mmc_host *, extern int mmc_hw_reset(struct mmc_host *host); extern void mmc_set_data_timeout(struct mmc_data *, const struct mmc_card *); -struct device_node; -extern u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max); -extern int mmc_of_parse_voltage(struct device_node *np, u32 *mask); - #endif /* LINUX_MMC_CORE_H */ diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index 8d38c76..7de0519 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -392,11 +392,14 @@ struct mmc_host { unsigned long private[0] ____cacheline_aligned; }; +struct device_node; + struct mmc_host *mmc_alloc_host(int extra, struct device *); int mmc_add_host(struct mmc_host *); void mmc_remove_host(struct mmc_host *); void mmc_free_host(struct mmc_host *); int mmc_of_parse(struct mmc_host *host); +int mmc_of_parse_voltage(struct device_node *np, u32 *mask); static inline void *mmc_priv(struct mmc_host *host) { @@ -452,6 +455,7 @@ static inline int mmc_regulator_set_vqmmc(struct mmc_host *mmc, } #endif +u32 mmc_vddrange_to_ocrmask(int vdd_min, int vdd_max); int mmc_regulator_get_supply(struct mmc_host *mmc); static inline int mmc_card_is_removable(struct mmc_host *host) @@ -538,6 +542,8 @@ static inline bool mmc_can_retune(struct mmc_host *host) return host->can_retune == 1; } +int mmc_send_tuning(struct mmc_host *host, u32 opcode, int *cmd_error); +int mmc_abort_tuning(struct mmc_host *host, u32 opcode); void mmc_retune_pause(struct mmc_host *host); void mmc_retune_unpause(struct mmc_host *host);