Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp733844ybh; Sun, 12 Jul 2020 22:44:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfTK5e8CuCUc9rlBT9FCUuExeFDDFXIrW0+TdpLkVR+7UnH2b3FaK/XjtcjJzFY1nYAZMR X-Received: by 2002:a17:906:d963:: with SMTP id rp3mr49610020ejb.54.1594619092142; Sun, 12 Jul 2020 22:44:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594619092; cv=none; d=google.com; s=arc-20160816; b=OGYuvsHrZOaw7NvbjZa298AA7mgbsld3bfJUR+KEGSMUq+C2SLrRrNcFdubNGyUO2L DfvJycTTubS4NyvlTL7AAiif01mRh7FufSYg2UPBNU0Xi7NhgngJ4dbl9qY6woTiBK3s pZ5THmQWybXN2J4IHjKKiFyxFNgU4mqUX5ZeHeUgqVE8TxRGnyT3OMZ2YMGHmJp7KNZk Ey37B4Y3N//8dCV+t9+UmvZoOY/aF5mXSqZDMicR7xMAJ3D98+gz91LEMO75tUT2/o54 79G+YfyoJr8mI/fSWtdLdi0R1dymi2vBglMTxnEv2pa2n/smxDU0sMUsM3Py3lEDq2UB CkIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Rp7+bh2mU6TpEEtWpOr+87rCm6MPnrvLOWdtUzMHKQ8=; b=wzLf6sozGPT5hwPQjKCQ4XT199uBumx5wAxjGkzPvdCU7Ko2F9PkV4OPd5ugaKC47k Ysx6H+DcHX47VcHKtLPYMHzy73QusL9oaK4ce+rDpD3O9pNzFzs9jL7Np8yiIIJUyFao jhbZoIGdmAWMoQJJvI2TNAdP+Vgkr7+McJQted7G5WJSgOlfKAzOYrCl1iGo1YA2G0JW YmhODLbut0cBBXuoAMef8Z+NdJbgLSfmuibnJHyCl2IwDXIbi34vU2TqeKzgEe5BwEvR C4NqmKNQRvAPgx06Qm59j1Qgcm2MoYoWVBm+Spw3MC9BuS+F8WW6nTepFiEof4IAllYL KtrQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CRSdQDBt; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q24si8172717edw.193.2020.07.12.22.44.29; Sun, 12 Jul 2020 22:44:52 -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=@chromium.org header.s=google header.b=CRSdQDBt; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbgGMFoU (ORCPT + 99 others); Mon, 13 Jul 2020 01:44:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725804AbgGMFoT (ORCPT ); Mon, 13 Jul 2020 01:44:19 -0400 Received: from mail-ej1-x642.google.com (mail-ej1-x642.google.com [IPv6:2a00:1450:4864:20::642]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 874B5C08C5DB for ; Sun, 12 Jul 2020 22:44:19 -0700 (PDT) Received: by mail-ej1-x642.google.com with SMTP id dp18so14658118ejc.8 for ; Sun, 12 Jul 2020 22:44:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Rp7+bh2mU6TpEEtWpOr+87rCm6MPnrvLOWdtUzMHKQ8=; b=CRSdQDBtxmD9eFlVT0K5jcruX9Eb95imbaOtpnYb7gl8aEBpXbsxoBVC4abKx/J+Ld DFDhaOOfCqUgceSh2DeJvNwSBdWGz4Enfbn7+tsEQatlol7t82YFPryAObOhHvlVQ1A+ fkQzDtU1fT+c4rqwAN9nfZyl6z1t9Vi91nFGc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Rp7+bh2mU6TpEEtWpOr+87rCm6MPnrvLOWdtUzMHKQ8=; b=Svo9Bopofbk+wVN+F/gS7ZaKRr+cFQpu17fF2jjwf4uHvW855XTZjojPxobbFyJ0Ms bAaPXF+BtmFlW14YZC48LzJ77a3L37BC9qJTipapWB5MCdF3Yzhx+4FNhGSOwVpqJS6c tfnWRXlMMKkbngr+SY6+oBnbzojdXgvqx6ad4GHCkVtWL4p+BIjg6mqRSGqrMhviD5sC jWKjOub9871GHuQUF7vIjoi36kW3uDlaXXEXoSKAF2rovEkasQTf2tQ+niCS/FdcljqB 2CP9afjf5Nx1fPEJRrT+ne2mUzOVBuT7duGRTxc1LuG5qL0EMODR3udqQ4SQV6Me8gU0 vo4g== X-Gm-Message-State: AOAM533L+LKNMYzw85geY5LauuofSAfqxQYoO5no/ugwxw8NnEmHQbtR 2fin3lfRrSZs2Me7vTsWWO31WNPA6kRzPU7gEWdPUQ== X-Received: by 2002:a17:906:b45:: with SMTP id v5mr69591620ejg.464.1594619058124; Sun, 12 Jul 2020 22:44:18 -0700 (PDT) MIME-Version: 1.0 References: <20200711064846.16007-1-yong.wu@mediatek.com> <20200711064846.16007-2-yong.wu@mediatek.com> <9e21288c-07da-88b0-2dbb-bd9a2a4d529b@gmail.com> In-Reply-To: <9e21288c-07da-88b0-2dbb-bd9a2a4d529b@gmail.com> From: Pi-Hsun Shih Date: Mon, 13 Jul 2020 13:43:42 +0800 Message-ID: Subject: Re: [PATCH 01/21] dt-binding: memory: mediatek: Add a common larb-port header file To: Matthias Brugger Cc: Yong Wu , Joerg Roedel , Rob Herring , Robin Murphy , Will Deacon , Evan Green , Tomasz Figa , "moderated list:ARM/Mediatek SoC support" , srv_heupstream@mediatek.com, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , open list , "moderated list:ARM/Mediatek SoC support" , iommu@lists.linux-foundation.org, =?UTF-8?B?WW91bGluIFBlaSAo6KO05Y+L5p6XKQ==?= , Nicolas Boichat , anan.sun@mediatek.com, cui.zhang@mediatek.com, chao.hao@mediatek.com, ming-fan.chen@mediatek.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 13, 2020 at 2:06 AM Matthias Brugger wrote: > > > > On 11/07/2020 08:48, Yong Wu wrote: > > Put all the macros about smi larb/port togethers, this is a preparing > > patch for extending LARB_NR and adding new dom-id support. > > > > Signed-off-by: Yong Wu > > --- > > include/dt-bindings/memory/mt2712-larb-port.h | 2 +- > > include/dt-bindings/memory/mt6779-larb-port.h | 2 +- > > include/dt-bindings/memory/mt8173-larb-port.h | 2 +- > > include/dt-bindings/memory/mt8183-larb-port.h | 2 +- > > include/dt-bindings/memory/mtk-smi-larb-port.h | 15 +++++++++++++++ > > 5 files changed, 19 insertions(+), 4 deletions(-) > > create mode 100644 include/dt-bindings/memory/mtk-smi-larb-port.h > > > > ... > > diff --git a/include/dt-bindings/memory/mtk-smi-larb-port.h b/include/dt-bindings/memory/mtk-smi-larb-port.h > > new file mode 100644 > > index 000000000000..2ec7fe5ce4e9 > > --- /dev/null > > +++ b/include/dt-bindings/memory/mtk-smi-larb-port.h > > @@ -0,0 +1,15 @@ > > +/* SPDX-License-Identifier: GPL-2.0-only */ > > +/* > > + * Copyright (c) 2020 MediaTek Inc. > > + * Author: Yong Wu > > + */ > > +#ifndef __DTS_MTK_IOMMU_PORT_H_ > > +#define __DTS_MTK_IOMMU_PORT_H_ > > + > > +#define MTK_LARB_NR_MAX 16 > > include/soc/mediatek/smi.h has the very same define. > Should smi.h include this file? > > Regards, > Matthias > Looks like this is being addressed in patch 5 in this series ([05/21] iommu/mediatek: Use the common mtk-smi-larb-port.h) That said, should that patch be merged into this one? > > + > > +#define MTK_M4U_ID(larb, port) (((larb) << 5) | (port)) > > +#define MTK_M4U_TO_LARB(id) (((id) >> 5) & 0xf) > > +#define MTK_M4U_TO_PORT(id) ((id) & 0x1f) > > + > > +#endif > >