Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752954AbbFRH1g (ORCPT ); Thu, 18 Jun 2015 03:27:36 -0400 Received: from mail-bn1on0076.outbound.protection.outlook.com ([157.56.110.76]:50720 "EHLO na01-bn1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752330AbbFRH11 (ORCPT ); Thu, 18 Jun 2015 03:27:27 -0400 Authentication-Results: spf=pass (sender IP is 149.199.60.83) smtp.mailfrom=xilinx.com; apm.com; dkim=none (message not signed) header.d=none; From: Suneel Garapati To: , CC: Ulf Hansson , , , Adrian Hunter , Aisheng Dong , Haibo Chen , Tim Kryger , Shawn Guo , Yi Sun , "Rafael J. Wysocki" , , Suneel Garapati Subject: [PATCH] drivers: mmc: sdhci: update max frequency only if undefined Date: Thu, 18 Jun 2015 12:57:07 +0530 Message-ID: <1434612427-1758-1-git-send-email-suneel.garapati@xilinx.com> X-Mailer: git-send-email 2.1.2 X-RCIS-Action: ALLOW X-TM-AS-Product-Ver: IMSS-7.1.0.1224-8.0.0.1202-21620.005 X-TM-AS-User-Approved-Sender: Yes;Yes X-EOPAttributedMessage: 0 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11OLC012;1:fScJHVOMgTSrU1enYP0pSO+U1EZIYkx0okQ04uwKgvxWFc4mEykuqMkKFqAXZGAj9uS2Dwvahp2JgEEhc2tneNw9T/PLLWsri8N5DYn8phOGYmWSJ8AUydYMZWm4U56hKkHNM5E7NfX+4lCSkeJAUmrS6Er+oNR8KjPL7aQF/hs7M1s7tZrQR/qVecwIjnmURUBylnK1S71xVxVuJ0hXtq7KydGq15xaOEERYWHurPXgMnTShdWvqDrMlQaEpRMYBXLqksdxtxiC/d7z52iM8dHye7hla/Q/Lg2s8BX5QEU8Ckz1nAjd0Oft5F6cjOher+SQnbvHdWkEaMWbD+ZUofPC5a3X5fROCA6mqn4YOIU= X-Forefront-Antispam-Report: CIP:149.199.60.83;CTRY:US;IPV:NLI;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(2980300002)(438002)(189002)(199003)(50986999)(77096005)(5001960100002)(107886002)(5003600100002)(5001770100001)(189998001)(33646002)(36756003)(36386004)(6806004)(48376002)(50466002)(87936001)(19580405001)(19580395003)(62966003)(77156002)(47776003)(64706001)(86362001)(92566002)(229853001)(46102003)(50226001)(63266004)(106466001)(7059030)(107986001)(4001430100001);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2FFO11HUB024;H:xsj-pvapsmtpgw01;FPR:;SPF:Pass;MLV:ovrnspm;MX:1;A:1;PTR:unknown-60-83.xilinx.com;LANG:en; MIME-Version: 1.0 Content-Type: text/plain X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB024;2:KwR6QtjoFu0XI+nNDpJVfCXZSgXlkiFOrIOixtLZnMvxiQKAdrwG/vGmO/f3liat;2:iv0iSbVfxpwwkNyTNYTRhixCK8dAD/0u683051yWIgaYnNhxC60t6tHT7nn+lYRUaZTgbly4r2tiB485/JNu+2NxtshtGYicYNDLwSe0VoEpHXb6beScho1u+FngG2gnZrpktqqR0KSfoJWu3XHbn3JFKhMdK5Pk691x6YMKXhP5BXTWwQmzLl/lup4YkSH2hz2mXgGOrqpe3CDvzKlmCZKj6Th9a0EFnzz8Hsxoy9M=;6:KbJ4vi6gqgDUrvJQeF6RbqBclqE722VsTPIG5mwvfhlLdJxAqP/ysUzGCmm2pZnSUmTQYjqQwX+Dqce1bm8NDM57rsLL0q1g/yhlc72rSDDqQW0znlK0Rb2Rbvs9tx8Me6YvyRm4lK9zfa5oSSbdcOZnbtdTHXno03O075PNuAxKpN2bSrgpzG8fmQs2DAodXLPEzJ5v7HoVIXkNuXEnONqu4z7rrXWXSlSz2Gnf9t2BCxf5sgvpUXMxfC2ypIeEoakmnjZX6ovoJ+6zLIWsBE1BhZXbxsX8MhdLs4zcwqv9Cy2LgJpMPz3SDn4CjFIp9V2EHdCyfG5KeL4ZdFGsDaebgzGHvPbA8fu3qW6LuklEoSJKOegvl3SAvye15IAtKoahpJ1sa3ubtzV8YKVfyXGbD3f2qGp6YwqT5IREcBwIADd0Uv2Fi/WW8MJECbKFNhLVU/5a3KZOn/uNiF75VrP0bYEVNgXfnMmDgfKDFds8Zx6iSfFZ8LIhlyOR/UiF X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB024; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(601004)(5005006)(520003)(3002001);SRVR:BY2FFO11HUB024;BCL:0;PCL:0;RULEID:;SRVR:BY2FFO11HUB024; X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB024;3:L392XLZ7/mYDz5Z2Fx+/Y4LGIJ3rJNbB+n0n3Ltid3Cz9XieOijMQe3/YT/AMGW3xb+nt+YNvokn9RLkEzFdktlzs2Nci1h+bVRlrMil3NY4sE8GFopxIPtfuJnylvKgljaBiOwRNK60Kc+JkAo1/BBKT1f6i3/dBeA2vSiQYBoxB7Yrx+NfyNFSYOqQaXljXjIjWbPDM2TwhZ6ckKBE8XSmqtROdkbYRxJ6eanqGvsfcEWKx7lfzIq4xhZ7kfSIW+w0FXK4Kevg1JtLpTxzGLfPsSrt1BEFp35WabqxeRowh4Qbax8wwuAtlG3tZCN8 X-Forefront-PRVS: 0611A21987 X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB024;9:4jP/+nwhQfVpWBHZXabJE6QGh+CAMDQmDngKJvrqJkdmpMEs4Gu0BmthGUcbPqZbIgvUPo2PPO9sRCX1um2Z11vbjlYnnOEJl3xz4JBK2kt1Exuy2H2JwI4T5gxsQmb7Np5CLervm6xpO+zx5GaSEPHCZyhP3SMFpDf4E88kifCh++0JKI8mFkWuJkV3aa+L8b3PKA40XeOVmrpb5s3jK332jyhoK1EYbiSrM2n4ki2VBLtMhH1KXce0lvq65SvskcZo3qmhBU8FO/3Y87eJ35hBAeAMFCrUYMnX4bYkatBT5IMnpuC9hjaEAAi7Y9dECJ/RrFVXYeg8DdIPKOVEvUWJwdvlpQOSpUSIPWQO2t2vRCDDDyGKt8cGKPLS4tvH/RzQI+qA/xo0pdYyRkXVSw69cozlICo8eTLjUqjfd0bB6Vn9Vk464g5jRYz0tREA9oT4uYuBgcuP75yT9Y6mwhWYgQlnK6s9oWH0QidxJ0kyYNdCPqVbUT13qfHWRKqP9PpIJfKNORKJJwZQ4zph5ncXM1c4XZOalRaKwRx9T/ok8+xjivahdy7bSGxdn5qEZzeuLvQ7oxgz2E2Z7WnfcbRqFuQerdqRSk5aEsf0zNLjtNBsRBpYAhmCmEdzA6jfHtWgIcldIuzuB74FTRossGg6Zku7bhWXhzNVKrom6NHIOlTp2rPf58qmBaF5MFh7+MewPAIWMUDAyI9j3Ubf1QZk9vDATVS4xCBWu+RO0ZOicgxXhc+NG5ahJQDg44htgKofoInS3f//24q2jalNczmYeG+pCd64gC0qYqydFAflzZ7AMNuWCwZ2BK9YtXGysoDyJGa5C59IdC1Vy984pGKfAdDFVkUN1sSvhdDRqiaLBq96YrpDqen5uev38g4Dc3+ABfXK6ns9v10nLBBxbbt0Qe9DTnJnuB1vJ7F1JcMR6L7XQ08GLPT2b17I1rbt X-Microsoft-Exchange-Diagnostics: 1;BY2FFO11HUB024;3:iJZWKzweVcEsAOy3VgONfkPman0XaLQ+/WnIw0hFtWncR0F5gv3fpEUJ4FBmsyG16UmbMlBDt6l8zxU0Cn7Y96G11DPV3MqReKevtoDj7KgabOBEEIOiRS5J+FNnUS7piuyFzZOkyLnc3K+va/no5w==;10:Qbd39CONS6JWSvrBy67trpEYpQPMABtykSYD/1G8pLYr0c9UjZNNue2fLH3F9Z/+D6gZOyxfLk6SZShZIqBXDZ7yTlYhbhgnETFW4A1B8+k= X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jun 2015 07:27:25.1212 (UTC) X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[149.199.60.83];Helo=[xsj-pvapsmtpgw01] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2FFO11HUB024 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1060 Lines: 32 f_max parameter of mmc structure is updated unconditionally. If dt property max-frequency is assigned, this update is overwriting the dt property value which is undesired. Signed-off-by: Suneel Garapati --- drivers/mmc/host/sdhci.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index bc14452..c2917d5 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -3047,7 +3047,10 @@ int sdhci_add_host(struct sdhci_host *host) * Set host parameters. */ mmc->ops = &sdhci_ops; - mmc->f_max = host->max_clk; + + if(!mmc->f_max) + mmc->f_max = host->max_clk; + if (host->ops->get_min_clock) mmc->f_min = host->ops->get_min_clock(host); else if (host->version >= SDHCI_SPEC_300) { -- 2.1.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/