From patchwork Thu Nov 3 06:21:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9410435 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 AA85260573 for ; Thu, 3 Nov 2016 06:26:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C48F2A513 for ; Thu, 3 Nov 2016 06:26:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9118E2A51A; Thu, 3 Nov 2016 06:26:11 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 197B92A513 for ; Thu, 3 Nov 2016 06:26:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2BS4-0005Rw-Pb; Thu, 03 Nov 2016 06:24:40 +0000 Received: from mailout1.samsung.com ([203.254.224.24]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1c2BPk-0003HX-W3; Thu, 03 Nov 2016 06:22:19 +0000 Received: from epcpsbgm2new.samsung.com (epcpsbgm2 [203.254.230.27]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OG101XOKYZVP780@mailout1.samsung.com>; Thu, 03 Nov 2016 15:21:54 +0900 (KST) X-AuditID: cbfee61b-f796f6d000004092-e3-581ad782e6f3 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id C7.3B.16530.287DA185; Thu, 3 Nov 2016 15:21:54 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OG100J7YZ02LAA0@mmp1.samsung.com>; Thu, 03 Nov 2016 15:21:54 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Subject: [PATCH 09/13] mmc: dw_mmc: remove the "clock-freq-min-max" property Date: Thu, 03 Nov 2016 15:21:31 +0900 Message-id: <20161103062135.10697-10-jh80.chung@samsung.com> X-Mailer: git-send-email 2.10.1 In-reply-to: <20161103062135.10697-1-jh80.chung@samsung.com> References: <20161103062135.10697-1-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuphkeLIzCtJLcpLzFFi42I5/e+xgG7TdakIgw+3zCzmHznHavH/0WtW ixu/2lgtzp/fwG6x6fE1VovLu+awWRz5389o8enBf2aLGef3MVm07j3CbnHnyXpWi+Nrwx14 PDat6mTzuHNtD5vH5iX1Hn9n7Wfx6NuyitFj+7V5zB6fN8kFsEe52WSkJqakFimk5iXnp2Tm pdsqhYa46VooKeQl5qbaKkXo+oYEKSmUJeaUAnlGBmjAwTnAPVhJ3y7BLePdlQ62goeiFW9O GzUwvhDsYuTkkBAwkWg5PpsRwhaTuHBvPRuILSSwlFHi0z2WLkYuIPsHo8Tf3q1gRWwCOhLb vx1nArFFBGQlfv65wAZSxCxwkEni/6TdLCAJYQEfiWWL1wAVcXCwCKhK7HheABLmFbCRaD11 jQ1imbzEhaunwMo5geITjzSzQiy2lrh1eCXTBEbeBYwMqxglUguSC4qT0nON8lLL9YoTc4tL 89L1kvNzNzGCY+KZ9A7Gw7vcDzEKcDAq8fA+SJSKEGJNLCuuzD3EKMHBrCTCu+sKUIg3JbGy KrUoP76oNCe1+BCjKdBdE5mlRJPzgfGaVxJvaGJuYm5sYGFuaWlipCTO2zj7WbiQQHpiSWp2 ampBahFMHxMHp1QDo4x5hcyV/w1PIqbLLjr9IWNLqP+j1D0BasXtMqUzF+2OOBWVKh4sXxdo PaPoCUeMSOfNvsl+FmlRGdcY/cPWsiw++uzKKQmW3RGrLlt8Lqia0ah88oVg5DbH89Mrnq2J fTXx58W8Y101NjKZm3ZbqlV/U2y0Le42fp3Ld4Z/75wkO6eiRzcblFiKMxINtZiLihMBvGTQ lp8CAAA= X-MTR: 20000000000000000@CPGS X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20161102_232217_415262_8211FEC3 X-CRM114-Status: GOOD ( 13.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, ulf.hansson@linaro.org, linux-samsung-soc@vger.kernel.org, heiko@sntech.de, shawn.lin@rock-chips.com, linux-kernel@vger.kernel.org, krzk@kernel.org, Jaehoon Chung , linux-rockchip@lists.infradead.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the "clock-freq-min-max" property. There is "max-frequency" property in drivers/mmc/core/host.c It can be used for getting maximum frequency. And minimum clock value is assigned to 100K by default. Because MMC core should check the initial clock value from 400K to 100K until finding correct value. It's why Minimum value puts 100K by default. Signed-off-by: Jaehoon Chung --- Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt | 3 --- drivers/mmc/host/dw_mmc.c | 13 ++++--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt index 4e00e85..21c8251 100644 --- a/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt +++ b/Documentation/devicetree/bindings/mmc/synopsys-dw-mshc.txt @@ -56,9 +56,6 @@ Optional properties: is specified and the ciu clock is specified then we'll try to set the ciu clock to this at probe time. -* clock-freq-min-max: Minimum and Maximum clock frequency for card output - clock(cclk_out). If it's not specified, max is 200MHZ and min is 400KHz by default. - * num-slots: specifies the number of slots supported by the controller. The number of physical slots actually used could be equal or less than the value specified by num-slots. If this property is not specified, the value diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index bd8c5ea..a0c5a85 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2589,7 +2589,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) struct dw_mci_slot *slot; const struct dw_mci_drv_data *drv_data = host->drv_data; int ctrl_id, ret; - u32 freq[2]; mmc = mmc_alloc_host(sizeof(struct dw_mci_slot), host->dev); if (!mmc) @@ -2603,14 +2602,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) host->slot[id] = slot; mmc->ops = &dw_mci_ops; - if (of_property_read_u32_array(host->dev->of_node, - "clock-freq-min-max", freq, 2)) { - mmc->f_min = DW_MCI_FREQ_MIN; - mmc->f_max = DW_MCI_FREQ_MAX; - } else { - mmc->f_min = freq[0]; - mmc->f_max = freq[1]; - } /*if there are external regulators, get them*/ ret = mmc_regulator_get_supply(mmc); @@ -2649,6 +2640,10 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) if (ret) goto err_host_allocated; + mmc->f_min = DW_MCI_FREQ_MIN; + if (!mmc->f_max) + mmc->f_max = DW_MCI_FREQ_MAX; + /* Useful defaults if platform data is unset. */ if (host->use_dma == TRANS_MODE_IDMAC) { mmc->max_segs = host->ring_size;