Received: by 10.192.165.148 with SMTP id m20csp4065136imm; Mon, 23 Apr 2018 18:27:29 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+MLHe2UmGhLa9BE42TF42l8DOV3exf12uWVp16nPBRDNXhiFKLHgh33sLCpwthrbvNZYfy X-Received: by 10.99.105.195 with SMTP id e186mr8906553pgc.353.1524533249140; Mon, 23 Apr 2018 18:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524533249; cv=none; d=google.com; s=arc-20160816; b=o/btX+vyplL3VDgee07RGcgwZ7yyfCX5zA6VdCvIeu8fPDzqYCQc5cytw4ANKqt3bw vYsdM3w323m8klwnM3PRKjtqidHvexpOaDbx1kD/xeEs7q6xv9K6PjaK7CYJKFyxemH2 phBxsA5JNJNK0dg+jM78uyfFbGjK93d8eaE4zSA9GPOHe9dgd8/6BRTeCgOdkObtFQwW eB69R4LMHD/wfxJa4lsKuv4/rxGFDHa/KiJc9K2paku30UlPKfQElZWmDaYwY9B2c+tk 8K66GkNFouYXH4YsjD2hy1Wv0w2BdMUlbnDlBtA8Rc/pe2l3sDArUfFoILx+zsUQxPtM etgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:thread-index :content-transfer-encoding:mime-version:message-id:date:subject :in-reply-to:references:cc:to:from:dkim-signature :arc-authentication-results; bh=icsvYfGV2A8tGWLhBED18I/QbL4FiE+2iVNZa6PtnLQ=; b=JZSrqEm4zMQw8UeY7XvxEDDDT6HFvhX1k5I+WTFacgreHRH9fZIQGaZPUuztzzKK/5 HhCcOq8mKK5GfT/UwG9Y1+BQsi99afDqDtt/VMm4cOxgN9gNNQoscHCVRXuTdOGjr/ny btMMPZfw198W8y314r4VjJ9eAq15ICWnwwfTsPYPO+VZVm7DyRqjAcvqy+3HbsA6v3o7 ELXQ3CFKTi/AdTmKszxr5OT9M6kC/wLkQXca13hti3jGMYfBbbFXSTLXwigsbZixZn4W iDiupCjz00tqPIRL+gOXImsdfmRBKydW9Uriti5XZobs19h/LAJmgOt8w49B5NQCr7oU WT9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=li6i89xZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p26-v6si12880797pli.35.2018.04.23.18.27.12; Mon, 23 Apr 2018 18:27:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=li6i89xZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932724AbeDXB0C (ORCPT + 99 others); Mon, 23 Apr 2018 21:26:02 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:41824 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932633AbeDXB0A (ORCPT ); Mon, 23 Apr 2018 21:26:00 -0400 Received: by mail-qk0-f195.google.com with SMTP id d125so2082182qkb.8; Mon, 23 Apr 2018 18:25:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:references:in-reply-to:subject:date:message-id :mime-version:content-transfer-encoding:thread-index :content-language; bh=icsvYfGV2A8tGWLhBED18I/QbL4FiE+2iVNZa6PtnLQ=; b=li6i89xZ4WN7Zfi5SosNmoAYxtzG7DNYhap4Ocw7T/y0wAK+i8RgfsPCYykR+Il+4J YWAKW7uEO+B/22LXBz9nGpMHe6wpoG9o4A0CQXOP5S9PgXIJkJZJwf4mLkB3szusMnUM PEAgLybgm81rgvpkMtv13C0xLZQ1uO8ZLHtZ9O/Y2aCw+UPaHkHkV172+KbG3AgVOT9b Tk7lTptG1oos5RExn23MJzAIDis7jW/haJhJo01kRIfeF5RPqKKScCeEEDpKGuAH60F5 5DnMEtFQrQP3faIsjis5UT+JlNXyzWdzjkOxjvMbvtcGtOnxvHyqUaenZ57lXJBtqQMG Kgcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:references:in-reply-to:subject:date :message-id:mime-version:content-transfer-encoding:thread-index :content-language; bh=icsvYfGV2A8tGWLhBED18I/QbL4FiE+2iVNZa6PtnLQ=; b=fDusBlrrg4gEVy2eh5olo5BKSJI7OqgLSlbxYtdljnniMt8TxcHYFOnrdWL3JpfQ7u Y73HJLyFuDO9yBIKZbzkE+KWN3rWjcaD3BL/1Zwgrya1vCvgTG4EwCcpouMMj/3ZJijI 2/TrEDYhEJH0CM7S1FosDadSAkyZOOikP0gMgxEGKn/9WH590jJo8TaT8pFxkiWjX68G mMWHbcYvO5/jd9Ahipm/pb3wKdGdy6u1VGK5P5LdXaTv56LE+oAI3GB4DJ1oQL37W70B HSZhHbMy3iBhMHwWzPda9gX8LSKaua4druvMK2LpJRJ6nT+oLyeARLSsVXHbIU96PDHP b8Pw== X-Gm-Message-State: ALQs6tAvXAbKAO+INZESsYpQWp+NvO7UzSiGNUbTsaVTwLeUAE9yC2Mk QIz2etBx+3RZtNRpd5u14dk= X-Received: by 10.55.21.234 with SMTP id 103mr24886343qkv.349.1524533159105; Mon, 23 Apr 2018 18:25:59 -0700 (PDT) Received: from DESKTOP3JAHB13 ([2607:b400:24:0:2c2d:acd3:76d2:f631]) by smtp.gmail.com with ESMTPSA id w187sm11227421qka.50.2018.04.23.18.25.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 23 Apr 2018 18:25:58 -0700 (PDT) From: "Jingoo Han" To: "'Enric Balletbo i Serra'" , , , , , , , , Cc: , , , , , , , , , , , , , , , , , , , , , , References: <20180423105003.9004-1-enric.balletbo@collabora.com> <20180423105003.9004-15-enric.balletbo@collabora.com> In-Reply-To: <20180423105003.9004-15-enric.balletbo@collabora.com> Subject: Re: [RESEND PATCH v6 14/27] drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll Date: Mon, 23 Apr 2018 21:25:56 -0400 Message-ID: <000001d3db6b$32a87200$97f95600$@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQJsKqzGdLQ3B8H319FIYPcigFOt/AGILm3RotI/UVA= Content-Language: en-us Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Monday, April 23, 2018 6:50 AM, Enric Balletbo i Serra wrote: > > From: zain wang > > There is no register named ANALOGIX_DP_PLL_CTL in Rockchip edp phy reg > list. We should use BIT_4 in ANALOGIX_DP_PD to control the pll power > instead of ANALOGIX_DP_PLL_CTL. > > Cc: Douglas Anderson > Signed-off-by: zain wang > Signed-off-by: Sean Paul > Signed-off-by: Thierry Escande > Reviewed-by: Andrzej Hajda > Signed-off-by: Enric Balletbo i Serra > Tested-by: Marek Szyprowski > Reviewed-by: Archit Taneja Acked-by: Jingoo Han Best regards, Jingoo Han > --- > > .../gpu/drm/bridge/analogix/analogix_dp_reg.c | 20 +++++++++++-------- > 1 file changed, 12 insertions(+), 8 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > index 7b7fd227e1f9..02ab1aaa9993 100644 > --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c > @@ -230,16 +230,20 @@ enum pll_status > analogix_dp_get_pll_lock_status(struct analogix_dp_device *dp) > void analogix_dp_set_pll_power_down(struct analogix_dp_device *dp, bool > enable) > { > u32 reg; > + u32 mask = DP_PLL_PD; > + u32 pd_addr = ANALOGIX_DP_PLL_CTL; > > - if (enable) { > - reg = readl(dp->reg_base + ANALOGIX_DP_PLL_CTL); > - reg |= DP_PLL_PD; > - writel(reg, dp->reg_base + ANALOGIX_DP_PLL_CTL); > - } else { > - reg = readl(dp->reg_base + ANALOGIX_DP_PLL_CTL); > - reg &= ~DP_PLL_PD; > - writel(reg, dp->reg_base + ANALOGIX_DP_PLL_CTL); > + if (dp->plat_data && is_rockchip(dp->plat_data->dev_type)) { > + pd_addr = ANALOGIX_DP_PD; > + mask = RK_PLL_PD; > } > + > + reg = readl(dp->reg_base + pd_addr); > + if (enable) > + reg |= mask; > + else > + reg &= ~mask; > + writel(reg, dp->reg_base + pd_addr); > } > > void analogix_dp_set_analog_power_down(struct analogix_dp_device *dp, > -- > 2.17.0