Lines Matching +full:am4376 +full:- +full:pruss1

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()
133 return -ENODEV; in pruss_clk_init()
136 if (data && data->has_core_mux_clock) { in pruss_clk_init()
137 ret = pruss_clk_mux_setup(pruss, pruss->core_clk_mux, in pruss_clk_init()
138 "coreclk-mux", clks_np); in pruss_clk_init()
140 dev_err(dev, "failed to setup coreclk-mux\n"); in pruss_clk_init()
145 ret = pruss_clk_mux_setup(pruss, pruss->iep_clk_mux, "iepclk-mux", in pruss_clk_init()
148 dev_err(dev, "failed to setup iepclk-mux\n"); in pruss_clk_init()
174 return -ENODEV; in pruss_cfg_of_init()
178 ret = -ENOMEM; in pruss_cfg_of_init()
182 pruss->cfg_base = devm_ioremap(dev, res.start, resource_size(&res)); in pruss_cfg_of_init()
183 if (!pruss->cfg_base) { in pruss_cfg_of_init()
184 ret = -ENOMEM; in pruss_cfg_of_init()
190 regmap_conf.max_register = resource_size(&res) - 4; in pruss_cfg_of_init()
192 pruss->cfg_regmap = devm_regmap_init_mmio(dev, pruss->cfg_base, in pruss_cfg_of_init()
195 if (IS_ERR(pruss->cfg_regmap)) { in pruss_cfg_of_init()
197 PTR_ERR(pruss->cfg_regmap)); in pruss_cfg_of_init()
198 ret = PTR_ERR(pruss->cfg_regmap); in pruss_cfg_of_init()
213 struct device *dev = &pdev->dev; in pruss_probe()
222 data = of_device_get_match_data(&pdev->dev); in pruss_probe()
232 return -ENOMEM; in pruss_probe()
234 pruss->dev = dev; in pruss_probe()
239 return -ENODEV; in pruss_probe()
247 if (data && data->has_no_sharedram && i == PRUSS_MEM_SHRD_RAM2) in pruss_probe()
250 index = of_property_match_string(child, "reg-names", in pruss_probe()
259 return -EINVAL; in pruss_probe()
262 pruss->mem_regions[i].va = devm_ioremap(dev, res.start, in pruss_probe()
264 if (!pruss->mem_regions[i].va) { in pruss_probe()
268 return -ENOMEM; in pruss_probe()
270 pruss->mem_regions[i].pa = res.start; in pruss_probe()
271 pruss->mem_regions[i].size = resource_size(&res); in pruss_probe()
274 mem_names[i], &pruss->mem_regions[i].pa, in pruss_probe()
275 pruss->mem_regions[i].size, pruss->mem_regions[i].va); in pruss_probe()
309 struct device *dev = &pdev->dev; in pruss_remove()
319 /* instance-specific driver private data */
333 { .compatible = "ti,am3356-pruss" },
334 { .compatible = "ti,am4376-pruss0", .data = &am437x_pruss0_data, },
335 { .compatible = "ti,am4376-pruss1", .data = &am437x_pruss1_data, },
336 { .compatible = "ti,am5728-pruss" },
337 { .compatible = "ti,k2g-pruss" },
338 { .compatible = "ti,am654-icssg", .data = &am65x_j721e_pruss_data, },
339 { .compatible = "ti,j721e-icssg", .data = &am65x_j721e_pruss_data, },
340 { .compatible = "ti,am642-icssg", .data = &am65x_j721e_pruss_data, },
341 { .compatible = "ti,am625-pruss", .data = &am65x_j721e_pruss_data, },
356 MODULE_AUTHOR("Suman Anna <s-anna@ti.com>");
357 MODULE_DESCRIPTION("PRU-ICSS Subsystem Driver");