Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp3915395ybb; Tue, 31 Mar 2020 14:48:19 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsbGpoE2dIlGB1+ecnwUMvlF7p3u4AFvYamTiu0vbRkOBGZPvmG0s7uzA3uUygKfK3f5jVC X-Received: by 2002:a9d:4802:: with SMTP id c2mr4990412otf.78.1585691299225; Tue, 31 Mar 2020 14:48:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585691299; cv=none; d=google.com; s=arc-20160816; b=MlZwFrX4eszuroyCRVHM0JBltBSSW6HxNJxSncTRwwFENhZ7TdTx3Lv59YhcGUp5/U Z2JcBubifHiqu4slT+vbUR9i9A0ZA8qJsX+4wWWIKgocpsGMhjcwkbG4RfqACPrmKIaT Ffz/o4KEpvE2EF6ZYnb1dymQTrURps57dMJcSX0JRmpcJklnOUD4CIeP/VGOAvHxGMtz iIOmEstLzoLNk3sXKHvI5TFzbMUa01U/SQ8kucm+nxXa3DWNulb/StzmDm1TqCXZVgyO 3pYLDmIhMQlo5M6ntRby1h3JJzH2r5vT4OLgcggNTm2whIjYWRdmxBY8sgSPccxK4SM0 9kxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=K8tFAoVwTTibgunNvDTrEHujUq8CREJ6OVyPn3xo8yw=; b=J3OVGVljtjzzTKO6tRGPtXPdkfeQGRz3uSykfR2oCFYQWJ3XLwyIAVBWb4Np/ZaebS OUQIFn51vSn91sCnbu2tXdb7plRl5tYEImMn3fqnqPGWkwDnKYlKndbDKe2OMZp1wlvD ikvOV6tKbP/rKdzHPwFrtcwR734efRTv6bF27uPbj9utUFGWnpJ1um/MNaD4KB66YsO5 Z/sOxSIt7y08bvBdndp96b1pX0biv5L87sKZKw+xyqI0YvUQluy0WZdCcrALprYs8Iea un0bmokpkTZYdyzepcG7cwwD+hsLpNIO3kLiwME2Vz/uQBxuNDl3PMx57IFnFLPhBBvm X8Pg== 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 n82si79395oih.195.2020.03.31.14.48.06; Tue, 31 Mar 2020 14:48:19 -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 S1731521AbgCaVq1 (ORCPT + 99 others); Tue, 31 Mar 2020 17:46:27 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:50416 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731429AbgCaVqY (ORCPT ); Tue, 31 Mar 2020 17:46:24 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: eballetbo) with ESMTPSA id 015C3297173 From: Enric Balletbo i Serra To: mark.rutland@arm.com, ck.hu@mediatek.com, sboyd@kernel.org, ulrich.hecht+renesas@gmail.com Cc: matthias.bgg@kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Collabora Kernel ML , Matthias Brugger , linux-clk@vger.kernel.org, matthias.bgg@gmail.com, drinkcat@chromium.org, hsinyi@chromium.org, linux-mediatek@lists.infradead.org, Allison Randal , Greg Kroah-Hartman , Kate Stewart , Michael Turquette , Richard Fontana , Thomas Gleixner Subject: [PATCH 3/4] clk / soc: mediatek: Bind clock and gpu driver for mt2701 Date: Tue, 31 Mar 2020 23:46:08 +0200 Message-Id: <20200331214609.1742152-3-enric.balletbo@collabora.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200331214609.1742152-1-enric.balletbo@collabora.com> References: <20200331214609.1742152-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Now that the mmsys driver is the top-level entry point for the multimedia subsystem, we could bind the clock and the gpu driver on those devices that is expected to work, so the drm driver is intantiated by the mmsys driver and display, hopefully, working again. Signed-off-by: Enric Balletbo i Serra --- If you have this hardware, please kindly provide your tested tag. Only build tested. drivers/clk/mediatek/clk-mt2701-mm.c | 8 ++------ drivers/soc/mediatek/mtk-mmsys.c | 8 ++++++++ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/clk/mediatek/clk-mt2701-mm.c b/drivers/clk/mediatek/clk-mt2701-mm.c index 054b597d4a73..3a4e895a3d0f 100644 --- a/drivers/clk/mediatek/clk-mt2701-mm.c +++ b/drivers/clk/mediatek/clk-mt2701-mm.c @@ -79,16 +79,12 @@ static const struct mtk_gate mm_clks[] = { GATE_DISP1(CLK_MM_TVE_FMM, "mm_tve_fmm", "mm_sel", 14), }; -static const struct of_device_id of_match_clk_mt2701_mm[] = { - { .compatible = "mediatek,mt2701-mmsys", }, - {} -}; - static int clk_mt2701_mm_probe(struct platform_device *pdev) { + struct device *dev = &pdev->dev; + struct device_node *node = dev->parent->of_node; struct clk_onecell_data *clk_data; int r; - struct device_node *node = pdev->dev.of_node; clk_data = mtk_alloc_clk_data(CLK_MM_NR); diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c index c7d3b7bcfa32..cacafe23c823 100644 --- a/drivers/soc/mediatek/mtk-mmsys.c +++ b/drivers/soc/mediatek/mtk-mmsys.c @@ -80,6 +80,10 @@ struct mtk_mmsys_driver_data { const char *clk_driver; }; +static const struct mtk_mmsys_driver_data mt2701_mmsys_driver_data = { + .clk_driver = "clk-mt2701-mm", +}; + static const struct mtk_mmsys_driver_data mt2712_mmsys_driver_data = { .clk_driver = "clk-mt2712-mm", }; @@ -323,6 +327,10 @@ static int mtk_mmsys_probe(struct platform_device *pdev) } static const struct of_device_id of_match_mtk_mmsys[] = { + { + .compatible = "mediatek,mt2701-mmsys", + .data = &mt2701_mmsys_driver_data, + }, { .compatible = "mediatek,mt2712-mmsys", .data = &mt2712_mmsys_driver_data, -- 2.25.1