From patchwork Wed Jan 11 11:51:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 90854 Delivered-To: patches@linaro.org Received: by 10.140.20.99 with SMTP id 90csp1081664qgi; Wed, 11 Jan 2017 03:51:45 -0800 (PST) X-Received: by 10.46.74.26 with SMTP id x26mr2979058lja.51.1484135505124; Wed, 11 Jan 2017 03:51:45 -0800 (PST) Return-Path: Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com. [2a00:1450:4010:c07::22d]) by mx.google.com with ESMTPS id l184si2273746lfb.153.2017.01.11.03.51.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 11 Jan 2017 03:51:45 -0800 (PST) Received-SPF: pass (google.com: domain of ulf.hansson@linaro.org designates 2a00:1450:4010:c07::22d as permitted sender) client-ip=2a00:1450:4010:c07::22d; 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::22d 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-x22d.google.com with SMTP id v186so80873884lfa.1 for ; Wed, 11 Jan 2017 03:51:44 -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=zjUSkZnqz168A54PLQnXD/iRQrvnhItaTiPZbqb2DOQ=; b=QaagfxOs54PFbFXl47DouGrhgL/XzDnSg5lOFjuJ7zNjpHHOellH2xAV5Hs+1bl4AR Tt22g//Psl18KSfiSNmU3K4poYKxaOzv9adlh7HVxJayFPVMRngJ77SyeL57X0HNzwz/ ln1UhtG8PnI72TYaS8QZ2bNOvvE/a1EqnbXzI= 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=zjUSkZnqz168A54PLQnXD/iRQrvnhItaTiPZbqb2DOQ=; b=SBEG0lviHnX82nsvD+ZL240+YjFbuapE1837Vd61KL20HQBUDbnlNHPzZl+JfnWHmv e/hJ+FcqIvv8OdY3VrjTNI3k+8EapZgGzoojCVWy2EDrCj//cwcbM2Ug00lZPim9QGJg dQbYOgsbQuxxZHZGtakoWAmFh0FDMrigBoOn4S1+sIcmkdvIf3U+rMvLFJWrEfJc7Yv8 7HkOemF6yIYEP0bPY3R2iSLdsW7nG6zxwV990zrAnEjwQkRlQ5DYUKuo7a6bjLUra+PR ewuzPGe1Vxy/Wlg5B6LFQLAnMQd/Y/GlV84rRtJWW0cHZroyo3f2CB+7AZtCuBLvYEDO BgRA== X-Gm-Message-State: AIkVDXJXhm5nfeYxJZ6oINTICtvWCSQAA9HPhN3Mpn+qmq8vkxRImpSui6z8cAfqLz8EoJMvhNQ= X-Received: by 10.46.83.70 with SMTP id t6mr1135854ljd.70.1484135504714; Wed, 11 Jan 2017 03:51:44 -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 87sm958768lft.27.2017.01.11.03.51.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 11 Jan 2017 03:51:43 -0800 (PST) From: Ulf Hansson To: linux-mmc@vger.kernel.org, Ulf Hansson Cc: Jaehoon Chung , Adrian Hunter , Linus Walleij Subject: [PATCH v2 05/12] mmc: core: Move some host specific public functions to host.h Date: Wed, 11 Jan 2017 12:51:11 +0100 Message-Id: <1484135478-2077-6-git-send-email-ulf.hansson@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1484135478-2077-1-git-send-email-ulf.hansson@linaro.org> References: <1484135478-2077-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 Reviewed-by: Linus Walleij --- include/linux/mmc/core.h | 6 ------ include/linux/mmc/host.h | 6 ++++++ 2 files changed, 6 insertions(+), 6 deletions(-) -- 1.9.1 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);