Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / drivers / fpga / altera-pr-ip-core-plat.c
blob9dc2639300076edc289e8e8533d627ee92b3e447
1 // SPDX-License-Identifier: GPL-2.0
2 /*
3 * Driver for Altera Partial Reconfiguration IP Core
5 * Copyright (C) 2016-2017 Intel Corporation
7 * Based on socfpga-a10.c Copyright (C) 2015-2016 Altera Corporation
8 * by Alan Tull <atull@opensource.altera.com>
9 */
10 #include <linux/fpga/altera-pr-ip-core.h>
11 #include <linux/module.h>
12 #include <linux/mod_devicetable.h>
13 #include <linux/platform_device.h>
15 static int alt_pr_platform_probe(struct platform_device *pdev)
17 struct device *dev = &pdev->dev;
18 void __iomem *reg_base;
20 /* First mmio base is for register access */
21 reg_base = devm_platform_ioremap_resource(pdev, 0);
22 if (IS_ERR(reg_base))
23 return PTR_ERR(reg_base);
25 return alt_pr_register(dev, reg_base);
28 static const struct of_device_id alt_pr_of_match[] = {
29 { .compatible = "altr,a10-pr-ip", },
30 {},
33 MODULE_DEVICE_TABLE(of, alt_pr_of_match);
35 static struct platform_driver alt_pr_platform_driver = {
36 .probe = alt_pr_platform_probe,
37 .driver = {
38 .name = "alt_a10_pr_ip",
39 .of_match_table = alt_pr_of_match,
43 module_platform_driver(alt_pr_platform_driver);
44 MODULE_AUTHOR("Matthew Gerlach <matthew.gerlach@linux.intel.com>");
45 MODULE_DESCRIPTION("Altera Partial Reconfiguration IP Platform Driver");
46 MODULE_LICENSE("GPL v2");