[PATCH V2 Create empty OF root 0/1] XRT Alveo driver infrastructure overview

From: Lizhi Hou
Date: Wed Feb 16 2022 - 00:01:16 EST


Hello,

This patch is to create an empty device tree if there is not one. For the use
case that hardware like Xilinx Alveo PCIe accelerator uses flattened device
tree to describe apertures in its PCIe BARs, a base tree with nodes for the
device needs to be created if there is not one. Then the flattened device tree
overlay from the device can be applied to the base tree. Please refer the
previous discussions with device tree maintainer:
https://lore.kernel.org/lkml/CAL_JsqJfyRymB=VxLuQqLpep+Q1Eie48dobv9sC5OizDz0d2DQ@xxxxxxxxxxxxxx/

This patch is the first step creates empty OF root node if the arch does not
have device tree created. I will post a follow on patch series to add PCIe
interface for the creation of device tree node for a PCIe device. This will
enable a PCIe device driver to apply an overlay under a PCIe device tree node.
Please refer previous discussions with FPGA maintainer:
https://lore.kernel.org/lkml/20220105225013.1567871-1-lizhi.hou@xxxxxxxxxx/

We would like to use this infrastructure to describe and bind platform drivers
for HW IPs in Alveo PCIe accelerator device.

Lizhi Hou (1):
of: create empty of root

drivers/of/Kconfig | 5 ++++
drivers/of/Makefile | 1 +
drivers/of/of_empty_root.c | 51 ++++++++++++++++++++++++++++++++++++++
3 files changed, 57 insertions(+)
create mode 100644 drivers/of/of_empty_root.c

--
2.27.0