Thread (42 messages) 42 messages, 6 authors, 2020-08-07

Re: [PATCH 01/21] dt-binding: memory: mediatek: Add a common larb-port header file

From: Pi-Hsun Shih <hidden>
Date: 2020-07-13 05:44:21
Also in: linux-devicetree, linux-iommu, linux-mediatek, lkml

On Mon, Jul 13, 2020 at 2:06 AM Matthias Brugger [off-list ref] wrote:


On 11/07/2020 08:48, Yong Wu wrote:
quoted
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 <yong.wu@mediatek.com>
---
  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 <yong.wu@mediatek.com>
+ */
+#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?


quoted
+
+#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
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help