summaryrefslogtreecommitdiff
path: root/drivers/cxl/core.c
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2021-05-14 08:22:00 +0300
committerDan Williams <dan.j.williams@intel.com>2021-05-15 02:13:19 +0300
commit5f653f7590ab7db7379f668b2975744585206b0d (patch)
tree94a35fdd5f2d6c58594d24933b5cfa66523243d4 /drivers/cxl/core.c
parent8ac75dd6ab3039ef0656d777a564ea1b65071971 (diff)
downloadlinux-5f653f7590ab7db7379f668b2975744585206b0d.tar.xz
cxl/core: Rename bus.c to core.c
In preparation for more generic shared functionality across endpoint consumers of core cxl resources, and platform-firmware producers of those resources, rename bus.c to core.c. In addition to the central rendezvous for interleave coordination, the core will also define common routines like CXL register block mapping. Acked-by: Ben Widawsky <ben.widawsky@intel.com> Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Link: https://lore.kernel.org/r/162096972018.1865304.11079951161445408423.stgit@dwillia2-desk3.amr.corp.intel.com Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/cxl/core.c')
-rw-r--r--drivers/cxl/core.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/cxl/core.c b/drivers/cxl/core.c
new file mode 100644
index 000000000000..7f8d2034038a
--- /dev/null
+++ b/drivers/cxl/core.c
@@ -0,0 +1,30 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/* Copyright(c) 2020 Intel Corporation. All rights reserved. */
+#include <linux/device.h>
+#include <linux/module.h>
+
+/**
+ * DOC: cxl core
+ *
+ * The CXL core provides a sysfs hierarchy for control devices and a rendezvous
+ * point for cross-device interleave coordination through cxl ports.
+ */
+
+struct bus_type cxl_bus_type = {
+ .name = "cxl",
+};
+EXPORT_SYMBOL_GPL(cxl_bus_type);
+
+static __init int cxl_core_init(void)
+{
+ return bus_register(&cxl_bus_type);
+}
+
+static void cxl_core_exit(void)
+{
+ bus_unregister(&cxl_bus_type);
+}
+
+module_init(cxl_core_init);
+module_exit(cxl_core_exit);
+MODULE_LICENSE("GPL v2");