Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp492408ybh; Tue, 10 Mar 2020 02:42:10 -0700 (PDT) X-Google-Smtp-Source: ADFU+vsAw5NPMnrWKOSwdAWkXoJG/ccBUW9+mWzdDjLZ94d+PMQr7eOA0Bu5IQdUeixfhDOpvWgk X-Received: by 2002:aca:ea54:: with SMTP id i81mr467267oih.90.1583833330113; Tue, 10 Mar 2020 02:42:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1583833330; cv=none; d=google.com; s=arc-20160816; b=BxZP1+llsnYy4+XHnhJRuDYMvnMa3lUchy07zZ87B0g41eQLErc0KM+yUWZ54jKaxy Z90wr32QBfVgZDEc2UD1c36qeGpcvS6pW97yAX/t+xQeHRh4U0A7yTm+Wx9yOCMz4oQM 4uKZge7HkvkGFjTu2B6O6xrwsRe8sLOUlorC3AkRBlVyjO1wINc3aKuhTETw0h+A9KMM ZpOcWdafc5D5vsV3LC4iLGcEx8x9Lz4GR07XNndSrzZZn42g19B1FuHI9C5Xx6Li6ZFZ grXLZcVXrwleUbSKqQOqJmHySTPbwu8ZMd2/K9EwE9o8DlxqLjB4IZn0k60UXdSpbb3a XWsw== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:autocrypt:from:references:cc:to:subject; bh=SxU1cYLPv64g7ONttvYMIlcD2Gqc2z4ceXlHSHV1Uc4=; b=0ZCRd79nrGJe46yPDrVQZA9216cPXV28pTrga03S7bWXKowOfxFwP0+urMHfeUxZLe ia4xBWMQr9M70+/BQf/VUSsvV6S44DkzJvcxVaXf4w3UT5P5PhPeL63mKXGhaGtozecs xiLQyxHRENMnyOccH4YrzvONAKyYRjr4P6tvwOvHTndezXv2U9eeVMuA+GtUX+3i8Z3/ vBISCAivydoq8a/upEseOblKi6Op2iCHmS/d3XDPPTI+GnaPLXT8sUH9VMl2RXiW6XQs 9LuTq8+VOslWc78TW5JsUW5rYgul5lCp6yJlW3P57iqJ3yMftnyiGjPPVX3Y7NlIMOoV 8qbA== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 71si8331093otm.111.2020.03.10.02.41.56; Tue, 10 Mar 2020 02:42:10 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726390AbgCJJkY (ORCPT + 99 others); Tue, 10 Mar 2020 05:40:24 -0400 Received: from mx2.suse.de ([195.135.220.15]:53344 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726195AbgCJJkX (ORCPT ); Tue, 10 Mar 2020 05:40:23 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 0A6ACAC37; Tue, 10 Mar 2020 09:40:19 +0000 (UTC) Subject: Re: [PATCH v11 3/5] soc: mediatek: Move mt8173 MMSYS to platform driver To: Stephen Boyd , Enric Balletbo Serra Cc: Enric Balletbo i Serra , David Airlie , CK HU , Laurent Pinchart , Mark Rutland , Michael Turquette , Philipp Zabel , Rob Herring , ulrich.hecht+renesas@gmail.com, Kate Stewart , Andrew-CT Chen , Minghsiu Tsai , dri-devel , Richard Fontana , Collabora Kernel ML , linux-clk@vger.kernel.org, Weiyi Lu , Chen-Yu Tsai , Linux ARM , mtk01761 , linux-media@vger.kernel.org, "devicetree@vger.kernel.org" , frank-w@public-files.de, Seiya Wang , sean.wang@mediatek.com, Houlong Wei <"houlong.w ei"@mediatek.com>, ARM/Mediatek SoC support , Hsin-Yi Wang , Matthias Brugger , Thomas Gleixner , Mauro Carvalho Chehab , Allison Randal , Greg Kroah-Hartman , Randy Dunlap , linux-kernel , fwll.ch@freedesktop.org, matthias.bgg@kernel.org References: <20200302110128.2664251-1-enric.balletbo@collabora.com> <20200302110128.2664251-4-enric.balletbo@collabora.com> <158344207340.7173.8369925839829696256@swboyd.mtv.corp.google.com> <8bfc4350-6e92-e657-18f2-3624a2558521@collabora.com> <158353062701.66766.10488072352849985568@swboyd.mtv.corp.google.com> <158379424337.149997.7454036134629466675@swboyd.mtv.corp.google.com> From: Matthias Brugger Autocrypt: addr=mbrugger@suse.com; prefer-encrypt=mutual; keydata= mQINBFP1zgUBEAC21D6hk7//0kOmsUrE3eZ55kjc9DmFPKIz6l4NggqwQjBNRHIMh04BbCMY fL3eT7ZsYV5nur7zctmJ+vbszoOASXUpfq8M+S5hU2w7sBaVk5rpH9yW8CUWz2+ZpQXPJcFa OhLZuSKB1F5JcvLbETRjNzNU7B3TdS2+zkgQQdEyt7Ij2HXGLJ2w+yG2GuR9/iyCJRf10Okq gTh//XESJZ8S6KlOWbLXRE+yfkKDXQx2Jr1XuVvM3zPqH5FMg8reRVFsQ+vI0b+OlyekT/Xe 0Hwvqkev95GG6x7yseJwI+2ydDH6M5O7fPKFW5mzAdDE2g/K9B4e2tYK6/rA7Fq4cqiAw1+u EgO44+eFgv082xtBez5WNkGn18vtw0LW3ESmKh19u6kEGoi0WZwslCNaGFrS4M7OH+aOJeqK fx5dIv2CEbxc6xnHY7dwkcHikTA4QdbdFeUSuj4YhIZ+0QlDVtS1QEXyvZbZky7ur9rHkZvP ZqlUsLJ2nOqsmahMTIQ8Mgx9SLEShWqD4kOF4zNfPJsgEMB49KbS2o9jxbGB+JKupjNddfxZ HlH1KF8QwC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lto//i44ziQUK9diAgfE/8GhXP0JlMwRUBlXNtErJgItR/XAuFwfO6BOI43P19 YwEsuyQq+rubW2WvrWY2Bj2dXDAKUxS4TuLUf2v/b9Rct36ljzbNxeEWt+Yq4IOY6QHnE+w4 xVAkfwjT+Vup8sCp+zFJv9fVUpo/bjePOL4PMP1y+PYrp4PmPmRwoklBpy1ep8m8XURv46fG UHUEIsTwPWs2Q87k7vjYyrcyAOarX2X5pvMQvpAMADGf2Z3wrCsDdG25w2HztweUNd9QEprt JG8GNNzMOD4cQ82Ta7eGvPWPeXauWJDLVR9jHtWT9Ot3BQgmApLxACvwvD1a69jaFKov28SP HxUCQ9Y1Y/Ct Message-ID: <21b43196-230c-5000-546e-b90d4b6b44a3@suse.com> Date: Tue, 10 Mar 2020 10:40:16 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 In-Reply-To: <158379424337.149997.7454036134629466675@swboyd.mtv.corp.google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/03/2020 23:50, Stephen Boyd wrote: > Quoting Enric Balletbo Serra (2020-03-06 14:09:50) >> Missatge de Stephen Boyd del dia dv., 6 de mar >> 2020 a les 22:37: >>> >>> Quoting Enric Balletbo i Serra (2020-03-06 08:30:16) >>>> On 5/3/20 22:01, Stephen Boyd wrote: >>>>> Quoting Enric Balletbo i Serra (2020-03-02 03:01:26) >>>>>> diff --git a/drivers/soc/mediatek/mtk-mmsys.c b/drivers/soc/mediatek/mtk-mmsys.c >>>>>> new file mode 100644 >>>>>> index 000000000000..473cdf732fb5 >>>>>> --- /dev/null >>>>>> +++ b/drivers/soc/mediatek/mtk-mmsys.c >>>>>> @@ -0,0 +1,154 @@ >>>>>> +// SPDX-License-Identifier: GPL-2.0-only >>>>>> +/* >>>>>> + * Copyright (c) 2014 MediaTek Inc. >>>>>> + * Author: James Liao >>>>>> + */ >>>>>> + >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> + >>>>>> +#include "../../clk/mediatek/clk-gate.h" >>>>>> +#include "../../clk/mediatek/clk-mtk.h" >>>>> >>>>> Why not use include/linux/clk/? >>>>> >>>> >>>> I can move these files to include, this will impact a lot more of drivers but, >>>> yes, I think is the right way. >>>> >>>>> But I also don't understand why the clk driver is moved outside of >>>>> drivers/clk/ into drivers/soc/. Commit text saying that it has shared >>>>> registers doesn't mean it can't still keep the clk driver part in the >>>>> drivers/clk/ area. >>>>> >>>> >>>> Actually moving this to the soc directory has been requested by CK (mediatek) as >>>> a change in v8. You can see the discussion in [1] >>>> >>> >>> I can reply there in that thread if necessary, but we shouldn't need to >>> force simple-mfd into DT bindings to support this. Match the compatible >>> string in drivers/soc/ and register devices in software for the >>> different pieces of this overall hardware block. If necessary, pass down >>> the ioremapped addresss down through device data to each logical driver >>> in the respective subsystem. >>> >>> So yes, it looks like an MFD, but that doesn't mean we have to change >>> the DT binding or put it in drivers/mfd to support that. And we don't >>> have to fix any problems with allowing two drivers to probe the same >>> compatible string. >>> >> >> That thread maybe has too much information and things evolved since >> then. Note that the final solution is not an MFD neither we change the >> bindings. I pointed to that thread just because CK (CK please correct >> me if I'm wrong) thought that the driver is not a pure clock driver >> and he preferred to move to drivers/soc/mediatek (in that thread, he >> exposes his opinion on that). Sorry to introduce more confusion. >> >> You seem to be fine with the approach (just minor changes), so it >> looks to me that the only problem is if this should be in drivers/clk >> or drivers/soc. Honestly, this is not something I can't decide and >> I'll let you (the soc and clk maintainers) decide. I don't really have >> a strong opinion here. I don't mind move again to drivers/clk if that >> is what we want but let's come to an agreement. >> > > It's already in drivers/clk, so leave the clk part there and register > the clk device and any other devices by matching the compatible in > drivers/soc. That is my preferred solution. Can that be done? > I think we can once again create a platform device in drivers/soc which matches the drivers/clk and then do the routing in drivers/soc. Enric any thoughts?