summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOyvind Repvik <nail@nslu2-linux.org>2005-10-03 22:09:41 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2005-10-03 22:09:41 +0000
commit06c5c42e2da68e95c6cdf39606150865e36b1f71 (patch)
tree00dd72a25f7f589d9ff0aca0f9404c54dae71374
parent8fa2c7ab4cc24fa723885661fa5be14c48b363ea (diff)
parent6b5075fa761e23d7e4e6550dcbcf3eb5fafdf7d2 (diff)
merge of 2786b01c941e932325ebd3fc61a3a60664dc3b48
and 29da97548b6f79e801e68f41b3a37862a7577bfa
-rw-r--r--conf/machine/h2200.conf22
-rw-r--r--packages/avahi/avahi-0.5.1/.mtn2git_empty0
-rw-r--r--packages/avahi/avahi-0.5.1/alignment-fix.patch96
-rw-r--r--packages/avahi/avahi_0.5.1.bb53
-rw-r--r--packages/freeze/files/freeze2
-rw-r--r--packages/freeze/files/unfreeze2
-rw-r--r--packages/gomunicator/gomunicator_cvs.bb4
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.4/.mtn2git_empty0
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.4/2.6.13.patch39
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.4/2.6.14.patch24
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.4/ixp400-le-be.patch943
-rw-r--r--packages/ixp425-eth/ixp400-eth-1.4/makefile.patch33
-rw-r--r--packages/ixp425-eth/ixp400-eth_1.4.bb47
-rw-r--r--packages/ixp4xx/ixp-osal-2.0/.mtn2git_empty0
-rw-r--r--packages/ixp4xx/ixp-osal-2.0/2.6.patch363
-rw-r--r--packages/ixp4xx/ixp-osal-2.0/Makefile.patch27
-rw-r--r--packages/ixp4xx/ixp-osal_2.0.bb81
-rw-r--r--packages/ixp4xx/ixp4xx-csr-2.0/.mtn2git_empty0
-rw-r--r--packages/ixp4xx/ixp4xx-csr-2.0/2.6.14.patch20
-rw-r--r--packages/ixp4xx/ixp4xx-csr-2.0/2.6.patch148
-rw-r--r--packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch81
-rw-r--r--packages/ixp4xx/ixp4xx-csr_2.0.bb78
-rw-r--r--packages/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.bb2
-rw-r--r--packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb2
-rw-r--r--packages/monotone/files/txt2c-cross-post-0.22.patch11
-rw-r--r--packages/monotone/monotone-5_0.23.bb15
-rw-r--r--packages/tslib/tslib/simpad/tslib.sh14
-rw-r--r--packages/tslib/tslib/ts.conf-simpad (renamed from packages/tslib/tslib/simpad/ts.conf)0
-rw-r--r--packages/tslib/tslib/ts.conf-simpad-2.45
-rw-r--r--packages/tslib/tslib_cvs.bb8
30 files changed, 2108 insertions, 12 deletions
diff --git a/conf/machine/h2200.conf b/conf/machine/h2200.conf
index bb65f151a2..47e7bdbc28 100644
--- a/conf/machine/h2200.conf
+++ b/conf/machine/h2200.conf
@@ -9,7 +9,7 @@ IPKG_ARCHS = "all arm armv4 armv4t armv5e armv5te ipaqpxa h2200"
PREFERRED_PROVIDER_xserver = "xserver-kdrive"
PREFERRED_PROVIDER_virtual/kernel = "handhelds-pxa-2.6"
-EXTRA_IMAGECMD_h2200_jffs2 = "-e 0x40000 -p"
+EXTRA_IMAGECMD_h2200_jffs2 = "--pad --no-cleanmarkers --pagesize=512 --eraseblock=16384"
ROOT_FLASH_SIZE = "32"
@@ -18,8 +18,23 @@ BOOTSTRAP_EXTRA_DEPENDS_append = " handhelds-pxa-2.6 udev module-init-tools"
BOOTSTRAP_EXTRA_RDEPENDS = "kernel ipaq-boot-params ${@linux_module_packages('${H2200_MODULES}', d)}"
BOOTSTRAP_EXTRA_RDEPENDS_append = " udev module-init-tools"
-H2200_MODULES = "g_ether g_serial g_file_storage sa1100-rtc pm pcmcia-core snd-pxa-i2sound-h2200 pxa2xx_h2200 h2200_pm h2200_lcd h2200_kbd h2200_battery mq11xx_base mq1100fb samcop_adcts w1_ds2760 w1_samcop "
-# pxa2xx_udc is built in to the kernel
+#ship in rootfs:
+H2200_MODULES = "g_ether g_serial g_file_storage sa1100-rtc apm pcmcia-core snd-pxa-i2sound-h2200 pxa2xx_h2200 h2200_pm h2200_lcd h2200_kbd h2200_battery mq11xx_base mq1100fb samcop_adcts w1_ds2760 w1_samcop "
+
+#autoload on boot:
+module_autoload_h2200_pm = "h2200_pm"
+module_autoload_h2200_kbd = "h2200_kbd"
+module_autoload_h2200_lcd = "h2200_lcd"
+module_autoload_mq11xx_base = "mq11xx_base"
+module_autoload_mq1100fb = "mq1100fb"
+module_autoload_samcop_adcts = "samcop_adcts"
+module_autoload_samcop_sdi = "samcop_sdi"
+module_autoload_w1_ds2760 = "w1_ds2760"
+module_autoload_h2200_battery = "h2200_battery"
+module_autoload_hamcop_nand = "hamcop_nand"
+module_autoload_pxa2xx_h2200 = "pxa2xx_h2200"
+module_autoload_snd_pxa_i2sound_h2200 = "snd-pxa-i2sound-h2200"
+
SERIAL_CONSOLE = "115200 tts/0 vt100"
@@ -30,5 +45,4 @@ include conf/machine/handheld-common.conf
GUI_MACHINE_CLASS = "smallscreen"
-# not using tune-xscale so as to retain backwards compatibility
include conf/machine/tune-xscale.conf
diff --git a/packages/avahi/avahi-0.5.1/.mtn2git_empty b/packages/avahi/avahi-0.5.1/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/avahi/avahi-0.5.1/.mtn2git_empty
diff --git a/packages/avahi/avahi-0.5.1/alignment-fix.patch b/packages/avahi/avahi-0.5.1/alignment-fix.patch
new file mode 100644
index 0000000000..fc23f23756
--- /dev/null
+++ b/packages/avahi/avahi-0.5.1/alignment-fix.patch
@@ -0,0 +1,96 @@
+--- avahi-0.5/avahi-core/dns.c.orig 2005-09-23 16:35:02 +0200
++++ avahi-0.5/avahi-core/dns.c 2005-09-23 16:35:07 +0200
+@@ -177,11 +177,13 @@
+ assert(idx < p->size);
+
+ if (idx < 0x4000) {
+- uint16_t *t;
+- if (!(t = (uint16_t*) avahi_dns_packet_extend(p, sizeof(uint16_t))))
++ uint8_t *t;
++
++ if (!(t = (uint8_t*) avahi_dns_packet_extend(p, sizeof(uint16_t))))
+ return NULL;
+
+- *t = htons((0xC000 | idx));
++ t[0] = (uint8_t) ((0xC000 | idx) >> 8);
++ t[1] = (uint8_t) idx;
+ return saved_ptr;
+ }
+ }
+@@ -223,7 +225,8 @@
+ if (!(d = avahi_dns_packet_extend(p, sizeof(uint16_t))))
+ return NULL;
+
+- *((uint16_t*) d) = htons(v);
++ d[0] = (uint8_t) (v >> 8);
++ d[1] = (uint8_t) v;
+ return d;
+ }
+
+@@ -234,7 +237,10 @@
+ if (!(d = avahi_dns_packet_extend(p, sizeof(uint32_t))))
+ return NULL;
+
+- *((uint32_t*) d) = htonl(v);
++ d[0] = (uint8_t) (v >> 24);
++ d[1] = (uint8_t) (v >> 16);
++ d[2] = (uint8_t) (v >> 8);
++ d[3] = (uint8_t) v;
+
+ return d;
+ }
+@@ -385,26 +391,42 @@
+ }
+
+ int avahi_dns_packet_consume_uint16(AvahiDnsPacket *p, uint16_t *ret_v) {
++ uint8_t *d;
++ uint16_t tmp_v;
++
+ assert(p);
+ assert(ret_v);
+
+ if (p->rindex + sizeof(uint16_t) > p->size)
+ return -1;
+
+- *ret_v = ntohs(*((uint16_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex)));
++ d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex);
++ tmp_v = (d[0] << 8) | d[1];
++ d = (uint8_t*) ret_v;
++ d[0] = ((uint8_t*)(&tmp_v))[0];
++ d[1] = ((uint8_t*)(&tmp_v))[1];
+ p->rindex += sizeof(uint16_t);
+
+ return 0;
+ }
+
+ int avahi_dns_packet_consume_uint32(AvahiDnsPacket *p, uint32_t *ret_v) {
++ uint8_t* d;
++ uint32_t tmp_v;
++
+ assert(p);
+ assert(ret_v);
+
+ if (p->rindex + sizeof(uint32_t) > p->size)
+ return -1;
+
+- *ret_v = ntohl(*((uint32_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex)));
++ d = (uint8_t*) (AVAHI_DNS_PACKET_DATA(p) + p->rindex);
++ tmp_v = (d[0] << 24) | (d[1] << 16) | (d[2] << 8) | d[3];
++ d = (uint8_t*) ret_v;
++ d[0] = ((uint8_t*)(&tmp_v))[0];
++ d[1] = ((uint8_t*)(&tmp_v))[1];
++ d[2] = ((uint8_t*)(&tmp_v))[2];
++ d[3] = ((uint8_t*)(&tmp_v))[3];
+ p->rindex += sizeof(uint32_t);
+
+ return 0;
+@@ -733,7 +755,8 @@
+
+ /* avahi_log_debug("appended %u", size); */
+
+- * (uint16_t*) l = htons((uint16_t) size);
++ l[0] = (uint8_t) ((uint16_t) size >> 8);
++ l[1] = (uint8_t) ((uint16_t) size);
+
+ return t;
+
diff --git a/packages/avahi/avahi_0.5.1.bb b/packages/avahi/avahi_0.5.1.bb
new file mode 100644
index 0000000000..6a1a393e19
--- /dev/null
+++ b/packages/avahi/avahi_0.5.1.bb
@@ -0,0 +1,53 @@
+DESCRIPTION = "Avahi implements the DNS-SD over Multicast DNS"
+HOMEPAGE = "http://www.freedesktop.org/Software/Avahi"
+LICENCE= "GPL"
+DEPENDS = "expat libdaemon dbus-0.50"
+RRECOMMENDS = "libnss-mdns"
+SECTION = "net"
+PRIORITY = "optional"
+PR = "r0"
+
+SRC_URI = "http://www.freedesktop.org/~lennart/avahi-${PV}.tar.gz \
+ file://alignment-fix.patch;patch=1"
+
+PACKAGES = "avahi-daemon libavahi-common libavahi-core libavahi-client avahi-dnsconfd libavahi-glib avahi-dev avahi-doc"
+
+FILES_libavahi-common = "${libdir}/libavahi-common.so.*"
+FILES_libavahi-core= "${libdir}/libavahi-core.so.*"
+FILES_avahi-daemon = "${sbindir}/avahi-daemon \
+ ${sysconfdir}/avahi/avahi-daemon.conf \
+ ${sysconfdir}/avahi/services \
+ ${sysconfdir}/dbus-1 \
+ ${sysconfdir}/init.d/avahi-daemon \
+ ${datadir}/avahi/introspection/*.introspect \
+ ${datadir}/avahi/avahi-service.dtd \
+ ${datadir}/avahi/service-types"
+FILES_libavahi-client = "${libdir}/libavahi-client.so.*"
+FILES_avahi-dnsconfd = "${sbindir}/avahi-dnsconfd \
+ ${sysconfdir}/avahi/avahi-dnsconfd.action \
+ ${sysconfdir}/init.d/avahi-dnsconfd"
+FILES_libavahi-glib = "${libdir}/libavahi-glib.so.*"
+
+CONFFILES_avahi-daemon = "${sysconfdir}/avahi/avahi-daemon.conf"
+
+EXTRA_OECONF = "--with-distro=debian --disable-mono --disable-mono-docs --disable-gtk --disable-qt3 --disable-qt4 --disable-python"
+inherit autotools
+inherit update-rc.d
+
+INITSCRIPT_PACKAGES = "avahi-daemon avahi-dnsconfd"
+INITSCRIPT_NAME_avahi-daemon = "avahi-daemon"
+INITSCRIPT_PARAMS_avahi-daemon = "defaults 21 19"
+INITSCRIPT_NAME_avahi-dnsconfd = "avahi-dnsconfd"
+INITSCRIPT_PARAMS_avahi-dnsconfd = "defaults 22 19"
+
+pkg_postinst_avahi-daemon () {
+ grep avahi /etc/group || addgroup avahi
+ grep avahi /etc/passwd || adduser --disabled-password --system --home /var/run/avahi-daemon --no-create-home avahi --ingroup avahi -g Avahi
+ /etc/init.d/dbus-1 force-reload
+}
+
+pkg_postrm_avahi-daemon () {
+ deluser avahi || true
+ delgroup avahi || true
+}
+
diff --git a/packages/freeze/files/freeze b/packages/freeze/files/freeze
index 5305af7191..b92c66054e 100644
--- a/packages/freeze/files/freeze
+++ b/packages/freeze/files/freeze
@@ -41,7 +41,7 @@ else
FROZEN_DIR=""
for d in ${BBPATH//:/ }
do
- if test -r "$d/conf/local.conf"
+ if test -r "$d/conf/local.conf" -o -r "$d/conf/auto.conf"
then
FROZEN_DIR="$d/conf"
break
diff --git a/packages/freeze/files/unfreeze b/packages/freeze/files/unfreeze
index 2aaa2ac2fc..5be1459c3c 100644
--- a/packages/freeze/files/unfreeze
+++ b/packages/freeze/files/unfreeze
@@ -31,7 +31,7 @@ else
FROZEN_DIR=""
for d in ${BBPATH//:/ }
do
- if test -r "$d/conf/local.conf"
+ if test -r "$d/conf/local.conf" -o -r "$d/conf/auto.conf"
then
FROZEN_DIR="$d/conf"
break
diff --git a/packages/gomunicator/gomunicator_cvs.bb b/packages/gomunicator/gomunicator_cvs.bb
index 77a281f599..312b9fbd56 100644
--- a/packages/gomunicator/gomunicator_cvs.bb
+++ b/packages/gomunicator/gomunicator_cvs.bb
@@ -4,10 +4,10 @@ LICENSE = "GPLv2"
AUTHOR = "Robert Woerle"
MAINTAINER = "Koen Kooi <koen@handhelds.org>"
DEPENDS = "libgpewidget gtk+ glib-2.0"
-PV = "0.1.3+cvs${CVSDATE}"
+PV = "0.1.3+cvs-${CVSDATE}"
-inherit autotools
+inherit autotools pkgconfig
SRC_URI = "cvs://anonymous@cvs.sourceforge.net/cvsroot/xanadux;module=gomunicator"
S = "${WORKDIR}/${PN}"
diff --git a/packages/ixp425-eth/ixp400-eth-1.4/.mtn2git_empty b/packages/ixp425-eth/ixp400-eth-1.4/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.4/.mtn2git_empty
diff --git a/packages/ixp425-eth/ixp400-eth-1.4/2.6.13.patch b/packages/ixp425-eth/ixp400-eth-1.4/2.6.13.patch
new file mode 100644
index 0000000000..376bb3b03b
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.4/2.6.13.patch
@@ -0,0 +1,39 @@
+--- ./ixp400_eth.c.orig 2005-10-02 18:55:03.998477844 -0700
++++ ./ixp400_eth.c 2005-10-02 19:00:43.187821684 -0700
+@@ -848,7 +848,9 @@
+ skb->pkt_type = PACKET_HOST; /* Default type */
+ skb->ip_summed = 0;
+ skb->priority = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ skb->security = 0;
++#endif
+ #ifdef CONFIG_NET_SCHED
+ skb->tc_index = 0;
+ #endif
+@@ -2922,8 +2924,14 @@
+ }
+
+ /* set port MAC addr and update the dev struct if successfull */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ int dev_set_mac_address(struct net_device *dev, struct sockaddr *saddr)
+ {
++#else
++static int set_mac_address(struct net_device *dev, void *saddrIn)
++{
++ struct sockaddr *saddr = saddrIn;
++#endif
+ int res;
+ priv_data_t *priv = dev->priv;
+ IxEthAccMacAddr npeMacAddr;
+@@ -3073,7 +3081,11 @@
+ ndev->get_stats = dev_get_stats;
+ ndev->set_multicast_list = dev_set_multicast_list;
+ ndev->flags |= IFF_MULTICAST;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13)
+ ndev->set_mac_address = dev_set_mac_address;
++#else
++ ndev->set_mac_address = set_mac_address;
++#endif
+
+ TRACE;
+
diff --git a/packages/ixp425-eth/ixp400-eth-1.4/2.6.14.patch b/packages/ixp425-eth/ixp400-eth-1.4/2.6.14.patch
new file mode 100644
index 0000000000..c4c19db795
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.4/2.6.14.patch
@@ -0,0 +1,24 @@
+--- ./ixp400_eth.c 2005-10-01 00:50:45.179775259 -0700
++++ ./ixp400_eth.c 2005-10-01 00:54:10.976725245 -0700
+@@ -777,7 +777,9 @@
+ * before re-using it on the Rx-path
+ */
+ skb->nfmark = 0;
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+ skb->nfcache = 0;
++#endif
+ nf_conntrack_put(skb->nfct);
+ skb->nfct = NULL;
+ #ifdef CONFIG_NETFILTER_DEBUG
+@@ -1451,7 +1453,11 @@
+ skb->len -= header_len;
+
+ /* fill the pkt arrival time (set at the irq callback entry) */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+ skb->stamp = irq_stamp;
++#else
++ skb_set_timestamp(skb, &irq_stamp);
++#endif
+
+ /* fill the input device field */
+ skb->dev = dev;
diff --git a/packages/ixp425-eth/ixp400-eth-1.4/ixp400-le-be.patch b/packages/ixp425-eth/ixp400-eth-1.4/ixp400-le-be.patch
new file mode 100644
index 0000000000..a1909dfe82
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.4/ixp400-le-be.patch
@@ -0,0 +1,943 @@
+--- ./ixp400_eth.c.orig 2005-10-02 18:38:46.472966042 -0700
++++ ./ixp400_eth.c 2005-10-02 18:39:33.271910913 -0700
+@@ -57,6 +57,7 @@
+ #include <linux/mii.h>
+ #include <linux/socket.h>
+ #include <linux/cache.h>
++#include <linux/interrupt.h>
+ #include <asm/io.h>
+ #include <asm/errno.h>
+ #include <net/pkt_sched.h>
+@@ -94,8 +95,10 @@
+ MODULE_DESCRIPTION("IXP400 NPE Ethernet driver");
+ MODULE_LICENSE("GPL");
+ MODULE_AUTHOR("Intel Corporation");
+-#define MODULE_NAME "ixp400_eth"
+-#define MODULE_VERSION "1.4"
++#define MODULE_NAME "ixp400_eth"
++#define MODULE_VERSION_IXP400_ETH "1.4B"
++
++#define CONFIG_ARCH_IXDP425
+
+ /* Module parameters */
+ static int npe_learning = 1; /* default : NPE learning & filtering enable */
+@@ -358,8 +361,13 @@
+ /* Used to stop the kernel thread for link monitoring. */
+ volatile BOOL maintenanceCheckStopped;
+
++ struct work_struct mii_job;
++
++
+ /* used for tx timeout */
+- struct tq_struct tq_timeout;
++ struct work_struct tx_timeout_job;
++
++
+
+ /* used to control the message output */
+ UINT32 devFlags;
+@@ -557,6 +565,8 @@
+ #endif
+ };
+
++static struct workqueue_struct *npe_eth_workqueue;
++
+ /* Mutex lock used to coordinate access to IxEthAcc functions
+ * which manipulate the MII registers on the PHYs
+ */
+@@ -565,6 +575,11 @@
+ /* mutex locked when maintenance is being performed */
+ static struct semaphore *maintenance_mutex;
+
++/* Flags which is set when corresponding NPE is running,
++ * cleared when NPE is stopped
++ */
++static int npeRunning[IX_ETH_ACC_NUMBER_OF_PORTS];
++
+ /* Flags which is set when the corresponding IRQ is running,
+ */
+ static int irq_pmu_used = 0;
+@@ -1070,6 +1085,117 @@
+ return 0;
+ }
+
++/*
++ * WORKQUEUE JOBS
++ */
++
++/* This workqueue job will check the PHY for the link duplex and
++ * update the MAC accordingly. It also executes some buffer
++ * maintenance to release mbuf in excess or replenish after
++ * a severe starvation
++ *
++ * This function loops and wake up every 3 seconds.
++ */
++static void dev_media_check_work(void* arg)
++{
++ struct net_device *dev = (struct net_device *) arg;
++ priv_data_t *priv = dev->priv;
++
++ TRACE;
++
++ /*
++ * Determine the link status
++ */
++
++ if (default_phy_cfg[priv->port_id].linkMonitor)
++ {
++ int linkUp;
++ int speed100;
++ int fullDuplex = -1; /* unknown duplex mode */
++ int newDuplex;
++ int autonegotiate;
++ unsigned phyNum = phyAddresses[priv->port_id];
++ int res;
++
++ TRACE;
++
++ /* lock the MII register access mutex */
++ down(miiAccessMutex);
++
++ res = ixEthMiiLinkStatus(phyNum,
++ &linkUp,
++ &speed100,
++ &newDuplex,
++ &autonegotiate);
++ /* release the MII register access mutex */
++ up(miiAccessMutex);
++
++ if (res != IX_ETH_ACC_SUCCESS)
++ {
++ P_WARN("ixEthMiiLinkStatus failed on PHY%d.\n"
++ "\tCan't determine\nthe auto negotiated parameters. "
++ "Using default values.\n",
++ phyNum);
++
++ /* this shouldn't happen. exit the thread if it does */
++ goto out;
++ }
++
++ if (linkUp)
++ {
++ if (! netif_carrier_ok(dev))
++ {
++ /* inform the kernel of a change in link state */
++ netif_carrier_on(dev);
++ }
++
++ /*
++ * Update the MAC mode to match the PHY mode if
++ * there is a phy mode change.
++ */
++ if (newDuplex != fullDuplex)
++ {
++ fullDuplex = newDuplex;
++ if (fullDuplex)
++ {
++ ixEthAccPortDuplexModeSet(priv->port_id,
++ IX_ETH_ACC_FULL_DUPLEX);
++ }
++ else
++ {
++ ixEthAccPortDuplexModeSet(priv->port_id,
++ IX_ETH_ACC_HALF_DUPLEX);
++ }
++ }
++ }
++ else
++ {
++ fullDuplex = -1;
++ if (netif_carrier_ok(dev))
++ {
++ /* inform the kernel of a change in link state */
++ netif_carrier_off(dev);
++ }
++ }
++ }
++
++ TRACE;
++
++ /* this is to prevent the rx pool from emptying when
++ * there's not enough memory for a long time
++ * It prevents also from holding the memory for too
++ * long
++ */
++ dev_buff_maintenance(dev);
++
++ /* reschedule to run in 3 seconds */
++ queue_delayed_work(npe_eth_workqueue, &priv->mii_job, 3*HZ);
++ out:
++ return;
++}
++
++
++#define sigmask_lock sighand->siglock
+
+ /*
+ * KERNEL THREADS
+@@ -1122,11 +1248,11 @@
+ */
+ down (priv->maintenanceCheckThreadComplete);
+
+- daemonize();
+- reparent_to_init();
++ daemonize("dev_media");
++ // reparent_to_init();
+ spin_lock_irq(&current->sigmask_lock);
+ sigemptyset(&current->blocked);
+- recalc_sigpending(current);
++ recalc_sigpending();
+ spin_unlock_irq(&current->sigmask_lock);
+
+ snprintf(current->comm, sizeof(current->comm), "ixp400 %s", dev->name);
+@@ -1285,7 +1411,7 @@
+ static void dev_pmu_timer_restart(void)
+ {
+ unsigned long flags;
+- save_flags_cli(flags);
++ local_irq_save(flags);
+ __asm__(" mcr p14,0,%0,c1,c1,0\n" /* write current counter */
+ : : "r" (timer_countup_ticks));
+
+@@ -1294,13 +1420,13 @@
+ " mcr p14,0,r1,c5,c1,0; " /* clear overflow */
+ " mcr p14,0,r1,c4,c1,0\n" /* enable interrupts */
+ : : : "r1");
+- restore_flags(flags);
++ local_irq_restore(flags);
+ }
+
+ /* Internal ISR : run a few thousand times per second and calls
+ * the queue manager dispatcher entry point.
+ */
+-static void dev_qmgr_os_isr(int irg, void *dev_id, struct pt_regs *regs)
++static irqreturn_t dev_qmgr_os_isr(int irg, void *dev_id, struct pt_regs *regs)
+ {
+ /* get the time of this interrupt : all buffers received during this
+ * interrupt will be assigned the same time */
+@@ -1308,22 +1434,32 @@
+
+ /* call the queue manager entry point */
+ dispatcherFunc(IX_QMGR_QUELOW_GROUP);
++ return IRQ_HANDLED;
+ }
+
+ /* Internal ISR : run a few thousand times per second and calls
+ * the ethernet entry point.
+ */
+-static void dev_poll_os_isr(int irg, void *dev_id, struct pt_regs *regs)
++int icount = 2;
++static irqreturn_t dev_poll_os_isr(int irg, void *dev_id, struct pt_regs *regs)
+ {
+- dev_pmu_timer_restart(); /* set up the timer for the next interrupt */
++ if (icount > 0) {
++ icount--;
++ TRACE;
++ }
+
+ /* get the time of this interrupt : all buffers received during this
+ * interrupt will be assigned the same time */
+ do_gettimeofday(&irq_stamp);
+-
++ if (icount) TRACE;
+ ixEthRxFrameQMCallback(rx_queue_id,0);
++ if (icount) TRACE;
+ ixEthTxFrameDoneQMCallback(0,0);
+-
++ if (icount) TRACE;
++ /* here surely */
++ dev_pmu_timer_restart(); /* set up the timer for the next interrupt */
++ return IRQ_HANDLED;
++
+ }
+
+ /* initialize the PMU timer */
+@@ -1370,17 +1506,18 @@
+ static void dev_pmu_timer_disable(void)
+ {
+ unsigned long flags;
+- save_flags_cli(flags);
++ local_irq_save(flags);
+ __asm__(" mrc p14,0,r1,c4,c1,0; " /* get int enable register */
+ " and r1,r1,#0x1e; "
+ " mcr p14,0,r1,c4,c1,0\n" /* disable interrupts */
+ : : : "r1");
+- restore_flags(flags);
++ local_irq_restore(flags);
+ }
+
+ /* This timer will call ixEthDBDatabaseMaintenance every
+ * IX_ETH_DB_MAINTENANCE_TIME jiffies
+ */
++#if 0
+ static void maintenance_timer_cb(unsigned long data);
+
+ static struct timer_list maintenance_timer = {
+@@ -1418,6 +1555,34 @@
+
+ maintenance_timer_set();
+ }
++#endif
++static void db_maintenance_code(void *data);
++static DECLARE_WORK(db_maintenance_job, db_maintenance_code, NULL);
++
++static inline
++void schedule_db_maintenance(void)
++{
++ TRACE;
++ queue_delayed_work(npe_eth_workqueue, &db_maintenance_job,
++ DB_MAINTENANCE_TIME);
++}
++
++static inline
++void cancel_db_maintenance(void)
++{
++ TRACE;
++ cancel_delayed_work(&db_maintenance_job);
++}
++
++static void db_maintenance_code(void *data)
++{
++ TRACE;
++ down(maintenance_mutex);
++ ixEthDBDatabaseMaintenance();
++ up(maintenance_mutex);
++ schedule_db_maintenance();
++}
++
+
+ /*
+ * DATAPLANE
+@@ -1531,7 +1696,7 @@
+ * and its constants are taken from the eth_type_trans()
+ * function.
+ */
+- struct ethhdr *eth = skb->mac.ethernet;
++ struct ethhdr *eth = eth_hdr(skb);
+ unsigned short hproto = ntohs(eth->h_proto);
+
+ if (hproto >= 1536)
+@@ -1573,7 +1738,7 @@
+ * mode is set This costs
+ * a lookup inside the packet payload.
+ */
+- struct ethhdr *eth = skb->mac.ethernet;
++ struct ethhdr *eth = eth_hdr(skb);
+ unsigned char *hdest = eth->h_dest;
+
+ if (memcmp(hdest, dev->dev_addr, ETH_ALEN)!=0)
+@@ -1632,7 +1797,7 @@
+ dev = (struct net_device *)callbackTag;
+ priv = dev->priv;
+
+- qlevel = softnet_data[0].input_pkt_queue.qlen;
++ qlevel = __get_cpu_var(softnet_data).input_pkt_queue.qlen;
+ /* check if the system accepts more traffic and
+ * against chained mbufs
+ */
+@@ -1674,10 +1839,21 @@
+ /* set the length of the received skb from the mbuf length */
+ skb->tail = skb->data + len;
+ skb->len = len;
++
++ {
++ int l = (skb->len+3) >> 2;
++ unsigned *p = (unsigned*)((unsigned)skb->data & ~0x3);
++ int i;
++ for (i = 0; i < l; i++) {
++ *p = ntohl(*p);
++ p++;
++ }
++ }
+
+ #ifdef DEBUG_DUMP
+ skb_dump("rx", skb);
+ #endif
++
+ /* Set the skb protocol and set mcast/bcast flags */
+ dev_eth_type_trans(mcastFlags, skb, dev);
+
+@@ -1821,6 +1997,39 @@
+ spin_unlock_irq(&priv->lock);
+ }
+
++/* start the NPEs */
++static int npe_start(IxEthAccPortId port_id)
++{
++ int res;
++ UINT32 npeImageId;
++
++ switch (port_id)
++ {
++ case IX_ETH_PORT_1:
++ npeImageId = IX_ETH_NPE_B_IMAGE_ID;
++ break;
++ case IX_ETH_PORT_2:
++ npeImageId = IX_ETH_NPE_C_IMAGE_ID;
++ break;
++ default:
++ P_ERROR("Invalid port specified. IXP Ethernet NPE not started\n");
++ return -ENODEV;
++ }
++
++ /* Initialise and Start NPEs */
++ if ((res = ixNpeDlNpeInitAndStart(npeImageId)))
++ {
++ P_ERROR("Error starting NPE for Ethernet port %d!\n", port_id);
++ return -1;
++ }
++
++ /* set this flag to indicate that NPE is running */
++ npeRunning[port_id] = 1;
++
++ return 0;
++}
++
++
+ /* The QMgr dispatch entry point can be called from the
+ * IX_OSAL_IXP400_QM1_IRQ_LVL irq (which will trigger
+ * an interrupt for every packet) or a timer (which will
+@@ -1906,7 +2115,16 @@
+ IxEthAccMacAddr npeMacAddr;
+ priv_data_t *priv = dev->priv;
+
+- P_DEBUG("port_enable(%s)\n", dev->name);
++ P_DEBUG("port_enable(%s) %d\n", dev->name, priv->port_id);
++
++ if (!npeRunning[priv->port_id])
++ {
++ if ((res = npe_start(priv->port_id)))
++ {
++ TRACE;
++ return res;
++ }
++ }
+
+ /* Set MAC addr in h/w (ethAcc checks for MAC address to be valid) */
+ memcpy(&npeMacAddr.macAddress,
+@@ -2084,6 +2302,15 @@
+ }
+ return 0;
+ }
++ {
++ int l = (skb->len+3) >> 2;
++ unsigned *p = (unsigned*)((unsigned)skb->data & ~0x3);
++ int i;
++ for (i = 0; i < l; i++) {
++ *p = ntohl(*p);
++ p++;
++ }
++ }
+
+ #ifdef DEBUG_DUMP
+ skb_dump("tx", skb);
+@@ -2120,6 +2347,7 @@
+ static int do_dev_open(struct net_device *dev)
+ {
+ int res;
++ TRACE;
+
+ /* prevent the maintenance task from running while bringing up port */
+ down(maintenance_mutex);
+@@ -2151,6 +2379,27 @@
+ }
+
+ static void
++dev_tx_timeout_work(void* arg)
++{
++ struct net_device *dev = (struct net_device *)arg;
++ priv_data_t *priv = dev->priv;
++
++ P_ERROR("%s: Tx Timeout for port %d\n", dev->name, priv->port_id);
++
++ down(maintenance_mutex);
++ port_disable(dev);
++
++ /* Note to user: Consider performing other reset operations here (such as
++ * PHY reset), if it is known to help the Tx Flow to become "unstuck"
++ */
++
++ port_enable(dev);
++ up(maintenance_mutex);
++}
++
++
++
++static void
+ dev_tx_timeout_task(void *dev_id)
+ {
+ struct net_device *dev = (struct net_device *)dev_id;
+@@ -2191,7 +2440,7 @@
+ priv_data_t *priv = dev->priv;
+
+ TRACE;
+- schedule_task(&priv->tq_timeout);
++ queue_work(npe_eth_workqueue, &priv->tx_timeout_job);
+
+ }
+
+@@ -2352,7 +2601,8 @@
+
+ TRACE;
+
+- invalidate_dcache_range((unsigned int)&ethStats, sizeof(ethStats));
++ // invalidate_dcache_range((unsigned int)&ethStats, sizeof(ethStats));
++ IX_ACC_DATA_CACHE_INVALIDATE((unsigned int)&ethStats, sizeof(ethStats));
+ if ((res = ixEthAccMibIIStatsGetClear(priv->port_id, &ethStats)))
+ {
+ P_ERROR("%s: ixEthAccMibIIStatsGet failed for port %d, res = %d\n",
+@@ -2565,7 +2815,6 @@
+ miiAccessMutex = (struct semaphore *) kmalloc(sizeof(struct semaphore), GFP_KERNEL);
+ if (!miiAccessMutex)
+ return -ENOMEM;
+-
+ init_MUTEX(miiAccessMutex);
+
+ TRACE;
+@@ -2673,12 +2922,12 @@
+ }
+
+ /* set port MAC addr and update the dev struct if successfull */
+-int dev_set_mac_address(struct net_device *dev, void *addr)
++int dev_set_mac_address(struct net_device *dev, struct sockaddr *saddr)
+ {
+ int res;
+ priv_data_t *priv = dev->priv;
+ IxEthAccMacAddr npeMacAddr;
+- struct sockaddr *saddr = (struct sockaddr *)addr;
++ // struct sockaddr *saddr = (struct sockaddr *)addr;
+
+ /* Get MAC addr from parameter */
+ memcpy(&npeMacAddr.macAddress,
+@@ -2751,35 +3000,16 @@
+ /* Initialize device structs.
+ * Resource allocation is deffered until do_dev_open
+ */
+-static int __devinit dev_eth_probe(struct net_device *dev)
++static int __devinit dev_eth_probe(struct device *_dev)
+ {
+- static int found_devices = 0;
+- priv_data_t *priv;
++ int res = -ENOMEM;
++ struct platform_device *pdev = to_platform_device(_dev);
++ struct net_device *ndev = dev_get_drvdata(_dev);
++ priv_data_t *priv = (priv_data_t*)ndev->priv;
+
+ TRACE;
+
+- /* there is a limited number of devices */
+- if (found_devices >= dev_max_count) /* module parameter */
+- return -ENODEV;
+-
+- SET_MODULE_OWNER(dev);
+-
+- /* set device name */
+- sprintf(dev->name, DEVICE_NAME "%d", found_devices);
+-
+- /* allocate and initialize priv struct */
+- priv = dev->priv = kmalloc(sizeof(priv_data_t), GFP_KERNEL);
+- if (dev->priv == NULL)
+- return -ENOMEM;
+-
+- memset(dev->priv, 0, sizeof(priv_data_t));
+-
+- TRACE;
+-
+- /* set the mapping between port ID and devices
+- *
+- */
+- priv->port_id = default_portId[found_devices];
++ priv->port_id = pdev->id;
+
+ TRACE;
+
+@@ -2789,9 +3019,8 @@
+ if(priv->rx_pool == NULL)
+ {
+ P_ERROR("%s: Buffer RX Pool init failed on port %d\n",
+- dev->name, priv->port_id);
+- kfree(dev->priv);
+- return -ENOMEM;
++ ndev->name, priv->port_id);
++ goto out;
+ }
+
+ TRACE;
+@@ -2802,13 +3031,14 @@
+ if(priv->tx_pool == NULL)
+ {
+ P_ERROR("%s: Buffer TX Pool init failed on port %d\n",
+- dev->name, priv->port_id);
++ ndev->name, priv->port_id);
++ goto out;
++ }
++#if 0
+ kfree(dev->priv);
+ return -ENOMEM;
+ }
+
+- TRACE;
+-
+ /* initialise the MII register access mutex */
+ priv->maintenanceCheckThreadComplete = (struct semaphore *)
+ kmalloc(sizeof(struct semaphore), GFP_KERNEL);
+@@ -2823,24 +3053,27 @@
+
+ /* initialize ethernet device (default handlers) */
+ ether_setup(dev);
++#endif
+
+ TRACE;
+
+- /* fill in dev struct callbacks with customized handlers */
+- dev->open = do_dev_open;
+- dev->stop = do_dev_stop;
++ INIT_WORK(&priv->mii_job, dev_media_check_work, ndev);
++ INIT_WORK(&priv->tx_timeout_job, dev_tx_timeout_work, ndev);
+
+- dev->hard_start_xmit = dev_hard_start_xmit;
+-
+- dev->watchdog_timeo = DEV_WATCHDOG_TIMEO;
+- dev->tx_timeout = dev_tx_timeout;
+- dev->change_mtu = dev_change_mtu;
+- dev->do_ioctl = do_dev_ioctl;
+- dev->get_stats = dev_get_stats;
+- dev->set_multicast_list = dev_set_multicast_list;
+- dev->flags |= IFF_MULTICAST;
++ TRACE;
+
+- dev->set_mac_address = dev_set_mac_address;
++ /* fill in dev struct callbacks with customized handlers */
++ ndev->open = do_dev_open;
++ ndev->stop = do_dev_stop;
++ ndev->hard_start_xmit = dev_hard_start_xmit;
++ ndev->watchdog_timeo = DEV_WATCHDOG_TIMEO;
++ ndev->tx_timeout = dev_tx_timeout;
++ ndev->change_mtu = dev_change_mtu;
++ ndev->do_ioctl = do_dev_ioctl;
++ ndev->get_stats = dev_get_stats;
++ ndev->set_multicast_list = dev_set_multicast_list;
++ ndev->flags |= IFF_MULTICAST;
++ ndev->set_mac_address = dev_set_mac_address;
+
+ TRACE;
+
+@@ -2858,22 +3091,22 @@
+ *
+ */
+
+- memcpy(dev->dev_addr,
++ memcpy(ndev->dev_addr,
+ &default_mac_addr[priv->port_id].macAddress,
+ IX_IEEE803_MAC_ADDRESS_SIZE);
+
+ /* possibly remove this test and the message when a valid MAC address
+ * is not hardcoded in the driver source code.
+ */
+- if (is_valid_ether_addr(dev->dev_addr))
++ if (is_valid_ether_addr(ndev->dev_addr))
+ {
+ P_WARN("Use default MAC address %2.2x:%2.2x:%2.2x:%2.2x:%2.2x:%2.2x for port %d\n",
+- (unsigned)dev->dev_addr[0],
+- (unsigned)dev->dev_addr[1],
+- (unsigned)dev->dev_addr[2],
+- (unsigned)dev->dev_addr[3],
+- (unsigned)dev->dev_addr[4],
+- (unsigned)dev->dev_addr[5],
++ (unsigned)ndev->dev_addr[0],
++ (unsigned)ndev->dev_addr[1],
++ (unsigned)ndev->dev_addr[2],
++ (unsigned)ndev->dev_addr[3],
++ (unsigned)ndev->dev_addr[4],
++ (unsigned)ndev->dev_addr[5],
+ priv->port_id);
+ }
+
+@@ -2883,31 +3116,30 @@
+ */
+ TRACE;
+
+- dev_change_msdu(dev, dev->mtu + dev->hard_header_len + VLAN_HDR);
+-
++ dev_change_msdu(ndev, ndev->mtu + ndev->hard_header_len + VLAN_HDR);
++#if 0
+ priv->tq_timeout.routine = dev_tx_timeout_task;
+ priv->tq_timeout.data = (void *)dev;
+-
++#endif
+ #ifdef CONFIG_IXP400_ETH_QDISC_ENABLED
+ /* configure and enable a fast TX queuing discipline */
+ TRACE;
+
+- priv->qdisc = qdisc_create_dflt(dev, &dev_qdisc_ops);
+- dev->qdisc_sleeping = priv->qdisc;
+- dev->qdisc = priv->qdisc;
++ priv->qdisc = qdisc_create_dflt(ndev, &dev_qdisc_ops);
++ ndev->qdisc_sleeping = priv->qdisc;
++ ndev->qdisc = priv->qdisc;
+
+- if (!dev->qdisc_sleeping)
++ if (!ndev->qdisc_sleeping)
+ {
+ P_ERROR("%s: qdisc_create_dflt failed on port %d\n",
+- dev->name, priv->port_id);
+- kfree(dev->priv);
+- return -ENOMEM;
++ ndev->name, priv->port_id);
++ goto out;
+ }
+ #endif
+
+ /* set the internal maximum queueing capabilities */
+- dev->tx_queue_len = TX_MBUF_POOL_SIZE;
+-
++ ndev->tx_queue_len = TX_MBUF_POOL_SIZE;
++#if 0
+ if (!netif_queue_stopped(dev))
+ {
+ TRACE;
+@@ -2917,9 +3149,63 @@
+ }
+
+ found_devices++;
++#endif
++ if ((res = register_netdev(ndev)))
++ P_ERROR("Failed to register netdev. res = %d\n", res);
+
+ TRACE;
+
++ out:
++ return res;
++}
++
++
++static int __devinit npe_eth_init_device(struct device *dev)
++{
++ int res = -ENOMEM;
++ struct platform_device *pdev = to_platform_device(dev);
++ struct net_device *ndev = alloc_etherdev(sizeof(priv_data_t));
++ TRACE;
++ if (ndev == NULL) {
++ P_ERROR("could not allocate device.\n");
++ goto out;
++ }
++ SET_MODULE_OWNER(ndev);
++ SET_NETDEV_DEV(ndev, dev);
++ ixEthAccTxSchedulingDisciplineSet(pdev->id, FIFO_NO_PRIORITY);
++ dev_set_drvdata(dev, ndev);
++ res = dev_eth_probe(dev);
++ if (res == 0) {
++ /* This was added in v0.1.8 of the driver. It seems that we need to
++ * enable the port before the user can set a mac address for the port
++ * using 'ifconfig hw ether ...'. To enable the port we must first
++ * register Q callbacks, so we register the portDisable callbacks to
++ * ensure that no buffers are passed up to the kernel until the port is
++ * brought up properly (ifconfig up)
++ */
++ ixEthAccPortTxDoneCallbackRegister(pdev->id,
++ tx_done_disable_cb,
++ (UINT32)ndev);
++ ixEthAccPortRxCallbackRegister(pdev->id,
++ rx_disable_cb,
++ (UINT32)ndev);
++ port_enable(ndev);
++ } else {
++ dev_set_drvdata(dev, NULL);
++ kfree(ndev);
++ }
++out:
++ TRACE;
++ return res;
++}
++
++static int __devexit npe_eth_fini_device(struct device *dev)
++{
++ struct net_device *ndev = dev_get_drvdata(dev);
++ TRACE;
++ dev_set_drvdata(dev, NULL);
++ unregister_netdev(ndev);
++ kfree(ndev);
+ return 0;
+ }
+
+@@ -2928,6 +3214,28 @@
+
+ #ifdef MODULE
+
++#define MODULE_NAME "ixp400_eth"
++
++static struct device_driver npe_eth_driver = {
++ .name = MODULE_NAME,
++ .bus = &platform_bus_type,
++ .probe = npe_eth_init_device,
++ .remove = npe_eth_fini_device,
++};
++
++static struct platform_device npe_eth_devs[] = {
++ {
++ .name = MODULE_NAME,
++ .id = IX_ETH_PORT_1,
++ },
++ {
++ .name = MODULE_NAME,
++ .id = IX_ETH_PORT_2,
++ }
++};
++
++
++
+ static struct net_device ixp400_devices[IX_ETH_ACC_NUMBER_OF_PORTS];
+
+ int init_module(void)
+@@ -2935,11 +3243,11 @@
+ int res, dev_count;
+ IxEthAccPortId portId;
+ struct net_device *dev;
+-
++ int i;
+ TRACE;
+
+- P_INFO("Initializing IXP400 NPE Ethernet driver software v. " MODULE_VERSION " \n");
+-
++ P_INFO("Initializing IXP400 NPE Ethernet driver software v. LE \n");
++ ixOsalLogLevelSet(IX_OSAL_LOG_LVL_ALL);
+ TRACE;
+
+ /* check module parameter range */
+@@ -2951,6 +3259,16 @@
+
+ TRACE;
+
++ /* XXX do this very early */
++ /* initialise the DB Maintenance task mutex */
++ maintenance_mutex = (struct semaphore *) kmalloc(sizeof(struct semaphore), GFP_KERNEL);
++ if (!maintenance_mutex)
++ return -ENOMEM;
++
++ init_MUTEX(maintenance_mutex);
++
++ TRACE;
++
+ #ifndef DEBUG
+ /* check module parameter range */
+ if (log_level >= 2) /* module parameter */
+@@ -3015,6 +3333,13 @@
+ /* Initialise the NPEs and access layer */
+ TRACE;
+
++ for (i = 0; i < IX_ETH_ACC_NUMBER_OF_PORTS; i++)
++ {
++ if ((res = npe_start(i)))
++ return res;
++ TRACE;
++ }
++
+ if ((res = ethacc_init()))
+ return res;
+
+@@ -3026,6 +3351,13 @@
+
+ TRACE;
+
++ npe_eth_workqueue = create_workqueue(MODULE_NAME);
++ if (npe_eth_workqueue == NULL)
++ return -ENOMEM;
++
++ TRACE;
++
++#if 0
+ /* Initialise the driver structure */
+ for (dev_count = 0;
+ dev_count < dev_max_count; /* module parameter */
+@@ -3038,7 +3370,7 @@
+ dev->init = dev_eth_probe;
+
+ TRACE;
+-
++ }
+ if ((res = register_netdev(dev)))
+ {
+ TRACE;
+@@ -3068,6 +3400,35 @@
+ return convert_error_ethAcc(res);
+ }
+ }
++#endif
++ /* set the softirq rx queue thresholds
++ * (These numbers are based on tuning experiments)
++ * maxbacklog = (netdev_max_backlog * 10) / 63;
++ */
++ if (netdev_max_backlog == 0)
++ {
++ netdev_max_backlog = 290; /* system default */
++ }
++ netdev_max_backlog /= BACKLOG_TUNE;
++
++ TRACE;
++
++ res = driver_register(&npe_eth_driver);
++ if (res != 0) {
++ P_ERROR("Failed to register NPE EThernet driver (res = %d)\n", res);
++ return res;
++ }
++
++ res = platform_device_register(&npe_eth_devs[0]);
++ if (res != 0) {
++ P_ERROR("Failed to register NPE platform device 0 (res = %d)\n", res);
++ return res;
++ }
++ res = platform_device_register(&npe_eth_devs[1]);
++ if (res != 0) {
++ P_ERROR("Failed to register NPE platform device 1 (res = %d)\n", res);
++ return res;
++ }
+
+ TRACE;
+
+@@ -3104,33 +3465,13 @@
+ }
+
+ TRACE;
+-
+- /* initialise the DB Maintenance task mutex */
+- maintenance_mutex = (struct semaphore *) kmalloc(sizeof(struct semaphore), GFP_KERNEL);
+- if (!maintenance_mutex)
+- return -ENOMEM;
+-
+- init_MUTEX(maintenance_mutex);
+-
+- TRACE;
+-
++TRACE;
+ /* Do not start the EthDB maintenance thread if learning & filtering feature is disabled */
+ if (npe_learning) /* module parameter */
+ {
+- maintenance_timer_set();
+- }
+-
+- TRACE;
+-
+- /* set the softirq rx queue thresholds
+- * (These numbers are based on tuning experiments)
+- * maxbacklog = (netdev_max_backlog * 10) / 63;
+- */
+- if (netdev_max_backlog == 0)
+- {
+- netdev_max_backlog = 290; /* system default */
++ schedule_db_maintenance();
++ // maintenance_timer_set();
+ }
+- netdev_max_backlog /= BACKLOG_TUNE;
+
+ TRACE;
+
+@@ -3175,7 +3516,8 @@
+ TRACE;
+
+ /* stop the maintenance timer */
+- maintenance_timer_clear();
++ // maintenance_timer_clear();
++ cancel_db_maintenance();
+
+ TRACE;
+
diff --git a/packages/ixp425-eth/ixp400-eth-1.4/makefile.patch b/packages/ixp425-eth/ixp400-eth-1.4/makefile.patch
new file mode 100644
index 0000000000..350485c1aa
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth-1.4/makefile.patch
@@ -0,0 +1,33 @@
+--- /dev/null 2005-09-06 00:17:15.000000000 -0700
++++ ./Makefile 2005-10-02 22:15:19.974595551 -0700
+@@ -0,0 +1,30 @@
++obj-m := ixp400_eth.o
++
++CFLAGS_ixp400_eth.o = -DWall \
++ -I$(IXP4XX_CSR_DIR) \
++ -I$(OSAL_DIR)/ \
++ -I$(OSAL_DIR)/os/linux/include/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/ioMem/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/core/ \
++ -I$(OSAL_DIR)/os/linux/include/modules/bufferMgt/ \
++ -I$(OSAL_DIR)/os/linux/include/core/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ \
++ -I$(OSAL_DIR)/os/linux/include/core/ \
++ -I$(OSAL_DIR)/include/ \
++ -I$(OSAL_DIR)/include/modules/ \
++ -I$(OSAL_DIR)/include/modules/bufferMgt/ \
++ -I$(OSAL_DIR)/include/modules/ioMem/ \
++ -I$(OSAL_DIR)/include/modules/core/ \
++ -I$(OSAL_DIR)/include/platforms/ \
++ -I$(OSAL_DIR)/include/platforms/ixp400/ \
++ -I$(OSAL_DIR)/include/platforms/ixp400/xp425/ \
++ -I$(OSAL_DIR)/os/linux/include/platforms/ixp400/ixp425/ \
++ $(IX_CFLAGS)
++
++default:
++ $(MAKE) ARCH=arm CROSS_COMPILE=$(LINUX_CROSS_COMPILE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) modules
++
++clean:
++ rm -f ixp400_eth.ko
diff --git a/packages/ixp425-eth/ixp400-eth_1.4.bb b/packages/ixp425-eth/ixp400-eth_1.4.bb
new file mode 100644
index 0000000000..18251b2ddf
--- /dev/null
+++ b/packages/ixp425-eth/ixp400-eth_1.4.bb
@@ -0,0 +1,47 @@
+# This is the Intel GPL IXP4XX ethernet driver (Linux) plus patches
+# to make it work on 2.6 kernels.
+#
+DEPENDS = "ixp4xx-csr"
+LICENSE = "GPL"
+MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
+SRC_URI = "ftp://aiedownload.intel.com/df-support/8500/eng/GPL_ixp400LinuxEthernetDriverPatch-1_4.zip"
+SRC_URI += "file://ixp400-le-be.patch;patch=1"
+SRC_URI += "file://makefile.patch;patch=1"
+SRC_URI += "file://2.6.13.patch;patch=1"
+SRC_URI += "file://2.6.14.patch;patch=1"
+PR = "r0"
+
+S = "${WORKDIR}"
+
+COMPATIBLE_HOST = "^armeb-linux.*"
+
+inherit module
+
+# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
+# required. Notice that this has to be done for each separately built
+# module as well!
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
+
+# This is a somewhat arbitrary choice:
+OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
+
+EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
+ 'LD=${KERNEL_LD}' \
+ 'PWD=${S}' \
+ 'IXP4XX_CSR_DIR=${STAGING_INCDIR}/linux/ixp4xx-csr' \
+ 'OSAL_DIR=${OSAL_DIR}' \
+ 'IX_CFLAGS=-DIX_UTOPIAMODE=0 -DIX_MPHYSINGLEPORT=1' \
+ 'LINUX_SRC=${STAGING_KERNEL_DIR}' \
+ 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \
+ "
+
+do_compile () {
+ unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
+ oe_runmake
+}
+
+do_install () {
+ install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net
+ install -m 0644 ixp400_eth.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/kernel/drivers/net/
+}
diff --git a/packages/ixp4xx/ixp-osal-2.0/.mtn2git_empty b/packages/ixp4xx/ixp-osal-2.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ixp4xx/ixp-osal-2.0/.mtn2git_empty
diff --git a/packages/ixp4xx/ixp-osal-2.0/2.6.patch b/packages/ixp4xx/ixp-osal-2.0/2.6.patch
new file mode 100644
index 0000000000..8dc31d48df
--- /dev/null
+++ b/packages/ixp4xx/ixp-osal-2.0/2.6.patch
@@ -0,0 +1,363 @@
+diff -Naur ixp_osal.orig/include/linux-2.6.h ixp_osal/include/linux-2.6.h
+--- ixp_osal.orig/include/linux-2.6.h 1970-01-01 01:00:00.000000000 +0100
++++ ixp_osal/include/linux-2.6.h 2005-08-26 15:20:23.000000000 +0200
+@@ -0,0 +1,52 @@
++/* */
++
++#include "asm/page.h"
++
++#if !defined (IXP425_TIMER_BASE_PHYS)
++# define IXP425_TIMER_BASE_PHYS IXP4XX_TIMER_BASE_PHYS
++#endif
++#if !defined (IRQ_IXP425_XSCALE_PMU)
++# define IRQ_IXP425_XSCALE_PMU IRQ_IXP4XX_XSCALE_PMU
++#endif
++#if !defined (IXP425_QMGR_BASE_PHYS)
++# define IXP425_QMGR_BASE_PHYS IXP4XX_QMGR_BASE_PHYS
++#endif
++#if !defined (IXP425_PERIPHERAL_BASE_PHYS)
++# define IXP425_PERIPHERAL_BASE_PHYS IXP4XX_PERIPHERAL_BASE_PHYS
++#endif
++#if !defined (IXP425_PERIPHERAL_BASE_VIRT)
++# define IXP425_PERIPHERAL_BASE_VIRT IXP4XX_PERIPHERAL_BASE_VIRT
++#endif
++#if !defined (IXP425_EXP_CFG_BASE_PHYS)
++# define IXP425_EXP_CFG_BASE_PHYS IXP4XX_EXP_CFG_BASE_PHYS
++#endif
++#if !defined (IXP425_EXP_CFG_BASE_VIRT)
++# define IXP425_EXP_CFG_BASE_VIRT IXP4XX_EXP_CFG_BASE_VIRT
++#endif
++#if !defined (IXP425_PCI_CFG_BASE_PHYS)
++# define IXP425_PCI_CFG_BASE_PHYS IXP4XX_PCI_CFG_BASE_PHYS
++#endif
++#if !defined (IXP425_PCI_CFG_BASE_VIRT)
++# define IXP425_PCI_CFG_BASE_VIRT IXP4XX_PCI_CFG_BASE_VIRT
++#endif
++#if !defined (IXP425_EXP_BUS_BASE2_PHYS)
++# define IXP425_EXP_BUS_BASE2_PHYS IXP4XX_EXP_BUS_CS2_BASE_PHYS
++#endif
++#if !defined (IXP425_EthA_BASE_PHYS)
++# define IXP425_EthA_BASE_PHYS IXP4XX_EthA_BASE_PHYS
++#endif
++#if !defined (IXP425_EthB_BASE_PHYS)
++# define IXP425_EthB_BASE_PHYS IXP4XX_EthB_BASE_PHYS
++#endif
++#if !defined (IXP425_ICMR)
++# define IXP425_ICMR IXP4XX_ICMR
++#endif
++#if !defined (IXP425_USB_BASE_PHYS)
++# define IXP425_USB_BASE_PHYS IXP4XX_USB_BASE_PHYS
++#endif
++#if !defined (IXP425_INTC_BASE_PHYS)
++# define IXP425_INTC_BASE_PHYS IXP4XX_INTC_BASE_PHYS
++#endif
++#if !defined (IRQ_IXP425_USB)
++# define IRQ_IXP425_USB IRQ_IXP4XX_USB
++#endif
+diff -Naur ixp_osal.orig/os/linux/include/core/IxOsalOs.h ixp_osal/os/linux/include/core/IxOsalOs.h
+--- ixp_osal.orig/os/linux/include/core/IxOsalOs.h 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/include/core/IxOsalOs.h 2005-08-26 01:56:22.000000000 +0200
+@@ -56,6 +56,7 @@
+ #include <linux/cache.h>
+ #include <linux/mm.h>
+ #include <linux/config.h>
++#include <linux/version.h>
+ #include <asm/pgalloc.h>
+
+ /**
+@@ -66,9 +67,23 @@
+
+ #define IX_OSAL_OS_MMU_PHYS_TO_VIRT(addr) ((addr) ? phys_to_virt((unsigned int)(addr)) : 0)
+
+-#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size ))
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++/*
++ * 2.6 kernels do not export the required cache functions.
++ */
++extern void ixOsalCacheInvalidateRange(unsigned long start, unsigned long size);
++extern void ixOsalCacheFlushRange(unsigned long start, unsigned long size);
++
++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) \
++ixOsalCacheInvalidateRange((unsigned long)addr, (unsigned long)addr + size)
++#define IX_OSAL_OS_CACHE_FLUSH(addr, size) \
++ixOsalCacheFlushRange((unsigned long)addr, (unsigned long)addr + size )
+
++#else
++
++#define IX_OSAL_OS_CACHE_INVALIDATE(addr, size) ( invalidate_dcache_range((__u32)addr, (__u32)addr + size ))
+ #define IX_OSAL_OS_CACHE_FLUSH(addr, size) ( clean_dcache_range((__u32)addr, (__u32)addr + size ))
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+
+ #define printf printk /* For backword compatibility, needs to move to better location */
+
+diff -Naur ixp_osal.orig/os/linux/src/core/IxOsalOsCacheMMU.c ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c
+--- ixp_osal.orig/os/linux/src/core/IxOsalOsCacheMMU.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/core/IxOsalOsCacheMMU.c 2005-08-26 01:56:22.000000000 +0200
+@@ -210,3 +210,59 @@
+ free_pages ((unsigned int) memptr, order);
+ }
+ }
++
++
++/*
++ * 2.6 kernels do not export the required cache functions.
++ */
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++
++#define _IX_STR(x) #x
++#define IX_STR(x) _IX_STR(x)
++#define IX_CLM IX_STR(IX_OSAL_CACHE_LINE_SIZE-1)
++
++/*
++ * reimplementation of kernel's invalidate_dcache_range()
++ */
++void
++ixOsalCacheInvalidateRange(unsigned long start, unsigned long size)
++{
++ __asm__
++ (" tst %0, #" IX_CLM "\n"
++ " mcrne p15, 0, %0, c7, c10, 1 @ clean D cache line\n"
++ " bic %0, %0, #" IX_CLM "\n"
++ " tst %1, #" IX_CLM "\n"
++ " mcrne p15, 0, %1, c7, c10, 1 @ clean D cache line\n"
++ "1: mcr p15, 0, %0, c7, c6, 1 @ invalidate D cache line\n"
++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n"
++ " cmp %0, %1\n"
++ " blo 1b\n"
++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n"
++ : /* no output */
++ : "r"(start), "r"(size)
++ : "cc");
++}
++
++/*
++ * reimplementation of kernel's invalidate_dcache_range()
++ */
++void
++ixOsalCacheFlushRange(unsigned long start, unsigned long size)
++{
++ __asm__
++ (" bic %0, %0, #" IX_CLM "\n"
++ "1: mcr p15, 0, %0, c7, c10, 1 @ clean D cache line\n"
++ " add %0, %0, #" IX_STR(IX_OSAL_CACHE_LINE_SIZE) "\n"
++ " cmp %0, %1\n"
++ " blo 1b\n"
++ " mcr p15, 0, %0, c7, c10, 4 @ drain write & fill buffer\n"
++ : /* no output */
++ : "r"(start), "r"(size)
++ : "cc");
++}
++
++#undef _IX_STR
++#undef IX_STR
++#undef IX_CLM
++
++#endif /* (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) */
+diff -Naur ixp_osal.orig/os/linux/src/core/IxOsalOsMsgQ.c ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c
+--- ixp_osal.orig/os/linux/src/core/IxOsalOsMsgQ.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/core/IxOsalOsMsgQ.c 2005-08-24 00:18:02.000000000 +0200
+@@ -45,9 +45,9 @@
+ * -- End Intel Copyright Notice --
+ */
+ #include <linux/linkage.h>
++#include <linux/spinlock.h>
+ #include <linux/ipc.h>
+ #include <linux/msg.h>
+-#include <linux/spinlock.h>
+ #include <linux/interrupt.h>
+
+ #include "IxOsal.h"
+diff -Naur ixp_osal.orig/os/linux/src/core/IxOsalOsSemaphore.c ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c
+--- ixp_osal.orig/os/linux/src/core/IxOsalOsSemaphore.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/core/IxOsalOsSemaphore.c 2005-08-26 15:58:16.000000000 +0200
+@@ -46,7 +46,7 @@
+ */
+
+ #include <linux/slab.h>
+-#include <asm-arm/hardirq.h>
++#include <linux/hardirq.h>
+ #include "IxOsal.h"
+
+ /* Define a large number */
+@@ -93,7 +93,7 @@
+ {
+
+ IX_STATUS ixStatus = IX_SUCCESS;
+- UINT32 timeoutTime;
++ unsigned long timeoutTime;
+
+ if (sid == NULL)
+ {
+diff -Naur ixp_osal.orig/os/linux/src/core/IxOsalOsSymbols.c ixp_osal/os/linux/src/core/IxOsalOsSymbols.c
+--- ixp_osal.orig/os/linux/src/core/IxOsalOsSymbols.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/core/IxOsalOsSymbols.c 2005-08-30 19:19:33.000000000 +0200
+@@ -64,6 +64,10 @@
+
+ EXPORT_SYMBOL (ixOsalCacheDmaMalloc);
+ EXPORT_SYMBOL (ixOsalCacheDmaFree);
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++EXPORT_SYMBOL (ixOsalCacheInvalidateRange);
++EXPORT_SYMBOL (ixOsalCacheFlushRange);
++#endif
+
+ EXPORT_SYMBOL (ixOsalThreadCreate);
+ EXPORT_SYMBOL (ixOsalThreadStart);
+diff -Naur ixp_osal.orig/os/linux/src/modules/ioMem/IxOsalOsIoMem.c ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c
+--- ixp_osal.orig/os/linux/src/modules/ioMem/IxOsalOsIoMem.c 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/os/linux/src/modules/ioMem/IxOsalOsIoMem.c 2005-08-24 00:18:02.000000000 +0200
+@@ -45,6 +45,7 @@
+ * -- End Intel Copyright Notice --
+ */
+
++#include <asm/page.h>
+ #include <asm/io.h>
+ #include <linux/ioport.h>
+
+--- ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400.h.orig 2005-04-17 20:56:27.000000000 -0700
++++ ixp_osal/os/linux/include/platforms/ixp400/IxOsalOsIxp400.h 2005-10-01 16:27:05.566984144 -0700
+@@ -53,6 +53,8 @@
+ #include "asm/hardware.h"
+ #include "asm/arch/irqs.h"
+
++#include <linux-2.6.h> /* Glue */
++
+ /* physical addresses to be used when requesting memory with IX_OSAL_MEM_MAP */
+ #define IX_OSAL_IXP400_INTC_PHYS_BASE IXP425_INTC_BASE_PHYS
+ #define IX_OSAL_IXP400_GPIO_PHYS_BASE IXP425_GPIO_BASE_PHYS
+@@ -108,7 +110,6 @@
+ #define IX_OSAL_IXP400_NPEB_VIRT_BASE IXP425_NPEB_BASE_VIRT
+ #define IX_OSAL_IXP400_NPEC_VIRT_BASE IXP425_NPEC_BASE_VIRT
+ #define IX_OSAL_IXP400_PERIPHERAL_VIRT_BASE IXP425_PERIPHERAL_BASE_VIRT
+-#define IX_OSAL_IXP400_QMGR_VIRT_BASE IXP425_QMGR_BASE_VIRT
+ #define IX_OSAL_IXP400_OSTS_VIRT_BASE IXP425_TIMER_BASE_VIRT
+ #define IX_OSAL_IXP400_USB_VIRT_BASE IXP425_USB_BASE_VIRT
+ #define IX_OSAL_IXP400_EXP_CFG_VIRT_BASE IXP425_EXP_CFG_BASE_VIRT
+--- ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h.orig 2005-04-17 20:56:27.000000000 -0700
++++ ixp_osal/os/linux/include/platforms/ixp400/ixp425/IxOsalOsIxp425Sys.h 2005-10-01 16:31:05.670092880 -0700
+@@ -85,12 +85,21 @@
+ * Queue Manager
+ */
+ {
++#ifdef IXP425_QMGR_BASE_VIRT
+ IX_OSAL_STATIC_MAP, /* type */
+ IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */
+ IX_OSAL_IXP400_QMGR_MAP_SIZE, /* size */
+ IX_OSAL_IXP400_QMGR_VIRT_BASE, /* virtualAddress */
+ NULL, /* mapFunction */
+ NULL, /* unmapFunction */
++#else
++ IX_OSAL_DYNAMIC_MAP, /* type */
++ IX_OSAL_IXP400_QMGR_PHYS_BASE, /* physicalAddress */
++ IX_OSAL_IXP400_QMGR_MAP_SIZE, /* size */
++ 0, /* virtualAddress */
++ ixOsalLinuxMemMap, /* mapFunction */
++ ixOsalLinuxMemUnmap, /* unmapFunction */
++#endif
+ 0, /* refCount */
+ IX_OSAL_BE | IX_OSAL_LE_DC, /* endianType */
+ "qMgr" /* name */
+--- ixp_osal/os/linux/src/core/IxOsalOsServices.c.orig 2005-04-17 20:56:28.000000000 -0700
++++ ixp_osal/os/linux/src/core/IxOsalOsServices.c 2005-10-01 16:37:00.876444607 -0700
+@@ -54,6 +54,7 @@
+ #include <linux/time.h>
+ #include <linux/sched.h>
+ #include <linux/slab.h>
++#include <linux/interrupt.h>
+
+ #include "IxOsal.h"
+
+@@ -89,7 +90,7 @@
+ /*
+ * General interrupt handler
+ */
+-static void
++static irqreturn_t
+ ixOsalOsIsrProxy (int irq, void *dev_id, struct pt_regs *regs)
+ {
+ IxOsalInfoType *isr_proxy_info = (IxOsalInfoType *) dev_id;
+@@ -98,6 +99,7 @@
+ "ixOsalOsIsrProxy: Interrupt used before ixOsalIrqBind was invoked");
+
+ isr_proxy_info->routine (isr_proxy_info->parameter);
++ return IRQ_HANDLED;
+ }
+
+ /*
+@@ -105,11 +107,12 @@
+ * This handler saves the interrupted Program Counter (PC)
+ * into a global variable
+ */
+-static void
++static irqreturn_t
+ ixOsalOsIsrProxyWithPC (int irq, void *dev_id, struct pt_regs *regs)
+ {
+ ixOsalLinuxInterruptedPc = regs->ARM_pc;
+ ixOsalOsIsrProxy(irq, dev_id, regs);
++ return IRQ_HANDLED;
+ }
+
+ /**************************************
+@@ -191,10 +194,15 @@
+ PUBLIC UINT32
+ ixOsalIrqLock ()
+ {
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++ unsigned long flags;
++ local_irq_save(flags);
++#else
+ UINT32 flags;
+ save_flags (flags);
+ cli ();
+- return flags;
++#endif
++ return (UINT32)flags;
+ }
+
+ /* Enable interrupts and task scheduling,
+@@ -204,7 +212,11 @@
+ PUBLIC void
+ ixOsalIrqUnlock (UINT32 lockKey)
+ {
++# if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))
++ local_irq_restore((unsigned long)lockKey);
++# else
+ restore_flags (lockKey);
++# endif
+ }
+
+ PUBLIC UINT32
+@@ -329,7 +341,7 @@
+ PUBLIC void
+ ixOsalSleep (UINT32 milliseconds)
+ {
+- if (milliseconds != 0)
++ if (milliseconds*HZ >= 1000)
+ {
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout ((milliseconds * HZ) / 1000);
+--- ixp_osal/os/linux/src/core/IxOsalOsThread.c.orig 2005-04-17 20:56:28.000000000 -0700
++++ ixp_osal/os/linux/src/core/IxOsalOsThread.c 2005-10-01 16:38:58.227829064 -0700
+@@ -46,6 +46,7 @@
+ */
+
+ #include <linux/sched.h>
++#include <linux/version.h>
+
+ #include "IxOsal.h"
+
+@@ -65,12 +66,12 @@
+ void *arg = IxOsalOsThreadData.arg;
+ static int seq = 0;
+
+- daemonize ();
++ daemonize ("IxOsal %d", ++seq);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
+ reparent_to_init ();
+
+ exit_files (current);
+-
+- snprintf(current->comm, sizeof(current->comm), "IxOsal %d", ++seq);
++#endif
+
+ up (&IxOsalThreadMutex);
+
diff --git a/packages/ixp4xx/ixp-osal-2.0/Makefile.patch b/packages/ixp4xx/ixp-osal-2.0/Makefile.patch
new file mode 100644
index 0000000000..f852ea2b26
--- /dev/null
+++ b/packages/ixp4xx/ixp-osal-2.0/Makefile.patch
@@ -0,0 +1,27 @@
+diff -Naur ixp_osal.orig/Makefile ixp_osal/Makefile
+--- ixp_osal.orig/Makefile 2005-08-24 00:16:37.000000000 +0200
++++ ixp_osal/Makefile 2005-08-24 00:18:02.000000000 +0200
+@@ -172,7 +172,7 @@
+
+ # TODO push this to linux make
+ ifeq ($(IX_OSAL_MK_HOST_OS), linux)
+-INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp425/
++INCLUDE_DIRS += $(LINUX_SRC)/include/asm-arm/arch-ixp4xx/
+ endif
+
+ CFLAGS += $(INCLUDE_DIRS:%=-I%)
+--- ixp_osal/os/linux/make/macros.mk.orig 2005-10-01 15:50:19.544167880 -0700
++++ ixp_osal/os/linux/make/macros.mk 2005-10-01 15:50:43.053647239 -0700
+@@ -88,10 +88,10 @@
+ # Compiler & linker options
+
+ # Compiler flags
+-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale
+
+ CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common \
+- -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE \
++ -pipe -mapcs-32 -msoft-float -DMODULE \
+ -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS) -DEXPORT_SYMTAB
+
+ # Linux linker flags
diff --git a/packages/ixp4xx/ixp-osal_2.0.bb b/packages/ixp4xx/ixp-osal_2.0.bb
new file mode 100644
index 0000000000..7028b76b71
--- /dev/null
+++ b/packages/ixp4xx/ixp-osal_2.0.bb
@@ -0,0 +1,81 @@
+# Intel ixp4xx access library software. Note that this has an Intel
+# license which restricts its use.
+MAINTAINER = "NSLU2 Linux <nslu2-linux@yahoogroups.com>"
+HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm"
+LICENSE = "http://www.intel.com/design/network/swsup/np_sla/ixp400.htm"
+LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm"
+# You must download the following software to your OpenEmbedded downloads
+# directory before using this package:
+#
+# IPL_ixp400AccessLibrary-2_0.zip
+#
+# To do this go to the LICENSE_HOMEPAGE above, register/login (using a
+# web browser which is supported by the login page), this will give you
+# access to the web page from which you can download the software - you
+# need the: "IntelĀ® IXP400 Software and RedBoot* Boot Loader" and, from
+# this the "Intel Hardware Access Software" (versions 1.5 encryption is
+# not required.)
+#
+# Store the file with the name given below in your downloads directory
+#
+SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_0.zip"
+SRC_URI += "file://Makefile.patch;patch=1"
+SRC_URI += "file://2.6.patch;patch=1"
+S = "${WORKDIR}/ixp_osal"
+PR = "r0"
+
+COMPATIBLE_HOST = "^armeb-linux.*"
+
+inherit module
+
+# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
+# required. Notice that this has to be done for each separately built
+# module as well!
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
+
+EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
+ 'LD=${KERNEL_LD}' \
+ 'AR=${AR}' \
+ 'IX_XSCALE_SW=${S}' \
+ 'IX_TARGET=linuxbe' \
+ 'IX_DEVICE=ixp42X' \
+ 'LINUX_SRC=${STAGING_KERNEL_DIR}' \
+ 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \
+ "
+
+OSAL_PATH = "lib/ixp425/linux/linuxbe"
+# This is a somewhat arbitrary choice:
+OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
+
+do_compile () {
+ oe_runmake ${OSAL_PATH}/libosal.a ${OSAL_PATH}/ixp_osal.o
+}
+
+do_stage () {
+ # Clean the directory first, this ensures incremental builds have
+ # a slightly better chance of working
+ rm -rf ${OSAL_DIR}
+ install -d ${OSAL_DIR}
+
+ # First the include files, maintain the tree structure (ixp4xx-csr
+ # expects the exact same tree)
+ cp -rf --dereference include ${OSAL_DIR}
+ install -d ${OSAL_DIR}/os/linux
+ cp -rf --dereference os/linux/include ${OSAL_DIR}/os/linux
+
+ # Install the library/object
+ install -d ${OSAL_DIR}/${OSAL_PATH}
+ rm -f ${OSAL_DIR}/libosal
+ install -m 0644 ${OSAL_PATH}/libosal.a ${OSAL_DIR}/${OSAL_PATH}
+ touch ${OSAL_DIR}/libosal
+ rm -f ${OSAL_DIR}/module
+ install -m 0644 ${OSAL_PATH}/ixp_osal.o ${OSAL_DIR}/${OSAL_PATH}
+ touch ${OSAL_DIR}/module
+}
+
+# This stuff doesn't install anything...
+PACKAGES = ""
+
+do_install () {
+}
diff --git a/packages/ixp4xx/ixp4xx-csr-2.0/.mtn2git_empty b/packages/ixp4xx/ixp4xx-csr-2.0/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/ixp4xx/ixp4xx-csr-2.0/.mtn2git_empty
diff --git a/packages/ixp4xx/ixp4xx-csr-2.0/2.6.14.patch b/packages/ixp4xx/ixp4xx-csr-2.0/2.6.14.patch
new file mode 100644
index 0000000000..9630e6cd4a
--- /dev/null
+++ b/packages/ixp4xx/ixp4xx-csr-2.0/2.6.14.patch
@@ -0,0 +1,20 @@
+# Additional patches for v2.0 on 2.6.14
+--- ixp400_xscale_sw/src/oslinux/IxLinuxInit.c.orig 2005-10-01 18:21:34.731233399 -0700
++++ ixp400_xscale_sw/src/oslinux/IxLinuxInit.c 2005-10-01 18:21:45.811930663 -0700
+@@ -160,7 +160,6 @@
+ return -EEXIST;
+ }
+
+- MOD_INC_USE_COUNT; /* Increment use count to prevent premature rmmod-ing */
+ ixNpeDlSegmentedListHead = NULL; /* Reset linked list which keeps track of Microcode fragments */
+ ixNpeDlSegmentedListTail = NULL;
+ ixNpeDlTotalBytesReadIn = 0;
+@@ -225,8 +224,6 @@
+ kfree (temp);
+ }
+
+- MOD_DEC_USE_COUNT;
+-
+ return 0;
+ }
+
diff --git a/packages/ixp4xx/ixp4xx-csr-2.0/2.6.patch b/packages/ixp4xx/ixp4xx-csr-2.0/2.6.patch
new file mode 100644
index 0000000000..37d390bf71
--- /dev/null
+++ b/packages/ixp4xx/ixp4xx-csr-2.0/2.6.patch
@@ -0,0 +1,148 @@
+diff -Naur ixp400_xscale_sw.orig/Readme-Kernel-2_6-Patch.txt ixp400_xscale_sw/Readme-Kernel-2_6-Patch.txt
+--- ixp400_xscale_sw.orig/Readme-Kernel-2_6-Patch.txt 1970-01-01 01:00:00.000000000 +0100
++++ ixp400_xscale_sw/Readme-Kernel-2_6-Patch.txt 2005-09-28 19:50:30.000000000 +0200
+@@ -0,0 +1,49 @@
++This file describes a patch to use version 1.5 of the Intel Ixp4XX
++Access Library with Linux 2.6 kernels.
++
++Authors/History
++---------------
++
++This patch consists of the changes made by Marc Singer for use of
++version 1.5 of the library with the APEX bootloader, and a patch made
++by Robin Farine and Tom Winkler for use of version 1.4 of the library
++with Linux-2.6 kernels. These changes were merged together by Hannes
++Reich.
++
++Both patches are incorporated in their entirety, with the exception of
++some tweaks to sleep times in the ethAcc code and modifications to
++the code in src/codelets/usb/ from the Robin Farine / Tom Winkler
++patch.
++
++Status
++------
++
++This code has been tested on a Linksys NSLU2. It works in big-endian
++mode, performance seems around 10% faster than 1.4.
++
++The code does not work in little-endian mode. It appears as though the
++hardware is initialised correctly, but packet receive / transmit done
++callbacks are never called.
++
++Licence Information
++-------------------
++
++The patch is licenced under the same conditions as the original Access
++Library 1.5 (INTEL SOFTWARE LICENSE AGREEMENT). The full text of the
++licence can be downloaded from:
++http://www.intel.com/design/network/swsup/np_sla/ixp400.htm
++
++The patch is free, unsupported and the authors make no warranties.
++Use it at your own risk, do with it as you see fit so long as you do
++not violate the original licence agreement.
++
++The authors permit derivative works based upon the patch.
++
++References
++----------
++
++The version 1.4 patch by Robin Farine and Tom Winkler is available from
++http://www.wnk.at/ixp400_accesslib_kernel26/data/patch_accesslib_kernel26_20040811.diff
++
++The version 1.5 patch by Marc Singer is at
++http://wiki.buici.com/bin/view/Main/IXPAccessLibrary
+diff -Naur ixp400_xscale_sw.orig/src/codelets/dmaAcc/IxDmaAccCodelet_p.h ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h
+--- ixp400_xscale_sw.orig/src/codelets/dmaAcc/IxDmaAccCodelet_p.h 2005-08-24 00:16:36.000000000 +0200
++++ ixp400_xscale_sw/src/codelets/dmaAcc/IxDmaAccCodelet_p.h 2005-08-24 00:18:02.000000000 +0200
+@@ -113,7 +113,7 @@
+ * @return IX_FAIL - Error initialising codelet
+ */
+ IX_STATUS
+-ixDmaAccCodeletInit(IxDmaNpeId npeId);
++ixDmaAccCodeletInit(IxNpeDlNpeId npeId);
+
+ /**
+ * @fn ixDmaAccCodeletTestPerform( UINT16 transferLength,
+diff -Naur ixp400_xscale_sw.orig/src/ethDB/include/IxEthDB_p.h ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h
+--- ixp400_xscale_sw.orig/src/ethDB/include/IxEthDB_p.h 2005-08-24 00:16:36.000000000 +0200
++++ ixp400_xscale_sw/src/ethDB/include/IxEthDB_p.h 2005-08-24 00:18:02.000000000 +0200
+@@ -633,7 +633,7 @@
+ IX_ETH_DB_PUBLIC UINT32 ixEthDBKeyXORHash(void *macAddress);
+
+ /* Port updates */
+-IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBFeature type);
++IX_ETH_DB_PUBLIC IxEthDBStatus ixEthDBNPEUpdateHandler(IxEthDBPortId portID, IxEthDBRecordType type);
+ IX_ETH_DB_PUBLIC void ixEthDBUpdatePortLearningTrees(IxEthDBPortMap triggerPorts);
+ IX_ETH_DB_PUBLIC void ixEthDBNPEAccessRequest(IxEthDBPortId portID);
+ IX_ETH_DB_PUBLIC void ixEthDBUpdateLock(void);
+diff -Naur ixp400_xscale_sw.orig/src/include/IxTypes.h ixp400_xscale_sw/src/include/IxTypes.h
+--- ixp400_xscale_sw.orig/src/include/IxTypes.h 2005-08-24 00:16:36.000000000 +0200
++++ ixp400_xscale_sw/src/include/IxTypes.h 2005-08-26 01:19:15.000000000 +0200
+@@ -79,6 +79,10 @@
+ #endif
+ #endif
+
++#ifndef BIT
++#define BIT(x) ((1)<<(x))
++#endif
++
+ #include "IxOsalBackward.h"
+
+ #endif /* IxTypes_H */
+diff -Naur ixp400_xscale_sw.orig/src/usb/include/usbprivatetypes.h ixp400_xscale_sw/src/usb/include/usbprivatetypes.h
+--- ixp400_xscale_sw.orig/src/usb/include/usbprivatetypes.h 2005-08-24 00:16:36.000000000 +0200
++++ ixp400_xscale_sw/src/usb/include/usbprivatetypes.h 2005-08-24 00:18:02.000000000 +0200
+@@ -164,6 +164,53 @@
+ } USBEventProcessor;
+
+ /* UDC Registers */
++
++#undef UDCCR
++#undef UDCCS0
++#undef UDCCS1
++#undef UDCCS2
++#undef UDCCS3
++#undef UDCCS4
++#undef UDCCS5
++#undef UDCCS6
++#undef UDCCS7
++#undef UDCCS8
++#undef UDCCS9
++#undef UDCCS10
++#undef UDCCS11
++#undef UDCCS12
++#undef UDCCS13
++#undef UDCCS14
++#undef UDCCS15
++#undef UICR0
++#undef UICR1
++#undef USIR0
++#undef USIR1
++#undef UFNHR
++#undef UFNLR
++#undef UBCR2
++#undef UBCR4
++#undef UBCR7
++#undef UBCR9
++#undef UBCR12
++#undef UBCR14
++#undef UDDR0
++#undef UDDR5
++#undef UDDR10
++#undef UDDR15
++#undef UDDR1
++#undef UDDR2
++#undef UDDR3
++#undef UDDR4
++#undef UDDR6
++#undef UDDR7
++#undef UDDR8
++#undef UDDR9
++#undef UDDR11
++#undef UDDR12
++#undef UDDR13
++#undef UDDR14
++
+ typedef struct /* UDCRegisters */
+ {
+ volatile UINT32 UDCCR;
diff --git a/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch b/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch
new file mode 100644
index 0000000000..585320c7ec
--- /dev/null
+++ b/packages/ixp4xx/ixp4xx-csr-2.0/Makefile.patch
@@ -0,0 +1,81 @@
+diff -Naur ixp400_xscale_sw.orig/Makefile ixp400_xscale_sw/Makefile
+--- ixp400_xscale_sw/.pc/Makefile.patch/Makefile 2005-04-17 20:54:58.000000000 -0700
++++ ixp400_xscale_sw/Makefile 2005-10-01 18:15:08.422924549 -0700
+@@ -104,8 +104,8 @@
+ vxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc dmaAcc
+ vxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc
+ vxsim_COMPONENTS := $(BI_ENDIAN_COMPONENTS) dmaAcc
+-linuxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc dmaAcc oslinux
+-linuxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) perfProfAcc oslinux
++linuxbe_COMPONENTS := $(BI_ENDIAN_COMPONENTS) dmaAcc oslinux
++linuxle_COMPONENTS := $(BI_ENDIAN_COMPONENTS) oslinux
+
+ #The lists below contain the set of components available for each target platform
+ # specific to the ixp46X device
+@@ -132,7 +132,7 @@
+ # Codelet components
+ # Codeletes listed in BI_ENDIAN_CODELETS_COMPONENTS must work for both
+ # big and little endian OSs.
+-BI_ENDIAN_CODELETS_COMPONENTS := hssAcc ethAcc perfProfAcc atm
++BI_ENDIAN_CODELETS_COMPONENTS := hssAcc ethAcc atm
+
+ #Codelet components only applicable to ixp46x
+ ixp46X_BI_ENDIAN_CODELETS_COMPONENTS := timeSyncAcc parityENAcc
+@@ -312,9 +312,9 @@
+ else
+ # linux compiler flags
+
+-LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mcpu=xscale -mtune=xscale
++LINUX_MACH_CFLAGS := -D__LINUX_ARM_ARCH__=5 -mtune=xscale
+
+-CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -mshort-load-bytes -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
++CFLAGS := -D__KERNEL__ -I$(LINUX_SRC)/include -Wall -Wno-trigraphs -fno-common -pipe -mapcs-32 -msoft-float -DMODULE -Isrc/include -D__linux -DCPU=33 -DXSCALE=33 $(LINUX_MACH_CFLAGS)
+ ifndef IX_INCLUDE_MICROCODE
+ CFLAGS += -DIX_NPEDL_READ_MICROCODE_FROM_FILE
+ endif
+@@ -806,9 +806,11 @@
+
+ ifeq ($(IX_HOST_OS),linux)
+ ifndef IX_INCLUDE_MICROCODE
++ifdef IX_BUILD_MICROCODE
+ Makefile: $(NPE_CONVERTER) $(NPE_DAT)
+ endif
+ endif
++endif
+
+ ################################################################
+ # Rules to check that macros are defined.
+@@ -1253,10 +1255,18 @@
+
+ ifndef IX_INCLUDE_MICROCODE
+ $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(OSAL_MODULE)
++ touch $(OBJ_DIR)/ixp400.c
++ cp Makefile.kmod26 $(OBJ_DIR)/Makefile
++ make -C $(OBJ_DIR)
+ $(LD) $(LDFLAGS) $^ -o $@
++ make -C $(OBJ_DIR)
+ else
+ $(OBJ_DIR)/ixp400.o: $(COMPONENTS:%=$(OBJ_DIR)/ixp400_%.o) $(NPE_PRODUCTION_HEADER_OBJ) $(OSAL_MODULE)
++ touch $(OBJ_DIR)/ixp400.c
++ cp Makefile.kmod26 $(OBJ_DIR)/Makefile
++ make -C $(OBJ_DIR)
+ $(LD) $(LDFLAGS) $^ -o $@
++ make -C $(OBJ_DIR)
+ endif
+
+
+diff -Naur ixp400_xscale_sw.orig/Makefile.kmod26 ixp400_xscale_sw/Makefile.kmod26
+--- ixp400_xscale_sw.orig/Makefile.kmod26 1970-01-01 01:00:00.000000000 +0100
++++ ixp400_xscale_sw/Makefile.kmod26 2005-08-24 22:33:12.000000000 +0200
+@@ -0,0 +1,11 @@
++obj-m := ixp400.o
++
++PWD := $(shell pwd)
++
++LINUX_SRC := $($(IX_TARGET)_KERNEL_DIR)
++
++default:
++ $(MAKE) ARCH=arm CROSS_COMPILE=$(LINUX_CROSS_COMPILE) V=1 -C $(LINUX_SRC) SUBDIRS=$(PWD) modules
++
++clean:
++ rm -f ixp400.ko
diff --git a/packages/ixp4xx/ixp4xx-csr_2.0.bb b/packages/ixp4xx/ixp4xx-csr_2.0.bb
new file mode 100644
index 0000000000..290bbeb897
--- /dev/null
+++ b/packages/ixp4xx/ixp4xx-csr_2.0.bb
@@ -0,0 +1,78 @@
+# Intel ixp4xx access library software. Note that this has an Intel
+# license which restricts its use.
+MAINTAINER = "NSLU2 Linux <nslu2-linux@yahoogroups.com>"
+HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp420.htm"
+LICENSE = "http://www.intel.com/design/network/swsup/np_sla/ixp400.htm"
+LICENSE_HOMEPAGE = "http://www.intel.com/design/network/products/npfamily/ixp425swr1.htm"
+# You must download the following software to your OpenEmbedded downloads
+# directory before using this package:
+#
+# IPL_ixp400AccessLibrary-2_0.zip
+# IPL_ixp400NpeLibrary-2_0.zip
+#
+# To do this go to the LICENSE_HOMEPAGE above, register/login (using a
+# web browser which is supported by the login page), this will give you
+# access to the web page from which you can download the software - you
+# need the: "IntelĀ® IXP400 Software and RedBoot* Boot Loader" and, from
+# this the "Intel Hardware Access Software" and "NPE Microcode" (both
+# versions 1.5, encryption is not required.)
+#
+# Store the files with the names given below in your downloads directory
+#
+SRC_URI = "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400AccessLibrary-2_0.zip"
+SRC_URI += "http://www.intel.com/Please-Read-The-BB-File/IPL_ixp400NpeLibrary-2_0.zip"
+SRC_URI += "file://Makefile.patch;patch=1"
+SRC_URI += "file://2.6.patch;patch=1"
+SRC_URI += "file://2.6.14.patch;patch=1"
+DEPENDS = "ixp-osal"
+S = "${WORKDIR}/ixp400_xscale_sw"
+PR = "r0"
+
+COMPATIBLE_HOST = "^armeb-linux.*"
+
+inherit module
+
+# Add the architecture compiler flags to KERNEL_CC and KERNEL_LD as
+# required. Notice that this has to be done for each separately built
+# module as well!
+KERNEL_CC += "${TARGET_CC_KERNEL_ARCH}"
+KERNEL_LD += "${TARGET_LD_KERNEL_ARCH}"
+
+OSAL_PATH = "lib/ixp425/linux/linuxbe"
+# This is a somewhat arbitrary choice:
+OSAL_DIR = "${STAGING_KERNEL_DIR}/ixp_osal"
+
+# NOTE: IX_INCLUDE_MICROCODE causes the microcode to be included in
+# the ixp4xx-csr module, this *requires* the IPL_ixp400NpeLibrary-2_0.zip
+# to be added to the SRC_URI - see above.
+EXTRA_OEMAKE = "'CC=${KERNEL_CC}' \
+ 'LD=${KERNEL_LD}' \
+ 'AR=${AR}' \
+ 'IX_XSCALE_SW=${S}' \
+ 'IX_TARGET=linuxbe' \
+ 'IX_DEVICE=ixp42X' \
+ 'IX_MPHY=1' \
+ 'IX_MPHYSINGLEPORT=1' \
+ 'IX_INCLUDE_MICROCODE=1' \
+ 'LINUX_SRC=${STAGING_KERNEL_DIR}' \
+ 'LINUX_CROSS_COMPILE=${HOST_PREFIX}' \
+ 'OSAL_DIR=${OSAL_DIR}' \
+ 'OSAL_IMAGE=${OSAL_DIR}/${OSAL_PATH}/libosal.a' \
+ 'OSAL_MODULE=${OSAL_DIR}/${OSAL_PATH}/ixp_osal.o' \
+ "
+
+do_compile () {
+ # The target makes the .ko as a side effect, as a result of the
+ # Makefile.patch
+ oe_runmake lib/linuxbe/ixp400.o
+}
+
+do_stage () {
+ install -d ${STAGING_INCDIR}/linux/ixp4xx-csr
+ install -m 0644 src/include/*.h ${STAGING_INCDIR}/linux/ixp4xx-csr/
+}
+
+do_install () {
+ install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/drivers/ixp400
+ install -m 0644 lib/linuxbe/ixp400.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/drivers/ixp400/
+}
diff --git a/packages/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.bb b/packages/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.bb
index 4db17f4566..f3fb85b7e1 100644
--- a/packages/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.bb
+++ b/packages/linux/opensimpad_2.4.25-vrs2-pxa1-jpm1.bb
@@ -8,7 +8,7 @@ PXAV = "${@bb.data.getVar('PV',d,True).split('-')[2]}"
JPMV = "${@bb.data.getVar('PV',d,True).split('-')[3]}"
PR = "r19"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opensimpad-${PV}"
+FILESPATH = "${FILE_DIRNAME}/opensimpad-${PV}:${FILE_DIRNAME}/opensimpad:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${KV}.tar.bz2 \
file://${KV}-${VRSV}.patch;patch=1 \
diff --git a/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb b/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb
index 806d1d62cf..0e86da015d 100644
--- a/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb
+++ b/packages/linux/opensimpad_2.4.27-vrs1-pxa1-jpm1.bb
@@ -9,7 +9,7 @@ JPMV = "${@bb.data.getVar('PV',d,True).split('-')[3]}"
USBV= "usb20040610"
PR = "r1"
-FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/opensimpad-${PV}"
+FILESPATH = "${FILE_DIRNAME}/opensimpad-${PV}:${FILE_DIRNAME}/opensimpad:${FILE_DIRNAME}/files:${FILE_DIRNAME}"
SRC_URI = "ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-${KV}.tar.bz2 \
file://${KV}-${VRSV}.patch;patch=1 \
diff --git a/packages/monotone/files/txt2c-cross-post-0.22.patch b/packages/monotone/files/txt2c-cross-post-0.22.patch
new file mode 100644
index 0000000000..18ff9eb87c
--- /dev/null
+++ b/packages/monotone/files/txt2c-cross-post-0.22.patch
@@ -0,0 +1,11 @@
+--- monotone-0.23/Makefile.am.orig 2005-10-02 23:32:09.876678400 -0700
++++ monotone-0.23/Makefile.am 2005-10-02 23:32:13.940934147 -0700
+@@ -427,7 +427,7 @@
+ CLEANFILES = $(BUILT_SOURCES_CLEAN) $(EPS_FIGURES)
+
+ txt2c: txt2c.cc Makefile
+- $(CXX) $(CXXFLAGS) -o $@ $<
++ $(BUILD_CXX) $(BUILD_CXXFLAGS) -o $@ $<
+ chmod 0755 $@$(EXEEXT)
+
+ apidocs:
diff --git a/packages/monotone/monotone-5_0.23.bb b/packages/monotone/monotone-5_0.23.bb
new file mode 100644
index 0000000000..2b42672e6b
--- /dev/null
+++ b/packages/monotone/monotone-5_0.23.bb
@@ -0,0 +1,15 @@
+# Release 0.22 reveals bugs in g++ for thumb (g++ generates
+# relocations which the linker cannot represent)
+#FIXME: remove the following
+ARM_INSTRUCTION_SET = ""
+
+include monotone.inc
+
+PR = "r0"
+
+SRC_URI = "http://venge.net/monotone/downloads/monotone-${PV}.tar.gz \
+ file://txt2c-cross-post-0.22.patch;patch=1 \
+ file://uclibc.database.hh.stdarg.patch;patch=1 \
+ "
+
+ALTERNATIVE_PRIORITY = "50"
diff --git a/packages/tslib/tslib/simpad/tslib.sh b/packages/tslib/tslib/simpad/tslib.sh
index e87a2095c4..8bb94a037f 100644
--- a/packages/tslib/tslib/simpad/tslib.sh
+++ b/packages/tslib/tslib/simpad/tslib.sh
@@ -1,5 +1,15 @@
#!/bin/sh
-TSLIB_TSDEVICE=/dev/input/event0
+case `uname -r` in
+2.4*)
+ TSLIB_TSDEVICE=/dev/touchscreen/ucb1x00
+ TSLIB_CONFFILE=/usr/share/tslib/ts.conf-simpad-2.4
+ ;;
+*)
+ TSLIB_TSDEVICE=/dev/input/event0
+ TSLIB_CONFFILE=/usr/share/tslib/ts.conf-simpad
+ ;;
+esac
+
+export TSLIB_TSDEVICE TSLIB_CONFFILE
-export TSLIB_TSDEVICE
diff --git a/packages/tslib/tslib/simpad/ts.conf b/packages/tslib/tslib/ts.conf-simpad
index 09309719f2..09309719f2 100644
--- a/packages/tslib/tslib/simpad/ts.conf
+++ b/packages/tslib/tslib/ts.conf-simpad
diff --git a/packages/tslib/tslib/ts.conf-simpad-2.4 b/packages/tslib/tslib/ts.conf-simpad-2.4
new file mode 100644
index 0000000000..035e794cb4
--- /dev/null
+++ b/packages/tslib/tslib/ts.conf-simpad-2.4
@@ -0,0 +1,5 @@
+module_raw ucb1x00
+module pthres pmin=1
+module variance delta=10
+module dejitter delta=150
+module linear
diff --git a/packages/tslib/tslib_cvs.bb b/packages/tslib/tslib_cvs.bb
index 9e6c4e26d3..f0267a6814 100644
--- a/packages/tslib/tslib_cvs.bb
+++ b/packages/tslib/tslib_cvs.bb
@@ -11,6 +11,7 @@ SRC_URI = "cvs://cvs:@pubcvs.arm.linux.org.uk/mnt/src/cvsroot;module=tslib \
file://ts.conf \
file://ts.conf-h3600 file://ts.conf-h3600-2.4 file://ts.conf-h6300 \
file://ts.conf-corgi file://ts.conf-corgi-2.4 \
+ file://ts.conf-simpad file://ts.conf-simpad-2.4 \
file://tslib.sh"
SRC_URI_append_mnci += " file://devfs.patch;patch=1"
SRC_URI_append_mnci += " file://event1.patch;patch=1"
@@ -54,6 +55,13 @@ do_install_append() {
done
rm -f ${D}${sysconfdir}/ts.conf
;;
+ simpad )
+ install -d ${D}${datadir}/tslib
+ for f in ts.conf-simpad ts.conf-simpad-2.4; do
+ install -m 0644 ${WORKDIR}/$f ${D}${datadir}/tslib/
+ done
+ rm -f ${D}${sysconfdir}/ts.conf
+ ;;
*)
;;
esac