bus/platform: add platform bus
RFC PATCH 1/1 bus/platform: add platform bus
Platform bus is a software bus under Linux that manages devices which generally do not have built-in discovery mechanisms. Linux normally learns about platform devices directly from device-tree during boot-up phase.
Up to this point, whenever some userspace app needed control over platform device or a range of thereof some sort of driver being a mixture of vdev/rawdev was required.
In order to simplify this task, provide an auto-probe experience and separate bus logic from the driver itself, add platform bus support.
Signed-off-by Tomasz Duszynski <[email protected]>
--- drivers/bus/meson.build | 1 + drivers/bus/platform/meson.build | 17 + drivers/bus/platform/platform.c | 394 ++++++++++++++++++++++++ drivers/bus/platform/platform_params.c | 70 +++++ drivers/bus/platform/private.h | 47 +++ drivers/bus/platform/rte_bus_platform.h | 165 ++++++++++ drivers/bus/platform/version.map | 10 + 7 files changed, 704 insertions(+) create mode 100644 drivers/bus/platform/meson.build create mode 100644 drivers/bus/platform/platform.c create mode 100644 drivers/bus/platform/platform_params.c create mode 100644 drivers/bus/platform/private.h create mode 100644 drivers/bus/platform/rte_bus_platform.h create mode 100644 drivers/bus/platform/version.map
drivers/bus/meson.build +1 -0
@@ -7,6 +7,7 @@ drivers = [ 'fslmc', 'ifpga', 'pci', + 'platform', 'vdev', 'vmbus', ]
drivers/bus/platform/meson.build new file +17 -0
@@ -0,0 +1,17 @@ +# SPDX-License-Identifier: BSD-3-Clause +# Copyright(C) 2023 Marvell. +# + +if not is_linux + build = false + reason = 'only supported on Linux' +endif + +deps += ['kvargs'] +sources = files( + 'platform_params.c', + 'platform.c', +) +headers = files( + 'rte_bus_platform.h', +)
drivers/bus/platform/platform.c new file +394 -0
394 lines not on this page · raw message
drivers/bus/platform/platform_params.c new file +70 -0
70 lines not on this page · raw message
drivers/bus/platform/private.h new file +47 -0
47 lines not on this page · raw message
drivers/bus/platform/rte_bus_platform.h new file +165 -0
165 lines not on this page · raw message
drivers/bus/platform/version.map new file +10 -0
@@ -0,0 +1,10 @@ +DPDK_23 { + local: *; +}; + +EXPERIMENTAL { + global: + + rte_platform_register; + rte_platform_unregister; +};
--
2.25.1