Received: by 10.223.176.46 with SMTP id f43csp687048wra; Fri, 26 Jan 2018 05:24:04 -0800 (PST) X-Google-Smtp-Source: AH8x227ImCGhxDqXYouizbZ4sX63OkvXpVteNSROaD8dw9OCp+V79Fyxp61qiAl8KJR7T+4WHsji X-Received: by 10.98.252.82 with SMTP id e79mr19209865pfh.159.1516973044280; Fri, 26 Jan 2018 05:24:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516973044; cv=none; d=google.com; s=arc-20160816; b=puf6Z6SfzhizejaI+gWR+vpcGkvns6YA3CIFBsNs7xBebw/n83cm5ok04M95QtFN62 Ggmy72PWt5kspVsfFYVz9e2E5tHOt9nngrS5GbHIVhNMC0GPecE8CWBKWHGYHYXumgj6 PafzKA9h+I5QO5BbG3MgpZepcrFg3wEQV5VExAJBzqoKsk+HAnyP7NKN5xAsN3rAL05w kDOZDoeTdu5tgM/l/I27C98PE1LpAhqWiSNHOKYgwyrYNlnNst4C3r6HqCb4jx0HudNG c8ZaTU3X1HDcUvJwIGg27j71D7z+IJWsUmMDzpZ69X2HV6td5gVgmxGCsW55i8KSrzpa GqbQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfert-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=p67poHvPYTA+yN5INCofYtw9xZ5s7XKZCYVO+G5bYzg=; b=obDrH7M0Mxvz7p6hgC+/x4PeishqzWQpBv69hnxKbRwx3FPGL2Dw2clxTWbbeA/jIo aoU+dFNl2OP0LxSaFoW9dNifV3tnzc6g9wrMjKLqbInqhITcqNeYGV2gAtUJ7wzqIexJ VNW3fhZ2IH47L+PpNlz4pFK1ireKtUjzc05P/0RSCpv8Xr1t5p0hhb5c89iJJhlnKRE6 E1Y1YXmXKUGU4Q8Eexx3pvKKAhlpaRQx+iATXjH608bWsaK98ez4mHoLg7HDCpVCddD4 k4L6C5frqsQkRwrLZxqzsHHdQbXXbwE5iu204vXZ5mpgBHMpgaz1Eqzjy47CjPbJ5Cb3 o/Uw== 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 u22si6324000pfh.162.2018.01.26.05.23.49; Fri, 26 Jan 2018 05:24:04 -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 S1752385AbeAZNR7 (ORCPT + 99 others); Fri, 26 Jan 2018 08:17:59 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:34516 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752345AbeAZNR4 (ORCPT ); Fri, 26 Jan 2018 08:17:56 -0500 Received: from localhost.localdomain (unknown [IPv6:2a01:e35:8a7e:4790:a8d7:ca4:7b4f:7f87]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: tescande) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id B7C37274DD3; Fri, 26 Jan 2018 13:17:55 +0000 (GMT) From: Thierry Escande To: Archit Taneja , Inki Dae , Thierry Reding , Sandy Huang , Sean Paul , David Airlie , Tomasz Figa Cc: Haixia Shi , =?UTF-8?q?=C3=98rjan=20Eide?= , Zain Wang , Yakir Yang , Lin Huang , Douglas Anderson , Mark Yao , linux-kernel@vger.kernel.org, linux-rockchip@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: [PATCH v2 26/43] drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll Date: Fri, 26 Jan 2018 14:16:53 +0100 Message-Id: <20180126131710.7622-27-thierry.escande@collabora.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180126131710.7622-1-thierry.escande@collabora.com> References: <20180126131710.7622-1-thierry.escande@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset = "utf-8" Content-Transfert-Encoding: 8bit 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 --- 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.14.1