Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp2041227pxu; Fri, 9 Oct 2020 06:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx1MD36/QWFs2th13/bBK67D8EjnT4ZD6cEg849y+5ffCgF4aGBi65F438PoTize82YcGMH X-Received: by 2002:a17:906:7010:: with SMTP id n16mr14284975ejj.328.1602250441932; Fri, 09 Oct 2020 06:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602250441; cv=none; d=google.com; s=arc-20160816; b=L/c1efnIj0Hngf9emnwS5W3n96IB6Km+hsEfBCLlNx1qrkS5cTcR8r6MbgiAQxySj7 RDTtNcjE+AU9ZxxKb5t5/YXrNBImv/xK4AtAogjz1AggIClg9IUhO5zIwknORejEuulc lvRPpuDC9fbJwgOLEQZcWQRnXRoONW7R1Z5sSut3A6aQHxM/GO1rZPekoImW2sYC5u2f Yqr2mDb/PvVwHOBMGKRqHugrXZYXLSKNOSj/mxq8YD4Xg5S6JgYuuEKIROgCVhJwkOAk ogRZ7epft2MT/2wJ7Wr4++ONlLOTEtBZHSNsd93sLWHk2k8rypv4wvHUADubH0S2+FpO bXOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=arXJ0tK64lVD474SrsZL15lNj1CHd4/0uMPQBKlDggM=; b=LyycpwpXAAONDz5Qk3ED5WzVmH6LUb0Ca6YlgX1wHCi1X9/PNfY9c388UiDmIQB2UA vpeXauVfY/6v9GZwagS/jKOBiLv62nTHqWzFhzT6ukOK3fDSr1yIsCeVlJxRB61vsd3x 7qaJBM6sMpBKOnlCmWSOPYlxlPIkUJQI0b34oyghbvDdfegb3+Rh6QL3Iz3AgoxR6NWS 5B0gayHZfpfL5klgkydpHXmiQSGlueu0jndpQybkTT4TJHuNf/lycwOv21sP2/GZr4iM jUJReI1OWEjl4oluzv9j1RZv+veWEmlg0IsNcmpF6UvI11IWq/cxLyaao2Jp/ENYGYQW jnTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Tq8ecdMt; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bx4si6072206edb.159.2020.10.09.06.33.37; Fri, 09 Oct 2020 06:34:01 -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=@gmail.com header.s=20161025 header.b=Tq8ecdMt; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733303AbgJIMfA (ORCPT + 99 others); Fri, 9 Oct 2020 08:35:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730878AbgJIMfA (ORCPT ); Fri, 9 Oct 2020 08:35:00 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D20D1C0613D2; Fri, 9 Oct 2020 05:34:59 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id w5so10109833wrp.8; Fri, 09 Oct 2020 05:34:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=arXJ0tK64lVD474SrsZL15lNj1CHd4/0uMPQBKlDggM=; b=Tq8ecdMt/vmkX053Pg++C4Uk9SVuUFiz/TBkJqmMb1jS7pj76ybDA3YzHnxVeWjXQt stdvLakFE4syOiug0U1lzbEhQjmc/Eo2gQ5sSBksTqn4AeJEYsP6KFPYSkimnO2/Ti5J 49KTc6+mqXPkvb6bXYZKx3Z2U/ojMr/zizEVuY8nu44sdywnDxytiL6RUd3vXyQrmhnb HTrRlCuESnPvJE0sLChuLFS2hUUXM09YxctLadYsgkF/ZYyDbHXTQEWTpjQTe/BlfeQX WPIkFjkUJqlEpGP7yKJQnNfMuxqJTBr7RlrVQID5IKWePFF8mwL/+Ag0I6eYZgL8geUe Hubw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=arXJ0tK64lVD474SrsZL15lNj1CHd4/0uMPQBKlDggM=; b=Wv/+G8WN5p9v44BjvQsNU6DiX0/sLnGE7gtoYWVt+9l+z7YwagWB9aL+Aog2eZzjOG 9oOgqBkh9AyBCUpoxHgMrAGLMRdUg6ye9WdG7r3EST/wqq3OIdx6q/lYmrUCHHMxYnlS 2aH3pvQ+Gyb8fkPo5UegU1aqSeyJv3fchTHVW05Fui8qKVyywKl7/EJ3bDx5WEHRZrF2 MTIOsS65nBBPyXHPsdbEsOHw2W3JY+6LBWZNpMeSpQUigWJncPLszXhNamEnKvgbKxT9 SvVOZq0B6k4uqjw/r6nRUkktIcve7UtWmevUwAqtlMP3Bmzff7zD09nXt/2LBPTYM5IN bn6w== X-Gm-Message-State: AOAM532roeoyCTTrqUtE5bXtOoAxq7kSThmS977/G718455AXMBWp7t8 1zaHc6s+mPUTEEb+5SxN1P7d87w5qmhUyg== X-Received: by 2002:adf:a405:: with SMTP id d5mr8547724wra.421.1602246898481; Fri, 09 Oct 2020 05:34:58 -0700 (PDT) Received: from ziggy.stardust ([213.195.119.110]) by smtp.gmail.com with ESMTPSA id 13sm11086386wmk.20.2020.10.09.05.34.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Oct 2020 05:34:57 -0700 (PDT) Subject: Re: [PATCH v7 2/2] soc: mediatek: add mt6779 devapc driver To: Neal Liu Cc: Rob Herring , Chun-Kuang Hu , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, lkml , wsd_upstream@mediatek.com References: <1598497593-15781-1-git-send-email-neal.liu@mediatek.com> <1598497593-15781-3-git-send-email-neal.liu@mediatek.com> <1602124514.28301.17.camel@mtkswgap22> <1602149965.8784.6.camel@mtkswgap22> From: Matthias Brugger Message-ID: <0ece983b-2e55-cf06-aca8-02a014fce090@gmail.com> Date: Fri, 9 Oct 2020 14:34:56 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <1602149965.8784.6.camel@mtkswgap22> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/10/2020 11:39, Neal Liu wrote: > On Thu, 2020-10-08 at 10:45 +0200, Matthias Brugger wrote: >> >> On 08/10/2020 04:35, Neal Liu wrote: >>> On Wed, 2020-10-07 at 12:44 +0200, Matthias Brugger wrote: >>>> >>>> On 27/08/2020 05:06, Neal Liu wrote: [...] >>>>> +static int mtk_devapc_probe(struct platform_device *pdev) >>>>> +{ >>>>> + struct device_node *node = pdev->dev.of_node; >>>>> + struct mtk_devapc_context *ctx; >>>>> + u32 devapc_irq; >>>>> + int ret; >>>>> + >>>>> + if (IS_ERR(node)) >>>>> + return -ENODEV; >>>>> + >>>>> + ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); >>>>> + if (!ctx) >>>>> + return -ENOMEM; >>>>> + >>>>> + ctx->data = of_device_get_match_data(&pdev->dev); >>>>> + ctx->dev = &pdev->dev; >>>>> + >>>>> + ctx->infra_base = of_iomap(node, 0); >>>> >>>> Does this mean the device is part of the infracfg block? >>>> I wasn't able to find any information about it. >>> >>> I'm not sure why you would ask infracfg block. devapc is parts of our >>> SoC infra, it's different with infracfg. >>> >> >> I'm asking because I want to understand the HW better. I'm not able to find any >> information in the datasheets. I want to avoid a situation as we had with the >> MMSYS where a clock driver was submitted first and later on we realized that >> MMSYS is much more then that and we had to work hard to get the driver right. >> >> Now it's happening with SCPSYS, where a driver with the scpsys compatible was >> send years ago. But SCPSYS is much more then the driver submitted. In this case >> we opted to write a new driver, but moving from one driver to another one is >> painfull and full of problems. For that I want to make sure we fully understand >> Device APC (by the way, what does APC stands for?). Is it a totally independent >> HW block or is it part of a subsystem, like for example SCP? >> >> Regards, >> Matthias > > It's a totally independent HW block instead of a subsystem. > I think it's more simple than MMSYS or SCPSYS. But if you would like to > understand more about this HW, we could find another way/channel to > introduce it. > If it's a independent HW block, then we are good. No further information needed by me. I'd just advise to rename the infra_base to something like base, as it made me confuse. Thanks! Matthias