Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

firmware: xilinx: instantiate xilinx event manager driver

Register simple platform device to instantiate Xilinx event
manager driver.

Acked-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Rajan Vaja <rajan.vaja@xilinx.com>
Signed-off-by: Abhyuday Godhasara <abhyuday.godhasara@xilinx.com>
Link: https://lore.kernel.org/r/20211129070216.30253-3-abhyuday.godhasara@xilinx.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Abhyuday Godhasara and committed by
Greg Kroah-Hartman
a515814e c7fdb240

+14
+14
drivers/firmware/xilinx/zynqmp.c
··· 23 23 #include <linux/hashtable.h> 24 24 25 25 #include <linux/firmware/xlnx-zynqmp.h> 26 + #include <linux/firmware/xlnx-event-manager.h> 26 27 #include "zynqmp-debug.h" 27 28 28 29 /* Max HashMap Order for PM API feature check (1<<7 = 128) */ ··· 38 37 39 38 static bool feature_check_enabled; 40 39 static DEFINE_HASHTABLE(pm_api_features_map, PM_API_FEATURE_CHECK_MAX_ORDER); 40 + 41 + static struct platform_device *em_dev; 41 42 42 43 /** 43 44 * struct pm_api_feature_data - PM API Feature data ··· 1495 1492 1496 1493 zynqmp_pm_api_debugfs_init(); 1497 1494 1495 + np = of_find_compatible_node(NULL, NULL, "xlnx,versal"); 1496 + if (np) { 1497 + em_dev = platform_device_register_data(&pdev->dev, "xlnx_event_manager", 1498 + -1, NULL, 0); 1499 + if (IS_ERR(em_dev)) 1500 + dev_err_probe(&pdev->dev, PTR_ERR(em_dev), "EM register fail with error\n"); 1501 + } 1502 + of_node_put(np); 1503 + 1498 1504 return of_platform_populate(dev->of_node, NULL, NULL, dev); 1499 1505 } 1500 1506 ··· 1520 1508 hash_del(&feature_data->hentry); 1521 1509 kfree(feature_data); 1522 1510 } 1511 + 1512 + platform_device_unregister(em_dev); 1523 1513 1524 1514 return 0; 1525 1515 }