Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp2996438ybl; Mon, 19 Aug 2019 10:27:50 -0700 (PDT) X-Google-Smtp-Source: APXvYqyy39CiM+bFmX4u+U5T/zVOhDvItPhxbjH1VNTbJ98ef5aTh322kIll65EB8LyoztbxxJFJ X-Received: by 2002:a62:80cb:: with SMTP id j194mr25991412pfd.183.1566235670523; Mon, 19 Aug 2019 10:27:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566235670; cv=none; d=google.com; s=arc-20160816; b=Xz2kxHwt84xee68xofKMEKzyuUSu5YvI6igKsDB0FDvZYioxCgkbvBed9FqAiJxisT oniRzWWLEOQYsZEGJCmuHTQ/EKq+TPK994jjSngSFqt7Pr2Tc+/fhr2O1H6nGX+4EHf/ euq/i9qZiz6jGTbqhOoi6maWl6x0WhIBqpZbeJ1SyA0Q1kFidpDkQ7BUE9pF3BUFYWx2 0e08qHBbhCg/aFz8fY3LQynFolpTO1CfgTLK/C6vlF1lCnWiB6vUzAhErODy4SDY1qz7 pXAF/TG3/iLEEw/QUYaeqFSHoXyY+pf9mRMVtRVs39OTcnsHRXiK3Z3L64kEA3ZZm1Wg CwSw== 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:date:cc:to:from:subject:message-id; bh=jMsfQN+jBpLjX6SZzyFpPkGP/K65ibnp/A9KGrwqiSo=; b=faSxk0tkwy8J2DlHSXGeKWzH3/bEbz210dA0C3epBBjYJGB4/lQMkwgQxJkAX0+GST YvKEaRK5oYQQ0yqayQ9LAFdtGLOd2LHYikM1KTQlUpxUpwm/4OfzVoNb/g5uouuxsHBf Qeh0N1BxI2kn65awKqH7S56fgRH9beHoEhwnECj6KFzkGXjO8mVsnHw6jcCZeh3yxPZn +2lwKqoTeFTdvPp/L9U4IXbAatMvYn8kbilkGKyz7evZlZHnaJYO2F1j3icl463xyIXi wTlCqRXSOHR8LGX5ZMU+g/MNl3AhWeildLU7CQt8mjX9TpGwFZW7qYtWVN1+g95Cnm8+ Ys9A== 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=mediatek.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w3si10265358plp.182.2019.08.19.10.27.35; Mon, 19 Aug 2019 10:27:50 -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=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727925AbfHSRZG (ORCPT + 99 others); Mon, 19 Aug 2019 13:25:06 -0400 Received: from mailgw02.mediatek.com ([1.203.163.81]:2633 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727524AbfHSRZF (ORCPT ); Mon, 19 Aug 2019 13:25:05 -0400 X-UUID: f1b610a2e0bc412f9c946eff53863dbb-20190820 X-UUID: f1b610a2e0bc412f9c946eff53863dbb-20190820 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw02.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1131272664; Tue, 20 Aug 2019 01:24:51 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS31DR.mediatek.inc (172.27.6.102) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Tue, 20 Aug 2019 01:24:39 +0800 Received: from [10.17.3.153] (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Tue, 20 Aug 2019 01:24:38 +0800 Message-ID: <1566235480.24117.13.camel@mhfsdcap03> Subject: Re: [PATCH v12 11/12] soc: mediatek: cmdq: add cmdq_dev_get_client_reg function From: houlong wei To: Bibby Hsieh CC: Jassi Brar , Matthias Brugger , Rob Herring , CK Hu =?UTF-8?Q?=28=E8=83=A1=E4=BF=8A=E5=85=89=29?= , "Daniel Kurtz" , Sascha Hauer , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-mediatek@lists.infradead.org" , srv_heupstream , Sascha Hauer , Philipp Zabel , "Nicolas Boichat" , YT Shen =?UTF-8?Q?=28=E6=B2=88=E5=B2=B3=E9=9C=86=29?= , Daoyuan Huang =?UTF-8?Q?=28=E9=BB=83=E9=81=93=E5=8E=9F=29?= , Jiaguang Zhang =?UTF-8?Q?=28=E5=BC=A0=E5=8A=A0=E5=B9=BF=29?= , Dennis-YC Hsieh =?UTF-8?Q?=28=E8=AC=9D=E5=AE=87=E5=93=B2=29?= , Ginny Chen =?UTF-8?Q?=28=E9=99=B3=E6=B2=BB=E5=82=91=29?= , Date: Tue, 20 Aug 2019 01:24:40 +0800 In-Reply-To: <20190819025359.11381-12-bibby.hsieh@mediatek.com> References: <20190819025359.11381-1-bibby.hsieh@mediatek.com> <20190819025359.11381-12-bibby.hsieh@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-SNTS-SMTP: 5172E3F03F0FDA5D1EE4963F131F68BC41EF5B5A656F52E8E658C6FC655C1B422000:8 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2019-08-19 at 10:53 +0800, Bibby Hsieh wrote: > GCE cannot know the register base address, this function > can help cmdq client to get the cmdq_client_reg structure. > > Signed-off-by: Bibby Hsieh > --- > drivers/soc/mediatek/mtk-cmdq-helper.c | 29 ++++++++++++++++++++++++++ > include/linux/soc/mediatek/mtk-cmdq.h | 21 +++++++++++++++++++ > 2 files changed, 50 insertions(+) > [...] > > +/** > + * cmdq_dev_get_client_reg() - parse cmdq client reg from the device > + * node of CMDQ client > + * @dev: device of CMDQ mailbox clienti 'clienti' looks like a typo, 'client'? > + * @client_reg: CMDQ client reg pointer > + * @idx: the index of desired reg > + * > + * Return: 0 for success; else the error code is returned > + * > + * Help CMDQ client pasing the cmdq client reg 'pasing' looks like a typo, 'parsing'? > + * from the device node of CMDQ client. > + */ > +int cmdq_dev_get_client_reg(struct device *dev, > + struct cmdq_client_reg *client_reg, int idx); > + > /** > * cmdq_mbox_create() - create CMDQ mailbox client and channel > * @dev: device of CMDQ mailbox client