[Armadeus-commitlog] armadeus branch, master, updated. release-3.4-141-g60f9b13
Brought to you by:
sszy
|
From: Julien B a. A. <ar...@us...> - 2011-05-17 14:29:32
|
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 60f9b13b7a8ad23549c55144f7a16f8ee0d048fc (commit)
via b9f019f47417f915230226c4ad4a4606a66f48b7 (commit)
via 544d483755e164c9b24a5a370c33b462b9824457 (commit)
via 3bfc0e7cfeb17d33d4b319ecdb841b4cf828bb19 (commit)
via 2a70384286bc5cc4e8fa6a4a4618a63cd5e829aa (commit)
via b4722b58fd8fdcf59b9ccb9437ac21212d7bbe68 (commit)
via 5abdd80cc27c5e6ab29f608ac4fa357facefa093 (commit)
via 9e8b08245713ad347697cc069e28f6d093ccd1e8 (commit)
via f0a73278649331e4cbe6da6ee711d45c43aff0b4 (commit)
from 38d9b8c222f030543a7d5ef727005fc7cb45981a (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 60f9b13b7a8ad23549c55144f7a16f8ee0d048fc
Merge: b9f019f47417f915230226c4ad4a4606a66f48b7 38d9b8c222f030543a7d5ef727005fc7cb45981a
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 16:28:28 2011 +0200
Merge branch 'master' of ssh://artemys@armadeus.git.sourceforge.net/gitroot/armadeus/armadeus
commit b9f019f47417f915230226c4ad4a4606a66f48b7
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 16:27:45 2011 +0200
[TEST] Better APF51 support for LED test
commit 544d483755e164c9b24a5a370c33b462b9824457
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 16:24:32 2011 +0200
[LINUX] Adds release() method to wishbone_example/wb_button
commit 3bfc0e7cfeb17d33d4b319ecdb841b4cf828bb19
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 16:23:41 2011 +0200
Lindent
commit 2a70384286bc5cc4e8fa6a4a4618a63cd5e829aa
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 16:21:36 2011 +0200
[LINUX] APF51: makes wishbone irq_manager supported by APF51
commit b4722b58fd8fdcf59b9ccb9437ac21212d7bbe68
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 13:31:50 2011 +0200
[LINUX] APF51: add supported wishbone drivers in default config
commit 5abdd80cc27c5e6ab29f608ac4fa357facefa093
Author: Julien Boibessot <jul...@ar...>
Date: Tue May 17 09:58:10 2011 +0200
[LINUX] Add platform data driver for twin UART IP (APF51Dev)
commit 9e8b08245713ad347697cc069e28f6d093ccd1e8
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 16 17:52:21 2011 +0200
[LINUX] Cleanup wishbone_example/wb_led and make it run on APF51
commit f0a73278649331e4cbe6da6ee711d45c43aff0b4
Author: Julien Boibessot <jul...@ar...>
Date: Mon May 16 15:13:30 2011 +0200
[LINUX] Cleanup wishbone_example/wb_irq_mngr, make it run on new kernel/APF51 and divide it into board specific and generic part
-----------------------------------------------------------------------
Summary of changes:
.../armadeus/apf51/apf51-linux-2.6.38.config | 12 +-
.../322-apf27-armadeus-add_mach_fpga_h.patch | 46 ++--
.../2.6.38/400-armadeus-add_apf51_module.patch | 20 +-
.../wishbone_example/wb_button/board_buttons.c | 9 +-
.../fpga/wishbone_example/wb_button/gbutton.c | 77 +++---
.../fpga/wishbone_example/wb_irq_mngr/Makefile | 2 +-
.../wishbone_example/wb_irq_mngr/board_irq_mng.c | 87 +++++++
.../fpga/wishbone_example/wb_irq_mngr/irq_mng.h} | 26 +--
.../fpga/wishbone_example/wb_irq_mngr/main.c | 257 ++++++++++++--------
.../fpga/wishbone_example/wb_irq_mngr/test.c | 8 +-
.../fpga/wishbone_example/wb_led/board_leds.c | 39 ++--
.../modules/fpga/wishbone_example/wb_led/g_led.c | 217 ++++++++---------
.../modules/fpga/wishbone_example/wb_led/led.h | 41 +---
.../linux/modules/fpga/wishbone_twin_uart/16750.c | 138 +++++++++++
.../fpga/{POD/void => wishbone_twin_uart}/Makefile | 14 +-
.../linux/modules/fpga/wishbone_twin_uart/README | 8 +
target/test/test_fpga.sh | 16 +-
17 files changed, 641 insertions(+), 376 deletions(-)
create mode 100644 target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
copy target/linux/{debug/imxregs/definitions.h => modules/fpga/wishbone_example/wb_irq_mngr/irq_mng.h} (62%)
create mode 100644 target/linux/modules/fpga/wishbone_twin_uart/16750.c
copy target/linux/modules/fpga/{POD/void => wishbone_twin_uart}/Makefile (54%)
mode change 100755 => 100644
create mode 100644 target/linux/modules/fpga/wishbone_twin_uart/README
diff --git a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
index 17ae00d..0fbd4d9 100644
--- a/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
+++ b/buildroot/target/device/armadeus/apf51/apf51-linux-2.6.38.config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux/arm 2.6.38.1 Kernel Configuration
-# Thu May 5 10:50:28 2011
+# Thu May 12 11:42:55 2011
#
CONFIG_ARM=y
CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -1079,7 +1079,10 @@ CONFIG_DEVKMEM=y
#
# Serial drivers
#
-# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_8250=m
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+# CONFIG_SERIAL_8250_EXTENDED is not set
#
# Non-8250 serial port support
@@ -1724,7 +1727,10 @@ CONFIG_ARMADEUS_FPGA_LOADER_DRIVER=m
#
# CONFIG_ARMADEUS_I2C_OCORE_IRQMNG is not set
# CONFIG_ARMADEUS_PS2KBD_DRIVER is not set
-# CONFIG_ARMADEUS_WISHBONE_EXAMPLE_DRIVERS is not set
+CONFIG_ARMADEUS_WISHBONE_EXAMPLE_DRIVERS=y
+CONFIG_ARMADEUS_WISHBONE_EXAMPLE_BUTTON_DRIVER=m
+CONFIG_ARMADEUS_WISHBONE_EXAMPLE_LED_DRIVER=m
+CONFIG_ARMADEUS_WISHBONE_EXAMPLE_IRQ_MNGR_DRIVER=m
# CONFIG_POD_DRIVERS is not set
#
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 b6f4507..f709610 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,10 +1,10 @@
-Index: linux-2.6.36/arch/arm/plat-mxc/include/mach/fpga.h
+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.36/arch/arm/plat-mxc/include/mach/fpga.h 2010-11-25 20:23:44.000000000 +0100
-@@ -0,0 +1,43 @@
++++ 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 @@
+/*
-+ * 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,31 @@ Index: linux-2.6.36/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
+
-+#ifdef CONFIG_MACH_APF27
-+#include <mach/board-apf27.h> /* @ are here */
-+#include <mach/irqs.h>
++#if defined(CONFIG_MACH_APF51) /* */
++# define APF51_FPGA_BASE_ADDR 0xb8000000
++# define ARMADEUS_FPGA_BASE_ADDR APF51_FPGA_BASE_ADDR
++# define APF51_FPGA_INT_PIN (IMX_GPIO_NR(4, 11)) /* INITB */
++# 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) /* */
++# 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/400-armadeus-add_apf51_module.patch b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch
index d53e66f..3f576d0 100644
--- a/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch
+++ b/buildroot/target/device/armadeus/linux/kernel-patches/2.6.38/400-armadeus-add_apf51_module.patch
@@ -1,7 +1,7 @@
Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-mx5/Kconfig 2011-05-03 16:22:02.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/mach-mx5/Kconfig 2011-05-03 16:49:55.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/mach-mx5/Kconfig 2011-05-17 14:45:14.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-mx5/Kconfig 2011-05-17 15:22:10.000000000 +0200
@@ -162,4 +162,16 @@
Include support for MX50 reference design platform (RDP) board. This
includes specific configurations for the board and its peripherals.
@@ -21,8 +21,8 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Kconfig
endif
Index: linux-2.6.38.1/arch/arm/mach-mx5/Makefile
===================================================================
---- linux-2.6.38.1.orig/arch/arm/mach-mx5/Makefile 2011-03-23 21:04:47.000000000 +0100
-+++ linux-2.6.38.1/arch/arm/mach-mx5/Makefile 2011-05-03 16:49:55.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/mach-mx5/Makefile 2011-05-17 14:44:47.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-mx5/Makefile 2011-05-17 15:22:10.000000000 +0200
@@ -7,6 +7,7 @@
obj-$(CONFIG_SOC_IMX50) += mm-mx50.o
@@ -34,7 +34,7 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/Makefile
Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
-+++ linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c 2011-05-03 16:50:51.000000000 +0200
++++ linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.c 2011-05-17 14:45:17.000000000 +0200
@@ -0,0 +1,495 @@
+/*
+ * Support for APF51 System On Module
@@ -533,8 +533,8 @@ Index: linux-2.6.38.1/arch/arm/mach-mx5/board-apf51.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-05-03 16:22:04.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-03 16:22:05.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-17 14:45:16.000000000 +0200
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h 2011-05-17 14:45:17.000000000 +0200
@@ -63,6 +63,7 @@
#define MX3X_UART1_BASE_ADDR 0x43F90000
#define MX3X_UART2_BASE_ADDR 0x43F94000
@@ -555,14 +555,14 @@ Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/uncompress.h
}
Index: linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h
===================================================================
---- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-05-03 16:22:05.000000000 +0200
-+++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h 2011-05-03 16:22:05.000000000 +0200
+--- linux-2.6.38.1.orig/arch/arm/plat-mxc/include/mach/irqs.h 2011-05-17 14:45:16.000000000 +0200
++++ linux-2.6.38.1/arch/arm/plat-mxc/include/mach/irqs.h 2011-05-17 15:23:51.000000000 +0200
@@ -53,6 +53,8 @@
#define MXC_BOARD_IRQS 80
#elif defined CONFIG_MACH_APF27
#define MXC_BOARD_IRQS 32
+#elif defined CONFIG_MACH_APF51
-+#define MXC_BOARD_IRQS 70 /* WM8311 eats a lot of them */
++#define MXC_BOARD_IRQS 80 /* WM8311 needs 64 of them and FPGA 16 */
#else
#define MXC_BOARD_IRQS 16
#endif
diff --git a/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c b/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c
index d530265..f662cf1 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_button/board_buttons.c
@@ -23,6 +23,7 @@
#include <linux/init.h>
#include <linux/module.h>
#include <linux/platform_device.h>
+
#include <mach/hardware.h>
#ifndef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
#include <mach/fpga.h>
@@ -52,11 +53,17 @@ static struct plat_button_port plat_button0_data = {
.idoffset = 0x00 * (16 / 8)
};
+void plat_button_release(struct device *dev)
+{
+ dev_dbg(dev, "released\n");
+}
+
static struct platform_device plat_button0_device = {
.name = "button",
.id = 0,
.dev = {
- .platform_data = &plat_button0_data
+ .release = plat_button_release,
+ .platform_data = &plat_button0_data
},
.num_resources = ARRAY_SIZE(button0_resources),
.resource = button0_resources,
diff --git a/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c b/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c
index a2ba158..2eb84d0 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_button/gbutton.c
@@ -38,20 +38,19 @@
#include "button.h"
-
struct button_dev {
- char *name; /* name of the instance */
- struct cdev cdev; /* char device structure */
- struct semaphore sem; /* mutex */
- void * membase; /* base address for instance */
- dev_t devno; /* to store Major and minor numbers */
- u8 read_in_wait; /* user is waiting for value to read */
+ char *name; /* name of the instance */
+ struct cdev cdev; /* char device structure */
+ struct semaphore sem; /* mutex */
+ void *membase; /* base address for instance */
+ dev_t devno; /* to store Major and minor numbers */
+ u8 read_in_wait; /* user is waiting for value to read */
struct resource *mem_res;
struct resource *irq_res;
};
-ssize_t button_read(struct file *fildes, char __user *buff,
- size_t count, loff_t *offp)
+ssize_t button_read(struct file *fildes, char __user * buff,
+ size_t count, loff_t * offp)
{
struct button_dev *ldev = fildes->private_data;
u16 data = 0;
@@ -59,7 +58,7 @@ ssize_t button_read(struct file *fildes, char __user *buff,
ldev->read_in_wait = 1;
- if (*offp + count >= 1) /* Only one word can be read */
+ if (*offp + count >= 1) /* Only one word can be read */
count = 1 - *offp;
if ((retval = down_interruptible(&ldev->sem)) < 0) {
@@ -67,7 +66,8 @@ ssize_t button_read(struct file *fildes, char __user *buff,
}
data = readw(ldev->membase + BUTTON_REG_OFFSET);
- pr_debug("Read %d at 0x%x\n", data, (unsigned int)ldev->membase + BUTTON_REG_OFFSET);
+ pr_debug("Read %d at 0x%x\n", data,
+ (unsigned int)ldev->membase + BUTTON_REG_OFFSET);
/* return data for user */
if (copy_to_user(buff, &data, 2)) {
@@ -87,7 +87,8 @@ out:
int button_open(struct inode *inode, struct file *filp)
{
/* Allocate and fill any data structure to be put in filp->private_data */
- filp->private_data = container_of(inode->i_cdev, struct button_dev, cdev);
+ filp->private_data =
+ container_of(inode->i_cdev, struct button_dev, cdev);
return 0;
}
@@ -104,8 +105,8 @@ int button_release(struct inode *inode, struct file *filp)
static struct file_operations button_fops = {
.owner = THIS_MODULE,
- .read = button_read,
- .open = button_open,
+ .read = button_read,
+ .open = button_open,
.release = button_release,
};
@@ -150,7 +151,9 @@ static int button_probe(struct platform_device *pdev)
return -EINVAL;
}
- mem_res = request_mem_region(mem_res->start, resource_size(mem_res), pdev->name);
+ mem_res =
+ request_mem_region(mem_res->start, resource_size(mem_res),
+ pdev->name);
if (!mem_res) {
dev_err(&pdev->dev, "iomem already in use\n");
return -EBUSY;
@@ -177,15 +180,15 @@ static int button_probe(struct platform_device *pdev)
if (ip_id != pdata->idnum) {
ret = -ENODEV;
dev_warn(&pdev->dev, "For %s id:%d doesn't match "
- "with id read %d,\n is device present ?\n",
- pdata->name, pdata->idnum, ip_id);
+ "with id read %d,\n is device present ?\n",
+ pdata->name, pdata->idnum, ip_id);
goto out_iounmap;
}
pdata->sdev = sdev;
- sdev->name = (char *)kmalloc((1+strlen(pdata->name))*sizeof(char),
- GFP_KERNEL);
+ sdev->name = (char *)kmalloc((1 + strlen(pdata->name)) * sizeof(char),
+ GFP_KERNEL);
if (sdev->name == NULL) {
dev_err(&pdev->dev, "Kmalloc name space error\n");
goto out_iounmap;
@@ -203,13 +206,11 @@ static int button_probe(struct platform_device *pdev)
ret = alloc_chrdev_region(&(sdev->devno), button_minor, 1, pdata->name);
if (ret < 0) {
dev_warn(&pdev->dev, "%s: can't get major %d\n",
- pdata->name, button_major);
+ pdata->name, button_major);
goto out_name_free;
}
dev_info(&pdev->dev, "%s: MAJOR: %d MINOR: %d\n",
- pdata->name,
- MAJOR(sdev->devno),
- MINOR(sdev->devno));
+ pdata->name, MAJOR(sdev->devno), MINOR(sdev->devno));
/* initiate mutex locked */
sdev->read_in_wait = 0;
@@ -218,10 +219,10 @@ static int button_probe(struct platform_device *pdev)
/* Init the cdev structure */
cdev_init(&sdev->cdev, &button_fops);
sdev->cdev.owner = THIS_MODULE;
- sdev->cdev.ops = &button_fops;
+ sdev->cdev.ops = &button_fops;
pr_debug("%s: Add the device to the kernel, "
- "connecting cdev to major/minor number \n", pdata->name);
+ "connecting cdev to major/minor number \n", pdata->name);
ret = cdev_add(&sdev->cdev, sdev->devno, 1);
if (ret < 0) {
dev_warn(&pdev->dev, "%s: can't add cdev\n", pdata->name);
@@ -230,16 +231,14 @@ static int button_probe(struct platform_device *pdev)
/* irq registering */
ret = request_irq(sdev->irq_res->start,
- button_interrupt,
- IRQF_SAMPLE_RANDOM,
- sdev->name,
- sdev);
+ button_interrupt,
+ IRQF_SAMPLE_RANDOM, sdev->name, sdev);
if (ret < 0) {
printk(KERN_ERR "Can't register irq %d\n",
- sdev->irq_res->start);
+ sdev->irq_res->start);
goto request_irq_error;
}
-
+
/* OK driver ready ! */
printk(KERN_INFO "%s loaded\n", pdata->name);
return 0;
@@ -285,14 +284,13 @@ static int __devexit button_remove(struct platform_device *pdev)
return 0;
}
-static struct platform_driver plat_button_driver =
-{
- .probe = button_probe,
- .remove = __devexit_p(button_remove),
- .driver = {
- .name = "button",
- .owner = THIS_MODULE,
- },
+static struct platform_driver plat_button_driver = {
+ .probe = button_probe,
+ .remove = __devexit_p(button_remove),
+ .driver = {
+ .name = "button",
+ .owner = THIS_MODULE,
+ },
};
static int __init button_init(void)
@@ -320,4 +318,3 @@ module_exit(button_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Fabien Marteau <fab...@ar...>");
MODULE_DESCRIPTION("Wishbone button IP generic driver");
-
diff --git a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/Makefile b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/Makefile
index e575612..db8e79c 100755
--- a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/Makefile
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/Makefile
@@ -6,7 +6,7 @@ ifneq ($(KERNELRELEASE),)
# Part executed when called from kernel build system:
-obj-$(CONFIG_ARMADEUS_WISHBONE_EXAMPLE_IRQ_MNGR_DRIVER) += irq_ocore.o test.o
+obj-$(CONFIG_ARMADEUS_WISHBONE_EXAMPLE_IRQ_MNGR_DRIVER) += irq_ocore.o board_irq_mng.o test.o
irq_ocore-objs := main.o
else
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
new file mode 100644
index 0000000..d92eff1
--- /dev/null
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/board_irq_mng.c
@@ -0,0 +1,87 @@
+/*
+ * Platform data for IRQ manager generic driver
+ *
+ * (c) Copyright 2011 The Armadeus Project - ARMadeus Systems
+ * Author: Julien Bibessot <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
+ * 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 <linux/interrupt.h>
+#include <linux/irq.h>
+
+#include <mach/hardware.h>
+#ifndef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
+#include <mach/fpga.h>
+#endif
+
+#include "irq_mng.h"
+
+static struct resource irq_mng0_resources[] = {
+ [0] = {
+ .start = ARMADEUS_FPGA_BASE_ADDR + 0x0,
+ .end = ARMADEUS_FPGA_BASE_ADDR + 0x0 + 0x8,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = ARMADEUS_FPGA_IRQ,
+ .end = ARMADEUS_FPGA_IRQ,
+ .flags = IORESOURCE_IRQ,
+ }
+};
+
+static struct ocore_irq_mng_pdata irq_mng0_data = {
+ .num = 0,
+ .idnum = 0x01,
+ .idoffset = 0x06,
+};
+
+void irq_mng0_release(struct device *dev)
+{
+ dev_dbg(dev, "released\n");
+}
+
+static struct platform_device irq_mng0_device = {
+ .name = "ocore_irq_mng",
+ .id = 0,
+ .dev = {
+ .release = irq_mng0_release,
+ .platform_data = &irq_mng0_data
+ },
+ .num_resources = ARRAY_SIZE(irq_mng0_resources),
+ .resource = irq_mng0_resources,
+};
+
+static int __init board_irq_mng_init(void)
+{
+ set_irq_type(ARMADEUS_FPGA_IRQ, IRQF_TRIGGER_RISING);
+ return platform_device_register(&irq_mng0_device);
+}
+
+static void __exit board_irq_mng_exit(void)
+{
+ platform_device_unregister(&irq_mng0_device);
+}
+
+module_init(board_irq_mng_init);
+module_exit(board_irq_mng_exit);
+
+MODULE_AUTHOR("Julien Boibessot <jul...@ar...>");
+MODULE_DESCRIPTION("Platform data for IRQ manager IP driver");
+MODULE_LICENSE("GPL");
diff --git a/target/linux/debug/imxregs/definitions.h b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/irq_mng.h
similarity index 62%
copy from target/linux/debug/imxregs/definitions.h
copy to target/linux/modules/fpga/wishbone_example/wb_irq_mngr/irq_mng.h
index ee71db3..2632c46 100644
--- a/target/linux/debug/imxregs/definitions.h
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/irq_mng.h
@@ -1,8 +1,8 @@
/*
- * definitions.h - imxregs common definitions
+ * Platform data for IRQ manager generic driver
*
- * Copyright (C) 2008 armadeus systems
- * Author: Julien Boibessot
+ * (c) Copyright 2011 The Armadeus Project - ARMadeus Systems
+ * Author: Julien Bibessot <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
@@ -17,20 +17,16 @@
* 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.
- *
*/
-typedef unsigned int u32;
+#ifndef __IRQ_MNG_H__
+#define __IRQ_MNG_H__
-struct reg_info {
- char *name;
- u32 addr;
- int shift;
- u32 mask;
- char type;
- char *desc;
+struct ocore_irq_mng_pdata {
+ int num; /* instance number */
+ int idnum; /* identity number */
+ int idoffset; /* identity register relative address */
+ struct irq_mng *mng;
};
-// Size of mmapping:
-#define MAP_SIZE 4096
-#define MAP_MASK ( MAP_SIZE - 1 )
+#endif /* __IRQ_MNG_H__ */
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 94c8f56..32da12b 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
@@ -1,8 +1,7 @@
/*
- * Driver for the IRQ manager (OpenCore/Wishbone based) loaded in the FPGA of
- * the Armadeus boards.
+ * Driver for the IRQ manager (OpenCore/Wishbone based) IP
*
- * (C) Copyright 2008 Armadeus Systems
+ * (C) Copyright 2008-2011 ARMadeus Systems
* Author: Julien Boibessot <jul...@ar...>
*
* Inspired of linux/arch/arm/mach-imx/irq.c
@@ -23,7 +22,7 @@
*
*/
-/* #define DEBUG */
+/*#define DEBUG*/
#include <linux/module.h>
#include <linux/init.h>
@@ -32,201 +31,262 @@
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/version.h>
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)
+#include <linux/slab.h> /* kmalloc */
+#endif
#include <mach/hardware.h>
#include <mach/irqs.h>
#include <asm/irq.h>
#include <asm/io.h> /* readb() & Co */
-
#include <asm/mach/irq.h>
-#ifdef CONFIG_MACH_APF27
-#include <mach/fpga.h> /* To remove when MX1 platform merged */
-#define VA_GPIO_BASE MX27_GPIO_BASE_ADDR
-#else
-#define VA_GPIO_BASE IO_ADDRESS(IMX_GPIO_BASE)
-#define MXC_ISR(x) (0x34 + ((x) << 8))
-struct fpga_irq_mng_platform_data { /* To remove when MX1 platform merged */
- int (*init)(struct platform_device*);
- void (*exit)(struct platform_device*);
-};
+
+#include "irq_mng.h"
+
+#ifndef CONFIG_MACH_APF9328
+# include <mach/fpga.h> /* To remove when MX1 platform is merged */
#endif
-#define IRQ_MNGR_BASE (0x0)
-#define ID (1)
-#define ID_OFFSET (0x02 *(16/8))
+#define ID_OFFSET (0x02 *(16/8))
+#define NB_IT 16
+#define FPGA_IMR 0x00 /* Interrupt Mask Register relative @*/
+#define FPGA_ISR 0x02 /* Interrupt Status Register relative @*/
-#define NB_IT (16)
+#define DRIVER_NAME "ocore_irq_mng"
-#define FPGA_IMR (ARMADEUS_FPGA_BASE_ADDR_VIRT + IRQ_MNGR_BASE + 0x00) /* Interrupt Mask Register */
-#define FPGA_ISR (ARMADEUS_FPGA_BASE_ADDR_VIRT + IRQ_MNGR_BASE + 0x02) /* Interrupt Status Register */
+struct irq_mng {
+ void *membase;
+ struct resource *mem_res;
+ struct resource *irq_res;
+};
-#define DRIVER_NAME "ocore_irq_mng"
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+struct irq_mng global_mng;
+#endif
-static int
-imx_fpga_irq_type(unsigned int _irq, unsigned int type)
+static int imx_fpga_irq_type(unsigned int _irq, unsigned int type)
{
return 0;
}
-static void
-imx_fpga_ack_irq(unsigned int irq)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+static void imx_fpga_ack_irq(struct irq_data *data)
+{
+ struct irq_mng *mng = irq_data_get_irq_chip_data(data);
+ unsigned int irq = data->irq;
+#else
+static void imx_fpga_ack_irq(unsigned int irq)
{
+#endif
int shadow;
shadow = 1 << ((irq - IRQ_FPGA_START) % NB_IT);
pr_debug("%s: irq %d ack:0x%x\n", __FUNCTION__, irq, shadow);
- writew(shadow, FPGA_ISR);
-
- /* if last IT, ack GPIO global IRQ */
- if (readw(FPGA_ISR) == 0) {
- __raw_writel(1 << (ARMADEUS_FPGA_IRQ & 0x1f),
- VA_GPIO_BASE + MXC_ISR(IRQ_TO_REG(ARMADEUS_FPGA_IRQ)));
- }
+ writew(shadow, mng->membase + FPGA_ISR);
}
-static void
-imx_fpga_mask_irq(unsigned int irq)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+static void imx_fpga_mask_irq(struct irq_data *data)
{
+ struct irq_mng *mng = irq_data_get_irq_chip_data(data);
+ unsigned int irq = data->irq;
+#else
+static void imx_fpga_mask_irq(unsigned int irq)
+{
+ struct irq_mng *mng = global_mng;
+#endif
int shadow;
- shadow = readw(FPGA_IMR);
+ shadow = readw(mng->membase + FPGA_IMR);
shadow &= ~( 1 << ((irq - IRQ_FPGA_START) % NB_IT));
pr_debug("%s: irq %d mask:0x%x\n", __FUNCTION__, irq, shadow);
- writew(shadow, FPGA_IMR);
+ writew(shadow, mng->membase + FPGA_IMR);
}
-static void
-imx_fpga_unmask_irq(unsigned int irq)
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+static void imx_fpga_unmask_irq(struct irq_data *data)
{
+ struct irq_mng *mng = irq_data_get_irq_chip_data(data);
+ unsigned int irq = data->irq;
+#else
+static void imx_fpga_unmask_irq(unsigned int irq)
+{
+ struct irq_mng *mng = global_mng;
+#endif
int shadow;
- shadow = readw(FPGA_IMR);
+ shadow = readw(mng->membase + FPGA_IMR);
shadow |= 1 << ((irq - IRQ_FPGA_START) % NB_IT);
pr_debug("%s: irq %d mask:0x%x\n", __FUNCTION__, irq, shadow);
- writew(shadow, FPGA_IMR);
+ writew(shadow, mng->membase + FPGA_IMR);
}
-static void
-imx_fpga_handler(unsigned int mask, unsigned int irq,
- struct irq_desc *desc)
+static irqreturn_t ocore_irq_mng_interrupt(int irq, void *data)
{
+ struct irq_mng *mng = data;
+ struct irq_desc *desc;
+ unsigned int mask;
+
+ mask = readw(mng->membase + FPGA_ISR);
+ irq = IRQ_FPGA_START;
+
pr_debug("%s: mask:0x%04x\n", __FUNCTION__, mask);
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,29)
desc = irq_to_desc(irq);
#else
desc = irq_desc + irq;
#endif
+ /* handle irqs */
while (mask) {
if (mask & 1) {
- pr_debug("handling irq %d\n", irq);
+ pr_debug("handling irq %d 0x%08x\n", irq,
+ (unsigned int)desc);
desc_handle_irq(irq, desc);
}
irq++;
desc++;
mask >>= 1;
}
-}
-static void
-imx_fpga_demux_handler(unsigned int irq_unused, struct irq_desc *desc)
-{
- unsigned int mask, irq;
-
- mask = readw(FPGA_ISR);
- irq = IRQ_FPGA_START;
- imx_fpga_handler(mask, irq, desc);
+ return IRQ_HANDLED;
}
static struct irq_chip imx_fpga_chip = {
- .name = "FPGA",
- .ack = imx_fpga_ack_irq,
- .mask = imx_fpga_mask_irq,
- .unmask = imx_fpga_unmask_irq,
- .set_type = imx_fpga_irq_type,
+ .name = "FPGA",
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+ .irq_ack = imx_fpga_ack_irq,
+ .irq_mask = imx_fpga_mask_irq,
+ .irq_unmask = imx_fpga_unmask_irq,
+#else
+ .ack = imx_fpga_ack_irq,
+ .mask = imx_fpga_mask_irq,
+ .unmask = imx_fpga_unmask_irq,
+#endif
+ .set_type = imx_fpga_irq_type,
};
-
#ifdef CONFIG_PM
static int ocore_irq_mng_suspend(struct platform_device *pdev, pm_message_t state)
{
- struct fpga_irq_mng_platform_data *pdata = pdev->dev.platform_data;
-
dev_dbg(&pdev->dev, "suspended\n");
- if (pdata->exit)
- pdata->exit(pdev);
return 0;
}
static int ocore_irq_mng_resume(struct platform_device *pdev)
{
- struct fpga_irq_mng_platform_data *pdata = pdev->dev.platform_data;
-
dev_dbg(&pdev->dev, "resumed\n");
- if (pdata->init)
- pdata->init(pdev);
return 0;
}
#else
-
# define ocore_irq_mng_suspend NULL
# define ocore_irq_mng_resume NULL
-
#endif /* CONFIG_PM */
static int __devinit ocore_irq_mng_probe(struct platform_device *pdev)
{
+ struct ocore_irq_mng_pdata *pdata = pdev->dev.platform_data;
unsigned int irq;
- u16 data;
+ u16 id;
int ret = 0;
- struct fpga_irq_mng_platform_data *pdata;
+ struct resource *mem_res;
+ struct resource *irq_res;
+ struct irq_mng *mng;
- pr_debug("Initializing FPGA IRQs\n");
+ if (!pdata) {
+ dev_err(&pdev->dev, "Platform data required !\n");
+ return -ENODEV;
+ }
- /* check if ID is correct */
- data = ioread16(ARMADEUS_FPGA_BASE_ADDR_VIRT + IRQ_MNGR_BASE + ID_OFFSET);
- if (data != ID) {
- printk(KERN_WARNING "For irq_mngr id:%d doesn't match with id"
- "read %d,\n is device present ?\n", ID, data);
- return -ENODEV;
+ /* get resources */
+ mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!mem_res) {
+ dev_err(&pdev->dev, "can't find mem resource\n");
+ return -EINVAL;
+ }
+ irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+ if (!irq_res) {
+ dev_err(&pdev->dev, "can't find irq resource\n");
+ return -EINVAL;
}
- pdata = pdev->dev.platform_data;
- if (!pdata) {
- dev_err(&pdev->dev,"No platform_data available\n");
- return -ENOMEM;
+ mem_res = request_mem_region(mem_res->start, resource_size(mem_res), pdev->name);
+ if (!mem_res) {
+ dev_err(&pdev->dev, "iomem already in use\n");
+ return -EBUSY;
}
- /* Mask all interrupts initially */
- writew(0, FPGA_IMR);
+ /* allocate memory for private structure */
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,36)
+ mng = kmalloc(sizeof(struct irq_mng), GFP_KERNEL);
+#else
+ mng = global_mng;
+#endif
+ if (!mng) {
+ ret = -ENOMEM;
+ goto out_release_mem;
+ }
- if (pdata->init) {
- ret = pdata->init(pdev);
- if (ret)
- goto failed_platform_init;
+ mng->membase = ioremap(mem_res->start, resource_size(mem_res));
+ if (!mng->membase) {
+ dev_err(&pdev->dev, "ioremap failed\n");
+ ret = -ENOMEM;
+ goto out_dev_free;
}
+ mng->mem_res = mem_res;
+ mng->irq_res = irq_res;
+
+ /* check if ID is correct */
+ id = readw(mng->membase + ID_OFFSET);
+ if (id != pdata->idnum) {
+ printk(KERN_WARNING "For irq_mngr id:%d doesn't match with id"
+ "read %d,\n is device present ?\n", pdata->idnum, id);
+ ret = -ENODEV;
+ goto out_iounmap;
+ }
+
+ /* Mask all interrupts initially */
+ writew(0, mng->membase + FPGA_IMR);
for (irq = IRQ_FPGA(0); irq < IRQ_FPGA(NB_IT); irq++) {
- pr_debug("IRQ %d\n", irq);
+ printk("IRQ %d\n", irq);
+ set_irq_chip_data(irq, mng);
set_irq_chip_and_handler(irq, &imx_fpga_chip, handle_edge_irq);
set_irq_flags(irq, IRQF_VALID);
- /* clear pending interrrupts */
- imx_fpga_ack_irq(irq);
}
- set_irq_chained_handler(ARMADEUS_FPGA_IRQ, imx_fpga_demux_handler);
+ /* clear pending interrupts */
+ writew(0xffff, mng->membase + FPGA_ISR);
+
+ ret = request_irq(mng->irq_res->start, ocore_irq_mng_interrupt,
+ IRQF_SAMPLE_RANDOM, "ocore_irq_mng", mng);
+
+ if (ret < 0) {
+ printk(KERN_ERR "Can't register irq %d\n",
+ mng->irq_res->start);
+ goto request_irq_error;
+ }
- pr_debug("FPGA IRQs initialized (Parent=%d)\n", ARMADEUS_FPGA_IRQ);
+ pr_debug("FPGA IRQs initialized (Parent=%d)\n", mng->irq_res->start);
return 0;
-failed_platform_init:
+request_irq_error:
+out_iounmap:
+ iounmap(mng->membase);
+out_dev_free:
+ kfree(mng);
+out_release_mem:
+ release_mem_region(mem_res->start, resource_size(mem_res));
+
return ret;
}
static int __devexit ocore_irq_mng_remove(struct platform_device *pdev)
{
+ struct ocore_irq_mng_pdata *pdata = pdev->dev.platform_data;
+ struct irq_mng *mng = (*pdata).mng;
unsigned int irq;
for (irq = IRQ_FPGA(0); irq < IRQ_FPGA(NB_IT); irq++) {
@@ -234,9 +294,10 @@ static int __devexit ocore_irq_mng_remove(struct platform_device *pdev)
set_irq_handler(irq,NULL);
set_irq_flags(irq, 0);
}
- set_irq_chained_handler(ARMADEUS_FPGA_IRQ, NULL);
-
- pr_debug("%s\n", __FUNCTION__);
+ free_irq(mng->irq_res->start, mng);
+ release_mem_region(mng->mem_res->start, resource_size(mng->mem_res));
+ iounmap(mng->membase);
+ kfree(mng);
return 0;
}
diff --git a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/test.c b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/test.c
index 430e112..d8214b3 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/test.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_irq_mngr/test.c
@@ -1,7 +1,7 @@
/*
* Driver to test OpenCore IRQ manager driver
*
- * Copyright (C) 2008 Armadeus Systems
+ * Copyright (C) 2008-2011 ARMadeus Systems
* Author: Julien Boibessot <jul...@ar...>
*
* This program is free software; you can redistribute it and/or modify
@@ -20,15 +20,14 @@
*
*/
-
#include <linux/version.h>
#include <linux/init.h>
#include <linux/module.h>
#include <linux/interrupt.h>
#include <asm/irq.h>
-#ifdef CONFIG_MACH_APF27
-#include <mach/fpga.h> /* To remove when MX1 platform merged*/
+#ifndef CONFIG_MACH_APF9328
+#include <mach/fpga.h> /* To remove when MX1 platform is merged*/
#endif
@@ -74,7 +73,6 @@ static void __exit irq_mng_test_exit(void)
free_irq(interrupt, 0); /* still a bug here ! */
}
-
module_init(irq_mng_test_init);
module_exit(irq_mng_test_exit);
diff --git a/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c b/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c
index b37b47e..6485fd4 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_led/board_leds.c
@@ -1,7 +1,7 @@
/*
- * Specific led driver for generic led driver
+ * Platform data for generic LED IP driver
*
- * (c) Copyright 2008 Armadeus project
+ * (c) Copyright 2008-2011 The Armadeus Project - ARMadeus Systems
* Fabien Marteau <fab...@ar...>
*
* This program is free software; you can redistribute it and/or modify
@@ -24,36 +24,43 @@
#include <linux/module.h>
#include <linux/platform_device.h>
-#ifdef CONFIG_MACH_APF27 /* to be removed when MX1 platform merged */
+#ifndef CONFIG_MACH_APF9328 /* to be removed when MX1 platform is merged */
#include <mach/fpga.h>
#endif
+
#include "led.h"
+static struct resource led0_resources[] = {
+ [0] = {
+ .start = ARMADEUS_FPGA_BASE_ADDR + 0x8,
+ .end = ARMADEUS_FPGA_BASE_ADDR + 0x8 + 0x4,
+ .flags = IORESOURCE_MEM,
+ },
+};
static struct plat_led_port plat_led0_data = {
- .name = "LED0",
- .num = 0,
- .membase = (void *)(ARMADEUS_FPGA_BASE_ADDR_VIRT + 0x8),
- .idnum = 2,
- .idoffset = 0x01 * (16 / 8),
+ .name = "LED0",
+ .num = 0,
+ .idnum = 2,
+ .idoffset = 0x01 * (16 / 8),
};
-
void plat_led_release(struct device *dev)
{
dev_dbg(dev, "released\n");
}
static struct platform_device plat_led0_device = {
- .name = "led",
- .id = 0,
- .dev = {
- .release = plat_led_release,
- .platform_data = &plat_led0_data
+ .name = "led",
+ .id = 0,
+ .dev = {
+ .release = plat_led_release,
+ .platform_data = &plat_led0_data
},
+ .num_resources = ARRAY_SIZE(led0_resources),
+ .resource = led0_resources,
};
-
static int __init sled_init(void)
{
return platform_device_register(&plat_led0_device);
@@ -61,7 +68,6 @@ static int __init sled_init(void)
static void __exit sled_exit(void)
{
- printk(KERN_WARNING "deleting board_leds\n");
platform_device_unregister(&plat_led0_device);
}
@@ -71,4 +77,3 @@ module_exit(sled_exit);
MODULE_AUTHOR("Fabien Marteau <fab...@ar...>");
MODULE_DESCRIPTION("Driver to blink some LEDs on FPGA");
MODULE_LICENSE("GPL");
-
diff --git a/target/linux/modules/fpga/wishbone_example/wb_led/g_led.c b/target/linux/modules/fpga/wishbone_example/wb_led/g_led.c
index fcd83ca..ad81871 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_led/g_led.c
+++ b/target/linux/modules/fpga/wishbone_example/wb_led/g_led.c
@@ -1,9 +1,8 @@
/*
- ***********************************************************************
+ * Generic driver for Wishbone LED IP
*
* (c) Copyright 2008 Armadeus project
* Fabien Marteau <fab...@ar...>
- * Generic driver for Wishbone led IP
*
* 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
@@ -18,14 +17,11 @@
* 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>
-/* form module/drivers */
#include <linux/init.h>
#include <linux/module.h>
-/* for file operations */
#include <linux/fs.h>
#include <linux/cdev.h>
#include <linux/ioport.h> /* request_mem_region */
@@ -38,40 +34,18 @@
#include <asm/io.h> /* readw() writew() */
#include <mach/hardware.h>
-/* led */
#include "led.h"
-
-/* for debugging messages*/
-//#define LED_DEBUG
-
-#undef PDEBUG
-#ifdef LED_DEBUG
-# ifdef __KERNEL__
-/* for kernel spage */
-# define PDEBUG(fmt,args...) printk(KERN_DEBUG "LED : " fmt, ##args)
-# else
-/* for user space */
-# define PDEBUG(fmt,args...) printk(stderr, fmt, ##args)
-# endif
-#else
-# define PDEBUG(fmt,args...) /* no debbuging message */
-#endif
-
-/*************************/
/* main device structure */
-/*************************/
struct led_dev {
char *name; /* the name of the instance */
int loaded_led_num;/* number of the led, depends on load order*/
struct cdev cdev;/* Char device structure */
void * membase; /* base address for instance */
dev_t devno; /* to store Major and minor numbers */
+ struct resource *mem_res;
};
-/******************************/
-/* to read write led register */
-/******************************/
ssize_t led_read(struct file *fildes, char __user *buff,
size_t count, loff_t *offp);
@@ -98,19 +72,19 @@ ssize_t led_read(struct file *fildes, char __user *buff,
struct led_dev *sdev = fildes->private_data;
u16 data=0;
- PDEBUG("Read value\n");
+ pr_debug("Read value\n");
if (*offp != 0) { /* offset must be 0 */
- PDEBUG("offset %d\n", (int)*offp);
+ pr_debug("offset %d\n", (int)*offp);
return 0;
}
- PDEBUG("count %d\n",count);
+ pr_debug("count %d\n", count);
if (count > 2) { /* 16bits max*/
count = 2;
}
- data = ioread16(sdev->membase+LED_REG_OFFSET);
- PDEBUG("Read %d at %x\n", data, (int)(sdev->membase+LED_REG_OFFSET));
+ data = readw(sdev->membase + LED_REG_OFFSET);
+ pr_debug("Read %d at %x\n", data, (int)(sdev->membase + LED_REG_OFFSET));
/* return data for user */
if (copy_to_user(buff, &data, count)) {
@@ -127,11 +101,11 @@ ssize_t led_write(struct file *fildes, const char __user *
u16 data = 0;
if (*offp != 0) { /* offset must be 0 */
- PDEBUG("offset %d\n", (int)*offp);
+ pr_debug("offset %d\n", (int)*offp);
return 0;
}
- PDEBUG("count %d\n", count);
+ pr_debug("count %d\n", count);
if (count > 2) { /* 16 bits max)*/
count = 2;
}
@@ -141,10 +115,10 @@ ssize_t led_write(struct file *fildes, const char __user *
return -EFAULT;
}
- PDEBUG("Write %d at %x\n",
+ pr_debug("Write %d at %x\n",
data,
- (int)(sdev->membase+LED_REG_OFFSET));
- iowrite16(data, sdev->membase+LED_REG_OFFSET);
+ (int)(sdev->membase + LED_REG_OFFSET));
+ writew(data, sdev->membase + LED_REG_OFFSET);
return count;
}
@@ -153,123 +127,141 @@ int led_open(struct inode *inode, struct file *filp)
{
/* Allocate and fill any data structure to be put in filp->private_data */
filp->private_data = container_of(inode->i_cdev, struct led_dev, cdev);
- PDEBUG("Led opened\n");
+ pr_debug("LED opened\n");
return 0;
}
-/* ******************************
- * Init and release functions
- * ******************************/
int led_release(struct inode *inode, struct file *filp)
{
struct led_dev *dev;
dev = container_of(inode->i_cdev, struct led_dev, cdev);
- PDEBUG("%s: released\n", dev->name);
+ pr_debug("%s: released\n", dev->name);
filp->private_data=NULL;
return 0;
}
-/**********************************
- * driver probe
- **********************************/
static int led_probe(struct platform_device *pdev)
{
- struct plat_led_port *dev = pdev->dev.platform_data;
- int result = 0; /* error return */
+ struct plat_led_port *pdata = pdev->dev.platform_data;
+ int ret = 0;
int led_major, led_minor;
- u16 data;
+ u16 ip_id;
struct led_dev *sdev;
+ struct resource *mem_res;
- PDEBUG("Led probing\n");
- PDEBUG("Register %s num %d\n", dev->name, dev->num);
+ pr_debug("LED probing\n");
+ pr_debug("Register %s num %d\n", pdata->name, pdata->num);
- /* check if ID is correct */
- data = ioread16(dev->membase+dev->idoffset);
- if (data != dev->idnum) {
- result = -1;
- printk(KERN_WARNING "For %s id:%d doesn't match with "
- "id read %d,\n is device present ?\n",
- dev->name, dev->idnum, data);
- goto error_id;
+ if (!pdata) {
+ dev_err(&pdev->dev, "Platform data required !\n");
+ return -ENODEV;
+ }
+
+ /* get resources */
+ mem_res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!mem_res) {
+ dev_err(&pdev->dev, "can't find mem resource\n");
+ return -EINVAL;
+ }
+
+ mem_res =
+ request_mem_region(mem_res->start, resource_size(mem_res),
+ pdev->name);
+ if (!mem_res) {
+ dev_err(&pdev->dev, "iomem already in use\n");
+ return -EBUSY;
}
- /* allocate memory for sdev structure */
+ /* allocate memory for private structure */
sdev = kmalloc(sizeof(struct led_dev), GFP_KERNEL);
if (!sdev) {
- result = -ENOMEM;
- goto error_sdev_alloc;
+ ret = -ENOMEM;
+ goto out_release_mem;
}
- dev->sdev = sdev;
- sdev->membase = dev->membase;
- sdev->name = (char *)kmalloc((1+strlen(dev->name))*sizeof(char),
+
+ sdev->membase = ioremap(mem_res->start, resource_size(mem_res));
+ if (!sdev->membase) {
+ dev_err(&pdev->dev, "ioremap failed\n");
+ ret = -ENOMEM;
+ goto out_dev_free;
+ }
+ sdev->mem_res = mem_res;
+
+ /* check if ID is correct */
+ ip_id = readw(sdev->membase + pdata->idoffset);
+ if (ip_id != pdata->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);
+ goto out_iounmap;
+ }
+
+ pdata->sdev = sdev;
+ sdev->name = (char *)kmalloc((1+strlen(pdata->name))*sizeof(char),
GFP_KERNEL);
if (sdev->name == NULL) {
printk("Kmalloc name space error\n");
- goto error_name_alloc;
+ goto out_iounmap;
}
- if (strncpy(sdev->name, dev->name, 1+strlen(dev->name)) < 0) {
+ if (strncpy(sdev->name, pdata->name, 1+strlen(pdata->name)) < 0) {
printk("copy error");
- goto error_name_copy;
+ goto out_name_free;
}
/* Get the major and minor device numbers */
led_major = 252;
- led_minor = dev->num ;/* num come from plat_led_port data structure */
+ led_minor = pdata->num;
sdev->devno = MKDEV(led_major, led_minor);
- result = alloc_chrdev_region(&(sdev->devno), led_minor, 1, dev->name);
- if (result < 0) {
- printk(KERN_WARNING "%s: can't get major %d\n", dev->name, led_major);
- goto error_devno;
+ ret = alloc_chrdev_region(&(sdev->devno), led_minor, 1, pdata->name);
+ if (ret < 0) {
+ printk(KERN_WARNING "%s: can't get major %d\n", pdata->name, led_major);
+ goto out_name_free;
}
printk(KERN_INFO "%s: MAJOR: %d MINOR: %d\n",
- dev->name,
+ pdata->name,
MAJOR(sdev->devno),
MINOR(sdev->devno));
/* Init the cdev structure */
- PDEBUG("Init the cdev structure\n");
+ pr_debug("Init the cdev structure\n");
cdev_init(&sdev->cdev, &led_fops);
sdev->cdev.owner = THIS_MODULE;
sdev->cdev.ops = &led_fops;
/* Add the device to the kernel, connecting cdev to major/minor number */
- PDEBUG("%s:Add the device to the kernel, "
- "connecting cdev to major/minor number \n", dev->name);
- result = cdev_add(&sdev->cdev, sdev->devno, 1);
- if (result) {
- printk(KERN_WARNING "%s: can't add cdev\n", dev->name);
- goto error_cdev_add;
+ pr_debug("%s:Add the device to the kernel, "
+ "connecting cdev to major/minor number \n", pdata->name);
+ ret = cdev_add(&sdev->cdev, sdev->devno, 1);
+ if (ret) {
+ printk(KERN_WARNING "%s: can't add cdev\n", pdata->name);
+ goto out_cdev_free;
}
- /* initialize led value */
- data = 1;
- iowrite16(data, sdev->membase);
- PDEBUG("Wrote %x at %x\n", data, (int)(sdev->membase+LED_REG_OFFSET));
+ /* initialize LED value */
+ writew(1, sdev->membase);
/* OK module inserted ! */
- printk(KERN_INFO "Led module %s insered\n", dev->name);
+ printk(KERN_INFO "LED module %s inserted\n", pdata->name);
return 0;
- /* Errors management */
- /* delete the cdev structure */
cdev_del(&sdev->cdev);
- PDEBUG("%s:cdev deleted\n", dev->name);
-error_cdev_add:
- /* free major and minor number */
+out_cdev_free:
unregister_chrdev_region(sdev->devno, 1);
- printk(KERN_INFO "%s: Led deleted\n", dev->name);
-error_devno:
-error_name_copy:
+ printk(KERN_INFO "%s: LED deleted\n", pdata->name);
+out_name_free:
kfree(sdev->name);
-error_name_alloc:
+out_iounmap:
+ iounmap(sdev->membase);
+out_dev_free:
kfree(sdev);
-error_sdev_alloc:
- printk(KERN_ERR "%s: not inserted\n", dev->name);
-error_id:
- return result;
+out_release_mem:
+ release_mem_region(mem_res->start, resource_size(mem_res));
+
+ return ret;
}
static int __devexit led_remove(struct platform_device *pdev)
@@ -277,21 +269,17 @@ static int __devexit led_remove(struct platform_device *pdev)
struct plat_led_port *dev = pdev->dev.platform_data;
struct led_dev *sdev = (*dev).sdev;
- PDEBUG("Unregister %s, number %d\n", dev->name, dev->num);
- /* delete the cdev structure */
- PDEBUG("cdev name : %s\n", sdev->name);
+ pr_debug("Unregister %s, number %d\n", dev->name, dev->num);
+ pr_debug("cdev name : %s\n", sdev->name);
cdev_del(&sdev->cdev);
- PDEBUG("%s:cdev deleted\n", dev->name);
- /*error_cdev_add:*/
- /* free major and minor number */
+ pr_debug("%s:cdev deleted\n", dev->name);
unregister_chrdev_region(sdev->devno, 1);
- /*error_devno:*/
- /*error_name_copy:*/
kfree(sdev->name);
- /*error_name_alloc:*/
+ iounmap(sdev->membase);
kfree(sdev);
- /*error_sdev_alloc:*/
+ release_mem_region(sdev->mem_res->start, resource_size(sdev->mem_res));
printk(KERN_INFO "%s: deleted with success\n", dev->name);
+
return 0;
}
@@ -304,14 +292,11 @@ static struct platform_driver plat_led_driver = {
},
};
-/**********************************
- * Module management
- **********************************/
static int __init led_init(void)
{
int ret;
- PDEBUG("Platform driver name %s\n", plat_led_driver.driver.name);
+ pr_debug("Platform driver name %s\n", plat_led_driver.driver.name);
ret = platform_driver_register(&plat_led_driver);
return ret;
}
@@ -319,13 +304,13 @@ static int __init led_init(void)
static void led_exit(void)
{
platform_driver_unregister(&plat_led_driver);
- PDEBUG("driver unregistered\n");
+ pr_debug("driver unregistered\n");
}
module_init(led_init);
module_exit(led_exit);
MODULE_LICENSE("GPL");
-MODULE_AUTHOR("Fabien Marteau <fab...@ar...>-ARMadeus Systems");
-MODULE_DESCRIPTION("Led device driver");
+MODULE_AUTHOR("Fabien Marteau <fab...@ar...>");
+MODULE_DESCRIPTION("Wishbone IP LED device driver");
diff --git a/target/linux/modules/fpga/wishbone_example/wb_led/led.h b/target/linux/modules/fpga/wishbone_example/wb_led/led.h
index 1c6802a..4762af4 100644
--- a/target/linux/modules/fpga/wishbone_example/wb_led/led.h
+++ b/target/linux/modules/fpga/wishbone_example/wb_led/led.h
@@ -1,9 +1,8 @@
/*
- ***********************************************************************
+ * Platform data for Wishbone LED IP driver
*
- * (c) Copyright 2007 Armadeus project
+ * (c) Copyright 2007-2011 The Armadeus Project - ARMadeus Systems
* Fabien Marteau <fab...@ar...>
- * Driver for Wishbone led IP
*
* 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
@@ -18,55 +17,19 @@
* 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.
- **********************************************************************
*/
#ifndef __LED_H__
#define __LED_H__
-#include <linux/version.h>
-#include <linux/init.h>
-#include <linux/module.h>
-#include <linux/fs.h>
-#include <linux/cdev.h>
-#include <linux/ioport.h> /* request_mem_region */
-#include <linux/platform_device.h>
-
-#include <asm/uaccess.h> /* copy_to_user function */
-#include <asm/io.h> /* readw() writew() */
-#include <mach/hardware.h>
-
-#define LED_DEBUG
-#undef PDEBUG
-#ifdef LED_DEBUG
-# ifdef __KERNEL__
- /* for kernel spage */
-# define PDEBUG(fmt,args...) printk(KERN_DEBUG "LED : " fmt, ##args)
-# else
- /* for user space */
-# define PDEBUG(fmt,args...) printk(stderr, fmt, ##args)
-# endif
-#else
-# define PDEBUG(fmt,args...) /* no debbuging message */
-#endif
-
-
-#define FPGA_BASE_ADDR IMX_CS1_PHYS
-#define FPGA_MEM_SIZE IMX_CS1_SIZE
-
-#define LED_NUMBER 1
-
#define LED_REG_OFFSET (0x00)
-#define LED_ID_OFFSET (0x02)
/* platform device */
struct plat_led_port {
const char *name; /* instance name */
int num; /* instance number */
- void *membase; /* virtual base address */
int idnum; /* identity number */
int idoffset; /* identity relative address */
struct led_dev *sdev; /* struct for main device structure*/
};
#endif /* __LED_H__ */
-
diff --git a/target/linux/modules/fpga/wishbone_twin_uart/16750.c b/target/linux/modules/fpga/wishbone_twin_uart/16750.c
new file mode 100644
index 0000000..20a418d
--- /dev/null
+++ b/target/linux/modules/fpga/wishbone_twin_uart/16750.c
@@ -0,0 +1,138 @@
+/*
+ * Platform data for OpenCore 16750 2x serial IP
+ * loaded in FPGA of the Armadeus boards.
+ *
+ * (C) Copyright 2008-2011 ARMadeus Systems
+ * Author: Julien Boibessot <jul...@ar...>
+ *
+ * Inspired from Au1x00 Init from Pantelis Antoniou
+ *
+ * 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 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/version.h>
+#include <linux/module.h>
+#include <linux/serial_8250.h>
+
+#include <asm/io.h>
+#ifndef CONFIG_MACH_APF9328 /* To remove when MX1 platform is merged */
+#include <mach/fpga.h>
+#endif
+
+#define GSM_UART_INPUT_CLOCK 96000000
+#define GSM_UART_BASE 0x20
+#define GSM_UART_IRQ IRQ_FPGA(0)
+
+#define GPS_UART_INPUT_CLOCK 96000000
+#define GPS_UART_BASE 0x40
+#define GPS_UART_IRQ IRQ_FPGA(1)
+
+
+void plat_uart_release(struct device *dev)
+{
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
+ pr_debug("device %s released\n", dev->bus_id);
+#else
+ pr_debug("device %s released\n", dev->init_name);
+#endif
+}
+
+static struct plat_serial8250_port ocore_16750_uart0_data[] = {
+ {
+ .mapbase = ARMADEUS_FPGA_BASE_ADDR + GSM_UART_BASE,
+ .irq = IRQ_FPGA(0),
+ .uartclk = 96000000,
+ .regshift = 1,
+ .iotype = UPIO_MEM,
+ .flags = UPF_BOOT_AUTOCONF
+ }
+};
+
+static struct plat_serial8250_port ocore_16750_uart1_data[] = {
+ {
+ .mapbase = ARMADEUS_FPGA_BASE_ADDR + GPS_UART_BASE,
+ .irq = IRQ_FPGA(1),
+ .uartclk = 96000000,
+ .regshift = 1,
+ .iotype = UPIO_MEM,
+ .flags = UPF_BOOT_AUTOCONF
+ }
+};
+
+static struct platform_device ocore_16750_uart0_device = {
+ .name = "serial8250",
+ .id = 0,
+ .dev = {
+ .release = plat_uart_release,
+ .platform_data = ocore_16750_uart0_data,
+ },
+};
+
+static struct platform_device ocore_16750_uart1_device = {
+ .name = "serial8250",
+ .id = 1,
+ .dev = {
+ .release = plat_uart_release,
+ .platform_data = ocore_16750_uart1_data,
+ },
+};
+
+static int __init ocore_16750_init(void)
+{
+ int ret = -ENODEV;
+ u16 id;
+
+ ocore_16750_uart0_data[0].membase = ioremap(ocore_16750_uart0_data[0].mapbase, 0x20);
+ if (!ocore_16750_uart0_data[0].membase) {
+ printk(KERN_ERR "%s: ioremap failed\n", __func__);
+ return -ENOMEM;
+ }
+
+ /* check if ID is correct for GSM_UART */
+ id = readw(ocore_16750_uart0_data[0].membase + 0x08*2);
+ if (id != 2) {
+ printk(KERN_WARNING "For GSM_UART id:2 doesn't match with "
+ "id read %d,\n is device present ?\n", id);
+ return -ENODEV;
+ }
+
+ ocore_16750_uart1_data[0].membase = ioremap(ocore_16750_uart1_data[0].mapbase, 0x20);
+ if (!ocore_16750_uart1_data[0].membase) {
+ printk(KERN_ERR "%s: ioremap failed\n", __func__);
+ return -ENOMEM;
+ }
+
+ /* check if ID is correct for GPS_UART */
+ id = readw(ocore_16750_uart1_data[0].membase + 0x08*2);
+ if (id != 3) {
+ printk(KERN_WARNING "For GPS_UART id:3 doesn't match with "
+ "id read %d,\n is device present ?\n", id);
+ return -ENODEV;
+ }
+
+ ret = platform_device_register(&ocore_16750_uart0_device);
+ if (ret < 0)
+ return ret;
+
+ ret = platform_device_register(&ocore_16750_uart1_device);
+ if (ret < 0)
+ return ret;
+
+ return ret;
+}
+
+static void __exit ocore_16750_exit(void)
+{
+ platform_device_unregister(&ocore_16750_uart0_device);
+ platform_device_unregister(&ocore_16750_uart1_device);
+}
+
+module_init(ocore_16750_init);
+module_exit(ocore_16750_exit);
+
+MODULE_AUTHOR("Julien Boibessot, <jul...@ar...>");
+MODULE_DESCRIPTION("Platform data for 16750 OpenCore IP in Armadeus FPGA");
+MODULE_LICENSE("GPL");
diff --git a/target/linux/modules/fpga/POD/void/Makefile b/target/linux/modules/fpga/wishbone_twin_uart/Makefile
old mode 100755
new mode 100644
similarity index 54%
copy from target/linux/modules/fpga/POD/void/Makefile
copy to target/linux/modules/fpga/wishbone_twin_uart/Makefile
index 775eaa1..205a3f5
--- a/target/linux/modules/fpga/POD/void/Makefile
+++ b/target/linux/modules/fpga/wishbone_twin_uart/Makefile
@@ -1,24 +1,24 @@
#
-# Makefile for a generic Armadeus drivers
+# Makefile for the Armadeus FPGA serial "driver" (compatible with 16750/8250 OpenCore IP)
#
-# Part executed when called from kernel build system:
ifneq ($(KERNELRELEASE),)
-obj-$(CONFIG_POD_DRIVERS) += void.o
+# Part executed when called from kernel build system:
+
+obj-$(CONFIG_SERIAL_8250) += 16750_ocore.o
+16750_ocore-objs := 16750.o
else
-# Part executed when called from standard make in this directory:
-
-ARMADEUS_BASE_DIR=../../../../../../
+ARMADEUS_BASE_DIR=../../../../..
include $(ARMADEUS_BASE_DIR)/Makefile.in
KDIR := $(ARMADEUS_LINUX_DIR)
PWD := $(shell pwd)
# Armadeus custom drivers common targets (default, clean, etc...)
-include ../../../Makefile.in
+include ../../Makefile.in
endif
diff --git a/target/linux/modules/fpga/wishbone_twin_uart/README b/target/linux/modules/fpga/wishbone_twin_uart/README
new file mode 100644
index 0000000..464187b
--- /dev/null
+++ b/target/linux/modules/fpga/wishbone_twin_uart/README
@@ -0,0 +1,8 @@
+To compile this driver from here:
+---------------------------------
+$ make
+
+To install this driver:
+-----------------------
+Copy resulting *.ko files on your target rootfs
+
diff --git a/target/test/test_fpga.sh b/target/test/test_fpga.sh
index c351b45..823e5b2 100755
--- a/target/test/test_fpga.sh
+++ b/target/test/test_fpga.sh
@@ -25,9 +25,17 @@ load_led()
load_fpga ./data/fpga/blinking_led_apf27_200k.bit
RES=$?
elif [ "$1" == "APF51" ]; then
- ask_user "Please power on FPGA bank XXX\nThen press enter"
- load_fpga ./data/fpga/blinking_led_apf51.bit
+ ask_user "Please power on FPGA Bank 1\nThen press enter"
+ load_fpga ./data/fpga/top_wishbone_example51.bin
RES=$?
+ if [ "$RES" == 0 ]; then
+ for i in `seq 5`; do
+ fpgaregs w 0x08 0x01
+ usleep 500000
+ fpgaregs w 0x08 0x00
+ usleep 500000
+ done
+ fi
else
echo "Platform not supported by this test"
fi
@@ -43,8 +51,8 @@ load_button()
load_fpga ./data/fpga/wishbone_example_apf27_200k.bit
RES=$?
elif [ "$1" == "APF51" ]; then
- echo "I hope you have powered up Bank XXX"
- load_fpga ./data/fpga/wishbone_example_apf51.bit
+ echo "I hope you have powered up Bank 1 with corresponding jumper"
+ load_fpga ./data/fpga/top_wishbone_example51.bin
RES=$?
else
echo "Platform not supported by this test"
hooks/post-receive
--
armadeus
|