[Armadeus-commitlog] armadeus branch, master, updated. release-3.4-143-g23232f3
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-05-18 10:38: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 23232f3d21dda09ec9e445e21aaceaf2e8f971c9 (commit)
via d3cd7f21e9a0bd9cb1a9950cff37a3971b09d9cc (commit)
from 60f9b13b7a8ad23549c55144f7a16f8ee0d048fc (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 23232f3d21dda09ec9e445e21aaceaf2e8f971c9
Author: Julien Boibessot <jul...@ar...>
Date: Wed May 18 12:37:36 2011 +0200
[LINUX] APF27: Change FPGA resources declaration (2.6.29 & 2.6.38) to mimic APF51
commit d3cd7f21e9a0bd9cb1a9950cff37a3971b09d9cc
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 17:24:01 2011 +0200
Indentation (Lindent)
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf27/apf27-linux-2.6.29.config | 3 +-
.../armadeus/apf27/apf27-linux-2.6.38.config | 3 +-
.../2.6.29/281-apf27-armadeus-add_apf27.c.patch | 77 ++++----------------
...-apf27-armadeus-add_apf27_to_build_system.patch | 18 ++---
...291-apf27-armadeus-add_mach_board-apf27_h.patch | 25 +------
.../322-apf27-armadeus-add_mach_fpga_h.patch | 38 +++++-----
.../2.6.38/281-apf27-armadeus-add_apf27.c.patch | 70 ++----------------
...-apf27-armadeus-add_apf27_to_build_system.patch | 20 ++----
.../322-apf27-armadeus-add_mach_fpga_h.patch | 5 +-
.../fpga/dev_tools/loader/apf27-fpga-loader.c | 40 +++++++----
.../wishbone_example/wb_irq_mngr/board_irq_mng.c | 20 +++++-
.../fpga/wishbone_example/wb_irq_mngr/main.c | 9 ++-
12 files changed, 110 insertions(+), 218 deletions(-)
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
index 51a87d1..76b117a 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
+++ b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.29.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.29.6
-# Wed Mar 2 18:33:57 2011
+# Wed May 18 11:57:38 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -186,7 +186,6 @@ CONFIG_MACH_MX27=y
# MX2 Platforms
#
CONFIG_MACH_APF27=y
-CONFIG_MACH_APF27_FPGA=y
# CONFIG_MACH_MX27ADS is not set
# CONFIG_MACH_PCM038 is not set
# CONFIG_MACH_PCM970_BASEBOARD is not set
diff --git a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config
index 70346da..5be812f 100644
--- a/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config
+++ b/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.38.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38.1 Kernel Configuration
-# Tue May 10 13:46:36 2011
+# Wed May 18 12:19:19 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -287,7 +287,6 @@ CONFIG_MACH_MX27=y
# CONFIG_MACH_PCA100 is not set
# CONFIG_MACH_MXT_TD60 is not set
CONFIG_MACH_APF27=y
-CONFIG_MACH_APF27_FPGA=y
CONFIG_MACH_APF27_HAS_BASEBOARD=y
CONFIG_MACH_APF27_DEV=y
CONFIG_MACH_APF27_DEV_EXT_NONE=y
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
index ab4a3df..25876e1 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/281-apf27-armadeus-add_apf27.c.patch
@@ -9,14 +9,14 @@ Signed-off-by: Eric Jarrige <eri...@ar...>
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27.c 2010-07-28 10:43:04.000000000 +0200
-@@ -0,0 +1,789 @@
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27.c 2011-05-18 11:27:34.000000000 +0200
+@@ -0,0 +1,739 @@
+ /*
+ * apf27.c
+ *
+ * Support for the APF27 System On Module
+ *
-+ * Copyright (C) 2008 Armadeus Systems
++ * Copyright (C) 2008-2011 ARMadeus Systems
+ * Authors: Julien Boibessot <jul...@ar...>
+ * Eric Jarrige <eri...@ar...>
+ *
@@ -40,7 +40,6 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
+
+#include <linux/platform_device.h>
+#include <linux/mtd/physmap.h>
-+#include <asm/mach/flash.h>
+#include <linux/i2c.h>
+#include <linux/serial.h>
+#include <linux/delay.h>
@@ -48,6 +47,9 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
+#include <linux/cpufreq.h>
+#include <linux/clk.h>
+#include <linux/dma-mapping.h>
++#include <linux/fsl_devices.h> /* USB device */
++
++#include <asm/mach/flash.h>
+#include <asm/io.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
@@ -62,16 +64,13 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
+#include <mach/mxc_nand.h>
+#include <mach/mxc_ehci.h>
+#include <mach/ulpi.h>
-+#include <linux/fsl_devices.h> /* USB device */
+#include "../../../drivers/armadeus/pwm/pwm.h"
+#if defined(CONFIG_CPU_FREQ_IMX27) || defined(CONFIG_CPU_FREQ_IMX27_MODULE)
+#include "cpufreq_imx.h"
+#endif
+#include <mach/board-apf27.h>
+#include <asm/mach/map.h>
-+#ifdef CONFIG_MACH_APF27_FPGA
-+#include <mach/fpga.h>
-+#endif
++
+#include "devices.h"
+#include "crm_regs.h"
+
@@ -686,41 +685,6 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
+};
+
+
-+/* APF27 has an optional Spartan3A FPGA connected to i.MX27 address/data
-+ busses */
-+#ifdef CONFIG_MACH_APF27_FPGA
-+static int fpga_pins[] = {
-+ (APF27_FPGA_INT_PIN | GPIO_IN | GPIO_GPIO),
-+};
-+
-+static int apf27_fpga_irq_init(struct platform_device *pdev)
-+{
-+ int res;
-+
-+ res = mxc_gpio_setup_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
-+ if (!res)
-+ set_irq_type(APF27_FPGA_IRQ, IRQ_TYPE_EDGE_RISING);
-+
-+ return res;
-+}
-+
-+static void apf27_fpga_irq_exit(struct platform_device *pdev)
-+{
-+ mxc_gpio_release_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins));
-+}
-+
-+struct fpga_irq_mng_platform_data apf27_fpga_irq = {
-+ .init = apf27_fpga_irq_init,
-+ .exit = apf27_fpga_irq_exit,
-+};
-+
-+struct platform_device apf27_ocore_irq_mng_device = {
-+ .name = "ocore_irq_mng",
-+ .id = 0,
-+};
-+#endif /* CONFIG_MACH_APF27_FPGA */
-+
-+
+static void __init apf27_init(void)
+{
+ sysdev_class_register(&apf27_pm_sysclass);
@@ -756,10 +720,6 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
+#endif
+ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+
-+#ifdef CONFIG_MACH_APF27_FPGA
-+ mxc_register_device(&apf27_ocore_irq_mng_device, &apf27_fpga_irq);
-+#endif
-+
+ printk("i.MX27 chip revision: %d\n", mx27_revision() );
+
+ apf27_baseboard_init();
@@ -775,19 +735,9 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
+ .init = apf27_timer_init,
+};
+
-+static struct map_desc apf27_io_desc[] __initdata = {
-+ {
-+ .virtual = CS5_BASE_ADDR_VIRT,
-+ .pfn = __phys_to_pfn(CS5_BASE_ADDR),
-+ .length = CS5_SIZE,
-+ .type = MT_DEVICE,
-+ },
-+};
-+
+void __init apf27_map_io(void)
+{
+ mxc_map_io();
-+ iotable_init(apf27_io_desc, ARRAY_SIZE(apf27_io_desc));
+}
+
+MACHINE_START(APF27, "Armadeus APF27")
@@ -803,8 +753,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2010-07-28 10:59:04.000000000 +0200
-@@ -0,0 +1,1139 @@
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c 2011-05-18 11:28:20.000000000 +0200
+@@ -0,0 +1,1138 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -839,6 +789,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#include <linux/cpufreq.h>
+#include <linux/clk.h>
+#include <linux/dma-mapping.h>
++
+#include <asm/io.h>
+#include <asm/mach/arch.h>
+#include <asm/mach-types.h>
@@ -877,9 +828,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
+#endif
+#include <mach/board-apf27.h>
+#include <asm/mach/map.h>
-+#ifdef CONFIG_MACH_APF27_FPGA
-+#include <mach/fpga.h>
-+#endif
++
+#include "devices.h"
+#include "crm_regs.h"
+
@@ -1947,7 +1896,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c 2010-07-28 10:43:04.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c 2011-05-18 11:27:34.000000000 +0200
@@ -0,0 +1,220 @@
+/*
+ * apf27-lcd.c
@@ -2172,7 +2121,7 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-lcd.c
Index: linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c 2010-07-28 10:43:04.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/apf27-dev-ext-apw.c 2011-05-18 11:27:34.000000000 +0200
@@ -0,0 +1,190 @@
+ /*
+ * apf27-dev-ext-apw.c
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/282-apf27-armadeus-add_apf27_to_build_system.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/282-apf27-armadeus-add_apf27_to_build_system.patch
index 1b3ce65..444f97f 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/282-apf27-armadeus-add_apf27_to_build_system.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/282-apf27-armadeus-add_apf27_to_build_system.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.29.6/arch/arm/mach-mx2/Kconfig
===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/Kconfig 2009-12-15 19:54:59.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/Kconfig 2009-12-16 10:34:20.000000000 +0100
-@@ -10,6 +10,21 @@
+--- linux-2.6.29.6.orig/arch/arm/mach-mx2/Kconfig 2011-05-18 11:28:48.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/Kconfig 2011-05-18 11:57:01.000000000 +0200
+@@ -10,6 +10,15 @@
comment "MX2 Platforms"
depends on ARCH_MX2
@@ -15,16 +15,10 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/Kconfig
+ Include support for APF27 platform. This includes specific
+ configurations for the module and its peripherals.
+
-+config MACH_APF27_FPGA
-+ bool "board has a FPGA"
-+ depends on MACH_APF27
-+ help
-+ Select this if your APF27 has an onboard FPGA.
-+
config MACH_MX27ADS
bool "MX27ADS platform"
depends on MACH_MX27
-@@ -26,15 +41,98 @@
+@@ -26,15 +35,98 @@
choice
prompt "Baseboard"
@@ -126,8 +120,8 @@ Index: linux-2.6.29.6/arch/arm/mach-mx2/Kconfig
+
Index: linux-2.6.29.6/arch/arm/mach-mx2/Makefile
===================================================================
---- linux-2.6.29.6.orig/arch/arm/mach-mx2/Makefile 2009-12-15 19:54:59.000000000 +0100
-+++ linux-2.6.29.6/arch/arm/mach-mx2/Makefile 2009-12-16 10:19:31.000000000 +0100
+--- linux-2.6.29.6.orig/arch/arm/mach-mx2/Makefile 2011-05-18 11:28:48.000000000 +0200
++++ linux-2.6.29.6/arch/arm/mach-mx2/Makefile 2011-05-18 11:56:17.000000000 +0200
@@ -10,6 +10,10 @@
obj-$(CONFIG_MACH_MX27) += clock_imx27.o
obj-$(CONFIG_CPU_FREQ_IMX27) += cpufreq_imx27.o
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch
index 7ce02f9..d7e8578 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/291-apf27-armadeus-add_mach_board-apf27_h.patch
@@ -1,10 +1,10 @@
-Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/board-apf27.h
+Index: linux-2.6.29.6/arch/arm/plat-mxc/include/mach/board-apf27.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29/arch/arm/plat-mxc/include/mach/board-apf27.h 2009-04-14 18:34:53.000000000 +0200
-@@ -0,0 +1,45 @@
++++ linux-2.6.29.6/arch/arm/plat-mxc/include/mach/board-apf27.h 2011-05-18 10:02:40.000000000 +0200
+@@ -0,0 +1,28 @@
+/*
-+ * Copyright (C) 2008 Armadeus Systems
++ * Copyright (C) 2008-2011 ARMadeus Systems
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -24,27 +24,10 @@ Index: linux-2.6.29/arch/arm/plat-mxc/include/mach/board-apf27.h
+#ifndef __ASM_ARCH_MXC_BOARD_APF27_H__
+#define __ASM_ARCH_MXC_BOARD_APF27_H__
+
-+
+#include <mach/iomux-mx1-mx2.h>
+
+/* mandatory for CONFIG_LL_DEBUG */
+#define MXC_LL_UART_PADDR UART1_BASE_ADDR
+#define MXC_LL_UART_VADDR AIPI_IO_ADDRESS(UART1_BASE_ADDR)
+
-+/* CS5 */
-+#define CS5_BASE_ADDR_VIRT 0xF4300000
-+#define CS5_SIZE SZ_1M
-+
-+/* FPGA addresses */
-+#define APF27_FPGA_VIRT (CS5_BASE_ADDR_VIRT)
-+#define APF27_FPGA_PHYS (CS5_BASE_ADDR)
-+#define ARMADEUS_FPGA_BASE_ADDR_VIRT (APF27_FPGA_VIRT)
-+#define ARMADEUS_FPGA_BASE_ADDR_PHYS (APF27_FPGA_PHYS)
-+
-+/* FPGA IRQ */
-+#define APF27_FPGA_INT_PIN (GPIO_PORTF | 12)
-+#define APF27_FPGA_IRQ (IRQ_GPIOF(12))
-+#define ARMADEUS_FPGA_IRQ (APF27_FPGA_IRQ)
-+
-+
+#endif /* __ASM_ARCH_MXC_BOARD_APF27_H__ */
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
index 1e129a6..1e1e8fc 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.29/322-apf27-armadeus-add_mach_fpga_h.patch
@@ -1,10 +1,10 @@
-Index: linux-2.6.29.4/arch/arm/plat-mxc/include/mach/fpga.h
+Index: linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.29.4/arch/arm/plat-mxc/include/mach/fpga.h 2009-06-08 17:40:21.000000000 +0200
++++ linux-2.6.29.6/arch/arm/plat-mxc/include/mach/fpga.h 2011-05-18 10:01:49.000000000 +0200
@@ -0,0 +1,43 @@
+/*
-+ * Copyright (C) 2009 Armadeus Systems
++ * Copyright (C) 2009-2011 ARMadeus Systems
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
@@ -24,25 +24,25 @@ Index: linux-2.6.29.4/arch/arm/plat-mxc/include/mach/fpga.h
+#ifndef __ASM_ARCH_ARMADEUS_FPGA_H__
+#define __ASM_ARCH_ARMADEUS_FPGA_H__
+
++#ifndef CONFIG_MACH_APF9328
++# include <mach/irqs.h>
++# include <mach/gpio.h>
++#endif
++#include <mach/iomux-mx1-mx2.h>
+
-+#ifdef CONFIG_MACH_APF27
-+#include <mach/board-apf27.h> /* @ are here */
-+#include <mach/irqs.h>
++#if defined(CONFIG_MACH_APF27) /* */
++# define APF27_FPGA_BASE_ADDR 0xd6000000
++# define ARMADEUS_FPGA_BASE_ADDR APF27_FPGA_BASE_ADDR
++# define APF27_FPGA_INT_PIN (GPIO_PORTF | 12)
++# define APF27_FPGA_IRQ (IRQ_GPIOF(12))
++# define ARMADEUS_FPGA_IRQ APF27_FPGA_IRQ
++# define IRQ_FPGA_START MXC_BOARD_IRQ_START
++#elif defined(CONFIG_MACH_APF9328) /* */
++# define APF9328_FPGA_BASE_ADDR 0x12000000
++# define ARMADEUS_FPGA_BASE_ADDR APF9328_FPGA_BASE_ADDR
+#else
-+/* To complete when MX1 platform merged */
++# error "Unsupported platform"
+#endif
-+#include <linux/platform_device.h>
+
-+/* FPGA interrupts number */
-+#ifdef CONFIG_MACH_APF27
-+#define IRQ_FPGA_START (MXC_BOARD_IRQ_START)
-+#endif
+#define IRQ_FPGA(x) (IRQ_FPGA_START + x)
-+#define NR_IRQS_FPGA (MXC_BOARD_IRQS)
-+
-+struct fpga_irq_mng_platform_data {
-+ int (*init)(struct platform_device*);
-+ void (*exit)(struct platform_device*);
-+};
-+
+#endif /* __ASM_ARCH_ARMADEUS_FPGA_H__ */
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
index 8126a2d..a5c441a 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/281-apf27-armadeus-add_apf27.c.patch
@@ -12,8 +12,8 @@ Signed-off-by: Kevin Joly <jol...@gm...>
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27.c 2011-05-10 14:19:07.000000000 +0200
-@@ -0,0 +1,728 @@
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27.c 2011-05-17 22:34:43.000000000 +0200
+@@ -0,0 +1,675 @@
+ /*
+ * apf27.c
+ *
@@ -77,9 +77,6 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+#endif
+//#include <mach/board-apf27.h>
+#include <asm/mach/map.h>
-+#ifdef CONFIG_MACH_APF27_FPGA
-+#include <mach/fpga.h>
-+#endif
+#include <mach/mx27.h>
+
+#include "devices-imx27.h"
@@ -613,49 +610,6 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+};
+
+
-+/* APF27 has an optional Spartan3A FPGA connected to i.MX27 address/data
-+ busses */
-+#ifdef CONFIG_MACH_APF27_FPGA
-+static int fpga_pins[] = {
-+ (APF27_FPGA_INT_PIN | GPIO_IN | GPIO_GPIO),
-+};
-+
-+static int apf27_fpga_irq_init(struct platform_device *pdev)
-+{
-+ int res;
-+
-+ res = mxc_gpio_setup_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
-+ if (!res)
-+ set_irq_type(APF27_FPGA_IRQ, IRQ_TYPE_EDGE_RISING);
-+
-+ return res;
-+}
-+
-+static void apf27_fpga_irq_exit(struct platform_device *pdev)
-+{
-+ mxc_gpio_release_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins));
-+}
-+
-+struct fpga_irq_mng_platform_data apf27_fpga_irq = {
-+ .init = apf27_fpga_irq_init,
-+ .exit = apf27_fpga_irq_exit,
-+};
-+
-+struct platform_device apf27_ocore_irq_mng_device = {
-+ .name = "ocore_irq_mng",
-+ .id = 0,
-+};
-+
-+static struct map_desc apf27_fpga_io_desc[] __initdata = {
-+ {
-+ .virtual = CS5_BASE_ADDR_VIRT,
-+ .pfn = __phys_to_pfn(MX27_CS5_BASE_ADDR),
-+ .length = CS5_SIZE,
-+ .type = MT_DEVICE,
-+ },
-+};
-+#endif /* CONFIG_MACH_APF27_FPGA */
-+
+static void __init apf27_init(void)
+{
+ int ret;
@@ -707,10 +661,6 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+
+ platform_add_devices(platform_devices, ARRAY_SIZE(platform_devices));
+
-+#ifdef CONFIG_MACH_APF27_FPGA
-+ mxc_register_device(&apf27_ocore_irq_mng_device, &apf27_fpga_irq);
-+#endif
-+
+ printk("i.MX27 chip revision: %d\n", mx27_revision() );
+#ifdef CONFIG_MACH_APF27_HAS_BASEBOARD
+ apf27_baseboard_init();
@@ -729,9 +679,6 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
+void __init apf27_map_io(void)
+{
+ mx27_map_io();
-+#ifdef CONFIG_MACH_APF27_FPGA
-+ iotable_init(apf27_fpga_io_desc, ARRAY_SIZE(apf27_fpga_io_desc));
-+#endif
+}
+
+MACHINE_START(APF27, "Armadeus APF27")
@@ -745,8 +692,8 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27.c
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c 2011-05-10 14:05:29.000000000 +0200
-@@ -0,0 +1,938 @@
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c 2011-05-18 12:18:06.000000000 +0200
+@@ -0,0 +1,935 @@
+ /*
+ * apf27-dev.c
+ * Support for AFP27 module's development baseboard
@@ -827,9 +774,6 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c
+#endif
+//#include <mach/board-apf27.h>
+#include <asm/mach/map.h>
-+#ifdef CONFIG_MACH_APF27_FPGA
-+#include <mach/fpga.h>
-+#endif
+
+#include "devices-imx27.h"
+//#include "crm_regs.h"
@@ -1688,7 +1632,7 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev.c
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c 2011-05-10 14:05:29.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c 2011-05-17 16:54:22.000000000 +0200
@@ -0,0 +1,168 @@
+/*
+ * apf27-lcd.c
@@ -1861,7 +1805,7 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-lcd.c
Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c 2011-05-10 14:05:29.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c 2011-05-17 16:54:22.000000000 +0200
@@ -0,0 +1,175 @@
+ /*
+ * apf27-dev-ext-apw.c
@@ -2041,7 +1985,7 @@ Index: linux-2.6.38.1/arch/arm/mach-imx/apf27-dev-ext-apw.c
Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
===================================================================
--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-03-23 21:04:47.000000000 +0100
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-10 14:18:07.000000000 +0200
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-18 12:20:17.000000000 +0200
@@ -83,6 +83,7 @@
case MACH_TYPE_MX21ADS:
case MACH_TYPE_PCA100:
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch
index c0d8790..ef92ed5 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/282-apf27-armadeus-add_apf27_to_build_system.patch
@@ -1,8 +1,8 @@
-Index: linux-2.6.38-rc3/arch/arm/mach-imx/Kconfig
+Index: linux-2.6.38.1/arch/arm/mach-imx/Kconfig
===================================================================
---- linux-2.6.38-rc3.orig/arch/arm/mach-imx/Kconfig 2011-04-04 14:51:50.000000000 +0200
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/Kconfig 2011-04-04 14:54:28.000000000 +0200
-@@ -350,4 +350,122 @@
+--- linux-2.6.38.1.orig/arch/arm/mach-imx/Kconfig 2011-05-17 22:35:01.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/Kconfig 2011-05-18 12:18:42.000000000 +0200
+@@ -350,4 +350,116 @@
Include support for i-MXT (aka td60) platform. This
includes specific configurations for the module and its peripherals.
@@ -23,12 +23,6 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/Kconfig
+ Include support for APF27 platform. This includes specific
+ configurations for the module and its peripherals.
+
-+config MACH_APF27_FPGA
-+ bool "board has a FPGA"
-+ depends on MACH_APF27
-+ help
-+ Select this if your APF27 has an onboard FPGA.
-+
+config MACH_APF27_HAS_BASEBOARD
+ bool
+
@@ -125,10 +119,10 @@ Index: linux-2.6.38-rc3/arch/arm/mach-imx/Kconfig
+ depends on MACH_APF27_DEV_EXT_WIRELESS_GPS
+
endif
-Index: linux-2.6.38-rc3/arch/arm/mach-imx/Makefile
+Index: linux-2.6.38.1/arch/arm/mach-imx/Makefile
===================================================================
---- linux-2.6.38-rc3.orig/arch/arm/mach-imx/Makefile 2011-04-04 14:51:50.000000000 +0200
-+++ linux-2.6.38-rc3/arch/arm/mach-imx/Makefile 2011-04-04 14:53:56.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/mach-imx/Makefile 2011-05-17 22:35:00.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-imx/Makefile 2011-05-17 22:35:11.000000000 +0200
@@ -38,3 +38,7 @@
obj-$(CONFIG_MACH_EUKREA_MBIMX27_BASEBOARD) += eukrea_mbimx27-baseboard.o
obj-$(CONFIG_MACH_PCA100) += mach-pca100.o
diff --git a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/322-apf27-armadeus-add_mach_fpga_h.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/322-apf27-armadeus-add_mach_fpga_h.patch
index f709610..0e652b3 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/322-apf27-armadeus-add_mach_fpga_h.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/322-apf27-armadeus-add_mach_fpga_h.patch
@@ -1,8 +1,8 @@
Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/fpga.h
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/fpga.h 2011-05-17 14:44:36.000000000 +0200
-@@ -0,0 +1,49 @@
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/fpga.h 2011-05-17 22:14:29.000000000 +0200
+@@ -0,0 +1,50 @@
+/*
+ * Copyright (C) 2009-2011 ARMadeus Systems
+ *
@@ -37,6 +37,7 @@ Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/fpga.h
+# define ARMADEUS_FPGA_IRQ APF51_FPGA_IRQ
+# define IRQ_FPGA_START (MXC_BOARD_IRQ_START + 64)
+#elif defined(CONFIG_MACH_APF27) /* */
++#include <mach/iomux-v1.h>
+# define APF27_FPGA_BASE_ADDR 0xd6000000
+# define ARMADEUS_FPGA_BASE_ADDR APF27_FPGA_BASE_ADDR
+# define APF27_FPGA_INT_PIN (GPIO_PORTF | 12)
diff --git a/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c b/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
index 2c80a8e..6c77b2e 100644
--- a/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
+++ b/target/linux/modules/fpga/dev_tools/loader/apf27-fpga-loader.c
@@ -43,20 +43,31 @@
#define CFG_FPGA_SUSPEND (GPIO_PORTF | 10) /* FPGA done pin */
#define CFG_FPGA_RESET (GPIO_PORTF | 7) /* FPGA done pin */
+void *fpga_membase;
+
static int fpga_shared_pins[] = {
(CFG_FPGA_INIT | GPIO_IN | GPIO_PUEN | GPIO_GPIO),
};
-
/* Initialize GPIO port before download */
int apf27_fpga_pre(void)
{
int res = 0;
+ fpga_membase = ioremap(ARMADEUS_FPGA_BASE_ADDR, 16);
+ if (!fpga_membase) {
+ printk(KERN_ERR "ioremap failed\n");
+ return -ENOMEM;
+ }
+
/* initialize common gpio "shared" with other apps */
- res = mxc_gpio_setup_multiple_pins(fpga_shared_pins, ARRAY_SIZE(fpga_shared_pins), "FPGA_LOADER");
+ res =
+ mxc_gpio_setup_multiple_pins(fpga_shared_pins,
+ ARRAY_SIZE(fpga_shared_pins),
+ "FPGA_LOADER");
if (res) {
- printk("FPGA prog pins already reserved !!\n");
+ printk(KERN_ERR "FPGA prog pins already reserved !!\n");
+ iounmap(fpga_membase);
return res;
}
@@ -83,7 +94,7 @@ int apf27_fpga_pre(void)
/* make sure the reset pin is active due to DLL start up */
mxc_gpio_mode(CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
- gpio_set_value(CFG_FPGA_RESET,1);
+ gpio_set_value(CFG_FPGA_RESET, 1);
/* make sure the fpga is powered */
gpio_set_value(CFG_FPGA_PWR, 0);
@@ -106,7 +117,7 @@ int apf27_fpga_pgm(int assert)
*/
int apf27_fpga_clk(int assert_clk)
{
- gpio_set_value( CFG_FPGA_CLK, !assert_clk);
+ gpio_set_value(CFG_FPGA_CLK, !assert_clk);
return assert_clk;
}
@@ -149,9 +160,9 @@ int apf27_fpga_cs(int assert_cs)
return assert_cs;
}
-int apf27_fpga_wdata( unsigned char data )
+int apf27_fpga_wdata(unsigned char data)
{
- __raw_writew(data, ARMADEUS_FPGA_BASE_ADDR_VIRT);
+ __raw_writew(data, fpga_membase);
return data;
}
@@ -163,7 +174,9 @@ int apf27_fpga_busy(void)
int apf27_fpga_post(void)
{
- mxc_gpio_release_multiple_pins(fpga_shared_pins, ARRAY_SIZE(fpga_shared_pins));
+ iounmap(fpga_membase);
+ mxc_gpio_release_multiple_pins(fpga_shared_pins,
+ ARRAY_SIZE(fpga_shared_pins));
/* reconfigure bus ctrl signals */
mxc_gpio_mode(CFG_FPGA_RW | GPIO_PF | GPIO_PUEN);
mxc_gpio_mode(CFG_FPGA_CS | GPIO_PF | GPIO_PUEN);
@@ -172,7 +185,7 @@ int apf27_fpga_post(void)
gpio_set_value(CFG_FPGA_PRG, 1);
/* reset off */
gpio_set_value(CFG_FPGA_RESET, 0);
- mxc_gpio_mode(CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
+ mxc_gpio_mode(CFG_FPGA_RESET | GPIO_OUT | GPIO_PUEN | GPIO_GPIO);
return 0;
}
@@ -205,14 +218,14 @@ Xilinx_Spartan3_Slave_Parallel_fns fpga_fns = {
struct fpga_desc apf27_fpga_desc = {
.family = Xilinx_Spartan,
.iface = slave_parallel,
- .iface_fns = (void *) &fpga_fns
+ .iface_fns = (void *)&fpga_fns
};
static struct platform_device fpga_device = {
- .name = "fpgaloader",
- .id = 0,
+ .name = "fpgaloader",
+ .id = 0,
.dev = {
- .platform_data = &apf27_fpga_desc,
+ .platform_data = &apf27_fpga_desc,
},
};
@@ -228,4 +241,3 @@ static int __init apf27_fpga_initialize(void)
}
device_initcall(apf27_fpga_initialize);
-
diff --git a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
index d92eff1..9c4e44c 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
@@ -2,7 +2,7 @@
* Platform data for IRQ manager generic driver
*
* (c) Copyright 2011 The Armadeus Project - ARMadeus Systems
- * Author: Julien Bibessot <jul...@ar...>
+ * Author: Julien Boibessot <jul...@ar...>
*
* 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
@@ -68,15 +68,31 @@ static struct platform_device irq_mng0_device = {
.resource = irq_mng0_resources,
};
+#ifdef CONFIG_MACH_APF27
+static int fpga_pins[] = {
+ (APF27_FPGA_INT_PIN | GPIO_IN | GPIO_GPIO),
+};
+#endif
+
static int __init board_irq_mng_init(void)
{
- set_irq_type(ARMADEUS_FPGA_IRQ, IRQF_TRIGGER_RISING);
+ int ret;
+
+#ifdef CONFIG_MACH_APF27
+ ret = mxc_gpio_setup_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins), "FPGA");
+ if (ret)
+ return -EINVAL;
+#endif
+ set_irq_type(ARMADEUS_FPGA_IRQ, IRQ_TYPE_EDGE_RISING);
return platform_device_register(&irq_mng0_device);
}
static void __exit board_irq_mng_exit(void)
{
platform_device_unregister(&irq_mng0_device);
+#ifdef CONFIG_MACH_APF27
+ mxc_gpio_release_multiple_pins(fpga_pins, ARRAY_SIZE(fpga_pins));
+#endif
}
module_init(board_irq_mng_init);
diff --git a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/main.c b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/main.c
index 32da12b..13cf633 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/main.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/main.c
@@ -60,7 +60,7 @@ struct irq_mng {
struct resource *irq_res;
};
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,36)
struct irq_mng global_mng;
#endif
@@ -78,6 +78,7 @@ static void imx_fpga_ack_irq(struct irq_data *data)
#else
static void imx_fpga_ack_irq(unsigned int irq)
{
+ struct irq_mng *mng = &global_mng;
#endif
int shadow;
@@ -94,7 +95,7 @@ static void imx_fpga_mask_irq(struct irq_data *data)
#else
static void imx_fpga_mask_irq(unsigned int irq)
{
- struct irq_mng *mng = global_mng;
+ struct irq_mng *mng = &global_mng;
#endif
int shadow;
@@ -112,7 +113,7 @@ static void imx_fpga_unmask_irq(struct irq_data *data)
#else
static void imx_fpga_unmask_irq(unsigned int irq)
{
- struct irq_mng *mng = global_mng;
+ struct irq_mng *mng = &global_mng;
#endif
int shadow;
@@ -222,7 +223,7 @@ static int __devinit ocore_irq_mng_probe(struct platform_device *pdev)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
mng = kmalloc(sizeof(struct irq_mng), GFP_KERNEL);
#else
- mng = global_mng;
+ mng = &global_mng;
#endif
if (!mng) {
ret = -ENOMEM;
hooks/post-receive
--
armadeus
|