From patchwork Thu Jul 14 13:22:27 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 9229809 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 689176075D for ; Thu, 14 Jul 2016 13:22:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A1DA281E1 for ; Thu, 14 Jul 2016 13:22:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4EDF128210; Thu, 14 Jul 2016 13:22:49 +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 639E9281E1 for ; Thu, 14 Jul 2016 13:22:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751102AbcGNNWq (ORCPT ); Thu, 14 Jul 2016 09:22:46 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:26240 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750949AbcGNNWp (ORCPT ); Thu, 14 Jul 2016 09:22:45 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OAB00EC83TUBG90@mailout2.w1.samsung.com>; Thu, 14 Jul 2016 14:22:42 +0100 (BST) X-AuditID: cbfec7f4-f796c6d000001486-2d-57879222b624 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id FB.D1.05254.22297875; Thu, 14 Jul 2016 14:22:42 +0100 (BST) Received: from AMDC2174.DIGITAL.local ([106.120.53.17]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OAB00D9L3TROV40@eusync4.samsung.com>; Thu, 14 Jul 2016 14:22:42 +0100 (BST) From: Krzysztof Kozlowski To: Jaehoon Chung , Ulf Hansson , Kukjin Kim , Krzysztof Kozlowski , linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bartlomiej Zolnierkiewicz Subject: [PATCH] mmc: dwmmc: exynos: Warn if HS400 is being used on non-Exynos5420 chipset Date: Thu, 14 Jul 2016 15:22:27 +0200 Message-id: <1468502547-18571-1-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpmluLIzCtJLcpLzFFi42I5/e/4NV2lSe3hBrta5Sw2zljPanHjVxur xesXhhb9j18zW2x6fI3V4vKuOWwWR/73M1rMOL+PyeL42nAHTo9NqzrZPO5c28PmsXlJvUff llWMHp83yQWwRnHZpKTmZJalFunbJXBl9O6YxFwwlaPi/I7j7A2MT9i6GDk5JARMJL5vm8YC YYtJXLi3HijOxSEksJRR4kr7WnYIp5FJ4nvjHLAONgFjic3Ll4BViQisYJLYdfg3I0iCWcBC YuvW1ewgtrBAjETb2wnMXYwcHCwCqhKvJoL18gq4S7T8u8cKsU1O4uSxyawTGLkXMDKsYhRN LU0uKE5KzzXUK07MLS7NS9dLzs/dxAgJmi87GBcfszrEKMDBqMTD+yCvLVyINbGsuDL3EKME B7OSCO/xCe3hQrwpiZVVqUX58UWlOanFhxilOViUxHnn7nofIiSQnliSmp2aWpBaBJNl4uCU amC0eG16QKdPMPpvrSCL3KP4q5VNNbX2O1d+trv7tYNfQG6++bv3WhFMzFJ3b66Y+MeUecWt TfYXzlz/caI9qnriEuGog6KsGcEJ0o8cVn3R+rmZbV2jeJhqVuuD9yeOxnoWSRl2nrugueNJ 6OfABsWfgdO4OfrPG/9xm7r649+jU76e/j/lv+kMJZbijERDLeai4kQAj7jVjBYCAAA= 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 Chipsets before Exynos5420 did not support HS400 so if MMC core tries to configure HS400 timing, this might or might not work. Warn in such cases because this is DTB misconfiguration. Signed-off-by: Krzysztof Kozlowski Reviewed-by: Alim Akhtar --- drivers/mmc/host/dw_mmc-exynos.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index da0ef1765735..7ab3d749b5ae 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -225,8 +225,12 @@ static void dw_mci_exynos_config_hs400(struct dw_mci *host, u32 timing) * Not supported to configure register * related to HS400 */ - if (priv->ctrl_type < DW_MCI_TYPE_EXYNOS5420) + if (priv->ctrl_type < DW_MCI_TYPE_EXYNOS5420) { + if (timing == MMC_TIMING_MMC_HS400) + dev_warn(host->dev, + "cannot configure HS400, unsupported chipset\n"); return; + } dqs = priv->saved_dqs_en; strobe = priv->saved_strobe_ctrl;