Lines Matching +full:pr +full:- +full:decoupler

1 // SPDX-License-Identifier: GPL-2.0-only
7 * Decoupler IP Core.
15 #include <linux/fpga/fpga-bridge.h>
34 writel(val, d->io_base + offset); in xlnx_pr_decoupler_write()
40 return readl(d->io_base + offset); in xlnx_pr_decouple_read()
46 struct xlnx_pr_decoupler_data *priv = bridge->priv; in xlnx_pr_decoupler_enable_set()
48 err = clk_enable(priv->clk); in xlnx_pr_decoupler_enable_set()
57 clk_disable(priv->clk); in xlnx_pr_decoupler_enable_set()
64 const struct xlnx_pr_decoupler_data *priv = bridge->priv; in xlnx_pr_decoupler_enable_show()
68 err = clk_enable(priv->clk); in xlnx_pr_decoupler_enable_show()
74 clk_disable(priv->clk); in xlnx_pr_decoupler_enable_show()
86 .name = "Xilinx PR Decoupler",
94 { .compatible = "xlnx,pr-decoupler-1.00", .data = &decoupler_config },
95 { .compatible = "xlnx,pr-decoupler", .data = &decoupler_config },
96 { .compatible = "xlnx,dfx-axi-shutdown-manager-1.00",
98 { .compatible = "xlnx,dfx-axi-shutdown-manager",
107 struct device_node *np = pdev->dev.of_node; in xlnx_pr_decoupler_probe()
112 priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); in xlnx_pr_decoupler_probe()
114 return -ENOMEM; in xlnx_pr_decoupler_probe()
120 if (match && match->data) in xlnx_pr_decoupler_probe()
121 priv->ipconfig = match->data; in xlnx_pr_decoupler_probe()
124 priv->io_base = devm_platform_ioremap_resource(pdev, 0); in xlnx_pr_decoupler_probe()
125 if (IS_ERR(priv->io_base)) in xlnx_pr_decoupler_probe()
126 return PTR_ERR(priv->io_base); in xlnx_pr_decoupler_probe()
128 priv->clk = devm_clk_get(&pdev->dev, "aclk"); in xlnx_pr_decoupler_probe()
129 if (IS_ERR(priv->clk)) in xlnx_pr_decoupler_probe()
130 return dev_err_probe(&pdev->dev, PTR_ERR(priv->clk), in xlnx_pr_decoupler_probe()
133 err = clk_prepare_enable(priv->clk); in xlnx_pr_decoupler_probe()
135 dev_err(&pdev->dev, "unable to enable clock\n"); in xlnx_pr_decoupler_probe()
139 clk_disable(priv->clk); in xlnx_pr_decoupler_probe()
141 br = fpga_bridge_register(&pdev->dev, priv->ipconfig->name, in xlnx_pr_decoupler_probe()
145 dev_err(&pdev->dev, "unable to register %s", in xlnx_pr_decoupler_probe()
146 priv->ipconfig->name); in xlnx_pr_decoupler_probe()
155 clk_unprepare(priv->clk); in xlnx_pr_decoupler_probe()
163 struct xlnx_pr_decoupler_data *p = bridge->priv; in xlnx_pr_decoupler_remove()
167 clk_unprepare(p->clk); in xlnx_pr_decoupler_remove()
183 MODULE_DESCRIPTION("Xilinx Partial Reconfiguration Decoupler");