[Armadeus-commitlog] armadeus branch, master, updated. armadeus-4.0-2606-g7a7114f
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-12-02 18:33:47
|
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 7a7114f65aecd1d75a76f258270ca222add2dcdb (commit)
via e2b53393f585987de05546453c5d181acf1c8ae4 (commit)
via 2fd650f30601c14fbf55c5dee3ae879e38846e54 (commit)
from b51aab5748ad2428096c6868d3bf96583115c283 (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 7a7114f65aecd1d75a76f258270ca222add2dcdb
Merge: e2b5339 b51aab5
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 19:31:38 2011 +0100
Merge branch 'master' of ssh://armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit e2b53393f585987de05546453c5d181acf1c8ae4
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 19:23:33 2011 +0100
[LINUX] makes target/linux/modules/fpga/virtual_components/irq_mngr/main.c compatible with >= 3.0 kernels
commit 2fd650f30601c14fbf55c5dee3ae879e38846e54
Author: Julien Boibessot <jul...@ar...>
Date: Fri Dec 2 18:56:41 2011 +0100
[LINUX] 3.0 APF51 migration: add 015 & 199 patches
-----------------------------------------------------------------------
Summary of changes:
...15-armadeus-logo-add_armadeus-project_tux.patch | 0
...nel_to_export_some_irq_handling_functions.patch | 48 ++++++++++++++++++++
.../fpga/virtual_components/irq_mngr/main.c | 30 +++++++++++-
3 files changed, 76 insertions(+), 2 deletions(-)
copy patches/linux/{2.6.38 => 3.0}/015-armadeus-logo-add_armadeus-project_tux.patch (100%)
create mode 100644 patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
diff --git a/patches/linux/2.6.38/015-armadeus-logo-add_armadeus-project_tux.patch b/patches/linux/3.0/015-armadeus-logo-add_armadeus-project_tux.patch
similarity index 100%
copy from patches/linux/2.6.38/015-armadeus-logo-add_armadeus-project_tux.patch
copy to patches/linux/3.0/015-armadeus-logo-add_armadeus-project_tux.patch
diff --git a/patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch b/patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
new file mode 100644
index 0000000..96a698f
--- /dev/null
+++ b/patches/linux/3.0/199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
@@ -0,0 +1,48 @@
+Allows to use some usefull irq_chip registering/handling functions in modules.
+
+Signed-off-by: Julien Boibessot <jul...@ar...>
+
+Index: linux-3.0.10/kernel/irq/chip.c
+===================================================================
+--- linux-3.0.10.orig/kernel/irq/chip.c 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/kernel/irq/chip.c 2011-12-02 17:10:07.000000000 +0100
+@@ -475,6 +475,7 @@
+ out_unlock:
+ raw_spin_unlock(&desc->lock);
+ }
++EXPORT_SYMBOL_GPL(handle_edge_irq);
+
+ #ifdef CONFIG_IRQ_EDGE_EOI_HANDLER
+ /**
+@@ -589,6 +590,7 @@
+ irq_set_chip(irq, chip);
+ __irq_set_handler(irq, handle, 0, name);
+ }
++EXPORT_SYMBOL_GPL(irq_set_chip_and_handler_name);
+
+ void irq_modify_status(unsigned int irq, unsigned long clr, unsigned long set)
+ {
+Index: linux-3.0.10/arch/arm/kernel/irq.c
+===================================================================
+--- linux-3.0.10.orig/arch/arm/kernel/irq.c 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/arch/arm/kernel/irq.c 2011-12-02 17:57:29.000000000 +0100
+@@ -115,6 +115,7 @@
+ /* Order is clear bits in "clr" then set bits in "set" */
+ irq_modify_status(irq, clr, set & ~clr);
+ }
++EXPORT_SYMBOL_GPL(set_irq_flags);
+
+ void __init init_IRQ(void)
+ {
+Index: linux-3.0.10/kernel/irq/irqdesc.c
+===================================================================
+--- linux-3.0.10.orig/kernel/irq/irqdesc.c 2011-11-21 23:37:44.000000000 +0100
++++ linux-3.0.10/kernel/irq/irqdesc.c 2011-12-02 17:58:03.000000000 +0100
+@@ -270,6 +270,7 @@
+ {
+ return (irq < NR_IRQS) ? irq_desc + irq : NULL;
+ }
++EXPORT_SYMBOL_GPL(irq_to_desc);
+
+ static void free_desc(unsigned int irq)
+ {
diff --git a/target/linux/modules/fpga/virtual_components/irq_mngr/main.c b/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
index dcaf256..ff9d6d5 100644
--- a/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
+++ b/target/linux/modules/fpga/virtual_components/irq_mngr/main.c
@@ -34,6 +34,7 @@
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)
#include <linux/slab.h> /* kmalloc */
#endif
+#include <linux/irq.h>
#include <mach/hardware.h>
#include <mach/irqs.h>
@@ -64,11 +65,17 @@ struct irq_mng {
struct irq_mng global_mng;
#endif
-
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+static int imx_fpga_irq_type(struct irq_data *data, unsigned int flow_type)
+{
+ return 0;
+}
+#else
static int imx_fpga_irq_type(unsigned int _irq, unsigned int type)
{
return 0;
}
+#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
static void imx_fpga_ack_irq(struct irq_data *data)
@@ -143,7 +150,11 @@ static irqreturn_t ocore_irq_mng_interrupt(int irq, void *data)
if (mask & 1) {
pr_debug("handling irq %d 0x%08x\n", irq,
(unsigned int)desc);
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ desc->handle_irq(irq, desc);
+#else
desc_handle_irq(irq, desc);
+#endif
}
irq++;
desc++;
@@ -164,7 +175,11 @@ static struct irq_chip imx_fpga_chip = {
.mask = imx_fpga_mask_irq,
.unmask = imx_fpga_unmask_irq,
#endif
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ .irq_set_type = imx_fpga_irq_type,
+#else
.set_type = imx_fpga_irq_type,
+#endif
};
#ifdef CONFIG_PM
@@ -252,8 +267,14 @@ static int __devinit ocore_irq_mng_probe(struct platform_device *pdev)
writew(0, mng->membase + FPGA_IMR);
for (irq = IRQ_FPGA(0); irq < IRQ_FPGA(NB_IT); irq++) {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ irq_set_chip_data(irq, mng);
+ irq_set_chip_and_handler_name(irq, &imx_fpga_chip,
+ handle_edge_irq, NULL);
+#else
set_irq_chip_data(irq, mng);
set_irq_chip_and_handler(irq, &imx_fpga_chip, handle_edge_irq);
+#endif
set_irq_flags(irq, IRQF_VALID);
}
/* clear pending interrupts */
@@ -292,8 +313,13 @@ static int __devexit ocore_irq_mng_remove(struct platform_device *pdev)
unsigned int irq;
for (irq = IRQ_FPGA(0); irq < IRQ_FPGA(NB_IT); irq++) {
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,39)
+ irq_set_chip(irq, NULL);
+ irq_set_handler(irq, NULL);
+#else
set_irq_chip(irq, NULL);
- set_irq_handler(irq,NULL);
+ set_irq_handler(irq, NULL);
+#endif
set_irq_flags(irq, 0);
}
free_irq(mng->irq_res->start, mng);
hooks/post-receive
--
armadeus
|