Lines Matching +full:zynqmp +full:- +full:firmware

1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2014-2019 Xilinx, Inc.
18 #include <linux/firmware/xlnx-zynqmp.h>
19 #include <linux/mailbox/zynqmp-ipi-message.h>
22 * struct zynqmp_pm_work_struct - Wrapper for struct work_struct
44 [PM_SUSPEND_MODE_POWER_OFF] = "power-off",
90 memcpy(payload, msg->data, sizeof(msg->len)); in ipi_receive_callback()
93 if (work_pending(&zynqmp_pm_init_suspend_work->callback_work)) in ipi_receive_callback()
97 memcpy(zynqmp_pm_init_suspend_work->args, &payload[1], in ipi_receive_callback()
98 sizeof(zynqmp_pm_init_suspend_work->args)); in ipi_receive_callback()
101 &zynqmp_pm_init_suspend_work->callback_work); in ipi_receive_callback()
111 * zynqmp_pm_init_suspend_work_fn - Initialize suspend
114 * Bottom-half of PM callback IRQ handler.
121 if (pm_work->args[0] == SUSPEND_SYSTEM_SHUTDOWN) { in zynqmp_pm_init_suspend_work_fn()
123 } else if (pm_work->args[0] == SUSPEND_POWER_REQUEST) { in zynqmp_pm_init_suspend_work_fn()
127 __func__, pm_work->args[0]); in zynqmp_pm_init_suspend_work_fn()
147 *(s - 1) = '\n'; in suspend_mode_show()
148 return (s - buf); in suspend_mode_show()
155 int md, ret = -EINVAL; in suspend_mode_store()
186 return -ENODEV; in zynqmp_pm_probe()
188 if (of_find_property(pdev->dev.of_node, "mboxes", NULL)) { in zynqmp_pm_probe()
190 devm_kzalloc(&pdev->dev, in zynqmp_pm_probe()
194 return -ENOMEM; in zynqmp_pm_probe()
196 INIT_WORK(&zynqmp_pm_init_suspend_work->callback_work, in zynqmp_pm_probe()
198 client = devm_kzalloc(&pdev->dev, sizeof(*client), GFP_KERNEL); in zynqmp_pm_probe()
200 return -ENOMEM; in zynqmp_pm_probe()
202 client->dev = &pdev->dev; in zynqmp_pm_probe()
203 client->rx_callback = ipi_receive_callback; in zynqmp_pm_probe()
207 dev_err(&pdev->dev, "Failed to request rx channel\n"); in zynqmp_pm_probe()
210 } else if (of_find_property(pdev->dev.of_node, "interrupts", NULL)) { in zynqmp_pm_probe()
213 return -ENXIO; in zynqmp_pm_probe()
215 ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, in zynqmp_pm_probe()
218 dev_name(&pdev->dev), in zynqmp_pm_probe()
219 &pdev->dev); in zynqmp_pm_probe()
221 dev_err(&pdev->dev, "devm_request_threaded_irq '%d' " in zynqmp_pm_probe()
226 dev_err(&pdev->dev, "Required property not found in DT node\n"); in zynqmp_pm_probe()
227 return -ENOENT; in zynqmp_pm_probe()
230 ret = sysfs_create_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr); in zynqmp_pm_probe()
232 dev_err(&pdev->dev, "unable to create sysfs interface\n"); in zynqmp_pm_probe()
241 sysfs_remove_file(&pdev->dev.kobj, &dev_attr_suspend_mode.attr); in zynqmp_pm_remove()
250 { .compatible = "xlnx,zynqmp-power", },