From 1cde762fc0b4800673c724faf5a41846308ce2a9 Mon Sep 17 00:00:00 2001 From: daniel-k Date: Wed, 22 Nov 2017 18:41:53 +0100 Subject: [PATCH] ips/gpio: add skeleton for GPIO IP --- fpga/lib/CMakeLists.txt | 1 + fpga/lib/ips/gpio.c | 48 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 fpga/lib/ips/gpio.c diff --git a/fpga/lib/CMakeLists.txt b/fpga/lib/CMakeLists.txt index e83e6382a..c5f25ef58 100644 --- a/fpga/lib/CMakeLists.txt +++ b/fpga/lib/CMakeLists.txt @@ -10,6 +10,7 @@ set(SOURCES ips/fifo.c ips/dma.c ips/intc.c + ips/gpio.c ips/rtds_axis.c kernel/kernel.c diff --git a/fpga/lib/ips/gpio.c b/fpga/lib/ips/gpio.c new file mode 100644 index 000000000..b6f30ebd6 --- /dev/null +++ b/fpga/lib/ips/gpio.c @@ -0,0 +1,48 @@ +/** GPIO related helper functions + * + * @author Daniel Krebs + * @copyright 2017, Daniel Krebs + * @license GNU General Public License (version 3) + * + * VILLASfpga + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * any later version. + * + * This program is distributed in the hope that 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 . + *********************************************************************************/ + +#include "config.h" +#include "plugin.h" + +#include "fpga/ip.h" +#include "fpga/card.h" + +static int gpio_start(struct fpga_ip *c) +{ + (void) c; + + return 0; +} + +static struct plugin p = { + .name = "Xilinx's GPIO controller", + .description = "", + .type = PLUGIN_TYPE_FPGA_IP, + .ip = { + .vlnv = { "xilinx.com", "ip", "axi_gpio", NULL }, + .type = FPGA_IP_TYPE_MISC, + .start = gpio_start, + .size = 0 + } +}; + +REGISTER_PLUGIN(&p)