From patchwork Wed Feb 14 17:23:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Sylwester Nawrocki/Kernel \\(PLT\\) /SRPOL/Staff Engineer/Samsung Electronics" X-Patchwork-Id: 10219503 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 B79E460467 for ; Wed, 14 Feb 2018 17:24:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A27AE288F1 for ; Wed, 14 Feb 2018 17:24:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9481328F0E; Wed, 14 Feb 2018 17:24:15 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID 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 9E0E3288F1 for ; Wed, 14 Feb 2018 17:24:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1033384AbeBNRYO (ORCPT ); Wed, 14 Feb 2018 12:24:14 -0500 Received: from mailout4.samsung.com ([203.254.224.34]:45541 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033363AbeBNRYN (ORCPT ); Wed, 14 Feb 2018 12:24:13 -0500 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20180214172411epoutp042aeff94c9e6999090db670af7040d6cc~TQRN1B8DQ3055730557epoutp04h; Wed, 14 Feb 2018 17:24:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout4.samsung.com 20180214172411epoutp042aeff94c9e6999090db670af7040d6cc~TQRN1B8DQ3055730557epoutp04h DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1518629051; bh=fnPiBscOU8uIpwyR4B0DlerkWoLnrnEsl2Kh2VhJe60=; h=From:To:Cc:Subject:Date:References:From; b=qDS1D7BmCV0Imy4wueamBI0oy4yuXXj1o4pJSIBE9e8VL3mV4RRXrUhkwpT5SDO20 EXyqWEncgf3RrcKhJ8DZfWICHBu+anHKQ1D6hJWXIjiO4lVzGLOXMhQ5YI3/s9fxBP bLDZBP1yBTpcADz62WdAhzPuKY/8gbOwZczQDYwo= Received: from epsmges1p5.samsung.com (unknown [182.195.42.57]) by epcas1p1.samsung.com (KnoxPortal) with ESMTP id 20180214172410epcas1p1da10aba55b416cbc548184052ab5e522~TQRNcq2bQ0828308283epcas1p19; Wed, 14 Feb 2018 17:24:10 +0000 (GMT) Received: from epcas1p1.samsung.com ( [182.195.41.45]) by epsmges1p5.samsung.com (Symantec Messaging Gateway) with SMTP id 24.7E.04037.AB0748A5; Thu, 15 Feb 2018 02:24:10 +0900 (KST) Received: from epsmgms2p1new.samsung.com (unknown [182.195.42.142]) by epcas1p2.samsung.com (KnoxPortal) with ESMTP id 20180214172410epcas1p25bc3b963d508a4d34666f25f325af54d~TQRNGoIHF0034200342epcas1p2Z; Wed, 14 Feb 2018 17:24:10 +0000 (GMT) X-AuditID: b6c32a39-467ff70000000fc5-83-5a8470bab999 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1new.samsung.com (Symantec Messaging Gateway) with SMTP id 44.98.03826.AB0748A5; Thu, 15 Feb 2018 02:24:10 +0900 (KST) Received: from AMDC3061.digital.local ([106.116.147.40]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0P4500HKXHO0L770@mmp1.samsung.com>; Thu, 15 Feb 2018 02:24:10 +0900 (KST) From: Sylwester Nawrocki To: inki.dae@samsung.com Cc: jy0922.shim@samsung.com, sw0312.kim@samsung.com, linux-samsung-soc@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, b.zolnierkie@samsung.com, m.szyprowski@samsung.com, Sylwester Nawrocki Subject: [PATCH v2] drm: exynos: Use proper macro definition for HDMI_I2S_PIN_SEL_1 Date: Wed, 14 Feb 2018 18:23:56 +0100 Message-id: <20180214172356.7013-1-s.nawrocki@samsung.com> X-Mailer: git-send-email 2.14.2 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNIsWRmVeSWpSXmKPExsWy7bCmru6ugpYog5VvtC02zljPanHl63s2 i0n3J7BYvLh3kcVi0+NrrBYzzu9jslh75C67xeE37UDu5JdsDpwe97uPM3lsXlLv0bdlFaPH 501yASxRXDYpqTmZZalF+nYJXBl3339mLLjKV/HmU3oD4xmeLkZODgkBE4mT+/8ydTFycQgJ 7GCUaPl7ihXC+c4osf7sISaYqsX3brJDJHYzSqxdPIEFwvnFKPH5+Tl2kCo2AUOJ3qN9jCC2 iICExMxXF8HmMgu0MEk8mHuFuYuRg0NYIFTi/G6w3SwCqhI9bRtZQGxeASuJWXtfQG2Tl3i/ 4D4jSK+EwFdWie8t1xkhEi4S+9e0sEPYwhKvjm9hB5kpISAtcemoLUR9P6PEx+P7WSCc1YwS r7/tYoVosJY4fPwimM0swCfx7msPK0Qzr0RHmxBEiYdEz8TtLBC2o8Ti/0fAdgkJxEq8ebOP bQKj5AJGhlWMYqkFxbnpqcWGBaZ6xYm5xaV56XrJ+bmbGMFRqGW5g/HYOZ9DjAIcjEo8vAY2 LVFCrIllxZW5hxglOJiVRHiNzzdHCfGmJFZWpRblxxeV5qQWH2KU5mBREucNCHCJEhJITyxJ zU5NLUgtgskycXBKNTBeMNjg5r1d+Lf/fYWJi/xijwXPcFv2tIqbq/bbr+SDd1hiD+ZZv7w8 J8N8g9zFTUI9R4KmhL6MDNm+v2KL78Jvd7QVDvsVMibbyj9kfyc4adFO+7QVMbf2OknqvW7O Dk7/tHS/X3j/jMl3T8ZM/ONu18HSknv4vRazW8+GWebd3QaHe6Y1lv5RYinOSDTUYi4qTgQA icQdAr4CAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrOJMWRmVeSWpSXmKPExsVy+t9jAd1dBS1RBmdu8llsnLGe1eLK1/ds FpPuT2CxeHHvIovFpsfXWC1mnN/HZLH2yF12i8Nv2oHcyS/ZHDg97ncfZ/LYvKTeo2/LKkaP z5vkAliiuGxSUnMyy1KL9O0SuDLuvv/MWHCVr+LNp/QGxjM8XYycHBICJhKL791k72Lk4hAS 2MkocWzTcmYI5xejxOIJExhBqtgEDCV6j/aB2SICEhIzX11kAiliFmhhkmh/Moeti5GDQ1gg VOL8brCpLAKqEj1tG1lAbF4BK4lZe18wQWyTl3i/4D7jBEauBYwMqxglUwuKc9Nzi40KDPNS y/WKE3OLS/PS9ZLzczcxAoNj22Gtvh2M95fEH2IU4GBU4uE1sGmJEmJNLCuuzD3EKMHBrCTC a3y+OUqINyWxsiq1KD++qDQntfgQozQHi5I47+28Y5FCAumJJanZqakFqUUwWSYOTqkGRu5Z 3a8F16sy1nb6vj79qU9w2dNz1jyXWw4Ky6zr7NtfkHg3JMdT/vo7Tg6uLUdkCza8Nwg4fnjK 5htlR9+n9U+5EH3snAmLoiCjRpkf8yTBd7s2mYjLrK25JKRRcHpbVGvb2+eijXNvnto9s1XM JJ99la11SXrTQcW51/5V23Z677Z1v3urSomlOCPRUIu5qDgRAG/N91cKAgAA X-CMS-MailID: 20180214172410epcas1p25bc3b963d508a4d34666f25f325af54d X-Msg-Generator: CA CMS-TYPE: 101P X-CMS-RootMailID: 20180214172410epcas1p25bc3b963d508a4d34666f25f325af54d X-RootMTR: 20180214172410epcas1p25bc3b963d508a4d34666f25f325af54d References: Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Bit field [2:0] of HDMI_I2S_PIN_SEL_1 corresponds to SDATA_0, not SDATA_2. This patch removes redefinition of HDMI_I2S_SEL_DATA2 constant and adds missing HDMI_I2S_SEL_DATA0. The value of bit field selecting SDATA_1 (pin_sel_3) is also changed, so it is 3 as suggested in the Exynos TRMs. Signed-off-by: Sylwester Nawrocki --- drivers/gpu/drm/exynos/exynos_hdmi.c | 7 +++++-- drivers/gpu/drm/exynos/regs-hdmi.h | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index a4b75a46f946..abd84cbcf1c2 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1068,10 +1068,13 @@ static void hdmi_audio_config(struct hdmi_context *hdata) /* Configuration I2S input ports. Configure I2S_PIN_SEL_0~4 */ hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_0, HDMI_I2S_SEL_SCLK(5) | HDMI_I2S_SEL_LRCK(6)); - hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_1, HDMI_I2S_SEL_SDATA1(1) - | HDMI_I2S_SEL_SDATA2(4)); + + hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_1, HDMI_I2S_SEL_SDATA1(3) + | HDMI_I2S_SEL_SDATA0(4)); + hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_2, HDMI_I2S_SEL_SDATA3(1) | HDMI_I2S_SEL_SDATA2(2)); + hdmi_reg_writeb(hdata, HDMI_I2S_PIN_SEL_3, HDMI_I2S_SEL_DSD(0)); /* I2S_CON_1 & 2 */ diff --git a/drivers/gpu/drm/exynos/regs-hdmi.h b/drivers/gpu/drm/exynos/regs-hdmi.h index 04be0f7e8193..4420c203ac85 100644 --- a/drivers/gpu/drm/exynos/regs-hdmi.h +++ b/drivers/gpu/drm/exynos/regs-hdmi.h @@ -464,7 +464,7 @@ /* I2S_PIN_SEL_1 */ #define HDMI_I2S_SEL_SDATA1(x) (((x) & 0x7) << 4) -#define HDMI_I2S_SEL_SDATA2(x) ((x) & 0x7) +#define HDMI_I2S_SEL_SDATA0(x) ((x) & 0x7) /* I2S_PIN_SEL_2 */ #define HDMI_I2S_SEL_SDATA3(x) (((x) & 0x7) << 4)