summaryrefslogtreecommitdiffstats
path: root/drivers/fpga/socfpga-hps2fpga-bridge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/fpga/socfpga-hps2fpga-bridge.c')
-rw-r--r--drivers/fpga/socfpga-hps2fpga-bridge.c24
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/fpga/socfpga-hps2fpga-bridge.c b/drivers/fpga/socfpga-hps2fpga-bridge.c
index ecb33ea0b3..4855dbcf4d 100644
--- a/drivers/fpga/socfpga-hps2fpga-bridge.c
+++ b/drivers/fpga/socfpga-hps2fpga-bridge.c
@@ -1,3 +1,4 @@
+// SPDX-License-Identifier: GPL-2.0-only
/*
* FPGA to/from HPS Bridge Driver for Altera SoCFPGA Devices
*
@@ -6,18 +7,6 @@
* Includes this patch from the mailing list:
* fpga: altera-hps2fpga: fix HPS2FPGA bridge visibility to L3 masters
* Signed-off-by: Anatolij Gustschin <agust@denx.de>
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
- * version 2, as published by the Free Software Foundation.
- *
- * This program is distributed in the hope it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
- * more details.
- *
- * You should have received a copy of the GNU General Public License along with
- * this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
@@ -50,7 +39,7 @@
#define FPGA2HPS_BRIDGE_NAME "fpga2hps"
struct altera_hps2fpga_data {
- struct device_d *dev;
+ struct device *dev;
const char *name;
struct reset_control *bridge_reset;
unsigned int remap_mask;
@@ -123,8 +112,9 @@ static struct of_device_id altera_fpga_of_match[] = {
.data = &fpga2hps_data },
{ /* sentinel */ },
};
+MODULE_DEVICE_TABLE(of, altera_fpga_of_match);
-static int alt_fpga_bridge_probe(struct device_d *dev)
+static int alt_fpga_bridge_probe(struct device *dev)
{
struct altera_hps2fpga_data *priv;
const struct of_device_id *of_id;
@@ -134,7 +124,7 @@ static int alt_fpga_bridge_probe(struct device_d *dev)
of_id = of_match_device(altera_fpga_of_match, dev);
priv = (struct altera_hps2fpga_data *)of_id->data;
- priv->bridge_reset = of_reset_control_get(dev->device_node, NULL);
+ priv->bridge_reset = of_reset_control_get(dev->of_node, NULL);
if (IS_ERR(priv->bridge_reset)) {
dev_err(dev, "Could not get %s reset control\n", priv->name);
return PTR_ERR(priv->bridge_reset);
@@ -154,7 +144,7 @@ static int alt_fpga_bridge_probe(struct device_d *dev)
priv->dev = dev;
- if (!of_property_read_u32(dev->device_node, "bridge-enable", &enable)) {
+ if (!of_property_read_u32(dev->of_node, "bridge-enable", &enable)) {
if (enable > 1) {
dev_warn(dev, "invalid bridge-enable %u > 1\n", enable);
} else {
@@ -171,7 +161,7 @@ static int alt_fpga_bridge_probe(struct device_d *dev)
priv);
}
-static struct driver_d alt_fpga_bridge_driver = {
+static struct driver alt_fpga_bridge_driver = {
.probe = alt_fpga_bridge_probe,
.name = "altera-hps2fpga-bridge",
.of_compatible = DRV_OF_COMPAT(altera_fpga_of_match),