[Armadeus-commitlog] armadeus branch, master, updated. armadeus-5.2-292-gf0ba272
Brought to you by:
sszy
|
From: jorasse <jo...@us...> - 2013-06-25 16:14:35
|
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 f0ba272f16948cdc3b0988f03f55e919cf5242a4 (commit)
via 7029dd048f9138f1056f58ea8e87c73dd64cd705 (commit)
via de9df831b136524e0c0d18dcf32e46529b2d37d0 (commit)
from 98b51ab70c7f5080f3fa472254f973f1546c7ad3 (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 f0ba272f16948cdc3b0988f03f55e919cf5242a4
Author: Philippe Reynes <tr...@ya...>
Date: Sat Jun 22 20:05:16 2013 +0200
[LINUX] 3.10: enable driver fpga_loader
Signed-off-by: Philippe Reynes <tr...@ya...>
commit 7029dd048f9138f1056f58ea8e87c73dd64cd705
Author: Philippe Reynes <tr...@ya...>
Date: Sat Jun 22 20:05:15 2013 +0200
[LINUX] 3.10: imx27: fpga_loader: add support of 3.10
Signed-off-by: Philippe Reynes <tr...@ya...>
commit de9df831b136524e0c0d18dcf32e46529b2d37d0
Author: Philippe Reynes <tr...@ya...>
Date: Sat Jun 22 20:05:14 2013 +0200
[LINUX] 3.10: imx27: fpga: define base addr even with dt
Signed-off-by: Philippe Reynes <tr...@ya...>
-----------------------------------------------------------------------
Summary of changes:
.../device/armadeus/apf27/apf27-linux-3.10.config | 4 ++
...rmadeus-mach_fpga_add_dt_support_for_mx27.patch | 27 +++++++++++++
.../linux/modules/fpga/dev_tools/loader/Makefile | 6 +++
.../modules/fpga/dev_tools/loader/fpga-loader.c | 42 +++++++++++++++++++-
4 files changed, 78 insertions(+), 1 deletions(-)
create mode 100644 patches/linux/3.10/0323-armadeus-mach_fpga_add_dt_support_for_mx27.patch
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-3.10.config b/buildroot/target/device/armadeus/apf27/apf27-linux-3.10.config
index 266ef06..d09275d 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-3.10.config
+++ b/buildroot/target/device/armadeus/apf27/apf27-linux-3.10.config
@@ -200,6 +200,10 @@ CONFIG_IMX_SDMA=y
CONFIG_IMX_DMA=y
# CONFIG_IOMMU_SUPPORT is not set
CONFIG_IIO=m
+CONFIG_ARMADEUS_DRIVERS=y
+CONFIG_ARMADEUS_FPGA_DRIVERS=y
+CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=y
+# CONFIG_ARMADEUS_FPGA_VIRTUAL_COMPONENTS is not set
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_POSIX_ACL=y
diff --git a/patches/linux/3.10/0323-armadeus-mach_fpga_add_dt_support_for_mx27.patch b/patches/linux/3.10/0323-armadeus-mach_fpga_add_dt_support_for_mx27.patch
new file mode 100644
index 0000000..b51a39a
--- /dev/null
+++ b/patches/linux/3.10/0323-armadeus-mach_fpga_add_dt_support_for_mx27.patch
@@ -0,0 +1,27 @@
+From 23f189ce6a2940e8d2f1d57db28dcb35e43195eb Mon Sep 17 00:00:00 2001
+From: Philippe Reynes <tr...@ya...>
+Date: Sat, 22 Jun 2013 18:56:18 +0200
+Subject: [PATCH] apf27: define base addr when using device tree
+
+
+Signed-off-by: Philippe Reynes <tr...@ya...>
+---
+ arch/arm/mach-imx/fpga.h | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-imx/fpga.h b/arch/arm/mach-imx/fpga.h
+index 49ec4b9..58c4a9a 100644
+--- a/arch/arm/mach-imx/fpga.h
++++ b/arch/arm/mach-imx/fpga.h
+@@ -26,7 +26,7 @@
+ # define APF51_FPGA_IRQ (gpio_to_irq(APF51_FPGA_INT_PIN))
+ # define ARMADEUS_FPGA_IRQ APF51_FPGA_IRQ
+ # define IRQ_FPGA_START (MXC_BOARD_IRQ_START + 64)
+-#elif defined(CONFIG_MACH_APF27) /* */
++#elif defined(CONFIG_MACH_APF27) || defined(CONFIG_MACH_MX27) /* */
+ #include "iomux-v1.h"
+ # define APF27_FPGA_BASE_ADDR 0xd6000000
+ # define ARMADEUS_FPGA_BASE_ADDR APF27_FPGA_BASE_ADDR
+--
+1.7.4.4
+
diff --git a/target/linux/modules/fpga/dev_tools/loader/Makefile b/target/linux/modules/fpga/dev_tools/loader/Makefile
index 882f307..24d3790 100644
--- a/target/linux/modules/fpga/dev_tools/loader/Makefile
+++ b/target/linux/modules/fpga/dev_tools/loader/Makefile
@@ -6,6 +6,11 @@ ifneq ($(KERNELRELEASE),)
obj-$(CONFIG_ARMADEUS_FPGA_LOADER_DRIVER) += fpgaloader.o
fpgaloader-objs := xilinx-fpga-loader.o fpga-loader.o
+ifneq ($(CONFIG_DTC),)
+ifneq ($(CONFIG_MACH_MX27),)
+obj-y += apf27-fpga-loader.o
+endif
+else
ifneq ($(CONFIG_MACH_APF51),)
obj-y += apf51-fpga-loader.o
endif
@@ -15,6 +20,7 @@ endif
ifneq ($(CONFIG_MACH_APF9328),)
obj-y += apf9328-fpga-loader.o
endif
+endif #
else
diff --git a/target/linux/modules/fpga/dev_tools/loader/fpga-loader.c b/target/linux/modules/fpga/dev_tools/loader/fpga-loader.c
index b49b01f..fc78971 100644
--- a/target/linux/modules/fpga/dev_tools/loader/fpga-loader.c
+++ b/target/linux/modules/fpga/dev_tools/loader/fpga-loader.c
@@ -124,7 +124,15 @@ static int armadeus_fpga_release(struct inode *inode, struct file *file)
/* PROC file */
-static int procfile_fpga_read(char *buffer, __attribute__ ((unused)) char **start, off_t offset, int buffer_length, int *eof, __attribute__ ((unused)) void* data)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+static int procfile_fpga_read(char *buffer, __attribute__ ((unused)) char **start,
+ off_t offset, int buffer_length,
+ int *eof,
+ __attribute__ ((unused)) void* data)
+#else
+static int procfile_fpga_read(struct file *file, char __user *buffer, size_t count,
+ loff_t *offset)
+#endif
{
int ret;
@@ -134,22 +142,47 @@ static int procfile_fpga_read(char *buffer, __attribute__ ((unused)) char **star
library would continue to issue the read system call until the
the kernel replies that it has no more information, or until
its buffer is filled */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
if (offset > 0) {
+#else
+ if (*offset > 0) {
+#endif
/* we have finished to read, return 0 */
ret = 0;
} else {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
ret = fpga_get_infos(g_current_desc, buffer);
+#else
+ char buf[64];
+ ret = fpga_get_infos(g_current_desc, buf);
+ if (copy_to_user(buffer, buf, ret))
+ ret = -EFAULT;
+ *offset = ret;
+#endif
}
return ret;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
static int procfile_fpga_write( __attribute__ ((unused)) struct file *file,
const char *buf, unsigned long count, void *data)
+#else
+static ssize_t procfile_fpga_write( __attribute__ ((unused)) struct file *file,
+ const char __user *buf, size_t count, loff_t *f_pos)
+#endif
{
return count;
}
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#else
+struct file_operations fpga_proc_fops = {
+ .read = procfile_fpga_read,
+ .write = procfile_fpga_write
+};
+#endif
+
/* Create /proc entries for direct access to FPGA config */
static int create_proc_entries( void )
{
@@ -159,13 +192,20 @@ static int create_proc_entries( void )
proc_mkdir(FPGA_PROC_DIRNAME, NULL);
/* Create proc file */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
fpga_Proc_File = create_proc_entry(FPGA_PROC_FILENAME, S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH, NULL);
+#else
+ fpga_Proc_File = proc_create(FPGA_PROC_FILENAME, S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH, NULL, &fpga_proc_fops);
+#endif
if (fpga_Proc_File == NULL) {
printk(DRIVER_NAME ": Could not register a" FPGA_PROC_FILENAME ". Terminating\n");
goto error;
} else {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
fpga_Proc_File->read_proc = procfile_fpga_read;
fpga_Proc_File->write_proc = procfile_fpga_write;
+#else
+#endif
}
return 0;
hooks/post-receive
--
armadeus
|