Path: blob/master/drivers/fpga/altera-pr-ip-core-plat.c
26378 views
// SPDX-License-Identifier: GPL-2.01/*2* Driver for Altera Partial Reconfiguration IP Core3*4* Copyright (C) 2016-2017 Intel Corporation5*6* Based on socfpga-a10.c Copyright (C) 2015-2016 Altera Corporation7* by Alan Tull <[email protected]>8*/9#include <linux/fpga/altera-pr-ip-core.h>10#include <linux/module.h>11#include <linux/mod_devicetable.h>12#include <linux/platform_device.h>1314static int alt_pr_platform_probe(struct platform_device *pdev)15{16struct device *dev = &pdev->dev;17void __iomem *reg_base;1819/* First mmio base is for register access */20reg_base = devm_platform_ioremap_resource(pdev, 0);21if (IS_ERR(reg_base))22return PTR_ERR(reg_base);2324return alt_pr_register(dev, reg_base);25}2627static const struct of_device_id alt_pr_of_match[] = {28{ .compatible = "altr,a10-pr-ip", },29{},30};3132MODULE_DEVICE_TABLE(of, alt_pr_of_match);3334static struct platform_driver alt_pr_platform_driver = {35.probe = alt_pr_platform_probe,36.driver = {37.name = "alt_a10_pr_ip",38.of_match_table = alt_pr_of_match,39},40};4142module_platform_driver(alt_pr_platform_driver);43MODULE_AUTHOR("Matthew Gerlach <[email protected]>");44MODULE_DESCRIPTION("Altera Partial Reconfiguration IP Platform Driver");45MODULE_LICENSE("GPL v2");464748