Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp3081414ybk; Mon, 18 May 2020 17:27:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYEqO4d8AKOEueT0g9xvbh2/jJIJCaqyAd/NaTP9ZzoFZgx+G2hz7cNLaU1BjwUCyKXzyY X-Received: by 2002:a05:6402:4c6:: with SMTP id n6mr15466436edw.264.1589848031430; Mon, 18 May 2020 17:27:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589848031; cv=none; d=google.com; s=arc-20160816; b=Ih+DyNL6rtxwnFy464LOCwo4MF4C70/9NsrunEN2lLgCYOn4p26tJ3EKZUF0TB8pPC 32NoGTdaBGH8n5FmF9t1A4UuAZ2Kff9iyqNNr5Sxny0BtPi0dCys8KjoFya0FNMgVTOH d9kVPGTd4eRvEaz6TivlA355f4Ot4SY6MZM9ke/NVI6nS1MDzeL8t2y9GMqQmAc0vSFg XC+sFTJ+VBwM6yVNqVfRviz6Ts2X7939doEQS0GXNBRn1TGmBBXO+pn7w/u0OWgLzugr i0i51xJyQxG+Cb/WEhSdJvRtqrlWSqz2Vzpkl2sGAddQmD7FL4OqrkHQffBzOHFgLfM6 9J9g== 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:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=Z0Se6ak0YMM45n90MCeFDiliYZ2MX+fvWkgHCLN577o=; b=AbyH6onjK4Dp3gACoNEmiOgmK4X+VuY+I9pRZWKWeTNIY8nNboP55mKbl5SHRC4cK3 XzlpqwIFs3yEGo3MjW4UE1yYPUTvW5Xk4Sb78Bxsu4K/BZDmvrTGdXiWcb6AO1GFmL83 bux1xcZwKsNAPilO27kXDA1e9LTM0ETpuCiXWGUtACjT1/OpC6VA+MwKQEzZiQ91X9mR R3JXbY4gZtPxre9wV3l6hdydxJ+wSLs6VjyhMmgxo6Fs0vOkG4sBzlB82WEgdRmWLgfy dlVOxz280xHl3rCgnSMFjGEebyjXqBd1E6sRwxG9TgQkzVzgFFQkQUjxxm2pUCT+/+Uz wxFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RMnWWKED; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qq25si4330618ejb.173.2020.05.18.17.26.47; Mon, 18 May 2020 17:27:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=RMnWWKED; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727917AbgESAWH (ORCPT + 99 others); Mon, 18 May 2020 20:22:07 -0400 Received: from mail.kernel.org ([198.145.29.99]:46552 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726713AbgESAWG (ORCPT ); Mon, 18 May 2020 20:22:06 -0400 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7D23420715; Tue, 19 May 2020 00:22:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1589847725; bh=g14ia4R/MlJCgjjI1CPZovenYiTPpOxMurU5Q6xAhV8=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=RMnWWKEDEOa7d4MqZSvd+VL2WtFCoUJS3sibERn35zxbVXBG18iqjeodCHyp1j17/ B/8FIlWQOzc89/UVJ6xuIQLbwvuK+9W9Fl975qvNGbHVRJ4QPITXzbIm2nVZp6gOVI g/qGiq1JTy9m+K2qolNQ6u6LvYN83VVqzccxXyZU= Received: by mail-ed1-f44.google.com with SMTP id s19so10102754edt.12; Mon, 18 May 2020 17:22:05 -0700 (PDT) X-Gm-Message-State: AOAM531/6O0Dt8y8+P39/w2NXOlBdpUQ/teTdgfOCZK6xta5t32YjGP5 kXqdDwqmeRmD0e0iqFs++R1v2VmTu3okndNgAQ== X-Received: by 2002:a50:fd0c:: with SMTP id i12mr4299711eds.48.1589847723893; Mon, 18 May 2020 17:22:03 -0700 (PDT) MIME-Version: 1.0 References: <20200518113156.25009-1-matthias.bgg@kernel.org> In-Reply-To: From: Chun-Kuang Hu Date: Tue, 19 May 2020 08:21:50 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 1/4] clk/soc: mediatek: mt8183: Bind clock driver from platform device To: Matthias Brugger Cc: Chun-Kuang Hu , matthias.bgg@kernel.org, Rob Herring , Michael Turquette , Stephen Boyd , Kate Stewart , devicetree@vger.kernel.org, Greg Kroah-Hartman , linux-kernel , "moderated list:ARM/Mediatek SoC support" , Linux ARM , mtk01761 , Thomas Gleixner , linux-clk@vger.kernel.org, Allison Randal , Enric Balletbo i Serra Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Matthias: Matthias Brugger =E6=96=BC 2020=E5=B9=B45=E6=9C=88= 18=E6=97=A5 =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=8811:57=E5=AF=AB=E9=81=93=EF= =BC=9A > > > > On 18/05/2020 17:30, Chun-Kuang Hu wrote: > > Hi, Matthias: > > > > =E6=96=BC 2020=E5=B9=B45=E6=9C=8818=E6=97=A5 = =E9=80=B1=E4=B8=80 =E4=B8=8B=E5=8D=887:32=E5=AF=AB=E9=81=93=EF=BC=9A > >> > >> From: Matthias Brugger > >> > >> The mmsys driver is now the top level entry point for the multimedia > >> system (mmsys), we bind the clock driver by creating a platform device= . > >> We also bind the MediaTek DRM driver which is not yet implement and > >> therefor will errror out for now. > > > > You may need to let CONFIG_MTK_MMSYS depends on > > CONFIG_COMMON_CLK_MT8173_MMSYS || CONFIG_COMMON_CLK_MT8183_MMSYS > > > > That will be fixed by: > https://patchwork.kernel.org/patch/11469521/ > > Otherwise this won't scale as we would need to add the SoCs using the mtk= -mmsys > driver and this will be a lot if not all. I forgot that patch, so for this patch, Reviewed-by: Chun-Kuang Hu > > Regards, > Matthias > > > Regards, > > Chun-Kuang. > > > >> > >> Signed-off-by: Matthias Brugger > >> --- > >> > >> drivers/clk/mediatek/clk-mt8183-mm.c | 9 ++------- > >> drivers/soc/mediatek/mtk-mmsys.c | 8 ++++++++ > >> 2 files changed, 10 insertions(+), 7 deletions(-) > >> > >> diff --git a/drivers/clk/mediatek/clk-mt8183-mm.c b/drivers/clk/mediat= ek/clk-mt8183-mm.c > >> index 720c696b506d..9d60e09619c1 100644 > >> --- a/drivers/clk/mediatek/clk-mt8183-mm.c > >> +++ b/drivers/clk/mediatek/clk-mt8183-mm.c > >> @@ -84,8 +84,9 @@ static const struct mtk_gate mm_clks[] =3D { > >> > >> static int clk_mt8183_mm_probe(struct platform_device *pdev) > >> { > >> + struct device *dev =3D &pdev->dev; > >> + struct device_node *node =3D dev->parent->of_node; > >> struct clk_onecell_data *clk_data; > >> - struct device_node *node =3D pdev->dev.of_node; > >> > >> clk_data =3D mtk_alloc_clk_data(CLK_MM_NR_CLK); > >> > >> @@ -95,16 +96,10 @@ static int clk_mt8183_mm_probe(struct platform_dev= ice *pdev) > >> return of_clk_add_provider(node, of_clk_src_onecell_get, clk_d= ata); > >> } > >> > >> -static const struct of_device_id of_match_clk_mt8183_mm[] =3D { > >> - { .compatible =3D "mediatek,mt8183-mmsys", }, > >> - {} > >> -}; > >> - > >> static struct platform_driver clk_mt8183_mm_drv =3D { > >> .probe =3D clk_mt8183_mm_probe, > >> .driver =3D { > >> .name =3D "clk-mt8183-mm", > >> - .of_match_table =3D of_match_clk_mt8183_mm, > >> }, > >> }; > >> > >> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/m= tk-mmsys.c > >> index cacafe23c823..783c3dd008b2 100644 > >> --- a/drivers/soc/mediatek/mtk-mmsys.c > >> +++ b/drivers/soc/mediatek/mtk-mmsys.c > >> @@ -92,6 +92,10 @@ static const struct mtk_mmsys_driver_data mt8173_mm= sys_driver_data =3D { > >> .clk_driver =3D "clk-mt8173-mm", > >> }; > >> > >> +static const struct mtk_mmsys_driver_data mt8183_mmsys_driver_data = =3D { > >> + .clk_driver =3D "clk-mt8183-mm", > >> +}; > >> + > >> static unsigned int mtk_mmsys_ddp_mout_en(enum mtk_ddp_comp_id cur, > >> enum mtk_ddp_comp_id next, > >> unsigned int *addr) > >> @@ -339,6 +343,10 @@ static const struct of_device_id of_match_mtk_mms= ys[] =3D { > >> .compatible =3D "mediatek,mt8173-mmsys", > >> .data =3D &mt8173_mmsys_driver_data, > >> }, > >> + { > >> + .compatible =3D "mediatek,mt8183-mmsys", > >> + .data =3D &mt8183_mmsys_driver_data, > >> + }, > >> { } > >> }; > >> > >> -- > >> 2.26.2 > >> > >> > >> _______________________________________________ > >> Linux-mediatek mailing list > >> Linux-mediatek@lists.infradead.org > >> http://lists.infradead.org/mailman/listinfo/linux-mediatek