Received: by 10.223.185.111 with SMTP id b44csp817484wrg; Fri, 9 Mar 2018 14:26:12 -0800 (PST) X-Google-Smtp-Source: AG47ELvjAOlk0mqQDM6ZO1Bx4mK9+hemfD7m05RfpUcCus6mCua0VNZUQ5K2tW4KGn1LTD8lu8nH X-Received: by 2002:a17:902:26a:: with SMTP id 97-v6mr48112plc.3.1520634372670; Fri, 09 Mar 2018 14:26:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520634372; cv=none; d=google.com; s=arc-20160816; b=F88wYd4M155ueyLdRVZZJTlmdLbvvvmHgmUELsZoMhKS/b2o0CsN3skRvnWHetYYhh 2pNm/DBkHAimlMhF6pFpLWzbDslavs+pMS7HOpAgSXOQ0dOLflUcOswdrBOmYZ0wIB6r I18Bo+CkzVtTy9n+3I9RECmhlI37xC0OmI1fJOO4BLnEOwP1FxmlXVezc4i2W72noeZ1 l/KtoLb7q3Vr/gPvwkbdT5SHJqMA3tGCp+IPVVbpwfrIUyOBpEP4IvdMW9o5o5FBzNld vQjH7YikF6DXTS52ZQGL878bTokpCazMzfKGuR8sIhJ0l7ImcqJFEBNB9mh4Bjh7Fvak 9u8A== 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=06sJTsLNnk8O/KZ5Z4sOmGjD8mRYxhsroOJu37aiMow=; b=vv6i7jw6Uzrt+OCHiMCLbod+4pQy8oVTMApbzHn8123X+3X+CLiXL7rwZcch3qfCr5 FNjPFBDFLuiVbErcLPzoqCCX+9WBZGrR6W9EUaFfdm9SRznDg36Et/opQMMDxUY86Gfc NLOUfI0IoyY902GTAolugfux996zgNmIdPO4vI2sruA0dOSPAscwwG8OF1txhREcrU80 HOF+28l4WnOo7IkZqJR9Pq1YKyakHYd/B4SM6GrqByJmynydjxX81Q2a6phUPEnnhO4k Zd2fNCxqmyhQtOTvECA7lNNQYcLYq6/tUcBqggeSTrHV9aiaRVWyMRZslZJmM5CJr5Hu +vig== 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 z19si1549248pfd.397.2018.03.09.14.25.58; Fri, 09 Mar 2018 14:26:12 -0800 (PST) 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 S933084AbeCIWYh (ORCPT + 99 others); Fri, 9 Mar 2018 17:24:37 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:42736 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933014AbeCIWYe (ORCPT ); Fri, 9 Mar 2018 17:24:34 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 3FE1E27561A 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 v5 20/36] drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll Date: Fri, 9 Mar 2018 23:23:11 +0100 Message-Id: <20180309222327.18689-21-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.16.1 In-Reply-To: <20180309222327.18689-1-enric.balletbo@collabora.com> References: <20180309222327.18689-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 --- 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.1