[Avila] Too many ethernet interrupts on Gateworks board

David Acker dacker at roinet.com
Tue Dec 19 11:48:40 EST 2006


--------------050706080809070109080107
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

starman986 wrote:
> Thanks David,
> 
> I think I'll start with the ethernet driver, then try
> the kernel and end with updating the Madwifi stuff.
> 

I attached my patchset here.  It is based on diffing the gateworks 2.6.x to 2.6.18 and some cleanup.  It is setup so 
that the board type should be CONFIG_ARCH_IXDP425 and not AVILA as the gateworks documentation mentions: "Do NOT choose 
Avila as a supported platform. You MUST select IXDP425 as the platform. Currently RedBoot does not pass the Gateworks 
Avila Machine Id (526) to Linux but rather passes the IXDP425 Machine Id (245). At some point within the next BSP 
release or two we will change RedBoot to pass 526 to Linux at which time Linux will need to be configured as Avila." 
See RedBoot's packages/hal/arm/xscale/ixdp425/current/cdl/hal_arm_xscale_ixdp425.cdl for the file.  I have not tried a 
patch to this but it looks pretty simple.

This patchset can be applied to 2.6.18.4 and perhaps other versions.  It does not include the ethernet driver.  It is 
big endian mode.  Some sites, like the nslu2 folks have little endian versions as well.

By the way, you will need to manually set the firmware and MAC addresses of the ethernet ports with my patchset.  See 
Documentation/networking/ixp4xx/README . I handle it using option 2 in the README and then using the following code:

modprobe ixp4xx_npe
cat /etc/IxNpeMicrocode.dat > /dev/ixp4xx_ucode
modprobe ixp4xx_qmgr
modprobe ixp4xx_mac

# The addresses live in the first 12 bytes of eeprom.
# We use hexdump to format them in hex with colons separating the bytes.
macs=`hexdump -v -n 12 -e "1/1 \"%.2X:\"" /sys/class/i2c-dev/i2c-0/device/0-0051/eeprom`
mac0=${macs:0:17}
mac1=${macs:18:17}
ifconfig eth0 hw ether ${mac0}
ifconfig eth1 hw ether ${mac1}

Also, see http://lists.arm.linux.org.uk/pipermail/linux-arm-kernel/2006-December/037662.html
on the arm kernel mailing list.  It looks like 2.6.20 will support avila nicely, even with the new libata driver.

Does anyone know when the GPL ethernet driver is going to be submitted to the netdev list?  I have not seen it go 
through there.  It did appear on the debian kernel list but it really needs to go through netdev to get into the main line.
-Ack

--------------050706080809070109080107
Content-Type: text/x-patch;
 name="02-gateworks.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="02-gateworks.diff"

diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/arch/arm/kernel/vmlinux.lds.S linux-2.6.18.1/arch/arm/kernel/vmlinux.lds.S
--- linux-2.6.18.1.orig/arch/arm/kernel/vmlinux.lds.S	2006-10-30 14:10:31.000000000 -0500
+++ linux-2.6.18.1/arch/arm/kernel/vmlinux.lds.S	2006-10-30 14:12:54.000000000 -0500
@@ -181,6 +181,7 @@ SECTIONS
  * These must never be empty
  * If you have to comment these two assert statements out, your
  * binutils is too old (for other reasons as well)
- */
+
 ASSERT((__proc_info_end - __proc_info_begin), "missing CPU support")
 ASSERT((__arch_info_end - __arch_info_begin), "no machine record defined")
+*/
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/char/ixp425_gpio.c linux-2.6.18.1/drivers/char/ixp425_gpio.c
--- linux-2.6.18.1.orig/drivers/char/ixp425_gpio.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.18.1/drivers/char/ixp425_gpio.c	2006-10-30 14:12:54.000000000 -0500
@@ -0,0 +1,251 @@
+/*
+ * ixp425_gpio.c : Intel IXP425 GPIO driver Linux
+ *                 Copyright (C) 2004, Tim Harvey <tim_harvey at yahoo.com>
+ *                 Hautespot Networks, www.hautespot.net
+ *
+ * Description:
+ *
+ *    This driver allows access to the IXP425 Digital IO
+ *
+ * This source code 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.
+ *
+ * TODO: 
+ *   - extend to allow interrupts
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/version.h>
+#include <linux/kernel.h>
+#include <linux/module.h>
+#include <linux/init.h>
+#include <linux/proc_fs.h>
+#include <linux/fcntl.h>
+#include <linux/miscdevice.h>
+
+#include <asm/uaccess.h>	/* copy_to_user, copy_from_user */
+//#include <asm-arm/arch-ixp4xx/gpio.h>
+
+//#include <linux/ixp425-gpio.h>
+
+#include <asm-arm/hardware.h>
+#include <asm-arm/arch-ixp4xx/ixp4xx-regs.h>
+
+struct gpio_bit {
+  unsigned char bit;
+  unsigned char state;
+};
+
+#define DEVICE_NAME "gpio"
+#define GPIO_MAJOR 127
+//#define DEBUG
+
+/*
+ * GPIO interface
+ */
+
+/* /dev/gpio */
+static int gpio_ioctl(struct inode *inode, struct file *file,
+                     unsigned int cmd, unsigned long arg);
+
+/* /proc/driver/gpio */
+static int gpio_read_proc(char *page, char **start, off_t off,
+                         int count, int *eof, void *data);
+
+static unsigned char gpio_status;        /* bitmapped status byte.       */
+
+#define ERROR   (-1)
+#define OK                      0
+#define ixp425GPIOLineConfig    gpio_line_config
+#define ixp425GPIOLineGet       gpio_line_get
+#define ixp425GPIOLineSet       gpio_line_set
+#define sysMicroDelay(x)        udelay(x)
+#define IXP425_GPIO_SIG         int
+
+#define GPIO_IS_OPEN             0x01    /* means /dev/gpio is in use     */
+
+/*
+ *      Now all the various file operations that we export.
+ */
+static int gpio_ioctl(struct inode *inode, struct file *file,
+                         unsigned int cmd, unsigned long arg)
+{
+	struct gpio_bit bit;
+	IXP425_GPIO_SIG val;
+
+	if (copy_from_user(&bit, (struct gpio_bit *)arg, 
+				sizeof(bit)))
+		return -EFAULT;
+#ifdef DEBUG
+printk("ixp425_gpio: ioctl cmd 0x%02x, bit %d, state %d\n", cmd, bit.bit, bit.state);
+#endif
+
+        switch (cmd) {
+
+        case GPIO_GET_BIT:
+		ixp425GPIOLineGet(bit.bit, &val);
+		bit.state = val;
+#ifdef DEBUG
+             	printk("ixp425_gpio: Read _bit 0x%02x %s\n", bit.bit, (bit.state==0)?"LOW":"HIGH");
+#endif
+		return copy_to_user((void *)arg, &bit, sizeof(bit)) ? -EFAULT : 0;
+        case GPIO_SET_BIT:
+#ifdef DEBUG
+             	printk("ixp425_gpio: Write _bit 0x%02x %s\n", bit.bit, (bit.state==0)?"LOW":"HIGH");
+#endif
+		val = bit.state;
+		ixp425GPIOLineSet(bit.bit, val);
+		return OK;
+	case GPIO_GET_CONFIG:
+          	ixp425GPIOLineConfig(bit.bit, bit.state);
+#ifdef DEBUG
+             	printk("ixp425_gpio: Read config _bit 0x%02x %s\n", bit.bit, (bit.state==IXP425_GPIO_IN)?"IN":"OUT");
+#endif
+		return copy_to_user((void *)arg, &bit, sizeof(bit)) ? -EFAULT : 0;
+	case GPIO_SET_CONFIG:
+		val = bit.state;
+#ifdef DEBUG
+             	printk("ixp425_gpio: Write config _bit 0x%02x %s\n", bit.bit, (bit.state==IXP425_GPIO_IN)?"IN":"OUT");
+#endif
+          	ixp425GPIOLineConfig(bit.bit, bit.state);
+		return OK;
+	}
+	return -EINVAL;
+}
+
+
+static int gpio_open(struct inode *inode, struct file *file)
+{
+        if (gpio_status & GPIO_IS_OPEN)
+                return -EBUSY; 
+
+        gpio_status |= GPIO_IS_OPEN;
+
+        return 0;
+}
+
+
+static int gpio_release(struct inode *inode, struct file *file)
+{
+        /*
+         * Turn off all interrupts once the device is no longer
+         * in use and clear the data.
+         */
+
+        gpio_status &= ~GPIO_IS_OPEN;
+
+        return 0;
+}
+
+
+/*
+ *      The various file operations we support.
+ */
+
+static struct file_operations gpio_fops = {
+        .owner          = THIS_MODULE,
+        .ioctl          = gpio_ioctl,
+        .open           = gpio_open,
+        .release        = gpio_release,
+};
+
+static struct miscdevice gpio_dev =
+{
+        .minor          = 0,
+        .name           = "gpio",
+        .fops           = &gpio_fops,
+};
+
+
+
+
+#ifdef CONFIG_PROC_FS
+static struct proc_dir_entry *dir;
+
+/*
+ *      Info exported via "/proc/driver/gpio".
+ */
+static int gpio_get_status(char *buf)
+{
+        char *p;
+
+        p = buf;
+
+        /*
+         */
+	u8 val = 0;
+	int i;
+	int bit;
+	for (i = 0; i < 16; i++) {
+		gpio_line_get(i, &bit);
+		if (bit)
+			val |= (1 << i);
+	}
+        p += sprintf(p, "gpio_config\t: 0x%04x\n", val);
+
+        return p - buf;
+}
+
+
+/* /proc/driver/gpio read op 
+ */
+static int gpio_read_proc(char *page, char **start, off_t off,
+                             int count, int *eof, void *data)
+{
+        int len = gpio_get_status (page);
+        if (len <= off+count) *eof = 1;
+        *start = page + off;
+        len -= off;
+        if (len>count) len = count;
+        if (len<0) len = 0;
+        return len;
+}
+#endif /* CONFIG_PROC_FS */
+
+
+static int __init gpio_init_module(void)
+{
+        int retval;
+
+        /* register /dev/gpio file ops */
+	retval = register_chrdev(GPIO_MAJOR, DEVICE_NAME, &gpio_fops);
+        if(retval < 0)
+                return retval;
+
+#ifdef CONFIG_PROC_FS
+	struct proc_dir_entry *res;
+	dir = proc_mkdir("driver/gpio", NULL);
+	if (!dir) {
+		misc_deregister(&gpio_dev);
+		return -ENOMEM;
+	}
+        /* register /proc/driver/gpio */
+	res = create_proc_entry("info", 644, dir);
+	if (res) {
+		res->read_proc= gpio_read_proc;
+	} else {
+		misc_deregister(&gpio_dev);
+		return -ENOMEM;
+	}
+#endif
+
+	printk("ixp425_gpio: IXP425 GPIO driver loaded\n");
+
+	return 0; 
+}
+
+static void __exit gpio_cleanup_module(void)
+{
+	remove_proc_entry ("info", dir);
+        misc_deregister(&gpio_dev);
+
+	printk("ixp425_gpio: IXP425 GPIO driver unloaded\n");
+}
+
+module_init(gpio_init_module);
+module_exit(gpio_cleanup_module);
+
+MODULE_AUTHOR("Tim Harvey <tim_harvey at yahoo.com>");
+MODULE_LICENSE("GPL");
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/char/Kconfig linux-2.6.18.1/drivers/char/Kconfig
--- linux-2.6.18.1.orig/drivers/char/Kconfig	2006-10-30 14:10:43.000000000 -0500
+++ linux-2.6.18.1/drivers/char/Kconfig	2006-10-30 14:12:54.000000000 -0500
@@ -636,6 +636,14 @@ config DS1620
 	  It is recommended to be used on a NetWinder, but it is not a
 	  necessity.
 
+config IXP425_GPIO
+  tristate "IXP425 GPIO Support"
+  depends on ARCH_IXP4XX
+  ---help---
+    If you want support for user-space access to the ixp425 general
+    purpose I/O (GPIO) pins, say Y here, otherwise N.
+    This will build in the GPIO device driver for /dev/ixp425-gpio
+
 config NWBUTTON
 	tristate "NetWinder Button"
 	depends on ARCH_NETWINDER
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/char/Makefile linux-2.6.18.1/drivers/char/Makefile
--- linux-2.6.18.1.orig/drivers/char/Makefile	2006-10-30 14:10:44.000000000 -0500
+++ linux-2.6.18.1/drivers/char/Makefile	2006-10-30 14:15:25.000000000 -0500
@@ -95,6 +95,7 @@ obj-$(CONFIG_AGP)		+= agp/
 obj-$(CONFIG_DRM)		+= drm/
 obj-$(CONFIG_PCMCIA)		+= pcmcia/
 obj-$(CONFIG_IPMI_HANDLER)	+= ipmi/
+obj-$(CONFIG_IXP425_GPIO)	+= ixp425_gpio.o
 
 obj-$(CONFIG_HANGCHECK_TIMER)	+= hangcheck-timer.o
 obj-$(CONFIG_TCG_TPM)		+= tpm/
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/ide/arm/avila-ide.c linux-2.6.18.1/drivers/ide/arm/avila-ide.c
--- linux-2.6.18.1.orig/drivers/ide/arm/avila-ide.c	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.18.1/drivers/ide/arm/avila-ide.c	2006-10-30 14:12:54.000000000 -0500
@@ -0,0 +1,157 @@
+/* drivers/ide/arm/avila-ide.c
+ *
+ * IDE/CF driver for the Gateworks Avila platform
+ *
+ * Copyright (c) 2005 Gateworks Corporation
+ * Dave G <daveg at unixstudios.net>
+ *
+ * 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.
+ *
+*/
+
+
+#include <linux/module.h>
+#include <linux/config.h>
+#include <linux/slab.h>
+#include <linux/blkdev.h>
+#include <linux/errno.h>
+#include <linux/ide.h>
+#include <linux/init.h>
+#include <linux/interrupt.h>
+#include <asm/delay.h>
+
+
+#define AVILA_IDE_BASE IXP4XX_EXP_BUS_BASE(1)
+#define AVILA_IDE_IRQ IRQ_IXP4XX_GPIO12
+#define AVILA_IDE_CONTROL 0x1e
+#define AVILA_IDE_INT 12
+#define AVILA_IDE_CS1_BITS 0xbfff0043;
+
+static unsigned char _mode;
+
+static void avila_ide_enable_16(void)
+{
+	if ( _mode == 0 ) {
+		*IXP4XX_EXP_CS1 &= ~(0x00000001);
+		udelay(100);
+		_mode = 1;
+	}
+}
+
+static void avila_ide_disable_16(void)
+{
+	if ( _mode == 1 ) {
+		udelay(100);
+		*IXP4XX_EXP_CS1 |= (0x00000001);
+		_mode = 0;
+	}
+}
+
+static u8 avila_ide_inb(unsigned long addr)
+{
+
+	return readb(addr);
+
+}
+
+static u16 avila_ide_inw(unsigned long addr)
+{
+	u16 val;
+
+	avila_ide_enable_16();
+	val = readw(addr);
+	avila_ide_disable_16();
+	return val;
+
+}
+
+static void avila_ide_insw(unsigned long addr, void *buf, u32 len)
+{
+	u16 *buf16p;
+
+	avila_ide_enable_16();
+	for (buf16p = (u16 *) buf; (len > 0); len--)
+		*buf16p++ = readw(addr);
+	avila_ide_disable_16();
+
+}
+
+static void avila_ide_outb(u8 val, unsigned long addr)
+{
+
+	writeb(val, addr);
+
+}
+
+static void avila_ide_outbsync(ide_drive_t *drive, u8 val, unsigned long addr)
+{
+
+	writeb(val, addr);
+
+}
+
+static void avila_ide_outw(u16 val, unsigned long addr)
+{
+
+	avila_ide_enable_16();
+	writew(val, addr);
+	avila_ide_disable_16();
+
+}
+
+
+static void avila_ide_outsw(unsigned long addr, void *buf, u32 len)
+{
+	u16 *buf16p;
+
+	avila_ide_enable_16();
+	for (buf16p = (u16 *) buf; (len > 0); len--)
+		writew(*buf16p++, addr);
+	avila_ide_disable_16();
+
+}
+
+
+void __init avila_ide_init(void)
+{
+	hw_regs_t hw;
+	ide_hwif_t *hwif;
+	unsigned char *avila_ide_iobase;
+	int i;
+
+	gpio_line_config(AVILA_IDE_INT, IXP4XX_GPIO_IN | IXP4XX_GPIO_STYLE_ACTIVE_HIGH);
+
+	*IXP4XX_EXP_CS1 |= AVILA_IDE_CS1_BITS;
+	
+	avila_ide_iobase = ioremap(AVILA_IDE_BASE, 0x1000);
+
+	memset(&hw, 0, sizeof(hw));
+
+	hw.irq = AVILA_IDE_IRQ;
+	hw.dma = NO_DMA;
+	
+	for (i = 0; (i <= IDE_STATUS_OFFSET); i++)
+		hw.io_ports[i] = (unsigned long)(avila_ide_iobase + i);
+	
+	hw.io_ports[IDE_CONTROL_OFFSET] = (unsigned long)(avila_ide_iobase + AVILA_IDE_CONTROL);
+
+	printk("ide: Gateworks Avila IDE/CF driver v1.3b\n");
+
+	ide_register_hw(&hw, &hwif);
+
+	hwif->mmio = 2;
+	hwif->OUTB = avila_ide_outb;
+	hwif->OUTBSYNC = avila_ide_outbsync;
+	hwif->OUTW = avila_ide_outw;
+	hwif->OUTSW = avila_ide_outsw;
+	hwif->INB = avila_ide_inb;
+	hwif->INW = avila_ide_inw;
+	hwif->INSW = avila_ide_insw;
+
+}
+
+MODULE_LICENSE("GPL");
+MODULE_AUTHOR("Dave G <daveg at unixstudios.net>");
+MODULE_DESCRIPTION("Gateworks Avila CF/IDE Driver");
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/ide/arm/Makefile linux-2.6.18.1/drivers/ide/arm/Makefile
--- linux-2.6.18.1.orig/drivers/ide/arm/Makefile	2006-10-30 14:10:49.000000000 -0500
+++ linux-2.6.18.1/drivers/ide/arm/Makefile	2006-10-30 14:12:54.000000000 -0500
@@ -1,5 +1,6 @@
 
 obj-$(CONFIG_BLK_DEV_IDE_ICSIDE)	+= icside.o
+obj-$(CONFIG_BLK_DEV_IDE_AVILA)	+= avila-ide.o
 obj-$(CONFIG_BLK_DEV_IDE_RAPIDE)	+= rapide.o
 obj-$(CONFIG_BLK_DEV_IDE_BAST)		+= bast-ide.o
 
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/ide/ide.c linux-2.6.18.1/drivers/ide/ide.c
--- linux-2.6.18.1.orig/drivers/ide/ide.c	2006-10-30 14:10:48.000000000 -0500
+++ linux-2.6.18.1/drivers/ide/ide.c	2006-10-30 14:12:54.000000000 -0500
@@ -1818,6 +1818,12 @@ static void __init probe_for_hwifs (void
 		macide_init();
 	}
 #endif /* CONFIG_BLK_DEV_MAC_IDE */
+#ifdef CONFIG_BLK_DEV_IDE_AVILA
+  {
+    extern void avila_ide_init(void);
+    avila_ide_init();
+  }
+#endif /* CONFIG_BLK_DEV_IDE_AVILA */
 #ifdef CONFIG_BLK_DEV_Q40IDE
 	{
 		extern void q40ide_init(void);
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/drivers/ide/Kconfig linux-2.6.18.1/drivers/ide/Kconfig
--- linux-2.6.18.1.orig/drivers/ide/Kconfig	2006-10-30 14:10:48.000000000 -0500
+++ linux-2.6.18.1/drivers/ide/Kconfig	2006-10-30 14:12:54.000000000 -0500
@@ -844,6 +844,16 @@ config BLK_DEV_IDE_BAST
 	  Say Y here if you want to support the onboard IDE channels on the
 	  Simtec BAST or the Thorcom VR1000
 
+config BLK_DEV_IDE_AVILA
+	bool "Gateworks Avila IDE/CF Interface"
+	depends on (ARCH_IXDP425 || ARCH_AVILA) && BLK_DEV_IDEDISK && IDE_GENERIC
+	help
+		Say Y here if you want to build support for the Gateworks Avila
+		IDE/CF interface attached to the IXP4XX Expansion Bus. The IDE/CF
+		interface will allow Linux to see an inserted Compact Flash Card
+		as an ATA device which can be mounted and used as a normal hard
+		drive.
+
 config BLK_DEV_GAYLE
 	bool "Amiga Gayle IDE interface support"
 	depends on AMIGA
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/include/asm-arm/arch-ixp4xx/ixdp425.h linux-2.6.18.1/include/asm-arm/arch-ixp4xx/ixdp425.h
--- linux-2.6.18.1.orig/include/asm-arm/arch-ixp4xx/ixdp425.h	2006-10-30 14:10:52.000000000 -0500
+++ linux-2.6.18.1/include/asm-arm/arch-ixp4xx/ixdp425.h	2006-10-30 14:12:54.000000000 -0500
@@ -22,7 +22,7 @@
 /*
  * IXDP425 PCI IRQs
  */
-#define IXDP425_PCI_MAX_DEV	4
+#define IXDP425_PCI_MAX_DEV	6
 #define IXDP425_PCI_IRQ_LINES	4
 
 
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/include/asm-arm/arch-ixp4xx/ixp425-gpio.h.delete linux-2.6.18.1/include/asm-arm/arch-ixp4xx/ixp425-gpio.h.delete
--- linux-2.6.18.1.orig/include/asm-arm/arch-ixp4xx/ixp425-gpio.h.delete	1969-12-31 19:00:00.000000000 -0500
+++ linux-2.6.18.1/include/asm-arm/arch-ixp4xx/ixp425-gpio.h.delete	2006-10-30 14:12:54.000000000 -0500
@@ -0,0 +1,27 @@
+/*
+ * Generic GPIO interface
+ * This contains the part of the user interface to the gpio service.
+ */
+#ifndef _IXP425_GPIO_H_
+#define _IXP425_GPIO_H_
+
+/* defines a specific GPIO bit number and state */
+struct gpio_bit {
+	unsigned char bit;
+	unsigned char state;
+};
+
+#define GPIO_MAJOR    127
+
+/*
+ * ioctl calls that are permitted to the /dev/gpio interface
+ */
+#define GPIO_GET_BIT	0x0000001
+#define GPIO_SET_BIT	0x0000002
+#define GPIO_GET_CONFIG	0x0000003
+#define GPIO_SET_CONFIG 0x0000004
+
+//#define GPIO_CONFIG_OUT  1
+//#define GPIO_CONFIG_IN   2
+
+#endif // _IXP425_GPIO_H_
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h linux-2.6.18.1/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h
--- linux-2.6.18.1.orig/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h	2006-10-30 14:10:52.000000000 -0500
+++ linux-2.6.18.1/include/asm-arm/arch-ixp4xx/ixp4xx-regs.h	2006-10-30 14:12:54.000000000 -0500
@@ -125,19 +125,32 @@
 #define IXP4XX_NPEA_BASE_PHYS   	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x6000)
 #define IXP4XX_NPEB_BASE_PHYS   	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x7000)
 #define IXP4XX_NPEC_BASE_PHYS   	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x8000)
-#define IXP4XX_EthB_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
-#define IXP4XX_EthC_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
+
+
+
+
+
+#define IXP4XX_EthA_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0x9000)
+#define IXP4XX_EthB_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xA000)
 #define IXP4XX_USB_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xB000)
 /* ixp46X only */
-#define IXP4XX_EthA_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000)
+
+//#define IXP4XX_EthA_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xC000)
 #define IXP4XX_EthB1_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xD000)
 #define IXP4XX_EthB2_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xE000)
 #define IXP4XX_EthB3_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0xF000)
+
+
+
+
+
+
+
+
 #define IXP4XX_TIMESYNC_BASE_PHYS	(IXP4XX_PERIPHERAL_BASE_PHYS + 0x10000)
 #define IXP4XX_I2C_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0x11000)
 #define IXP4XX_SSP_BASE_PHYS		(IXP4XX_PERIPHERAL_BASE_PHYS + 0x12000)
 
-
 #define IXP4XX_UART1_BASE_VIRT		(IXP4XX_PERIPHERAL_BASE_VIRT + 0x0000)
 #define IXP4XX_UART2_BASE_VIRT		(IXP4XX_PERIPHERAL_BASE_VIRT + 0x1000)
 #define IXP4XX_PMU_BASE_VIRT		(IXP4XX_PERIPHERAL_BASE_VIRT + 0x2000)
@@ -242,6 +255,13 @@
 #define IXP4XX_GPIO_STYLE_FALLING_EDGE	0x3
 #define IXP4XX_GPIO_STYLE_TRANSITIONAL	0x4
 
+
+#define GPIO_GET_BIT  0x0000001
+#define GPIO_SET_BIT  0x0000002
+#define GPIO_GET_CONFIG 0x0000003
+#define GPIO_SET_CONFIG 0x0000004
+
+
 /* 
  * Mask used to clear interrupt styles 
  */
diff -uprN -X linux-2.6.18.1.orig/Documentation/dontdiff linux-2.6.18.1.orig/include/linux/i2c-id.h linux-2.6.18.1/include/linux/i2c-id.h
--- linux-2.6.18.1.orig/include/linux/i2c-id.h	2006-10-30 14:10:52.000000000 -0500
+++ linux-2.6.18.1/include/linux/i2c-id.h	2006-10-30 14:22:31.000000000 -0500
@@ -159,6 +159,7 @@
 #define I2C_DRIVERID_ASB100 1043
 #define I2C_DRIVERID_FSCHER 1046
 #define I2C_DRIVERID_W83L785TS 1047
+#define I2C_DRIVERID_AD7418 1052
 
 /*
  * ---- Adapter types ----------------------------------------------------

--------------050706080809070109080107--





More information about the Avila mailing list