[Armadeus-commitlog] SF.net SVN: armadeus:[1224] trunk/buildroot/target/device/armadeus/linux/ kern
Brought to you by:
sszy
|
From: <ar...@us...> - 2009-04-15 11:54:54
|
Revision: 1224
http://armadeus.svn.sourceforge.net/armadeus/?rev=1224&view=rev
Author: artemys
Date: 2009-04-15 11:54:45 +0000 (Wed, 15 Apr 2009)
Log Message:
-----------
[LINUX] Handling of FPGA IRQ on APF27 (part 2)
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/291-apf27-armadeus-add_mach_board-apf27_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/322-apf27-armadeus-add_mach_fpga_h.patch
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/323-apf27-armadeus-increases_max_irq_number.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-15 11:32:11 UTC (rev 1223)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/281-apf27-armadeus-add_apf27.c.patch 2009-04-15 11:54:45 UTC (rev 1224)
@@ -4,8 +4,8 @@
Index: linux-2.6.27.13/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-04-14 16:09:10.000000000 +0200
-@@ -0,0 +1,1530 @@
++++ linux-2.6.27.13/arch/arm/mach-mx2/apf27.c 2009-04-15 11:05:40.000000000 +0200
+@@ -0,0 +1,1559 @@
+ /*
+ * apf27.c
+ *
@@ -1441,6 +1441,32 @@
+};
+
+
++/* FPGA */
++#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
++static int fpga_pins[] = {
++ (APF27_FPGA_INT_PIN | GPIO_IN | GPIO_GPIO),
++};
++
++static int apf27_fpga_init(void)
++{
++ int res;
++
++ res = mxc_gpio_setup_multiple(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
++ if (!res)
++ set_irq_type(APF27_FPGA_IRQ, IRQF_TRIGGER_RISING);
++
++ return res;
++}
++# if 0
++static int apf27_fpga_exit(void)
++{
++ mxc_gpio_release_multiple(fpga_pins, ARRAY_SIZE(fpga_pins));
++ return 0;
++}
++# endif
++#endif /* CONFIG_ARMADEUS_FPGA_DRIVERS */
++
++
+static void __init apf27_init(void)
+{
+ sysdev_class_register(&apf27_pm_sysclass);
@@ -1497,6 +1523,9 @@
+#ifdef CONFIG_VIDEO_MX27
+ mxc_register_device(&mx27_camera_device, &apf27_camera);
+#endif
++#ifdef CONFIG_ARMADEUS_FPGA_DRIVERS
++ apf27_fpga_init();
++#endif
+
+ printk("i.MX27 chip revision: %d\n", mx27_revision() );
+}
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/291-apf27-armadeus-add_mach_board-apf27_h.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/291-apf27-armadeus-add_mach_board-apf27_h.patch 2009-04-15 11:32:11 UTC (rev 1223)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/291-apf27-armadeus-add_mach_board-apf27_h.patch 2009-04-15 11:54:45 UTC (rev 1224)
@@ -1,8 +1,8 @@
Index: linux-2.6.27.13/arch/arm/plat-mxc/include/mach/board-apf27.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/board-apf27.h 2009-04-14 14:48:16.000000000 +0200
-@@ -0,0 +1,43 @@
++++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/board-apf27.h 2009-04-15 10:52:29.000000000 +0200
+@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2008 Armadeus Systems
+ *
@@ -38,11 +38,13 @@
+/* FPGA addresses */
+#define APF27_FPGA_VIRT (CS5_BASE_ADDR_VIRT)
+#define APF27_FPGA_PHYS (CS5_BASE_ADDR)
-+#define APF27_FPGA_IRQ (IRQ_GPIOF(12))
-+
+#define ARMADEUS_FPGA_BASE_ADDR_VIRT (APF27_FPGA_VIRT)
+#define ARMADEUS_FPGA_BASE_ADDR_PHYS (APF27_FPGA_PHYS)
-+#define ARMADEUS_FPGA_IRQ (APF27_FPGA_IRQ)
+
++/* FPGA IRQ */
++#define APF27_FPGA_INT_PIN (GPIO_PORTF | 12)
++#define APF27_FPGA_IRQ (IRQ_GPIOF(APF27_FPGA_INT_PIN))
++#define ARMADEUS_FPGA_IRQ (APF27_FPGA_IRQ)
+
++
+#endif /* __ASM_ARCH_MXC_BOARD_APF27_H__ */
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/322-apf27-armadeus-add_mach_fpga_h.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/322-apf27-armadeus-add_mach_fpga_h.patch 2009-04-15 11:32:11 UTC (rev 1223)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/322-apf27-armadeus-add_mach_fpga_h.patch 2009-04-15 11:54:45 UTC (rev 1224)
@@ -1,7 +1,7 @@
Index: linux-2.6.27.13/arch/arm/plat-mxc/include/mach/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/fpga.h 2009-04-14 16:30:36.000000000 +0200
++++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/fpga.h 2009-04-15 10:15:43.000000000 +0200
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2009 Armadeus Systems
@@ -26,17 +26,17 @@
+
+
+#ifdef CONFIG_MACH_APF27
-+#include <mach/board-apf27.h>
++#include <mach/board-apf27.h> /* @ + IRQs are here */
+#else
+/* To complete when MX1 platform merged */
+#endif
+
+/* FPGA interrupts number */
+#ifdef CONFIG_MACH_APF27
-+#define IRQ_FPGA_START (IRQ_GPIOF(32) + 1)
++#define IRQ_FPGA_START (IRQ_GPIOF(32))
+#endif
+#define IRQ_FPGA(x) (IRQ_FPGA_START + x)
++#define NR_IRQS_FPGA (32)
+
-+
+#endif /* __ASM_ARCH_ARMADEUS_FPGA_H__ */
+
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/323-apf27-armadeus-increases_max_irq_number.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/323-apf27-armadeus-increases_max_irq_number.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.13/323-apf27-armadeus-increases_max_irq_number.patch 2009-04-15 11:54:45 UTC (rev 1224)
@@ -0,0 +1,29 @@
+Index: linux-2.6.27.13/arch/arm/plat-mxc/include/mach/mx27.h
+===================================================================
+--- linux-2.6.27.13.orig/arch/arm/plat-mxc/include/mach/mx27.h 2009-04-15 10:16:59.000000000 +0200
++++ linux-2.6.27.13/arch/arm/plat-mxc/include/mach/mx27.h 2009-04-15 10:23:26.000000000 +0200
+@@ -289,7 +289,8 @@
+ #define cpu_is_mx27() (1)
+
+ /* this CPU supports up to 192 GPIOs (don't forget the baseboard!) */
+-#define ARCH_NR_GPIOS (192 + 16)
++#define MXC_MAX_GPIO_LINES (192)
++#define ARCH_NR_GPIOS (MXC_MAX_GPIO_LINES + 16)
+
+ /* OS clock tick rate */
+ #define CLOCK_TICK_RATE 13300000
+@@ -297,10 +298,11 @@
+ /* Start of RAM */
+ #define PHYS_OFFSET SDRAM_BASE_ADDR
+
+-/* max interrupt lines count */
+-#define NR_IRQS 256
+-
+ /* count of internal interrupt sources */
+ #define MXC_MAX_INT_LINES 64
+
++/* max interrupt lines count */
++#define MXC_MAX_VIRTUAL_INTS 64
++#define NR_IRQS (MXC_MAX_INT_LINES + MXC_MAX_GPIO_LINES + MXC_MAX_VIRTUAL_INTS)
++
+ #endif /* __ASM_ARCH_MXC_MX27_H__ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|