Received: by 10.213.65.68 with SMTP id h4csp1738363imn; Thu, 5 Apr 2018 02:59:58 -0700 (PDT) X-Google-Smtp-Source: AIpwx49DQiTuxZXNhvJK9le5zaQ5TvZurDL3MMtb3pDD49LEdwZb6UoSlUAw5FqQjSFxErMDcEys X-Received: by 10.98.8.133 with SMTP id 5mr16479734pfi.154.1522922398874; Thu, 05 Apr 2018 02:59:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522922398; cv=none; d=google.com; s=arc-20160816; b=Mlpvncr5w0fJwVYgbbfb+2xH1+V8eNlWo522RY9yWdxb8j8BCsLBv9zUNBpcT65BAZ tASdurD1U0H2UXMsPhXtgIt32WHR2wN48dAkc4fBTXkckdVRpTHmcouz/tPsudbwJu9x TS3y+bxAFuWp1JX28Vv84XX4jrWVQSz8yWxl/iTjjsKwyY4Qn/fvp1MgtmCwz9Em9k/y YmjG7xdvgf5Ahy5RcTb0LMXHkHCro6818xPLCiE5i+44j0SeTpqClqctrDMBhQ4ycaiJ ViRAzNlZmt4YquoJWkkd7TX6Jdf9EV56ZvNDeW0JcJ1+qwcek0s5jYQWOZioHWWiRotk 8M+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=qbyfsHi9DZei6zryDS+0wYr0bE+QbPDtOMjihtqwuNI=; b=fggFBYSNpyfkE5OTJYS4q9dErddxQ7dL0MddbgqQz/5IER33OPyQQXB8YJpgms3A2K ba2riW5GC87Nuv3Gfoukv2JPUM6dzjt4ox4eLJLfixjdUiS4uVTPhiHAYOdbpDhD7HxJ Qt5wp0wOO4Ob6IkCFXCM91htq68c+UFmCGkU/CNI1Q0lg3j82IGxVxt4ItuX7kcL96rp ow2yyAPkrF7RSke/g5FLSZw9inmtZX6t1jPidcMvGsVm1y6DPC99UkH7m+NLRxaUHdeu znc6BwK/vx52gxmrIUvhh/hivH350K3taclBPal4B+jt4hhf+7rAOtGNFPPL2Usdwy2L u+Ww== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7-v6si6405614plm.539.2018.04.05.02.59.44; Thu, 05 Apr 2018 02:59:58 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751949AbeDEJur (ORCPT + 99 others); Thu, 5 Apr 2018 05:50:47 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:60824 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751906AbeDEJuo (ORCPT ); Thu, 5 Apr 2018 05:50:44 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 3A29B27A650 From: Enric Balletbo i Serra To: architt@codeaurora.org, inki.dae@samsung.com, thierry.reding@gmail.com, hjc@rock-chips.com, seanpaul@chromium.org, airlied@linux.ie, tfiga@chromium.org, heiko@sntech.de Cc: dri-devel@lists.freedesktop.org, dianders@chromium.org, a.hajda@samsung.com, ykk@rock-chips.com, kernel@collabora.com, m.szyprowski@samsung.com, linux-samsung-soc@vger.kernel.org, jy0922.shim@samsung.com, rydberg@bitmath.org, krzk@kernel.org, linux-rockchip@lists.infradead.org, kgene@kernel.org, linux-input@vger.kernel.org, orjan.eide@arm.com, wxt@rock-chips.com, jeffy.chen@rock-chips.com, linux-arm-kernel@lists.infradead.org, mark.yao@rock-chips.com, wzz@rock-chips.com, hl@rock-chips.com, jingoohan1@gmail.com, sw0312.kim@samsung.com, linux-kernel@vger.kernel.org, kyungmin.park@samsung.com, Laurent.pinchart@ideasonboard.com, kuankuan.y@gmail.com, hshi@chromium.org, Enric Balletbo i Serra Subject: [PATCH v6 14/30] drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll Date: Thu, 5 Apr 2018 11:49:44 +0200 Message-Id: <20180405095000.9756-15-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.3 In-Reply-To: <20180405095000.9756-1-enric.balletbo@collabora.com> References: <20180405095000.9756-1-enric.balletbo@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/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.16.3