From mboxrd@z Thu Jan 1 00:00:00 1970 From: Damian Kos Subject: [PATCH v6 6/6] drm/bridge: add PHY initialization in mhdp8546 driver. Date: Mon, 8 Oct 2018 22:42:12 +0100 Message-ID: <1539034953-11274-7-git-send-email-dkos@cadence.com> References: <1539034953-11274-1-git-send-email-dkos@cadence.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: In-Reply-To: <1539034953-11274-1-git-send-email-dkos@cadence.com> Sender: linux-kernel-owner@vger.kernel.org To: David Airlie , Rob Herring , Mark Rutland , Archit Taneja , Andrzej Hajda , Laurent Pinchart , Gustavo Padovan , Maarten Lankhorst , Sean Paul , Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Quentin Schulz , Damian Kos , Piotr Sroka , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org Cc: rafalc@cadence.com, quentin.schulz@bootlin.com, jbergsagel@ti.com List-Id: devicetree@vger.kernel.org This patch modifies the mhdp8546 driver to initialize sd0801 "Torrent" PHY. And removes the dbg_regs field from cdns_mhdp_device structure. Signed-off-by: Damian Kos --- drivers/gpu/drm/bridge/cdns-mhdp.c | 9 +++++++++ include/drm/bridge/cdns-mhdp-common.h | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/cdns-mhdp.c b/drivers/gpu/drm/bridge/cdns-mhdp.c index 48ac5cf1e031..caaf3c17d74f 100644 --- a/drivers/gpu/drm/bridge/cdns-mhdp.c +++ b/drivers/gpu/drm/bridge/cdns-mhdp.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -1220,6 +1221,12 @@ static int mhdp_probe(struct platform_device *pdev) if (IS_ERR(mhdp->regs)) return PTR_ERR(mhdp->regs); + mhdp->phy = devm_phy_get(&pdev->dev, "dpphy"); + if (IS_ERR(mhdp->phy)) { + dev_err(&pdev->dev, "no PHY configured\n"); + return PTR_ERR(mhdp->phy); + } + platform_set_drvdata(pdev, mhdp); ret = load_firmware(mhdp, FW_NAME, CDNS_MHDP_IMEM); @@ -1291,6 +1298,8 @@ static int mhdp_probe(struct platform_device *pdev) mhdp->dev, HDMI_CODEC_DRV_NAME, PLATFORM_DEVID_AUTO, &codec_data, sizeof(codec_data)); + phy_init(mhdp->phy); + /* Enable VIF clock for stream 0 */ cdns_mhdp_reg_read(mhdp, CDNS_DPTX_CAR, &resp); cdns_mhdp_reg_write(mhdp, CDNS_DPTX_CAR, diff --git a/include/drm/bridge/cdns-mhdp-common.h b/include/drm/bridge/cdns-mhdp-common.h index d4711091ff2b..1e8a44138ce2 100644 --- a/include/drm/bridge/cdns-mhdp-common.h +++ b/include/drm/bridge/cdns-mhdp-common.h @@ -553,7 +553,6 @@ struct cdns_mhdp_device { struct cdns_mhdp_sink sink; struct cdns_mhdp_bridge bridge; struct phy *phy; - void __iomem *dbg_regs; struct video_info video_info; struct drm_display_mode mode; -- 2.17.1