armadeus-commitlog Mailing List for armadeus (Page 137)
Brought to you by:
sszy
You can subscribe to this list here.
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2007 |
Jan
(43) |
Feb
(8) |
Mar
(7) |
Apr
(8) |
May
(14) |
Jun
(6) |
Jul
(4) |
Aug
(17) |
Sep
(18) |
Oct
(19) |
Nov
(52) |
Dec
(30) |
| 2008 |
Jan
(6) |
Feb
(6) |
Mar
(15) |
Apr
(22) |
May
(13) |
Jun
(11) |
Jul
(41) |
Aug
(10) |
Sep
(14) |
Oct
(21) |
Nov
(4) |
Dec
(66) |
| 2009 |
Jan
(67) |
Feb
(57) |
Mar
(90) |
Apr
(54) |
May
(64) |
Jun
(76) |
Jul
(14) |
Aug
(18) |
Sep
(18) |
Oct
(20) |
Nov
(15) |
Dec
(36) |
| 2010 |
Jan
(28) |
Feb
(25) |
Mar
(32) |
Apr
(23) |
May
(22) |
Jun
(62) |
Jul
(36) |
Aug
(16) |
Sep
(12) |
Oct
(20) |
Nov
(44) |
Dec
(25) |
| 2011 |
Jan
(36) |
Feb
(49) |
Mar
(28) |
Apr
(38) |
May
(26) |
Jun
(52) |
Jul
(33) |
Aug
(32) |
Sep
(19) |
Oct
(26) |
Nov
(13) |
Dec
(32) |
| 2012 |
Jan
(38) |
Feb
(34) |
Mar
(91) |
Apr
(35) |
May
(31) |
Jun
(72) |
Jul
(23) |
Aug
(13) |
Sep
(33) |
Oct
(47) |
Nov
(18) |
Dec
(22) |
| 2013 |
Jan
(31) |
Feb
(22) |
Mar
(26) |
Apr
(11) |
May
(38) |
Jun
(15) |
Jul
(37) |
Aug
(68) |
Sep
(34) |
Oct
(11) |
Nov
(26) |
Dec
(31) |
| 2014 |
Jan
(60) |
Feb
(55) |
Mar
(21) |
Apr
(31) |
May
(17) |
Jun
(35) |
Jul
(24) |
Aug
(17) |
Sep
(11) |
Oct
(23) |
Nov
(10) |
Dec
(23) |
| 2015 |
Jan
(15) |
Feb
(34) |
Mar
(46) |
Apr
(23) |
May
(12) |
Jun
(14) |
Jul
(18) |
Aug
(22) |
Sep
(6) |
Oct
(2) |
Nov
(1) |
Dec
(6) |
| 2016 |
Jan
(5) |
Feb
(7) |
Mar
(10) |
Apr
(10) |
May
(17) |
Jun
(6) |
Jul
(4) |
Aug
(6) |
Sep
(22) |
Oct
(8) |
Nov
(9) |
Dec
(5) |
| 2017 |
Jan
(11) |
Feb
(12) |
Mar
(27) |
Apr
(9) |
May
(1) |
Jun
(5) |
Jul
(11) |
Aug
(10) |
Sep
(6) |
Oct
(10) |
Nov
(4) |
Dec
(6) |
| 2018 |
Jan
(6) |
Feb
(13) |
Mar
(9) |
Apr
(7) |
May
(10) |
Jun
(9) |
Jul
(21) |
Aug
(13) |
Sep
(10) |
Oct
(4) |
Nov
(6) |
Dec
(1) |
| 2019 |
Jan
(6) |
Feb
(2) |
Mar
(5) |
Apr
(6) |
May
(19) |
Jun
(14) |
Jul
(18) |
Aug
(3) |
Sep
(5) |
Oct
(7) |
Nov
(8) |
Dec
(4) |
| 2020 |
Jan
(10) |
Feb
(3) |
Mar
(9) |
Apr
(7) |
May
(2) |
Jun
(18) |
Jul
(3) |
Aug
|
Sep
|
Oct
(7) |
Nov
|
Dec
(1) |
| 2021 |
Jan
(9) |
Feb
(6) |
Mar
(4) |
Apr
(11) |
May
(7) |
Jun
(5) |
Jul
(2) |
Aug
(4) |
Sep
(10) |
Oct
(9) |
Nov
(5) |
Dec
|
| 2022 |
Jan
(2) |
Feb
(12) |
Mar
(3) |
Apr
(5) |
May
(1) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(4) |
Oct
(4) |
Nov
(1) |
Dec
(3) |
| 2023 |
Jan
(5) |
Feb
(3) |
Mar
(3) |
Apr
(2) |
May
(1) |
Jun
(3) |
Jul
(3) |
Aug
(2) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
(4) |
| 2024 |
Jan
(2) |
Feb
(3) |
Mar
(8) |
Apr
(4) |
May
(1) |
Jun
(13) |
Jul
(7) |
Aug
(1) |
Sep
(6) |
Oct
(5) |
Nov
(11) |
Dec
(7) |
| 2025 |
Jan
(3) |
Feb
(1) |
Mar
(6) |
Apr
(4) |
May
(4) |
Jun
(1) |
Jul
(1) |
Aug
(7) |
Sep
(4) |
Oct
(4) |
Nov
(4) |
Dec
(1) |
| 2026 |
Jan
(3) |
Feb
(7) |
Mar
(3) |
Apr
(1) |
May
(6) |
Jun
(3) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ar...@us...> - 2008-12-06 22:22:10
|
Revision: 931
http://armadeus.svn.sourceforge.net/armadeus/?rev=931&view=rev
Author: artemys
Date: 2008-12-06 22:22:08 +0000 (Sat, 06 Dec 2008)
Log Message:
-----------
[BUILDROOT] Don't try to mount configfs when doing mount -a
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab
Modified: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab
===================================================================
--- trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab 2008-12-06 22:07:26 UTC (rev 930)
+++ trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab 2008-12-06 22:22:08 UTC (rev 931)
@@ -5,6 +5,6 @@
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
tmpfs /tmp tmpfs defaults,noauto 0 0
-configfs /config configfs defaults 0 0
+configfs /config configfs defaults,noauto 0 0
sysfs /sys sysfs defaults 0 0
usbfs /proc/bus/usb usbfs defaults 0 0
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-06 22:08:47
|
Revision: 930
http://armadeus.svn.sourceforge.net/armadeus/?rev=930&view=rev
Author: artemys
Date: 2008-12-06 22:07:26 +0000 (Sat, 06 Dec 2008)
Log Message:
-----------
[BUILDROOT] Makes socketcan compilation works again + add test tools
Modified Paths:
--------------
trunk/buildroot/package/socketcan/Config.in
trunk/buildroot/package/socketcan/socketcan.mk
Added Paths:
-----------
trunk/buildroot/package/socketcan/socketcan-svn-rev874-cross-compile.patch
Modified: trunk/buildroot/package/socketcan/Config.in
===================================================================
--- trunk/buildroot/package/socketcan/Config.in 2008-12-06 13:43:49 UTC (rev 929)
+++ trunk/buildroot/package/socketcan/Config.in 2008-12-06 22:07:26 UTC (rev 930)
@@ -14,3 +14,9 @@
as possible to the TCP/IP protocols to allow programmers, familiar
with network programming, to easily learn how to use CAN sockets.
+config BR2_PACKAGE_SOCKETCAN_TEST
+ bool "install test tools"
+ depends on BR2_PACKAGE_SOCKETCAN
+ help
+ Compile and install socketcan test tools too.
+
Added: trunk/buildroot/package/socketcan/socketcan-svn-rev874-cross-compile.patch
===================================================================
--- trunk/buildroot/package/socketcan/socketcan-svn-rev874-cross-compile.patch (rev 0)
+++ trunk/buildroot/package/socketcan/socketcan-svn-rev874-cross-compile.patch 2008-12-06 22:07:26 UTC (rev 930)
@@ -0,0 +1,63 @@
+diff -urN socketcan-svn-rev810.org/can-utils/Makefile socketcan-svn-rev810/can-utils/Makefile
+--- socketcan-svn-rev874.org/can-utils/Makefile 2008-07-16 10:52:02.000000000 +0200
++++ socketcan-svn-rev874/can-utils/Makefile 2008-07-16 11:19:21.000000000 +0200
+@@ -40,6 +40,10 @@
+ #
+ # Send feedback to <soc...@li...>
+
++ifeq ($(INSTALL_DIR),)
++ INSTALL_DIR=/usr/local/bin
++endif
++
+ MAKEFLAGS = -k
+
+ CFLAGS = -O2 -Wall -Wno-parentheses -I../kernel/2.6/include \
+@@ -52,11 +56,17 @@
+
+ all: $(PROGRAMS)
+
++strip: all
++ $(STRIP_CMD) $(PROGRAMS)
++
+ clean:
+ rm -f $(PROGRAMS) *.o
+
+ install:
+- cp -f $(PROGRAMS) /usr/local/bin
++ cp -f $(PROGRAMS) $(INSTALL_DIR)
++
++uninstall:
++ cd $(INSTALL_DIR); rm -f $(PROGRAMS)
+
+ distclean:
+ rm -f $(PROGRAMS) *.o *~
+--- socketcan-svn-rev874.org/test/Makefile 2008-12-06 22:22:28.000000000 +0100
++++ socketcan-svn-rev874/test/Makefile 2008-12-06 22:33:10.000000000 +0100
+@@ -40,6 +40,10 @@
+ #
+ # Send feedback to <soc...@li...>
+
++ifeq ($(INSTALL_DIR),)
++ INSTALL_DIR=/usr/local/bin
++endif
++
+ CFLAGS = -O2 -Wall -Wno-parentheses -I../kernel/2.6/include \
+ -fno-strict-aliasing \
+ -DPF_CAN=29 \
+@@ -64,11 +68,14 @@
+
+ all: $(PROGRAMS)
+
++strip: all
++ $(STRIP_CMD) $(PROGRAMS)
++
+ install:
+- cp -f $(PROGRAMS) /usr/local/bin
++ cp -f $(PROGRAMS) $(INSTALL_DIR)
+
+ clean:
+- rm -f $(PROGRAMS)
++ cd $(INSTALL_DIR); rm -f $(PROGRAMS)
+
+ distclean:
+ rm -f $(PROGRAMS) *~
Modified: trunk/buildroot/package/socketcan/socketcan.mk
===================================================================
--- trunk/buildroot/package/socketcan/socketcan.mk 2008-12-06 13:43:49 UTC (rev 929)
+++ trunk/buildroot/package/socketcan/socketcan.mk 2008-12-06 22:07:26 UTC (rev 930)
@@ -4,7 +4,7 @@
#
#############################################################
SOCKETCAN_TRUNK:=http://svn.berlios.de/svnroot/repos/socketcan/trunk
-SOCKETCAN_REVISION:=810
+SOCKETCAN_REVISION:=874
SOCKETCAN_NAME:=socketcan-svn-rev$(SOCKETCAN_REVISION)
SOCKETCAN_DIR:=$(BUILD_DIR)/$(SOCKETCAN_NAME)
SOCKETCAN_SOURCE:=$(SOCKETCAN_NAME).tar.bz2
@@ -29,12 +29,19 @@
touch $@
$(SOCKETCAN_DIR)/.compiled: $(SOCKETCAN_DIR)/.configured
- $(MAKE) CC=$(TARGET_CC) -C $(SOCKETCAN_DIR)/can-utils
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(SOCKETCAN_DIR)/can-utils
+ifeq ($(strip $(BR2_PACKAGE_SOCKETCAN_TEST)),y)
+ $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(SOCKETCAN_DIR)/test
+endif
touch $@
$(TARGET_DIR)/usr/bin/$(SOCKETCAN_EXE): $(SOCKETCAN_DIR)/.compiled
$(MAKE) STRIP_CMD="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" -C $(SOCKETCAN_DIR)/can-utils strip
$(MAKE) INSTALL_DIR=$(TARGET_DIR)/usr/bin -C $(SOCKETCAN_DIR)/can-utils install
+ifeq ($(strip $(BR2_PACKAGE_SOCKETCAN_TEST)),y)
+ $(MAKE) STRIP_CMD="$(STRIPCMD) $(STRIP_STRIP_UNNEEDED)" -C $(SOCKETCAN_DIR)/test strip
+ $(MAKE) INSTALL_DIR=$(TARGET_DIR)/usr/bin -C $(SOCKETCAN_DIR)/test install
+endif
touch $@
SOCKETCAN socketcan: uclibc $(TARGET_DIR)/usr/bin/$(SOCKETCAN_EXE)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-06 13:43:53
|
Revision: 929
http://armadeus.svn.sourceforge.net/armadeus/?rev=929&view=rev
Author: artemys
Date: 2008-12-06 13:43:49 +0000 (Sat, 06 Dec 2008)
Log Message:
-----------
[ROOTFS] Prevent /tmp to be remounted over and over when doing a mount -a (busybox mount doesn't check if filesystem is already mounted when called
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inittab
Modified: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab
===================================================================
--- trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab 2008-12-06 13:17:41 UTC (rev 928)
+++ trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab 2008-12-06 13:43:49 UTC (rev 929)
@@ -4,7 +4,7 @@
/dev/root / ext2 rw,noauto 0 1
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults,gid=5,mode=620 0 0
-tmpfs /tmp tmpfs defaults 0 0
+tmpfs /tmp tmpfs defaults,noauto 0 0
configfs /config configfs defaults 0 0
sysfs /sys sysfs defaults 0 0
usbfs /proc/bus/usb usbfs defaults 0 0
Modified: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inittab
===================================================================
--- trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inittab 2008-12-06 13:17:41 UTC (rev 928)
+++ trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inittab 2008-12-06 13:43:49 UTC (rev 929)
@@ -22,6 +22,7 @@
null::sysinit:/bin/mkdir /dev/pts
null::sysinit:/bin/mount -t devpts devpts /dev/pts
null::sysinit:/bin/mount -o remount,rw /
+null::sysinit:/bin/mount /tmp
#::sysinit:/bin/mount -a # now done in S50mountfs to overcome NFS pbs
null::sysinit:/bin/hostname -F /etc/hostname
null::sysinit:/sbin/ifconfig lo 127.0.0.1 up
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-06 13:17:45
|
Revision: 928
http://armadeus.svn.sourceforge.net/armadeus/?rev=928&view=rev
Author: artemys
Date: 2008-12-06 13:17:41 +0000 (Sat, 06 Dec 2008)
Log Message:
-----------
[ROOTFS] Add /etc/inetd.conf file with Telnet config already in
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inetd.conf
Added: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inetd.conf
===================================================================
--- trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inetd.conf (rev 0)
+++ trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inetd.conf 2008-12-06 13:17:41 UTC (rev 928)
@@ -0,0 +1 @@
+23 stream tcp nowait root /usr/sbin/telnetd telnetd -l /bin/login
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2008-12-06 13:07:49
|
Revision: 927
http://armadeus.svn.sourceforge.net/armadeus/?rev=927&view=rev
Author: thom25
Date: 2008-12-06 13:07:44 +0000 (Sat, 06 Dec 2008)
Log Message:
-----------
[LINUX] make mcp2515 working again
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-088-can-mcp2515.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-06 12:32:07 UTC (rev 926)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-06 13:07:44 UTC (rev 927)
@@ -263,7 +263,7 @@
+};
+
+static struct spi_imx_master imx_spi2_master_info = {
-+ .num_chipselect = 1,
++ .num_chipselect = 2,
+ .enable_dma = 0,
+};
+
@@ -473,7 +473,7 @@
+ .controller_data = &mcp251X_hw,
+ .bus_num = 2,
+ .mode = SPI_MODE_0,
-+ .chip_select = 0,
++ .chip_select = 1,
+ .irq = IRQ_GPIOC( CAN_MPC251X_INT_GPIOC ),
+ .platform_data = &apf9328_mcp251x_config,
+ },
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-088-can-mcp2515.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-088-can-mcp2515.patch 2008-12-06 12:32:07 UTC (rev 926)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-088-can-mcp2515.patch 2008-12-06 13:07:44 UTC (rev 927)
@@ -1,43 +1,50 @@
-[linux-2.6.19.2-mx-can-mcp2515-driver.patch]
-Index: linux-2.6.19.2/drivers/net/can/Kconfig
-===================================================================
---- linux-2.6.19.2.orig/drivers/net/can/Kconfig
-+++ linux-2.6.19.2/drivers/net/can/Kconfig
-@@ -22,4 +22,12 @@
- a problem with CAN support and want to see more of what is going
- on.
+diff --git a/drivers/net/can/Kconfig b/drivers/net/can/Kconfig
+index 57def0d..723f043 100644
+--- a/drivers/net/can/Kconfig
++++ b/drivers/net/can/Kconfig
+@@ -22,4 +22,12 @@ config CAN_DEBUG_DEVICES
+ a problem with CAN support and want to see more of what is going
+ on.
+config CAN_MCP251X
-+ tristate "Microchip 251x series SPI CAN Controller"
-+ depends on CAN && SPI
-+ default N
-+ ---help---
-+ Say Y here if you want support for the Microchip 251x series of
-+ SPI based CAN controllers.
++ tristate "Microchip 251x series SPI CAN Controller"
++ depends on CAN && SPI
++ default N
++ ---help---
++ Say Y here if you want support for the Microchip 251x series of
++ SPI based CAN controllers.
+
endmenu
---- /dev/null
-+++ linux-2.6.19.2/drivers/net/can/Makefile 2008-10-06 10:51:17.000000000 +0200
-@@ -3,3 +3,8 @@
+diff --git a/drivers/net/can/Makefile b/drivers/net/can/Makefile
+index c4bead7..0d86a8a 100644
+--- a/drivers/net/can/Makefile
++++ b/drivers/net/can/Makefile
+@@ -3,3 +3,4 @@
#
obj-$(CONFIG_CAN_VCAN) += vcan.o
-+obj-$(CONFIG_CAN_MCP251X) += mcp251x.o
-+
-+ifdef CONFIG_CAN_DEBUG_DEVICES
-+EXTRA_CFLAGS += -DDEBUG
-+endif
-Index: linux-2.6.19.2/drivers/net/can/mcp251x.c
-===================================================================
++obj-$(CONFIG_CAN_MCP251X) += mcp251x.o
+diff --git a/drivers/net/can/mcp251x.c b/drivers/net/can/mcp251x.c
+new file mode 100644
+index 0000000..43be336
--- /dev/null
-+++ linux-2.6.19.2/drivers/net/can/mcp251x.c
-@@ -0,0 +1,964 @@
-+/*
++++ b/drivers/net/can/mcp251x.c
+@@ -0,0 +1,1000 @@
++/* drivers/net/can/mcp251x.c
++ *
++ * Driver for Microchip MCP251x CAN Controller with SPI Interface
++ *
++ * Integrated into Linux 2.6.27 under contract by:
++ * Claudio Scordino <cl...@ev...>
++ *
+ * Copyright 2007 Raymarine UK, Ltd. All Rights Reserved.
-+ * Written under contract by Katalix Systems, Ltd.
-+ */
-+
-+/*
++ * Written under contract by:
++ * Chris Elston, Katalix Systems, Ltd.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 as
++ * published by the Free Software Foundation.
++ *
+ * Based on Microchip MCP251x CAN controller driver written by
+ * David Vrabel, Copyright 2006 Arcom Control Systems Ltd.
+ *
@@ -48,19 +55,6 @@
+ */
+
+/*
-+ * The code contained herein is licensed under the GNU General Public
-+ * License. You may obtain a copy of the GNU General Public License
-+ * Version 2 or later at the following locations:
-+ *
-+ * http://www.opensource.org/licenses/gpl-license.html
-+ * http://www.gnu.org/copyleft/gpl.html
-+ */
-+
-+/*
-+ * CAN bus driver for Microchip 251x CAN Controller with SPI Interface
-+ */
-+
-+/*
+ * Notes:
+ * This driver interacts with 2 subsystems.
+ * - To the SPI subsystem it is a 'protocol driver'
@@ -71,6 +65,30 @@
+ *
+ */
+
++/*
++ * Platform file must specify something like:
++ *
++ * static struct mcp251x_platform_data mcp251x_info = {
++ * .oscillator_frequency = 19000000,
++ * .board_specific_setup = myboard_mcp251x_initfunc,
++ * .device_reset = myboard_mcp251x_reset,
++ * .transceiver_enable = NULL,
++ * };
++ *
++ * static struct spi_board_info spi_board_info[] __initdata = {
++ * {
++ * .modalias = "mcp251x",
++ * .platform_data = &mcp251x_info,
++ * .irq = 10,
++ * .max_speed_hz = 8000000,
++ * .bus_num = 1,
++ * .chip_select = 0
++ * },
++ * };
++ *
++ * (See Documentation/spi/spi-summary for more info)
++ */
++
+#include <linux/device.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
@@ -80,74 +98,80 @@
+#include <linux/can.h>
+#include <linux/spi/spi.h>
+#include <linux/can/dev.h>
++#include <linux/can/core.h>
+#include <linux/if_arp.h>
+#include <linux/dma-mapping.h>
+#include <linux/delay.h>
++#include <linux/completion.h>
++#include <asm/uaccess.h>
+#include <asm/io.h>
-+#include <asm/uaccess.h>
+#include "mcp251x.h"
+
+/* SPI interface instruction set */
-+#define INSTRUCTION_WRITE 0x02
-+#define INSTRUCTION_READ 0x03
-+#define INSTRUCTION_BIT_MODIFY 0x05
-+#define INSTRUCTION_LOAD_TXB(n) (0x40 + 2 * (n))
-+#define INSTRUCTION_READ_RXB(n) (0x90 + 2 * (n))
-+#define INSTRUCTION_RESET 0xC0
++#define INSTRUCTION_WRITE 0x02
++#define INSTRUCTION_READ 0x03
++#define INSTRUCTION_BIT_MODIFY 0x05
++#define INSTRUCTION_LOAD_TXB(n) (0x40 + 2 * (n))
++#define INSTRUCTION_READ_RXB(n) (((n) == 0) ? 0x90 : 0x94)
++#define INSTRUCTION_RESET 0xC0
+
+/* MPC251x registers */
+#define CANSTAT 0x0e
+#define CANCTRL 0x0f
-+#define CANCTRL_REQOP_MASK 0xe0
-+#define CANCTRL_REQOP_CONF 0x80
-+#define CANCTRL_REQOP_LISTEN_ONLY 0x60
-+#define CANCTRL_REQOP_LOOPBACK 0x40
-+#define CANCTRL_REQOP_SLEEP 0x20
-+#define CANCTRL_REQOP_NORMAL 0x00
-+#define CANCTRL_OSM 0x08
++# define CANCTRL_REQOP_MASK 0xe0
++# define CANCTRL_REQOP_CONF 0x80
++# define CANCTRL_REQOP_LISTEN_ONLY 0x60
++# define CANCTRL_REQOP_LOOPBACK 0x40
++# define CANCTRL_REQOP_SLEEP 0x20
++# define CANCTRL_REQOP_NORMAL 0x00
++# define CANCTRL_OSM 0x08
++# define CANCTRL_ABAT 0x10
+#define TEC 0x1c
+#define REC 0x1d
+#define CNF1 0x2a
+#define CNF2 0x29
-+#define CNF2_BTLMODE 0x80
++# define CNF2_BTLMODE 0x80
+#define CNF3 0x28
-+#define CNF3_SOF 0x08
-+#define CNF3_WAKFIL 0x04
-+#define CNF3_PHSEG2_MASK 0x07
++# define CNF3_SOF 0x08
++# define CNF3_WAKFIL 0x04
++# define CNF3_PHSEG2_MASK 0x07
+#define CANINTE 0x2b
-+#define CANINTE_MERRE 0x80
-+#define CANINTE_WAKIE 0x40
-+#define CANINTE_ERRIE 0x20
-+#define CANINTE_TX2IE 0x10
-+#define CANINTE_TX1IE 0x08
-+#define CANINTE_TX0IE 0x04
-+#define CANINTE_RX1IE 0x02
-+#define CANINTE_RX0IE 0x01
++# define CANINTE_MERRE 0x80
++# define CANINTE_WAKIE 0x40
++# define CANINTE_ERRIE 0x20
++# define CANINTE_TX2IE 0x10
++# define CANINTE_TX1IE 0x08
++# define CANINTE_TX0IE 0x04
++# define CANINTE_RX1IE 0x02
++# define CANINTE_RX0IE 0x01
+#define CANINTF 0x2c
-+#define CANINTF_MERRF 0x80
-+#define CANINTF_WAKIF 0x40
-+#define CANINTF_ERRIF 0x20
-+#define CANINTF_TX2IF 0x10
-+#define CANINTF_TX1IF 0x08
-+#define CANINTF_TX0IF 0x04
-+#define CANINTF_RX1IF 0x02
-+#define CANINTF_RX0IF 0x01
++# define CANINTF_MERRF 0x80
++# define CANINTF_WAKIF 0x40
++# define CANINTF_ERRIF 0x20
++# define CANINTF_TX2IF 0x10
++# define CANINTF_TX1IF 0x08
++# define CANINTF_TX0IF 0x04
++# define CANINTF_RX1IF 0x02
++# define CANINTF_RX0IF 0x01
+#define EFLG 0x2d
-+#define EFLG_EWARN 0x01
-+#define EFLG_RXWAR 0x02
-+#define EFLG_TXWAR 0x04
-+#define EFLG_RXEP 0x08
-+#define EFLG_TXEP 0x10
-+#define EFLG_TXBO 0x20
-+#define EFLG_RX0OVR 0x40
-+#define EFLG_RX1OVR 0x80
++# define EFLG_EWARN 0x01
++# define EFLG_RXWAR 0x02
++# define EFLG_TXWAR 0x04
++# define EFLG_RXEP 0x08
++# define EFLG_TXEP 0x10
++# define EFLG_TXBO 0x20
++# define EFLG_RX0OVR 0x40
++# define EFLG_RX1OVR 0x80
+#define TXBCTRL(n) ((n * 0x10) + 0x30)
-+#define TXBCTRL_TXREQ 0x08
++# define TXBCTRL_TXREQ 0x08
++#define RXBCTRL(n) ((n * 0x10) + 0x60)
++# define RXBCTRL_BUKT 0x04
+
+/* Buffer size required for the largest SPI transfer (i.e., reading a
+ * frame). */
-+#define CAN_FRAME_MAX_DATA_LEN 8
-+#define SPI_TRANSFER_BUF_LEN (2*(6 + CAN_FRAME_MAX_DATA_LEN))
++#define CAN_FRAME_MAX_DATA_LEN 8
++#define SPI_TRANSFER_BUF_LEN (2*(6 + CAN_FRAME_MAX_DATA_LEN))
++#define CAN_FRAME_MAX_BITS 128
+
+#define DEVICE_NAME "mcp251x"
+
@@ -160,856 +184,1380 @@
+MODULE_PARM_DESC(loopback, "Loop back frames (for testing). Default: 0 (Off)");
+
+struct mcp251x_priv {
-+ struct can_priv can;
-+ struct net_device *net;
-+ struct spi_device *spi;
++ struct can_priv can;
++ struct net_device *net;
++ struct spi_device *spi;
+
-+ struct semaphore spi_lock; /* SPI buffer lock */
-+ uint8_t *spi_tx_buf;
-+ uint8_t *spi_rx_buf;
-+ dma_addr_t spi_tx_dma;
-+ dma_addr_t spi_rx_dma;
++ struct semaphore spi_lock; /* SPI buffer lock */
++ u8 *spi_tx_buf;
++ u8 *spi_rx_buf;
++ dma_addr_t spi_tx_dma;
++ dma_addr_t spi_rx_dma;
+
-+ struct sk_buff *tx_skb;
-+ struct work_struct tx_work;
-+ struct work_struct irq_work;
++ struct sk_buff *tx_skb;
++ struct workqueue_struct *wq;
++ struct work_struct tx_work;
++ struct work_struct irq_work;
++ struct completion awake;
++ int wake;
+};
+
-+
-+static uint8_t mcp251x_read_reg(struct spi_device *spi, uint8_t reg)
++static u8 mcp251x_read_reg(struct spi_device *spi, uint8_t reg)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .len = 3,
-+ .cs_change = 0,
-+ };
-+ struct spi_message m;
-+ uint8_t val = 0;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .len = 3,
++ .cs_change = 0,
++ };
++ struct spi_message m;
++ u8 val = 0;
++ int ret;
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_READ;
-+ priv->spi_tx_buf[1] = reg;
++ priv->spi_tx_buf[0] = INSTRUCTION_READ;
++ priv->spi_tx_buf[1] = reg;
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0) {
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
-+ } else
-+ val = priv->spi_rx_buf[2];
++ ret = spi_sync(spi, &m);
++ if (ret < 0) {
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ } else
++ val = priv->spi_rx_buf[2];
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ /*dev_dbg(&spi->dev, "%s: reg 0x%02X val 0x%02X\n", __FUNCTION__, reg, val);*/
-+
-+ return val;
++ return val;
+}
+
+
-+static void mcp251x_write_reg(struct spi_device *spi, uint8_t reg, uint8_t val)
++static void mcp251x_write_reg(struct spi_device *spi, u8 reg, uint8_t val)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .len = 3,
-+ .cs_change = 0,
-+ };
-+ struct spi_message m;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .len = 3,
++ .cs_change = 0,
++ };
++ struct spi_message m;
++ int ret;
+
-+ /*dev_dbg(&spi->dev, "%s: reg 0x%02X val 0x%02X\n", __FUNCTION__, reg, val);*/
++ down(&priv->spi_lock);
+
-+ down(&priv->spi_lock);
++ priv->spi_tx_buf[0] = INSTRUCTION_WRITE;
++ priv->spi_tx_buf[1] = reg;
++ priv->spi_tx_buf[2] = val;
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_WRITE;
-+ priv->spi_tx_buf[1] = reg;
-+ priv->spi_tx_buf[2] = val;
++ spi_message_init(&m);
+
-+ spi_message_init(&m);
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ spi_message_add_tail(&t, &m);
+
-+ spi_message_add_tail(&t, &m);
++ ret = spi_sync(spi, &m);
+
-+ ret = spi_sync(spi, &m);
++ up(&priv->spi_lock);
+
-+ up(&priv->spi_lock);
-+
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
-+
-+ return;
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
+}
+
+
-+static void mcp251x_write_bits(struct spi_device *spi, uint8_t reg,
-+ uint8_t mask, uint8_t val)
++static void mcp251x_write_bits(struct spi_device *spi, u8 reg,
++ u8 mask, uint8_t val)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .len = 4,
-+ .cs_change = 0,
-+ };
-+ struct spi_message m;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .len = 4,
++ .cs_change = 0,
++ };
++ struct spi_message m;
++ int ret;
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_BIT_MODIFY;
-+ priv->spi_tx_buf[1] = reg;
-+ priv->spi_tx_buf[2] = mask;
-+ priv->spi_tx_buf[3] = val;
++ priv->spi_tx_buf[0] = INSTRUCTION_BIT_MODIFY;
++ priv->spi_tx_buf[1] = reg;
++ priv->spi_tx_buf[2] = mask;
++ priv->spi_tx_buf[3] = val;
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
++ ret = spi_sync(spi, &m);
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ return;
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed\n", __FUNCTION__);
+}
+
+
+static void mcp251x_hw_tx(struct spi_device *spi, struct can_frame *frame,
-+ int tx_buf_idx)
++int tx_buf_idx)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .cs_change = 0,
-+ .len = 6 + CAN_FRAME_MAX_DATA_LEN,
-+ };
-+ uint8_t *tx_buf = priv->spi_tx_buf;
-+ struct spi_message m;
-+ int ret;
-+ uint32_t sid, eid, exide, rtr;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .cs_change = 0,
++ .len = 6 + CAN_FRAME_MAX_DATA_LEN,
++ };
++ u8 *tx_buf = priv->spi_tx_buf;
++ struct spi_message m;
++ int ret;
++ u32 sid, eid, exide, rtr;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ sid = frame->can_id & CAN_SFF_MASK; /* Standard ID */
-+ eid = frame->can_id & CAN_EFF_MASK; /* Extended ID */
-+ exide = (frame->can_id & CAN_EFF_FLAG) ? 1 : 0; /* Extended ID Enable */
-+ rtr = (frame->can_id & CAN_RTR_FLAG) ? 1 : 0; /* Remote transmission */
++ sid = frame->can_id & CAN_SFF_MASK; /* Standard ID */
++ eid = frame->can_id & CAN_EFF_MASK; /* Extended ID */
++ exide = (frame->can_id & CAN_EFF_FLAG) ? 1 : 0; /* Extended ID Enable */
++ rtr = (frame->can_id & CAN_RTR_FLAG) ? 1 : 0; /* Remote transmission */
+
-+ mcp251x_read_reg(spi, CANSTAT);
++ down(&priv->spi_lock);
+
-+ down(&priv->spi_lock);
++ tx_buf[0] = INSTRUCTION_LOAD_TXB(tx_buf_idx);
++ tx_buf[1] = sid >> 3;
++ tx_buf[2] = (sid << 5) | (exide << 3) | (eid >> 16);
++ tx_buf[3] = eid >> 8;
++ tx_buf[4] = eid;
++ tx_buf[5] = (rtr << 6) | frame->can_dlc;
+
-+ tx_buf[0] = INSTRUCTION_LOAD_TXB(tx_buf_idx);
-+ tx_buf[1] = sid >> 3;
-+ tx_buf[2] = (sid << 5) | (exide << 3) | (eid >> 16);
-+ tx_buf[3] = eid >> 8;
-+ tx_buf[4] = eid;
-+ tx_buf[5] = (rtr << 6) | frame->can_dlc;
++ memcpy(tx_buf + 6, frame->data, frame->can_dlc);
+
-+ memcpy(tx_buf + 6, frame->data, frame->can_dlc);
++ spi_message_init(&m);
+
-+ spi_message_init(&m);
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ spi_message_add_tail(&t, &m);
+
-+ spi_message_add_tail(&t, &m);
++ ret = spi_sync(spi, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ up(&priv->spi_lock);
+
-+ /* FIXME: Should we exit with an error here? */
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
+
-+ up(&priv->spi_lock);
++ /* FIXME: Should we exit with an error here? */
+
-+ mcp251x_write_reg(spi, TXBCTRL(tx_buf_idx), TXBCTRL_TXREQ);
-+
-+ return;
++ mcp251x_write_reg(spi, TXBCTRL(tx_buf_idx), TXBCTRL_TXREQ);
+}
+
+
+static void mcp251x_hw_rx(struct spi_device *spi, int buf_idx)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct spi_transfer t = {
-+ .tx_buf = priv->spi_tx_buf,
-+ .rx_buf = priv->spi_rx_buf,
-+ .cs_change = 0,
-+ .len = 14,
-+ };
-+ uint8_t *tx_buf = priv->spi_tx_buf;
-+ uint8_t *rx_buf = priv->spi_rx_buf;
-+ struct spi_message m;
-+ struct sk_buff *skb;
-+ struct can_frame *frame;
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct spi_transfer t = {
++ .tx_buf = priv->spi_tx_buf,
++ .rx_buf = priv->spi_rx_buf,
++ .cs_change = 0,
++ .len = 14, /* RX buffer: RXBnCTRL to RXBnD7 */
++ };
++ u8 *tx_buf = priv->spi_tx_buf;
++ u8 *rx_buf = priv->spi_rx_buf;
++ struct spi_message m;
++ struct sk_buff *skb;
++ struct can_frame *frame;
++ int ret;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ skb = dev_alloc_skb(sizeof(struct can_frame));
-+ if (!skb) {
-+ dev_dbg(&spi->dev, "%s: out of memory for Rx'd frame\n", __FUNCTION__);
-+ priv->can.net_stats.rx_dropped++;
-+ return;
-+ }
-+ skb->dev = priv->net;
-+ frame = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
++ skb = dev_alloc_skb(sizeof(struct can_frame));
++ if (!skb) {
++ dev_dbg(&spi->dev, "%s: out of memory for Rx'd frame\n", __FUNCTION__);
++ priv->net->stats.rx_dropped++;
++ return;
++ }
++ skb->dev = priv->net;
++ frame = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ tx_buf[0] = INSTRUCTION_READ_RXB(buf_idx);
++ tx_buf[0] = INSTRUCTION_READ_RXB(buf_idx);
+
-+ spi_message_init(&m);
++ spi_message_init(&m);
+
-+ if (enable_dma) {
-+ t.tx_dma = priv->spi_tx_dma;
-+ t.rx_dma = priv->spi_rx_dma;
-+ m.is_dma_mapped = 1;
-+ }
++ if (enable_dma) {
++ t.tx_dma = priv->spi_tx_dma;
++ t.rx_dma = priv->spi_rx_dma;
++ m.is_dma_mapped = 1;
++ }
+
-+ spi_message_add_tail(&t, &m);
++ spi_message_add_tail(&t, &m);
+
-+ ret = spi_sync(spi, &m);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
-+ /* FIXME: Should we exit with an error here? */
++ ret = spi_sync(spi, &m);
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ /* FIXME: Should we exit with an error here? */
+
-+ if ((rx_buf[2] >> 3) & 0x1) {
-+ /* Extended ID format */
-+ frame->can_id = CAN_EFF_FLAG;
-+ frame->can_id |= (rx_buf[2] << 16) | (rx_buf[3] << 8) | rx_buf[4];
-+ } else {
-+ /* Standard ID format */
-+ frame->can_id = (rx_buf[1] << 3) | (rx_buf[2] >> 5);
-+ }
++ if ((rx_buf[2] >> 3) & 0x1) {
++ /* Extended ID format */
++ frame->can_id = CAN_EFF_FLAG;
++ frame->can_id |= (rx_buf[2] << 16) | (rx_buf[3] << 8) | rx_buf[4];
++ } else {
++ /* Standard ID format */
++ frame->can_id = (rx_buf[1] << 3) | (rx_buf[2] >> 5);
++ }
+
-+ if ((rx_buf[5] >> 6) & 0x1) {
-+ /* Remote transmission request */
-+ frame->can_id |= CAN_RTR_FLAG;
-+ }
++ if ((rx_buf[5] >> 6) & 0x1) {
++ /* Remote transmission request */
++ frame->can_id |= CAN_RTR_FLAG;
++ }
+
-+ dev_dbg(&spi->dev, "%s: can_id rec'd 0x%08X\n", __FUNCTION__, frame->can_id);
++ /* Data length */
++ frame->can_dlc = rx_buf[5] & 0x0f;
++ memcpy(frame->data, rx_buf + 6, CAN_FRAME_MAX_DATA_LEN);
+
-+ /* Data length */
-+ frame->can_dlc = rx_buf[5] & 0x0f;
-+ memcpy(frame->data, rx_buf + 6, CAN_FRAME_MAX_DATA_LEN);
++ up(&priv->spi_lock);
+
-+ up(&priv->spi_lock);
++ priv->net->stats.rx_packets++;
++ priv->net->stats.rx_bytes += frame->can_dlc;
+
-+ priv->can.net_stats.rx_packets++;
-+ priv->can.net_stats.rx_bytes += frame->can_dlc;
-+
-+ skb->protocol = __constant_htons(ETH_P_CAN);
-+ skb->pkt_type = PACKET_BROADCAST;
-+ skb->ip_summed = CHECKSUM_UNNECESSARY;
-+ netif_rx(skb);
-+
-+ return;
++ skb->protocol = __constant_htons(ETH_P_CAN);
++ skb->pkt_type = PACKET_BROADCAST;
++ skb->ip_summed = CHECKSUM_UNNECESSARY;
++ netif_rx(skb);
+}
+
+
+static void mcp251x_hw_sleep(struct spi_device *spi)
+{
-+ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_SLEEP);
++ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_SLEEP);
+}
+
+static void mcp251x_hw_wakeup(struct spi_device *spi)
+{
-+ /* Can only wake up by generating a wake-up interrupt. */
-+ mcp251x_write_bits(spi, CANINTE, CANINTE_WAKIE, CANINTE_WAKIE);
-+ mcp251x_write_bits(spi, CANINTF, CANINTF_WAKIF, CANINTF_WAKIF);
-+}
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
+
-+/* FIXME: modes of operation CONFIG, NORMAL, SLEEP, LISTEN, LOOPBACK */
-+static int mcp251x_set_mode(struct net_device *net, uint8_t mode)
-+{
-+ return 0;
++ priv->wake = 1;
++
++ /* Can only wake up by generating a wake-up interrupt. */
++ mcp251x_write_bits(spi, CANINTE, CANINTE_WAKIE, CANINTE_WAKIE);
++ mcp251x_write_bits(spi, CANINTF, CANINTF_WAKIF, CANINTF_WAKIF);
++
++ /* Wait until the device is awake */
++ wait_for_completion(&priv->awake);
+}
+
++
+static int mcp251x_hard_start_xmit(struct sk_buff *skb, struct net_device *net)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ struct can_frame *frame;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ if (skb->len != sizeof(struct can_frame)) {
-+ dev_dbg(&spi->dev, "dropping packet - bad length\n");
-+ dev_kfree_skb(skb);
-+ priv->can.net_stats.tx_dropped++;
-+ return 0;
-+ }
++ if (skb->len != sizeof(struct can_frame)) {
++ dev_dbg(&spi->dev, "dropping packet - bad length\n");
++ dev_kfree_skb(skb);
++ net->stats.tx_dropped++;
++ return 0;
++ }
+
-+ netif_stop_queue(net);
++ netif_stop_queue(net);
++ priv->tx_skb = skb;
++ net->trans_start = jiffies;
++ queue_work(priv->wq, &priv->tx_work);
+
-+ frame = (struct can_frame *)skb->data;
-+
-+ priv->tx_skb = skb;
-+ schedule_work(&priv->tx_work);
-+
-+ return 0;
++ return NETDEV_TX_OK;
+}
+
+
+static int mcp251x_do_set_mode(struct net_device *net, can_mode_t mode)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
+
-+ dev_dbg(&spi->dev, "%s (unimplemented)\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s (unimplemented)\n", __FUNCTION__);
+
-+ switch (mode) {
-+ default:
-+ return -EOPNOTSUPP;
-+ }
++ switch (mode) {
++ default:
++ return -EOPNOTSUPP;
++ }
+
-+ return 0;
++ return 0;
+}
+
+
+static int mcp251x_open(struct net_device *net)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(1);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(1);
+
-+ mcp251x_hw_wakeup(spi);
++ mcp251x_hw_wakeup(spi);
+
-+ /* Enable interrupts */
-+ mcp251x_write_reg(spi, CANINTE,
-+ CANINTE_ERRIE | CANINTE_TX2IE | CANINTE_TX1IE |
-+ CANINTE_TX0IE | CANINTE_RX1IE | CANINTE_RX0IE );
++ /* Enable interrupts */
++ mcp251x_write_reg(spi, CANINTE,
++ CANINTE_ERRIE | CANINTE_TX2IE | CANINTE_TX1IE |
++ CANINTE_TX0IE | CANINTE_RX1IE | CANINTE_RX0IE );
+
-+ if (loopback) {
-+ /* Put device into loopback mode */
-+ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_LOOPBACK);
-+ } else {
-+ /* Put device into normal mode */
-+ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_NORMAL);
++ if (loopback) {
++ /* Put device into loopback mode */
++ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_LOOPBACK);
++ } else {
++ /* Put device into normal mode */
++ mcp251x_write_reg(spi, CANCTRL, CANCTRL_REQOP_NORMAL);
+
-+ /* Wait for the device to enter normal mode */
-+ while (mcp251x_read_reg(spi, CANSTAT) & 0xE0)
-+ udelay(10);
-+ }
++ /* Wait for the device to enter normal mode */
++ while (mcp251x_read_reg(spi, CANSTAT) & 0xE0)
++ udelay(10);
++ }
+
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_stop(struct net_device *net)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ /* Disable and clear pending interrupts */
-+ mcp251x_write_reg(spi, CANINTE, 0x00);
-+ mcp251x_write_reg(spi, CANINTF, 0x00);
++ /* Disable and clear pending interrupts */
++ mcp251x_write_reg(spi, CANINTE, 0x00);
++ mcp251x_write_reg(spi, CANINTF, 0x00);
+
-+ mcp251x_hw_sleep(spi);
++ mcp251x_hw_sleep(spi);
+
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(0);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(0);
+
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_do_set_bit_time(struct net_device *net, struct can_bittime *bt)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ uint8_t state;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ u8 state;
+
-+ dev_dbg(&spi->dev, "%s: BRP = %d, PropSeg = %d, PS1 = %d,"
-+ " PS2 = %d, SJW = %d\n", __FUNCTION__, bt->std.brp,
-+ bt->std.prop_seg, bt->std.phase_seg1, bt->std.phase_seg2,
-+ bt->std.sjw);
++ dev_dbg(&spi->dev, "%s: BRP = %d, PropSeg = %d, PS1 = %d,"
++ " PS2 = %d, SJW = %d\n", __FUNCTION__, bt->std.brp,
++ bt->std.prop_seg, bt->std.phase_seg1, bt->std.phase_seg2,
++ bt->std.sjw);
+
-+ /* Store original mode and set mode to config */
-+ state = mcp251x_read_reg(spi, CANSTAT) & CANCTRL_REQOP_MASK;
-+ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, CANCTRL_REQOP_CONF);
++ /* Store original mode and set mode to config */
++ state = mcp251x_read_reg(spi, CANSTAT) & CANCTRL_REQOP_MASK;
++ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, CANCTRL_REQOP_CONF);
+
-+ mcp251x_write_reg(spi, CNF1, ((bt->std.sjw - 1) << 6) | bt->std.brp);
-+ mcp251x_write_reg(spi, CNF2, CNF2_BTLMODE | ((bt->std.phase_seg1 - 1) << 3) |
-+ (bt->std.prop_seg - 1));
-+ mcp251x_write_bits(spi, CNF3, CNF3_PHSEG2_MASK, (bt->std.phase_seg2 - 1));
++ mcp251x_write_reg(spi, CNF1, ((bt->std.sjw - 1) << 6) | (bt->std.brp-1));
++ mcp251x_write_reg(spi, CNF2, CNF2_BTLMODE | ((bt->std.phase_seg1 - 1) << 3) | (bt->std.prop_seg - 1));
++ mcp251x_write_bits(spi, CNF3, CNF3_PHSEG2_MASK, (bt->std.phase_seg2 - 1));
+
-+ /* Restore original state */
-+ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, state);
++ /* Restore original state */
++ mcp251x_write_bits(spi, CANCTRL, CANCTRL_REQOP_MASK, state);
+
-+ return 0;
++ return 0;
+}
+
+
+static int mcp251x_do_get_state(struct net_device *net, can_state_t *state)
+{
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
-+ uint8_t eflag;
++ struct mcp251x_priv *priv = netdev_priv(net);
++ struct spi_device *spi = priv->spi;
++ u8 eflag;
+
-+ eflag = mcp251x_read_reg(spi, EFLG);
++ eflag = mcp251x_read_reg(spi, EFLG);
+
-+ if (eflag & EFLG_TXBO) {
-+ *state = CAN_STATE_BUS_OFF;
-+ } else if (eflag & (EFLG_RXEP | EFLG_TXEP)) {
-+ *state = CAN_STATE_BUS_PASSIVE;
-+ } else if (eflag & EFLG_EWARN) {
-+ *state = CAN_STATE_BUS_WARNING;
-+ } else {
-+ *state = CAN_STATE_ACTIVE;
-+ }
++ if (eflag & EFLG_TXBO) {
++ *state = CAN_STATE_BUS_OFF;
++ } else if (eflag & (EFLG_RXEP | EFLG_TXEP)) {
++ *state = CAN_STATE_BUS_PASSIVE;
++ } else if (eflag & EFLG_EWARN) {
++ *state = CAN_STATE_BUS_WARNING;
++ } else {
++ *state = CAN_STATE_ACTIVE;
++ }
+
-+ return 0;
++ return 0;
+}
+
+
-+static void mcp251x_tx_work_handler(struct work_struct *work)
++static void mcp251x_tx_work_handler(struct work_struct *ws)
+{
-+ struct mcp251x_priv *priv = container_of(work, struct mcp251x_priv, tx_work);
-+ struct spi_device *spi = priv->spi;
-+ struct can_frame *frame = (struct can_frame *)priv->tx_skb->data;
++ struct mcp251x_priv *priv = container_of(ws, struct mcp251x_priv, tx_work);
++ struct spi_device *spi = priv->spi;
++ struct can_frame *frame = (struct can_frame *)priv->tx_skb->data;
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
+
-+ if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN)
-+ frame->can_dlc = CAN_FRAME_MAX_DATA_LEN;
++ if (frame->can_dlc > CAN_FRAME_MAX_DATA_LEN)
++ frame->can_dlc = CAN_FRAME_MAX_DATA_LEN;
+
-+ /* FIXME: use all 3 Tx buffers */
-+ mcp251x_hw_tx(spi, frame, 0);
-+
-+ return;
++ /* FIXME: use all 3 Tx buffers */
++ mcp251x_hw_tx(spi, frame, 0);
+}
+
+
-+static void mcp251x_irq_work_handler(struct work_struct *work)
++static void mcp251x_irq_work_handler(struct work_struct *ws)
+{
-+ struct mcp251x_priv *priv = container_of(work, struct mcp251x_priv, irq_work);
-+ struct spi_device *spi = priv->spi;
-+ struct net_device *net = priv->net;
-+ uint8_t intf;
++ struct mcp251x_priv *priv = container_of(ws, struct mcp251x_priv, irq_work);
++ struct spi_device *spi = priv->spi;
++ struct net_device *net = priv->net;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ u8 intf;
+
-+ for (;;) {
-+ intf = mcp251x_read_reg(spi, CANINTF);
-+ if (intf == 0x00)
-+ break;
++ for (;;) {
++ if (priv->wake) {
++ /* Wait whilst the device wakes up */
++ udelay(200 * (128 * USEC_PER_SEC / pdata->oscillator_frequency));
++ priv->wake = 0;
++ }
+
-+ dev_dbg(&spi->dev, "interrupt:%s%s%s%s%s%s%s%s\n",
-+ (intf & CANINTF_MERRF) ? " MERR":"",
-+ (intf & CANINTF_WAKIF) ? " WAK":"",
-+ (intf & CANINTF_ERRIF) ? " ERR":"",
-+ (intf & CANINTF_TX2IF) ? " TX2":"",
-+ (intf & CANINTF_TX1IF) ? " TX1":"",
-+ (intf & CANINTF_TX0IF) ? " TX0":"",
-+ (intf & CANINTF_RX1IF) ? " RX1":"",
-+ (intf & CANINTF_RX0IF) ? " RX0":"");
++ intf = mcp251x_read_reg(spi, CANINTF);
++ if (intf == 0x00)
++ break;
+
-+ if (intf & CANINTF_MERRF) {
-+ uint8_t txbnctrl;
-+ /* if there are no pending Tx buffers, restart queue */
-+ txbnctrl = mcp251x_read_reg(spi, TXBCTRL(0));
-+ if (!(txbnctrl & TXBCTRL_TXREQ))
-+ netif_wake_queue(net);
-+ }
++ dev_dbg(&spi->dev, "interrupt:%s%s%s%s%s%s%s%s\n",
++ (intf & CANINTF_MERRF) ? " MERR":"",
++ (intf & CANINTF_WAKIF) ? " WAK":"",
++ (intf & CANINTF_ERRIF) ? " ERR":"",
++ (intf & CANINTF_TX2IF) ? " TX2":"",
++ (intf & CANINTF_TX1IF) ? " TX1":"",
++ (intf & CANINTF_TX0IF) ? " TX0":"",
++ (intf & CANINTF_RX1IF) ? " RX1":"",
++ (intf & CANINTF_RX0IF) ? " RX0":"");
+
-+ if (intf & CANINTF_ERRIF) {
-+ uint8_t eflg = mcp251x_read_reg(spi, EFLG);
++ if (intf & CANINTF_WAKIF) {
++ complete(&priv->awake);
++ }
+
-+ dev_dbg(&spi->dev, "EFLG = 0x%02x\n", eflg);
++ if (intf & CANINTF_MERRF) {
++ u8 txbnctrl;
++ /* if there are no pending Tx buffers, restart queue */
++ txbnctrl = mcp251x_read_reg(spi, TXBCTRL(0));
++ if (!(txbnctrl & TXBCTRL_TXREQ))
++ netif_wake_queue(net);
++ }
+
-+ if (eflg & (EFLG_RX0OVR | EFLG_RX1OVR)) {
-+ if (eflg & EFLG_RX0OVR)
-+ priv->can.net_stats.rx_over_errors++;
-+ if (eflg & EFLG_RX1OVR)
-+ priv->can.net_stats.rx_over_errors++;
-+ mcp251x_write_reg(spi, EFLG, 0x00);
-+ }
-+ }
++ if (intf & CANINTF_ERRIF) {
++ struct sk_buff *skb;
++ struct can_frame *frame = 0;
++ u8 eflag = mcp251x_read_reg(spi, EFLG);
+
-+ if (intf & (CANINTF_TX2IF | CANINTF_TX1IF | CANINTF_TX0IF)) {
-+ priv->can.net_stats.tx_packets++;
-+ priv->can.net_stats.tx_bytes += ((struct can_frame *)(priv->tx_skb->data))->can_dlc;
-+ dev_kfree_skb(priv->tx_skb);
-+ netif_wake_queue(net);
-+ }
++ dev_dbg(&spi->dev, "EFLG = 0x%02x\n", eflag);
+
-+ if (intf & CANINTF_RX0IF)
-+ mcp251x_hw_rx(spi, 0);
++ /* Create error frame */
++ skb = dev_alloc_skb(sizeof(struct can_frame));
++ if (skb) {
++ frame = (struct can_frame *)skb_put(skb, sizeof(struct can_frame));
++ frame->can_id = CAN_ERR_FLAG;
++ frame->can_dlc = CAN_ERR_DLC;
+
-+ if (intf & CANINTF_RX1IF)
-+ mcp251x_hw_rx(spi, 1);
++ skb->dev = net;
++ skb->protocol = __constant_htons(ETH_P_CAN);
++ skb->pkt_type = PACKET_BROADCAST;
++ skb->ip_summed = CHECKSUM_UNNECESSARY;
+
-+ mcp251x_write_bits(spi, CANINTF, intf, 0x00);
-+ }
++ /* Set error frame flags according to bus state */
++ if (eflag & EFLG_TXBO) {
++ frame->can_id |= CAN_ERR_BUSOFF;
++ } else if (eflag & EFLG_TXEP) {
++ frame->can_id |= CAN_ERR_CRTL;
++ frame->data[1] |= CAN_ERR_CRTL_TX_PASSIVE;
++ } else if (eflag & EFLG_RXEP) {
++ frame->can_id |= CAN_ERR_CRTL;
++ frame->data[1] |= CAN_ERR_CRTL_RX_PASSIVE;
++ } else if (eflag & EFLG_TXWAR) {
++ frame->can_id |= CAN_ERR_CRTL;
++ frame->data[1] |= CAN_ERR_CRTL_TX_WARNING;
++ } else if (eflag & EFLG_RXWAR) {
++ frame->can_id |= CAN_ERR_CRTL;
++ frame->data[1] |= CAN_ERR_CRTL_RX_WARNING;
++ }
++ }
+
-+ mcp251x_read_reg(spi, CANSTAT);
++ if (eflag & (EFLG_RX0OVR | EFLG_RX1OVR)) {
++ if (eflag & EFLG_RX0OVR) {
++ net->stats.rx_over_errors++;
++ } if (eflag & EFLG_RX1OVR) {
++ net->stats.rx_over_errors++;
++ } if (frame) {
++ frame->can_id |= CAN_ERR_CRTL;
++ frame->data[1] = CAN_ERR_CRTL_RX_OVERFLOW;
++ }
++ mcp251x_write_reg(spi, EFLG, 0x00);
++ }
+
-+ dev_dbg(&spi->dev, "interrupt ended\n");
++ if (skb)
++ netif_rx(skb);
++ }
+
-+ return;
++ if (intf & (CANINTF_TX2IF | CANINTF_TX1IF | CANINTF_TX0IF)) {
++ net->stats.tx_packets++;
++ net->stats.tx_bytes +=
++ ((struct can_frame *)(priv->tx_skb->data))->can_dlc;
++ dev_kfree_skb(priv->tx_skb);
++ netif_wake_queue(net);
++ }
++
++ if (intf & CANINTF_RX0IF)
++ mcp251x_hw_rx(spi, 0);
++
++ if (intf & CANINTF_RX1IF)
++ mcp251x_hw_rx(spi, 1);
++
++ /* Clear everything except RX bits, don't want to miss any */
++ mcp251x_write_bits(spi, CANINTF, intf & ~(CANINTF_RX0IF | CANINTF_RX1IF), 0x00);
++ }
++
++ mcp251x_read_reg(spi, CANSTAT);
++
++ dev_dbg(&spi->dev, "interrupt ended\n");
+}
+
+
+static irqreturn_t mcp251x_can_isr(int irq, void *dev_id)
+{
-+ struct net_device *net = (struct net_device *)dev_id;
-+ struct mcp251x_priv *priv = netdev_priv(net);
-+ struct spi_device *spi = priv->spi;
++ struct net_device *net = (struct net_device *)dev_id;
++ struct mcp251x_priv *priv = netdev_priv(net);
+
-+ dev_dbg(&spi->dev, "%s\n", __FUNCTION__);
++ /* Schedule bottom half */
++ queue_work(priv->wq, &priv->irq_work);
+
-+ /* Schedule bottom half */
-+ schedule_work(&priv->irq_work);
-+
-+ return IRQ_HANDLED;
++ return IRQ_HANDLED;
+}
+
++
+static void mcp251x_hw_reset(struct spi_device *spi)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ int ret;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ int ret;
+
-+ down(&priv->spi_lock);
++ down(&priv->spi_lock);
+
-+ priv->spi_tx_buf[0] = INSTRUCTION_RESET;
++ priv->spi_tx_buf[0] = INSTRUCTION_RESET;
+
-+ ret = spi_write(spi, priv->spi_tx_buf, 1);
-+ if (ret < 0)
-+ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
++ ret = spi_write(spi, priv->spi_tx_buf, 1);
+
-+ up(&priv->spi_lock);
++ up(&priv->spi_lock);
+
-+ return;
++ if (ret < 0)
++ dev_dbg(&spi->dev, "%s: failed: ret = %d\n", __FUNCTION__, ret);
+}
+
+static struct net_device *alloc_mcp251x_netdev(int sizeof_priv)
+{
-+ struct net_device *net;
-+ struct mcp251x_priv *priv;
++ struct net_device *net;
++ struct mcp251x_priv *priv;
+
-+ net = alloc_candev(sizeof_priv);
-+ if (!net) {
-+ return NULL;
-+ }
++ net = alloc_candev(sizeof_priv);
++ if (!net) {
++ return NULL;
++ }
+
-+ priv = netdev_priv(net);
++ priv = netdev_priv(net);
+
-+ net->open = mcp251x_open;
-+ net->stop = mcp251x_stop;
-+ net->hard_start_xmit = mcp251x_hard_start_xmit;
++ net->open = mcp251x_open;
++ net->stop = mcp251x_stop;
++ net->hard_start_xmit = mcp251x_hard_start_xmit;
+
-+ /* Set loopback if module parameter was specified */
-+ if (loopback)
-+ net->flags |= IFF_LOOPBACK;
++ priv->can.baudrate = 250000;
++ priv->can.do_set_bit_time = mcp251x_do_set_bit_time;
++ priv->can.do_get_state = mcp251x_do_get_state;
++ priv->can.do_set_mode = mcp251x_do_set_mode;
+
-+ priv->can.baudrate = 250000;
-+ priv->can.do_set_bit_time = mcp251x_do_set_bit_time;
-+ priv->can.do_get_state = mcp251x_do_get_state;
-+ priv->can.do_set_mode = mcp251x_do_set_mode;
++ priv->net = net;
+
-+ priv->net = net;
-+
-+ return net;
++ return net;
+}
+
-+/* Platform file will specify something like:
-+ *
-+ * static struct mcp251x_platform_data mcp251x_info = {
-+ * .board_specific_setup = myboard_mcp251x_initfunc,
-+ * };
-+ *
-+ * static struct spi_board_info spi_board_info[] __initdata = {
-+ * {
-+ * .modalias = "mcp251x",
-+ * .platform_data = &mcp251x_info,
-+ * .irq = 10,
-+ * .max_speed_hz = 8000000,
-+ * .bus_num = 1,
-+ * .chip_select = 0
-+ * },
-+ * };
-+ *
-+ * (See Documentation/spi/spi-summary for more info)
-+ */
+
+static int __devinit mcp251x_can_probe(struct spi_device *spi)
+{
-+ struct net_device *net;
-+ struct mcp251x_priv *priv;
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-+ struct can_bittime bit_time;
-+ int ret = -ENODEV;
-+ printk("mcp251x probe\n");
-+ if (!pdata) {
-+ /* Platform data is required for osc freq */
-+ goto error_out;
-+ }
++ struct net_device *net;
++ struct mcp251x_priv *priv;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct can_bittime bit_time;
++ int ret = -ENODEV;
+
-+ /* Allocate can/net device */
-+ net = alloc_mcp251x_netdev(sizeof(struct mcp251x_priv));
-+ if (!net) {
-+ ret = -ENOMEM;
-+ goto error_alloc;
-+ }
++ if (!pdata) {
++ /* Platform data is required for osc freq */
++ goto error_out;
++ }
+
-+ priv = netdev_priv(net);
-+ dev_set_drvdata(&spi->dev, priv);
++ /* Allocate can/net device */
++ net = alloc_mcp251x_netdev(sizeof(struct mcp251x_priv));
++ if (!net) {
++ ret = -ENOMEM;
++ goto error_alloc;
++ }
+
-+ priv->spi = spi;
-+ init_MUTEX(&priv->spi_lock);
++ priv = netdev_priv(net);
++ dev_set_drvdata(&spi->dev, priv);
+
-+ /* Not sure why / 4... mcp251x pre-divides by 2 */
-+ priv->can.can_sys_clock = pdata->oscillator_frequency / 4;
++ priv->spi = spi;
++ init_MUTEX(&priv->spi_lock);
+
-+ /* If requested, allocate DMA buffers */
-+ if (enable_dma) {
-+ spi->dev.coherent_dma_mask = DMA_32BIT_MASK;
++ /* Not sure why / 4... mcp251x pre-divides by 2 */
++ priv->can.can_sys_clock = pdata->oscillator_frequency / 2;
+
-+ /* Minimum coherent DMA allocation is PAGE_SIZE, so allocate
++ /* If requested, allocate DMA buffers */
++ if (enable_dma) {
++ spi->dev.coherent_dma_mask = DMA_32BIT_MASK;
++
++ /* Minimum coherent DMA allocation is PAGE_SIZE, so allocate
+ that much and share it between Tx and Rx DMA buffers. */
-+ priv->spi_tx_buf = dma_alloc_coherent(&spi->dev,
-+ PAGE_SIZE, &priv->spi_tx_dma, GFP_DMA);
++ priv->spi_tx_buf = dma_alloc_coherent(&spi->dev,
++ PAGE_SIZE, &priv->spi_tx_dma, GFP_DMA);
+
-+ if (priv->spi_tx_buf) {
-+ priv->spi_rx_buf = (uint8_t *)(priv->spi_tx_buf +
-+ (PAGE_SIZE / 2));
-+ priv->spi_rx_dma = (dma_addr_t)(priv->spi_tx_dma +
-+ (PAGE_SIZE / 2));
-+ } else {
-+ /* Fall back to non-DMA */
-+ enable_dma = 0;
-+ }
-+ }
++ if (priv->spi_tx_buf) {
++ priv->spi_rx_buf = (u8 *)(priv->spi_tx_buf +
++ (PAGE_SIZE / 2));
++ priv->spi_rx_dma = (dma_addr_t)(priv->spi_tx_dma +
++ (PAGE_SIZE / 2));
++ } else {
++ /* Fall back to non-DMA */
++ enable_dma = 0;
++ }
++ }
+
-+ /* Allocate non-DMA buffers */
-+ if (!enable_dma) {
-+ priv->spi_tx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
-+ if (!priv->spi_tx_buf) {
-+ ret = -ENOMEM;
-+ goto error_tx_buf;
-+ }
-+ priv->spi_rx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
-+ if (!priv->spi_tx_buf) {
-+ ret = -ENOMEM;
-+ goto error_rx_buf;
-+ }
-+ }
++ /* Allocate non-DMA buffers */
++ if (!enable_dma) {
++ priv->spi_tx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
++ if (!priv->spi_tx_buf) {
++ ret = -ENOMEM;
++ goto error_tx_buf;
++ }
++ priv->spi_rx_buf = kmalloc(SPI_TRANSFER_BUF_LEN, GFP_KERNEL);
++ if (!priv->spi_tx_buf) {
++ ret = -ENOMEM;
++ goto error_rx_buf;
++ }
++ }
+
-+ /* Call out to platform specific setup */
-+ if (pdata->board_specific_setup)
-+ pdata->board_specific_setup(spi);
++ /* Call out to platform specific setup */
++ if (pdata->board_specific_setup)
++ pdata->board_specific_setup(spi);
+
-+ /* Call out to platform specific hardware reset */
-+ if (pdata->device_reset)
-+ pdata->device_reset(spi);
++ /* Call out to platform specific hardware reset */
++ if (pdata->device_reset)
++ pdata->device_reset(spi);
+
-+ /* Register IRQ */
-+ if (spi->irq >= 0) {
-+ if (request_irq(spi->irq, mcp251x_can_isr, IRQF_TRIGGER_FALLING, DEVICE_NAME, net) < 0) {
-+ dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
-+ goto error_irq;
-+ }
-+ }
++ /* Register IRQ */
++ if (spi->irq >= 0) {
++ if (request_irq(spi->irq, mcp251x_can_isr, IRQF_TRIGGER_FALLING, DEVICE_NAME, net) < 0) {
++ dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
++ goto error_irq;
++ }
++ }
+
-+ SET_NETDEV_DEV(net, &spi->dev);
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,24)
-+ SET_MODULE_OWNER(THIS_MODULE);
-+#endif
++ SET_NETDEV_DEV(net, &spi->dev);
+
-+ INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
-+ INIT_WORK(&priv->irq_work, mcp251x_irq_work_handler);
++ priv->wq = create_singlethread_workqueue("mcp251x_wq");
+
-+ /* Configure the SPI bus */
-+ spi->mode = SPI_MODE_0;
-+ spi->bits_per_word = 8;
-+ spi_setup(spi);
++ INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
++ INIT_WORK(&priv->irq_work, mcp251x_irq_work_handler);
+
-+ mcp251x_hw_reset(spi);
++ init_completion(&priv->awake);
+
-+ /* Set initial baudrate */
-+ ret = can_calc_bit_time(&priv->can, priv->can.baudrate, &bit_time.std);
-+ if (ret != 0)
-+ dev_err(&spi->dev, "unable to calculate initial baudrate!\n");
-+ else {
-+ bit_time.type = CAN_BITTIME_STD;
-+ ret = priv->can.do_set_bit_time(net, &bit_time);
-+ if (ret)
-+ dev_err(&spi->dev, "unable to set initial baudrate!\n");
-+ }
++ /* Configure the SPI bus */
++ spi->mode = SPI_MODE_0;
++ spi->bits_per_word = 8;
++ spi_setup(spi);
+
-+ mcp251x_hw_sleep(spi);
++ mcp251x_hw_reset(spi);
+
-+ ret = register_netdev(net);
-+ if (ret >= 0) {
-+ dev_info(&spi->dev, "probed%s\n", (loopback) ? " (loopback)" : "");
-+ return ret;
-+ }
++ /* Set initial baudrate */
++ ret = can_calc_bit_time(&priv->can, priv->can.baudrate, &bit_time.std);
++ if (ret != 0)
++ dev_err(&spi->dev, "unable to calculate initial baudrate!\n");
++ else {
++ bit_time.type = CAN_BITTIME_STD;
++ ret = priv->can.do_set_bit_time(net, &bit_time);
++ if (ret)
++ dev_err(&spi->dev, "unable to set initial baudrate!\n");
++ }
+
-+ free_irq(spi->irq, net);
++ /* Enable RX0->RX1 buffer roll over */
++ mcp251x_write_bits(spi, RXBCTRL(0), RXBCTRL_BUKT, RXBCTRL_BUKT);
++
++ mcp251x_hw_sleep(spi);
++
++ ret = register_netdev(net);
++ if (ret >= 0) {
++ dev_info(&spi->dev, "probed%s\n",
++ (loopback) ? " (loopback)" : "");
++ return ret;
++ }
++
++ free_irq(spi->irq, net);
+error_irq:
-+ if (!enable_dma)
-+ kfree(priv->spi_rx_buf);
++ if (!enable_dma)
++ kfree(priv->spi_rx_buf);
+error_rx_buf:
-+ if (!enable_dma)
-+ kfree(priv->spi_tx_buf);
++ if (!enable_dma)
++ kfree(priv->spi_tx_buf);
+error_tx_buf:
-+ free_candev(net);
-+ if (enable_dma) {
-+ dma_free_coherent(&spi->dev, PAGE_SIZE,
-+ priv->spi_tx_buf, priv->spi_tx_dma);
-+ }
++ free_candev(net);
++ if (enable_dma) {
++ dma_free_coherent(&spi->dev, PAGE_SIZE,
++ priv->spi_tx_buf, priv->spi_tx_dma);
++ }
+error_alloc:
-+ dev_err(&spi->dev, "probe failed\n");
++ dev_err(&spi->dev, "probe failed\n");
+error_out:
-+ return ret;
++ return ret;
+}
+
+static int __devexit mcp251x_can_remove(struct spi_device *spi)
+{
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct net_device *net = priv->net;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct net_device *net = priv->net;
+
-+ work_clear_pending(&priv->tx_work);
++ free_irq(spi->irq, net);
+
-+ free_irq(spi->irq, net);
-+ work_clear_pending(&priv->irq_work);
++ flush_scheduled_work();
+
-+ flush_scheduled_work();
++ if (enable_dma) {
++ dma_free_coherent(&spi->dev, PAGE_SIZE,
++ priv->spi_tx_buf, priv->spi_tx_dma);
++ } else {
++ kfree(priv->spi_tx_buf);
++ kfree(priv->spi_rx_buf);
++ }
+
-+ if (enable_dma) {
-+ dma_free_coherent(&spi->dev, PAGE_SIZE,
-+ priv->spi_tx_buf, priv->spi_tx_dma);
-+ } else {
-+ kfree(priv->spi_tx_buf);
-+ kfree(priv->spi_rx_buf);
-+ }
++ unregister_netdev(net);
++ free_candev(net);
+
-+ unregister_netdev(net);
-+ free_candev(net);
-+
-+ return 0;
++ return 0;
+}
+
+#ifdef CONFIG_PM
+static int mcp251x_can_suspend(struct spi_device *spi, pm_message_t state)
+{
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct net_device *net = priv->net;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct net_device *net = priv->net;
+
-+ if (!netif_running(net))
-+ return 0;
++ if (!netif_running(net))
++ return 0;
+
-+ netif_device_detach(net);
++ netif_device_detach(net);
+
-+ mcp251x_hw_sleep(spi);
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(0);
++ mcp251x_hw_sleep(spi);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(0);
+
-+ return 0;
++ return 0;
+}
+
+static int mcp251x_can_resume(struct spi_device *spi)
+{
-+ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
-+ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
-+ struct net_device *net = priv->net;
++ struct mcp251x_platform_data *pdata = spi->dev.platform_data;
++ struct mcp251x_priv *priv = dev_get_drvdata(&spi->dev);
++ struct net_device *net = priv->net;
+
-+ if (!netif_running(net))
-+ return 0;
++ if (!netif_running(net))
++ return 0;
+
-+ if (pdata->transceiver_enable)
-+ pdata->transceiver_enable(1);
-+ mcp251x_hw_wakeup(spi);
++ if (pdata->transceiver_enable)
++ pdata->transceiver_enable(1);
++ mcp251x_hw_wakeup(spi);
+
-+ netif_device_attach(net);
++ netif_device_attach(net);
+
-+ return 0;
++ return 0;
+}
++#else
++#define mcp251x_can_suspend NULL
++#define mcp251x_can_resume NULL
+#endif
+
+static struct spi_driver mcp251x_can_driver = {
-+ .driver = {
-+ .name = DEVICE_NAME,
-+ .bus = &spi_bus_type,
-+ .owner = THIS_MODULE,
-+ },
++ .driver = {
++ .name = DEVICE_NAME,
++ .bus = &spi_bus_type,
++ .owner = THIS_MODULE,
++ },
+
-+ .probe = mcp251x_can_probe,
-+ .remove = __devexit_p(mcp251x_can_remove),
-+#ifdef CONFIG_PM
-+ .suspend = mcp251x_can_suspend,
-+ .resume = mcp251x_can_resume,
-+#endif
++ .probe = mcp251x_can_probe,
++ .remove = __devexit_p(mcp251x_can_remove),
++ .suspend = mcp251x_can_suspend,
++ .resume = mcp251x_can_resume,
+};
+
+static int __init mcp251x_can_init(void)
+{
-+ printk("mcp251x init\n");
-+ return spi_register_driver(&mcp251x_can_driver);
++ return spi_register_driver(&mcp251x_can_driver);
+}
+
+static void __exit mcp251x_can_exit(void)
+{
-+ spi_unregister_driver(&mcp251x_can_driver);
++ spi_unregister_driver(&mcp251x_can_driver);
+}
+
+module_init(mcp251x_can_init);
+module_exit(mcp251x_can_exit);
+
-+MODULE_AUTHOR("Chris Elston <celston@...>");
++MODULE_AUTHOR("Claudio Scordino <cl...@ev...");
+MODULE_DESCRIPTION("Microchip 251x CAN driver");
+MODULE_LICENSE("GPL v2");
-Index: linux-2.6.19.2/drivers/net/can/mcp251x.h
-===================================================================
+diff --git a/drivers/net/can/mcp251x.h b/drivers/net/can/mcp251x.h
+new file mode 100644
+index 0000000..acdf4ea
--- /dev/null
-+++ linux-2.6.19.2/drivers/net/can/mcp251x.h
++++ b/drivers/net/can/mcp251x.h
@@ -0,0 +1,11 @@
+#ifndef __MCP251X_H__
+#define __MCP251X_H__
+
+struct mcp251x_platform_data {
-+ unsigned long oscillator_frequency;
-+ int (*board_specific_setup)(struct spi_device *spi);
-+ int (*device_reset)(struct spi_device *spi);
-+ int (*transceiver_enable)(int enable);
++ unsigned long oscillator_frequency;
++ int (*board_specific_setup)(struct spi_device *spi);
++ int (*device_reset)(struct spi_device *spi);
++ int (*transceiver_enable)(int enable);
+};
+
+#endif /* __MCP251X_H__ */
+diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
+new file mode 100644
+index 0000000..9c4bee7
+--- /dev/null
++++ b/include/linux/can/dev.h
+@@ -0,0 +1,60 @@
++/*
++ * linux/can/dev.h
++ *
++ * Definitions for CAN controller network devices lib (work in progress)
++ *
++ * Author: Andrey Volkov <av...@va...>
++ * Copyright (c) 2006 Varma Electronics Oy
++ *
++ */
++
++#ifndef CAN_DEVICE_H
++#define CAN_DEVICE_H
++
++#include <linux/version.h>
++#include <linux/can/error.h>
++#include <linux/can/ioctl.h>
++
++struct can_priv {
++ struct can_device_stats can_stats;
++
++ /* can-bus oscillator frequency, in Hz,
++ BE CAREFUL! SOME CONTROLLERS (LIKE SJA1000)
++ FOOLISH ABOUT THIS FRQ (for sja1000 as ex. this
++ clock must be xtal clock divided by 2). */
++ u32 can_sys_clock;
++
++ /* by default max_brp is equal 64,
++ but for a Freescale TouCAN, as ex., it can be 255*/
++ u32 max_brp;
++ /* For the mostly all controllers, max_sjw is equal 4, but
++ some, hmm, CAN implementations hardwared it to 1 */
++ u8 max_sjw;
++
++ u32 baudrate; /* in bauds */
++ struct can_bittime bit_time;
++
++ spinlock_t irq_lock;
++ /* Please hold this lock when touching net_stats/can_stats*/
++ spinlock_t stats_lock;
++
++ can_state_t state;
++ can_mode_t mode;
++ can_ctrlmode_t ctrlmode;
++
++ int (*do_set_bit_time)(struct net_device *dev, struct can_bittime *br);
++ int (*do_get_state) (struct net_device *dev, can_state_t *state);
++ int (*do_set_mode) (struct net_device *dev, can_mode_t mode);
++ int (*do_set_ctrlmode)(struct net_device *dev, can_ctrlmode_t ctrlmode);
++ int (*do_get_ctrlmode)(struct net_device *dev, can_ctrlmode_t *ctrlmode);
++};
++
++#define ND2D(_ndev) (_ndev->dev.parent)
++
++struct net_device *alloc_candev(int sizeof_priv);
++void free_candev(struct net_device *dev);
++
++int can_calc_bit_time(struct can_priv *can, u32 baudrate,
++ struct can_bittime_std *bit_time);
++
++#endif /* CAN_DEVICE_H */
+diff --git a/include/linux/can/ioctl.h b/include/linux/can/ioctl.h
+new file mode 100644
+index 0000000..30f2dad
+--- /dev/null
++++ b/include/linux/can/ioctl.h
+@@ -0,0 +1,149 @@
++/*
++ * linux/can/ioctl.h
++ *
++ * Definitions for CAN controller setup (work in progress)
++ *
++ * Send feedback to <soc...@li...>
++ *
++ */
++
++#ifndef CAN_IOCTL_H
++#define CAN_IOCTL_H
++
++#include <linux/sockios.h>
++
++
++/* max. 16 private ioctls */
++
++#define SIOCSCANBAUDRATE (SIOCDEVPRIVATE+0)
++#define SIOCGCANBAUDRATE (SIOCDEVPRIVATE+1)
++
++#define SIOCSCANCUSTOMBITTIME (SIOCDEVPRIVATE+2)
++#define SIOCGCANCUSTOMBITTIME (SIOCDEVPRIVATE+3)
++
++#define SIOCSCANMODE (SIOCDEVPRIVATE+4)
++#define SIOCGCANMODE (SIOCDEVPRIVATE+5)
++
++#define SIOCSCANCTRLMODE (SIOCDEVPRIVATE+6)
++#define SIOCGCANCTRLMODE (SIOCDEVPRIVATE+7)
++
++#define SIOCSCANFILTER (SIOCDEVPRIVATE+8)
++#define SIOCGCANFILTER (SIOCDEVPRIVATE+9)
++
++#define SIOCGCANSTATE (SIOCDEVPRIVATE+10)
++#define SIOCGCANSTATS (SIOCDEVPRIVATE+11)
++
++#define SIOCSCANERRORCONFIG (SIOCDEVPRIVATE+12)
++#define SIOCGCANERRORCONFIG (SIOCDEVPRIVATE+13)
++
++/* parameters for ioctls */
++
++/* SIOC[SG]CANBAUDRATE */
++/* baudrate for CAN-controller in bits per second. */
++/* 0 = Scan for baudrate (Autobaud) */
++
++typedef __u32 can_baudrate_t;
++
++
++/* SIOC[SG]CANCUSTOMBITTIME */
++
++typedef enum CAN_BITTIME_TYPE {
++ CAN_BITTIME_STD,
++ CAN_BITTIME_BTR
++} can_bittime_type_t;
++
++/* TSEG1 of controllers usually is a sum of synch_seg (always 1),
++ * prop_seg and phase_seg1, TSEG2 = phase_seg2 */
++
++struct can_bittime_std {
++ __u32 brp; /* baud rate prescaler */
++ __u8 prop_seg; /* from 1 to 8 */
++ __u8 phase_seg1; /* from 1 to 8 */
++ __u8 phase_seg2; /* from 1 to 8 */
++ __u8 sjw:7; /* from 1 to 4 */
++ __u8 sam:1; /* 1 - enable triple sampling */
++};
++
++struct can_bittime_btr {
++ __u8 btr0;
++ __u8 btr1;
++};
++
++struct can_bittime {
++ can_bittime_type_t type;
++ union {
++ struct can_bittime_std std;
++ struct can_bittime_btr btr;
++ };
++};
++
++#define CAN_BAUDRATE_UNCONFIGURED ((__u32) 0xFFFFFFFFU)
++#define CAN_BAUDRATE_UNKNOWN 0
++
++/* SIOC[SG]CANMODE */
++
++typedef __u32 can_mode_t;
++
++#define CAN_MODE_STOP 0
++#define CAN_MODE_START 1
++#define CAN_MODE_SLEEP 2
++
++
++/* SIOC[SG]CANCTRLMODE */
++
++typedef __u32 can_ctrlmode_t;
++
++#define CAN_CTRLMODE_LOOPBACK 0x1
++#define CAN_CTRLMODE_LISTENONLY 0x2
++
++
++/* SIOCGCANFILTER */
++
++typedef __u32 can_filter_t;
++
++/* filter modes (may vary due to controller specific capabilities) */
++#define CAN_FILTER_CAPAB 0 /* get filter type capabilities (32 Bit value) */
++#define CAN_FILTER_MASK_VALUE 1 /* easy bit filter (see struct can_filter) */
++#define CAN_FILTER_SFF_BITMASK 2 /* bitfield with 2048 bit SFF filter */
++ /* filters 3 - 31 currently undefined */
++
++#define CAN_FILTER_MAX 31 /* max. filter type value */
++
++
++/* SIOCGCANSTATE */
++
++typedef __u32 can_state_t;
++
++#define CAN_STATE_ACTIVE 0
++#define CAN_STATE_BUS_WARNING 1
++#define CAN_STATE_BUS_PASSIVE 2
++#define CAN_STATE_BUS_OFF 3
++#define CAN_STATE_SCANNING_BAUDRATE 4
++#define CAN_STATE_STOPPED 5
++#define CAN_STATE_SLEEPING 6
++
++
++/* SIOCGCANSTATS */
++
++struct can_device_stats {
++ int error_warning;
++ int data_overrun;
++ int wakeup;
++ int bus_error;
++ int error_passive;
++ int arbitration_lost;
++ int restarts;
++ int bus_error_at_init;
++};
++
++/* SIOC[SG]CANERRORCONFIG */
++
++typedef enum CAN_ERRCFG_TYPE {
++ CAN_ERRCFG_MASK,
++ CAN_ERRCFG_BUSERR,
++ CAN_ERRCFG_BUSOFF
++} can_errcfg_type_t;
++
++/* tbd */
++
++#endif /* CAN_IOCTL_H */
+diff --git a/net/can/Makefile b/net/can/Makefile
+index 9cd3c4b..11e8903 100644
+--- a/net/can/Makefile
++++ b/net/can/Makefile
+@@ -10,3 +10,6 @@ can-raw-objs := raw.o
+
+ obj-$(CONFIG_CAN_BCM) += can-bcm.o
+ can-bcm-objs := bcm.o
++
++obj-$(CONFIG_CAN) += candev.o
++candev-objs := dev.o
+diff --git a/net/can/dev.c b/net/can/dev.c
+new file mode 100644
+index 0000000..493ba39
+--- /dev/null
++++ b/net/can/dev.c
+@@ -0,0 +1,275 @@
++/*
++ * Copyright (C) 2005 Marc Kleine-Budde, Pengutronix
++ * Copyright (C) 2006 Andrey Volkov, Varma Electronics
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the version 2 of the GNU General Public License
++ * as published by the Free Software Foundation
++ *
++ * 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 ...
[truncated message content] |
|
From: <ar...@us...> - 2008-12-06 12:32:11
|
Revision: 926
http://armadeus.svn.sourceforge.net/armadeus/?rev=926&view=rev
Author: artemys
Date: 2008-12-06 12:32:07 +0000 (Sat, 06 Dec 2008)
Log Message:
-----------
[BUILD] Move buildroot archive to SourceForge
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2008-12-05 18:36:10 UTC (rev 925)
+++ trunk/Makefile 2008-12-06 12:32:07 UTC (rev 926)
@@ -26,8 +26,8 @@
BUILDROOT_NAME=buildroot
BUILDROOT_FILE_PATH:=downloads
-BUILDROOT_SITE:=http://buildroot.uclibc.org/downloads/snapshots
-#http://downloads.sourceforge.net/armadeus
+#BUILDROOT_SITE:=http://buildroot.uclibc.org/downloads/snapshots
+BUILDROOT_SITE:=http://downloads.sourceforge.net/armadeus
BUILDROOT_VERSION:=20081103
BUILDROOT_SOURCE:=buildroot-$(BUILDROOT_VERSION).tar.bz2
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <th...@us...> - 2008-12-05 18:36:15
|
Revision: 925
http://armadeus.svn.sourceforge.net/armadeus/?rev=925&view=rev
Author: thom25
Date: 2008-12-05 18:36:10 +0000 (Fri, 05 Dec 2008)
Log Message:
-----------
[LINUX] make MAX1027 working again
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-04 16:37:03 UTC (rev 924)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch 2008-12-05 18:36:10 UTC (rev 925)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/apf9328.c
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,579 @@
+@@ -0,0 +1,610 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -47,6 +47,7 @@
+#include <mach/spi_imx.h>
+#include <mach/imx-regs.h> // imx_gpio_mode()
+#include <mach/imx-alsa.h>
++#include <linux/spi/max1027.h>
+
+#ifdef CONFIG_DM9000
+#include <linux/dm9000.h>
@@ -54,8 +55,8 @@
+
+#include "generic.h"
+
-+#ifdef CONFIG_SENSORS_MAX1027_MODULE
-+#define CONFIG_SENSORS_MAX1027 1
++#ifdef CONFIG_ARMADEUS_MAX1027_MODULE
++#define CONFIG_ARMADEUS_MAX1027 1
+#endif
+#ifdef CONFIG_SPI_IMX_MODULE
+#define CONFIG_SPI_IMX 1
@@ -278,18 +279,38 @@
+
+#endif //CONFIG_SPI_IMX
+
-+#ifdef CONFIG_SENSORS_MAX1027
++#ifdef CONFIG_ARMADEUS_MAX1027
+#define IMX_SPI1_SS_PIN 15
+#define IMX_SPI1_SS (1<<15)
-+static void max1027_init_cs(void)
-+{
-+ // SPI CSn is used as chip select but in GPIO mode
-+ OCR1(2) |= 3<<(IMX_SPI1_SS_PIN*2);
-+ DDIR(2) |= IMX_SPI1_SS;
++#define MAX1027_EOC_INT 13
++#define MAX1027_CNVST 14
++
++static int max1027_init(struct spi_device *spi)
++{
++ imx_gpio_mode( PC14_PF_SPI1_SCLK );
++ imx_gpio_mode( PC16_PF_SPI1_MISO );
++ imx_gpio_mode( PC17_PF_SPI1_MOSI );
++
++
++ /* configure CNVST */
++ DR(0) |= 1 << MAX1027_CNVST; // Initializes it High
++ imx_gpio_mode( GPIO_PORTA | MAX1027_CNVST | GPIO_OUT | GPIO_GIUS | GPIO_DR );
++
++ /* configure EOC */
++ imx_gpio_mode( GPIO_PORTA | MAX1027_EOC_INT | GPIO_IN | GPIO_GIUS );
++
++ /* SPI CSn is used as chip select but in GPIO mode */
+ DR(2) |= IMX_SPI1_SS;
-+ GIUS(2) |= IMX_SPI1_SS;
-+ GIUS(2) &= ~(1<<14 | 1<<16 | 1<< 17); // Set SPI primary functions
++ imx_gpio_mode( GPIO_PORTC | IMX_SPI1_SS_PIN | GPIO_OUT | GPIO_GIUS | GPIO_DR );
++
++ return 0;
+}
++
++static int max1027_exit(struct spi_device *spi)
++{
++ return 0;
++}
++
+static void max1027_cs(u32 command)
+{
+ if( command == SPI_CS_DEASSERT )
@@ -302,8 +323,19 @@
+ .cs_control = max1027_cs,
+};
+
-+#endif // CONFIG_SENSORS_MAX1027
++static struct max1027_config apf9328_max1027_config = {
++ .conv = MAX1027_CONV_DEFAULT,
++ .setup = MAX1027_SETUP_DEFAULT,
++ .avg = MAX1027_AVG_DEFAULT,
++ .cnvst_pin = (int)(MAX1027_CNVST|GPIO_PORTA),
++ .init = max1027_init,
++ .exit = max1027_exit
++};
+
++
++
++#endif // CONFIG_ARMADEUS_MAX1027
++
+#ifdef CONFIG_SPI_TSC2102
+#define TSC2102_CS_GPIOB 17
+#define TSC2102_INT_GPIOD 8
@@ -410,7 +442,7 @@
+
+
+static struct spi_board_info spi_board_info[] __initdata = {
-+#ifdef CONFIG_SENSORS_MAX1027
++#ifdef CONFIG_ARMADEUS_MAX1027
+{
+ .modalias = "max1027",
+ .controller_data = &max1027_hw,
@@ -418,6 +450,8 @@
+ .bus_num = 1, // SPI1
+ .chip_select = 0,
+ .mode = 0,
++ .irq = IRQ_GPIOA(MAX1027_EOC_INT),
++ .platform_data = &apf9328_max1027_config,
+},
+#endif // CONFIG_SENSORS_MAX1027
+#ifdef CONFIG_SPI_TSC2102
@@ -510,9 +544,6 @@
+ imx_fb_set_gpios(); /* init PORTD ....*/
+#endif
+
-+#ifdef CONFIG_SENSORS_MAX1027
-+ max1027_init_cs();
-+#endif
+#ifdef CONFIG_SPI_TSC2102
+ tsc2102_init_gpio();
+#endif
@@ -522,7 +553,7 @@
+
+ platform_add_devices(devices, ARRAY_SIZE(devices));
+
-+#if defined (CONFIG_SENSORS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
++#if defined (CONFIG_ARMADEUS_MAX1027) || defined (CONFIG_SPI_TSC2102) || defined (CONFIG_CAN_MCP251X)
+ spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
+#endif
+
@@ -583,9 +614,6 @@
+ .timer = &imx_timer,
+ .init_machine = apf9328_init,
+MACHINE_END
-PATCH AUTOMATICALLY GENERATED
-DON'T EDIT IT OR YOUR MODIFICATIONS WILL BE LOST
-(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.27.2.original/arch/arm/mach-imx/apf9328_lcd_config.h
+++ linux-2.6.27.2.mod/arch/arm/mach-imx/apf9328_lcd_config.h
@@ -0,0 +1,200 @@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2008-12-04 16:37:09
|
Revision: 924
http://armadeus.svn.sourceforge.net/armadeus/?rev=924&view=rev
Author: FabM
Date: 2008-12-04 16:37:03 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[LINUX][SOFTWARE] fpgaregs update
Modified Paths:
--------------
trunk/target/linux/debug/fpgaregs/Makefile
trunk/target/linux/debug/fpgaregs/fpgaregs.c
Modified: trunk/target/linux/debug/fpgaregs/Makefile
===================================================================
--- trunk/target/linux/debug/fpgaregs/Makefile 2008-12-04 15:58:13 UTC (rev 923)
+++ trunk/target/linux/debug/fpgaregs/Makefile 2008-12-04 16:37:03 UTC (rev 924)
@@ -1,9 +1,12 @@
-CC=../../../../buildroot/build_arm/staging_dir/bin/arm-linux-gcc
+ifeq ($(CC),cc)
+ CC=arm-linux-gcc
+endif
+
all: fpgaregs
fpgaregs: fpgaregs.c
- $(CC) -Wall fpgaregs.c -o $@
+ $(CC) -mcpu=arm920t -Wall fpgaregs.c -o $@
clean:
rm -f *.o
Modified: trunk/target/linux/debug/fpgaregs/fpgaregs.c
===================================================================
--- trunk/target/linux/debug/fpgaregs/fpgaregs.c 2008-12-04 15:58:13 UTC (rev 923)
+++ trunk/target/linux/debug/fpgaregs/fpgaregs.c 2008-12-04 16:37:03 UTC (rev 924)
@@ -1,147 +1,120 @@
-/*
- * fpgaregs.h - Tool to display and modify fpga registers from Linux's userspace
+/************************************************************************
+ * a program to write/read 16/32bits values on fpga address map using mmap()
+ * 11 october 2008
+ * fpgaregs_mmap.c
*
- * Author/Maintainer: --- armadeus -----
- * Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-L�ungen Online GmbH
- *
- * This tool is placed under the GPL.
+ * (c) Copyright 2008 Armadeus project
+ * Fabien Marteau <fab...@ar...>
+ * Modified by Sebastien Van Cauwenberghe <sv...@gm...>
*
-*/
+ * A simple driver for reading and writing on
+ * fpga through the character file /dev/mem
+ *
+ * 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 <stdio.h>
-#include <unistd.h>
#include <stdlib.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <sys/types.h>
+
+/* file management */
#include <sys/stat.h>
#include <fcntl.h>
-#include <ctype.h>
+/* as name said */
+#include <signal.h>
-//#define DEBUG TRUE
+/* sleep, write(), read() */
+#include <unistd.h>
-// fd for /dev/mem
-static int fd = -1;
-typedef unsigned short u16;
-typedef unsigned int u32;
+/* converting string */
+#include <string.h>
-#define FPGA_BASE_ADDR 0x12000000
-// Size of mmapping:
-#define MAP_SIZE 4096
-#define MAP_MASK ( MAP_SIZE - 1 )
+/* memory management */
+#include <sys/mman.h>
+#define FPGA_ADDRESS 0x12000000
-// Get value of the register at the given address
-static u16 getmem(u32 addr)
-{
- void *map, *regaddr;
- u32 val;
-#ifdef DEBUG
- printf("getmem(0x%04x)\n", addr);
-#endif // DEBUG
- if (fd == -1)
- {
- fd = open("/dev/mem", O_RDWR | O_SYNC);
- if (fd<0)
- {
- perror("open(\"/dev/mem\")");
- exit(1);
- }
- }
+#define WORD_ACCESS (2)
+#define LONG_ACCESS (4)
- map = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, addr & ~MAP_MASK );
- if (map == (void*)-1 )
- {
- perror("mmap()");
- exit(1);
- }
- regaddr = map + (addr & MAP_MASK);
-
- val = *(u32*) regaddr;
- munmap(0,MAP_SIZE);
- printf("read 0x%04x at 0x%08x\n", val, addr);
-
- return val;
+void displayResult(char* text, unsigned int accesstype, unsigned int value, unsigned int address)
+{
+ if( accesstype == WORD_ACCESS )
+ printf("%s %04x at %08x\n",text, (unsigned short)value,address);
+ else
+ printf("%s %08x at %08x\n",text, value,address);
}
-// Modify register value at given address
-static void putmem(u32 addr, u32 val)
+
+int main(int argc, char *argv[])
{
- void *map=0;
- void *regaddr=0;
- static int fd = -1;
+ unsigned short address;
+ unsigned int value;
+ int ffpga, accesstype = LONG_ACCESS;
+ void* ptr_fpga;
- //printf("putmem(0x%08x, 0x%08x)\n", addr, val);
+ if ((argc < 3) || (argc > 4)){
+ printf("invalid arguments number\nfpgaregs [w,l] fpga_reg_add [value].\n\tw: word access, l: long access\n\
+\tEx: fpgaregs w 0x10 0x1234, fpgaregs l 0x10 0x12345678\n");
+ return -1;
+ }
- if (fd == -1)
- {
- fd = open("/dev/mem", O_RDWR | O_SYNC);
- if (fd<0)
- {
- perror("open(\"/dev/mem\")");
- exit(1);
- }
- }
+ ffpga=open("/dev/mem",O_RDWR|O_SYNC);
+ if(ffpga<0){
+ printf("can't open file /dev/mem\n");
+ return -1;
+ }
- map = mmap(0, MAP_SIZE, PROT_READ | PROT_WRITE, MAP_SHARED, fd, addr & ~MAP_MASK );
- if (map == (void*)-1 )
- {
- perror("mmap()");
- exit(1);
- }
- regaddr = map + (addr & MAP_MASK);
- // printf("Mapped addr: 0x%04x\n", regaddr);
+ ptr_fpga = mmap (0, 8192, PROT_READ|PROT_WRITE, MAP_SHARED, ffpga, FPGA_ADDRESS);
+ if (ptr_fpga == MAP_FAILED)
+ {
+ printf ("mmap failed\n");
+ return -1;
+ }
- *(u32*) regaddr = val;
- munmap(0,MAP_SIZE);
-}
+ address = (unsigned int)strtol(argv[2], (char **)NULL, 16);
-u16 toInt(char * string)
-{
- char temp;
- u16 result = 0;
+ if(argc<3){
+ printf("invalid command line");
+ }
+ else {
+ if( *(argv[1]) == 'w' )
+ accesstype = WORD_ACCESS;
+
+ /* write value at address */
+ if(argc == 4){
+ value = strtoul(argv[3], (char **)NULL, 16);
+ if (accesstype == WORD_ACCESS)
+ *(unsigned short*)(ptr_fpga+(address)) = (unsigned short)value;
+ else
+ *(unsigned int*)(ptr_fpga+(address)) = (unsigned int)value;
- while( *string )
- {
- temp = *string;
- if( (temp>='0') && (temp<='9') )
- temp = temp - '0';
- else if( (temp>='a') && (temp<='f') )
- temp = temp -'a' + 10;
-
- result = (result<<4) + temp;
- string++;
- }
- return result;
-}
-
-
-/////////////////////////////////////////////////////////////////////////////////////
-// MAIN
-//
-int main(int argc, char *argv[])
-{
- // Dump the content of the provided register
- if (argc == 2)
- {
- getmem(toInt(argv[1])+FPGA_BASE_ADDR);
- return 0;
- }
-
- // Put value to given register
- if (argc == 3)
- {
- putmem( toInt(argv[1])+FPGA_BASE_ADDR, toInt(argv[2]) );
- return 0;
+ displayResult("Write", accesstype, value, address);
+
+ /* read address value */
+ }else if(argc == 3){
+ if (accesstype == WORD_ACCESS)
+ value = *(unsigned short*)(ptr_fpga+(address));
+ else
+ value = *(unsigned int*)(ptr_fpga+(address));
+
+ displayResult("Read", accesstype, value, address);
}
-
- // In all other cases, print Usage
- printf("Usage: fpgareg addr [value]\n"
- "addr: address in fpga (max 2ffe)\n"
- "value: value to write (16bit max ffff). Option \n");
-
- return 1;
+ }
+ close(ffpga);
+ return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-04 15:58:16
|
Revision: 923
http://armadeus.svn.sourceforge.net/armadeus/?rev=923&view=rev
Author: jorasse
Date: 2008-12-04 15:58:13 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[uboot] Remove unexpected user configuration from the configuration file apf9328.h
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328.h 2008-12-04 15:07:33 UTC (rev 922)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328.h 2008-12-04 15:58:13 UTC (rev 923)
@@ -999,12 +999,3 @@
|(((((CFG_CS5_OE_ASSERT_DLY*2)+CFG_HCLK_LGTH-1)/CFG_HCLK_LGTH)&0x0F)<<28))
#endif /* __CONFIG_H */
-
-/* Add a wrapper around the values Buildroot sets. */
-#ifndef __BR2_ADDED_CONFIG_H
-#define __BR2_ADDED_CONFIG_H
-#ifdef CONFIG_HOSTNAME
-#undef CONFIG_HOSTNAME
-#endif
-#define CONFIG_HOSTNAME "apf9328"
-#endif /* __BR2_ADDED_CONFIG_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-04 15:07:40
|
Revision: 922
http://armadeus.svn.sourceforge.net/armadeus/?rev=922&view=rev
Author: artemys
Date: 2008-12-04 15:07:33 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[TEST] Add script to test TV output
Added Paths:
-----------
trunk/target/test/test_tv.sh
Added: trunk/target/test/test_tv.sh
===================================================================
--- trunk/target/test/test_tv.sh (rev 0)
+++ trunk/target/test/test_tv.sh 2008-12-04 15:07:33 UTC (rev 922)
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+#
+# Script to test Armadeus Software release
+#
+# Copyright (C) 2008 The Armadeus Project
+#
+# 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.
+#
+
+source ./test_helpers.sh
+source ./test_env.sh
+
+
+test_TV()
+{
+ show_test_banner "TV ouput"
+
+ imxregs LPCR 0XF8C80085
+ imxregs HCR 0x28000500
+ imxregs VCR 0x0c001617
+ imxregs CSCR 0x03010003
+ imxregs SPCTL0 0x04011402
+ imxregs SPCTL1 0x00000040
+
+ ch7024 /usr/bin/ch500x320.conf
+ if [ "$?" == 0 ]; then
+ ask_user "Do you see something on your TV ? (y/n)"
+ if [ "$response" == "y" ]; then
+ echo_test_ok
+ fi
+ fi
+}
+
+test_TV
Property changes on: trunk/target/test/test_tv.sh
___________________________________________________________________
Added: svn:executable
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-04 14:46:00
|
Revision: 921
http://armadeus.svn.sourceforge.net/armadeus/?rev=921&view=rev
Author: artemys
Date: 2008-12-04 14:45:56 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[MERGE] remove from svn ipkg package (now integrated in buildroot)
Removed Paths:
-------------
trunk/buildroot/package/ipkg/
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2008-12-04 13:50:34
|
Revision: 920
http://armadeus.svn.sourceforge.net/armadeus/?rev=920&view=rev
Author: jorasse
Date: 2008-12-04 13:50:30 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[u-boot] fixed some typo issues
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
Modified: trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328.h 2008-12-04 12:58:37 UTC (rev 919)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328.h 2008-12-04 13:50:30 UTC (rev 920)
@@ -181,7 +181,7 @@
"fi\0" \
"flash_reset_env=protect off ${env_addr} +${env_len};" \
"era ${env_addr} +${env_len};" \
- "echo Erasinf flash environment variables done!\0" \
+ "echo Erasing of flash environment variables done!\0" \
"download_uboot=tftpboot ${loadaddr} " \
" ${serverpath}${board_name}-u-boot.bin\0" \
"download_kernel=tftpboot ${loadaddr} " \
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
Revision: 919
http://armadeus.svn.sourceforge.net/armadeus/?rev=919&view=rev
Author: artemys
Date: 2008-12-04 12:58:37 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[MERGE] Add missing patch for max1027
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-063-armadeus-max1027-add_max1027_include.patch
Added: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-063-armadeus-max1027-add_max1027_include.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-063-armadeus-max1027-add_max1027_include.patch (rev 0)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-063-armadeus-max1027-add_max1027_include.patch 2008-12-04 12:58:37 UTC (rev 919)
@@ -0,0 +1,67 @@
+--- linux-2.6.27.2.ref/include/linux/spi/max1027.h 2008-11-18 06:04:39.000000000 +0100
++++ linux-2.6.27.2/include/linux/spi/max1027.h 2008-11-18 06:04:39.000000000 +0100
+@@ -0,0 +1,64 @@
++/*
++ * include/linux/spi/max1027.h
++ *
++ * 8x10bits ADC
++ *
++ * Copyright (c) 2008 Armadeus Systems
++ *
++ * This package 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.
++ *
++ * This package 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 package; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
++ */
++
++#ifndef __LINUX_SPI_MAX1027_H
++#define __LINUX_SPI_MAX1027_H
++
++#define SCAN_MODE_00 0
++#define SCAN_MODE_01 1
++#define SCAN_MODE_10 2
++#define SCAN_MODE_11 3
++
++#define MAX1027_CONV_CHSEL(x) ((x&0x0f)<<3)
++#define MAX1027_CONV_SCAN(x) ((x&0x03)<<1)
++#define GET_SCAN_MODE(conv) ( (conv & 0x06) >> 1 )
++#define MAX1027_CONV_TEMP 0x01
++
++#define MAX1027_SETUP_CLKSEL(x) ((x&0x03)<<4)
++#define MAX1027_SETUP_REFSEL(x) ((x&0x03)<<2)
++#define MAX1027_SETUP_DIFFSEL(x) (x&0x03)
++
++#define MAX1027_AVG_AVGON(x) ((x&0x01)<<4)
++#define MAX1027_AVG_NAVG(x) ((x&0x03)<<2)
++#define MAX1027_AVG_NSCAN(x) (x&0x03)
++
++/* All channels and temperature are scanned per conversion */
++#define MAX1027_CONV_DEFAULT (MAX1027_CONV_CHSEL(6) | \
++ MAX1027_CONV_SCAN(0) | MAX1027_CONV_TEMP)
++/* Internal clock and reference stays on */
++#define MAX1027_SETUP_DEFAULT (MAX1027_SETUP_CLKSEL(0) | \
++ MAX1027_SETUP_REFSEL(2))
++/* Averaging Off */
++#define MAX1027_AVG_DEFAULT ( MAX1027_AVG_AVGON(0) )
++
++struct spi_device;
++struct max1027_config {
++ u8 conv; /* initial conversion register value*/
++ u8 setup; /* initial setup register value */
++ u8 avg; /* initial average register value */
++ int cnvst_pin; /*gpio to start conversion. -1 for software start */
++ int (*init)(struct spi_device *spi);
++ int (*exit)(struct spi_device *spi);
++};
++
++
++#endif /* __LINUX_SPI_MAX1027_H */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-04 10:50:11
|
Revision: 918
http://armadeus.svn.sourceforge.net/armadeus/?rev=918&view=rev
Author: artemys
Date: 2008-12-04 10:50:06 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[MERGE] and now the most important: the main Makefile ;-)
Modified Paths:
--------------
trunk/Makefile
Modified: trunk/Makefile
===================================================================
--- trunk/Makefile 2008-12-04 10:38:59 UTC (rev 917)
+++ trunk/Makefile 2008-12-04 10:50:06 UTC (rev 918)
@@ -26,40 +26,48 @@
BUILDROOT_NAME=buildroot
BUILDROOT_FILE_PATH:=downloads
-BUILDROOT_SITE:=http://downloads.sourceforge.net/armadeus
-BUILDROOT_VERSION:=20071027
+BUILDROOT_SITE:=http://buildroot.uclibc.org/downloads/snapshots
+#http://downloads.sourceforge.net/armadeus
+BUILDROOT_VERSION:=20081103
BUILDROOT_SOURCE:=buildroot-$(BUILDROOT_VERSION).tar.bz2
+-include $(BUILDROOT_DIR)/.config
+
ARMADEUS_TOPDIR:=$(shell pwd)
export ARMADEUS_TOPDIR
PATCH_DIR=patches
-PATCH_CYGWIN_DIR=$(PATCH_DIR)/cygwin
TAR_OPTIONS=--exclude=.svn -xf
-#used only by cygwin to restore the rights on some rootfs directories
-BUILDROOT_ROOT_DIR=$(BUILDROOT_DIR)/project_build_arm/root
+LINUX_DIR=$(BUILDROOT_DIR)/project_build_$(BR2_GCC_TARGET_ARCH)/$(BR2_BOARD_NAME)/linux-$(BR2_LINUX26_VERSION)
-LINUX-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BUILDROOT_DIR)/.config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-LINUX_DIR=$(BUILDROOT_DIR)/build_arm/linux-$(LINUX-REL)
+ECHO_CONFIGURATION_NOT_DEFINED:= echo -en "\033[1m"; \
+ echo " "; \
+ echo " System not configured. Use make <board>_defconfig " >&2; \
+ echo " armadeus valid configurations are: " >&2; \
+ echo " "$(shell find ./$(BUILDROOT_DIR)/target/device/armadeus -name *_defconfig|sed 's/.*\///');\
+ echo " "; \
+ echo -en "\033[0m";
+default: all
-all: buildroot
-
help:
+ @echo 'First, choose the platform:'
+ @echo ' apf9328_defconfig - must be launch before using apf9328 card'
+ @echo ' apf27_defconfig - must be launch before using apf27 card'
+ @echo ''
@echo 'Cleaning:'
- @echo ' buildroot-clean - delete all non-source files in buildroot'
- @echo ' clean - delete temporary files created by build'
- @echo ' distclean - delete all non-source files (including .config)'
+ @echo ' buildroot-clean - delete all non-source files in buildroot'
+ @echo ' clean - delete temporary files created by build'
+ @echo ' distclean - delete all non-source files (including .config)'
@echo
@echo 'Build:'
- @echo ' all - make world'
- @echo ' <Package> - a single package (ex: u-boot linux or buildroot'
+ @echo ' all - make world '
+ @echo ' <Package> - a single package (ex: u-boot linux or buildroot'
@echo
@echo 'Configuration:'
- @echo ' menuconfig - interactive curses-based configurator'
- @echo ' oldconfig - resolve any unresolved symbols in .config'
+ @echo ' menuconfig - interactive curses-based configurator'
+ @echo ' oldconfig - resolve any unresolved symbols in .config'
@echo
@echo 'Miscellaneous:'
@echo ' source - download all sources needed for offline-build'
@@ -78,30 +86,17 @@
mkdir -p $(BUILDROOT_FILE_PATH)
wget --passive-ftp -P $(BUILDROOT_FILE_PATH) $(BUILDROOT_SITE)/$(BUILDROOT_SOURCE)
-
$(BUILDROOT_DIR)/.unpacked: $(BUILDROOT_FILE_PATH)/$(BUILDROOT_SOURCE) $(PATCH_DIR)/*.diff
bzcat $(BUILDROOT_FILE_PATH)/$(BUILDROOT_SOURCE) | \
tar --exclude=.svn -C $(BUILDROOT_DIR)/.. $(TAR_OPTIONS) -
$(BUILDROOT_DIR)/toolchain/patch-kernel.sh $(BUILDROOT_DIR) $(PATCH_DIR) \*.diff
- @if uname | grep -i cygwin >/dev/null 2>&1 ; then \
- ./host/patches/cygwin/run ; \
- svn revert . ; \
- $(BUILDROOT_DIR)/toolchain/patch-kernel.sh $(BUILDROOT_DIR) $(PATCH_CYGWIN_DIR) *.diff ; \
- sed -e 's/pc-linux-gnu/pc-cygwin/g' $(BUILDROOT_DIR)/.defconfig > $(BUILDROOT_DIR)/.defconfig_cygwin ; \
- mv -f $(BUILDROOT_DIR)/.defconfig_cygwin $(BUILDROOT_DIR)/.defconfig ; \
- fi;
- touch $(BUILDROOT_DIR)/.unpacked
+ touch $@
-buildroot: $(BUILDROOT_DIR)/.unpacked
- @if uname | grep -i cygwin >/dev/null 2>&1 ; then \
- if [ -e "$(BUILDROOT_ROOT_DIR)/etc" ] ; then \
- chmod 777 $(BUILDROOT_DIR)/build_arm_nofpu/root/etc ; \
- fi; \
- if [ -e "$(BUILDROOT_ROOT_DIR)/etc" ] ; then \
- chmod 777 $(BUILDROOT_DIR)/build_arm_nofpu/root/dev ; \
- fi; \
- fi;
- @$(MAKE) -C $(BUILDROOT_DIR)
+$(BUILDROOT_DIR)/.configured: $(BUILDROOT_DIR)/.unpacked
+ @if [ ! -f $@ ]; then \
+ $(ECHO_CONFIGURATION_NOT_DEFINED) \
+ exit 1; \
+ fi
# To be called only one time if one wants to make an automatic build
buildauto: $(BUILDROOT_DIR)/.unpacked
@@ -111,22 +106,49 @@
echo "ey" | $(MAKE) -C $(BUILDROOT_DIR) menuconfig
$(MAKE) -C $(BUILDROOT_DIR)
-menuconfig: $(BUILDROOT_DIR)/.unpacked
- @$(MAKE) -C $(BUILDROOT_DIR) menuconfig
-
-
linux-menuconfig:
- @if [ ! -e "target/linux/modules/fpga/POD/.pod" ] ; then\
- target/linux/modules/fpga/podscript.sh ; \
+ @if [ ! -e "target/linux/modules/fpga/POD/.pod" ] ; then \
+ if [ -x target/linux/modules/fpga/podscript.sh ]; then \
+ target/linux/modules/fpga/podscript.sh ; \
+ fi \
fi;
-
@if [ -e "$(LINUX_DIR)/.unpacked" ] ; then \
- $(MAKE) -C $(LINUX_DIR) menuconfig ; \
+ $(MAKE) -C $(BUILDROOT_DIR) linux26-menuconfig ; \
fi;
-.DEFAULT: $(BUILDROOT_DIR)/.unpacked
+linux26: $(BUILDROOT_DIR)/.configured
+ @-touch $(LINUX_DIR)/.config
+ @$(MAKE) -C $(BUILDROOT_DIR) linux26
+
+linux26-clean: $(BUILDROOT_DIR)/.configured
+ @$(MAKE) -C $(BUILDROOT_DIR) linux26clean
+
+%_defconfig: $(BUILDROOT_DIR)/.unpacked
+ @if [ -e "./$(BUILDROOT_DIR)/target/device/armadeus/$(patsubst %_defconfig,%,$@)/$@" ]; then \
+ rm -f $(BUILDROOT_DIR)/.config ; \
+ $(MAKE) -C $(BUILDROOT_DIR) $@ ; \
+ $(MAKE) -C $(BUILDROOT_DIR) menuconfig ; \
+ touch $(BUILDROOT_DIR)/.configured ; \
+ else \
+ echo -e "\033[1m\nThis configuration does not exist !!\n\033[0m" ; \
+ fi;
+
+all: $(BUILDROOT_DIR)/.configured
+ @echo "If your /bin/sh link doesn't point to /bin/bash, please correct that."
+ @ls -al /bin/sh | grep bash
@$(MAKE) -C $(BUILDROOT_DIR) $@
+menuconfig: $(BUILDROOT_DIR)/.configured
+ @$(MAKE) -C $(BUILDROOT_DIR) $@
+
+# !! .DEFAULT do NOT handle dependancies !!
+.DEFAULT:
+ @if [ ! -e "$(BUILDROOT_DIR)/.configured" ]; then \
+ $(ECHO_CONFIGURATION_NOT_DEFINED) \
+ exit 1; \
+ fi
+ @$(MAKE) -C $(BUILDROOT_DIR) $@
+
buildroot-clean:
rm -rf $(BUILDROOT_DIR)/build*
rm -rf $(BUILDROOT_DIR)/binaries
@@ -136,6 +158,5 @@
buildroot-dirclean:
rm -rf $(BUILDROOT_DIR)
-.PHONY: dummy buildroot buildroot-clean
+.PHONY: dummy all linux-menuconfig linux26 linux26-clean buildroot-clean buildroot-dirclean menuconfig $(BUILDROOT_DIR)/.config
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-04 10:39:05
|
Revision: 917
http://armadeus.svn.sourceforge.net/armadeus/?rev=917&view=rev
Author: artemys
Date: 2008-12-04 10:38:59 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[MERGE] Effective merge for new linux, u-boot & buildroot
Modified Paths:
--------------
trunk/buildroot/package/allegro/Config.in
trunk/buildroot/package/ch7024ctrl/Config.in
trunk/buildroot/package/fpgaregs/Config.in
trunk/buildroot/package/imxregs/Config.in
trunk/buildroot/package/lcd4linux/Config.in
trunk/buildroot/package/lcd4linux/lcd4linux.mk
trunk/buildroot/package/max5821ctrl/Config.in
trunk/buildroot/package/pyserial/Config.in
trunk/buildroot/package/pyserial/pyserial.mk
trunk/buildroot/package/slideshow/Config.in
trunk/buildroot/package/slideshow/slideshow-01-add-arm-cross-compile.patch
trunk/buildroot/package/slideshow/slideshow.mk
trunk/buildroot/target/device/armadeus/Config.in
trunk/buildroot/target/device/armadeus/Makefile.in
trunk/buildroot/target/device/armadeus/apf9328/Config.in
trunk/buildroot/target/device/armadeus/apf9328/Makefile.in
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config
trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
trunk/buildroot/target/device/armadeus/apf9328/uClibc.config.arm
trunk/buildroot/target/device/armadeus/busybox.config
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/create_patches.sh
trunk/buildroot/target/device/armadeus/linux/linux.mk
trunk/buildroot/target/device/armadeus/rootfs/device_table.txt
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/TZ
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/fstab
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/group
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S00machine_name
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S20urandom
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/inittab
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/mdev.conf
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/passwd
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/profile
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/root/.bashrc
trunk/buildroot/target/device/armadeus/u-boot/u-boot.mk
trunk/buildroot/target/u-boot/u-boot-1.3.4-100-imx.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-110-apf9328.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-111-apf9328-DM9000.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-112-apf9328-makefile.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-120-apf9328-tools.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-130-apf9328-example.patch
trunk/patches/001-buildroot.diff
trunk/patches/002-buildroot-linuxdep.diff
trunk/patches/004-Buildroot-defconfig.diff
trunk/patches/005-buildroot-imxregs.diff
trunk/patches/006-buildroot-lcd4linux.diff
trunk/patches/008-buildroot-fpgaregs.diff
trunk/patches/011-buildroot-sdl-image-ttf-config.diff
trunk/patches/015-buildroot-sdl-mixer-net-config.diff
trunk/patches/016-buildroot-prboom.diff
trunk/patches/017-buildroot-lmbench.diff
trunk/patches/019-buildroot-lua.diff
trunk/patches/020-buildroot-ipkg.diff
trunk/patches/021-buildroot-sdl-water-config.diff
trunk/patches/030-buildroot-gcc.diff
trunk/patches/032-buildroot-vorbis-tremor-build-fix-for-buildroot-before-30102007.diff
trunk/patches/034-buildroot-slideshow.diff
trunk/patches/036-buildroot-qtopia-build-demos-and-examples.diff
trunk/patches/038-buildroot-fakeroot.diff
trunk/patches/039-buildroot-kernelconfig.diff
trunk/patches/040-buildroot-linux-makefile.diff
trunk/patches/043-buildroot-change-setserial-mirror.diff
trunk/patches/044-buildroot-change-file-package-mirror.diff
trunk/patches/045-buildroot-mpfr.2.3.2.diff
trunk/patches/046-buildroot-alsa-lib-no_version.diff
trunk/patches/046-buildroot-prboom-install_it_only_once.diff
trunk/patches/047-buildroot-uclibc-config.diff
trunk/patches/050-buildroot-linux-stops_building_when_modules_compilation_fails.diff
trunk/patches/051-buildroot-u-boot.diff
trunk/patches/052-buildroot-linux-adds_linux26-patched_target_to_Makefile.diff
trunk/patches/054-buildroot-ntp-allow_ntpd_selection_or_not.diff
trunk/patches/055-buildroot-pyserial.diff
trunk/patches/056-buildroot-makedevs.diff
trunk/software/uboot_recover/apf9328_recover.py
trunk/target/linux/Makefile
trunk/target/linux/debug/imxregs/Makefile
trunk/target/linux/debug/imxregs/imxregs.c
trunk/target/linux/debug/imxregs/imxregs.h
trunk/target/linux/drivers/video/imxfb.c
trunk/target/linux/modules/Kconfig
trunk/target/linux/modules/Makefile
trunk/target/linux/modules/backlight/imx_bl_2.6.23.c
trunk/target/linux/modules/fpga/POD/Kconfig
trunk/target/linux/modules/fpga/POD/Makefile
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.c
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.h
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.c
trunk/target/linux/modules/fpga/dev_tools/fpgaaccess/fpgaaccess.h
trunk/target/linux/modules/fpga/others/i2ctest/i2ctest.h
trunk/target/linux/modules/fpga/others/ps2keyboard/core.c
trunk/target/linux/modules/gpio/core.c
trunk/target/linux/modules/gpio/ppdevemu.c
trunk/target/linux/modules/imxlkeypad/imxkeypad.c
trunk/target/linux/modules/isp1761/Makefile
trunk/target/linux/modules/isp1761/apf9328-isp1761.c
trunk/target/linux/modules/isp1761/hal/hal_x86.c
trunk/target/linux/modules/isp1761/hal/hal_x86.h
trunk/target/linux/modules/isp1761/hal/isp1761.h
trunk/target/linux/modules/isp1761/host/itdptd.c
trunk/target/linux/modules/isp1761/host/mem.c
trunk/target/linux/modules/isp1761/host/otg.c
trunk/target/linux/modules/isp1761/host/pehci.c
trunk/target/linux/modules/isp1761/host/pehci.h
trunk/target/linux/modules/isp1761/host/qtdptd.c
trunk/target/linux/modules/max1027/Kconfig
trunk/target/linux/modules/max1027/Makefile
trunk/target/linux/modules/max1027/loadmax.sh
Added Paths:
-----------
trunk/buildroot/target/device/armadeus/apf27/Config.in
trunk/buildroot/target/device/armadeus/apf27/Makefile.in
trunk/buildroot/target/device/armadeus/apf27/apf27-linux-2.6.27.2.config
trunk/buildroot/target/device/armadeus/apf27/apf27_defconfig
trunk/buildroot/target/device/armadeus/apf27/uClibc.config.arm
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.18.1.config
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.23.1.config
trunk/buildroot/target/device/armadeus/apf9328/apf9328_defconfig
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/convert_patches_to_p1.sh
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-013-armadeus-imxfb-improvements.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-014-armadeus-imxregs-add-lcd-bpix-mask.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-015-armadeus-logo-add_armadeus-project_tux.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-018-armadeus-i2c-imx-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-018-armadeus-i2c-imx.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-021-armadeus-apf9328_defconfig.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-022-armadeus-apf9328-mtd-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-022-armadeus-apf9328-mtd.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-023-armadeus-fblcd-kconfig.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-024-armadeus-apf9328-add_board_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-armadeus-add_USB_registers.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-armadeus-imx-add_USB_ressources.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-armadeus-imx_udc-add_clock.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-armadeus-imx_udc-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-armadeus-imx_udc-change_source_sink_in_gadget_zero.to_fix
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-armadeus-imx_udc-deactivate_cdc_in_ether_c.to_fix
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-030-mike_lee-original_imx_udc.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-031-armadeus-updates_imx-udc_driver_for_new_kernels.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-032-armadeus-imx-udc-makes_it_use_clock_infrastructure.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-040-armadeus-imx_mmc.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-041-armadeus-imx_irq.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-050-armadeus-add_custom_drivers_to_kconfig.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-055-armadeus-rtc-ds1374.diff.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-062-armadeus-max1027.obsolete
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-072-armadeus-add_backlight_machinfo_to_imxfb_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-073-armadeus-tsc2102.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-073-armadeus-tsc2102_integrate_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-074-armadeus-tsc2102-touchscreen-add_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-074-armadeus-tsc2102-touchscreen.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-075-armadeus-spi2-reg-irq-defines.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-076-arm-vmlinux-ld_script_patch_for_new_binutils.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-077-arm-checksyscalls.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-078-armadeus-set_imx_fb_info-sectio-mismatch.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-081-can-proto-numbers.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-082-can-core.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-083-can-raw-proto.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-084-can-bcm-proto.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-085-can-vcan-driver.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-086-can-maintainers.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-087-can-doc.now_included
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-088-can-mcp2515.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-090-armadeus-alsa-create_imx-alsa_h.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-091-armadeus-alsa-add_imx_ssi_tsc2102_driver.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-092-armadeus-alsa-imx-ssi-tsc2102-integrate_driver_to_linux_build_system.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-093-armadeus-add_ssi_registers_definition.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-094-armadeus-rtc1374-legacy.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-100-armadeus-spi_imx-move_clock_request_to_prevent_crash_when_probing.patch
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/linux-2.6.27.2-199-armadeus-hack_kernel_to_export_some_irq_handling_functions.patch
trunk/buildroot/target/device/armadeus/u-boot/Config.in
trunk/buildroot/target/u-boot/u-boot-1.1.6-100-apx9328.patch
trunk/buildroot/target/u-boot/u-boot-1.1.6-101-apx9328.patch
trunk/buildroot/target/u-boot/u-boot-1.1.6-110-apx-tools.patch
trunk/buildroot/target/u-boot/u-boot-1.1.6-120-apx-example.patch
trunk/buildroot/target/u-boot/u-boot-1.1.6-140-apx-dm9000.patch
trunk/buildroot/target/u-boot/u-boot-1.1.6-150-imx.patch
trunk/buildroot/target/u-boot/u-boot-1.1.6-200-spartan.patch
trunk/patches/048-buildroot-linux-correctly_define_kernel_version_with_latest_minor_number.diff
trunk/patches/049-buildroot-linux-download_minor_patches_from_kernel_org_too.diff
trunk/patches/050-buildroot-linux-remove_unsupported_kernel_version.diff
trunk/patches/053-buildroot-libusb.diff
trunk/target/linux/debug/imxregs/README
trunk/target/linux/debug/imxregs/definitions.h
trunk/target/linux/debug/imxregs/imx27regs.h
trunk/target/linux/debug/imxregs/txt_copy_of_pdf_to_include.sh
trunk/target/linux/modules/max1027/max1027.c
trunk/target/test/test_backlight.sh
trunk/target/test/test_dac.sh
trunk/target/test/test_env.sh
trunk/target/test/test_ethernet.sh
trunk/target/test/test_helpers.sh
trunk/target/test/test_imxregs.sh
trunk/target/test/test_lzo.sh
trunk/target/test/test_portmap.sh
trunk/target/test/test_release.sh
trunk/target/test/test_rs232.sh
trunk/target/test/test_rtc.sh
trunk/target/test/test_skeleton.sh
trunk/target/test/test_touchscreen.sh
trunk/target/test/test_usb_device.sh
trunk/target/test/test_usb_host.sh
trunk/target/test/test_zlib.sh
Removed Paths:
-------------
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.12.config
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.17.config
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.18.1.config
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.23.1.config
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.24.3.config
trunk/buildroot/target/device/armadeus/apf9328/linux-2.6.24.config
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.18.1/cygwin/
trunk/buildroot/target/device/armadeus/u-boot/100-u-boot-1.3.4-imx.patch
trunk/buildroot/target/device/armadeus/u-boot/110-u-boot-1.3.4-apf9328.patch
trunk/buildroot/target/device/armadeus/u-boot/111-u-boot-1.3.4-apf9328-DM9000.patch
trunk/buildroot/target/device/armadeus/u-boot/112-u-boot-1.3.4-apf9328-makefile.patch
trunk/buildroot/target/device/armadeus/u-boot/120-u-boot-1.3.4-apf9328-tools.patch
trunk/buildroot/target/device/armadeus/u-boot/130-u-boot-1.3.4-apf9328-example.patch
trunk/target/linux/modules/max1027/main.c
Modified: trunk/buildroot/package/allegro/Config.in
===================================================================
--- trunk/buildroot/package/allegro/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/allegro/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -3,11 +3,13 @@
default n
help
- Allegro is a game programming library for C/C++ developers distributed freely and
- supporting the following platforms: DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin),
- Windows, QNX, BeOS and MacOS X.
- It provides many functions for graphics, sounds, player input (keyboard, mouse and joystick)
- and timers. It also provides fixed and floating point mathematical functions, 3d functions,
- file management functions, compressed datafile and a GUI.
+ Allegro is a game programming library for C/C++ developers
+ distributed freely and supporting the following platforms:
+ DOS, Unix (Linux, FreeBSD, Irix, Solaris, Darwin), Windows, QNX,
+ BeOS and MacOS X.
+ It provides many functions for graphics, sounds, player input
+ (keyboard, mouse and joystick) and timers. It also provides fixed and
+ floating point mathematical functions, 3d functions, file management
+ functions, compressed datafile and a GUI.
http://alleg.sourceforge.net/
Modified: trunk/buildroot/package/ch7024ctrl/Config.in
===================================================================
--- trunk/buildroot/package/ch7024ctrl/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/ch7024ctrl/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -1,8 +1,8 @@
config BR2_PACKAGE_CH7024CTRL
bool "ch7024ctrl"
- depends BR2_TARGET_ARMADEUS
+ depends on BR2_TARGET_ARMADEUS
default n
help
- Build CH7024 control tool. It allows you to configure the Svideo output of the DevFull directly
- from Linux userspace (command ch7024).
+ Build CH7024 control tool. It allows you to configure the Svideo
+ output of the DevFull directly from Linux userspace (command ch7024).
Modified: trunk/buildroot/package/fpgaregs/Config.in
===================================================================
--- trunk/buildroot/package/fpgaregs/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/fpgaregs/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -2,5 +2,6 @@
bool "fpgaregs"
default n
help
- Build fpgaregs debug tool. It allows you to access the FPGA internal registers content directly from Linux userspace.
+ This debug tool allows you to access the FPGA internal registers
+ of Armadeus boards, directly from Linux userspace.
Modified: trunk/buildroot/package/imxregs/Config.in
===================================================================
--- trunk/buildroot/package/imxregs/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/imxregs/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -2,5 +2,6 @@
bool "imxregs"
default n
help
- Build imxregs debug tool. It allows you to show the iMX internal registers content directly from Linux userspace.
+ This debug tool allows you to access the i.MX internal registers
+ directly from Linux userspace. (If operation was allowed in U-Boot).
Modified: trunk/buildroot/package/lcd4linux/Config.in
===================================================================
--- trunk/buildroot/package/lcd4linux/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/lcd4linux/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -3,5 +3,6 @@
select BR2_PACKAGE_NCURSES
default n
help
- Build LCD4Linux daemon. It allows you to show system parameters on a textual LCD connected to your Armadeus board.
+ LCD4Linux allows you to show some system parameters on a textual LCD
+ connected to your Armadeus board.
Modified: trunk/buildroot/package/lcd4linux/lcd4linux.mk
===================================================================
--- trunk/buildroot/package/lcd4linux/lcd4linux.mk 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/lcd4linux/lcd4linux.mk 2008-12-04 10:38:59 UTC (rev 917)
@@ -15,21 +15,18 @@
LCD4LINUX_CONF:=lcd4linux_armadeus.conf
LCD4LINUX_TARGET_CONF:=etc/lcd4linux.conf
-# Not defined in buildroot ??:
-TARGET_STRIP:=arm-linux-strip
-
$(DL_DIR)/$(LCD4LINUX_SOURCE):
$(WGET) -P $(DL_DIR) $(LCD4LINUX_SITE)/$(LCD4LINUX_SOURCE)
$(LCD4LINUX_DIR)/.unpacked: $(DL_DIR)/$(LCD4LINUX_SOURCE)
$(LCD4LINUX_CAT) $(DL_DIR)/$(LCD4LINUX_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $(LCD4LINUX_DIR)/.unpacked
+ touch $@
$(LCD4LINUX_DIR)/.patched: $(LCD4LINUX_DIR)/.unpacked
toolchain/patch-kernel.sh $(LCD4LINUX_DIR) package/lcd4linux lcd4linux\*.patch
(if [ -d $(BUILD_DIR)/linux-2.6.12/include/asm-generic ]; then ln -sf $(BUILD_DIR)/linux-2.6.12/include/asm-generic/ $(BUILD_DIR)/staging_dir/arm-linux-uclibc/sys-include/asm-generic; fi)
- touch $(LCD4LINUX_DIR)/.patched
+ touch $@
$(LCD4LINUX_DIR)/.configured: $(LCD4LINUX_DIR)/.patched
(cd $(LCD4LINUX_DIR); rm -rf config.cache; \
@@ -38,7 +35,7 @@
./configure \
--host=$(GNU_TARGET_NAME) \
);
- touch $(LCD4LINUX_DIR)/.configured
+ touch $@
$(LCD4LINUX_DIR)/$(LCD4LINUX_BINARY): $(LCD4LINUX_DIR)/.configured
$(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) -C $(LCD4LINUX_DIR)
@@ -46,7 +43,7 @@
$(TARGET_DIR)/$(LCD4LINUX_TARGET_BINARY): $(LCD4LINUX_DIR)/$(LCD4LINUX_BINARY)
#cp -f $< $@
install -D $< $@
- $(TARGET_STRIP) $(TARGET_DIR)/$(LCD4LINUX_TARGET_BINARY)
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
cp package/lcd4linux/$(LCD4LINUX_CONF) $(TARGET_DIR)/$(LCD4LINUX_TARGET_CONF)
lcd4linux: uclibc ncurses $(TARGET_DIR)/$(LCD4LINUX_TARGET_BINARY)
Modified: trunk/buildroot/package/max5821ctrl/Config.in
===================================================================
--- trunk/buildroot/package/max5821ctrl/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/max5821ctrl/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -2,6 +2,6 @@
bool "max5821ctrl"
default y
help
- Build MAX5821 control tool. It allows you to set the I2C MAX5821 DAC directly
- from Linux userspace (command setDAC).
+ This tool allows you to configure the MAX5821 I2C DAC directly
+ from Linux userspace (setDAC command).
Modified: trunk/buildroot/package/pyserial/Config.in
===================================================================
--- trunk/buildroot/package/pyserial/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/pyserial/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_PYSERIAL
+ bool "pyserial"
+ depends on BR2_PACKAGE_PYTHON
+ default n
+ help
+ Installs the python pyserial extension
Modified: trunk/buildroot/package/pyserial/pyserial.mk
===================================================================
--- trunk/buildroot/package/pyserial/pyserial.mk 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/pyserial/pyserial.mk 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,32 @@
+PYSERIAL_VERSION=2.2
+PYSERIAL_BINARY=pyserial
+PYSERIAL_SOURCE=$(PYSERIAL_BINARY)-$(PYSERIAL_VERSION).zip
+PYSERIAL_SITE=http://$(BR2_SOURCEFORGE_MIRROR).dl.sourceforge.net/sourceforge/pyserial
+PYSERIAL_DIR=$(BUILD_DIR)/$(PYSERIAL_BINARY)-$(PYSERIAL_VERSION)
+PYSERIAL_SITE_PKG=$(TARGET_DIR)/usr/lib/python2.4/site-packages/serial
+
+$(DL_DIR)/$(PYSERIAL_SOURCE):
+ $(WGET) -P $(DL_DIR) $(PYSERIAL_SITE)/$(PYSERIAL_SOURCE)
+
+$(PYSERIAL_DIR)/.source: $(DL_DIR)/$(PYSERIAL_SOURCE)
+ unzip -o $(DL_DIR)/$(PYSERIAL_SOURCE) -d $(BUILD_DIR)
+ touch $(PYSERIAL_DIR)/.source
+
+$(PYSERIAL_DIR)/.configured: $(PYSERIAL_DIR)/.source
+ touch $(PYSERIAL_DIR)/.configured
+
+$(PYSERIAL_BINARY): python $(PYSERIAL_DIR)/.configured
+ mkdir -p $(PYSERIAL_SITE_PKG)
+ cp -R $(PYSERIAL_DIR)/serial/* $(PYSERIAL_SITE_PKG)
+
+$(PYSERIAL_BINARY)-source: $(DL_DIR)/$(PYSERIAL_SOURCE)
+
+$(PYSERIAL_BINARY)-clean:
+ rm -rf $(PYSERIAL_SITE_PKG)
+
+$(PYSERIAL_BINARY)-dirclean:
+ rm -rf $(PYSERIAL_DIR)
+
+ifeq ($(strip $(BR2_PACKAGE_PYSERIAL)),y)
+TARGETS+=$(PYSERIAL_BINARY)
+endif
Modified: trunk/buildroot/package/slideshow/Config.in
===================================================================
--- trunk/buildroot/package/slideshow/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/slideshow/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -4,6 +4,7 @@
default n
help
- Perigee Slideshow is a command line program that searches a directory for supported graphic files and displays them in a slideshow
+ Perigee Slideshow is a command line program that searches a directory
+ for supported graphic files and displays them in a slideshow.
http://www.xmission.com/~jstanley/slideshow.html
Modified: trunk/buildroot/package/slideshow/slideshow-01-add-arm-cross-compile.patch
===================================================================
--- trunk/buildroot/package/slideshow/slideshow-01-add-arm-cross-compile.patch 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/slideshow/slideshow-01-add-arm-cross-compile.patch 2008-12-04 10:38:59 UTC (rev 917)
@@ -1,10 +1,9 @@
--- slideshow/Makefile 2003-11-29 21:08:54.000000000 +0100
+++ slideshow.mod/Makefile 2007-09-05 12:08:56.000000000 +0200
-@@ -1,6 +1,12 @@
+@@ -1,6 +1,11 @@
+ifeq ($(ARCH), arm)
-+CFLAGS = -O2 `sh ../SDL-1.2.11/sdl-config --cflags`
-+LFLAGS = `sh ../SDL-1.2.11/sdl-config --libs` -lSDL_image
-+CC = arm-linux-g++
++CFLAGS = -O2 `sh ../SDL-1.2.13/sdl-config --cflags`
++LFLAGS = `sh ../SDL-1.2.13/sdl-config --libs` -lSDL_image
+else
CFLAGS = -O2 -march=i586 `sdl-config --cflags`
LFLAGS = `sdl-config --libs` -lSDL_image
Modified: trunk/buildroot/package/slideshow/slideshow.mk
===================================================================
--- trunk/buildroot/package/slideshow/slideshow.mk 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/package/slideshow/slideshow.mk 2008-12-04 10:38:59 UTC (rev 917)
@@ -24,11 +24,11 @@
touch $@
$(SLIDESHOW_DIR)/slideshow: $(SLIDESHOW_DIR)/.configured
- export PATH=$(STAGING_DIR)/bin::$$PATH; export STAGING_DIR=$(STAGING_DIR); $(MAKE) -C $(SLIDESHOW_DIR) ARCH=arm
+ export CC=$(TARGET_CXX); export STAGING_DIR=$(STAGING_DIR); $(MAKE) -C $(SLIDESHOW_DIR) ARCH=arm
$(TARGET_DIR)/usr/bin/slideshow: $(SLIDESHOW_DIR)/slideshow
cp -dpf $< $(TARGET_DIR)/usr/bin
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $@
SLIDESHOW slideshow: sdl sdl_image $(TARGET_DIR)/usr/bin/slideshow
Modified: trunk/buildroot/target/device/armadeus/Config.in
===================================================================
--- trunk/buildroot/target/device/armadeus/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/target/device/armadeus/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -16,84 +16,32 @@
config BR2_TARGET_ARMADEUS_APF9328
bool "apf9328"
-config BR2_TARGET_ARMADEUS_APM9328
- bool "apm9328"
+config BR2_TARGET_ARMADEUS_APF27
+ bool "apf27"
endchoice
-config BR2_TARGET_ARMADEUS_NAME
+config BR2_BOARD_NAME
string
- default "apm9328" if BR2_TARGET_ARMADEUS_APM9328
default "apf9328" if BR2_TARGET_ARMADEUS_APF9328
+ default "apf27" if BR2_TARGET_ARMADEUS_APF27
-choice
- prompt "Target SDRAM size"
- default BR2_TARGET_ARMADEUS_SDRAM_32
- depends on BR2_TARGET_ARMADEUS_APF9328 || BR2_TARGET_ARMADEUS_APM9328
- help
- Target SDRAM size
+config BR2_BOARD_PATH
+ string
+ default "target/device/armadeus/$(BR2_BOARD_NAME)"
-config BR2_TARGET_ARMADEUS_SDRAM_8
- bool "8MB"
-config BR2_TARGET_ARMADEUS_SDRAM_16
- bool "16MB"
-config BR2_TARGET_ARMADEUS_SDRAM_32
- bool "32MB"
-config BR2_TARGET_ARMADEUS_SDRAM_64
- bool "64MB"
-endchoice
+source "target/device/armadeus/apf9328/Config.in"
+source "target/device/armadeus/apf27/Config.in"
config BR2_TARGET_ARMADEUS_SDRAM_SIZE
string
default "8" if BR2_TARGET_ARMADEUS_SDRAM_8
- default "16" if BR2_TARGET_ARMADEUS_SDRAM_16
- default "32" if BR2_TARGET_ARMADEUS_SDRAM_32
- default "64" if BR2_TARGET_ARMADEUS_SDRAM_64
+ default "16" if BR2_TARGET_ARMADEUS_APF27_SDRAM_16 || BR2_TARGET_ARMADEUS_SDRAM_16
+ default "32" if BR2_TARGET_ARMADEUS_APF27_SDRAM_32 || BR2_TARGET_ARMADEUS_SDRAM_32
+ default "64" if BR2_TARGET_ARMADEUS_APF27_SDRAM_64 || BR2_TARGET_ARMADEUS_SDRAM_64
+ default "128" if BR2_TARGET_ARMADEUS_APF27_SDRAM_128
+ default "256" if BR2_TARGET_ARMADEUS_APF27_SDRAM_256
-config BR2_PACKAGE_LINUX_ARM
- bool "linux"
- default n
- depends BR2_arm && BR2_TARGET_ARMADEUS
- select BR2_TARGET_U-BOOT
- help
- The Linux kernel.
- http://www.kernel.org/
-choice
- prompt "Linux kernel version"
- default BR2_PACKAGE_LINUX_VERSION_2_6_23_1
- depends on BR2_PACKAGE_LINUX_ARM
- help
- Linux kernel version you want to use with your Armadeus board.
- If you plan to use MMC/SD cards then choose 2.6.18.1 or later,
- otherwise 2.6.12 should be sufficient and is more used/tested.
-config BR2_PACKAGE_LINUX_VERSION_2_6_12
- bool "2.6.12"
-config BR2_PACKAGE_LINUX_VERSION_2_6_17
- bool "2.6.17"
-config BR2_PACKAGE_LINUX_VERSION_2_6_18_1
- bool "2.6.18.1"
-config BR2_PACKAGE_LINUX_VERSION_2_6_23_1
- bool "2.6.23.1"
-config BR2_PACKAGE_LINUX_VERSION_2_6_24
- bool "2.6.24"
-endchoice
-
-config BR2_PACKAGE_LINUX_VERSION
- string
- default "2.6.12" if BR2_PACKAGE_LINUX_VERSION_2_6_12
- default "2.6.17" if BR2_PACKAGE_LINUX_VERSION_2_6_17
- default "2.6.18.1" if BR2_PACKAGE_LINUX_VERSION_2_6_18_1
- default "2.6.23.1" if BR2_PACKAGE_LINUX_VERSION_2_6_23_1
- default "2.6.24.3" if BR2_PACKAGE_LINUX_VERSION_2_6_24
-
-config BR2_TARGET_U-BOOT
- bool "U-Boot"
- default n
- depends BR2_arm && BR2_TARGET_ARMADEUS
- help
- The U-Boot universal bootloader for embedded systems.
-
endif
-
Modified: trunk/buildroot/target/device/armadeus/Makefile.in
===================================================================
--- trunk/buildroot/target/device/armadeus/Makefile.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/target/device/armadeus/Makefile.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -1,20 +1,34 @@
-# Override the default uClibc configuration
ifeq ($(strip $(BR2_TARGET_ARMADEUS)),y)
ARMADEUS_PATH:=target/device/armadeus
-ARMADEUS_TARGET_NAME:=$(strip $(subst ",, $(BR2_TARGET_ARMADEUS_NAME)))
-ARMADEUS_CONFIG_PATH:=$(ARMADEUS_PATH)/$(ARMADEUS_TARGET_NAME)
+BOARD_NAME:=$(strip $(subst ",, $(BR2_BOARD_NAME)))
+#"))
+BOARD_PATH:=$(strip $(subst ",, $(BR2_BOARD_PATH)))
+#"))
+
+LINUX26_VERSION:=$(strip $(subst ",, $(BR2_LINUX26_VERSION)))
+#"))
+
+LINUX26_PATCH_DIR:=$(strip $(subst ",, "$(ARMADEUS_PATH)/linux/kernel-patches/$(BR2_LINUX26_VERSION)"))
+#"))
+
+# These are set by "new" Config.in
+#LINUX26_KCONFIG:=$(BOARD_PATH)/$(BOARD_NAME)-linux-$(BR2_LINUX26_VERSION).config
+
+# This should be part of target/linux/Makefile.in
+LINUX26_BUILD_DIR:=$(PROJECT_BUILD_DIR)
+
+LINUX26_KERNEL:=$(BINARIES_DIR)/$(BOARD_NAME)-linux.bin
+
+LINUX26_KERNEL_NAME:=$(BOARD_NAME)-linux.bin
+
include target/device/armadeus/u-boot/u-boot.mk
-include target/device/armadeus/linux/linux.mk
include target/device/armadeus/rootfs/Makefile.in
-include target/device/armadeus/$(ARMADEUS_TARGET_NAME)/Makefile.in
+include target/device/armadeus/$(BOARD_NAME)/Makefile.in
-LINUX26_KCONFIG:=$(ARMADEUS_CONFIG_PATH)/linux-$(BR2_PACKAGE_LINUX_VERSION).config
-LINUX26_VERSION:=$(strip $(subst ",, $(BR2_PACKAGE_LINUX_VERSION)))
-DOWNLOAD_LINUX26_VERSION:=$(strip $(subst ",, $(BR2_PACKAGE_LINUX_VERSION)))
+BR2_PACKAGE_BUSYBOX_CONFIG:=$(ARMADEUS_PATH)/busybox.config
+UCLIBC_CONFIG_FILE:=$(BOARD_PATH)/uClibc.config.$(ARCH)
-BR2_PACKAGE_BUSYBOX_CONFIG:=$(ARMADEUS_PATH)/busybox.config
-UCLIBC_CONFIG_FILE:=$(ARMADEUS_PATH)/uClibc.config.$(ARCH)
endif
Added: trunk/buildroot/target/device/armadeus/apf27/Config.in
===================================================================
--- trunk/buildroot/target/device/armadeus/apf27/Config.in (rev 0)
+++ trunk/buildroot/target/device/armadeus/apf27/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,66 @@
+if BR2_TARGET_ARMADEUS_APF27
+choice
+ prompt "Target DDR SDRAM chip size"
+ default BR2_TARGET_ARMADEUS_APF27_SDRAM_64 if BR2_TARGET_ARMADEUS_APF27
+ depends on BR2_TARGET_ARMADEUS_APF27
+ help
+ Target DDR SDRAM size per chip (Default 64MB).
+
+config BR2_TARGET_ARMADEUS_APF27_SDRAM_16
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "16MB"
+ help
+ Target 16MB DDR SDRAM size per chip.
+
+config BR2_TARGET_ARMADEUS_APF27_SDRAM_32
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "32MB"
+ help
+ Target 32MB DDR SDRAM size per chip.
+
+config BR2_TARGET_ARMADEUS_APF27_SDRAM_64
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "64MB"
+ help
+ Target 64MB DDR SDRAM size per chip (Default).
+
+config BR2_TARGET_ARMADEUS_APF27_SDRAM_128
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "128MB"
+ help
+ Target 128MB DDR SDRAM size per chip).
+
+config BR2_TARGET_ARMADEUS_APF27_SDRAM_256
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "256MB"
+ help
+ Target 256MB DDR SDRAM size per chip.
+
+endchoice
+
+choice
+ prompt "Target Number of DDR SDRAM chip"
+ default BR2_TARGET_ARMADEUS_NR_SDRAM_1
+ help
+ Number of DDR SDRAM chip present on target (1 or 2)
+ (Default 1 DDR SDRAM)
+
+config BR2_TARGET_ARMADEUS_NR_SDRAM_1
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "1 DDR SDRAM"
+ help
+ 1 DDR SDRAM on target (Default).
+config BR2_TARGET_ARMADEUS_NR_SDRAM_2
+ depends on BR2_TARGET_ARMADEUS_APF27
+ bool "2 DDR SDRAMs"
+ help
+ 2 DDR SDRAMs on target.
+
+endchoice
+
+config BR2_TARGET_ARMADEUS_NR_SDRAM
+ string
+ default 1 if BR2_TARGET_ARMADEUS_NR_SDRAM_1
+ default 2 if BR2_TARGET_ARMADEUS_NR_SDRAM_2
+
+endif
Added: trunk/buildroot/target/device/armadeus/apf27/Makefile.in
===================================================================
--- trunk/buildroot/target/device/armadeus/apf27/Makefile.in (rev 0)
+++ trunk/buildroot/target/device/armadeus/apf27/Makefile.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,2 @@
+U_BOOT_BINLOC=u-boot-nand.bin
+
Modified: trunk/buildroot/target/device/armadeus/apf9328/Config.in
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/Config.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/target/device/armadeus/apf9328/Config.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,37 @@
+if BR2_TARGET_ARMADEUS_APF9328
+
+choice
+ prompt "Target SDRAM size"
+ default BR2_TARGET_ARMADEUS_SDRAM_16 if BR2_TARGET_ARMADEUS_APF9328
+ depends on BR2_TARGET_ARMADEUS_APF9328
+ help
+ Target SDRAM size (Default 16MB).
+
+config BR2_TARGET_ARMADEUS_SDRAM_8
+ depends on BR2_TARGET_ARMADEUS_APF9328
+ bool "8MB"
+ help
+ Target 8MB SDRAM size.
+
+config BR2_TARGET_ARMADEUS_SDRAM_16
+ depends on BR2_TARGET_ARMADEUS_APF9328
+ bool "16MB"
+ help
+ Target 16MB SDRAM size (Default).
+
+config BR2_TARGET_ARMADEUS_SDRAM_32
+ depends on BR2_TARGET_ARMADEUS_APF9328
+ bool "32MB"
+ help
+ Target 32MB SDRAM size.
+
+config BR2_TARGET_ARMADEUS_SDRAM_64
+ depends on BR2_TARGET_ARMADEUS_APF9328
+ bool "64MB"
+ help
+ Target 64MB SDRAM size.
+
+endchoice
+
+endif
+
Modified: trunk/buildroot/target/device/armadeus/apf9328/Makefile.in
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/Makefile.in 2008-12-04 09:40:44 UTC (rev 916)
+++ trunk/buildroot/target/device/armadeus/apf9328/Makefile.in 2008-12-04 10:38:59 UTC (rev 917)
@@ -1,3 +1 @@
-U-BOOT_TARGET_NAME=apf9328
-LINUX_FORMAT=uImage
-LINUX_KCONFIG=$(ARMADEUS_CONFIG_PATH)/linux-$(BR2_PACKAGE_LINUX_VERSION).config
+TARGETS+=u-boot-brec
Added: trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.18.1.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.18.1.config (rev 0)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.18.1.config 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,1076 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.18.1
+# Sat Jul 14 16:47:01 2007
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_AUDIT is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
+# CONFIG_RELAY is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_EMBEDDED=y
+CONFIG_UID16=y
+CONFIG_SYSCTL=y
+# CONFIG_KALLSYMS is not set
+CONFIG_HOTPLUG=y
+CONFIG_PRINTK=y
+CONFIG_BUG=y
+CONFIG_ELF_CORE=y
+CONFIG_BASE_FULL=y
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_SHMEM=y
+CONFIG_SLAB=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_RT_MUTEXES=y
+# CONFIG_TINY_SHMEM is not set
+CONFIG_BASE_SMALL=0
+# CONFIG_SLOB is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# Block layer
+#
+# CONFIG_BLK_DEV_IO_TRACE is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+# CONFIG_IOSCHED_AS is not set
+CONFIG_IOSCHED_DEADLINE=y
+# CONFIG_IOSCHED_CFQ is not set
+# CONFIG_DEFAULT_AS is not set
+CONFIG_DEFAULT_DEADLINE=y
+# CONFIG_DEFAULT_CFQ is not set
+# CONFIG_DEFAULT_NOOP is not set
+CONFIG_DEFAULT_IOSCHED="deadline"
+
+#
+# System Type
+#
+# CONFIG_ARCH_AAEC2000 is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+# CONFIG_ARCH_REALVIEW is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_AT91 is not set
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_EP93XX is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_NETX is not set
+# CONFIG_ARCH_H720X is not set
+CONFIG_ARCH_IMX=y
+# CONFIG_ARCH_IOP3XX is not set
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_IXP23XX is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PNX4008 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+
+#
+# IMX Implementations
+#
+# CONFIG_ARCH_MX1ADS is not set
+# CONFIG_MACH_MX1FS2 is not set
+# CONFIG_MACH_SCB9328 is not set
+CONFIG_MACH_APF9328=y
+CONFIG_IMX_APF9328_FLASH_8MB=y
+# CONFIG_IMX_APF9328_FLASH_16MB is not set
+CONFIG_IMX_SCB9328_RAM_16MB=y
+# CONFIG_IMX_SCB9328_RAM_32MB is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_TLB_V4WBI=y
+
+#
+# Processor Features
+#
+CONFIG_ARM_THUMB=y
+# CONFIG_CPU_ICACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_DISABLE is not set
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+
+#
+# Bus support
+#
+
+#
+# PCCARD (PCMCIA/CardBus) support
+#
+# CONFIG_PCCARD is not set
+
+#
+# Kernel Features
+#
+CONFIG_PREEMPT=y
+# CONFIG_NO_IDLE_HZ is not set
+CONFIG_HZ=100
+# CONFIG_AEABI is not set
+# CONFIG_ARCH_DISCONTIGMEM_ENABLE is not set
+CONFIG_SELECT_MEMORY_MODEL=y
+CONFIG_FLATMEM_MANUAL=y
+# CONFIG_DISCONTIGMEM_MANUAL is not set
+# CONFIG_SPARSEMEM_MANUAL is not set
+CONFIG_FLATMEM=y
+CONFIG_FLAT_NODE_MEM_MAP=y
+# CONFIG_SPARSEMEM_STATIC is not set
+CONFIG_SPLIT_PTLOCK_CPUS=4096
+# CONFIG_RESOURCES_64BIT is not set
+# CONFIG_LEDS is not set
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Boot options
+#
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_CMDLINE=""
+# CONFIG_XIP_KERNEL is not set
+
+#
+# Floating point emulation
+#
+
+#
+# At least one emulation must be selected
+#
+# CONFIG_FPE_NWFPE is not set
+# CONFIG_FPE_FASTFPE is not set
+
+#
+# Userspace binary formats
+#
+CONFIG_BINFMT_ELF=y
+# CONFIG_BINFMT_AOUT is not set
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_ARTHUR is not set
+
+#
+# Power management options
+#
+# CONFIG_PM is not set
+# CONFIG_APM is not set
+
+#
+# Networking
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+# CONFIG_NETDEBUG is not set
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+CONFIG_INET=y
+# CONFIG_IP_MULTICAST is not set
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_FIB_HASH=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_RARP=y
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_ARPD is not set
+# CONFIG_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_XFRM_TUNNEL is not set
+# CONFIG_INET_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+CONFIG_INET_DIAG=y
+CONFIG_INET_TCP_DIAG=y
+# CONFIG_TCP_CONG_ADVANCED is not set
+CONFIG_TCP_CONG_BIC=y
+# CONFIG_IPV6 is not set
+# CONFIG_INET6_XFRM_TUNNEL is not set
+# CONFIG_INET6_TUNNEL is not set
+# CONFIG_NETWORK_SECMARK is not set
+# CONFIG_NETFILTER is not set
+
+#
+# DCCP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_DCCP is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+
+#
+# TIPC Configuration (EXPERIMENTAL)
+#
+# CONFIG_TIPC is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+# CONFIG_IEEE80211 is not set
+
+#
+# Device Drivers
+#
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+# CONFIG_FW_LOADER is not set
+# CONFIG_SYS_HYPERVISOR is not set
+
+#
+# Connector - unified userspace <-> kernelspace linker
+#
+# CONFIG_CONNECTOR is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_REDBOOT_PARTS is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+# CONFIG_RFD_FTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+# CONFIG_MTD_CFI_ADV_OPTIONS is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+# CONFIG_MTD_OBSOLETE_CHIPS is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0x10000000
+CONFIG_MTD_PHYSMAP_LEN=0x10000000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=2
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_SCB9328 is not set
+CONFIG_MTD_APF9328=y
+# CONFIG_MTD_MX1FS2 is not set
+# CONFIG_MTD_PLATRAM is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_DATAFLASH is not set
+# CONFIG_MTD_M25P80 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLOCK2MTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# OneNAND Flash Device Drivers
+#
+# CONFIG_MTD_ONENAND is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_COW_COMMON is not set
+CONFIG_BLK_DEV_LOOP=m
+CONFIG_BLK_DEV_CRYPTOLOOP=m
+CONFIG_BLK_DEV_NBD=m
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=1
+CONFIG_BLK_DEV_RAM_SIZE=2048
+CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_CDROM_PKTCDVD is not set
+# CONFIG_ATA_OVER_ETH is not set
+
+#
+# SCSI device support
+#
+# CONFIG_RAID_ATTRS is not set
+# CONFIG_SCSI is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+
+#
+# IEEE 1394 (FireWire) support
+#
+
+#
+# I2O device support
+#
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# PHY device support
+#
+# CONFIG_PHYLIB is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MII=y
+# CONFIG_SMC91X is not set
+CONFIG_DM9000=y
+
+#
+# Ethernet (1000 Mbit)
+#
+
+#
+# Ethernet (10000 Mbit)
+#
+
+#
+# Token Ring devices
+#
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+# CONFIG_PPP is not set
+# CONFIG_SLIP is not set
+# CONFIG_SHAPER is not set
+# CONFIG_NETCONSOLE is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input device support
+#
+CONFIG_INPUT=y
+
+#
+# Userland interfaces
+#
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=320
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=240
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_TSDEV=m
+CONFIG_INPUT_TSDEV_SCREEN_X=320
+CONFIG_INPUT_TSDEV_SCREEN_Y=240
+# CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_EVBUG is not set
+
+#
+# Input Device Drivers
+#
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_KEYBOARD_ATKBD=y
+# CONFIG_KEYBOARD_SUNKBD is not set
+# CONFIG_KEYBOARD_LKKBD is not set
+# CONFIG_KEYBOARD_XTKBD is not set
+# CONFIG_KEYBOARD_NEWTON is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_MOUSE_PS2=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_INPUT_JOYSTICK is not set
+# CONFIG_INPUT_TOUCHSCREEN is not set
+CONFIG_INPUT_MISC=y
+CONFIG_INPUT_UINPUT=m
+
+#
+# Hardware I/O ports
+#
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SERIO_LIBPS2=y
+# CONFIG_SERIO_RAW is not set
+# CONFIG_GAMEPORT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_HW_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_SERIAL_NONSTANDARD is not set
+
+#
+# Serial drivers
+#
+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
+#
+CONFIG_SERIAL_IMX=y
+CONFIG_SERIAL_IMX_CONSOLE=y
+CONFIG_SERIAL_CORE=y
+CONFIG_SERIAL_CORE_CONSOLE=y
+CONFIG_UNIX98_PTYS=y
+# CONFIG_LEGACY_PTYS is not set
+
+#
+# IPMI
+#
+# CONFIG_IPMI_HANDLER is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+CONFIG_HW_RANDOM=y
+# CONFIG_NVRAM is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_RAW_DRIVER is not set
+
+#
+# TPM devices
+#
+# CONFIG_TCG_TPM is not set
+# CONFIG_TELCLOCK is not set
+
+#
+# I2C support
+#
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_OCORES is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_PCA_ISA is not set
+CONFIG_I2C_IMX=y
+
+#
+# Miscellaneous I2C Chip support
+#
+# CONFIG_SENSORS_DS1337 is not set
+# CONFIG_SENSORS_DS1374 is not set
+CONFIG_SENSORS_EEPROM=m
+CONFIG_SENSORS_PCF8574=m
+CONFIG_SENSORS_PCA9539=m
+CONFIG_SENSORS_PCF8591=m
+CONFIG_SENSORS_MAX6875=m
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
+
+#
+# SPI support
+#
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+
+#
+# SPI Master Controller Drivers
+#
+CONFIG_SPI_BITBANG=m
+# CONFIG_SPI_IMX is not set
+
+#
+# SPI Protocol Masters
+#
+# CONFIG_SPI_TSC2102 is not set
+
+#
+# Dallas's 1-wire bus
+#
+
+#
+# Hardware Monitoring support
+#
+# CONFIG_HWMON is not set
+# CONFIG_HWMON_VID is not set
+
+#
+# Misc devices
+#
+
+#
+# LED devices
+#
+# CONFIG_NEW_LEDS is not set
+
+#
+# LED drivers
+#
+
+#
+# LED Triggers
+#
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_V4L2=y
+
+#
+# Digital Video Broadcasting Devices
+#
+# CONFIG_DVB is not set
+
+#
+# Graphics support
+#
+# CONFIG_FIRMWARE_EDID is not set
+CONFIG_FB=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+# CONFIG_FB_MACMODES is not set
+# CONFIG_FB_BACKLIGHT is not set
+CONFIG_FB_MODE_HELPERS=y
+# CONFIG_FB_TILEBLITTING is not set
+CONFIG_FB_IMX=y
+CONFIG_FB_IMX_MICROTIPS_MTF_T035_TFT=y
+# CONFIG_FB_IMX_SHARP_LQ057_TFT is not set
+# CONFIG_FB_IMX_OPTREX_F51900_CSTN is not set
+# CONFIG_FB_IMX_MOTOROLA_A910_TFT is not set
+# CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_VIRTUAL is not set
+
+#
+# Console display driver support
+#
+# CONFIG_VGA_CONSOLE is not set
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Logo configuration
+#
+CONFIG_LOGO=y
+# CONFIG_LOGO_LINUX_MONO is not set
+# CONFIG_LOGO_LINUX_VGA16 is not set
+# CONFIG_LOGO_LINUX_CLUT224 is not set
+CONFIG_LOGO_ARMADEUS_CLUT224=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=m
+CONFIG_BACKLIGHT_DEVICE=y
+CONFIG_LCD_CLASS_DEVICE=m
+CONFIG_LCD_DEVICE=y
+
+#
+# Sound
+#
+CONFIG_SOUND=m
+
+#
+# Advanced Linux Sound Architecture
+#
+# CONFIG_SND is not set
+
+#
+# Open Sound System
+#
+# CONFIG_SOUND_PRIME is not set
+
+#
+# USB support
+#
+CONFIG_USB_ARCH_HAS_HCD=y
+# CONFIG_USB_ARCH_HAS_OHCI is not set
+# CONFIG_USB_ARCH_HAS_EHCI is not set
+# CONFIG_USB is not set
+
+#
+# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
+#
+
+#
+# USB Gadget Support
+#
+CONFIG_USB_GADGET=m
+# CONFIG_USB_GADGET_DEBUG_FILES is not set
+CONFIG_USB_GADGET_SELECTED=y
+# CONFIG_USB_GADGET_NET2280 is not set
+# CONFIG_USB_GADGET_PXA2XX is not set
+CONFIG_USB_GADGET_IMX=y
+CONFIG_USB_IMX=m
+# CONFIG_USB_GADGET_GOKU is not set
+# CONFIG_USB_GADGET_LH7A40X is not set
+# CONFIG_USB_GADGET_OMAP is not set
+# CONFIG_USB_GADGET_AT91 is not set
+# CONFIG_USB_GADGET_DUMMY_HCD is not set
+# CONFIG_USB_GADGET_DUALSPEED is not set
+CONFIG_USB_ZERO=m
+CONFIG_USB_ETH=m
+CONFIG_USB_ETH_RNDIS=y
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_FILE_STORAGE=m
+# CONFIG_USB_FILE_STORAGE_TEST is not set
+CONFIG_USB_G_SERIAL=m
+
+#
+# Armadeus specific drivers
+#
+# CONFIG_ARMADEUS_DRIVERS is not set
+
+#
+# MMC/SD Card support
+#
+CONFIG_MMC=y
+# CONFIG_MMC_DEBUG is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_IMX=y
+
+#
+# Real Time Clock
+#
+CONFIG_RTC_LIB=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_HCTOSYS=y
+CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
+
+#
+# RTC interfaces
+#
+CONFIG_RTC_INTF_SYSFS=y
+CONFIG_RTC_INTF_PROC=y
+CONFIG_RTC_INTF_DEV=y
+CONFIG_RTC_INTF_DEV_UIE_EMUL=y
+
+#
+# RTC drivers
+#
+# CONFIG_RTC_DRV_X1205 is not set
+# CONFIG_RTC_DRV_DS1307 is not set
+CONFIG_RTC_DRV_DS1374=y
+# CONFIG_RTC_DRV_DS1553 is not set
+# CONFIG_RTC_DRV_ISL1208 is not set
+# CONFIG_RTC_DRV_DS1672 is not set
+# CONFIG_RTC_DRV_DS1742 is not set
+# CONFIG_RTC_DRV_PCF8563 is not set
+# CONFIG_RTC_DRV_PCF8583 is not set
+# CONFIG_RTC_DRV_RS5C348 is not set
+# CONFIG_RTC_DRV_RS5C372 is not set
+# CONFIG_RTC_DRV_M48T86 is not set
+# CONFIG_RTC_DRV_TEST is not set
+# CONFIG_RTC_DRV_MAX6902 is not set
+# CONFIG_RTC_DRV_V3020 is not set
+
+#
+# File systems
+#
+CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
+CONFIG_EXT2_FS_XIP=y
+CONFIG_FS_XIP=y
+CONFIG_EXT3_FS=y
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+CONFIG_EXT3_FS_SECURITY=y
+CONFIG_JBD=y
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FS_MBCACHE=y
+# CONFIG_REISERFS_FS is not set
+# CONFIG_JFS_FS is not set
+CONFIG_FS_POSIX_ACL=y
+# CONFIG_XFS_FS is not set
+# CONFIG_OCFS2_FS is not set
+# CONFIG_MINIX_FS is not set
+CONFIG_ROMFS_FS=y
+CONFIG_INOTIFY=y
+CONFIG_INOTIFY_USER=y
+# CONFIG_QUOTA is not set
+CONFIG_DNOTIFY=y
+CONFIG_AUTOFS_FS=y
+CONFIG_AUTOFS4_FS=y
+# CONFIG_FUSE_FS is not set
+
+#
+# CD-ROM/DVD Filesystems
+#
+# CONFIG_ISO9660_FS is not set
+# CONFIG_UDF_FS is not set
+
+#
+# DOS/FAT/NT Filesystems
+#
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+CONFIG_VFAT_FS=y
+CONFIG_FAT_DEFAULT_CODEPAGE=437
+CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
+# CONFIG_NTFS_FS is not set
+
+#
+# Pseudo filesystems
+#
+CONFIG_PROC_FS=y
+CONFIG_SYSFS=y
+CONFIG_TMPFS=y
+# CONFIG_HUGETLB_PAGE is not set
+CONFIG_RAMFS=y
+# CONFIG_CONFIGFS_FS is not set
+
+#
+# Miscellaneous filesystems
+#
+# CONFIG_ADFS_FS is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
+CONFIG_JFFS2_FS_WRITEBUFFER=y
+# CONFIG_JFFS2_SUMMARY is not set
+# CONFIG_JFFS2_FS_XATTR is not set
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_JFFS2_RTIME=y
+# CONFIG_JFFS2_RUBIN is not set
+# CONFIG_CRAMFS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_HPFS_FS is not set
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_SYSV_FS is not set
+# CONFIG_UFS_FS is not set
+
+#
+# Network File Systems
+#
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V4=y
+CONFIG_NFS_DIRECTIO=y
+# CONFIG_NFSD is not set
+CONFIG_ROOT_NFS=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+CONFIG_NFS_COMMON=y
+CONFIG_SUNRPC=y
+CONFIG_SUNRPC_GSS=y
+CONFIG_RPCSEC_GSS_KRB5=y
+# CONFIG_RPCSEC_GSS_SPKM3 is not set
+# CONFIG_SMB_FS is not set
+# CONFIG_CIFS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_CODA_FS is not set
+# CONFIG_AFS_FS is not set
+# CONFIG_9P_FS is not set
+
+#
+# Partition Types
+#
+CONFIG_PARTITION_ADVANCED=y
+# CONFIG_ACORN_PARTITION is not set
+# CONFIG_OSF_PARTITION is not set
+# CONFIG_AMIGA_PARTITION is not set
+# CONFIG_ATARI_PARTITION is not set
+# CONFIG_MAC_PARTITION is not set
+CONFIG_MSDOS_PARTITION=y
+CONFIG_BSD_DISKLABEL=y
+# CONFIG_MINIX_SUBPARTITION is not set
+# CONFIG_SOLARIS_X86_PARTITION is not set
+# CONFIG_UNIXWARE_DISKLABEL is not set
+# CONFIG_LDM_PARTITION is not set
+# CONFIG_SGI_PARTITION is not set
+# CONFIG_ULTRIX_PARTITION is not set
+# CONFIG_SUN_PARTITION is not set
+# CONFIG_KARMA_PARTITION is not set
+# CONFIG_EFI_PARTITION is not set
+
+#
+# Native Language Support
+#
+CONFIG_NLS=y
+CONFIG_NLS_DEFAULT="iso8859-1"
+CONFIG_NLS_CODEPAGE_437=y
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=y
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ASCII is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Profiling support
+#
+# CONFIG_PROFILING is not set
+
+#
+# Kernel hacking
+#
+# CONFIG_PRINTK_TIME is not set
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_UNUSED_SYMBOLS is not set
+# CONFIG_DEBUG_KERNEL is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_DEBUG_FS is not set
+CONFIG_FRAME_POINTER=y
+# CONFIG_UNWIND_INFO is not set
+# CONFIG_DEBUG_USER is not set
+
+#
+# Security options
+#
+# CONFIG_KEYS is not set
+# CONFIG_SECURITY is not set
+
+#
+# Cryptographic options
+#
+CONFIG_CRYPTO=y
+# CONFIG_CRYPTO_HMAC is not set
+# CONFIG_CRYPTO_NULL is not set
+# CONFIG_CRYPTO_MD4 is not set
+CONFIG_CRYPTO_MD5=y
+# CONFIG_CRYPTO_SHA1 is not set
+# CONFIG_CRYPTO_SHA256 is not set
+# CONFIG_CRYPTO_SHA512 is not set
+# CONFIG_CRYPTO_WP512 is not set
+# CONFIG_CRYPTO_TGR192 is not set
+CONFIG_CRYPTO_DES=y
+# CONFIG_CRYPTO_BLOWFISH is not set
+# CONFIG_CRYPTO_TWOFISH is not set
+# CONFIG_CRYPTO_SERPENT is not set
+# CONFIG_CRYPTO_AES is not set
+# CONFIG_CRYPTO_CAST5 is not set
+# CONFIG_CRYPTO_CAST6 is not set
+# CONFIG_CRYPTO_TEA is not set
+# CONFIG_CRYPTO_ARC4 is not set
+# CONFIG_CRYPTO_KHAZAD is not set
+# CONFIG_CRYPTO_ANUBIS is not set
+# CONFIG_CRYPTO_DEFLATE is not set
+# CONFIG_CRYPTO_MICHAEL_MIC is not set
+CONFIG_CRYPTO_CRC32C=m
+# CONFIG_CRYPTO_TEST is not set
+
+#
+# Hardware crypto devices
+#
+
+#
+# Library routines
+#
+# CONFIG_CRC_CCITT is not set
+# CONFIG_CRC16 is not set
+CONFIG_CRC32=y
+CONFIG_LIBCRC32C=m
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_PLIST=y
Added: trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.23.1.config
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.23.1.config (rev 0)
+++ trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.23.1.config 2008-12-04 10:38:59 UTC (rev 917)
@@ -0,0 +1,1226 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.23.1
+# Thu Oct 30 12:23:07 2008
+#
+CONFIG_ARM=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_GENERIC_GPIO=y
+CONFIG_GENERIC_TIME=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_MMU=y
+# CONFIG_NO_IOPORT is not set
+CONFIG_GENERIC_HARDIRQS=y
+CONFIG_STACKTRACE_SUPPORT=y
+CONFIG_LOCKDEP_SUPPORT=y
+CONFIG_TRACE_IRQFLAGS_SUPPORT=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_GENERIC_IRQ_PROBE=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_ARCH_HAS_ILOG2_U32 is not set
+# CONFIG_ARCH_HAS_ILOG2_U64 is not set
+CONFIG_GENERIC_HWEIGHT=y
+CONFIG_GENERIC_CALIBRATE_DELAY=y
+CONFIG_ZONE_DMA=y
+CONFIG_VECTORS_BASE=0xffff0000
+CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
+
+#
+# General setup
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_BROKEN_ON_SMP=y
+CONFIG_LOCK_KERNEL=y
+CONFIG_INIT_ENV_ARG_LIMIT=32
+CONFIG_LOCALVERSION=""
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+CONFIG_SYSVIPC_SYSCTL=y
+# CONFIG_POSIX_MQUEUE is not set
+# CONFIG_BSD_PROCESS_ACCT is not set
+# CONFIG_TASKSTATS is not set
+# CONFIG_USER_NS i...
[truncated message content] |
|
From: <ar...@us...> - 2008-12-04 09:40:48
|
Revision: 916
http://armadeus.svn.sourceforge.net/armadeus/?rev=916&view=rev
Author: artemys
Date: 2008-12-04 09:40:44 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[MERGE] Correct wrong file format of fpgaloader files
Modified Paths:
--------------
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.c
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.h
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.c
trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.h
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c 2008-12-04 07:26:29 UTC (rev 915)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/fpga-loader.c 2008-12-04 09:40:44 UTC (rev 916)
@@ -1,284 +1,284 @@
-/*
- ***********************************************************************
- *
- * (c) Copyright 2006 Armadeus project
- * Julien Boibessot <jul...@ar...>
- * Nicolas Colombain <nic...@ar...>
- * Generic Xilinx FPGA loader
- *
- * 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 "fpga-loader.h"
-#include "xilinx-fpga-loader.h"
-#include <asm/arch/imx-regs.h>
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
-#include <linux/config.h>
-#endif
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/fs.h>
-#include <linux/errno.h>
-#include <linux/types.h>
-#include <linux/proc_fs.h>
-#include <linux/init.h>
-#include <linux/fs.h>
-#include <linux/fcntl.h>
-#include <asm/system.h>
-#include <asm/io.h>
-#include <asm/uaccess.h>
-
-//static unsigned long init_map;
-struct semaphore fpga_sema;
-
-/* global variables */
-static int fpga_major = FPGA_MAJOR;
-Xilinx_desc* g_current_desc = NULL;
-
-static unsigned char fpga_descriptor = 0; // use default target_fpga_desc
-module_param( fpga_descriptor, byte, 0 );
-
-#define FPGA_BUFFER_SIZE 4096
-static unsigned char g_buffer[FPGA_BUFFER_SIZE];
-static unsigned char g_nb_users = 0;
-
-
-void __exit armadeus_fpga_cleanup(void);
-
-
-//------------------------------------------------
-//
-// Handles write() done on /dev/fpgaxx
-//
-static ssize_t armadeus_fpga_write(struct file *file, const char* pData, size_t count, loff_t *f_pos)
-{
- ssize_t ret = 0;
-
- // Get exclusive access
- if (down_interruptible(&fpga_sema))
- return -ERESTARTSYS;
-
- if( count > FPGA_BUFFER_SIZE ) {
- count = FPGA_BUFFER_SIZE;
- }
-
- // Get value to write from user space
- ret = __copy_from_user( g_buffer, pData, count);
- if (ret != 0) {
- ret = -EFAULT;
- goto out;
- }
-
- ret = xilinx_load( g_current_desc, g_buffer, count );
-
-out:
- // Release exclusive access
- up(&fpga_sema);
-
- return( ret );
-}
-
-static int armadeus_fpga_open(struct inode *inode, struct file *file)
-{
- int ret;
-
- // Only one access at a time is permitted
- if( g_nb_users > 0 )
- return( -EBUSY );
-
- g_nb_users++;
- ret = xilinx_init_load( g_current_desc );
-
- PRINTF("Opening /dev/fpga/loader%d file, %d %d\n", MINOR(inode->i_rdev), fpga_descriptor, ret);
- return ret;
-}
-
-static int armadeus_fpga_release(struct inode *inode, struct file *file)
-{
- if( g_nb_users > 0 )
- g_nb_users--;
-
- PRINTF("Closing access to /dev/fpga/loader%d\n", MINOR(inode->i_rdev));
- return 0;
-}
-
-//------------------------------------------------
-// PROC file
-//
-static int procfile_fpga_read( char *buffer, __attribute__ ((unused)) char **start, off_t offset, int buffer_length, int *eof, __attribute__ ((unused)) void* data)
-{
- int ret;
-
- // We give all of our information in one go, so if the user asks us if we have more information the answer should always be no.
- // This is important because the standard read function from the library would continue to issue the read system call until
- // the kernel replies that it has no more information, or until its buffer is filled.
- if( offset > 0 ) {
- /* we have finished to read, return 0 */
- ret = 0;
- } else {
- if ( data == NULL ){
- ret = xilinx_get_descriptor_info( -1, buffer );
- }
- else {
- ret = xilinx_get_descriptor_info( *((unsigned char*)data), buffer );
- }
- }
-
- return ret;
-}
-
-
-static int procfile_fpga_write( __attribute__ ((unused)) struct file *file, const char *buf, unsigned long count, void *data)
-{
- return count;
-}
-
-//------------------------------------------------
-// Handling of IOCTL calls
-//
-int armadeus_fpga_ioctl( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg )
-{
- int err = 0; int ret = 0;
- unsigned int minor;
-
- PRINTF( DRIVER_NAME " ## IOCTL received: (0x%x) ##\n", cmd );
-
- // Extract the type and number bitfields, and don't decode wrong cmds: return ENOTTY (inappropriate ioctl) before access_ok()
- if (_IOC_TYPE(cmd) != FPGA_IOCTL) return -ENOTTY;
-
- // The direction is a bitmask, and VERIFY_WRITE catches R/W transfers. `Type' is user-oriented, while access_ok is kernel-oriented,
- // so the concept of "read" and "write" is reversed
- if (_IOC_DIR(cmd) & _IOC_READ)
- err = !access_ok(VERIFY_WRITE, (void *)arg, _IOC_SIZE(cmd));
- else if (_IOC_DIR(cmd) & _IOC_WRITE)
- err = !access_ok(VERIFY_READ, (void *)arg, _IOC_SIZE(cmd));
-
- if (err) return -EFAULT;
-
- // Obtain exclusive access
- if (down_interruptible(&fpga_sema))
- return -ERESTARTSYS;
- // Extract and test minor
- minor = MINOR(inode->i_rdev);
- if( minor > FPGA_MAX_MINOR ) {
- printk("Minor outside range: %d !\n", minor);
- return -EFAULT;
- }
-
- switch(cmd)
- {
- default:
- return -ENOTTY;
- break;
- }
- // Release exclusive access
- up(&fpga_sema);
-
- return ret;
-}
-
-//
-// Create /proc entries for direct access (with echo/cat) to GPIOs config
-//
-static int createProcEntries( void )
-{
- static struct proc_dir_entry *fpga_Proc_File;
-
- // Create main directory
- proc_mkdir(FPGA_PROC_DIRNAME, NULL);
- // Create proc file to handle GPIO values
- fpga_Proc_File = create_proc_entry( FPGA_PROC_FILENAME, S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH, NULL );
-
- if( fpga_Proc_File == NULL )
- {
- printk(FPGA_DRIVER_NAME ": Could not register a" FPGA_PROC_FILENAME ". Terminating\n");
- armadeus_fpga_cleanup();
- return -ENOMEM;
- }
- else
- {
- fpga_Proc_File->read_proc = procfile_fpga_read;
- fpga_Proc_File->write_proc = procfile_fpga_write;
- }
-
- return(0);
-}
-
-static struct file_operations fpga_fops = {
- .owner = THIS_MODULE,
- .write = armadeus_fpga_write,
-// .read = armadeus_fpga_read,
- .open = armadeus_fpga_open,
- .release = armadeus_fpga_release,
- .ioctl = armadeus_fpga_ioctl,
-};
-
-//
-// Module's initialization function
-//
-int __init armadeus_fpga_init(void)
-{
- static int result;
-
- // Register the driver by getting a major number
- result = register_chrdev(fpga_major, FPGA_DRIVER_NAME, &fpga_fops);
- if (result < 0)
- {
- printk(KERN_WARNING FPGA_DRIVER_NAME ": can't get major %d\n", fpga_major);
- return result;
- }
- if( fpga_major == 0 ) fpga_major = result; // dynamic Major allocation
-
- // Creating /proc entries
- result = createProcEntries();
- if( result < 0 ) return( result );
-
- // Initialise FPGA semaphore
- sema_init(&fpga_sema, 1);
-
- // initialize the current fpga descriptor with the one by default
- g_current_desc = xilinx_get_descriptor(fpga_descriptor);
- if( g_current_desc == NULL ){
- return -EINVAL;
- }
-
- printk(FPGA_DRIVER_NAME " module " FPGA_DRIVER_VERSION " successfully loaded !\n");
- return(0);
-}
-
-//
-// Module's cleanup function
-//
-void __exit armadeus_fpga_cleanup(void)
-{
- PRINTF("Removing " FPGA_DRIVER_NAME " module: ");
-
- // Remove /proc entries
- remove_proc_entry(FPGA_PROC_FILENAME, NULL);
- // De-register /dev interface
- unregister_chrdev(fpga_major, FPGA_DRIVER_NAME);
-
- PRINTF("Ok !\n ");
-}
-
-//------------------------------------------------
-
-module_init(armadeus_fpga_init);
-module_exit(armadeus_fpga_cleanup);
-
-MODULE_AUTHOR("JB / NC");
-MODULE_DESCRIPTION("Armadeus fpga's loading driver");
-MODULE_LICENSE("GPL");
+/*
+ ***********************************************************************
+ *
+ * (c) Copyright 2006 Armadeus project
+ * Julien Boibessot <jul...@ar...>
+ * Nicolas Colombain <nic...@ar...>
+ * Generic Xilinx FPGA loader
+ *
+ * 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 "fpga-loader.h"
+#include "xilinx-fpga-loader.h"
+#include <asm/arch/imx-regs.h>
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,20)
+#include <linux/config.h>
+#endif
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/fs.h>
+#include <linux/errno.h>
+#include <linux/types.h>
+#include <linux/proc_fs.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/fcntl.h>
+#include <asm/system.h>
+#include <asm/io.h>
+#include <asm/uaccess.h>
+
+//static unsigned long init_map;
+struct semaphore fpga_sema;
+
+/* global variables */
+static int fpga_major = FPGA_MAJOR;
+Xilinx_desc* g_current_desc = NULL;
+
+static unsigned char fpga_descriptor = 0; // use default target_fpga_desc
+module_param( fpga_descriptor, byte, 0 );
+
+#define FPGA_BUFFER_SIZE 4096
+static unsigned char g_buffer[FPGA_BUFFER_SIZE];
+static unsigned char g_nb_users = 0;
+
+
+void __exit armadeus_fpga_cleanup(void);
+
+
+//------------------------------------------------
+//
+// Handles write() done on /dev/fpgaxx
+//
+static ssize_t armadeus_fpga_write(struct file *file, const char* pData, size_t count, loff_t *f_pos)
+{
+ ssize_t ret = 0;
+
+ // Get exclusive access
+ if (down_interruptible(&fpga_sema))
+ return -ERESTARTSYS;
+
+ if( count > FPGA_BUFFER_SIZE ) {
+ count = FPGA_BUFFER_SIZE;
+ }
+
+ // Get value to write from user space
+ ret = __copy_from_user( g_buffer, pData, count);
+ if (ret != 0) {
+ ret = -EFAULT;
+ goto out;
+ }
+
+ ret = xilinx_load( g_current_desc, g_buffer, count );
+
+out:
+ // Release exclusive access
+ up(&fpga_sema);
+
+ return( ret );
+}
+
+static int armadeus_fpga_open(struct inode *inode, struct file *file)
+{
+ int ret;
+
+ // Only one access at a time is permitted
+ if( g_nb_users > 0 )
+ return( -EBUSY );
+
+ g_nb_users++;
+ ret = xilinx_init_load( g_current_desc );
+
+ PRINTF("Opening /dev/fpga/loader%d file, %d %d\n", MINOR(inode->i_rdev), fpga_descriptor, ret);
+ return ret;
+}
+
+static int armadeus_fpga_release(struct inode *inode, struct file *file)
+{
+ if( g_nb_users > 0 )
+ g_nb_users--;
+
+ PRINTF("Closing access to /dev/fpga/loader%d\n", MINOR(inode->i_rdev));
+ return 0;
+}
+
+//------------------------------------------------
+// PROC file
+//
+static int procfile_fpga_read( char *buffer, __attribute__ ((unused)) char **start, off_t offset, int buffer_length, int *eof, __attribute__ ((unused)) void* data)
+{
+ int ret;
+
+ // We give all of our information in one go, so if the user asks us if we have more information the answer should always be no.
+ // This is important because the standard read function from the library would continue to issue the read system call until
+ // the kernel replies that it has no more information, or until its buffer is filled.
+ if( offset > 0 ) {
+ /* we have finished to read, return 0 */
+ ret = 0;
+ } else {
+ if ( data == NULL ){
+ ret = xilinx_get_descriptor_info( -1, buffer );
+ }
+ else {
+ ret = xilinx_get_descriptor_info( *((unsigned char*)data), buffer );
+ }
+ }
+
+ return ret;
+}
+
+
+static int procfile_fpga_write( __attribute__ ((unused)) struct file *file, const char *buf, unsigned long count, void *data)
+{
+ return count;
+}
+
+//------------------------------------------------
+// Handling of IOCTL calls
+//
+int armadeus_fpga_ioctl( struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg )
+{
+ int err = 0; int ret = 0;
+ unsigned int minor;
+
+ PRINTF( DRIVER_NAME " ## IOCTL received: (0x%x) ##\n", cmd );
+
+ // Extract the type and number bitfields, and don't decode wrong cmds: return ENOTTY (inappropriate ioctl) before access_ok()
+ if (_IOC_TYPE(cmd) != FPGA_IOCTL) return -ENOTTY;
+
+ // The direction is a bitmask, and VERIFY_WRITE catches R/W transfers. `Type' is user-oriented, while access_ok is kernel-oriented,
+ // so the concept of "read" and "write" is reversed
+ if (_IOC_DIR(cmd) & _IOC_READ)
+ err = !access_ok(VERIFY_WRITE, (void *)arg, _IOC_SIZE(cmd));
+ else if (_IOC_DIR(cmd) & _IOC_WRITE)
+ err = !access_ok(VERIFY_READ, (void *)arg, _IOC_SIZE(cmd));
+
+ if (err) return -EFAULT;
+
+ // Obtain exclusive access
+ if (down_interruptible(&fpga_sema))
+ return -ERESTARTSYS;
+ // Extract and test minor
+ minor = MINOR(inode->i_rdev);
+ if( minor > FPGA_MAX_MINOR ) {
+ printk("Minor outside range: %d !\n", minor);
+ return -EFAULT;
+ }
+
+ switch(cmd)
+ {
+ default:
+ return -ENOTTY;
+ break;
+ }
+ // Release exclusive access
+ up(&fpga_sema);
+
+ return ret;
+}
+
+//
+// Create /proc entries for direct access (with echo/cat) to GPIOs config
+//
+static int createProcEntries( void )
+{
+ static struct proc_dir_entry *fpga_Proc_File;
+
+ // Create main directory
+ proc_mkdir(FPGA_PROC_DIRNAME, NULL);
+ // Create proc file to handle GPIO values
+ fpga_Proc_File = create_proc_entry( FPGA_PROC_FILENAME, S_IWUSR |S_IRUSR | S_IRGRP | S_IROTH, NULL );
+
+ if( fpga_Proc_File == NULL )
+ {
+ printk(FPGA_DRIVER_NAME ": Could not register a" FPGA_PROC_FILENAME ". Terminating\n");
+ armadeus_fpga_cleanup();
+ return -ENOMEM;
+ }
+ else
+ {
+ fpga_Proc_File->read_proc = procfile_fpga_read;
+ fpga_Proc_File->write_proc = procfile_fpga_write;
+ }
+
+ return(0);
+}
+
+static struct file_operations fpga_fops = {
+ .owner = THIS_MODULE,
+ .write = armadeus_fpga_write,
+// .read = armadeus_fpga_read,
+ .open = armadeus_fpga_open,
+ .release = armadeus_fpga_release,
+ .ioctl = armadeus_fpga_ioctl,
+};
+
+//
+// Module's initialization function
+//
+int __init armadeus_fpga_init(void)
+{
+ static int result;
+
+ // Register the driver by getting a major number
+ result = register_chrdev(fpga_major, FPGA_DRIVER_NAME, &fpga_fops);
+ if (result < 0)
+ {
+ printk(KERN_WARNING FPGA_DRIVER_NAME ": can't get major %d\n", fpga_major);
+ return result;
+ }
+ if( fpga_major == 0 ) fpga_major = result; // dynamic Major allocation
+
+ // Creating /proc entries
+ result = createProcEntries();
+ if( result < 0 ) return( result );
+
+ // Initialise FPGA semaphore
+ sema_init(&fpga_sema, 1);
+
+ // initialize the current fpga descriptor with the one by default
+ g_current_desc = xilinx_get_descriptor(fpga_descriptor);
+ if( g_current_desc == NULL ){
+ return -EINVAL;
+ }
+
+ printk(FPGA_DRIVER_NAME " module " FPGA_DRIVER_VERSION " successfully loaded !\n");
+ return(0);
+}
+
+//
+// Module's cleanup function
+//
+void __exit armadeus_fpga_cleanup(void)
+{
+ PRINTF("Removing " FPGA_DRIVER_NAME " module: ");
+
+ // Remove /proc entries
+ remove_proc_entry(FPGA_PROC_FILENAME, NULL);
+ // De-register /dev interface
+ unregister_chrdev(fpga_major, FPGA_DRIVER_NAME);
+
+ PRINTF("Ok !\n ");
+}
+
+//------------------------------------------------
+
+module_init(armadeus_fpga_init);
+module_exit(armadeus_fpga_cleanup);
+
+MODULE_AUTHOR("JB / NC");
+MODULE_DESCRIPTION("Armadeus fpga's loading driver");
+MODULE_LICENSE("GPL");
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.c
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.c 2008-12-04 07:26:29 UTC (rev 915)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.c 2008-12-04 09:40:44 UTC (rev 916)
@@ -15,102 +15,102 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**********************************************************************
- (c) Copyright 2006 Armadeus project
- Eric Jarrige <eri...@ar...>
- Nicolas Colombain <nic...@ar...>
- Target Xilinx FPGA support
+ (c) Copyright 2006 Armadeus project
+ Eric Jarrige <eri...@ar...>
+ Nicolas Colombain <nic...@ar...>
+ Target Xilinx FPGA support
*/
-
-#include "target-fpga-loader.h"
-#include "xilinx-fpga-loader.h"
-#include <asm/arch/hardware.h>
-#include <asm/io.h>
-
-#define GPIO_PORT(x) ((x >> 5) & 3)
-#define GPIO_SET(x) (DR(GPIO_PORT(x)) |= (1<<(x & GPIO_PIN_MASK)))
-#define GPIO_CLEAR(x) (DR(GPIO_PORT(x)) &= ~(1<<(x & GPIO_PIN_MASK)))
-#define GPIO_WRITE(x,y) ( y ? GPIO_SET(x) : GPIO_CLEAR(x) )
-#define GPIO_READ(x) ((SSR (GPIO_PORT(x)) & (1<<(x & GPIO_PIN_MASK))))
-
-/*
- * Set the FPGA's active-low program line to the specified level
- */
-int fpga_pgm_fn( int assert )
-{
- GPIO_WRITE( FPGA_PROGRAM, !assert);
- return assert;
-}
-
-/*
- * Set the FPGA's active-high clock line to the specified level
- */
-int fpga_clk_fn( int assert_clk )
-{
- GPIO_WRITE( FPGA_CLOCK, assert_clk);
- return assert_clk;
-}
-
-/*
- * Test the state of the active-low FPGA INIT line. Return 1 on INIT
- * asserted (low).
- */
-int fpga_init_fn( void )
-{
- return(!GPIO_READ(FPGA_INIT));
-}
-
-/*
- * Test the state of the active-high FPGA DONE pin
- */
-int fpga_done_fn( void )
-{
- return(GPIO_READ(FPGA_DONE));
-}
-
-/*
- * Set the FPGA's data line to the specified level
- */
-int fpga_wr_fn( int assert_write )
-{
- GPIO_WRITE( FPGA_DIN, assert_write);
- return assert_write;
-}
-
-int fpga_pre_fn( void )
-{
- // Initialize GPIO pins
- imx_gpio_mode (FPGA_INIT | GPIO_GIUS | GPIO_DR | GPIO_IN );
- imx_gpio_mode (FPGA_DONE | GPIO_GIUS | GPIO_DR | GPIO_IN );
- imx_gpio_mode (FPGA_DIN | GPIO_GIUS | GPIO_DR | GPIO_OUT );
- imx_gpio_mode (FPGA_PROGRAM | GPIO_GIUS | GPIO_DR | GPIO_OUT );
- imx_gpio_mode (FPGA_CLOCK | GPIO_GIUS | GPIO_DR | GPIO_OUT );
- return 1;
-}
-
-
-Xilinx_Spartan_Slave_Serial_fns fpga_fns = {
- fpga_pre_fn,
- fpga_pgm_fn,
- fpga_clk_fn,
- fpga_init_fn,
- fpga_done_fn,
- fpga_wr_fn,
-};
-
-Xilinx_desc target_fpga_desc[NB_TARGET_DESC] = {
-
- { // first supported configuration (default)
- Xilinx_Spartan,
- slave_serial,
- XILINX_XC3S200_SIZE,
- (void *) &fpga_fns
- },
-
- { // second one
- Xilinx_Spartan,
- slave_serial,
- XILINX_XC3S400_SIZE,
- (void *) &fpga_fns
- }
-};
+#include "target-fpga-loader.h"
+#include "xilinx-fpga-loader.h"
+#include <asm/arch/hardware.h>
+#include <asm/io.h>
+
+#define GPIO_PORT(x) ((x >> 5) & 3)
+#define GPIO_SET(x) (DR(GPIO_PORT(x)) |= (1<<(x & GPIO_PIN_MASK)))
+#define GPIO_CLEAR(x) (DR(GPIO_PORT(x)) &= ~(1<<(x & GPIO_PIN_MASK)))
+#define GPIO_WRITE(x,y) ( y ? GPIO_SET(x) : GPIO_CLEAR(x) )
+#define GPIO_READ(x) ((SSR (GPIO_PORT(x)) & (1<<(x & GPIO_PIN_MASK))))
+
+/*
+ * Set the FPGA's active-low program line to the specified level
+ */
+int fpga_pgm_fn( int assert )
+{
+ GPIO_WRITE( FPGA_PROGRAM, !assert);
+ return assert;
+}
+
+/*
+ * Set the FPGA's active-high clock line to the specified level
+ */
+int fpga_clk_fn( int assert_clk )
+{
+ GPIO_WRITE( FPGA_CLOCK, assert_clk);
+ return assert_clk;
+}
+
+/*
+ * Test the state of the active-low FPGA INIT line. Return 1 on INIT
+ * asserted (low).
+ */
+int fpga_init_fn( void )
+{
+ return(!GPIO_READ(FPGA_INIT));
+}
+
+/*
+ * Test the state of the active-high FPGA DONE pin
+ */
+int fpga_done_fn( void )
+{
+ return(GPIO_READ(FPGA_DONE));
+}
+
+/*
+ * Set the FPGA's data line to the specified level
+ */
+int fpga_wr_fn( int assert_write )
+{
+ GPIO_WRITE( FPGA_DIN, assert_write);
+ return assert_write;
+}
+
+int fpga_pre_fn( void )
+{
+ // Initialize GPIO pins
+ imx_gpio_mode (FPGA_INIT | GPIO_GIUS | GPIO_DR | GPIO_IN );
+ imx_gpio_mode (FPGA_DONE | GPIO_GIUS | GPIO_DR | GPIO_IN );
+ imx_gpio_mode (FPGA_DIN | GPIO_GIUS | GPIO_DR | GPIO_OUT );
+ imx_gpio_mode (FPGA_PROGRAM | GPIO_GIUS | GPIO_DR | GPIO_OUT );
+ imx_gpio_mode (FPGA_CLOCK | GPIO_GIUS | GPIO_DR | GPIO_OUT );
+ return 1;
+}
+
+
+Xilinx_Spartan_Slave_Serial_fns fpga_fns = {
+ fpga_pre_fn,
+ fpga_pgm_fn,
+ fpga_clk_fn,
+ fpga_init_fn,
+ fpga_done_fn,
+ fpga_wr_fn,
+};
+
+Xilinx_desc target_fpga_desc[NB_TARGET_DESC] = {
+
+ { // first supported configuration (default)
+ Xilinx_Spartan,
+ slave_serial,
+ XILINX_XC3S200_SIZE,
+ (void *) &fpga_fns
+ },
+
+ { // second one
+ Xilinx_Spartan,
+ slave_serial,
+ XILINX_XC3S400_SIZE,
+ (void *) &fpga_fns
+ }
+};
+
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.h
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.h 2008-12-04 07:26:29 UTC (rev 915)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/target-fpga-loader.h 2008-12-04 09:40:44 UTC (rev 916)
@@ -15,26 +15,26 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
**********************************************************************
- (c) Copyright 2006 Armadeus project
- Eric Jarrige <eri...@ar...>
- Nicolas Colombain <nic...@ar...>
- Target Xilinx FPGA support
+ (c) Copyright 2006 Armadeus project
+ Eric Jarrige <eri...@ar...>
+ Nicolas Colombain <nic...@ar...>
+ Target Xilinx FPGA support
*/
-#ifndef __TARGET_FPGA_LOADER_H__
-#define __TARGET_FPGA_LOADER_H__
-
-
-#include "xilinx-fpga-loader.h"
-#include <asm/arch/imx-regs.h>
-#include <asm/io.h>
-
-#define FPGA_INIT (GPIO_PORTB | 15) /* FPGA init pin (SSI input) */
-#define FPGA_DONE (GPIO_PORTB | 16) /* FPGA done pin (SSI input) */
-#define FPGA_DIN (GPIO_PORTB | 17) /* FPGA data pin (SSI output) */
-#define FPGA_PROGRAM (GPIO_PORTB | 18) /* FPGA prog pin (SSI output) */
-#define FPGA_CLOCK (GPIO_PORTB | 19) /* FPGA clk pin (SSI output) */
-
-#define NB_TARGET_DESC 2
-
-#endif // __TARGET_FPGA_LOADER_H__
+#ifndef __TARGET_FPGA_LOADER_H__
+#define __TARGET_FPGA_LOADER_H__
+
+
+#include "xilinx-fpga-loader.h"
+#include <asm/arch/imx-regs.h>
+#include <asm/io.h>
+
+#define FPGA_INIT (GPIO_PORTB | 15) /* FPGA init pin (SSI input) */
+#define FPGA_DONE (GPIO_PORTB | 16) /* FPGA done pin (SSI input) */
+#define FPGA_DIN (GPIO_PORTB | 17) /* FPGA data pin (SSI output) */
+#define FPGA_PROGRAM (GPIO_PORTB | 18) /* FPGA prog pin (SSI output) */
+#define FPGA_CLOCK (GPIO_PORTB | 19) /* FPGA clk pin (SSI output) */
+
+#define NB_TARGET_DESC 2
+
+#endif // __TARGET_FPGA_LOADER_H__
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.c
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.c 2008-12-04 07:26:29 UTC (rev 915)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.c 2008-12-04 09:40:44 UTC (rev 916)
@@ -1,277 +1,277 @@
-/*
- * (c) Copyright 2006 Armadeus project
- * Nicolas Colombain <nic...@ar...>
- * Xilinx FPGA support
- *
- * Based on the implementation(uBoot) of:
- * Rich Ireland, Enterasys Networks, rir...@en....
- * Keith Outwater, kei...@mv...
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
- */
-
-#include "xilinx-fpga-loader.h"
-#include "target-fpga-loader.h"
-#include <asm/arch/imx-regs.h>
-#include <asm/io.h>
-#include <linux/time.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-
-#define CONFIG_FPGA_DELAY()
-#define CFG_FPGA_WAIT 4000 // uS
-
-size_t bytecount = 0; // total bytes received
-extern Xilinx_desc target_fpga_desc[]; // target descriptor table
-
-/*
- * Timeout function
- */
-static unsigned long get_timer(unsigned long initTime)
-{
- struct timeval tv;
- do_gettimeofday(&tv);
- if( tv.tv_usec > initTime ) // avoid overflow pb
- return tv.tv_usec - initTime;
- else
- return initTime - tv.tv_usec;
-}
-
-/*
- * dump the given descriptor infos
- */
-static int xilinx_dump_descriptor_info( Xilinx_desc *desc, char* buffer )
-{
- int len;
- len = sprintf( buffer, "%s %s %u\n",
- (desc->family == Xilinx_Spartan) ? "spartan":"unknown",
- (desc->iface == slave_serial) ? "slave serial":"unknown",
- desc->size );
- return len;
-}
-
-/**
- * program the FPGA.
- * return 0 if success, >0 while programming, <0 if error detected
- */
-static size_t spartan_serial_load (Xilinx_desc *desc, const char* buf, size_t bsize)
-{
- Xilinx_Spartan_Slave_Serial_fns *fn = desc->iface_fns;
- if (fn) {
- unsigned long ts; /* timestamp */
-
- /* Load the data */
- if( bytecount<=desc->size ) {
- int i;
- unsigned char val;
- size_t nbbyte = 0; // init local counter
-
- while (nbbyte < bsize) {
-
- /* Xilinx detects an error if INIT goes low (active)
- while DONE is low (inactive) */
- if ((*fn->done)() == 0 && (*fn->init)()) {
- PRINTF ("** CRC error during FPGA load.\n");
- return -ETIMEDOUT;
- }
- val = buf[nbbyte ++];
- bytecount++;
- i = 8;
- do {
- /* Deassert the clock */
- (*fn->clk)(0);
- CONFIG_FPGA_DELAY ();
- /* Write data */
- (*fn->wr)(val & 0x80);
- CONFIG_FPGA_DELAY ();
- /* Assert the clock */
- (*fn->clk)(1);
- CONFIG_FPGA_DELAY ();
- val <<= 1;
- i --;
- } while (i > 0);
- }
- }
- if( bytecount>=desc->size )
- {
- CONFIG_FPGA_DELAY ();
-
- /* now check for done signal */
- ts = get_timer(0); /* get current time */
- (*fn->wr)(1);
-
- while (! (*fn->done)()) {
- CONFIG_FPGA_DELAY ();
- (*fn->clk)(0); /* Deassert the clock pin */
- CONFIG_FPGA_DELAY ();
- (*fn->clk)(1); /* Assert the clock pin */
-
- if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
- PRINTF ("** Timeout waiting for DONE.\n");
- return -ETIMEDOUT;
- }
- }
- }
- return bsize;
- }
- return -EINVAL;
-}
-
-/**
- * initialize the FPGA programming interface.
- * return 0 if success, <0 if error detected
- */
-static int spartan_serial_init (Xilinx_desc *desc)
-{
- Xilinx_Spartan_Slave_Serial_fns *fn = desc->iface_fns;
- if (fn) {
- unsigned long ts; /* timestamp */
-
- if(*fn->pre){
- (*fn->pre)(); //Run the pre configuration function if there is one.
- }
-
- /* Establish the initial state */
- (*fn->pgm)(1); /* Assert the program, commit */
-
- /* Wait for INIT state (init low) */
- ts = get_timer(0); /* get current time */
- do {
- CONFIG_FPGA_DELAY ();
- if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
- PRINTF ("** Timeout waiting for INIT to start.\n");
- return -ETIMEDOUT;
- }
- } while (!(*fn->init)());
-
- /* Get ready for the burn */
- CONFIG_FPGA_DELAY ();
- (*fn->pgm)(0); /* Deassert the program, commit */
-
- ts = get_timer(0); /* get current time */
- /* Now wait for INIT to go high */
- do {
- CONFIG_FPGA_DELAY ();
- if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
- PRINTF ("** Timeout waiting for INIT to clear.\n");
- return -ETIMEDOUT;
- }
- } while ((*fn->init)());
-
- bytecount = 0; // reset byte count
- return 0; // success
- }
- return -EINVAL;
-}
-
-/**
- * program the FPGA.
- * return 0 if success, >0 while programming, <0 if error detected
- */
-size_t xilinx_load( Xilinx_desc *desc, const char *buf, size_t bsize )
-{
- int ret = 0;
-
- if( desc ) {
- switch( desc->family ) // check family
- {
- case Xilinx_Spartan:
- {
- switch( desc->iface ) // check donwload hardware interface
- {
- case slave_serial: ret = spartan_serial_load( desc, buf, bsize ); break;
- default: PRINTF("interface not supported!\n"); ret = -ENOSYS; break;
- }
- }
- break;
- default: PRINTF("family not supported!\n"); ret = -ENOSYS; break;
- }
- }
- else {
- PRINTF("invalid FPGA descriptor!\n");
- ret = -EINVAL;
- }
- return ret;
-}
-
-/**
- * initialize the FPGA programming interface.
- * return 0 if success, <0 if error detected
- */
-int xilinx_init_load( Xilinx_desc *desc )
-{
- int ret = 0;
-
- if( desc ) {
- switch( desc->family ) // check family
- {
- case Xilinx_Spartan:
- {
- switch( desc->iface ) // check donwload hardware interface
- {
- case slave_serial: ret = spartan_serial_init( desc ); break;
- default: PRINTF("interface not supported!\n"); ret = -ENOSYS; break;
- }
- }
- break;
- default: PRINTF("family not supported!\n"); ret = -ENOSYS; break;
- }
- }
- else {
- PRINTF("invalid FPGA descriptor!\n");
- ret = -EINVAL;
- }
- return ret;
-}
-
-/**
- * get the descriptor corresponding to desc_id
- * return NULL if error
- */
-Xilinx_desc * xilinx_get_descriptor( unsigned char desc_id )
-{
- if( desc_id < NB_TARGET_DESC ){
- return &(target_fpga_desc[desc_id]);
- }
- return NULL;
-}
-
-/**
- * get the descriptor infos
- */
-int xilinx_get_descriptor_info( int desc_id, char* buffer )
-{
- int len = 0;
-
- if( desc_id >= 0 ) {
- len = xilinx_dump_descriptor_info( &target_fpga_desc[desc_id], buffer );
- }
- else { // all desc requested
- unsigned char i;
- for( i=0; i<NB_TARGET_DESC; i++ ) {
- len += xilinx_dump_descriptor_info( &target_fpga_desc[i], buffer+len );
- }
- }
-
- return len;
-}
-
-
+/*
+ * (c) Copyright 2006 Armadeus project
+ * Nicolas Colombain <nic...@ar...>
+ * Xilinx FPGA support
+ *
+ * Based on the implementation(uBoot) of:
+ * Rich Ireland, Enterasys Networks, rir...@en....
+ * Keith Outwater, kei...@mv...
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
+ */
+#include "xilinx-fpga-loader.h"
+#include "target-fpga-loader.h"
+#include <asm/arch/imx-regs.h>
+#include <asm/io.h>
+#include <linux/time.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+
+#define CONFIG_FPGA_DELAY()
+#define CFG_FPGA_WAIT 4000 // uS
+
+size_t bytecount = 0; // total bytes received
+extern Xilinx_desc target_fpga_desc[]; // target descriptor table
+
+/*
+ * Timeout function
+ */
+static unsigned long get_timer(unsigned long initTime)
+{
+ struct timeval tv;
+ do_gettimeofday(&tv);
+ if( tv.tv_usec > initTime ) // avoid overflow pb
+ return tv.tv_usec - initTime;
+ else
+ return initTime - tv.tv_usec;
+}
+
+/*
+ * dump the given descriptor infos
+ */
+static int xilinx_dump_descriptor_info( Xilinx_desc *desc, char* buffer )
+{
+ int len;
+ len = sprintf( buffer, "%s %s %u\n",
+ (desc->family == Xilinx_Spartan) ? "spartan":"unknown",
+ (desc->iface == slave_serial) ? "slave serial":"unknown",
+ desc->size );
+ return len;
+}
+
+/**
+ * program the FPGA.
+ * return 0 if success, >0 while programming, <0 if error detected
+ */
+static size_t spartan_serial_load (Xilinx_desc *desc, const char* buf, size_t bsize)
+{
+ Xilinx_Spartan_Slave_Serial_fns *fn = desc->iface_fns;
+ if (fn) {
+ unsigned long ts; /* timestamp */
+
+ /* Load the data */
+ if( bytecount<=desc->size ) {
+ int i;
+ unsigned char val;
+ size_t nbbyte = 0; // init local counter
+
+ while (nbbyte < bsize) {
+
+ /* Xilinx detects an error if INIT goes low (active)
+ while DONE is low (inactive) */
+ if ((*fn->done)() == 0 && (*fn->init)()) {
+ PRINTF ("** CRC error during FPGA load.\n");
+ return -ETIMEDOUT;
+ }
+ val = buf[nbbyte ++];
+ bytecount++;
+ i = 8;
+ do {
+ /* Deassert the clock */
+ (*fn->clk)(0);
+ CONFIG_FPGA_DELAY ();
+ /* Write data */
+ (*fn->wr)(val & 0x80);
+ CONFIG_FPGA_DELAY ();
+ /* Assert the clock */
+ (*fn->clk)(1);
+ CONFIG_FPGA_DELAY ();
+ val <<= 1;
+ i --;
+ } while (i > 0);
+ }
+ }
+ if( bytecount>=desc->size )
+ {
+ CONFIG_FPGA_DELAY ();
+
+ /* now check for done signal */
+ ts = get_timer(0); /* get current time */
+ (*fn->wr)(1);
+
+ while (! (*fn->done)()) {
+ CONFIG_FPGA_DELAY ();
+ (*fn->clk)(0); /* Deassert the clock pin */
+ CONFIG_FPGA_DELAY ();
+ (*fn->clk)(1); /* Assert the clock pin */
+
+ if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
+ PRINTF ("** Timeout waiting for DONE.\n");
+ return -ETIMEDOUT;
+ }
+ }
+ }
+ return bsize;
+ }
+ return -EINVAL;
+}
+
+/**
+ * initialize the FPGA programming interface.
+ * return 0 if success, <0 if error detected
+ */
+static int spartan_serial_init (Xilinx_desc *desc)
+{
+ Xilinx_Spartan_Slave_Serial_fns *fn = desc->iface_fns;
+ if (fn) {
+ unsigned long ts; /* timestamp */
+
+ if(*fn->pre){
+ (*fn->pre)(); //Run the pre configuration function if there is one.
+ }
+
+ /* Establish the initial state */
+ (*fn->pgm)(1); /* Assert the program, commit */
+
+ /* Wait for INIT state (init low) */
+ ts = get_timer(0); /* get current time */
+ do {
+ CONFIG_FPGA_DELAY ();
+ if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
+ PRINTF ("** Timeout waiting for INIT to start.\n");
+ return -ETIMEDOUT;
+ }
+ } while (!(*fn->init)());
+
+ /* Get ready for the burn */
+ CONFIG_FPGA_DELAY ();
+ (*fn->pgm)(0); /* Deassert the program, commit */
+
+ ts = get_timer(0); /* get current time */
+ /* Now wait for INIT to go high */
+ do {
+ CONFIG_FPGA_DELAY ();
+ if (get_timer (ts) > CFG_FPGA_WAIT) { /* check the time */
+ PRINTF ("** Timeout waiting for INIT to clear.\n");
+ return -ETIMEDOUT;
+ }
+ } while ((*fn->init)());
+
+ bytecount = 0; // reset byte count
+ return 0; // success
+ }
+ return -EINVAL;
+}
+
+/**
+ * program the FPGA.
+ * return 0 if success, >0 while programming, <0 if error detected
+ */
+size_t xilinx_load( Xilinx_desc *desc, const char *buf, size_t bsize )
+{
+ int ret = 0;
+
+ if( desc ) {
+ switch( desc->family ) // check family
+ {
+ case Xilinx_Spartan:
+ {
+ switch( desc->iface ) // check donwload hardware interface
+ {
+ case slave_serial: ret = spartan_serial_load( desc, buf, bsize ); break;
+ default: PRINTF("interface not supported!\n"); ret = -ENOSYS; break;
+ }
+ }
+ break;
+ default: PRINTF("family not supported!\n"); ret = -ENOSYS; break;
+ }
+ }
+ else {
+ PRINTF("invalid FPGA descriptor!\n");
+ ret = -EINVAL;
+ }
+ return ret;
+}
+
+/**
+ * initialize the FPGA programming interface.
+ * return 0 if success, <0 if error detected
+ */
+int xilinx_init_load( Xilinx_desc *desc )
+{
+ int ret = 0;
+
+ if( desc ) {
+ switch( desc->family ) // check family
+ {
+ case Xilinx_Spartan:
+ {
+ switch( desc->iface ) // check donwload hardware interface
+ {
+ case slave_serial: ret = spartan_serial_init( desc ); break;
+ default: PRINTF("interface not supported!\n"); ret = -ENOSYS; break;
+ }
+ }
+ break;
+ default: PRINTF("family not supported!\n"); ret = -ENOSYS; break;
+ }
+ }
+ else {
+ PRINTF("invalid FPGA descriptor!\n");
+ ret = -EINVAL;
+ }
+ return ret;
+}
+
+/**
+ * get the descriptor corresponding to desc_id
+ * return NULL if error
+ */
+Xilinx_desc * xilinx_get_descriptor( unsigned char desc_id )
+{
+ if( desc_id < NB_TARGET_DESC ){
+ return &(target_fpga_desc[desc_id]);
+ }
+ return NULL;
+}
+
+/**
+ * get the descriptor infos
+ */
+int xilinx_get_descriptor_info( int desc_id, char* buffer )
+{
+ int len = 0;
+
+ if( desc_id >= 0 ) {
+ len = xilinx_dump_descriptor_info( &target_fpga_desc[desc_id], buffer );
+ }
+ else { // all desc requested
+ unsigned char i;
+ for( i=0; i<NB_TARGET_DESC; i++ ) {
+ len += xilinx_dump_descriptor_info( &target_fpga_desc[i], buffer+len );
+ }
+ }
+
+ return len;
+}
+
+
+
Modified: trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.h
===================================================================
--- trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.h 2008-12-04 07:26:29 UTC (rev 915)
+++ trunk/target/linux/modules/fpga/dev_tools/fpga_devtools/xilinx-fpga-loader.h 2008-12-04 09:40:44 UTC (rev 916)
@@ -1,117 +1,117 @@
-/*
- * (c) Copyright 2006 Armadeus project
- * Nicolas Colombain <nic...@ar...>
- * Xilinx FPGA support
- *
- * Based on the implementation(uBoot) of:
- * Rich Ireland, Enterasys Networks, rir...@en....
- * Keith Outwater, kei...@mv...
- *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
- *
+/*
+ * (c) Copyright 2006 Armadeus project
+ * Nicolas Colombain <nic...@ar...>
+ * Xilinx FPGA support
+ *
+ * Based on the implementation(uBoot) of:
+ * Rich Ireland, Enterasys Networks, rir...@en....
+ * Keith Outwater, kei...@mv...
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * 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.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ *
*/
#ifndef __XILINX_FPGA_H__
#define __XILINX_FPGA_H__
-
-#include <linux/types.h>
-
-//#define FPGA_DEBUG
-#undef FPGA_DEBUG
-
-#ifdef FPGA_DEBUG
-#define PRINTF(fmt,args...) printk (fmt ,##args)
-#else
-#define PRINTF(fmt,args...)
-#endif
-
-
-
-/* Spartan-III */
-#define XILINX_XC3S50_SIZE 439264/8
-#define XILINX_XC3S200_SIZE 1047616/8
-#define XILINX_XC3S400_SIZE 1699136/8
-#define XILINX_XC3S1000_SIZE 3223488/8
-#define XILINX_XC3S1500_SIZE 5214784/8
-#define XILINX_XC3S2000_SIZE 7673024/8
-#define XILINX_XC3S4000_SIZE 11316864/8
-#define XILINX_XC3S5000_SIZE 13271936/8
-
-
-typedef enum { /* typedef Xilinx_iface */
- min_xilinx_iface_type, /* low range check value */
- slave_serial, /* serial data and external clock */
- max_xilinx_iface_type /* insert all new types before this */
-} Xilinx_iface; /* end, typedef Xilinx_iface */
-
-typedef enum { /* typedef Xilinx_Family */
- min_xilinx_type, /* low range check value */
- Xilinx_Spartan, /* Spartan-II Family */
- max_xilinx_type /* insert all new types before this */
-} Xilinx_Family; /* end, typedef Xilinx_Family */
-
-typedef struct { /* typedef Xilinx_desc */
- Xilinx_Family family; /* part type */
- Xilinx_iface iface; /* interface type */
- size_t size; /* bytes of data part can accept */
- void * iface_fns; /* interface function table */
-} Xilinx_desc; /* end, typedef Xilinx_desc */
-
-
-/** pointer to target specific low level function */
-typedef int (*Xilinx_pgm_fn)( int assert_pgm );
-typedef int (*Xilinx_init_fn)(void);
-typedef int (*Xilinx_done_fn)(void);
-typedef int (*Xilinx_clk_fn)( int assert_clk );
-typedef int (*Xilinx_wr_fn)( int assert_write );
-typedef int (*Xilinx_pre_fn)(void);
-
-/** struct of target specific low level functions */
-typedef struct {
- Xilinx_pre_fn pre;
- Xilinx_pgm_fn pgm;
- Xilinx_clk_fn clk;
- Xilinx_init_fn init;
- Xilinx_done_fn done;
- Xilinx_wr_fn wr;
-} Xilinx_Spartan_Slave_Serial_fns;
-
-/**
- * program the FPGA.
- * return 0 if success, >0 while programming, <0 if error detected
- */
-size_t xilinx_load( Xilinx_desc *desc, const char *buf, size_t bsize );
-
-/**
- * initialize the FPGA programming interface.
- * return 0 if success, <0 if error detected
- */
-int xilinx_init_load( Xilinx_desc *desc );
-
-/**
- * get the descriptor infos, return the number of char placed in the buffer
- */
-int xilinx_get_descriptor_info( int desc_id, char* buffer);
-
-/**
- * get the descriptor corresponding to desc_id
- * return NULL if error
- */
-Xilinx_desc * xilinx_get_descriptor( unsigned char desc_id );
-
+
+#include <linux/types.h>
+
+//#define FPGA_DEBUG
+#undef FPGA_DEBUG
+
+#ifdef FPGA_DEBUG
+#define PRINTF(fmt,args...) printk (fmt ,##args)
+#else
+#define PRINTF(fmt,args...)
+#endif
+
+
+
+/* Spartan-III */
+#define XILINX_XC3S50_SIZE 439264/8
+#define XILINX_XC3S200_SIZE 1047616/8
+#define XILINX_XC3S400_SIZE 1699136/8
+#define XILINX_XC3S1000_SIZE 3223488/8
+#define XILINX_XC3S1500_SIZE 5214784/8
+#define XILINX_XC3S2000_SIZE 7673024/8
+#define XILINX_XC3S4000_SIZE 11316864/8
+#define XILINX_XC3S5000_SIZE 13271936/8
+
+
+typedef enum { /* typedef Xilinx_iface */
+ min_xilinx_iface_type, /* low range check value */
+ slave_serial, /* serial data and external clock */
+ max_xilinx_iface_type /* insert all new types before this */
+} Xilinx_iface; /* end, typedef Xilinx_iface */
+
+typedef enum { /* typedef Xilinx_Family */
+ min_xilinx_type, /* low range check value */
+ Xilinx_Spartan, /* Spartan-II Family */
+ max_xilinx_type /* insert all new types before this */
+} Xilinx_Family; /* end, typedef Xilinx_Family */
+
+typedef struct { /* typedef Xilinx_desc */
+ Xilinx_Family family; /* part type */
+ Xilinx_iface iface; /* interface type */
+ size_t size; /* bytes of data part can accept */
+ void * iface_fns; /* interface function table */
+} Xilinx_desc; /* end, typedef Xilinx_desc */
+
+
+/** pointer to target specific low level function */
+typedef int (*Xilinx_pgm_fn)( int assert_pgm );
+typedef int (*Xilinx_init_fn)(void);
+typedef int (*Xilinx_done_fn)(void);
+typedef int (*Xilinx_clk_fn)( int assert_clk );
+typedef int (*Xilinx_wr_fn)( int assert_write );
+typedef int (*Xilinx_pre_fn)(void);
+
+/** struct of target specific low level functions */
+typedef struct {
+ Xilinx_pre_fn pre;
+ Xilinx_pgm_fn pgm;
+ Xilinx_clk_fn clk;
+ Xilinx_init_fn init;
+ Xilinx_done_fn done;
+ Xilinx_wr_fn wr;
+} Xilinx_Spartan_Slave_Serial_fns;
+
+/**
+ * program the FPGA.
+ * return 0 if success, >0 while programming, <0 if error detected
+ */
+size_t xilinx_load( Xilinx_desc *desc, const char *buf, size_t bsize );
+
+/**
+ * initialize the FPGA programming interface.
+ * return 0 if success, <0 if error detected
+ */
+int xilinx_init_load( Xilinx_desc *desc );
+
+/**
+ * get the descriptor infos, return the number of char placed in the buffer
+ */
+int xilinx_get_descriptor_info( int desc_id, char* buffer);
+
+/**
+ * get the descriptor corresponding to desc_id
+ * return NULL if error
+ */
+Xilinx_desc * xilinx_get_descriptor( unsigned char desc_id );
+
#endif // __XILINX_FPGA_H__
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-12-04 07:26:34
|
Revision: 915
http://armadeus.svn.sourceforge.net/armadeus/?rev=915&view=rev
Author: artemys
Date: 2008-12-04 07:26:29 +0000 (Thu, 04 Dec 2008)
Log Message:
-----------
[MERGE] Commit to prepare following merge (structural needs)
Added Paths:
-----------
trunk/buildroot/package/pyserial/
trunk/buildroot/package/pyserial/Config.in
trunk/buildroot/package/pyserial/pyserial.mk
trunk/buildroot/target/device/armadeus/apf27/
trunk/buildroot/target/device/armadeus/apf27/apf27.h
trunk/buildroot/target/device/armadeus/apf9328/apf9328-linux-2.6.27.2.config
trunk/buildroot/target/device/armadeus/apf9328/apf9328.h
trunk/buildroot/target/device/armadeus/apf9328/uClibc.config.arm
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.27.2/
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S00machine_name
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/mdev.conf
trunk/buildroot/target/u-boot/
trunk/buildroot/target/u-boot/u-boot-1.3.4-100-imx.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-110-apf9328.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-111-apf9328-DM9000.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-112-apf9328-makefile.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-120-apf9328-tools.patch
trunk/buildroot/target/u-boot/u-boot-1.3.4-130-apf9328-example.patch
trunk/patches/040-buildroot-linux-makefile.diff
trunk/patches/041-buildroot-lockfile-progs.diff
trunk/patches/046-buildroot-prboom-install_it_only_once.diff
trunk/patches/047-buildroot-uclibc-config.diff
trunk/patches/050-buildroot-linux-stops_building_when_modules_compilation_fails.diff
trunk/patches/051-buildroot-u-boot.diff
trunk/patches/052-buildroot-linux-adds_linux26-patched_target_to_Makefile.diff
trunk/patches/054-buildroot-ntp-allow_ntpd_selection_or_not.diff
trunk/patches/055-buildroot-pyserial.diff
trunk/patches/056-buildroot-makedevs.diff
trunk/software/uboot_recover/apf9328-u-boot.bin
trunk/software/uboot_recover/apf9328_recover.py
trunk/target/linux/arch/arm/mach-mx2/
trunk/target/linux/drivers/spi/
trunk/target/linux/include/linux/
trunk/target/linux/include/linux/spi/
trunk/target/linux/modules/max1027/
Removed Paths:
-------------
trunk/buildroot/package/lua/
trunk/buildroot/package/prboom/
trunk/buildroot/package/sdl/sdl_image.mk
trunk/buildroot/package/sdl/sdl_mixer.mk
trunk/buildroot/package/sdl/sdl_net.mk
trunk/buildroot/package/sdl/sdl_ttf.mk
trunk/buildroot/target/device/armadeus/apm9328/
trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S22i2c
trunk/buildroot/target/device/armadeus/uClibc.config.arm
trunk/software/uboot_recover/u-boot.bin
trunk/software/uboot_recover/uboot_recover.py
trunk/target/linux/modules/fast_max1027/
Deleted: trunk/buildroot/package/sdl/sdl_image.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_image.mk 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/buildroot/package/sdl/sdl_image.mk 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,74 +0,0 @@
-#############################################################
-#
-# SDL_image addon for SDL
-#
-#############################################################
-SDL_IMAGE_VERSION:=1.2.6
-SDL_IMAGE_SOURCE:=SDL_image-$(SDL_IMAGE_VERSION).tar.gz
-SDL_IMAGE_SITE:=http://www.libsdl.org/projects/SDL_image/release
-SDL_IMAGE_CAT:=$(ZCAT)
-SDL_IMAGE_DIR:=$(BUILD_DIR)/SDL_image-$(SDL_IMAGE_VERSION)
-
-$(DL_DIR)/$(SDL_IMAGE_SOURCE):
- $(WGET) -P $(DL_DIR) $(SDL_IMAGE_SITE)/$(SDL_IMAGE_SOURCE)
-
-sdl_image-source: $(DL_DIR)/$(SDL_IMAGE_SOURCE)
-
-$(SDL_IMAGE_DIR)/.unpacked: $(DL_DIR)/$(SDL_IMAGE_SOURCE)
- $(SDL_IMAGE_CAT) $(DL_DIR)/$(SDL_IMAGE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(CONFIG_UPDATE) $(SDL_IMAGE_DIR)
- touch $@
-
-$(SDL_IMAGE_DIR)/.configured: $(SDL_IMAGE_DIR)/.unpacked
- (cd $(SDL_IMAGE_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=$(STAGING_DIR)/usr \
- --with-sdl-prefix=$(STAGING_DIR)/usr \
- --with-sdl-exec-prefix=$(STAGING_DIR)/usr \
- --disable-sdltest \
- --disable-static \
- --enable-png \
- --enable-bmp \
- --disable-gif \
- --disable-jpg \
- --disable-lbm \
- --disable-pcx \
- --disable-pnm \
- --disable-tif \
- --disable-tga );
- touch $@
-
-$(SDL_IMAGE_DIR)/.compiled: $(SDL_IMAGE_DIR)/.configured
- $(MAKE) LDFLAGS=$(STAGING_DIR)/lib/libpng12.so -C $(SDL_IMAGE_DIR)
- touch $@
-
-$(STAGING_DIR)/usr/lib/libSDL_image.so: $(SDL_IMAGE_DIR)/.compiled
- $(MAKE) -C $(SDL_IMAGE_DIR) install
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libSDL_image.so: $(STAGING_DIR)/usr/lib/libSDL_image.so
- cp -dpf $(STAGING_DIR)/usr/lib/libSDL_image*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_image.so
-
-SDL_IMAGE sdl_image: uclibc sdl libpng $(TARGET_DIR)/usr/lib/libSDL_image.so
-
-sdl_image-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SDL_IMAGE_DIR) uninstall
- -$(MAKE) -C $(SDL_IMAGE_DIR) clean
-
-sdl_image-dirclean:
- rm -rf $(SDL_IMAGE_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_SDL_IMAGE)),y)
-TARGETS+=sdl_image
-endif
Deleted: trunk/buildroot/package/sdl/sdl_mixer.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_mixer.mk 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/buildroot/package/sdl/sdl_mixer.mk 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,66 +0,0 @@
-#############################################################
-#
-# SDL_mixer: sound addon for SDL
-#
-#############################################################
-SDL_MIXER_VERSION:=1.2.7
-SDL_MIXER_SOURCE:=SDL_mixer-$(SDL_MIXER_VERSION).tar.gz
-SDL_MIXER_SITE:=http://www.libsdl.org/projects/SDL_mixer/release
-SDL_MIXER_CAT:=zcat
-SDL_MIXER_DIR:=$(BUILD_DIR)/SDL_mixer-$(SDL_MIXER_VERSION)
-
-$(DL_DIR)/$(SDL_MIXER_SOURCE):
- $(WGET) -P $(DL_DIR) $(SDL_MIXER_SITE)/$(SDL_MIXER_SOURCE)
-
-sdl_image-source: $(DL_DIR)/$(SDL_MIXER_SOURCE)
-
-$(SDL_MIXER_DIR)/.unpacked: $(DL_DIR)/$(SDL_MIXER_SOURCE)
- $(SDL_MIXER_CAT) $(DL_DIR)/$(SDL_MIXER_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $@
-
-$(SDL_MIXER_DIR)/.configured: $(SDL_MIXER_DIR)/.unpacked
- (cd $(SDL_MIXER_DIR); \
- $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS) " \
- LDFLAGS="-Wl,-rpath=$(STAGING_DIR)/lib/" \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=$(STAGING_DIR)/usr \
- --with-sdl-prefix=$(STAGING_DIR)/usr \
- --with-sdl-exec-prefix=$(STAGING_DIR)/usr \
- --disable-sdltest \
- --disable-static \
- );
- touch $@
-
-$(SDL_MIXER_DIR)/.compiled: $(SDL_MIXER_DIR)/.configured
- $(MAKE) -C $(SDL_MIXER_DIR)
- touch $@
-
-$(STAGING_DIR)/usr/lib/libSDL_mixer.so: $(SDL_MIXER_DIR)/.compiled
- $(MAKE) -C $(SDL_MIXER_DIR) install
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libSDL_mixer.so: $(STAGING_DIR)/usr/lib/libSDL_mixer.so
- cp -dpf $(STAGING_DIR)/usr/lib/libSDL_mixer*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_mixer.so
-
-SDL_MIXER sdl_mixer: sdl $(TARGET_DIR)/usr/lib/libSDL_mixer.so
-
-sdl_mixer-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SDL_MIXER_DIR) uninstall
- -$(MAKE) -C $(SDL_MIXER_DIR) clean
-
-sdl_mixer-dirclean:
- rm -rf $(SDL_MIXER_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_SDL_MIXER)),y)
-TARGETS+=sdl_mixer
-endif
Deleted: trunk/buildroot/package/sdl/sdl_net.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_net.mk 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/buildroot/package/sdl/sdl_net.mk 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,66 +0,0 @@
-#############################################################
-#
-# SDL_net: network addon for SDL
-#
-#############################################################
-SDL_NET_VERSION:=1.2.6
-SDL_NET_SOURCE:=SDL_net-$(SDL_NET_VERSION).tar.gz
-SDL_NET_SITE:=http://www.libsdl.org/projects/SDL_net/release
-SDL_NET_CAT:=$(ZCAT)
-SDL_NET_DIR:=$(BUILD_DIR)/SDL_net-$(SDL_NET_VERSION)
-
-$(DL_DIR)/$(SDL_NET_SOURCE):
- $(WGET) -P $(DL_DIR) $(SDL_NET_SITE)/$(SDL_NET_SOURCE)
-
-sdl_net-source: $(DL_DIR)/$(SDL_NET_SOURCE)
-
-$(SDL_NET_DIR)/.unpacked: $(DL_DIR)/$(SDL_NET_SOURCE)
- $(SDL_NET_CAT) $(DL_DIR)/$(SDL_NET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- $(CONFIG_UPDATE) $(SDL_NET_DIR)
- touch $@
-
-$(SDL_NET_DIR)/.configured: $(SDL_NET_DIR)/.unpacked
- (cd $(SDL_NET_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=$(STAGING_DIR)/usr \
- --with-sdl-prefix=$(STAGING_DIR)/usr \
- --with-sdl-exec-prefix=$(STAGING_DIR)/usr \
- --disable-sdltest \
- --disable-static \
- );
- touch $@
-
-$(SDL_NET_DIR)/.compiled: $(SDL_NET_DIR)/.configured
- $(MAKE) -C $(SDL_NET_DIR)
- touch $@
-
-$(STAGING_DIR)/usr/lib/libSDL_net.so: $(SDL_NET_DIR)/.compiled
- $(MAKE) -C $(SDL_NET_DIR) install
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libSDL_net.so: $(STAGING_DIR)/usr/lib/libSDL_net.so
- cp -dpf $(STAGING_DIR)/usr/lib/libSDL_net*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_net.so
-
-SDL_NET sdl_net: sdl $(TARGET_DIR)/usr/lib/libSDL_net.so
-
-sdl_net-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SDL_NET_DIR) uninstall
- -$(MAKE) -C $(SDL_NET_DIR) clean
-
-sdl_net-dirclean:
- rm -rf $(SDL_NET_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_SDL_NET)),y)
-TARGETS+=sdl_net
-endif
Deleted: trunk/buildroot/package/sdl/sdl_ttf.mk
===================================================================
--- trunk/buildroot/package/sdl/sdl_ttf.mk 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/buildroot/package/sdl/sdl_ttf.mk 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,71 +0,0 @@
-#############################################################
-#
-# SDL-TTF
-#
-# TODO: add OpenGL dependancy ??
-#############################################################
-SDL-TTF_VERSION:=2.0.8
-SDL-TTF_SOURCE:=SDL_ttf-$(SDL-TTF_VERSION).tar.gz
-SDL-TTF_SITE:=http://www.libsdl.org/projects/SDL_ttf/release
-SDL-TTF_CAT:=zcat
-SDL-TTF_DIR:=$(BUILD_DIR)/SDL_ttf-$(SDL-TTF_VERSION)
-
-$(DL_DIR)/$(SDL-TTF_SOURCE):
- $(WGET) -P $(DL_DIR) $(SDL-TTF_SITE)/$(SDL-TTF_SOURCE)
-
-sdl_ttf-source: $(DL_DIR)/$(SDL-TTF_SOURCE)
-
-$(SDL-TTF_DIR)/.unpacked: $(DL_DIR)/$(SDL-TTF_SOURCE)
- $(SDL-TTF_CAT) $(DL_DIR)/$(SDL-TTF_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- toolchain/patch-kernel.sh $(SDL-TTF_DIR) package/sdl sdl_ttf-$(SDL-TTF_VERSION)\*.patch
- touch $@
-
-$(SDL-TTF_DIR)/.configured: $(SDL-TTF_DIR)/.unpacked
- (cd $(SDL-TTF_DIR); \
- $(TARGET_CONFIGURE_OPTS) \
- CFLAGS="$(TARGET_CFLAGS) " \
- ./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=$(STAGING_DIR)/usr \
- --with-sdl-prefix=$(STAGING_DIR)/usr \
- --with-sdl-exec-prefix=$(STAGING_DIR)/usr \
- --with-freetype-prefix=$(STAGING_DIR)/usr \
- --with-freetype-exec-prefix=$(STAGING_DIR)/usr \
- --disable-sdltest \
- --without-x \
- --disable-opengl \
- --disable-static );
- touch $@
-
-$(SDL-TTF_DIR)/.compiled: $(SDL-TTF_DIR)/.configured
- $(MAKE) -C $(SDL-TTF_DIR)
- touch $@
-
-$(STAGING_DIR)/usr/lib/libSDL_ttf.so: $(SDL-TTF_DIR)/.compiled
- $(MAKE) -C $(SDL-TTF_DIR) install
- touch -c $(STAGING_DIR)/usr/lib/libSDL_ttf.so
-
-$(TARGET_DIR)/usr/lib/libSDL_ttf.so: $(STAGING_DIR)/usr/lib/libSDL_ttf.so
- cp -dpf $(STAGING_DIR)/usr/lib/libSDL_ttf*.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) --strip-unneeded $(TARGET_DIR)/usr/lib/libSDL_ttf.so
-
-SDL_TTF sdl_ttf: uclibc sdl freetype $(TARGET_DIR)/usr/lib/libSDL_ttf.so
-
-sdl_ttf-clean:
- $(MAKE) DESTDIR=$(TARGET_DIR) CC=$(TARGET_CC) -C $(SDL-TTF_DIR) uninstall
- -$(MAKE) -C $(SDL-TTF_DIR) clean
-
-sdl_ttf-dirclean:
- rm -rf $(SDL-TTF_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(strip $(BR2_PACKAGE_SDL_TTF)),y)
-TARGETS+=sdl_ttf
-endif
-
Copied: trunk/buildroot/target/device/armadeus/apf9328/uClibc.config.arm (from rev 914, trunk/buildroot/target/device/armadeus/uClibc.config.arm)
===================================================================
--- trunk/buildroot/target/device/armadeus/apf9328/uClibc.config.arm (rev 0)
+++ trunk/buildroot/target/device/armadeus/apf9328/uClibc.config.arm 2008-12-04 07:26:29 UTC (rev 915)
@@ -0,0 +1,214 @@
+#
+# Automatically generated make config: don't edit
+# Sun Oct 28 19:53:00 2007
+#
+# TARGET_alpha is not set
+TARGET_arm=y
+# TARGET_avr32 is not set
+# TARGET_bfin is not set
+# TARGET_cris is not set
+# TARGET_e1 is not set
+# TARGET_frv is not set
+# TARGET_h8300 is not set
+# TARGET_hppa is not set
+# TARGET_i386 is not set
+# TARGET_i960 is not set
+# TARGET_ia64 is not set
+# TARGET_m68k is not set
+# TARGET_microblaze is not set
+# TARGET_mips is not set
+# TARGET_nios is not set
+# TARGET_nios2 is not set
+# TARGET_powerpc is not set
+# TARGET_sh is not set
+# TARGET_sh64 is not set
+# TARGET_sparc is not set
+# TARGET_v850 is not set
+# TARGET_vax is not set
+# TARGET_x86_64 is not set
+
+#
+# Target Architecture Features and Options
+#
+TARGET_ARCH="arm"
+FORCE_OPTIONS_FOR_ARCH=y
+CONFIG_ARM_OABI=y
+# CONFIG_ARM_EABI is not set
+# USE_BX is not set
+# CONFIG_GENERIC_ARM is not set
+# CONFIG_ARM610 is not set
+# CONFIG_ARM710 is not set
+# CONFIG_ARM7TDMI is not set
+# CONFIG_ARM720T is not set
+CONFIG_ARM920T=y
+# CONFIG_ARM922T is not set
+# CONFIG_ARM926T is not set
+# CONFIG_ARM10T is not set
+# CONFIG_ARM1136JF_S is not set
+# CONFIG_ARM1176JZ_S is not set
+# CONFIG_ARM1176JZF_S is not set
+# CONFIG_ARM_SA110 is not set
+# CONFIG_ARM_SA1100 is not set
+# CONFIG_ARM_XSCALE is not set
+# CONFIG_ARM_IWMMXT is not set
+TARGET_SUBARCH=""
+
+#
+# Using ELF file format
+#
+ARCH_ANY_ENDIAN=y
+ARCH_LITTLE_ENDIAN=y
+# ARCH_WANTS_BIG_ENDIAN is not set
+ARCH_WANTS_LITTLE_ENDIAN=y
+ARCH_HAS_MMU=y
+ARCH_USE_MMU=y
+UCLIBC_HAS_FLOATS=y
+# UCLIBC_HAS_FPU is not set
+UCLIBC_HAS_SOFT_FLOAT=y
+DO_C99_MATH=y
+KERNEL_HEADERS="/home/eric/arm/armahead/buildroot/toolchain_build_arm/linux/include"
+HAVE_DOT_CONFIG=y
+
+#
+# General Library Settings
+#
+# HAVE_NO_PIC is not set
+DOPIC=y
+# HAVE_NO_SHARED is not set
+# ARCH_HAS_NO_LDSO is not set
+HAVE_SHARED=y
+# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
+LDSO_LDD_SUPPORT=y
+LDSO_CACHE_SUPPORT=y
+# LDSO_PRELOAD_FILE_SUPPORT is not set
+LDSO_BASE_FILENAME="ld.so"
+# UCLIBC_STATIC_LDCONFIG is not set
+# LDSO_RUNPATH is not set
+UCLIBC_CTOR_DTOR=y
+# HAS_NO_THREADS is not set
+UCLIBC_HAS_THREADS=y
+# PTHREADS_DEBUG_SUPPORT is not set
+LINUXTHREADS_OLD=y
+UCLIBC_HAS_LFS=y
+# MALLOC is not set
+# MALLOC_SIMPLE is not set
+MALLOC_STANDARD=y
+MALLOC_GLIBC_COMPAT=y
+UCLIBC_DYNAMIC_ATEXIT=y
+# COMPAT_ATEXIT is not set
+# UCLIBC_SUSV3_LEGACY is not set
+# UCLIBC_SUSV3_LEGACY_MACROS is not set
+UCLIBC_HAS_SHADOW=y
+# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set
+UCLIBC_HAS___PROGNAME=y
+# UNIX98PTY_ONLY is not set
+ASSUME_DEVPTS=y
+UCLIBC_HAS_TM_EXTENSIONS=y
+UCLIBC_HAS_TZ_CACHING=y
+UCLIBC_HAS_TZ_FILE=y
+UCLIBC_HAS_TZ_FILE_READ_MANY=y
+UCLIBC_TZ_FILE_PATH="/etc/TZ"
+
+#
+# Advanced Library Settings
+#
+UCLIBC_PWD_BUFFER_SIZE=256
+UCLIBC_GRP_BUFFER_SIZE=256
+
+#
+# Networking Support
+#
+UCLIBC_HAS_IPV6=y
+UCLIBC_HAS_RPC=y
+UCLIBC_HAS_FULL_RPC=y
+UCLIBC_HAS_REENTRANT_RPC=y
+# UCLIBC_USE_NETLINK is not set
+# UCLIBC_HAS_BSD_RES_CLOSE is not set
+
+#
+# String and Stdio Support
+#
+UCLIBC_HAS_STRING_GENERIC_OPT=y
+UCLIBC_HAS_STRING_ARCH_OPT=y
+UCLIBC_HAS_CTYPE_TABLES=y
+UCLIBC_HAS_CTYPE_SIGNED=y
+# UCLIBC_HAS_CTYPE_UNSAFE is not set
+UCLIBC_HAS_CTYPE_CHECKED=y
+# UCLIBC_HAS_CTYPE_ENFORCED is not set
+UCLIBC_HAS_WCHAR=y
+# UCLIBC_HAS_LOCALE is not set
+UCLIBC_HAS_HEXADECIMAL_FLOATS=y
+UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
+UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
+UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
+# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
+# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
+UCLIBC_HAS_STDIO_BUFSIZ_4096=y
+# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
+UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
+# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
+# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
+# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
+UCLIBC_HAS_STDIO_GETC_MACRO=y
+UCLIBC_HAS_STDIO_PUTC_MACRO=y
+UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
+# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
+UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
+UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
+UCLIBC_HAS_PRINTF_M_SPEC=y
+UCLIBC_HAS_ERRNO_MESSAGES=y
+# UCLIBC_HAS_SYS_ERRLIST is not set
+UCLIBC_HAS_SIGNUM_MESSAGES=y
+# UCLIBC_HAS_SYS_SIGLIST is not set
+UCLIBC_HAS_GNU_GETOPT=y
+UCLIBC_HAS_GNU_GETSUBOPT=y
+
+#
+# Big and Tall
+#
+UCLIBC_HAS_REGEX=y
+UCLIBC_HAS_REGEX_OLD=y
+UCLIBC_HAS_FNMATCH=y
+UCLIBC_HAS_FNMATCH_OLD=y
+# UCLIBC_HAS_WORDEXP is not set
+UCLIBC_HAS_FTW=y
+UCLIBC_HAS_GLOB=y
+UCLIBC_HAS_GNU_GLOB=y
+
+#
+# Library Installation Options
+#
+SHARED_LIB_LOADER_PREFIX="/lib"
+RUNTIME_PREFIX="/"
+DEVEL_PREFIX="/usr/"
+
+#
+# Security options
+#
+# UCLIBC_BUILD_PIE is not set
+# UCLIBC_HAS_ARC4RANDOM is not set
+# HAVE_NO_SSP is not set
+# UCLIBC_HAS_SSP is not set
+UCLIBC_BUILD_RELRO=y
+UCLIBC_BUILD_NOW=y
+# UCLIBC_BUILD_NOEXECSTACK is not set
+
+#
+# uClibc development/debugging options
+#
+CROSS_COMPILER_PREFIX="/home/eric/arm/armahead/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibc-"
+UCLIBC_EXTRA_CFLAGS=""
+# DODEBUG is not set
+# DODEBUG_PT is not set
+DOSTRIP=y
+# DOASSERTS is not set
+# SUPPORT_LD_DEBUG is not set
+# SUPPORT_LD_DEBUG_EARLY is not set
+# UCLIBC_MALLOC_DEBUGGING is not set
+WARNINGS="-Wall"
+# EXTRA_WARNINGS is not set
+# DOMULTI is not set
+# UCLIBC_MJN3_ONLY is not set
Property changes on: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S00machine_name
___________________________________________________________________
Added: svn:executable
+ *
Deleted: trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S22i2c
===================================================================
--- trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S22i2c 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/buildroot/target/device/armadeus/rootfs/target_skeleton/etc/init.d/S22i2c 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,33 +0,0 @@
-#!/bin/sh
-#
-# start/stop i2c interface.
-
-test -f /lib/modules/2.6.12/kernel/drivers/i2c/busses/i2c-imx.ko || exit 0
-test -f /lib/modules/2.6.12/kernel/drivers/i2c/i2c-core.ko || exit 0
-test -f /lib/modules/2.6.12/kernel/drivers/i2c/i2c-dev.ko || exit 0
-
-case "$1" in
- start)
- echo "Starting i2c drivers"
- insmod /lib/modules/2.6.12/kernel/drivers/i2c/i2c-core.ko
- insmod /lib/modules/2.6.12/kernel/drivers/i2c/i2c-dev.ko
- insmod /lib/modules/2.6.12/kernel/drivers/i2c/busses/i2c-imx.ko
- ;;
- stop)
- echo "Stopping i2c drivers"
- rmmod /lib/modules/2.6.12/kernel/drivers/i2c/busses/i2c-imx.ko
- rmmod /lib/modules/2.6.12/kernel/drivers/i2c/i2c-dev.ko
- rmmod /lib/modules/2.6.12/kernel/drivers/i2c/i2c-core.ko
- ;;
- restart)
- $0 stop
- $0 start
- ;;
- *)
- echo "Usage: /etc/init.d/S22i2c {start|stop|restart}"
- exit 1
- ;;
-esac
-
-exit 0
-
Deleted: trunk/buildroot/target/device/armadeus/uClibc.config.arm
===================================================================
--- trunk/buildroot/target/device/armadeus/uClibc.config.arm 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/buildroot/target/device/armadeus/uClibc.config.arm 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,214 +0,0 @@
-#
-# Automatically generated make config: don't edit
-# Sun Oct 28 19:53:00 2007
-#
-# TARGET_alpha is not set
-TARGET_arm=y
-# TARGET_avr32 is not set
-# TARGET_bfin is not set
-# TARGET_cris is not set
-# TARGET_e1 is not set
-# TARGET_frv is not set
-# TARGET_h8300 is not set
-# TARGET_hppa is not set
-# TARGET_i386 is not set
-# TARGET_i960 is not set
-# TARGET_ia64 is not set
-# TARGET_m68k is not set
-# TARGET_microblaze is not set
-# TARGET_mips is not set
-# TARGET_nios is not set
-# TARGET_nios2 is not set
-# TARGET_powerpc is not set
-# TARGET_sh is not set
-# TARGET_sh64 is not set
-# TARGET_sparc is not set
-# TARGET_v850 is not set
-# TARGET_vax is not set
-# TARGET_x86_64 is not set
-
-#
-# Target Architecture Features and Options
-#
-TARGET_ARCH="arm"
-FORCE_OPTIONS_FOR_ARCH=y
-CONFIG_ARM_OABI=y
-# CONFIG_ARM_EABI is not set
-# USE_BX is not set
-# CONFIG_GENERIC_ARM is not set
-# CONFIG_ARM610 is not set
-# CONFIG_ARM710 is not set
-# CONFIG_ARM7TDMI is not set
-# CONFIG_ARM720T is not set
-CONFIG_ARM920T=y
-# CONFIG_ARM922T is not set
-# CONFIG_ARM926T is not set
-# CONFIG_ARM10T is not set
-# CONFIG_ARM1136JF_S is not set
-# CONFIG_ARM1176JZ_S is not set
-# CONFIG_ARM1176JZF_S is not set
-# CONFIG_ARM_SA110 is not set
-# CONFIG_ARM_SA1100 is not set
-# CONFIG_ARM_XSCALE is not set
-# CONFIG_ARM_IWMMXT is not set
-TARGET_SUBARCH=""
-
-#
-# Using ELF file format
-#
-ARCH_ANY_ENDIAN=y
-ARCH_LITTLE_ENDIAN=y
-# ARCH_WANTS_BIG_ENDIAN is not set
-ARCH_WANTS_LITTLE_ENDIAN=y
-ARCH_HAS_MMU=y
-ARCH_USE_MMU=y
-UCLIBC_HAS_FLOATS=y
-# UCLIBC_HAS_FPU is not set
-UCLIBC_HAS_SOFT_FLOAT=y
-DO_C99_MATH=y
-KERNEL_HEADERS="/home/eric/arm/armahead/buildroot/toolchain_build_arm/linux/include"
-HAVE_DOT_CONFIG=y
-
-#
-# General Library Settings
-#
-# HAVE_NO_PIC is not set
-DOPIC=y
-# HAVE_NO_SHARED is not set
-# ARCH_HAS_NO_LDSO is not set
-HAVE_SHARED=y
-# FORCE_SHAREABLE_TEXT_SEGMENTS is not set
-LDSO_LDD_SUPPORT=y
-LDSO_CACHE_SUPPORT=y
-# LDSO_PRELOAD_FILE_SUPPORT is not set
-LDSO_BASE_FILENAME="ld.so"
-# UCLIBC_STATIC_LDCONFIG is not set
-# LDSO_RUNPATH is not set
-UCLIBC_CTOR_DTOR=y
-# HAS_NO_THREADS is not set
-UCLIBC_HAS_THREADS=y
-# PTHREADS_DEBUG_SUPPORT is not set
-LINUXTHREADS_OLD=y
-UCLIBC_HAS_LFS=y
-# MALLOC is not set
-# MALLOC_SIMPLE is not set
-MALLOC_STANDARD=y
-MALLOC_GLIBC_COMPAT=y
-UCLIBC_DYNAMIC_ATEXIT=y
-# COMPAT_ATEXIT is not set
-# UCLIBC_SUSV3_LEGACY is not set
-# UCLIBC_SUSV3_LEGACY_MACROS is not set
-UCLIBC_HAS_SHADOW=y
-# UCLIBC_HAS_PROGRAM_INVOCATION_NAME is not set
-UCLIBC_HAS___PROGNAME=y
-# UNIX98PTY_ONLY is not set
-ASSUME_DEVPTS=y
-UCLIBC_HAS_TM_EXTENSIONS=y
-UCLIBC_HAS_TZ_CACHING=y
-UCLIBC_HAS_TZ_FILE=y
-UCLIBC_HAS_TZ_FILE_READ_MANY=y
-UCLIBC_TZ_FILE_PATH="/etc/TZ"
-
-#
-# Advanced Library Settings
-#
-UCLIBC_PWD_BUFFER_SIZE=256
-UCLIBC_GRP_BUFFER_SIZE=256
-
-#
-# Networking Support
-#
-UCLIBC_HAS_IPV6=y
-UCLIBC_HAS_RPC=y
-UCLIBC_HAS_FULL_RPC=y
-UCLIBC_HAS_REENTRANT_RPC=y
-# UCLIBC_USE_NETLINK is not set
-# UCLIBC_HAS_BSD_RES_CLOSE is not set
-
-#
-# String and Stdio Support
-#
-UCLIBC_HAS_STRING_GENERIC_OPT=y
-UCLIBC_HAS_STRING_ARCH_OPT=y
-UCLIBC_HAS_CTYPE_TABLES=y
-UCLIBC_HAS_CTYPE_SIGNED=y
-# UCLIBC_HAS_CTYPE_UNSAFE is not set
-UCLIBC_HAS_CTYPE_CHECKED=y
-# UCLIBC_HAS_CTYPE_ENFORCED is not set
-UCLIBC_HAS_WCHAR=y
-# UCLIBC_HAS_LOCALE is not set
-UCLIBC_HAS_HEXADECIMAL_FLOATS=y
-UCLIBC_HAS_GLIBC_CUSTOM_PRINTF=y
-UCLIBC_PRINTF_SCANF_POSITIONAL_ARGS=9
-UCLIBC_HAS_SCANF_GLIBC_A_FLAG=y
-# UCLIBC_HAS_STDIO_BUFSIZ_NONE is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_256 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_512 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_1024 is not set
-# UCLIBC_HAS_STDIO_BUFSIZ_2048 is not set
-UCLIBC_HAS_STDIO_BUFSIZ_4096=y
-# UCLIBC_HAS_STDIO_BUFSIZ_8192 is not set
-UCLIBC_HAS_STDIO_BUILTIN_BUFFER_NONE=y
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_4 is not set
-# UCLIBC_HAS_STDIO_BUILTIN_BUFFER_8 is not set
-# UCLIBC_HAS_STDIO_SHUTDOWN_ON_ABORT is not set
-UCLIBC_HAS_STDIO_GETC_MACRO=y
-UCLIBC_HAS_STDIO_PUTC_MACRO=y
-UCLIBC_HAS_STDIO_AUTO_RW_TRANSITION=y
-# UCLIBC_HAS_FOPEN_LARGEFILE_MODE is not set
-UCLIBC_HAS_FOPEN_EXCLUSIVE_MODE=y
-UCLIBC_HAS_GLIBC_CUSTOM_STREAMS=y
-UCLIBC_HAS_PRINTF_M_SPEC=y
-UCLIBC_HAS_ERRNO_MESSAGES=y
-# UCLIBC_HAS_SYS_ERRLIST is not set
-UCLIBC_HAS_SIGNUM_MESSAGES=y
-# UCLIBC_HAS_SYS_SIGLIST is not set
-UCLIBC_HAS_GNU_GETOPT=y
-UCLIBC_HAS_GNU_GETSUBOPT=y
-
-#
-# Big and Tall
-#
-UCLIBC_HAS_REGEX=y
-UCLIBC_HAS_REGEX_OLD=y
-UCLIBC_HAS_FNMATCH=y
-UCLIBC_HAS_FNMATCH_OLD=y
-# UCLIBC_HAS_WORDEXP is not set
-UCLIBC_HAS_FTW=y
-UCLIBC_HAS_GLOB=y
-UCLIBC_HAS_GNU_GLOB=y
-
-#
-# Library Installation Options
-#
-SHARED_LIB_LOADER_PREFIX="/lib"
-RUNTIME_PREFIX="/"
-DEVEL_PREFIX="/usr/"
-
-#
-# Security options
-#
-# UCLIBC_BUILD_PIE is not set
-# UCLIBC_HAS_ARC4RANDOM is not set
-# HAVE_NO_SSP is not set
-# UCLIBC_HAS_SSP is not set
-UCLIBC_BUILD_RELRO=y
-UCLIBC_BUILD_NOW=y
-# UCLIBC_BUILD_NOEXECSTACK is not set
-
-#
-# uClibc development/debugging options
-#
-CROSS_COMPILER_PREFIX="/home/eric/arm/armahead/buildroot/build_arm/staging_dir/usr/bin/arm-linux-uclibc-"
-UCLIBC_EXTRA_CFLAGS=""
-# DODEBUG is not set
-# DODEBUG_PT is not set
-DOSTRIP=y
-# DOASSERTS is not set
-# SUPPORT_LD_DEBUG is not set
-# SUPPORT_LD_DEBUG_EARLY is not set
-# UCLIBC_MALLOC_DEBUGGING is not set
-WARNINGS="-Wall"
-# EXTRA_WARNINGS is not set
-# DOMULTI is not set
-# UCLIBC_MJN3_ONLY is not set
Copied: trunk/software/uboot_recover/apf9328-u-boot.bin (from rev 914, trunk/software/uboot_recover/u-boot.bin)
===================================================================
(Binary files differ)
Copied: trunk/software/uboot_recover/apf9328_recover.py (from rev 914, trunk/software/uboot_recover/uboot_recover.py)
===================================================================
--- trunk/software/uboot_recover/apf9328_recover.py (rev 0)
+++ trunk/software/uboot_recover/apf9328_recover.py 2008-12-04 07:26:29 UTC (rev 915)
@@ -0,0 +1,52 @@
+#
+# APF9328 boot revovery tool
+#
+# Copyright (2006) ARMADEUS
+#
+# 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.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# author: nic...@ar...
+#
+
+from bootloader import *
+import sys
+import serial
+
+ser = 0 #serial port
+
+if __name__ == "__main__":
+ SPEED = 38400
+ ramSize = 16
+ print "APF Recover Tool"
+ print "Do not forget to place the bootstrap jumper !!"
+ print "and be sure to have a u-boot.bin file in current dir"
+ port = raw_input('Enter serial port number or name to use (/dev/ttySx under Linux and COMx under Windows: ')
+ input = raw_input('Enter RAM size (default 16): ')
+ if input.isdigit():
+ ramSize = int( input )
+ try:
+ ser = serial.Serial(port, SPEED, timeout=1)
+ except Exception, msg:
+ print "unable to open serial port %s" % port
+ print msg
+ sys.exit()
+ ser.flush()
+ apfBootloader = imxlBootloader(ser, ramSize)
+ apfBootloader.sync()
+ eraseAll = raw_input('Would you like to erase the environment variables? y/n: ')
+ apfBootloader.loadFlashbin("u-boot.bin", "10000000", eraseAll)
+ print "uBoot successfully recovered !"
+ del ser
+
Deleted: trunk/software/uboot_recover/u-boot.bin
===================================================================
(Binary files differ)
Deleted: trunk/software/uboot_recover/uboot_recover.py
===================================================================
--- trunk/software/uboot_recover/uboot_recover.py 2008-11-07 09:07:50 UTC (rev 914)
+++ trunk/software/uboot_recover/uboot_recover.py 2008-12-04 07:26:29 UTC (rev 915)
@@ -1,52 +0,0 @@
-#
-# APF9328 boot revovery tool
-#
-# Copyright (2006) ARMADEUS
-#
-# 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.
-#
-# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-#
-# author: nic...@ar...
-#
-
-from bootloader import *
-import sys
-import serial
-
-ser = 0 #serial port
-
-if __name__ == "__main__":
- SPEED = 38400
- ramSize = 16
- print "APF Recover Tool"
- print "Do not forget to place the bootstrap jumper !!"
- print "and be sure to have a u-boot.bin file in current dir"
- port = raw_input('Enter serial port number or name to use (/dev/ttySx under Linux and COMx under Windows: ')
- input = raw_input('Enter RAM size (default 16): ')
- if input.isdigit():
- ramSize = int( input )
- try:
- ser = serial.Serial(port, SPEED, timeout=1)
- except Exception, msg:
- print "unable to open serial port %s" % port
- print msg
- sys.exit()
- ser.flush()
- apfBootloader = imxlBootloader(ser, ramSize)
- apfBootloader.sync()
- eraseAll = raw_input('Would you like to erase the environment variables? y/n: ')
- apfBootloader.loadFlashbin("u-boot.bin", "10000000", eraseAll)
- print "uBoot successfully recovered !"
- del ser
-
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2008-11-07 09:07:56
|
Revision: 914
http://armadeus.svn.sourceforge.net/armadeus/?rev=914&view=rev
Author: FabM
Date: 2008-11-07 09:07:50 +0000 (Fri, 07 Nov 2008)
Log Message:
-----------
[LINUX][apf9328] Suppressing uart irq declarations
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch 2008-11-06 11:11:42 UTC (rev 913)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch 2008-11-07 09:07:50 UTC (rev 914)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/arch/arm/mach-imx/apf9328.c
+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,580 @@
+@@ -0,0 +1,569 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -485,10 +485,6 @@
+ printk("--- Registering APF9328 ressources\n");
+
+ // Serial
-+ /*UFCR(IMX_UART1_BASE) = 0xa81; To be removed
-+ UFCR(IMX_UART2_BASE) = 0xa81;*/
-+
-+ /* using uart1 FabM 5 nov 2008 */
+ imx_gpio_mode(PC9_PF_UART1_CTS);
+ imx_gpio_mode(PC10_PF_UART1_RTS);
+ imx_gpio_mode(PC11_PF_UART1_TXD);
@@ -498,7 +494,6 @@
+ imx_gpio_mode( PB31_PF_UART2_RXD );
+ imx_gpio_mode( PB28_PF_UART2_CTS );
+ imx_gpio_mode( PB29_PF_UART2_RTS );
-+ /* end FabM */
+
+#ifdef CONFIG_FB_IMX /* LCD */
+ set_imx_fb_info(&apf9328_fb_info);
@@ -552,12 +547,6 @@
+ // Init generic IRQs
+ imx_init_irq();
+
-+ /* modif for uart1 FabM 5 nov 2008 */
-+ // Init our custom IRQs
-+ set_irq_type(APF9328_UART1_IRQ, IRQF_TRIGGER_FALLING);
-+ set_irq_type(APF9328_UART2_IRQ, IRQF_TRIGGER_FALLING);
-+ /* end FabM */
-+
+ // Init our custom IRQs
+#ifdef CONFIG_DM9000
+ set_irq_type(APF9328_ETH_IRQ, IRQF_TRIGGER_FALLING);
@@ -795,7 +784,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/include/asm-arm/arch-imx/apf9328.h
+++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h
-@@ -0,0 +1,65 @@
+@@ -0,0 +1,57 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
+ *
@@ -823,14 +812,6 @@
+/* ------------------------------------------------------------------------ */
+/* Memory Map for the APF9328 Board */
+/* ------------------------------------------------------------------------ */
-+// Serial ports
-+#define APF9328_UART1_VIRT ( IMX_CS3_VIRT + 0x30000 )
-+#define APF9328_UART1_PHYS ( IMX_CS3_PHYS + 0x30000 )
-+#define APF9328_UART1_IRQ ( IRQ_GPIOA(1) )
-+#define APF9328_UART2_VIRT ( IMX_CS3_VIRT + 0x10000 )
-+#define APF9328_UART2_PHYS ( IMX_CS3_PHYS + 0x10000 )
-+#define APF9328_UART2_IRQ ( IRQ_GPIOA(1) )
-+
+// Ethernet
+#define APF9328_ETH_VIRT ( IMX_CS4_VIRT + 0x00C00000 )
+#define APF9328_ETH_PHYS ( IMX_CS4_PHYS + 0x00C00000 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-11-06 11:11:51
|
Revision: 913
http://armadeus.svn.sourceforge.net/armadeus/?rev=913&view=rev
Author: artemys
Date: 2008-11-06 11:11:42 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
[LINUX] Remove fucking DOS format of ISP1761 driver's files
Modified Paths:
--------------
trunk/target/linux/modules/isp1761/Makefile
trunk/target/linux/modules/isp1761/hal/Makefile
trunk/target/linux/modules/isp1761/hal/hal_imx.c
trunk/target/linux/modules/isp1761/hal/hal_intf.h
trunk/target/linux/modules/isp1761/hal/hal_pxa.c
trunk/target/linux/modules/isp1761/hal/hal_x86.c
trunk/target/linux/modules/isp1761/hal/hal_x86.h
trunk/target/linux/modules/isp1761/hal/isp1761.h
trunk/target/linux/modules/isp1761/host/Makefile
trunk/target/linux/modules/isp1761/host/itdptd.c
trunk/target/linux/modules/isp1761/host/mem.c
trunk/target/linux/modules/isp1761/host/modifications
trunk/target/linux/modules/isp1761/host/otg.c
trunk/target/linux/modules/isp1761/host/pehci.c
trunk/target/linux/modules/isp1761/host/pehci.h
trunk/target/linux/modules/isp1761/host/qtdptd.c
Modified: trunk/target/linux/modules/isp1761/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/Makefile 2008-11-06 10:14:16 UTC (rev 912)
+++ trunk/target/linux/modules/isp1761/Makefile 2008-11-06 11:11:42 UTC (rev 913)
@@ -1,36 +1,36 @@
-#
-# Makefile for the ISP1761
-#
-
-# Part executed when called from kernel build system:
-ifneq ($(KERNELRELEASE),)
-
-obj-$(CONFIG_ARMADEUS_ISP1761) += hal/ host/ apf9328-isp1761.o
-
-# Part execute when called from standard make in this directory:
-else
-
-BASE_DIR="../../../../buildroot/"
-BUILD_DIR_EXT:=$(shell ls $(BASE_DIR) | grep -e "^build_arm*")
-REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
- sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
-
-ARMADEUS_KERNEL_DIR=$(BASE_DIR)/$(BUILD_DIR_EXT)/linux-$(REL)
-ifeq ($(LINUX_DIR),)
-LINUX_DIR := $(ARMADEUS_KERNEL_DIR)
-endif
-PWD := $(shell pwd)
-
-default:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) modules
-
-clean:
- echo "Your Linux source dir is: $(LINUX_DIR)"
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) clean
-
-install:
- echo "Installing Armadeus drivers..."
- $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
-
-endif
+#
+# Makefile for the ISP1761
+#
+
+# Part executed when called from kernel build system:
+ifneq ($(KERNELRELEASE),)
+
+obj-$(CONFIG_ARMADEUS_ISP1761) += hal/ host/ apf9328-isp1761.o
+
+# Part execute when called from standard make in this directory:
+else
+
+BASE_DIR="../../../../buildroot/"
+BUILD_DIR_EXT:=$(shell ls $(BASE_DIR) | grep -e "^build_arm*")
+REL=`grep "BR2_PACKAGE_LINUX_VERSION=" $(BASE_DIR).config | \
+ sed "s/BR2_PACKAGE_LINUX_VERSION=\\"//" | sed "s/\\"//"`
+
+ARMADEUS_KERNEL_DIR=$(BASE_DIR)/$(BUILD_DIR_EXT)/linux-$(REL)
+ifeq ($(LINUX_DIR),)
+LINUX_DIR := $(ARMADEUS_KERNEL_DIR)
+endif
+PWD := $(shell pwd)
+
+default:
+ echo "Your Linux source dir is: $(LINUX_DIR)"
+ $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) modules
+
+clean:
+ echo "Your Linux source dir is: $(LINUX_DIR)"
+ $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) clean
+
+install:
+ echo "Installing Armadeus drivers..."
+ $(MAKE) -C $(LINUX_DIR) SUBDIRS=$(PWD) INSTALL_MOD_PATH=$(TARGET_DIR) modules_install
+
+endif
Modified: trunk/target/linux/modules/isp1761/hal/Makefile
===================================================================
--- trunk/target/linux/modules/isp1761/hal/Makefile 2008-11-06 10:14:16 UTC (rev 912)
+++ trunk/target/linux/modules/isp1761/hal/Makefile 2008-11-06 11:11:42 UTC (rev 913)
@@ -1,3 +1,3 @@
-#
-#
-obj-$(CONFIG_ARMADEUS_ISP1761) := hal_imx.o
+#
+#
+obj-$(CONFIG_ARMADEUS_ISP1761) := hal_imx.o
Modified: trunk/target/linux/modules/isp1761/hal/hal_imx.c
===================================================================
--- trunk/target/linux/modules/isp1761/hal/hal_imx.c 2008-11-06 10:14:16 UTC (rev 912)
+++ trunk/target/linux/modules/isp1761/hal/hal_imx.c 2008-11-06 11:11:42 UTC (rev 913)
@@ -1,1014 +1,1014 @@
-/************************************************************
- * Philips ISP176x Hardware Abstraction Layer code file
- *
- * (c) 2002 Koninklijke Philips Electronics N.V. All rights reserved. <usb...@ph...>
- *
- * 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.
- *
- * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
- * File Name: hal_x86.c
- *
- * Refering linux kernel version 2.6.23
- *
- * History:
- *
- * Date Author Comments
- * ---------------------------------------------------------------------
- * Nov 29 2005 Prabhakar Kalasani Initial Creation
- * Nov 04 2007 NC (armadeus) add 2.6.23 compatibility
- **********************************************************************
- */
-
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/delay.h>
-#include <linux/ioport.h>
-#include <linux/sched.h>
-#include <linux/slab.h>
-#include <linux/smp_lock.h>
-#include <linux/errno.h>
-#include <linux/init.h>
-#include <linux/timer.h>
-#include <linux/list.h>
-#include <linux/interrupt.h>
-#include <linux/usb.h>
-#include <linux/poll.h>
-#include <linux/platform_device.h>
-#include <linux/vmalloc.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/system.h>
-#include <asm/unaligned.h>
-#include <asm/dma.h>
-
-/*--------------------------------------------------------------*
- * linux system include files
- *--------------------------------------------------------------*/
-#include "hal_x86.h" // We can use the x86 headers for now.
-#include "../hal/hal_intf.h"
-#include "../hal/isp1761.h"
+/************************************************************
+ * Philips ISP176x Hardware Abstraction Layer code file
+ *
+ * (c) 2002 Koninklijke Philips Electronics N.V. All rights reserved. <usb...@ph...>
+ *
+ * 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.
+ *
+ * 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * File Name: hal_x86.c
+ *
+ * Refering linux kernel version 2.6.23
+ *
+ * History:
+ *
+ * Date Author Comments
+ * ---------------------------------------------------------------------
+ * Nov 29 2005 Prabhakar Kalasani Initial Creation
+ * Nov 04 2007 NC (armadeus) add 2.6.23 compatibility
+ **********************************************************************
+ */
-/*--------------------------------------------------------------*
- * Local variable Definitions
- *--------------------------------------------------------------*/
-struct isp1761_dev isp1761_loc_dev[ISP1761_LAST_DEV];
-static struct isp1761_hal hal_data;
-static struct platform_device *s_pdev;
-int iolength = 0;
-static __u32 isp1761_base = 0;
-
-/*--------------------------------------------------------------*
- * Local # Definitions
- *--------------------------------------------------------------*/
-#define isp1761_driver_name "1761-m6"
-#define ISP1761_IO_EXTENT ((1 << 17)-1) // 17 address bits used.
-#define ISP1761_REGSET_LEN 0xffff
-
-#undef CONFIG_PM /* PM no workie yet. */
-
-/*--------------------------------------------------------------*
- * Local Function
- *--------------------------------------------------------------*/
-
-static int __devexit isp1761_remove (struct platform_device *pdev);
-static int __devinit isp1761_probe (struct platform_device *pdev);
-#ifdef CONFIG_PM
-static int isp1761_pci_suspend (struct pci_dev *dev, __u32 state);
-static int isp1761_pci_resume (struct pci_dev *dev);
-#endif
-static irqreturn_t isp1761_pci_isr (int irq, void *dev_id);
-
-
-/*--------------------------------------------------------------*
- * ISP 1761 interrupt locking functions
- *--------------------------------------------------------------*/
-int isp1761_hw_lock = 0;
-int isp1761_hw_isr = 0;
-
-void isp1761_disable_interrupt(int irq) {
- /* DUMMY functions
- * Not used */
- disable_irq(irq);
- return;
-}
-void isp1761_enable_interrupt(int irq) {
- /* DUMMY functions
- * Not used */
- enable_irq(irq);
- return;
-}
-
-/*--------------------------------------------------------------*
- * ISP1761 Interrupt Service Routine
- *--------------------------------------------------------------*/
-/*Interrupt Service Routine for device controller*/
-irqreturn_t isp1761_pci_dc_isr(int irq, void *data)
-{
- struct isp1761_dev *dev;
- dev = &isp1761_loc_dev[ISP1761_DC];
-
- hal_entry("%s: Entered\n",__FUNCTION__);
- /*not ready yet*/
- if(dev->active == 0)
- {
- printk("isp1761_pci_dc_isr: dev->active is NULL \n");
- return IRQ_NONE;
- }
-
- /* Get the source of interrupts for Device Controller
- * Device Controller interrupts are cleared by the driver
- * during processing
- */
-
- /*unblock the device interrupt*/
-
- isp1761_reg_write32(dev, DEV_UNLOCK_REGISTER, 0xaa37);
- dev->int_reg = isp1761_reg_read32(dev, DEV_INTERRUPT_REGISTER, dev->int_reg);
- hal_int("isp1761_pci_dc_isr:INTERRUPT_REGISTER 0x%x\n",dev->int_reg);
- /*clear the interrupt source*/
- isp1761_reg_write32(dev, 0x218, dev->int_reg);
- dev->int_reg &= 0x03fffdb9;
- if(dev->int_reg)
- dev->handler(dev, dev->isr_data);
- hal_entry("%s: Exit\n",__FUNCTION__);
- return IRQ_HANDLED;
-}
-
-/* Interrupt Service Routine of isp1761
- * Reads the source of interrupt and calls the corresponding driver's ISR.
- * Before calling the driver's ISR clears the source of interrupt.
- * The drivers can get the source of interrupt from the dev->int_reg field
- */
-irqreturn_t isp1761_pci_isr(int irq, void *__data)
-{
- __u32 irq_mask = 0;
- struct isp1761_dev *dev;
- hal_entry("%s: Entered\n",__FUNCTION__);
- /* Process the Host Controller Driver */
- dev = &isp1761_loc_dev[ISP1761_HC];
- /* Get the source of interrupts for Host Controller*/
- dev->int_reg = isp1761_reg_read32(dev, HC_INTERRUPT_REG,dev->int_reg);
- isp1761_reg_write32(dev,HC_INTERRUPT_REG,dev->int_reg);
- irq_mask = isp1761_reg_read32(dev, HC_INTENABLE_REG,irq_mask);
-
- dev->int_reg &= irq_mask; /*shared irq ??*/
- /*call the Host Isr if any valid(minus otg)interrupt is present*/
- if(dev->int_reg & ~HC_OTG_INTERRUPT)
- dev->handler(dev,dev->isr_data);
-#ifdef OTG
-#ifndef MSEC_INT_BASED
- mdelay(1);
-#endif
- /*process otg interrupt if there is any*/
- if(dev->int_reg & HC_OTG_INTERRUPT){
- u32 otg_int;
-#ifndef MSEC_INT_BASED
- mdelay(1);
-#endif
- otg_int = (dev->int_reg & HC_OTG_INTERRUPT);
- /* Process OTG controller Driver
- * Since OTG is part of HC interrupt register,
- * the interrupt source will be HC interrupt Register
- * */
- dev = &isp1761_loc_dev[ISP1761_OTG];
- /* Read the source of OTG_INT and clear the
- interrupt source */
- dev->int_reg = otg_int;
- dev->handler(dev, dev->isr_data);
- }
-#endif
- hal_entry("%s: Exit\n",__FUNCTION__);
- return IRQ_HANDLED;
-} /* End of isp1362_pci_isr */
-
-/*--------------------------------------------------------------*
- * PCI Driver Interface Functions
- *--------------------------------------------------------------*/
-
-/* Pci driver interface functions */
-static struct platform_driver isp1761_platform_driver = {
-probe: isp1761_probe,
-remove: isp1761_remove,
-driver: { .name = "isp1761" }
-};
-
-
-/*--------------------------------------------------------------*
- * ISP1761 Read write routine
- *--------------------------------------------------------------*/
-
-/* Write a 32 bit Register of isp1761 */
-void isp1761_reg_write32(struct isp1761_dev *dev,__u16 reg,__u32 data)
-{
- /* Write the 32bit to the register address given to us*/
- writel(data,dev->baseaddress+reg);
- //printk("Wrote to 0x%08x value 0x%08x\n", isp1761_base + reg, data);
-}
-
-
-/* Read a 32 bit Register of isp1761 */
-__u32 isp1761_reg_read32(struct isp1761_dev *dev,__u16 reg,__u32 data)
-{
-
- data = readl(dev->baseaddress + reg);
- //printk("Read from 0x%08x is 0x%08x\n", isp1761_base + reg, data);
- return data;
-}
-
-
-/* Read a 16 bit Register of isp1761 */
-__u16 isp1761_reg_read16(struct isp1761_dev *dev,__u16 reg,__u16 data)
-{
- data = readw(dev->baseaddress+reg);
- return data;
-}
-
-/* Write a 16 bit Register of isp1761 */
-void isp1761_reg_write16(struct isp1761_dev *dev,__u16 reg,__u16 data)
-{
- //printk("Wrote to 0x%08x value 0x%04x\n", isp1761_base + reg, data);
- writew(data,dev->baseaddress+reg);
-
-}
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_mem_read
- *
- * Memory read using PIO method.
- *
- * Input: struct isp1761_driver *drv --> Driver structure.
- * __u32 start_add --> Starting address of memory
- * __u32 end_add ---> End address
- *
- * __u32 * buffer --> Buffer pointer.
- * __u32 length ---> Length
- * __u16 dir ---> Direction ( Inc or Dec)
- *
- * Output int Length ----> Number of bytes read
- *
- * Called by: system function
- *
- *
- *--------------------------------------------------------------*/
-/* Memory read function PIO */
-
-int
-isp1761_mem_read(struct isp1761_dev *dev, __u32 start_add,
- __u32 end_add, __u32 * buffer, __u32 length, __u16 dir)
-{
- u8 *temp_base_mem = 0;
- u8 *one = (u8 *) buffer;
- u16 *two = (u16 *) buffer;
- int a = (int)length;
- u32 w;
- temp_base_mem= (dev->baseaddress + start_add);
- /*initialize the Register 0x33C-used to manage Multiple threads */
- writel(start_add,dev->baseaddress+0x33c);
-
-last:
- w = readl(temp_base_mem);
- if(a == 1){
- *one=(u8)w;
- return 0;
- }
- if(a == 2){
- *two=(u16)w;
- return 0;
- }
-
-
- if(a == 3){
- *two=(u16)w;
- two += 1;
- w >>= 16;
- *two = (u8)(w);
- return 0;
-
- }
-
-
- while(a>0){
- *buffer = w;
- temp_base_mem = temp_base_mem+4;
- start_add +=4;
- a -= 4;
- if(a == 0)
- break;
- if(a < 4){
- buffer += 1;
- one = (u8 *)buffer;
- two = (u16 *)buffer;
- goto last;
- }
- buffer += 1;
- w = readl(temp_base_mem);
- }
- return ((a < 0) || (a == 0))?0:(-1);
-
-}
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_mem_write
- *
- * Memory write using PIO method.
- *
- * Input: struct isp1761_driver *drv --> Driver structure.
- * __u32 start_add --> Starting address of memory
- * __u32 end_add ---> End address
- *
- * __u32 * buffer --> Buffer pointer.
- * __u32 length ---> Length
- * __u16 dir ---> Direction ( Inc or Dec)
- *
- * Output int Length ----> Number of bytes read
- *
- * Called by: system function
- *
- *
- *--------------------------------------------------------------*/
-
-/* Memory read function IO */
-int
-isp1761_mem_write(struct isp1761_dev *dev,
- __u32 start_add, __u32 end_add,
- __u32 * buffer, __u32 length,
- __u16 dir)
-{
- u8 *temp_base_mem = 0;
- int a = length;
- //u8 *temp = (u8*)buffer;
- u8 one =(u8 )(*buffer);
- u16 two =(u16 )(*buffer);
- temp_base_mem = (dev->baseaddress + start_add);
-
- if(a == 1){
- writeb(one,temp_base_mem);
- return 0;
- }
- if(a == 2){
- writew(two,temp_base_mem);
- return 0;
- }
-
- while(a>0){
- writel(*buffer, temp_base_mem);
- temp_base_mem = temp_base_mem+4;
- start_add +=4;
- a -=4;
- if(a <= 0)
- break;
- buffer += 1;
-
- }
- return ((a < 0) || (a == 0))?0:(-1);
-
-}
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_check_mem_region
- *
- * Check the memory region for Memory Mapping
- * Check with the system about the availability of the region,
- * and returns success, if available.
- *
- * Input: struct isp1761_driver *drv --> Driver structure.
- *
- * Output result
- *
- *
- * Called by: system function
- *
- *
- *--------------------------------------------------------------*/
-
-int isp1761_check_mem_region(struct isp1761_dev *dev)
-{
- int ret;
- ret=check_mem_region(dev->start, dev->length);
- return ret;
-}/* End of isp1761_check_mem_region */
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_request_mem_region
- isp1761_release_mem_region
- isp1761_get_mem_params
-
- *
- * If the check returns Success, we can request the region for
- * Memory mapping of our chip memory
- *
- * Input: struct isp1761_driver *drv --> Driver structure.
- *
- * Output result
- *
- *
- * Called by: system function
- *
- *
- *--------------------------------------------------------------*/
-
-struct resource* isp1761_request_mem_region(struct isp1761_dev *dev)
-{
- dev->mem_res = request_mem_region(dev->start, dev->length, "Isp1761_device");
- return dev->mem_res;
-}/* End of isp1761_request_mem_region */
-
-/* Release an already acquired memory region.
- It should be done at the rmmod of the module */
-void isp1761_release_mem_region(struct isp1761_dev* dev)
-{
- release_mem_region (dev->start, dev->length);
-}
-
-/* Get the start address and length of Mapped Memory */
-void isp1761_get_mem_params(struct isp1761_dev *dev,struct isp1761_driver *drv)
-{
- dev->start =isp1761_loc_dev[drv->index].start;
- dev->length =isp1761_loc_dev[drv->index].length;
-}/* End of isp1761_get_mem_params*/
-
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_request_irq
- *
- * This function registers the ISR of driver with this driver.
- * Since there is only one interrupt line, when the first driver
- * is registerd, will call the system function request_irq. The PLX
- * bridge needs enabling of interrupt in the interrupt control register to
- * pass the local interrupts to the PCI (cpu).
- * For later registrations will just update the variables. On ISR, this driver
- * will look for registered handlers and calls the corresponding driver's
- * ISR "handler" function with "isr_data" as parameter.
- *
- * Input: struct
- * (void (*handler)(struct isp1761_dev *, void *)-->handler.
- * isp1761_driver *drv --> Driver structure.
- * Output result
- * 0= complete
- * 1= error.
- *
- * Called by: system function module_init
- *
- *
- *--------------------------------------------------------------*/
-
-int isp1761_request_irq(void (*handler)(struct isp1761_dev *, void *),
- struct isp1761_dev *dev, void *isr_data)
-{
- int result = 0;
- hal_entry("%s: Entered\n",__FUNCTION__);
- hal_int("isp1761_request_irq: dev->index %x\n",dev->index);
- if(dev->index == ISP1761_DC){
- result = request_irq(dev->irq, isp1761_pci_dc_isr,
- IRQF_SHARED,
- dev->name,
- isr_data);
- }else {
- result= request_irq(dev->irq,isp1761_pci_isr,
- IRQF_SHARED,
- dev->name,
- isr_data);
- }
-
- /*Interrupt handler routine*/
- dev->handler = handler;
- dev->isr_data = isr_data;
- hal_int("isp1761_request_irq: dev->handler %s\n",dev->handler);
- hal_int("isp1761_request_irq: dev->isr_data %x\n",dev->isr_data);
- hal_entry("%s: Exit\n",__FUNCTION__);
- return result;
-} /* End of isp1761_request_irq */
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_free_irq
- *
- * This function de-registers the ISR of driver with this driver.
- * Since there is only one interrupt line, when the last driver
- * is de-registerd, will call the system function free_irq. The PLX
- * bridge needs disabling of interrupt in the interrupt control register to
- * block the local interrupts to the PCI (cpu).
- *
- * Input: struct
- * (void (*handler)(struct isp1761_dev *, void *)-->handler.
- * isp1761_driver *drv --> Driver structure.
- * Output result
- * 0= complete
- * 1= error.
- *
- * Called by: system function module_init
- *
- *
- *--------------------------------------------------------------*/
-
-void isp1761_free_irq(struct isp1761_dev *dev, void *isr_data)
-{
- hal_int(("isp1761_free_irq(dev=%p,isr_data=%p)\n",dev,isr_data));
- free_irq(dev->irq,isr_data);
-} /* isp1761_free_irq */
-
-
-
-/* Allocate Fragmented kernel Memory */
-void* isp_1761_kmalloc(size_t size,int flags)
-{
- void* ret;
- ret =kmalloc(size,flags);
- return ret;
-}
-
-/* Free the memory allocated by kmalloc */
-void isp_1761_kfree(const void* objp)
-{
- kfree(objp);
-}
-
-/* Allocate Contiguous kernel Memory */
-void* isp_1761_vmalloc(__u32 size, __u16 flags, pgprot_t prot)
-{
- void* ret;
- ret = __vmalloc(size, flags, prot);
- return ret;
-}
-
-/* Free the memory allocated by vmalloc */
-void isp_1761_vfree(const void* objp)
-{
- kfree(objp);
-}
-
-
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_register_driver
- *
- * This function is used by top driver (OTG, HCD, DCD) to register
- * their communication functions (probe, remove, suspend, resume) using
- * the drv data structure.
- * This function will call the probe function of the driver if the ISP1761
- * corresponding to the driver is enabled
- *
- * Input: struct isp1761_driver *drv --> Driver structure.
- * Output result
- * 0= complete
- * 1= error.
- *
- * Called by: system function module_init
- *
- *
- *--------------------------------------------------------------*/
-
-int isp1761_register_driver(struct isp1761_driver *drv)
-{
- struct isp1761_dev *dev;
- int result;
- isp1761_id *id;
-
- hal_entry("%s: Entered\n",__FUNCTION__);
- info("isp1761_register_driver(drv=%p) \n",drv);
-
- if(!drv) return -EINVAL;
- dev = &isp1761_loc_dev[drv->index];
- if(drv->index == ISP1761_DC){/*FIX for device*/
- result = drv->probe(dev,drv->id);
- }else{
- id = drv->id;
- if(dev->active) result = drv->probe(dev,id);
- else result = -ENODEV;
- }
-
- if(result >= 0 ) {
- printk(KERN_INFO __FILE__ ": Registered Driver %s\n",
- drv->name);
- dev->driver = drv;
- }
- hal_entry("%s: Exit\n",__FUNCTION__);
- return result;
-} /* End of isp1761_register_driver */
-
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_unregister_driver
- *
- * This function is used by top driver (OTG, HCD, DCD) to de-register
- * their communication functions (probe, remove, suspend, resume) using
- * the drv data structure.
- * This function will check whether the driver is registered or not and
- * call the remove function of the driver if registered
- *
- * Input: struct isp1761_driver *drv --> Driver structure.
- * Output result
- * 0= complete
- * 1= error.
- *
- * Called by: system function module_init
- *
- *
- *--------------------------------------------------------------*/
-
-
-void isp1761_unregister_driver(struct isp1761_driver *drv)
-{
- struct isp1761_dev *dev;
- hal_entry("%s: Entered\n",__FUNCTION__);
-
- info("isp1761_unregister_driver(drv=%p)\n",drv);
- dev = &isp1761_loc_dev[drv->index];
- if(dev->driver == drv) {
- /* driver registered is same as the requestig driver */
- drv->remove(dev);
- dev->driver = NULL;
- info(": De-registered Driver %s\n",
- drv->name);
- return;
- }
- hal_entry("%s: Exit\n",__FUNCTION__);
-} /* End of isp1761_unregister_driver */
-
-
-/*--------------------------------------------------------------*
- * ISP1761 PCI driver interface routine.
- *--------------------------------------------------------------*/
-
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_module_init
- *
- * This is the module initialization function. It registers to
- * PCI driver for a PLX PCI bridge device. And also resets the
- * internal data structures before registering to PCI driver.
- *
- * Input: void
- * Output result
- * 0= complete
- * 1= error.
- *
- * Called by: system function module_init
- *
- *
- *
- -------------------------------------------------------------------*/
-static int __init isp1761_module_init (void)
-{
- int result = 0;
- hal_entry("%s: Entered\n",__FUNCTION__);
-
- memset(isp1761_loc_dev,0,sizeof(isp1761_loc_dev));
-
- result = platform_driver_register(&isp1761_platform_driver);
-
- hal_entry("%s: Exit\n",__FUNCTION__);
- return result;
-}
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_module_cleanup
- *
- * This is the module cleanup function. It de-registers from
- * PCI driver and resets the internal data structures.
- *
- * Input: void
- * Output void
- *
- * Called by: system function module_cleanup
- *
- *
- *
- --------------------------------------------------------------*/
-
-static void __exit isp1761_module_cleanup (void)
-{
- printk("Hal Module Cleanup\n");
- platform_driver_unregister(&isp1761_platform_driver);
- memset(isp1761_loc_dev,0,sizeof(isp1761_loc_dev));
-}
-
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_probe
- *
- * PCI probe function of ISP1761
- * This function is called from PCI Driver as an initialization function
- * when it founds the PCI device. This functions initializes the information
- * for the 3 Controllers with the assigned resources and tests the register
- * access to these controllers and do a software reset and makes them ready
- * for the drivers to play with them.
- *
- * Input:
- * struct pci_dev *dev ----> PCI Devie data structure
- * const struct pci_device_id *id ----> PCI Device ID
- * Output void
- *
- * Called by: system function module_cleanup
- *
- *
- *
- --------------------------------------------------------------**/
-
- static int __devinit
-isp1761_probe (struct platform_device *pdev)
-{
- __u32 reg_data = 0;
- struct isp1761_dev *loc_dev;
- struct resource *res;
- void *address = 0;
- int length = ISP1761_IO_EXTENT;
- int status = 0;
- hal_entry("%s: Entered\n",__FUNCTION__);
-
- res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "isp1761-regs");
- if (!res)
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (!res)
- return -ENODEV;
-
- isp1761_base = res->start;
- hal_init(("isp1761 pci base address = %x\n", isp1761_base));
-
- /* Get the Host Controller IO and INT resources
- */
- loc_dev = &(isp1761_loc_dev[ISP1761_HC]);
- loc_dev->dev = &pdev->dev;
- loc_dev->irq = platform_get_irq(pdev, 0);
- loc_dev->io_base = isp1761_base;
- loc_dev->start = isp1761_base;
- loc_dev->length = ISP1761_REGSET_LEN;
- loc_dev->io_len = ISP1761_REGSET_LEN; /*64K*/
- loc_dev->index = ISP1761_HC;/*zero*/
-
- loc_dev->io_len = length;
- if(check_mem_region(loc_dev->io_base,length)<0){
- err("host controller already in use\n");
- return -EBUSY;
- }
- if(!request_mem_region(loc_dev->io_base, length,isp1761_driver_name)){
- err("host controller already in use\n");
- return -EBUSY;
-
- }
-
- /*map available memory*/
- address = ioremap_nocache(isp1761_base,length);
- if(address == NULL){
- err("memory map problem\n");
- release_mem_region(loc_dev->io_base,length);
- return -ENOMEM;
- }
-
- loc_dev->baseaddress = (u8*)address;
- //loc_dev->dmabase = (u8*)iobase;
-
- hal_init(("isp1761 HC MEM Base= %p irq = %d\n",
- loc_dev->baseaddress,loc_dev->irq));
-#ifdef ISP1761_DEVICE
-
- /*initialize device controller framework*/
- loc_dev = &(isp1761_loc_dev[ISP1761_DC]);
- loc_dev->dev = &pdev->dev;
- loc_dev->irq = platform_get_irq(pdev, 0);
- loc_dev->io_base = isp1761_base;
- loc_dev->start = isp1761_base;
- loc_dev->length = ISP1761_REGSET_LEN;
- loc_dev->io_len = ISP1761_REGSET_LEN;
- loc_dev->index = ISP1761_DC;
- loc_dev->baseaddress = address;
- loc_dev->active = 1;
- memcpy(loc_dev->name,"isp1761_dev",11);
- loc_dev->name[12] = '\0';
-
-
- {
- u32 chipid = 0;
- chipid = readl(address + 0x270);
- info("pid %04x, vid %04x\n", (chipid & 0xffff), (chipid >> 16));
- }
- hal_init(("isp1761 DC MEM Base= %lx irq = %d\n",
- loc_dev->io_base,loc_dev->irq));
- /* Get the OTG Controller IO and INT resources
- * OTG controller resources are same as Host Controller resources
- */
- loc_dev = &(isp1761_loc_dev[ISP1761_OTG]);
- loc_dev->dev = &pdev->dev;
- loc_dev->irq = platform_get_irq(pdev, 0);
- loc_dev->io_base = isp1761_base;
- loc_dev->start = isp1761_base;
- loc_dev->length = ISP1761_REGSET_LEN;
- loc_dev->io_len = ISP1761_REGSET_LEN;
- loc_dev->index = ISP1761_OTG;
- loc_dev->baseaddress = address; /*having the same address as of host*/
- loc_dev->active = 1;
- memcpy(loc_dev->name,"isp1761_otg",11);
- loc_dev->name[12] = '\0';
-
- hal_init(("isp1761 OTG MEM Base= %lx irq = %x\n",
- loc_dev->io_base,loc_dev->irq));
-
-#endif
-
- /* Try to check whether we can access Scratch Register of
- * Host Controller or not.
- */
-
-#if 1 // CUSTOM STUFF - 16-bit mode
- isp1761_reg_write32(loc_dev, HC_HW_MODE_REG, 2);
-#endif
-
- loc_dev = &(isp1761_loc_dev[ISP1761_HC]);
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/delay.h>
+#include <linux/ioport.h>
+#include <linux/sched.h>
+#include <linux/slab.h>
+#include <linux/smp_lock.h>
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/timer.h>
+#include <linux/list.h>
+#include <linux/interrupt.h>
+#include <linux/usb.h>
+#include <linux/poll.h>
+#include <linux/platform_device.h>
+#include <linux/vmalloc.h>
+#include <asm/io.h>
+#include <asm/irq.h>
+#include <asm/system.h>
+#include <asm/unaligned.h>
+#include <asm/dma.h>
+
+/*--------------------------------------------------------------*
+ * linux system include files
+ *--------------------------------------------------------------*/
+#include "hal_x86.h" // We can use the x86 headers for now.
+#include "../hal/hal_intf.h"
+#include "../hal/isp1761.h"
+
+/*--------------------------------------------------------------*
+ * Local variable Definitions
+ *--------------------------------------------------------------*/
+struct isp1761_dev isp1761_loc_dev[ISP1761_LAST_DEV];
+static struct isp1761_hal hal_data;
+static struct platform_device *s_pdev;
+int iolength = 0;
+static __u32 isp1761_base = 0;
+
+/*--------------------------------------------------------------*
+ * Local # Definitions
+ *--------------------------------------------------------------*/
+#define isp1761_driver_name "1761-m6"
+#define ISP1761_IO_EXTENT ((1 << 17)-1) // 17 address bits used.
+#define ISP1761_REGSET_LEN 0xffff
+
+#undef CONFIG_PM /* PM no workie yet. */
+
+/*--------------------------------------------------------------*
+ * Local Function
+ *--------------------------------------------------------------*/
+
+static int __devexit isp1761_remove (struct platform_device *pdev);
+static int __devinit isp1761_probe (struct platform_device *pdev);
+#ifdef CONFIG_PM
+static int isp1761_pci_suspend (struct pci_dev *dev, __u32 state);
+static int isp1761_pci_resume (struct pci_dev *dev);
+#endif
+static irqreturn_t isp1761_pci_isr (int irq, void *dev_id);
+
+
+/*--------------------------------------------------------------*
+ * ISP 1761 interrupt locking functions
+ *--------------------------------------------------------------*/
+int isp1761_hw_lock = 0;
+int isp1761_hw_isr = 0;
+
+void isp1761_disable_interrupt(int irq) {
+ /* DUMMY functions
+ * Not used */
+ disable_irq(irq);
+ return;
+}
+void isp1761_enable_interrupt(int irq) {
+ /* DUMMY functions
+ * Not used */
+ enable_irq(irq);
+ return;
+}
+
+/*--------------------------------------------------------------*
+ * ISP1761 Interrupt Service Routine
+ *--------------------------------------------------------------*/
+/*Interrupt Service Routine for device controller*/
+irqreturn_t isp1761_pci_dc_isr(int irq, void *data)
+{
+ struct isp1761_dev *dev;
+ dev = &isp1761_loc_dev[ISP1761_DC];
+
+ hal_entry("%s: Entered\n",__FUNCTION__);
+ /*not ready yet*/
+ if(dev->active == 0)
+ {
+ printk("isp1761_pci_dc_isr: dev->active is NULL \n");
+ return IRQ_NONE;
+ }
+
+ /* Get the source of interrupts for Device Controller
+ * Device Controller interrupts are cleared by the driver
+ * during processing
+ */
+
+ /*unblock the device interrupt*/
+
+ isp1761_reg_write32(dev, DEV_UNLOCK_REGISTER, 0xaa37);
+ dev->int_reg = isp1761_reg_read32(dev, DEV_INTERRUPT_REGISTER, dev->int_reg);
+ hal_int("isp1761_pci_dc_isr:INTERRUPT_REGISTER 0x%x\n",dev->int_reg);
+ /*clear the interrupt source*/
+ isp1761_reg_write32(dev, 0x218, dev->int_reg);
+ dev->int_reg &= 0x03fffdb9;
+ if(dev->int_reg)
+ dev->handler(dev, dev->isr_data);
+ hal_entry("%s: Exit\n",__FUNCTION__);
+ return IRQ_HANDLED;
+}
+
+/* Interrupt Service Routine of isp1761
+ * Reads the source of interrupt and calls the corresponding driver's ISR.
+ * Before calling the driver's ISR clears the source of interrupt.
+ * The drivers can get the source of interrupt from the dev->int_reg field
+ */
+irqreturn_t isp1761_pci_isr(int irq, void *__data)
+{
+ __u32 irq_mask = 0;
+ struct isp1761_dev *dev;
+ hal_entry("%s: Entered\n",__FUNCTION__);
+ /* Process the Host Controller Driver */
+ dev = &isp1761_loc_dev[ISP1761_HC];
+ /* Get the source of interrupts for Host Controller*/
+ dev->int_reg = isp1761_reg_read32(dev, HC_INTERRUPT_REG,dev->int_reg);
+ isp1761_reg_write32(dev,HC_INTERRUPT_REG,dev->int_reg);
+ irq_mask = isp1761_reg_read32(dev, HC_INTENABLE_REG,irq_mask);
+
+ dev->int_reg &= irq_mask; /*shared irq ??*/
+ /*call the Host Isr if any valid(minus otg)interrupt is present*/
+ if(dev->int_reg & ~HC_OTG_INTERRUPT)
+ dev->handler(dev,dev->isr_data);
+#ifdef OTG
+#ifndef MSEC_INT_BASED
+ mdelay(1);
+#endif
+ /*process otg interrupt if there is any*/
+ if(dev->int_reg & HC_OTG_INTERRUPT){
+ u32 otg_int;
+#ifndef MSEC_INT_BASED
+ mdelay(1);
+#endif
+ otg_int = (dev->int_reg & HC_OTG_INTERRUPT);
+ /* Process OTG controller Driver
+ * Since OTG is part of HC interrupt register,
+ * the interrupt source will be HC interrupt Register
+ * */
+ dev = &isp1761_loc_dev[ISP1761_OTG];
+ /* Read the source of OTG_INT and clear the
+ interrupt source */
+ dev->int_reg = otg_int;
+ dev->handler(dev, dev->isr_data);
+ }
+#endif
+ hal_entry("%s: Exit\n",__FUNCTION__);
+ return IRQ_HANDLED;
+} /* End of isp1362_pci_isr */
+
+/*--------------------------------------------------------------*
+ * PCI Driver Interface Functions
+ *--------------------------------------------------------------*/
+
+/* Pci driver interface functions */
+static struct platform_driver isp1761_platform_driver = {
+probe: isp1761_probe,
+remove: isp1761_remove,
+driver: { .name = "isp1761" }
+};
+
+
+/*--------------------------------------------------------------*
+ * ISP1761 Read write routine
+ *--------------------------------------------------------------*/
+
+/* Write a 32 bit Register of isp1761 */
+void isp1761_reg_write32(struct isp1761_dev *dev,__u16 reg,__u32 data)
+{
+ /* Write the 32bit to the register address given to us*/
+ writel(data,dev->baseaddress+reg);
+ //printk("Wrote to 0x%08x value 0x%08x\n", isp1761_base + reg, data);
+}
+
+
+/* Read a 32 bit Register of isp1761 */
+__u32 isp1761_reg_read32(struct isp1761_dev *dev,__u16 reg,__u32 data)
+{
+
+ data = readl(dev->baseaddress + reg);
+ //printk("Read from 0x%08x is 0x%08x\n", isp1761_base + reg, data);
+ return data;
+}
+
+
+/* Read a 16 bit Register of isp1761 */
+__u16 isp1761_reg_read16(struct isp1761_dev *dev,__u16 reg,__u16 data)
+{
+ data = readw(dev->baseaddress+reg);
+ return data;
+}
+
+/* Write a 16 bit Register of isp1761 */
+void isp1761_reg_write16(struct isp1761_dev *dev,__u16 reg,__u16 data)
+{
+ //printk("Wrote to 0x%08x value 0x%04x\n", isp1761_base + reg, data);
+ writew(data,dev->baseaddress+reg);
+
+}
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_mem_read
+ *
+ * Memory read using PIO method.
+ *
+ * Input: struct isp1761_driver *drv --> Driver structure.
+ * __u32 start_add --> Starting address of memory
+ * __u32 end_add ---> End address
+ *
+ * __u32 * buffer --> Buffer pointer.
+ * __u32 length ---> Length
+ * __u16 dir ---> Direction ( Inc or Dec)
+ *
+ * Output int Length ----> Number of bytes read
+ *
+ * Called by: system function
+ *
+ *
+ *--------------------------------------------------------------*/
+/* Memory read function PIO */
+
+int
+isp1761_mem_read(struct isp1761_dev *dev, __u32 start_add,
+ __u32 end_add, __u32 * buffer, __u32 length, __u16 dir)
+{
+ u8 *temp_base_mem = 0;
+ u8 *one = (u8 *) buffer;
+ u16 *two = (u16 *) buffer;
+ int a = (int)length;
+ u32 w;
+ temp_base_mem= (dev->baseaddress + start_add);
+ /*initialize the Register 0x33C-used to manage Multiple threads */
+ writel(start_add,dev->baseaddress+0x33c);
+
+last:
+ w = readl(temp_base_mem);
+ if(a == 1){
+ *one=(u8)w;
+ return 0;
+ }
+ if(a == 2){
+ *two=(u16)w;
+ return 0;
+ }
+
+
+ if(a == 3){
+ *two=(u16)w;
+ two += 1;
+ w >>= 16;
+ *two = (u8)(w);
+ return 0;
+
+ }
+
+
+ while(a>0){
+ *buffer = w;
+ temp_base_mem = temp_base_mem+4;
+ start_add +=4;
+ a -= 4;
+ if(a == 0)
+ break;
+ if(a < 4){
+ buffer += 1;
+ one = (u8 *)buffer;
+ two = (u16 *)buffer;
+ goto last;
+ }
+ buffer += 1;
+ w = readl(temp_base_mem);
+ }
+ return ((a < 0) || (a == 0))?0:(-1);
+
+}
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_mem_write
+ *
+ * Memory write using PIO method.
+ *
+ * Input: struct isp1761_driver *drv --> Driver structure.
+ * __u32 start_add --> Starting address of memory
+ * __u32 end_add ---> End address
+ *
+ * __u32 * buffer --> Buffer pointer.
+ * __u32 length ---> Length
+ * __u16 dir ---> Direction ( Inc or Dec)
+ *
+ * Output int Length ----> Number of bytes read
+ *
+ * Called by: system function
+ *
+ *
+ *--------------------------------------------------------------*/
+
+/* Memory read function IO */
+int
+isp1761_mem_write(struct isp1761_dev *dev,
+ __u32 start_add, __u32 end_add,
+ __u32 * buffer, __u32 length,
+ __u16 dir)
+{
+ u8 *temp_base_mem = 0;
+ int a = length;
+ //u8 *temp = (u8*)buffer;
+ u8 one =(u8 )(*buffer);
+ u16 two =(u16 )(*buffer);
+ temp_base_mem = (dev->baseaddress + start_add);
+
+ if(a == 1){
+ writeb(one,temp_base_mem);
+ return 0;
+ }
+ if(a == 2){
+ writew(two,temp_base_mem);
+ return 0;
+ }
+
+ while(a>0){
+ writel(*buffer, temp_base_mem);
+ temp_base_mem = temp_base_mem+4;
+ start_add +=4;
+ a -=4;
+ if(a <= 0)
+ break;
+ buffer += 1;
+
+ }
+ return ((a < 0) || (a == 0))?0:(-1);
+
+}
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_check_mem_region
+ *
+ * Check the memory region for Memory Mapping
+ * Check with the system about the availability of the region,
+ * and returns success, if available.
+ *
+ * Input: struct isp1761_driver *drv --> Driver structure.
+ *
+ * Output result
+ *
+ *
+ * Called by: system function
+ *
+ *
+ *--------------------------------------------------------------*/
+
+int isp1761_check_mem_region(struct isp1761_dev *dev)
+{
+ int ret;
+ ret=check_mem_region(dev->start, dev->length);
+ return ret;
+}/* End of isp1761_check_mem_region */
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_request_mem_region
+ isp1761_release_mem_region
+ isp1761_get_mem_params
+
+ *
+ * If the check returns Success, we can request the region for
+ * Memory mapping of our chip memory
+ *
+ * Input: struct isp1761_driver *drv --> Driver structure.
+ *
+ * Output result
+ *
+ *
+ * Called by: system function
+ *
+ *
+ *--------------------------------------------------------------*/
+
+struct resource* isp1761_request_mem_region(struct isp1761_dev *dev)
+{
+ dev->mem_res = request_mem_region(dev->start, dev->length, "Isp1761_device");
+ return dev->mem_res;
+}/* End of isp1761_request_mem_region */
+
+/* Release an already acquired memory region.
+ It should be done at the rmmod of the module */
+void isp1761_release_mem_region(struct isp1761_dev* dev)
+{
+ release_mem_region (dev->start, dev->length);
+}
+
+/* Get the start address and length of Mapped Memory */
+void isp1761_get_mem_params(struct isp1761_dev *dev,struct isp1761_driver *drv)
+{
+ dev->start =isp1761_loc_dev[drv->index].start;
+ dev->length =isp1761_loc_dev[drv->index].length;
+}/* End of isp1761_get_mem_params*/
+
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_request_irq
+ *
+ * This function registers the ISR of driver with this driver.
+ * Since there is only one interrupt line, when the first driver
+ * is registerd, will call the system function request_irq. The PLX
+ * bridge needs enabling of interrupt in the interrupt control register to
+ * pass the local interrupts to the PCI (cpu).
+ * For later registrations will just update the variables. On ISR, this driver
+ * will look for registered handlers and calls the corresponding driver's
+ * ISR "handler" function with "isr_data" as parameter.
+ *
+ * Input: struct
+ * (void (*handler)(struct isp1761_dev *, void *)-->handler.
+ * isp1761_driver *drv --> Driver structure.
+ * Output result
+ * 0= complete
+ * 1= error.
+ *
+ * Called by: system function module_init
+ *
+ *
+ *--------------------------------------------------------------*/
+
+int isp1761_request_irq(void (*handler)(struct isp1761_dev *, void *),
+ struct isp1761_dev *dev, void *isr_data)
+{
+ int result = 0;
+ hal_entry("%s: Entered\n",__FUNCTION__);
+ hal_int("isp1761_request_irq: dev->index %x\n",dev->index);
+ if(dev->index == ISP1761_DC){
+ result = request_irq(dev->irq, isp1761_pci_dc_isr,
+ IRQF_SHARED,
+ dev->name,
+ isr_data);
+ }else {
+ result= request_irq(dev->irq,isp1761_pci_isr,
+ IRQF_SHARED,
+ dev->name,
+ isr_data);
+ }
+
+ /*Interrupt handler routine*/
+ dev->handler = handler;
+ dev->isr_data = isr_data;
+ hal_int("isp1761_request_irq: dev->handler %s\n",dev->handler);
+ hal_int("isp1761_request_irq: dev->isr_data %x\n",dev->isr_data);
+ hal_entry("%s: Exit\n",__FUNCTION__);
+ return result;
+} /* End of isp1761_request_irq */
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_free_irq
+ *
+ * This function de-registers the ISR of driver with this driver.
+ * Since there is only one interrupt line, when the last driver
+ * is de-registerd, will call the system function free_irq. The PLX
+ * bridge needs disabling of interrupt in the interrupt control register to
+ * block the local interrupts to the PCI (cpu).
+ *
+ * Input: struct
+ * (void (*handler)(struct isp1761_dev *, void *)-->handler.
+ * isp1761_driver *drv --> Driver structure.
+ * Output result
+ * 0= complete
+ * 1= error.
+ *
+ * Called by: system function module_init
+ *
+ *
+ *--------------------------------------------------------------*/
+
+void isp1761_free_irq(struct isp1761_dev *dev, void *isr_data)
+{
+ hal_int(("isp1761_free_irq(dev=%p,isr_data=%p)\n",dev,isr_data));
+ free_irq(dev->irq,isr_data);
+} /* isp1761_free_irq */
+
+
+
+/* Allocate Fragmented kernel Memory */
+void* isp_1761_kmalloc(size_t size,int flags)
+{
+ void* ret;
+ ret =kmalloc(size,flags);
+ return ret;
+}
+
+/* Free the memory allocated by kmalloc */
+void isp_1761_kfree(const void* objp)
+{
+ kfree(objp);
+}
+
+/* Allocate Contiguous kernel Memory */
+void* isp_1761_vmalloc(__u32 size, __u16 flags, pgprot_t prot)
+{
+ void* ret;
+ ret = __vmalloc(size, flags, prot);
+ return ret;
+}
+
+/* Free the memory allocated by vmalloc */
+void isp_1761_vfree(const void* objp)
+{
+ kfree(objp);
+}
+
+
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_register_driver
+ *
+ * This function is used by top driver (OTG, HCD, DCD) to register
+ * their communication functions (probe, remove, suspend, resume) using
+ * the drv data structure.
+ * This function will call the probe function of the driver if the ISP1761
+ * corresponding to the driver is enabled
+ *
+ * Input: struct isp1761_driver *drv --> Driver structure.
+ * Output result
+ * 0= complete
+ * 1= error.
+ *
+ * Called by: system function module_init
+ *
+ *
+ *--------------------------------------------------------------*/
+
+int isp1761_register_driver(struct isp1761_driver *drv)
+{
+ struct isp1761_dev *dev;
+ int result;
+ isp1761_id *id;
+
+ hal_entry("%s: Entered\n",__FUNCTION__);
+ info("isp1761_register_driver(drv=%p) \n",drv);
+
+ if(!drv) return -EINVAL;
+ dev = &isp1761_loc_dev[drv->index];
+ if(drv->index == ISP1761_DC){/*FIX for device*/
+ result = drv->probe(dev,drv->id);
+ }else{
+ id = drv->id;
+ if(dev->active) result = drv->probe(dev,id);
+ else result = -ENODEV;
+ }
+
+ if(result >= 0 ) {
+ printk(KERN_INFO __FILE__ ": Registered Driver %s\n",
+ drv->name);
+ dev->driver = drv;
+ }
+ hal_entry("%s: Exit\n",__FUNCTION__);
+ return result;
+} /* End of isp1761_register_driver */
+
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_unregister_driver
+ *
+ * This function is used by top driver (OTG, HCD, DCD) to de-register
+ * their communication functions (probe, remove, suspend, resume) using
+ * the drv data structure.
+ * This function will check whether the driver is registered or not and
+ * call the remove function of the driver if registered
+ *
+ * Input: struct isp1761_driver *drv --> Driver structure.
+ * Output result
+ * 0= complete
+ * 1= error.
+ *
+ * Called by: system function module_init
+ *
+ *
+ *--------------------------------------------------------------*/
+
+
+void isp1761_unregister_driver(struct isp1761_driver *drv)
+{
+ struct isp1761_dev *dev;
+ hal_entry("%s: Entered\n",__FUNCTION__);
+
+ info("isp1761_unregister_driver(drv=%p)\n",drv);
+ dev = &isp1761_loc_dev[drv->index];
+ if(dev->driver == drv) {
+ /* driver registered is same as the requestig driver */
+ drv->remove(dev);
+ dev->driver = NULL;
+ info(": De-registered Driver %s\n",
+ drv->name);
+ return;
+ }
+ hal_entry("%s: Exit\n",__FUNCTION__);
+} /* End of isp1761_unregister_driver */
+
+
+/*--------------------------------------------------------------*
+ * ISP1761 PCI driver interface routine.
+ *--------------------------------------------------------------*/
+
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_module_init
+ *
+ * This is the module initialization function. It registers to
+ * PCI driver for a PLX PCI bridge device. And also resets the
+ * internal data structures before registering to PCI driver.
+ *
+ * Input: void
+ * Output result
+ * 0= complete
+ * 1= error.
+ *
+ * Called by: system function module_init
+ *
+ *
+ *
+ -------------------------------------------------------------------*/
+static int __init isp1761_module_init (void)
+{
+ int result = 0;
+ hal_entry("%s: Entered\n",__FUNCTION__);
+
+ memset(isp1761_loc_dev,0,sizeof(isp1761_loc_dev));
+
+ result = platform_driver_register(&isp1761_platform_driver);
+
+ hal_entry("%s: Exit\n",__FUNCTION__);
+ return result;
+}
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_module_cleanup
+ *
+ * This is the module cleanup function. It de-registers from
+ * PCI driver and resets the internal data structures.
+ *
+ * Input: void
+ * Output void
+ *
+ * Called by: system function module_cleanup
+ *
+ *
+ *
+ --------------------------------------------------------------*/
+
+static void __exit isp1761_module_cleanup (void)
+{
+ printk("Hal Module Cleanup\n");
+ platform_driver_unregister(&isp1761_platform_driver);
+ memset(isp1761_loc_dev,0,sizeof(isp1761_loc_dev));
+}
+
+
+/*--------------------------------------------------------------*
+ *
+ * Module dtatils: isp1761_probe
+ *
+ * PCI probe function of ISP1761
+ * This function is called from PCI Driver as an initialization function
+ * when it founds the PCI device. This functions initializes the information
+ * for the 3 Controllers with the assigned resources and tests the register
+ * access to these controllers and do a software reset and makes them ready
+ * for the drivers to play with them.
+ *
+ * Input:
+ * struct pci_dev *dev ----> PCI Devie data structure
+ * const struct pci_device_id *id ----> PCI Device ID
+ * Output void
+ *
+ * Called by: system function module_cleanup
+ *
+ *
+ *
+ --------------------------------------------------------------**/
+
+ static int __devinit
+isp1761_probe (struct platform_device *pdev)
+{
+ __u32 reg_data = 0;
+ struct isp1761_dev *loc_dev;
+ struct resource *res;
+ void *address = 0;
+ int length = ISP1761_IO_EXTENT;
+ int status = 0;
+ hal_entry("%s: Entered\n",__FUNCTION__);
+
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "isp1761-regs");
+ if (!res)
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+ if (!res)
+ return -ENODEV;
+
+ isp1761_base = res->start;
+ hal_init(("isp1761 pci base address = %x\n", isp1761_base));
+
+ /* Get the Host Controller IO and INT resources
+ */
+ loc_dev = &(isp1761_loc_dev[ISP1761_HC]);
+ loc_dev->dev = &pdev->dev;
+ loc_dev->irq = platform_get_irq(pdev, 0);
+ loc_dev->io_base = isp1761_base;
+ loc_dev->start = isp1761_base;
+ loc_dev->length = ISP1761_REGSET_LEN;
+ loc_dev->io_len = ISP1761_REGSET_LEN; /*64K*/
+ loc_dev->index = ISP1761_HC;/*zero*/
+
+ loc_dev->io_len = length;
+ if(check_mem_region(loc_dev->io_base,length)<0){
+ err("host controller already in use\n");
+ return -EBUSY;
+ }
+ if(!request_mem_region(loc_dev->io_base, length,isp1761_driver_name)){
+ err("host controller already in use\n");
+ return -EBUSY;
+
+ }
+
+ /*map available memory*/
+ address = ioremap_nocache(isp1761_base,length);
+ if(address == NULL){
+ err("memory map problem\n");
+ release_mem_region(loc_dev->io_base,length);
+ return -ENOMEM;
+ }
+
+ loc_dev->baseaddress = (u8*)address;
+ //loc_dev->dmabase = (u8*)iobase;
+
+ hal_init(("isp1761 HC MEM Base= %p irq = %d\n",
+ loc_dev->baseaddress,loc_dev->irq));
+#ifdef ISP1761_DEVICE
+
+ /*initialize device controller framework*/
+ loc_dev = &(isp1761_loc_dev[ISP1761_DC]);
+ loc_dev->dev = &pdev->dev;
+ loc_dev->irq = platform_get_irq(pdev, 0);
+ loc_dev->io_base = isp1761_base;
+ loc_dev->start = isp1761_base;
+ loc_dev->length = ISP1761_REGSET_LEN;
+ loc_dev->io_len = ISP1761_REGSET_LEN;
+ loc_dev->index = ISP1761_DC;
+ loc_dev->baseaddress = address;
+ loc_dev->active = 1;
+ memcpy(loc_dev->name,"isp1761_dev",11);
+ loc_dev->name[12] = '\0';
+
+
+ {
+ u32 chipid = 0;
+ chipid = readl(address + 0x270);
+ info("pid %04x, vid %04x\n", (chipid & 0xffff), (chipid >> 16));
+ }
+ hal_init(("isp1761 DC MEM Base= %lx irq = %d\n",
+ loc_dev->io_base,loc_dev->irq));
+ /* Get the OTG Controller IO and INT resources
+ * OTG controller resources are same as Host Controller resources
+ */
+ loc_dev = &(isp1761_loc_dev[ISP1761_OTG]);
+ loc_dev->dev = &pdev->dev;
+ loc_dev->irq = platform_get_irq(pdev, 0);
+ loc_dev->io_base = isp1761_base;
+ loc_dev->start = isp1761_base;
+ loc_dev->length = ISP1761_REGSET_LEN;
+ loc_dev->io_len = ISP1761_REGSET_LEN;
+ loc_dev->index = ISP1761_OTG;
+ loc_dev->baseaddress = address; /*having the same address as of host*/
+ loc_dev->active = 1;
+ memcpy(loc_dev->name,"isp1761_otg",11);
+ loc_dev->name[12] = '\0';
+
+ hal_init(("isp1761 OTG MEM Base= %lx irq = %x\n",
+ loc_dev->io_base,loc_dev->irq));
+
+#endif
+
+ /* Try to check whether we can access Scratch Register of
+ * Host Controller or not.
+ */
+
+#if 1 // CUSTOM STUFF - 16-bit mode
+ isp1761_reg_write32(loc_dev, HC_HW_MODE_REG, 2);
+#endif
+
+ loc_dev = &(isp1761_loc_dev[ISP1761_HC]);
isp1761_reg_write16(loc_dev, HC_SCRATCH_REG, 0xFACE);
/* perform a read of the chip ID to avoir bus hold effect when
- * reading back the scratch register */
- isp1761_reg_read16(loc_dev, HC_CHIP_ID_REG, reg_data);
- udelay(100);
- reg_data = isp1761_reg_read16(loc_dev, HC_SCRATCH_REG,reg_data);
-
- /* Host Controller presence is detected by writing to scratch register
- * and reading back and checking the contents are same or not
- */
- if(reg_data != 0xFACE) {
- err("%s scratch register mismatch %x. Unable to find the ISP176x device",
- isp1761_driver_name,reg_data);
- status = -ENODEV;
- goto clean;
- }
-
- memcpy(loc_dev->name, isp1761_driver_name, sizeof(isp1761_driver_name));
- loc_dev->name[sizeof(isp1761_driver_name)] = 0;
- loc_dev->active = 1;
-
- info("controller address %p\n", &pdev->dev);
-
- s_pdev = pdev;
- hal_data.irq_usage = 0;
- hal_entry("%s: Exit\n",__FUNCTION__);
- return 0;
-
-clean:
- release_mem_region(loc_dev->io_base, loc_dev->io_len);
- iounmap(loc_dev->baseaddress);
- hal_entry("%s: Exit\n",__FUNCTION__);
- return status;
-} /* End of isp1761_probe */
-
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_remove
- *
- * PCI cleanup function of ISP1761
- * This function is called from PCI Driver as an removal function
- * in the absence of PCI device or a de-registration of driver.
- * This functions checks the registerd drivers (HCD, DCD, OTG) and calls
- * the corresponding removal functions. Also initializes the local variables
- * to zero.
- *
- * Input:
- * struct pci_dev *dev ----> PCI Devie data structure
- *
- * Output void
- *
- * Called by: system function module_cleanup
- *
- *
- *
- --------------------------------------------------------------*/
-static int __devexit
-isp1761_remove (struct platform_device *pdev)
-{
- struct isp1761_dev *loc_dev;
- hal_init(("isp1761_remove(dev=%p)\n",pdev));
- /*Lets handle the host first*/
- loc_dev = &isp1761_loc_dev[ISP1761_HC];
- /*free the memory occupied by host*/
- release_mem_region(loc_dev->io_base, loc_dev->io_len);
- /*unmap the occupied memory resources*/
- iounmap(loc_dev->baseaddress);
- s_pdev = NULL;
- return 0;
-} /* End of isp1761_remove */
-
-/*--------------------------------------------------------------*
- *
- * Module dtatils: isp1761_pci_suspend
- *
- * PCI suspend function of ISP1761
- * This function is called from PCI Driver.
- * This functions checks the registerd drivers (HCD, DCD, OTG) and calls
- * the corresponding suspend functions if present.
- * Input:
- * struct pci_dev *dev ----> PCI Devie data structure
- *
- * Output void
- *
- * Called by: system function
- *
- *
- *
- --------------------------------------------------------------*/
-
-#ifdef CONFIG_PM
-static int isp1761_pci_suspend (struct pci_dev *dev, __u32 state)
-{
- struct isp1761_dev *loc_dev;
- int index;
-
- hal_init(("isp1761_pci_suspend(dev=%p, state = %x)\n",dev, state));
-
-
- loc_dev = (struct isp1761_dev *)pci_get_drvdata(dev);
-
- /* For each controller check whether driver is registerd
- * or not. If registerd call the suspend function if it is
- * present
- */
- for(index=ISP1761_1ST_DEV;index<ISP1761_LAST_DEV;(index++,loc_dev++)) {
- if(loc_dev->driver && loc_dev->driver->su...
[truncated message content] |
|
From: <Fa...@us...> - 2008-11-06 10:14:22
|
Revision: 912
http://armadeus.svn.sourceforge.net/armadeus/?rev=912&view=rev
Author: FabM
Date: 2008-11-06 10:14:16 +0000 (Thu, 06 Nov 2008)
Log Message:
-----------
[Linux] Make uart2 work
Modified Paths:
--------------
trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch
Modified: trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch
===================================================================
--- trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch 2008-11-04 22:33:38 UTC (rev 911)
+++ trunk/buildroot/target/device/armadeus/linux/kernel-patches/2.6.23.1/linux-2.6.23.1-021-apf9328.patch 2008-11-06 10:14:16 UTC (rev 912)
@@ -3,7 +3,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/arch/arm/mach-imx/apf9328.c
+++ linux-2.6.23.1.mod/arch/arm/mach-imx/apf9328.c
-@@ -0,0 +1,558 @@
+@@ -0,0 +1,580 @@
+/*
+ * linux/arch/arm/mach-imx/apf9328.c
+ *
@@ -484,6 +484,22 @@
+{
+ printk("--- Registering APF9328 ressources\n");
+
++ // Serial
++ /*UFCR(IMX_UART1_BASE) = 0xa81; To be removed
++ UFCR(IMX_UART2_BASE) = 0xa81;*/
++
++ /* using uart1 FabM 5 nov 2008 */
++ imx_gpio_mode(PC9_PF_UART1_CTS);
++ imx_gpio_mode(PC10_PF_UART1_RTS);
++ imx_gpio_mode(PC11_PF_UART1_TXD);
++ imx_gpio_mode(PC12_PF_UART1_RXD);
++
++ imx_gpio_mode( PB30_PF_UART2_TXD );
++ imx_gpio_mode( PB31_PF_UART2_RXD );
++ imx_gpio_mode( PB28_PF_UART2_CTS );
++ imx_gpio_mode( PB29_PF_UART2_RTS );
++ /* end FabM */
++
+#ifdef CONFIG_FB_IMX /* LCD */
+ set_imx_fb_info(&apf9328_fb_info);
+ imx_fb_set_gpios(); /* init PORTD ....*/
@@ -536,6 +552,12 @@
+ // Init generic IRQs
+ imx_init_irq();
+
++ /* modif for uart1 FabM 5 nov 2008 */
++ // Init our custom IRQs
++ set_irq_type(APF9328_UART1_IRQ, IRQF_TRIGGER_FALLING);
++ set_irq_type(APF9328_UART2_IRQ, IRQF_TRIGGER_FALLING);
++ /* end FabM */
++
+ // Init our custom IRQs
+#ifdef CONFIG_DM9000
+ set_irq_type(APF9328_ETH_IRQ, IRQF_TRIGGER_FALLING);
@@ -773,7 +795,7 @@
(Take a look at armadeus/target/linux/ directory to know how to generate it)
--- linux-2.6.23.1.original/include/asm-arm/arch-imx/apf9328.h
+++ linux-2.6.23.1.mod/include/asm-arm/arch-imx/apf9328.h
-@@ -0,0 +1,58 @@
+@@ -0,0 +1,65 @@
+/*
+ * linux/include/asm-arm/arch-imx/apf9328.h
+ *
@@ -801,6 +823,13 @@
+/* ------------------------------------------------------------------------ */
+/* Memory Map for the APF9328 Board */
+/* ------------------------------------------------------------------------ */
++// Serial ports
++#define APF9328_UART1_VIRT ( IMX_CS3_VIRT + 0x30000 )
++#define APF9328_UART1_PHYS ( IMX_CS3_PHYS + 0x30000 )
++#define APF9328_UART1_IRQ ( IRQ_GPIOA(1) )
++#define APF9328_UART2_VIRT ( IMX_CS3_VIRT + 0x10000 )
++#define APF9328_UART2_PHYS ( IMX_CS3_PHYS + 0x10000 )
++#define APF9328_UART2_IRQ ( IRQ_GPIOA(1) )
+
+// Ethernet
+#define APF9328_ETH_VIRT ( IMX_CS4_VIRT + 0x00C00000 )
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <Fa...@us...> - 2008-11-04 22:33:43
|
Revision: 911
http://armadeus.svn.sourceforge.net/armadeus/?rev=911&view=rev
Author: FabM
Date: 2008-11-04 22:33:38 +0000 (Tue, 04 Nov 2008)
Log Message:
-----------
[firmware] Makefile and testbench corrections
Modified Paths:
--------------
trunk/firmware/wishbone_example/Makefile
trunk/firmware/wishbone_example/testbench/Wb_top_tb.vhd
Modified: trunk/firmware/wishbone_example/Makefile
===================================================================
--- trunk/firmware/wishbone_example/Makefile 2008-10-29 17:27:55 UTC (rev 910)
+++ trunk/firmware/wishbone_example/Makefile 2008-11-04 22:33:38 UTC (rev 911)
@@ -213,7 +213,7 @@
# Simulation with GHDL
########################
-ghdl-compil :
+ghdl-compile :
mkdir -p simu
$(GHDL_CMD) -i $(GHDL_FLAGS) --workdir=simu --work=work $(SIMFILES) $(FILES)
$(GHDL_CMD) -m $(GHDL_FLAGS) --workdir=simu --work=work $(SIMTOP)
Modified: trunk/firmware/wishbone_example/testbench/Wb_top_tb.vhd
===================================================================
--- trunk/firmware/wishbone_example/testbench/Wb_top_tb.vhd 2008-10-29 17:27:55 UTC (rev 910)
+++ trunk/firmware/wishbone_example/testbench/Wb_top_tb.vhd 2008-11-04 22:33:38 UTC (rev 911)
@@ -30,6 +30,10 @@
----------------------------------------------------------------------------------
CONSTANT HALF_PERIODE : time := 5 ns; -- Half clock period
+ constant IRQ_PEND : std_logic_vector( 15 downto 0) := x"0002";
+ constant IRQ_MASK : std_logic_vector( 15 downto 0) := x"0000";
+ constant LED_REG : std_logic_vector( 15 downto 0) := x"0004";
+ constant BUTTON_REG : std_logic_vector( 15 downto 0) := x"0008";
signal imx_data : std_logic_vector(15 downto 0);
signal imx_addr : std_logic_vector (12 downto 0);
@@ -85,17 +89,20 @@
wait for HALF_PERIODE*10;
-- reset irq_pend
- imx_write(x"0002",x"0000",
+ imx_write(IRQ_PEND,x"0000",
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
-- write on irq_mask
- imx_write(x"0004",x"ffff",
+ imx_write(IRQ_MASK,x"ffff",
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
-- read led value
- imx_read(x"0000",value,
+ imx_read(LED_REG,value,
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
assert value(0) = '0' report "Wrong led value" severity error;
-- push button
@@ -103,39 +110,46 @@
wait for HALF_PERIODE*20;
assert imx_irq = '1' report "IRQ not raised" severity error;
-- read button value
- imx_read(x"0008",value,
+ imx_read(BUTTON_REG,value,
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
assert value(0) = '1' report "Failed to read button" severity error;
-- Read irq pending
- imx_read(x"0002",value,
+ imx_read(IRQ_PEND,value,
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
assert value(0) = '1' report "IRQ pending error" severity error;
-- Acknowledge irq
- imx_write(x"0002",x"ffff",
+ imx_write(IRQ_PEND,x"ffff",
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
- imx_read(x"0002",value,
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
+ imx_read(IRQ_PEND,value,
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
assert value(0) = '0' report "Acknowledge error" severity error;
-- release button
button <= '0';
wait for HALF_PERIODE*20;
-- Acknowledge irq
- imx_write(x"0002",x"ffff",
+ imx_write(IRQ_PEND,x"ffff",
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
- imx_read(x"0002",value,
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
+ imx_read(IRQ_PEND,value,
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
--read button value
- imx_read(x"0008",value,
+ imx_read(BUTTON_REG,value,
clk,imx_cs_n,imx_oe_n,
- imx_eb3_n,imx_addr(12 downto 1),imx_data);
+ imx_eb3_n,imx_addr(12 downto 0),imx_data,
+ 4);
assert value(0) = '0' report "Low read button error" severity error;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-10-29 17:27:57
|
Revision: 910
http://armadeus.svn.sourceforge.net/armadeus/?rev=910&view=rev
Author: artemys
Date: 2008-10-29 17:27:55 +0000 (Wed, 29 Oct 2008)
Log Message:
-----------
[DEBUG] Save some files from the dark side of the Force (= DOS text format)
Modified Paths:
--------------
trunk/target/linux/Makefile
Modified: trunk/target/linux/Makefile
===================================================================
--- trunk/target/linux/Makefile 2008-10-29 17:12:10 UTC (rev 909)
+++ trunk/target/linux/Makefile 2008-10-29 17:27:55 UTC (rev 910)
@@ -1,126 +1,126 @@
-#
-# Get important variables from Buildroot:
-#
-BASE_DIR=../
-BUILDROOT_DIR=../../buildroot
-include $(BUILDROOT_DIR)/.config
-
-LINUX_VERSION:=$(shell echo $(BR2_PACKAGE_LINUX_VERSION))
-TARBALL_DIR:=$(shell echo $(BR2_DL_DIR))
-BUILD_DIR=$(BUILDROOT_DIR)/build_arm
-
-
-LINUX_NAME:=linux-$(LINUX_VERSION)
-LINUX_ARCHIVE:=$(LINUX_NAME).tar.bz2
-# Working Linux:
-LINUX_DIR:=$(BUILD_DIR)/$(LINUX_NAME)
-# Original Linux:
-LINUX_DIR_TO_DIFF:=$(LINUX_DIR).original
-
-PATCH_DIR:=../../buildroot/target/device/armadeus/linux/kernel-patches/$(LINUX_VERSION)
-TMP_DIR=./tmp
-PATCH_CMD=./generate_patch.sh
-CLEAN_PATCH_CMD=sed --in-place "s,$(LINUX_DIR),$(LINUX_NAME)," $@ && sed --in-place=.bak "s,\.\./linux/,$(LINUX_NAME).mod/," $@
-START_CMD=echo "*** Generating patch: $@"; mkdir -p ./tmp
-
-GENERATE_PATCH_FROM_SINGLE_DEPEND=$(PATCH_CMD) $(LINUX_DIR_TO_DIFF)/$< ../linux/$< $@; echo " adding $<"
-GENERATE_PATCH_FROM_MULTIPLE_DEPENDS=rm -f $@; for file in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$file ../linux/$$file $@; echo " adding $$file"; done
-
-
-### ALSA Patches: ---
-
-DEP1=include/asm-arm/arch-imx/imx-alsa.h
-TARGET1:=$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff
-$(TARGET1): $(DEP1)
- @$(START_CMD)
- @$(GENERATE_PATCH_FROM_SINGLE_DEPEND)
- @$(CLEAN_PATCH_CMD)
- @echo
-PATCHES+=$(TARGET1)
-FILES+=$(DEP1)
-
-DEP2=sound/arm/imx-alsa.c sound/arm/imx-alsa-dma.h sound/arm/imx-alsa-tsc2102.c sound/arm/imx-alsa-tsc2102.h sound/arm/imx-alsa-tsc2102-mixer.c
-TARGET2:=$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff
-$(TARGET2): $(DEP2)
- @$(START_CMD)
- @$(GENERATE_PATCH_FROM_MULTIPLE_DEPENDS)
- @$(CLEAN_PATCH_CMD)
- @echo
-PATCHES+=$(TARGET2)
-FILES+=$(DEP2)
-
-
-### APF9328 Patches: ---
-
-DEP3=arch/arm/mach-imx/apf9328.c arch/arm/mach-imx/apf9328_lcd_config.h include/asm-arm/arch-imx/apf9328.h
-TARGET3:=$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff
-$(TARGET3): $(DEP3)
- @$(START_CMD)
- @$(GENERATE_PATCH_FROM_MULTIPLE_DEPENDS)
- @$(CLEAN_PATCH_CMD)
- @echo
-PATCHES+=$(TARGET3)
-FILES+=$(DEP3)
-
-
-### Other Patches: ---
-
-# Special case: drivers/video/imxfb.h doesn't exist
-FILES_O1=drivers/video/imxfb.c drivers/video/imxfb.h
-DEP_O1=drivers/video/imxfb.c
-TARGET_O1:=$(TMP_DIR)/013-imxfb-improvements.diff
-$(TARGET_O1): $(DEP_O1)
- @$(START_CMD)
- rm -f $@
- for file in $(FILES_O1); do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$file ../linux/$$file $@; echo " adding $$file"; done
- @$(CLEAN_PATCH_CMD)
- @echo
-PATCHES+=$(TARGET_O1)
-FILES+=$(FILES_O1)
-
-
-
-### Patches generation: ---
-
-.PHONY: clean all help show import patch patch_install
-
-$(LINUX_DIR_TO_DIFF)/.unpacked:
- @echo "***Installing original kernel in $(BUILD_DIR)"
- mv $(LINUX_DIR) $(LINUX_DIR).modified
- tar jxf $(TARBALL_DIR)/$(LINUX_ARCHIVE) -C $(BUILD_DIR)/
- mv $(LINUX_DIR) $(LINUX_DIR_TO_DIFF)
- mv $(LINUX_DIR).modified $(LINUX_DIR)
- @touch $@
-
-patch: $(LINUX_DIR_TO_DIFF)/.unpacked $(PATCHES)
-
-patch_install: patch
- @cp -a $(PATCHES) $(PATCH_DIR)/
- @echo "Patches installed, you can check the diff in $(PATCH_DIR)/"
- @echo " please don't commit <<timestamp only>> changes !"
-
-show:
- @echo "Linux kernel files ($(LINUX_VERSION)) from which I can generate patch:"
- @for file in $(FILES); do echo " $$file"; done
- @echo "\nNames of the patches I will generate:"
- @for patch in $(PATCHES); do echo " $$patch"; done
-
-import:
- @for file in $(FILES); do if [ -f $(LINUX_DIR)/$$file ]; then cp $(LINUX_DIR)/$$file $$file; fi; done
- @echo "Import done, check your modifications with svn status -q"
-
-help:
- @echo "make [patch|patch_install|clean|help]"
- @echo " help ............ this help"
- @echo " show ............ list handled kernel files and generated patches name"
- @echo " import .......... import files we handle here from current kernel"
- @echo " patch ........... generate all patches in $(TMP_DIR) directory"
- @echo " patch_install ... install generated patches in $(PATCH_DIR)"
-
-all: patch
-
-clean:
- $(MAKE) clean -C modules
-# rm -f $(TMP_DIR)/* humm... not a good idea to clean patches otherwise will be regenerated
-# with new timestamp even if no changes where made to the files...
-
+#
+# Get important variables from Buildroot:
+#
+BASE_DIR=../
+BUILDROOT_DIR=../../buildroot
+include $(BUILDROOT_DIR)/.config
+
+LINUX_VERSION:=$(shell echo $(BR2_PACKAGE_LINUX_VERSION))
+TARBALL_DIR:=$(shell echo $(BR2_DL_DIR))
+BUILD_DIR=$(BUILDROOT_DIR)/build_arm
+
+
+LINUX_NAME:=linux-$(LINUX_VERSION)
+LINUX_ARCHIVE:=$(LINUX_NAME).tar.bz2
+# Working Linux:
+LINUX_DIR:=$(BUILD_DIR)/$(LINUX_NAME)
+# Original Linux:
+LINUX_DIR_TO_DIFF:=$(LINUX_DIR).original
+
+PATCH_DIR:=../../buildroot/target/device/armadeus/linux/kernel-patches/$(LINUX_VERSION)
+TMP_DIR=./tmp
+PATCH_CMD=./generate_patch.sh
+CLEAN_PATCH_CMD=sed --in-place "s,$(LINUX_DIR),$(LINUX_NAME)," $@ && sed --in-place=.bak "s,\.\./linux/,$(LINUX_NAME).mod/," $@
+START_CMD=echo "*** Generating patch: $@"; mkdir -p ./tmp
+
+GENERATE_PATCH_FROM_SINGLE_DEPEND=$(PATCH_CMD) $(LINUX_DIR_TO_DIFF)/$< ../linux/$< $@; echo " adding $<"
+GENERATE_PATCH_FROM_MULTIPLE_DEPENDS=rm -f $@; for file in $^; do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$file ../linux/$$file $@; echo " adding $$file"; done
+
+
+### ALSA Patches: ---
+
+DEP1=include/asm-arm/arch-imx/imx-alsa.h
+TARGET1:=$(TMP_DIR)/090-alsa-create-imx-alsa_h.diff
+$(TARGET1): $(DEP1)
+ @$(START_CMD)
+ @$(GENERATE_PATCH_FROM_SINGLE_DEPEND)
+ @$(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TARGET1)
+FILES+=$(DEP1)
+
+DEP2=sound/arm/imx-alsa.c sound/arm/imx-alsa-dma.h sound/arm/imx-alsa-tsc2102.c sound/arm/imx-alsa-tsc2102.h sound/arm/imx-alsa-tsc2102-mixer.c
+TARGET2:=$(TMP_DIR)/091-alsa-add-imx-ssi-tsc2102-driver.diff
+$(TARGET2): $(DEP2)
+ @$(START_CMD)
+ @$(GENERATE_PATCH_FROM_MULTIPLE_DEPENDS)
+ @$(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TARGET2)
+FILES+=$(DEP2)
+
+
+### APF9328 Patches: ---
+
+DEP3=arch/arm/mach-imx/apf9328.c arch/arm/mach-imx/apf9328_lcd_config.h include/asm-arm/arch-imx/apf9328.h
+TARGET3:=$(TMP_DIR)/021-linux-2.6.23.1-apf9328.diff
+$(TARGET3): $(DEP3)
+ @$(START_CMD)
+ @$(GENERATE_PATCH_FROM_MULTIPLE_DEPENDS)
+ @$(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TARGET3)
+FILES+=$(DEP3)
+
+
+### Other Patches: ---
+
+# Special case: drivers/video/imxfb.h doesn't exist
+FILES_O1=drivers/video/imxfb.c drivers/video/imxfb.h
+DEP_O1=drivers/video/imxfb.c
+TARGET_O1:=$(TMP_DIR)/013-imxfb-improvements.diff
+$(TARGET_O1): $(DEP_O1)
+ @$(START_CMD)
+ rm -f $@
+ for file in $(FILES_O1); do $(PATCH_CMD) --append $(LINUX_DIR_TO_DIFF)/$$file ../linux/$$file $@; echo " adding $$file"; done
+ @$(CLEAN_PATCH_CMD)
+ @echo
+PATCHES+=$(TARGET_O1)
+FILES+=$(FILES_O1)
+
+
+
+### Patches generation: ---
+
+.PHONY: clean all help show import patch patch_install
+
+$(LINUX_DIR_TO_DIFF)/.unpacked:
+ @echo "***Installing original kernel in $(BUILD_DIR)"
+ mv $(LINUX_DIR) $(LINUX_DIR).modified
+ tar jxf $(TARBALL_DIR)/$(LINUX_ARCHIVE) -C $(BUILD_DIR)/
+ mv $(LINUX_DIR) $(LINUX_DIR_TO_DIFF)
+ mv $(LINUX_DIR).modified $(LINUX_DIR)
+ @touch $@
+
+patch: $(LINUX_DIR_TO_DIFF)/.unpacked $(PATCHES)
+
+patch_install: patch
+ @cp -a $(PATCHES) $(PATCH_DIR)/
+ @echo "Patches installed, you can check the diff in $(PATCH_DIR)/"
+ @echo " please don't commit <<timestamp only>> changes !"
+
+show:
+ @echo "Linux kernel files ($(LINUX_VERSION)) from which I can generate patch:"
+ @for file in $(FILES); do echo " $$file"; done
+ @echo "\nNames of the patches I will generate:"
+ @for patch in $(PATCHES); do echo " $$patch"; done
+
+import:
+ @for file in $(FILES); do if [ -f $(LINUX_DIR)/$$file ]; then cp $(LINUX_DIR)/$$file $$file; fi; done
+ @echo "Import done, check your modifications with svn status -q"
+
+help:
+ @echo "make [patch|patch_install|clean|help]"
+ @echo " help ............ this help"
+ @echo " show ............ list handled kernel files and generated patches name"
+ @echo " import .......... import files we handle here from current kernel"
+ @echo " patch ........... generate all patches in $(TMP_DIR) directory"
+ @echo " patch_install ... install generated patches in $(PATCH_DIR)"
+
+all: patch
+
+clean:
+ $(MAKE) clean -C modules
+# rm -f $(TMP_DIR)/* humm... not a good idea to clean patches otherwise will be regenerated
+# with new timestamp even if no changes where made to the files...
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-10-29 17:12:19
|
Revision: 909
http://armadeus.svn.sourceforge.net/armadeus/?rev=909&view=rev
Author: artemys
Date: 2008-10-29 17:12:10 +0000 (Wed, 29 Oct 2008)
Log Message:
-----------
[DEBUG] Save some files from the dark side of the Force (= DOS text format)
Modified Paths:
--------------
trunk/target/linux/debug/fpgaregs/Makefile
trunk/target/linux/debug/imxregs/Makefile
trunk/target/linux/debug/imxregs/imxregs.h
Modified: trunk/target/linux/debug/fpgaregs/Makefile
===================================================================
--- trunk/target/linux/debug/fpgaregs/Makefile 2008-10-29 15:11:00 UTC (rev 908)
+++ trunk/target/linux/debug/fpgaregs/Makefile 2008-10-29 17:12:10 UTC (rev 909)
@@ -1,10 +1,10 @@
-CC=../../../../buildroot/build_arm/staging_dir/bin/arm-linux-gcc
-
-all: fpgaregs
-
-fpgaregs: fpgaregs.c
- $(CC) -Wall fpgaregs.c -o $@
-
-clean:
- rm -f *.o
- rm -f fpgaregs
+CC=../../../../buildroot/build_arm/staging_dir/bin/arm-linux-gcc
+
+all: fpgaregs
+
+fpgaregs: fpgaregs.c
+ $(CC) -Wall fpgaregs.c -o $@
+
+clean:
+ rm -f *.o
+ rm -f fpgaregs
Modified: trunk/target/linux/debug/imxregs/Makefile
===================================================================
--- trunk/target/linux/debug/imxregs/Makefile 2008-10-29 15:11:00 UTC (rev 908)
+++ trunk/target/linux/debug/imxregs/Makefile 2008-10-29 17:12:10 UTC (rev 909)
@@ -1,12 +1,12 @@
-ifeq ($(CC),cc)
- CC=arm-linux-gcc
-endif
-
-all: imxregs
-
-imxregs: imxregs.c imxregs.h
- $(CC) imxregs.c -o $@
-
-clean:
- rm -f *.o
- rm -f imxregs
+ifeq ($(CC),cc)
+ CC=arm-linux-gcc
+endif
+
+all: imxregs
+
+imxregs: imxregs.c imxregs.h
+ $(CC) imxregs.c -o $@
+
+clean:
+ rm -f *.o
+ rm -f imxregs
Modified: trunk/target/linux/debug/imxregs/imxregs.h
===================================================================
--- trunk/target/linux/debug/imxregs/imxregs.h 2008-10-29 15:11:00 UTC (rev 908)
+++ trunk/target/linux/debug/imxregs/imxregs.h 2008-10-29 17:12:10 UTC (rev 909)
@@ -1,601 +1,601 @@
-/*
- * imxregs.h - Tool to display and modify iMX registers from Linux's userspace
- *
- * Author/Maintainer: J. Boibessot
- * Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-L�ungen Online GmbH
- *
- * This tool is placed under the GPL.
- *
-*/
-
-typedef unsigned int u32;
-
-struct reg_info {
- char *name;
- u32 addr;
- int shift;
- u32 mask;
- char type;
- char *desc;
-};
-
-
-static struct reg_info regs[] =
-{
-// Watchdog
-{ "WCR", 0x00201000, 0, 0xffffffff, 'x', "Watchdog Control Register" },
-{ "WSR", 0x00201004, 0, 0xffffffff, 'x', "Watchdog Service Register" },
-{ "WSTR", 0x00201008, 0, 0xffffffff, 'x', "Watchdog Status Register" },
-// Timers
-{ "TCTL1", 0x00202000, 0, 0xffffffff, 'x', "Timer 1 Control Register" },
-{ "TPRER1", 0x00202004, 0, 0xffffffff, 'x', "Timer 1 Prescaler Register" },
-{ "TCMP1", 0x00202008, 0, 0xffffffff, 'x', "Timer 1 Compare Register" },
-{ "TCR1", 0x0020200C, 0, 0xffffffff, 'x', "Timer 1 Capture Register" },
-{ "TCN1", 0x00202010, 0, 0xffffffff, 'x', "Timer 1 Counter Register" },
-{ "TSTAT1", 0x00202014, 0, 0xffffffff, 'x', "Timer 1 Status Register" },
-{ "TCTL2", 0x00203000, 0, 0xffffffff, 'x', "Timer 2 Control Register" },
-{ "TPRER2", 0x00203004, 0, 0xffffffff, 'x', "Timer 2 Prescaler Register" },
-{ "TCMP2", 0x00203008, 0, 0xffffffff, 'x', "Timer 2 Compare Register" },
-{ "TCR2", 0x0020300C, 0, 0xffffffff, 'x', "Timer 2 Capture Register" },
-{ "TCN2", 0x00203010, 0, 0xffffffff, 'x', "Timer 2 Counter Register" },
-{ "TSTAT2", 0x00203014, 0, 0xffffffff, 'x', "Timer 2 Status Register" },
-// RTC
-{ "HOURMIN", 0x00204000, 0, 0xffffffff, 'x', "RTC Hours and minutes counter register" },
-{ "SECONDS", 0x00204004, 0, 0xffffffff, 'x', "RTC Seconds counter register" },
-{ "ALRM_HM", 0x00204008, 0, 0xffffffff, 'x', "RTC Hours and minutes alarm register" },
-{ "ALRM_SEC", 0x0020400C, 0, 0xffffffff, 'x', "RTC Seconds alarm register" },
-{ "RCCTL", 0x00204010, 0, 0xffffffff, 'x', "RTC Control register" },
-{ "RTCIENR", 0x00204018, 0, 0xffffffff, 'x', "RTC Interrupt Enable register" },
-{ "STPWCH", 0x0020401C, 0, 0xffffffff, 'x', "RTC Stopwatch minutes register" },
-{ "DAYR", 0x00204020, 0, 0xffffffff, 'x', "RTC Days counter register" },
-{ "DAYALARM", 0x00204024, 0, 0xffffffff, 'x', "RTC Day Alarm register" },
-//LCD
-{ "SSA", 0x00205000, 0, 0xffffffff, 'x', "Screen Start Address Register" },
-{ "SIZE", 0x00205004, 0, 0xffffffff, 'x', "Size Register" },
-{ "VPW", 0x00205008, 0, 0xffffffff, 'x', "Virtual Page Width Register" },
-{ "CPOS", 0x0020500C, 0, 0xffffffff, 'x', "LCD Cursor Position Register" },
-{ "LCWHB", 0x00205010, 0, 0xffffffff, 'x', "LCD Cursor Width Height and Blink Register" },
-{ "LCHCC", 0x00205014, 0, 0xffffffff, 'x', "LCD Color Cursor Mapping Register" },
-{ "LPCR", 0x00205018, 0, 0xffffffff, 'x', "Panel Configuration Register" },
-{ "HCR", 0x0020501C, 0, 0xffffffff, 'x', "Horizontal Configuration Register" },
-{ "VCR", 0x00205020, 0, 0xffffffff, 'x', "Vertical Configuration Register" },
-{ "POS", 0x00205024, 0, 0xffffffff, 'x', "Panning Offset Register" },
-{ "LSCR1", 0x00205028, 0, 0xffffffff, 'x', "Sharp Configuration 1 Register" },
-{ "PWMR", 0x0020502C, 0, 0xffffffff, 'x', "PWM Contrast Control Register" },
-{ "DMACR", 0x00205030, 0, 0xffffffff, 'x', "DMA Control Register" },
-{ "RMCR", 0x00205034, 0, 0xffffffff, 'x', "Refresh Mode Control Register" },
-{ "LCDICR", 0x00205038, 0, 0xffffffff, 'x', "Interrupt Configuration Register" },
-{ "LCDISR", 0x00205040, 0, 0xffffffff, 'x', "Interrupt Status Register" },
-// UART 1
-{ "URX11D_1", 0x0020602C, 0, 0xffffffff, 'x', "UART1 Receiver Register 11" },
-{ "URX12D_1", 0x00206030, 0, 0xffffffff, 'x', "UART1 Receiver Register 12" },
-{ "URX13D_1", 0x00206034, 0, 0xffffffff, 'x', "UART1 Receiver Register 13" },
-{ "URX14D_1", 0x00206038, 0, 0xffffffff, 'x', "UART1 Receiver Register 14" },
-{ "URX15D_1", 0x0020603C, 0, 0xffffffff, 'x', "UART1 Receiver Register 15" },
-{ "UTX0D_1", 0x00206040, 0, 0xffffffff, 'x', "UART1 Transmitter Register 0" },
-{ "UTX1D_1", 0x00206044, 0, 0xffffffff, 'x', "UART1 Transmitter Register 1" },
-{ "UTX2D_1", 0x00206048, 0, 0xffffffff, 'x', "UART1 Transmitter Register 2" },
-{ "UTX3D_1", 0x0020604C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 3" },
-{ "UTX4D_1", 0x00206050, 0, 0xffffffff, 'x', "UART1 Transmitter Register 4" },
-{ "UTX5D_1", 0x00206054, 0, 0xffffffff, 'x', "UART1 Transmitter Register 5" },
-{ "UTX6D_1", 0x00206058, 0, 0xffffffff, 'x', "UART1 Transmitter Register 6" },
-{ "UTX7D_1", 0x0020605C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 7" },
-{ "UTX8D_1", 0x00206060, 0, 0xffffffff, 'x', "UART1 Transmitter Register 8" },
-{ "UTX9D_1", 0x00206064, 0, 0xffffffff, 'x', "UART1 Transmitter Register 9" },
-{ "UTX10D_1", 0x00206068, 0, 0xffffffff, 'x', "UART1 Transmitter Register 10" },
-{ "UTX11D_1", 0x0020606C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 11" },
-{ "UTX12D_1", 0x00206070, 0, 0xffffffff, 'x', "UART1 Transmitter Register 12" },
-{ "UTX13D_1", 0x00206074, 0, 0xffffffff, 'x', "UART1 Transmitter Register 13" },
-{ "UTX14D_1", 0x00206078, 0, 0xffffffff, 'x', "UART1 Transmitter Register 14" },
-{ "UTX15D_1", 0x0020607C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 15" },
-{ "UCR1_1", 0x00206080, 0, 0xffffffff, 'x', "UART1 Control Register 1" },
-{ "UCR2_1", 0x00206084, 0, 0xffffffff, 'x', "UART1 Control Register 2" },
-{ "UCR3_1", 0x00206088, 0, 0xffffffff, 'x', "UART1 Control Register 3" },
-{ "UCR4_1", 0x0020608C, 0, 0xffffffff, 'x', "UART1 Control Register 4" },
-{ "UFCR_1", 0x00206090, 0, 0xffffffff, 'x', "UART1 FIFO Control Register" },
-{ "USR1_1", 0x00206094, 0, 0xffffffff, 'x', "UART1 Status Register 1" },
-{ "USR2_1", 0x00206098, 0, 0xffffffff, 'x', "UART1 Status Register 2" },
-{ "UESC_1", 0x0020609C, 0, 0xffffffff, 'x', "UART1 Escape Character Register" },
-{ "UTIM_1", 0x002060A0, 0, 0xffffffff, 'x', "UART1 Escape Timer Register" },
-{ "UBIR_1", 0x002060A4, 0, 0xffffffff, 'x', "UART1 BRM Incremental Register" },
-{ "UBMR_1", 0x002060A8, 0, 0xffffffff, 'x', "UART1 BRM Modulator Register" },
-{ "UBRC_1", 0x002060AC, 0, 0xffffffff, 'x', "UART1 Baud Rate Count Register" },
-{ "BIPR1_1", 0x002060B0, 0, 0xffffffff, 'x', "UART1 BRM Incremental Preset Register 1" },
-{ "BIPR2_1", 0x002060B4, 0, 0xffffffff, 'x', "UART1 BRM Incremental Preset Register 2" },
-{ "BIPR3_1", 0x002060B8, 0, 0xffffffff, 'x', "UART1 BRM Incremental Preset Register 3" },
-{ "BIPR4_1", 0x002060BC, 0, 0xffffffff, 'x', "UART1 BRM Incremental Preset Register 4" },
-{ "BMPR1_1", 0x002060C0, 0, 0xffffffff, 'x', "UART1 BRM Modulator Preset Register 1" },
-{ "BMPR2_1", 0x002060C4, 0, 0xffffffff, 'x', "UART1 BRM Modulator Preset Register 2" },
-{ "BMPR3_1", 0x002060C8, 0, 0xffffffff, 'x', "UART1 BRM Modulator Preset Register 3" },
-{ "BMPR4_1", 0x002060CC, 0, 0xffffffff, 'x', "UART1 BRM Modulator Preset Register 4" },
-{ "UTS_1", 0x002060D0, 0, 0xffffffff, 'x', "UART1 Test Register 1" },
-// UART 2
-{ "URX11D_2", 0x0020702C, 0, 0xffffffff, 'x', "UART2 Receiver Register 11" },
-{ "URX12D_2", 0x00207030, 0, 0xffffffff, 'x', "UART2 Receiver Register 12" },
-{ "URX13D_2", 0x00207034, 0, 0xffffffff, 'x', "UART2 Receiver Register 13" },
-{ "URX14D_2", 0x00207038, 0, 0xffffffff, 'x', "UART2 Receiver Register 14" },
-{ "URX15D_2", 0x0020703C, 0, 0xffffffff, 'x', "UART2 Receiver Register 15" },
-{ "UTX0D_2", 0x00207040, 0, 0xffffffff, 'x', "UART2 Transmitter Register 0" },
-{ "UTX1D_2", 0x00207044, 0, 0xffffffff, 'x', "UART2 Transmitter Register 1" },
-{ "UTX2D_2", 0x00207048, 0, 0xffffffff, 'x', "UART2 Transmitter Register 2" },
-{ "UTX3D_2", 0x0020704C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 3" },
-{ "UTX4D_2", 0x00207050, 0, 0xffffffff, 'x', "UART2 Transmitter Register 4" },
-{ "UTX5D_2", 0x00207054, 0, 0xffffffff, 'x', "UART2 Transmitter Register 5" },
-{ "UTX6D_2", 0x00207058, 0, 0xffffffff, 'x', "UART2 Transmitter Register 6" },
-{ "UTX7D_2", 0x0020705C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 7" },
-{ "UTX8D_2", 0x00207060, 0, 0xffffffff, 'x', "UART2 Transmitter Register 8" },
-{ "UTX9D_2", 0x00207064, 0, 0xffffffff, 'x', "UART2 Transmitter Register 9" },
-{ "UTX10D_2", 0x00207068, 0, 0xffffffff, 'x', "UART2 Transmitter Register 10" },
-{ "UTX11D_2", 0x0020706C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 11" },
-{ "UTX12D_2", 0x00207070, 0, 0xffffffff, 'x', "UART2 Transmitter Register 12" },
-{ "UTX13D_2", 0x00207074, 0, 0xffffffff, 'x', "UART2 Transmitter Register 13" },
-{ "UTX14D_2", 0x00207078, 0, 0xffffffff, 'x', "UART2 Transmitter Register 14" },
-{ "UTX15D_2", 0x0020707C, 0, 0xffffffff, 'x', "UART2 Transmitter Register 15" },
-{ "UCR1_2", 0x00207080, 0, 0xffffffff, 'x', "UART2 Control Register 1" },
-{ "UCR2_2", 0x00207084, 0, 0xffffffff, 'x', "UART2 Control Register 2" },
-{ "UCR3_2", 0x00207088, 0, 0xffffffff, 'x', "UART2 Control Register 3" },
-{ "UCR4_2", 0x0020708C, 0, 0xffffffff, 'x', "UART2 Control Register 4" },
-{ "UFCR_2", 0x00207090, 0, 0xffffffff, 'x', "UART2 FIFO Control Register" },
-{ "USR1_2", 0x00207094, 0, 0xffffffff, 'x', "UART2 Status Register 1" },
-{ "USR2_2", 0x00207098, 0, 0xffffffff, 'x', "UART2 Status Register 2" },
-{ "UESC_2", 0x0020709C, 0, 0xffffffff, 'x', "UART2 Escape Character Register" },
-{ "UTIM_2", 0x002070A0, 0, 0xffffffff, 'x', "UART2 Escape Timer Register" },
-{ "UBIR_2", 0x002070A4, 0, 0xffffffff, 'x', "UART2 BRM Incremental Register" },
-{ "UBMR_2", 0x002070A8, 0, 0xffffffff, 'x', "UART2 BRM Modulator Register" },
-{ "UBRC_2", 0x002070AC, 0, 0xffffffff, 'x', "UART2 Baud Rate Count Register" },
-{ "BIPR1_2", 0x002070B0, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 1" },
-{ "BIPR2_2", 0x002070B4, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 2" },
-{ "BIPR3_2", 0x002070B8, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 3" },
-{ "BIPR4_2", 0x002070BC, 0, 0xffffffff, 'x', "UART2 BRM Incremental Preset Register 4" },
-{ "BMPR1_2", 0x002070C0, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 1" },
-{ "BMPR2_2", 0x002070C4, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 2" },
-{ "BMPR3_2", 0x002070C8, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 3" },
-{ "BMPR4_2", 0x002070CC, 0, 0xffffffff, 'x', "UART2 BRM Modulator Preset Register 4" },
-{ "UTS_2", 0x002070D0, 0, 0xffffffff, 'x', "UART2 Test Register 1" },
-// PWM
-{ "PWMC", 0x00208000, 0, 0xffffffff, 'x', "PWM Control Register" },
-{ "PWMS", 0x00208004, 0, 0xffffffff, 'x', "PWM Sample Register" },
-{ "PWMP", 0x00208008, 0, 0xffffffff, 'x', "PWM Period Register" },
-{ "PWMCNT", 0x0020800C, 0, 0xffffffff, 'x', "PWM Counter Register" },
-// DMA
-{ "DCR", 0x00209000, 0, 0xffffffff, 'x', "DMA Control Register" },
-{ "DISR", 0x00209004, 0, 0xffffffff, 'x', "DMA Interrupt Status Register" },
-{ "DIMR", 0x00209008, 0, 0xffffffff, 'x', "DMA Interrupt Mask Register" },
-{ "DBTOSR", 0x0020900C, 0, 0xffffffff, 'x', "DMA Burst Time-Out Status Register" },
-{ "DRTOSR", 0x00209010, 0, 0xffffffff, 'x', "DMA Request Time-Out Status Register" },
-{ "DSESR", 0x00209014, 0, 0xffffffff, 'x', "DMA Transfer Error Status Register" },
-{ "DBOSR", 0x00209018, 0, 0xffffffff, 'x', "DMA Buffer Overflow Status Register" },
-{ "DBTOCR", 0x0020901C, 0, 0xffffffff, 'x', "DMA Burst Time-Out Control Register" },
-{ "WSRA", 0x00209040, 0, 0xffffffff, 'x', "W-Size Register A" },
-{ "XSRA", 0x00209044, 0, 0xffffffff, 'x', "X-Size Register A" },
-{ "YSRA", 0x00209048, 0, 0xffffffff, 'x', "Y-Size Register A" },
-{ "WSRB", 0x0020904C, 0, 0xffffffff, 'x', "W-Size Register B" },
-{ "XSRB", 0x00209050, 0, 0xffffffff, 'x', "X-Size Register B" },
-{ "YSRB", 0x00209054, 0, 0xffffffff, 'x', "Y-Size Register B" },
-{ "SAR0", 0x00209080, 0, 0xffffffff, 'x', "Channel 0 Source Address Register" },
-{ "DAR0", 0x00209084, 0, 0xffffffff, 'x', "Channel 0 Destination Address Register" },
-{ "CNTR0", 0x00209088, 0, 0xffffffff, 'x', "Channel 0 Count Register" },
-{ "CCR0", 0x0020908C, 0, 0xffffffff, 'x', "Channel 0 Control Register" },
-{ "RSSR0", 0x00209090, 0, 0xffffffff, 'x', "Channel 0 Request Source Select Register" },
-{ "BLR0", 0x00209094, 0, 0xffffffff, 'x', "Channel 0 Burst Length Register" },
-{ "RTOR0", 0x00209098, 0, 0xffffffff, 'x', "Channel 0 Request Time-Out Register" },
-{ "BUCR0", 0x00209098, 0, 0xffffffff, 'x', "Channel 0 Bus Utilization Control Register" },
-{ "SAR1", 0x002090C0, 0, 0xffffffff, 'x', "Channel 1 Source Address Register" },
-{ "DAR1", 0x002090C4, 0, 0xffffffff, 'x', "Channel 1 Destination Address Register" },
-{ "CNTR1", 0x002090C8, 0, 0xffffffff, 'x', "Channel 1 Count Register" },
-{ "CCR1", 0x002090CC, 0, 0xffffffff, 'x', "Channel 1 Control Register" },
-{ "RSSR1", 0x002090D0, 0, 0xffffffff, 'x', "Channel 1 Request Source Select Register" },
-{ "BLR1", 0x002090D4, 0, 0xffffffff, 'x', "Channel 1 Burst Length Register" },
-{ "RTOR1", 0x002090D8, 0, 0xffffffff, 'x', "Channel 1 Request Time-Out Register" },
-{ "BUCR1", 0x002090D8, 0, 0xffffffff, 'x', "Channel 1 Bus Utilization Control Register" },
-{ "SAR2", 0x00209100, 0, 0xffffffff, 'x', "Channel 2 Source Address Register" },
-{ "DAR2", 0x00209104, 0, 0xffffffff, 'x', "Channel 2 Destination Address Register" },
-{ "CNTR2", 0x00209108, 0, 0xffffffff, 'x', "Channel 2 Count Register" },
-{ "CCR2", 0x0020910C, 0, 0xffffffff, 'x', "Channel 2 Control Register" },
-{ "RSSR2", 0x00209110, 0, 0xffffffff, 'x', "Channel 2 Request Source Select Register" },
-{ "BLR2", 0x00209114, 0, 0xffffffff, 'x', "Channel 2 Burst Length Register" },
-{ "RTOR2", 0x00209118, 0, 0xffffffff, 'x', "Channel 2 Request Time-Out Register" },
-{ "BUCR2", 0x00209118, 0, 0xffffffff, 'x', "Channel 2 Bus Utilization Control Register" },
-{ "SAR3", 0x00209140, 0, 0xffffffff, 'x', "Channel 3 Source Address Register" },
-{ "DAR3", 0x00209144, 0, 0xffffffff, 'x', "Channel 3 Destination Address Register" },
-{ "CNTR3", 0x00209148, 0, 0xffffffff, 'x', "Channel 3 Count Register" },
-{ "CCR3", 0x0020914C, 0, 0xffffffff, 'x', "Channel 3 Control Register" },
-{ "RSSR3", 0x00209150, 0, 0xffffffff, 'x', "Channel 3 Request Source Select Register" },
-{ "BLR3", 0x00209154, 0, 0xffffffff, 'x', "Channel 3 Burst Length Register" },
-{ "RTOR3", 0x00209158, 0, 0xffffffff, 'x', "Channel 3 Request Time-Out Register" },
-{ "BUCR3", 0x0020915C, 0, 0xffffffff, 'x', "Channel 3 Bus Utilization Control Register" },
-{ "SAR4", 0x00209180, 0, 0xffffffff, 'x', "Channel 4 Source Address Register" },
-{ "DAR4", 0x00209184, 0, 0xffffffff, 'x', "Channel 4 Destination Address Register" },
-{ "CNTR4", 0x00209188, 0, 0xffffffff, 'x', "Channel 4 Count Register" },
-{ "CCR4", 0x0020918C, 0, 0xffffffff, 'x', "Channel 4 Control Register" },
-{ "RSSR4", 0x00209190, 0, 0xffffffff, 'x', "Channel 4 Request Source Select Register" },
-{ "BLR4", 0x00209194, 0, 0xffffffff, 'x', "Channel 4 Burst Length Register" },
-{ "RTOR4", 0x00209198, 0, 0xffffffff, 'x', "Channel 4 Request Time-Out Register" },
-{ "BUCR4", 0x0020919C, 0, 0xffffffff, 'x', "Channel 4 Bus Utilization Control Register" },
-{ "SAR5", 0x002091C0, 0, 0xffffffff, 'x', "Channel 5 Source Address Register" },
-{ "DAR5", 0x002091C4, 0, 0xffffffff, 'x', "Channel 5 Destination Address Register" },
-{ "CNTR5", 0x002091C8, 0, 0xffffffff, 'x', "Channel 5 Count Register" },
-{ "CCR5", 0x002091CC, 0, 0xffffffff, 'x', "Channel 5 Control Register" },
-{ "RSSR5", 0x002091D0, 0, 0xffffffff, 'x', "Channel 5 Request Source Select Register" },
-{ "BLR5", 0x002091D4, 0, 0xffffffff, 'x', "Channel 5 Burst Length Register" },
-{ "RTOR5", 0x002091D8, 0, 0xffffffff, 'x', "Channel 5 Request Time-Out Register" },
-{ "BUCR5", 0x002091DC, 0, 0xffffffff, 'x', "Channel 5 Bus Utilization Control Register" },
-{ "SAR6", 0x00209200, 0, 0xffffffff, 'x', "Channel 6 Source Address Register" },
-{ "DAR6", 0x00209204, 0, 0xffffffff, 'x', "Channel 6 Destination Address Register" },
-{ "CNTR6", 0x00209208, 0, 0xffffffff, 'x', "Channel 6 Count Register" },
-{ "CCR6", 0x0020920C, 0, 0xffffffff, 'x', "Channel 6 Control Register" },
-{ "RSSR6", 0x00209210, 0, 0xffffffff, 'x', "Channel 6 Request Source Select Register" },
-{ "BLR6", 0x00209214, 0, 0xffffffff, 'x', "Channel 6 Burst Length Register" },
-{ "RTOR6", 0x00209218, 0, 0xffffffff, 'x', "Channel 6 Request Time-Out Register" },
-{ "BUCR6", 0x00209218, 0, 0xffffffff, 'x', "Channel 6 Bus Utilization Control Register" },
-{ "SAR7", 0x00209240, 0, 0xffffffff, 'x', "Channel 7 Source Address Register" },
-{ "DAR7", 0x00209244, 0, 0xffffffff, 'x', "Channel 7 Destination Address Register" },
-{ "CNTR7", 0x00209248, 0, 0xffffffff, 'x', "Channel 7 Count Register" },
-{ "CCR7", 0x0020924C, 0, 0xffffffff, 'x', "Channel 7 Control Register" },
-{ "RSSR7", 0x00209250, 0, 0xffffffff, 'x', "Channel 7 Request Source Select Register" },
-{ "BLR7", 0x00209254, 0, 0xffffffff, 'x', "Channel 7 Burst Length Register" },
-{ "RTOR7", 0x00209258, 0, 0xffffffff, 'x', "Channel 7 Request Time-Out Register" },
-{ "BUCR7", 0x00209258, 0, 0xffffffff, 'x', "Channel 7 Bus Utilization Control Register" },
-{ "SAR8", 0x00209280, 0, 0xffffffff, 'x', "Channel 8 Source Address Register" },
-{ "DAR8", 0x00209284, 0, 0xffffffff, 'x', "Channel 8 Destination Address Register" },
-{ "CNTR8", 0x00209288, 0, 0xffffffff, 'x', "Channel 8 Count Register" },
-{ "CCR8", 0x0020928C, 0, 0xffffffff, 'x', "Channel 8 Control Register" },
-{ "RSSR8", 0x00209290, 0, 0xffffffff, 'x', "Channel 8 Request Source Select Register" },
-{ "BLR8", 0x00209294, 0, 0xffffffff, 'x', "Channel 8 Burst Length Register" },
-{ "RTOR8", 0x00209298, 0, 0xffffffff, 'x', "Channel 8 Request Time-Out Register" },
-{ "BUCR8", 0x00209298, 0, 0xffffffff, 'x', "Channel 8 Bus Utilization Control Register" },
-{ "SAR9", 0x002092C0, 0, 0xffffffff, 'x', "Channel 9 Source Address Register" },
-{ "DAR9", 0x002092C4, 0, 0xffffffff, 'x', "Channel 9 Destination Address Register" },
-{ "CNTR9", 0x002092C8, 0, 0xffffffff, 'x', "Channel 9 Count Register" },
-{ "CCR9", 0x002092CC, 0, 0xffffffff, 'x', "Channel 9 Control Register" },
-{ "RSSR9", 0x002092D0, 0, 0xffffffff, 'x', "Channel 9 Request Source Select Register" },
-{ "BLR9", 0x002092D4, 0, 0xffffffff, 'x', "Channel 9 Burst Length Register" },
-{ "RTOR9", 0x002092D8, 0, 0xffffffff, 'x', "Channel 9 Request Time-Out Register" },
-{ "BUCR9", 0x002092DC, 0, 0xffffffff, 'x', "Channel 9 Bus Utilization Control Register" },
-{ "SAR10", 0x00209300, 0, 0xffffffff, 'x', "Channel 10 Source Address Register" },
-{ "DAR10", 0x00209304, 0, 0xffffffff, 'x', "Channel 10 Destination Address Register" },
-{ "CNTR10", 0x00209308, 0, 0xffffffff, 'x', "Channel 10 Count Register" },
-// NOT ACCESSIBLE IN USER MODE ??
-/*{ "PSR0_2", 0x00210000, 0, 0xffffffff, 'x', "AIPI2 Peripheral Size Register 0" },
-{ "PSR1_2", 0x00210004, 0, 0xffffffff, 'x', "AIPI2 Peripheral Size Register 1" },
-{ "PAR_2", 0x00210008, 0, 0xffffffff, 'x', "AIPI2 Peripheral Access Register" },
-{ "PCR_2", 0x0021000C, 0, 0xffffffff, 'x', "AIPI2 Peripheral Control Register" },
-{ "TSR_2", 0x00210010, 0, 0xffffffff, 'x', "AIPI2 Time-Out Status Register" },*/
-// USB
-{ "USB_FRAME", 0x00212000, 0, 0xffffffff, 'x', "USB Frame Number and Match Register" },
-{ "USB_SPEC", 0x00212004, 0, 0xffffffff, 'x', "USB Specification and Release Number Register" },
-{ "USB_STAT", 0x00212008, 0, 0xffffffff, 'x', "USB Status Register" },
-{ "USB_CTRL", 0x0021200C, 0, 0xffffffff, 'x', "USB Control Register" },
-{ "USB_DADR", 0x00212010, 0, 0xffffffff, 'x', "USB Descriptor RAM Address Register" },
-{ "USB_DDAT", 0x00212014, 0, 0xffffffff, 'x', "USB Descriptor RAM/Endpoint Buffer Data Register" },
-{ "USB_INTR", 0x00212018, 0, 0xffffffff, 'x', "USB Interrupt Status Register" },
-{ "USB_MASK", 0x0021201C, 0, 0xffffffff, 'x', "USB Interrupt Mask Register" },
-{ "USB_MCTL", 0x00212020, 0, 0xffffffff, 'x', "USB FIFO Memory Control Register" },
-{ "USB_ENAB", 0x00212024, 0, 0xffffffff, 'x', "USB Enable Register" },
-{ "USB_EP0_STAT", 0x00212030, 0, 0xffffffff, 'x', "Endpoint 0 Status/Control Register" },
-{ "USB_EP0_INTR", 0x00212034, 0, 0xffffffff, 'x', "Endpoint 0 Interrupt Status Register" },
-{ "USB_EP0_MASK", 0x00212038, 0, 0xffffffff, 'x', "Endpoint 0 Interrupt Mask Register" },
-{ "USB_EP0_FDAT", 0x0021203C, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Data Register" },
-{ "USB_EP0_FSTAT", 0x00212040, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Status Register" },
-{ "USB_EP0_FCTRL", 0x00212044, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Control Register" },
-{ "USB_EP0_LRFP", 0x00212048, 0, 0xffffffff, 'x', "Endpoint 0 Last Read Frame Pointer Register" },
-{ "USB_EP0_LWFP", 0x0021204C, 0, 0xffffffff, 'x', "Endpoint 0 Last Write Frame Pointer Register" },
-{ "USB_EP0_FALRM", 0x00212050, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Alarm Register" },
-{ "USB_EP0_FRDP", 0x00212054, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Read Pointer Register" },
-{ "USB_EP0_FWRP", 0x00212058, 0, 0xffffffff, 'x', "Endpoint 0 FIFO Write Pointer Register" },
-{ "USB_EP1_STAT", 0x00212060, 0, 0xffffffff, 'x', "Endpoint 1 Status/Control Register" },
-{ "USB_EP1_INTR", 0x00212064, 0, 0xffffffff, 'x', "Endpoint 1 Interrupt Status Register" },
-{ "USB_EP1_MASK", 0x00212068, 0, 0xffffffff, 'x', "Endpoint 1 Interrupt Mask Register" },
-{ "USB_EP1_FDAT", 0x0021206C, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Data Register" },
-{ "USB_EP1_FSTAT", 0x00212070, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Status Register" },
-{ "USB_EP1_FCTRL", 0x00212074, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Control Register" },
-{ "USB_EP1_LRFP", 0x00212078, 0, 0xffffffff, 'x', "Endpoint 1 Last Read Frame Pointer Register" },
-{ "USB_EP1_LWFP", 0x0021207C, 0, 0xffffffff, 'x', "Endpoint 1 Last Write Frame Pointer Register" },
-{ "USB_EP1_FALRM", 0x00212080, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Alarm Register" },
-{ "USB_EP1_FRDP", 0x00212084, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Read Pointer Register" },
-{ "USB_EP1_FWRP", 0x00212088, 0, 0xffffffff, 'x', "Endpoint 1 FIFO Write Pointer Register" },
-{ "USB_EP2_STAT", 0x00212090, 0, 0xffffffff, 'x', "Endpoint 2 Status/Control Register" },
-{ "USB_EP2_INTR", 0x00212094, 0, 0xffffffff, 'x', "Endpoint 2 Interrupt Status Register" },
-{ "USB_EP2_MASK", 0x00212098, 0, 0xffffffff, 'x', "Endpoint 2 Interrupt Mask Register" },
-{ "USB_EP2_FDAT", 0x0021209C, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Data Register" },
-{ "USB_EP2_FSTAT", 0x002120A0, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Status Register" },
-{ "USB_EP2_FCTRL", 0x002120A4, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Control Register" },
-{ "USB_EP2_LRFP", 0x002120A8, 0, 0xffffffff, 'x', "Endpoint 2 Last Read Frame Pointer Register" },
-{ "USB_EP2_LWFP", 0x002120AC, 0, 0xffffffff, 'x', "Endpoint 2 Last Write Frame Pointer Register" },
-{ "USB_EP2_FALRM", 0x002120B0, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Alarm Register" },
-{ "USB_EP2_FRDP", 0x002120B4, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Read Pointer Register" },
-{ "USB_EP2_FWRP", 0x002120B8, 0, 0xffffffff, 'x', "Endpoint 2 FIFO Write Pointer Register" },
-{ "USB_EP3_STAT", 0x002120C0, 0, 0xffffffff, 'x', "Endpoint 3 Status/Control Register" },
-{ "USB_EP3_INTR", 0x002120C4, 0, 0xffffffff, 'x', "Endpoint 3 Interrupt Status Register" },
-{ "USB_EP3_MASK", 0x002120C8, 0, 0xffffffff, 'x', "Endpoint 3 Interrupt Mask Register" },
-{ "USB_EP3_FDAT", 0x002120CC, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Data Register" },
-{ "USB_EP3_FSTAT", 0x002120D0, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Status Register" },
-{ "USB_EP3_FCTRL", 0x002120D4, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Control Register" },
-{ "USB_EP3_LRFP", 0x002120D8, 0, 0xffffffff, 'x', "Endpoint 3 Last Read Frame Pointer Register" },
-{ "USB_EP3_LWFP", 0x002120DC, 0, 0xffffffff, 'x', "Endpoint 3 Last Write Frame Pointer Register" },
-{ "USB_EP3_FALRM", 0x002120E0, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Alarm Register" },
-{ "USB_EP3_FRDP", 0x002120E4, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Read Pointer Register" },
-{ "USB_EP3_FWRP", 0x002120E8, 0, 0xffffffff, 'x', "Endpoint 3 FIFO Write Pointer Register" },
-{ "USB_EP4_STAT", 0x002120F0, 0, 0xffffffff, 'x', "Endpoint 4 Status/Control Register" },
-{ "USB_EP4_INTR", 0x002120F4, 0, 0xffffffff, 'x', "Endpoint 4 Interrupt Status Register" },
-{ "USB_EP4_MASK", 0x002120F8, 0, 0xffffffff, 'x', "Endpoint 4 Interrupt Mask Register" },
-{ "USB_EP4_FDAT", 0x002120FC, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Data Register" },
-{ "USB_EP4_FSTAT", 0x00212100, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Status Register" },
-{ "USB_EP4_FCTRL", 0x00212104, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Control Register" },
-{ "USB_EP4_LRFP", 0x00212108, 0, 0xffffffff, 'x', "Endpoint 4 Last Read Frame Pointer Register" },
-{ "USB_EP4_LWFP", 0x0021210C, 0, 0xffffffff, 'x', "Endpoint 4 Last Write Frame Pointer Register" },
-{ "USB_EP4_FALRM", 0x00212110, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Alarm Register" },
-{ "USB_EP4_FRDP", 0x00212114, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Read Pointer Register" },
-{ "USB_EP4_FWRP", 0x00212118, 0, 0xffffffff, 'x', "Endpoint 4 FIFO Write Pointer Register" },
-{ "USB_EP5_STAT", 0x00212120, 0, 0xffffffff, 'x', "Endpoint 5 Status/Control Register" },
-{ "USB_EP5_INTR", 0x00212124, 0, 0xffffffff, 'x', "Endpoint 5 Interrupt Status Register" },
-{ "USB_EP5_MASK", 0x00212128, 0, 0xffffffff, 'x', "Endpoint 5 Interrupt Mask Register" },
-{ "USB_EP5_FDAT", 0x0021212C, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Data Register" },
-{ "USB_EP5_FSTAT", 0x00212130, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Status Register" },
-{ "USB_EP5_FCTRL", 0x00212134, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Control Register" },
-{ "USB_EP5_LRFP", 0x00212138, 0, 0xffffffff, 'x', "Endpoint 5 Last Read Frame Pointer Register" },
-{ "USB_EP5_LWFP", 0x0021213C, 0, 0xffffffff, 'x', "Endpoint 5 Last Write Frame Pointer Register" },
-{ "USB_EP5_FALRM", 0x00212140, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Alarm Register" },
-{ "USB_EP5_FRDP", 0x00212144, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Read Pointer Register" },
-{ "USB_EP5_FWRP", 0x00212148, 0, 0xffffffff, 'x', "Endpoint 5 FIFO Write Pointer Register" },
-// SPI
-{ "RXDATAREG1", 0x00213000, 0, 0xffffffff, 'x', "SPI 1 Rx Data Register" },
-{ "TXDATAREG1", 0x00213004, 0, 0xffffffff, 'x', "SPI 1 Tx Data Register" },
-{ "CONTROLREG1", 0x00213008, 0, 0xffffffff, 'x', "SPI 1 Control Register" },
-{ "INTREG1", 0x0021300C, 0, 0xffffffff, 'x', "SPI 1 Interrupt Control/Status Register" },
-{ "TESTREG1", 0x00213010, 0, 0xffffffff, 'x', "SPI 1 Test Register" },
-{ "PERIODREG1", 0x00213014, 0, 0xffffffff, 'x', "SPI 1 Sample Period Control Register" },
-{ "DMAREG1", 0x00213018, 0, 0xffffffff, 'x', "SPI 1 DMA Control Register" },
-{ "RESETREG1", 0x0021301C, 0, 0xffffffff, 'x', "SPI 1 Soft Reset Register" },
-// MMC
-{ "STR_STP_CLK", 0x00214000, 0, 0xffffffff, 'x', "MMC/SD Clock Control Register" },
-{ "STR_STP_CLK_ENDIAN", 0x00214000, 5, 1, 'x', "ENDIAN FIFO Mode Selection: setting this bit selects the Endian mode of the FIFO." },
-{ "STR_STP_CLK_RESET", 0x00214000, 3, 1, 'x', "Resets the MMC/SD module. 1 = Reset the MMC/SD module" },
-{ "STR_STP_CLK_ENABLE", 0x00214000, 2, 1, 'x', "Enables/Disables the MMC/SD module. When the module is disabled, the clock source and all internal operations are halted." },
-{ "STR_STP_CLK_START", 0x00214000, 1, 1, 'x', "1 = MMC/SD clock active" },
-{ "STR_STP_CLK_STOP", 0x00214000, 0, 1, 'x', "1 = MMC/SD clock stopped" },
-{ "STATUS", 0x00214004, 0, 0xffffffff, 'x', "MMC/SD Status Register" },
-{ "STATUS_CARD_PRESENCE", 0x00214004, 15, 1, 'x', "1 = At least 1 card is present" },
-{ "STATUS_SDIO_INT_ACTIVE", 0x00214004, 14, 1, 'x', "1 = Interrupt detected via SDIO card bus" },
-{ "STATUS_END_CMD_RESP", 0x00214004, 13, 1, 'x', "1 = Command transmitted successfully (response received)" },
-{ "STATUS_WRITE_OP_DONE", 0x00214004, 12, 1, 'x', "1 = Write operation complete" },
-{ "STATUS_DATA_TRANS_DONE", 0x00214004, 11, 1, 'x', "1 = Data transfer complete" },
-{ "STATUS_WR_CRC_ERROR_CODE", 0x00214004, 9, 3, 'x', "00 = No transmission error, CRC status is 010 (positive)" },
-{ "STATUS_CARD_BUS_CLK_RUN", 0x00214004, 8, 1, 'x', "1 = MMC/SD clock is running" },
-{ "STATUS_APPL_BUFF_FF", 0x00214004, 7, 1, 'x', "1 = Buffer is full" },
-{ "STATUS_APPL_BUFF_FE", 0x00214004, 6, 1, 'x', "1 = Buffer is empty" },
-{ "STATUS_RESP_CRC_ERR", 0x00214004, 5, 1, 'x', "1 = Response CRC error occurred" },
-{ "STATUS_CRC_READ_ERR", 0x00214004, 3, 1, 'x', "1 = CRC read error occurred" },
-{ "STATUS_CRC_WRITE_ERR", 0x00214004, 2, 1, 'x', "1 = CRC write error occurred" },
-{ "STATUS_TIME_OUT_RESP", 0x00214004, 1, 1, 'x', "1 = Time-out response error occurred" },
-{ "STATUS_TIME_OUT_READ", 0x00214004, 0, 1, 'x', "1 = Time-out read data error occurred" },
-{ "CLK_RATE", 0x00214008, 0, 0xffffffff, 'x', "MMC/SD Clock Rate Register" },
-{ "CLK_RATE_PRESCALER", 0x00214008, 3, 0x00000007, 'x', "Specifies the divider value to generate CLK_20M." },
-{ "CLK_RATE_DIV", 0x00214008, 0, 0x00000007, 'x', "Specifies the divider value to generate CLK_DIV" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-/*{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },
-{ "CMD_DAT_CONT", 0x0021400C, 0, 0xffffffff, 'x', "MMC/SD Command and Data Control Register" },*/
-{ "RES_TO", 0x00214010, 0, 0xffffffff, 'x', "MMC/SD Response Time Out Register" },
-{ "READ_TO", 0x00214014, 0, 0xffffffff, 'x', "MMC/SD Read Time Out Register" },
-{ "BLK_LEN", 0x00214018, 0, 0xffffffff, 'x', "MMC/SD Block Length Register" },
-{ "NOB", 0x0021401C, 0, 0xffffffff, 'x', "MMC/SD Number of Blocks Register" },
-{ "REV_NO", 0x00214020, 0, 0xffffffff, 'x', "MMC/SD Revision Number Register" },
-{ "INT_MASK", 0x00214024, 0, 0xffffffff, 'x', "MMC/SD Interrupt Mask Register" },
-{ "CMD", 0x00214028, 0, 0xffffffff, 'x', "MMC/SD Command Number Register" },
-{ "ARGH", 0x0021402C, 0, 0xffffffff, 'x', "MMC/SD Higher Argument Register" },
-{ "ARGL", 0x00214030, 0, 0xffffffff, 'x', "MMC/SD Lower Argument Register" },
-{ "RES_FIFO", 0x00214034, 0, 0xffffffff, 'x', "MMC/SD Response FIFO Register" },
-{ "BUFFER_ACCESS", 0x00214038, 0, 0xffffffff, 'x', "MMC/SD Buffer Access Register" },
-// I2C
-{ "IADR", 0x00217000, 0, 0xffffffff, 'x', "I2C Address Register" },
-{ "IFDR", 0x00217004, 0, 0xffffffff, 'x', "I2C Frequency Divider Register" },
-{ "I2CR", 0x00217008, 0, 0xffffffff, 'x', "I2C Control Register" },
-{ "I2CSR", 0x0021700C, 0, 0xffffffff, 'x', "I2C Status Register" },
-{ "I2DR", 0x00217010, 0, 0xffffffff, 'x', "I2C Data I/O Register" },
-// SSI
-{ "STX", 0x00218000, 0, 0xffffffff, 'x', "SSI Transmit Data Register" },
-{ "SRX", 0x00218004, 0, 0xffffffff, 'x', "SSI Receive Data Register" },
-{ "SCSR", 0x00218008, 0, 0xffffffff, 'x', "SSI Control/Status Register" },
-{ "STCR", 0x0021800C, 0, 0xffffffff, 'x', "SSI Transmit Configuration Register" },
-{ "SRCR", 0x00218010, 0, 0xffffffff, 'x', "SSI Receive Configuration Register" },
-{ "STCCR", 0x00218014, 0, 0xffffffff, 'x', "SSI Transmit Clock Control Register" },
-{ "SRCCR", 0x00218018, 0, 0xffffffff, 'x', "SSI Receive Clock Control Register" },
-{ "STSR", 0x0021801C, 0, 0xffffffff, 'x', "SSI Time Slot Register" },
-{ "SFCSR", 0x00218020, 0, 0xffffffff, 'x', "SSI FIFO Control/Status Register" },
-{ "SOR", 0x00218028, 0, 0xffffffff, 'x', "SSI Option Register" },
-// SPI
-{ "RXDATAREG2", 0x00219000, 0, 0xffffffff, 'x', "SPI 2 Rx Data Register" },
-{ "TXDATAREG2", 0x00219004, 0, 0xffffffff, 'x', "SPI 2 Tx Data Register" },
-{ "CONTROLREG2", 0x00219008, 0, 0xffffffff, 'x', "SPI 2 Control Register" },
-{ "INTREG2", 0x0021900C, 0, 0xffffffff, 'x', "SPI 2 Interrupt Control/Status Register" },
-{ "TESTREG2", 0x00219010, 0, 0xffffffff, 'x', "SPI 2 Test Register" },
-{ "PERIODREG2", 0x00219014, 0, 0xffffffff, 'x', "SPI 2 Sample Period Control Register" },
-{ "DMAREG2", 0x00219018, 0, 0xffffffff, 'x', "SPI 2 DMA Control Register" },
-{ "RESETREG2", 0x0021901C, 0, 0xffffffff, 'x', "SPI 2 Soft Reset Register" },
-// MS
-{ "MSCMD", 0x0021A000, 0, 0xffffffff, 'x', "Memory Stick Command Register" },
-{ "MSCS", 0x0021A002, 0, 0xffffffff, 'x', "Memory Stick Control/Status Register" },
-{ "MSTDATA", 0x0021A004, 0, 0xffffffff, 'x', "Memory Stick Transmit FIFO Data Register" },
-{ "MSRDATA", 0x0021A004, 0, 0xffffffff, 'x', "Memory Stick Receive FIFO Data Register" },
-{ "MSICS", 0x0021A006, 0, 0xffffffff, 'x', "Memory Stick Interrupt Control/Status Register" },
-{ "MSPPCD", 0x0021A008, 0, 0xffffffff, 'x', "Memory Stick Parallel Port Control/Data Register" },
-{ "MSC2", 0x0021A00A, 0, 0xffffffff, 'x', "Memory Stick Control 2 Register" },
-{ "MSACD", 0x0021A00C, 0, 0xffffffff, 'x', "Memory Stick Auto Command Register" },
-{ "MSFAECS", 0x0021A00E, 0, 0xffffffff, 'x', "Memory Stick FIFO Access Error Control/Status Register" },
-{ "MSCLKD", 0x0021A010, 0, 0xffffffff, 'x', "Memory Stick Serial Clock Divider Register" },
-{ "MSDRQC", 0x0021A012, 0, 0xffffffff, 'x', "Memory Stick DMA Request Control Register" },
-//
-{ "CSCR", 0x0021B000, 0, 0xffffffff, 'x', "Clock Source Control Register" },
-{ "MPCTL0", 0x0021B004, 0, 0xffffffff, 'x', "MCU PLL Control Register 0" },
-{ "MPCTL1", 0x0021B008, 0, 0xffffffff, 'x', "MCU PLL and System Clock Control Register 1" },
-{ "SPCTL0", 0x0021B00C, 0, 0xffffffff, 'x', "System PLL Control Register 0" },
-{ "SPCTL1", 0x0021B010, 0, 0xffffffff, 'x', "System PLL Control Register 1" },
-{ "PCDR", 0x0021B020, 0, 0xffffffff, 'x', "Peripheral Clock Divider Register" },
-{ "RSR", 0x0021B800, 0, 0xffffffff, 'x', "Reset Source Register" },
-{ "SIDR", 0x0021B804, 0, 0xffffffff, 'x', "Silicon ID Register" },
-{ "FMCR", 0x0021B808, 0, 0xffffffff, 'x', "Function Multiplexing Control Register" },
-{ "GPCR", 0x0021B80C, 0, 0xffffffff, 'x', "Global Peripheral Control Register" },
-{ "GCCR", 0x0021B810, 0, 0xffffffff, 'x', "Global Clock Control Register" },
-{ "DDIR_A", 0x0021C000, 0, 0xffffffff, 'x', "Port A Data Direction Register" },
-{ "OCR1_A", 0x0021C004, 0, 0xffffffff, 'x', "Port A Output Configuration Register 1" },
-{ "OCR2_A", 0x0021C008, 0, 0xffffffff, 'x', "Port A Output Configuration Register 2" },
-{ "ICONFA1_A", 0x0021C00C, 0, 0xffffffff, 'x', "Port A Input Configuration Register A1" },
-{ "ICONFA2_A", 0x0021C010, 0, 0xffffffff, 'x', "Port A Input Configuration Register A2" },
-{ "ICONFB1_A", 0x0021C014, 0, 0xffffffff, 'x', "Port A Input Configuration Register B1" },
-{ "ICONFB2_A", 0x0021C018, 0, 0xffffffff, 'x', "Port A Input Configuration Register B2" },
-{ "DR_A", 0x0021C01C, 0, 0xffffffff, 'x', "Port A Data Register" },
-{ "GIUS_A", 0x0021C020, 0, 0xffffffff, 'x', "Port A GPIO In Use Register" },
-{ "SSR_A", 0x0021C024, 0, 0xffffffff, 'x', "Port A Sample Status Register" },
-{ "ICR1_A", 0x0021C028, 0, 0xffffffff, 'x', "Port A Interrupt Configuration Register 1" },
-{ "ICR2_A", 0x0021C02C, 0, 0xffffffff, 'x', "Port A Interrupt Configuration Register 2" },
-{ "IMR_A", 0x0021C030, 0, 0xffffffff, 'x', "Port A Interrupt Mask Register" },
-{ "ISR_A", 0x0021C034, 0, 0xffffffff, 'x', "Port A Interrupt Status Register" },
-{ "GPR_A", 0x0021C038, 0, 0xffffffff, 'x', "Port A General Purpose Register" },
-{ "SWR_A", 0x0021C03C, 0, 0xffffffff, 'x', "Port A Software Reset Register" },
-{ "PUEN_A", 0x0021C040, 0, 0xffffffff, 'x', "Port A Pull_Up Enable Register" },
-{ "DDIR_B", 0x0021C100, 0, 0xffffffff, 'x', "Port B Data Direction Register" },
-{ "OCR1_B", 0x0021C104, 0, 0xffffffff, 'x', "Port B Output Configuration Register 1" },
-{ "OCR2_B", 0x0021C108, 0, 0xffffffff, 'x', "Port B Output Configuration Register 2" },
-{ "ICONFA1_B", 0x0021C10C, 0, 0xffffffff, 'x', "Port B Input Configuration Register A1" },
-{ "ICONFA2_B", 0x0021C110, 0, 0xffffffff, 'x', "Port B Input Configuration Register A2" },
-{ "ICONFB1_B", 0x0021C114, 0, 0xffffffff, 'x', "Port B Input Configuration Register B1" },
-{ "ICONFB2_B", 0x0021C118, 0, 0xffffffff, 'x', "Port B Input Configuration Register B2" },
-{ "DR_B", 0x0021C11C, 0, 0xffffffff, 'x', "Port B Data Register" },
-{ "GIUS_B", 0x0021C120, 0, 0xffffffff, 'x', "Port B GPIO In Use Register" },
-{ "SSR_B", 0x0021C124, 0, 0xffffffff, 'x', "Port B Sample Status Register" },
-{ "ICR1_B", 0x0021C128, 0, 0xffffffff, 'x', "Port B Interrupt Configuration Register 1" },
-{ "ICR2_B", 0x0021C12C, 0, 0xffffffff, 'x', "Port B Interrupt Configuration Register 2" },
-{ "IMR_B", 0x0021C130, 0, 0xffffffff, 'x', "Port B Interrupt Mask Register" },
-{ "ISR_B", 0x0021C134, 0, 0xffffffff, 'x', "Port B Interrupt Status Register" },
-{ "GPR_B", 0x0021C138, 0, 0xffffffff, 'x', "Port B General Purpose Register" },
-{ "SWR_B", 0x0021C13C, 0, 0xffffffff, 'x', "Port B Software Reset Register" },
-{ "PUEN_B", 0x0021C140, 0, 0xffffffff, 'x', "Port B Pull_Up Enable Register" },
-{ "DDIR_C", 0x0021C200, 0, 0xffffffff, 'x', "Port C Data Direction Register" },
-{ "OCR1_C", 0x0021C204, 0, 0xffffffff, 'x', "Port C Output Configuration Register 1" },
-{ "OCR2_C", 0x0021C208, 0, 0xffffffff, 'x', "Port C Output Configuration Register 2" },
-{ "ICONFA1_C", 0x0021C20C, 0, 0xffffffff, 'x', "Port C Input Configuration Register A1" },
-{ "ICONFA2_C", 0x0021C210, 0, 0xffffffff, 'x', "Port C Input Configuration Register A2" },
-{ "ICONFB1_C", 0x0021C214, 0, 0xffffffff, 'x', "Port C Input Configuration Register B1" },
-{ "ICONFB2_C", 0x0021C218, 0, 0xffffffff, 'x', "Port C Input Configuration Register B2" },
-{ "DR_C", 0x0021C21C, 0, 0xffffffff, 'x', "Port C Data Register" },
-{ "GIUS_C", 0x0021C220, 0, 0xffffffff, 'x', "Port C GPIO In Use Register" },
-{ "SSR_C", 0x0021C224, 0, 0xffffffff, 'x', "Port C Sample Status Register" },
-{ "ICR1_C", 0x0021C228, 0, 0xffffffff, 'x', "Port C Interrupt Configuration Register 1" },
-{ "ICR2_C", 0x0021C22C, 0, 0xffffffff, 'x', "Port C Interrupt Configuration Register 2" },
-{ "IMR_C", 0x0021C230, 0, 0xffffffff, 'x', "Port C Interrupt Mask Register" },
-{ "ISR_C", 0x0021C234, 0, 0xffffffff, 'x', "Port C Interrupt Status Register" },
-{ "GPR_C", 0x0021C238, 0, 0xffffffff, 'x', "Port C General Purpose Register" },
-{ "SWR_C", 0x0021C23C, 0, 0xffffffff, 'x', "Port C Software Reset Register" },
-{ "PUEN_C", 0x0021C240, 0, 0xffffffff, 'x', "Port C Pull_Up Enable Register" },
-{ "DDIR_D", 0x0021C300, 0, 0xffffffff, 'x', "Port D Data Direction Register" },
-{ "OCR1_D", 0x0021C304, 0, 0xffffffff, 'x', "Port D Output Configuration Register 1" },
-{ "OCR2_D", 0x0021C308, 0, 0xffffffff, 'x', "Port D Output Configuration Register 2" },
-{ "ICONFA1_D", 0x0021C30C, 0, 0xffffffff, 'x', "Port D Input Configuration Register A1" },
-{ "ICONFA2_D", 0x0021C310, 0, 0xffffffff, 'x', "Port D Input Configuration Register A2" },
-{ "ICONFB1_D", 0x0021C314, 0, 0xffffffff, 'x', "Port D Input Configuration Register B1" },
-{ "ICONFB2_D", 0x0021C318, 0, 0xffffffff, 'x', "Port D Input Configuration Register B2" },
-{ "DR_D", 0x0021C31C, 0, 0xffffffff, 'x', "Port D Data Register" },
-{ "GIUS_D", 0x0021C320, 0, 0xffffffff, 'x', "Port D GPIO In Use Register" },
-{ "SSR_D", 0x0021C324, 0, 0xffffffff, 'x', "Port D Sample Status Register" },
-{ "ICR1_D", 0x0021C328, 0, 0xffffffff, 'x', "Port D Interrupt Configuration Register 1" },
-{ "ICR2_D", 0x0021C32C, 0, 0xffffffff, 'x', "Port D Interrupt Configuration Register 2" },
-{ "IMR_D", 0x0021C330, 0, 0xffffffff, 'x', "Port D Interrupt Mask Register" },
-{ "ISR_D", 0x0021C334, 0, 0xffffffff, 'x', "Port D Interrupt Status Register" },
-{ "GPR_D", 0x0021C338, 0, 0xffffffff, 'x', "Port D General Purpose Register" },
-{ "SWR_D", 0x0021C33C, 0, 0xffffffff, 'x', "Port D Software Reset Register" },
-{ "PUEN_D", 0x0021C340, 0, 0xffffffff, 'x', "Port D Pull_Up Enable Register" },
-{ "CS0U", 0x00220000, 0, 0xffffffff, 'x', "Chip Select 0 Upper Control Register" },
-{ "CS0L", 0x00220004, 0, 0xffffffff, 'x', "Chip Select 0 Lower Control Register" },
-{ "CS1U", 0x00220008, 0, 0xffffffff, 'x', "Chip Select 1 Upper Control Register" },
-{ "CS1L", 0x0022000C, 0, 0xffffffff, 'x', "Chip Select 1 Lower Control Register" },
-{ "CS2U", 0x00220010, 0, 0xffffffff, 'x', "Chip Select 2 Upper Control Register" },
-{ "CS2L", 0x00220014, 0, 0xffffffff, 'x', "Chip Select 2 Lower Control Register" },
-{ "CS3U", 0x00220018, 0, 0xffffffff, 'x', "Chip Select 3 Upper Control Register" },
-{ "CS3L", 0x0022001C, 0, 0xffffffff, 'x', "Chip Select 3 Lower Control Register" },
-{ "CS4U", 0x00220020, 0, 0xffffffff, 'x', "Chip Select 4 Upper Control Register" },
-{ "CS4L", 0x00220024, 0, 0xffffffff, 'x', "Chip Select 4 Lower Control Register" },
-{ "CS5U", 0x00220028, 0, 0xffffffff, 'x', "Chip Select 5 Upper Control Register" },
-{ "CS5L", 0x0022002C, 0, 0xffffffff, 'x', "Chip Select 5 Lower Control Register" },
-{ "EIM", 0x00220030, 0, 0xffffffff, 'x', "EIM Configuration Register" },
-{ "SDCTL0", 0x00221000, 0, 0xffffffff, 'x', "SDRAM 0 Control Register" },
-{ "SDCTL1", 0x00221004, 0, 0xffffffff, 'x', "SDRAM 1 Control Register" },
-{ "MISCELLANEOUS", 0x00221014, 0, 0xffffffff, 'x', "Miscellaneous Register" },
-{ "SDRST", 0x00221018, 0, 0xffffffff, 'x', "SDRAM Reset Register" },
-{ "MMA_MAC_MOD", 0x00222000, 0, 0xffffffff, 'x', "MMA MAC Module Register" },
-{ "MMA_MAC_CTRL", 0x00222004, 0, 0xffffffff, 'x', "MMA MAC Control Register" },
-{ "MMA_MAC_MULT", 0x00222008, 0, 0xffffffff, 'x', "MMA MAC Multiply Counter Register" },
-{ "MMA_MAC_ACCU", 0x0022200C, 0, 0xffffffff, 'x', "MMA MAC Accumulate Counter Register" },
-{ "MMA_MAC_INTR", 0x00222010, 0, 0xffffffff, 'x', "MMA MAC Interrupt Register" },
-{ "MMA_MAC_INTR_MASK", 0x00222014, 0, 0xffffffff, 'x', "MMA MAC Interrupt Mask Register" },
-{ "MMA_MAC_FIFO", 0x00222018, 0, 0xffffffff, 'x', "MMA MAC FIFO Register" },
-{ "MMA_MAC_FIFO_STAT", 0x0022201C, 0, 0xffffffff, 'x', "MMA MAC FIFO Status Register" },
-{ "MMA_MAC_BURST", 0x00222020, 0, 0xffffffff, 'x', "MMA MAC Burst Count Register" },
-{ "MMA_MAC_BITSEL", 0x00222024, 0, 0xffffffff, 'x', "MMA MAC Bit Select Register" },
-{ "MMA_MAC_XYACCU", 0x00222040, 0, 0xffffffff, 'x', "MMA MAC XY Count Accumulate Register" },
-{ "MMA_MAC_XBASE", 0x00222200, 0, 0xffffffff, 'x', "MMA MAC X Base Address Register" },
-{ "MMA_MAC_XINDEX", 0x00222204, 0, 0xffffffff, 'x', "MMA MAC X Index Register" },
-{ "MMA_MAC_XLENGTH", 0x00222208, 0, 0xffffffff, 'x', "MMA MAC X Length Register" },
-{ "MMA_MAC_XMODIFY", 0x0022220C, 0, 0xffffffff, 'x', "MMA MAC X Modify Register" },
-{ "MMA_MAC_XINCR", 0x00222210, 0, 0xffffffff, 'x', "MMA MAC X Increment Register" },
-{ "MMA_MAC_XCOUNT", 0x00222214, 0, 0xffffffff, 'x', "MMA MAC X Count Register" },
-{ "MMA_MAC_YBASE", 0x00222300, 0, 0xffffffff, 'x', "MMA MAC Y Base Address Register" },
-{ "MMA_MAC_YINDEX", 0x00222304, 0, 0xffffffff, 'x', "MMA MAC Y Index Register" },
-{ "MMA_MAC_YLENGTH", 0x00222308, 0, 0xffffffff, 'x', "MMA MAC Y Length Register" },
-{ "MMA_MAC_YMODIFY", 0x0022230C, 0, 0xffffffff, 'x', "MMA MAC Y Modify Register" },
-{ "MMA_MAC_YINCR", 0x00222310, 0, 0xffffffff, 'x', "MMA MAC Y Increment Register" },
-{ "MMA_MAC_YCOUNT", 0x00222314, 0, 0xffffffff, 'x', "MMA MAC Y Count Register" },
-{ "MMA_DCTCTRL", 0x00222400, 0, 0xffffffff, 'x', "DCT/iDCT Control Register" },
-{ "MMA_DCTVERSION", 0x00222404, 0, 0xffffffff, 'x', "DCT/iDCT Version Register" },
-{ "MMA_DCTIRQENA", 0x00222408, 0, 0xffffffff, 'x', "DCT/iDCT IRQ Enable Register" },
-{ "MMA_DCTIRQSTAT", 0x0022240C, 0, 0xffffffff, 'x', "DCT/iDCT IRQ Status Register" },
-{ "DSA_DCTSRCDATA", 0x00222410, 0, 0xffffffff, 'x', "DCT/iDCT Source Data Address" },
-{ "MMA_DCTDESDATA", 0x00222414, 0, 0xffffffff, 'x', "DCT/iDCT Destination Data Address" },
-{ "MMA_DCTXOFF", 0x00222418, 0, 0xffffffff, 'x', "DCT/iDCT X-Offset Address" },
-{ "MMA_DCTYOFF", 0x0022241C, 0, 0xffffffff, 'x', "DCT/iDCT Y-Offset Address" },
-{ "MMA_DCTXYCNT", 0x00222420, 0, 0xffffffff, 'x', "DCT/iDCT XY Count" },
-{ "MMA_DCTSKIP", 0x00222424, 0, 0xffffffff, 'x', "DCT/iDCT Skip Address" },
-{ "MMA_DCTFIFO", 0x00222500, 0, 0xffffffff, 'x', "DCT/iDCT Data FIFO" },
-{ "INTCNTL", 0x00223000, 0, 0xffffffff, 'x', "Interrupt Control Register" },
-{ "NIMASK", 0x00223004, 0, 0xffffffff, 'x', "Normal Interrupt Mask Register" },
-{ "INTENNUM", 0x00223008, 0, 0xffffffff, 'x', "Interrupt Enable Number Register" },
-{ "INTDISNUM", 0x0022300C, 0, 0xffffffff, 'x', "Interrupt Disable Number Register" },
-{ "INTENABLEH", 0x00223010, 0, 0xffffffff, 'x', "Interrupt Enable Register High" },
-{ "INTENABLEL", 0x00223014, 0, 0xffffffff, 'x', "Interrupt Enable Register Low" },
-{ "INTTYPEH", 0x00223018, 0, 0xffffffff, 'x', "Interrupt Type Register High" },
-{ "INTTYPEL", 0x0022301C, 0, 0xffffffff, 'x', "Interrupt Type Register Low" },
-{ "NIPRIORITY7", 0x00223020, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 7" },
-{ "NIPRIORITY6", 0x00223024, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 6" },
-{ "NIPRIORITY5", 0x00223028, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 5" },
-{ "NIPRIORITY4", 0x0022302C, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 4" },
-{ "NIPRIORITY3", 0x00223030, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 3" },
-{ "NIPRIORITY2", 0x00223034, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 2" },
-{ "NIPRIORITY1", 0x00223038, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 1" },
-{ "NIPRIORITY0", 0x0022303C, 0, 0xffffffff, 'x', "Normal Interrupt Priority Level Register 0" },
-{ "NIVECSR", 0x00223040, 0, 0xffffffff, 'x', "Normal Interrupt Vector and Status Register" },
-{ "FIVECSR", 0x00223044, 0, 0xffffffff, 'x', "Fast Interrupt Vector and Status Register" },
-{ "INTSRCH", 0x00223048, 0, 0xffffffff, 'x', "Interrupt Source Register High" },
-{ "INTSRCL", 0x0022304C, 0, 0xffffffff, 'x', "Interrupt Source Register Low" },
-{ "INTFRCH", 0x00223050, 0, 0xffffffff, 'x', "Interrupt Force Register High" },
-{ "INTFRCL", 0x00223054, 0, 0xffffffff, 'x', "Interrupt Force Register Low" },
-{ "NIPNDH", 0x00223058, 0, 0xffffffff, 'x', "Normal Interrupt Pending Register High" },
-{ "NIPNDL", 0x0022305C, 0, 0xffffffff, 'x', "Normal Interrupt Pending Register Low" },
-{ "FIPNDH", 0x00223060, 0, 0xffffffff, 'x', "Fast Interrupt Pending Register High" },
-{ "FIPNDL", 0x00223064, 0, 0xffffffff, 'x', "Fast Interrupt Pending Register Low" },
-{ "CSICR1", 0x00224000, 0, 0xffffffff, 'x', "CSI Control Register 1" },
-{ "CSICR2", 0x00224004, 0, 0xffffffff, 'x', "CSI Control Register 2" },
-{ "CSISR", 0x00224008, 0, 0xffffffff, 'x', "CSI Status Register 1" },
-{ "CSISTATR", 0x0022400C, 0, 0xffffffff, 'x', "CSI Statistic FIFO Register 1" },
-{ "CSIRXR", 0x00224010, 0, 0xffffffff, 'x', "CSI RxFIFO Register 1" },
-};
-
-// Size of mmapping:
-#define MAP_SIZE 4096
-#define MAP_MASK ( MAP_SIZE - 1 )
+/*
+ * imxregs.h - Tool to display and modify iMX registers from Linux's userspace
+ *
+ * Author/Maintainer: J. Boibessot
+ * Derivated from pxaregs (c) Copyright 2002 by M&N Logistik-L�ungen Online GmbH
+ *
+ * This tool is placed under the GPL.
+ *
+*/
+
+typedef unsigned int u32;
+
+struct reg_info {
+ char *name;
+ u32 addr;
+ int shift;
+ u32 mask;
+ char type;
+ char *desc;
+};
+
+
+static struct reg_info regs[] =
+{
+// Watchdog
+{ "WCR", 0x00201000, 0, 0xffffffff, 'x', "Watchdog Control Register" },
+{ "WSR", 0x00201004, 0, 0xffffffff, 'x', "Watchdog Service Register" },
+{ "WSTR", 0x00201008, 0, 0xffffffff, 'x', "Watchdog Status Register" },
+// Timers
+{ "TCTL1", 0x00202000, 0, 0xffffffff, 'x', "Timer 1 Control Register" },
+{ "TPRER1", 0x00202004, 0, 0xffffffff, 'x', "Timer 1 Prescaler Register" },
+{ "TCMP1", 0x00202008, 0, 0xffffffff, 'x', "Timer 1 Compare Register" },
+{ "TCR1", 0x0020200C, 0, 0xffffffff, 'x', "Timer 1 Capture Register" },
+{ "TCN1", 0x00202010, 0, 0xffffffff, 'x', "Timer 1 Counter Register" },
+{ "TSTAT1", 0x00202014, 0, 0xffffffff, 'x', "Timer 1 Status Register" },
+{ "TCTL2", 0x00203000, 0, 0xffffffff, 'x', "Timer 2 Control Register" },
+{ "TPRER2", 0x00203004, 0, 0xffffffff, 'x', "Timer 2 Prescaler Register" },
+{ "TCMP2", 0x00203008, 0, 0xffffffff, 'x', "Timer 2 Compare Register" },
+{ "TCR2", 0x0020300C, 0, 0xffffffff, 'x', "Timer 2 Capture Register" },
+{ "TCN2", 0x00203010, 0, 0xffffffff, 'x', "Timer 2 Counter Register" },
+{ "TSTAT2", 0x00203014, 0, 0xffffffff, 'x', "Timer 2 Status Register" },
+// RTC
+{ "HOURMIN", 0x00204000, 0, 0xffffffff, 'x', "RTC Hours and minutes counter register" },
+{ "SECONDS", 0x00204004, 0, 0xffffffff, 'x', "RTC Seconds counter register" },
+{ "ALRM_HM", 0x00204008, 0, 0xffffffff, 'x', "RTC Hours and minutes alarm register" },
+{ "ALRM_SEC", 0x0020400C, 0, 0xffffffff, 'x', "RTC Seconds alarm register" },
+{ "RCCTL", 0x00204010, 0, 0xffffffff, 'x', "RTC Control register" },
+{ "RTCIENR", 0x00204018, 0, 0xffffffff, 'x', "RTC Interrupt Enable register" },
+{ "STPWCH", 0x0020401C, 0, 0xffffffff, 'x', "RTC Stopwatch minutes register" },
+{ "DAYR", 0x00204020, 0, 0xffffffff, 'x', "RTC Days counter register" },
+{ "DAYALARM", 0x00204024, 0, 0xffffffff, 'x', "RTC Day Alarm register" },
+//LCD
+{ "SSA", 0x00205000, 0, 0xffffffff, 'x', "Screen Start Address Register" },
+{ "SIZE", 0x00205004, 0, 0xffffffff, 'x', "Size Register" },
+{ "VPW", 0x00205008, 0, 0xffffffff, 'x', "Virtual Page Width Register" },
+{ "CPOS", 0x0020500C, 0, 0xffffffff, 'x', "LCD Cursor Position Register" },
+{ "LCWHB", 0x00205010, 0, 0xffffffff, 'x', "LCD Cursor Width Height and Blink Register" },
+{ "LCHCC", 0x00205014, 0, 0xffffffff, 'x', "LCD Color Cursor Mapping Register" },
+{ "LPCR", 0x00205018, 0, 0xffffffff, 'x', "Panel Configuration Register" },
+{ "HCR", 0x0020501C, 0, 0xffffffff, 'x', "Horizontal Configuration Register" },
+{ "VCR", 0x00205020, 0, 0xffffffff, 'x', "Vertical Configuration Register" },
+{ "POS", 0x00205024, 0, 0xffffffff, 'x', "Panning Offset Register" },
+{ "LSCR1", 0x00205028, 0, 0xffffffff, 'x', "Sharp Configuration 1 Register" },
+{ "PWMR", 0x0020502C, 0, 0xffffffff, 'x', "PWM Contrast Control Register" },
+{ "DMACR", 0x00205030, 0, 0xffffffff, 'x', "DMA Control Register" },
+{ "RMCR", 0x00205034, 0, 0xffffffff, 'x', "Refresh Mode Control Register" },
+{ "LCDICR", 0x00205038, 0, 0xffffffff, 'x', "Interrupt Configuration Register" },
+{ "LCDISR", 0x00205040, 0, 0xffffffff, 'x', "Interrupt Status Register" },
+// UART 1
+{ "URX11D_1", 0x0020602C, 0, 0xffffffff, 'x', "UART1 Receiver Register 11" },
+{ "URX12D_1", 0x00206030, 0, 0xffffffff, 'x', "UART1 Receiver Register 12" },
+{ "URX13D_1", 0x00206034, 0, 0xffffffff, 'x', "UART1 Receiver Register 13" },
+{ "URX14D_1", 0x00206038, 0, 0xffffffff, 'x', "UART1 Receiver Register 14" },
+{ "URX15D_1", 0x0020603C, 0, 0xffffffff, 'x', "UART1 Receiver Register 15" },
+{ "UTX0D_1", 0x00206040, 0, 0xffffffff, 'x', "UART1 Transmitter Register 0" },
+{ "UTX1D_1", 0x00206044, 0, 0xffffffff, 'x', "UART1 Transmitter Register 1" },
+{ "UTX2D_1", 0x00206048, 0, 0xffffffff, 'x', "UART1 Transmitter Register 2" },
+{ "UTX3D_1", 0x0020604C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 3" },
+{ "UTX4D_1", 0x00206050, 0, 0xffffffff, 'x', "UART1 Transmitter Register 4" },
+{ "UTX5D_1", 0x00206054, 0, 0xffffffff, 'x', "UART1 Transmitter Register 5" },
+{ "UTX6D_1", 0x00206058, 0, 0xffffffff, 'x', "UART1 Transmitter Register 6" },
+{ "UTX7D_1", 0x0020605C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 7" },
+{ "UTX8D_1", 0x00206060, 0, 0xffffffff, 'x', "UART1 Transmitter Register 8" },
+{ "UTX9D_1", 0x00206064, 0, 0xffffffff, 'x', "UART1 Transmitter Register 9" },
+{ "UTX10D_1", 0x00206068, 0, 0xffffffff, 'x', "UART1 Transmitter Register 10" },
+{ "UTX11D_1", 0x0020606C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 11" },
+{ "UTX12D_1", 0x00206070, 0, 0xffffffff, 'x', "UART1 Transmitter Register 12" },
+{ "UTX13D_1", 0x00206074, 0, 0xffffffff, 'x', "UART1 Transmitter Register 13" },
+{ "UTX14D_1", 0x00206078, 0, 0xffffffff, 'x', "UART1 Transmitter Register 14" },
+{ "UTX15D_1", 0x0020607C, 0, 0xffffffff, 'x', "UART1 Transmitter Register 15" },
+{ "UCR1_1", 0x00206080, 0, 0xffffffff, 'x', "UART1 Control Register 1" },
+{ "UCR2_1", 0x00206084, 0, 0xffffffff, 'x', "UAR...
[truncated message content] |
|
From: <ar...@us...> - 2008-10-29 15:11:09
|
Revision: 908
http://armadeus.svn.sourceforge.net/armadeus/?rev=908&view=rev
Author: artemys
Date: 2008-10-29 15:11:00 +0000 (Wed, 29 Oct 2008)
Log Message:
-----------
[LINUX] Remove fpga/dev_tools/fpgaaccess/Module.symvers from SVN (it's a generated file)
Removed Paths:
-------------
trunk/target/linux/modules/fpga/dev_tools/fpgaaccess/Module.symvers
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ar...@us...> - 2008-10-29 15:08:56
|
Revision: 907
http://armadeus.svn.sourceforge.net/armadeus/?rev=907&view=rev
Author: artemys
Date: 2008-10-29 15:08:41 +0000 (Wed, 29 Oct 2008)
Log Message:
-----------
[LINUX] Remove fpga/dev_tools/fpgaaccess/fpgaregs from SVN (it's a generated executable)
Removed Paths:
-------------
trunk/target/linux/modules/fpga/dev_tools/fpgaaccess/fpgaregs
Deleted: trunk/target/linux/modules/fpga/dev_tools/fpgaaccess/fpgaregs
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|