From patchwork Wed Jul 20 01:57:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shawn Lin X-Patchwork-Id: 9238665 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 681B8607DA for ; Wed, 20 Jul 2016 02:00:24 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5853D200DF for ; Wed, 20 Jul 2016 02:00:24 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4CE7120587; Wed, 20 Jul 2016 02:00:24 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EE20F2624D for ; Wed, 20 Jul 2016 02:00:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753134AbcGTCAW (ORCPT ); Tue, 19 Jul 2016 22:00:22 -0400 Received: from lucky1.263xmail.com ([211.157.147.131]:48035 "EHLO lucky1.263xmail.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753093AbcGTCAV (ORCPT ); Tue, 19 Jul 2016 22:00:21 -0400 Received: from shawn.lin?rock-chips.com (unknown [192.168.167.131]) by lucky1.263xmail.com (Postfix) with SMTP id 66DB88ECCD; Wed, 20 Jul 2016 10:00:13 +0800 (CST) X-263anti-spam: KSV:0; X-MAIL-GRAY: 1 X-MAIL-DELIVERY: 0 X-KSVirus-check: 0 X-ABS-CHECKED: 4 X-ADDR-CHECKED: 0 Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.263.net (Postfix) with ESMTP id 9ACBF297D; Wed, 20 Jul 2016 10:00:11 +0800 (CST) X-RL-SENDER: shawn.lin@rock-chips.com X-FST-TO: ulf.hansson@linaro.org X-SENDER-IP: 58.22.7.114 X-LOGIN-NAME: shawn.lin@rock-chips.com X-UNIQUE-TAG: X-ATTACHMENT-NUM: 0 X-SENDER: lintao@rock-chips.com X-DNS-TYPE: 0 Received: from localhost.localdomain (unknown [58.22.7.114]) by smtp.263.net (Postfix) whith ESMTP id 28204HX7C7G; Wed, 20 Jul 2016 10:00:13 +0800 (CST) From: Shawn Lin To: Ulf Hansson Cc: Adrian Hunter , Jaehoon Chung , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, Doug Anderson , linux-rockchip@lists.infradead.org, Shawn Lin Subject: [PATCH v2 1/2] mmc: core: move freqs table into core.h Date: Wed, 20 Jul 2016 09:57:39 +0800 Message-Id: <1468979860-28712-1-git-send-email-shawn.lin@rock-chips.com> X-Mailer: git-send-email 1.8.0 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We will reuse it outside the core.c file, so let's move it to the header file. Signed-off-by: Shawn Lin --- Changes in v2: None drivers/mmc/core/core.c | 2 -- drivers/mmc/core/core.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 94cbf4e..0cec7f4 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -58,8 +58,6 @@ */ #define MMC_BKOPS_MAX_TIMEOUT (4 * 60 * 1000) /* max time to wait in ms */ -static const unsigned freqs[] = { 400000, 300000, 200000, 100000 }; - /* * Enabling software CRCs on the data blocks can be a significant (30%) * performance cost, and for other reasons may not always be desired. diff --git a/drivers/mmc/core/core.h b/drivers/mmc/core/core.h index 0fa86a2..5456000 100644 --- a/drivers/mmc/core/core.h +++ b/drivers/mmc/core/core.h @@ -54,6 +54,8 @@ void mmc_power_off(struct mmc_host *host); void mmc_power_cycle(struct mmc_host *host, u32 ocr); void mmc_set_initial_state(struct mmc_host *host); +static const unsigned int freqs[] = { 400000, 300000, 200000, 100000 }; + static inline void mmc_delay(unsigned int ms) { if (ms < 1000 / HZ) {