Lines Matching +full:pru +full:- +full:icss

1 // SPDX-License-Identifier: GPL-2.0-only
3 * PRU-ICSS platform driver for various TI SoCs
5 * Copyright (C) 2014-2020 Texas Instruments Incorporated - http://www.ti.com/
7 * Suman Anna <s-anna@ti.com>
11 #include <linux/clk-provider.h>
12 #include <linux/dma-mapping.h>
24 * struct pruss_private_data - PRUSS driver private data
45 struct device *dev = pruss->dev; in pruss_clk_mux_setup()
57 return -ENODEV; in pruss_clk_mux_setup()
62 dev_err(dev, "mux-clock %pOF must have parents\n", clk_mux_np); in pruss_clk_mux_setup()
63 ret = -EINVAL; in pruss_clk_mux_setup()
70 ret = -ENOMEM; in pruss_clk_mux_setup()
79 ret = -ENOMEM; in pruss_clk_mux_setup()
87 reg = pruss->cfg_base + reg_offset; in pruss_clk_mux_setup()
125 struct device *dev = pruss->dev; in pruss_clk_init()
130 return -ENODEV; in pruss_clk_init()
135 return -ENODEV; in pruss_clk_init()
138 if (data && data->has_core_mux_clock) { in pruss_clk_init()
139 ret = pruss_clk_mux_setup(pruss, pruss->core_clk_mux, in pruss_clk_init()
140 "coreclk-mux", clks_np); in pruss_clk_init()
142 dev_err(dev, "failed to setup coreclk-mux\n"); in pruss_clk_init()
147 ret = pruss_clk_mux_setup(pruss, pruss->iep_clk_mux, "iepclk-mux", in pruss_clk_init()
150 dev_err(dev, "failed to setup iepclk-mux\n"); in pruss_clk_init()
168 struct device *dev = &pdev->dev; in pruss_probe()
177 data = of_device_get_match_data(&pdev->dev); in pruss_probe()
180 return -ENODEV; in pruss_probe()
191 return -ENOMEM; in pruss_probe()
193 pruss->dev = dev; in pruss_probe()
198 return -ENODEV; in pruss_probe()
206 if (data && data->has_no_sharedram && i == PRUSS_MEM_SHRD_RAM2) in pruss_probe()
209 index = of_property_match_string(child, "reg-names", in pruss_probe()
218 return -EINVAL; in pruss_probe()
221 pruss->mem_regions[i].va = devm_ioremap(dev, res.start, in pruss_probe()
223 if (!pruss->mem_regions[i].va) { in pruss_probe()
227 return -ENOMEM; in pruss_probe()
229 pruss->mem_regions[i].pa = res.start; in pruss_probe()
230 pruss->mem_regions[i].size = resource_size(&res); in pruss_probe()
233 mem_names[i], &pruss->mem_regions[i].pa, in pruss_probe()
234 pruss->mem_regions[i].size, pruss->mem_regions[i].va); in pruss_probe()
251 ret = -ENODEV; in pruss_probe()
256 ret = -ENOMEM; in pruss_probe()
260 pruss->cfg_base = devm_ioremap(dev, res.start, resource_size(&res)); in pruss_probe()
261 if (!pruss->cfg_base) { in pruss_probe()
262 ret = -ENOMEM; in pruss_probe()
268 regmap_conf.max_register = resource_size(&res) - 4; in pruss_probe()
270 pruss->cfg_regmap = devm_regmap_init_mmio(dev, pruss->cfg_base, in pruss_probe()
273 if (IS_ERR(pruss->cfg_regmap)) { in pruss_probe()
275 PTR_ERR(pruss->cfg_regmap)); in pruss_probe()
276 ret = PTR_ERR(pruss->cfg_regmap); in pruss_probe()
282 dev_err(dev, "failed to setup coreclk-mux\n"); in pruss_probe()
307 struct device *dev = &pdev->dev; in pruss_remove()
317 /* instance-specific driver private data */
331 { .compatible = "ti,am3356-pruss" },
332 { .compatible = "ti,am4376-pruss0", .data = &am437x_pruss0_data, },
333 { .compatible = "ti,am4376-pruss1", .data = &am437x_pruss1_data, },
334 { .compatible = "ti,am5728-pruss" },
335 { .compatible = "ti,k2g-pruss" },
336 { .compatible = "ti,am654-icssg", .data = &am65x_j721e_pruss_data, },
337 { .compatible = "ti,j721e-icssg", .data = &am65x_j721e_pruss_data, },
352 MODULE_AUTHOR("Suman Anna <s-anna@ti.com>");
353 MODULE_DESCRIPTION("PRU-ICSS Subsystem Driver");