[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.0-2507-g1187889
Brought to you by:
sszy
|
From: Fabien M <fa...@us...> - 2011-09-23 09:42:23
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "armadeus".
The branch, master has been updated
via 1187889c5986f3053559b9142dd3905415aec90a (commit)
via e2fd44ee11c710bf48ad1007b21811421f36f956 (commit)
via 42fab014036ec1acbcec53fede6eb5f39e478dda (commit)
from 20a36f4c438d52e66b69f95cba9bec80c49aa9a3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 1187889c5986f3053559b9142dd3905415aec90a
Author: Fabien Marteau <fab...@ar...>
Date: Fri Sep 23 11:41:35 2011 +0200
[linux][fpga][board_designs] adding drivers for default design spvision_loader
commit e2fd44ee11c710bf48ad1007b21811421f36f956
Author: Fabien Marteau <fab...@ar...>
Date: Fri Sep 23 11:24:41 2011 +0200
[linux][fpga][sploader] little bug correction
commit 42fab014036ec1acbcec53fede6eb5f39e478dda
Author: Fabien Marteau <fab...@ar...>
Date: Fri Sep 23 09:41:35 2011 +0200
[firmware] adding default design for sp_vision loader
-----------------------------------------------------------------------
Summary of changes:
.../apf27_spvision_loader.bit} | Bin 149615 -> 149620 bytes
firmware/pod_scripts/apf27_spvision_loader.pod | 14 +++
target/linux/modules/fpga/board_designs/Makefile | 2 +-
.../fpga/board_designs/spvision_loader/Kconfig | 10 ++
.../fpga/board_designs/spvision_loader/Makefile | 27 ++++++
.../spvision_loader/sploader_prober.c | 91 ++++++++++++++++++++
.../fpga/virtual_components/sploader/sp-loader.c | 6 +-
7 files changed, 146 insertions(+), 4 deletions(-)
copy firmware/{sp_vision_config/bitstream/top_testconfig.bit => pod_scripts/apf27_spvision_loader.bit} (73%)
create mode 100644 firmware/pod_scripts/apf27_spvision_loader.pod
create mode 100644 target/linux/modules/fpga/board_designs/spvision_loader/Kconfig
create mode 100644 target/linux/modules/fpga/board_designs/spvision_loader/Makefile
create mode 100644 target/linux/modules/fpga/board_designs/spvision_loader/sploader_prober.c
diff --git a/firmware/sp_vision_config/bitstream/top_testconfig.bit b/firmware/pod_scripts/apf27_spvision_loader.bit
similarity index 73%
copy from firmware/sp_vision_config/bitstream/top_testconfig.bit
copy to firmware/pod_scripts/apf27_spvision_loader.bit
index 288f718..8f65fd6 100644
Binary files a/firmware/sp_vision_config/bitstream/top_testconfig.bit and b/firmware/pod_scripts/apf27_spvision_loader.bit differ
diff --git a/firmware/pod_scripts/apf27_spvision_loader.pod b/firmware/pod_scripts/apf27_spvision_loader.pod
new file mode 100644
index 0000000..b4a15bb
--- /dev/null
+++ b/firmware/pod_scripts/apf27_spvision_loader.pod
@@ -0,0 +1,14 @@
+create spvision_loader
+selectplatform standard.apf27
+delinstance irq_mngr00
+addinstance components.sp_vision_configure.wb16
+autoconnectbus
+generateintercon imx27_wb16_wrapper00.mwb16
+generateintercon rstgen_syscon00.candroutput
+generatetop
+driver.selecttoolchain armadeus
+driver.generateproject
+synthesis.selecttoolchain ise
+synthesis.generateproject
+#synthesis.generatebitstream
+
diff --git a/target/linux/modules/fpga/board_designs/Makefile b/target/linux/modules/fpga/board_designs/Makefile
index 575dc2e..4109416 100644
--- a/target/linux/modules/fpga/board_designs/Makefile
+++ b/target/linux/modules/fpga/board_designs/Makefile
@@ -1,3 +1,3 @@
-obj-$(CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS) += twin_uart/ wishbone_example/
+obj-$(CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS) += twin_uart/ wishbone_example/ spvision_loader/
diff --git a/target/linux/modules/fpga/board_designs/spvision_loader/Kconfig b/target/linux/modules/fpga/board_designs/spvision_loader/Kconfig
new file mode 100644
index 0000000..c1ab33b
--- /dev/null
+++ b/target/linux/modules/fpga/board_designs/spvision_loader/Kconfig
@@ -0,0 +1,10 @@
+
+config ARMADEUS_FPGA_BOARD_DESIGNS_SPVISION_PROBER
+ tristate "board driver for sp_vision fpga loader"
+ default n
+ depends on ARMADEUS_FPGA_BOARD_DESIGNS
+ select ARMADEUS_FPGA_VIRTUAL_SPVISION_LOADER
+ ---help---
+ With this driver you will be able to load the configuration
+ of your sp_vision FPGA directly from Linux userspace.
+
diff --git a/target/linux/modules/fpga/board_designs/spvision_loader/Makefile b/target/linux/modules/fpga/board_designs/spvision_loader/Makefile
new file mode 100644
index 0000000..918a1ed
--- /dev/null
+++ b/target/linux/modules/fpga/board_designs/spvision_loader/Makefile
@@ -0,0 +1,27 @@
+#
+# Makefile for the Armadeus FPGA loader driver
+#
+
+ifneq ($(KERNELRELEASE),)
+
+obj-$(CONFIG_ARMADEUS_FPGA_BOARD_DESIGNS_SPVISION_PROBER) += sploader_prober.o
+
+# Part executed when called from standard make in this directory:
+# (preferably use Makefile in parent directory)
+
+else
+ARMADEUS_BASE_DIR=../../../../../../
+include $(ARMADEUS_BASE_DIR)/Makefile.in
+KDIR := $(ARMADEUS_KERNEL_DIR)
+PWD := $(shell pwd)
+CC:=$(ARMADEUS_TOOLCHAIN_PATH)/arm-linux-gcc
+
+default:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) modules
+
+clean:
+ $(MAKE) -C $(KDIR) SUBDIRS=$(PWD) clean
+ rm -f modules.order Module.markers
+
+endif
+
diff --git a/target/linux/modules/fpga/board_designs/spvision_loader/sploader_prober.c b/target/linux/modules/fpga/board_designs/spvision_loader/sploader_prober.c
new file mode 100644
index 0000000..cf5a94e
--- /dev/null
+++ b/target/linux/modules/fpga/board_designs/spvision_loader/sploader_prober.c
@@ -0,0 +1,91 @@
+/*
+ ***********************************************************************
+ *
+ * (c) Copyright 2008 Armadeus project
+ * Fabien Marteau <fab...@ar...>
+ * Specific led driver for generic led driver
+ *
+ * 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 2, or (at your option)
+ * 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, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ **********************************************************************
+ */
+
+#include <linux/version.h>
+#include <linux/init.h>
+#include <linux/module.h>
+#include <linux/platform_device.h>
+
+# include <mach/fpga.h>
+
+#include "../../virtual_components/sploader/spartan_loadsecond.h"
+
+static struct resource sploader0_resources[] = {
+ [0] = {
+ .start = ARMADEUS_FPGA_BASE_ADDR, + 0x0,
+ .end = ARMADEUS_FPGA_BASE_ADDR + 0x0 + 3,
+ .flags = IORESOURCE_MEM,
+ },
+};
+
+static Xilinx_desc plat_sploader0_data = {
+ .family = Xilinx_Spartan6,
+ .iface = slave_parallel,
+ .size = (11875104l / 8), //XILINX_XC6SLX45_SIZE,
+ .fpga_offset = 0xD6000000l,
+ .ip_id = 0, // l'id du composant == idnum
+ .cookie = 1,
+ .name = "SP_VISION_CONFIGURE00",
+ .num = 0,
+ .idnum = 1,
+ .idoffset = 0x0 * (16 /8) // pos de l'id dans le composant
+};
+
+
+void plat_sploader_release(struct device *dev)
+{
+ dev_dbg(dev, "released\n");
+}
+
+static struct platform_device plat_sploader_devices[] = {
+ {
+ .name = "sploader",
+ .id = 0,
+ .dev = {
+ .release = plat_sploader_release,
+ .platform_data = &plat_sploader0_data
+ },
+ .num_resources = ARRAY_SIZE(sploader0_resources),
+ .resource = sploader0_resources,
+ }
+
+};
+
+static int __init sploader_init(void)
+{
+ return platform_device_register(plat_sploader_devices);
+}
+
+static void __exit sploader_exit(void)
+{
+ platform_device_unregister(plat_sploader_devices);
+}
+
+module_init(sploader_init);
+module_exit(sploader_exit);
+
+MODULE_AUTHOR("Fabien Marteau <fab...@ar...>");
+MODULE_AUTHOR("Gwenhael Goavec-Merou <gwe...@ar...>");
+MODULE_DESCRIPTION("Driver to load spvision fpga");
+MODULE_LICENSE("GPL");
+
diff --git a/target/linux/modules/fpga/virtual_components/sploader/sp-loader.c b/target/linux/modules/fpga/virtual_components/sploader/sp-loader.c
index 15310ce..9254c69 100644
--- a/target/linux/modules/fpga/virtual_components/sploader/sp-loader.c
+++ b/target/linux/modules/fpga/virtual_components/sploader/sp-loader.c
@@ -111,12 +111,12 @@ static int armadeus_fpga_open(struct inode *inode, struct file *file)
}
/* check if ID is correct */
- ip_id = readw(sdev->membase + pdata->idoffset);
- if (ip_id != pdata->idnum) {
+ ip_id = readw(g_current_desc->ip_addr + g_current_desc->idoffset);
+ if (ip_id != g_current_desc->idnum) {
ret = -ENODEV;
printk(KERN_WARNING "For %s id:%d doesn't match with "
"id read %d,\n is device present ?\n",
- pdata->name, pdata->idnum, ip_id);
+ g_current_desc->name, g_current_desc->idnum, ip_id);
goto out;
}
hooks/post-receive
--
armadeus
|