summaryrefslogtreecommitdiff
path: root/openwrt/target/linux
diff options
context:
space:
mode:
Diffstat (limited to 'openwrt/target/linux')
-rw-r--r--openwrt/target/linux/au1000-2.6/config21
-rw-r--r--openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch26
-rw-r--r--openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch24
-rw-r--r--openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch241
-rw-r--r--openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch13
-rw-r--r--openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch63
6 files changed, 363 insertions, 25 deletions
diff --git a/openwrt/target/linux/au1000-2.6/config b/openwrt/target/linux/au1000-2.6/config
index bb7e267ad1..aaf89b52c5 100644
--- a/openwrt/target/linux/au1000-2.6/config
+++ b/openwrt/target/linux/au1000-2.6/config
@@ -1,7 +1,7 @@
#
# Automatically generated make config: don't edit
# Linux kernel version: 2.6.16.7
-# Sat Apr 22 16:46:55 2006
+# Sun Apr 23 13:43:59 2006
#
CONFIG_MIPS=y
@@ -676,7 +676,12 @@ CONFIG_NETDEVICES=y
CONFIG_DUMMY=m
CONFIG_BONDING=m
# CONFIG_EQUALIZER is not set
-# CONFIG_IMQ is not set
+CONFIG_IMQ=m
+# CONFIG_IMQ_BEHAVIOR_AA is not set
+# CONFIG_IMQ_BEHAVIOR_AB is not set
+CONFIG_IMQ_BEHAVIOR_BA=y
+# CONFIG_IMQ_BEHAVIOR_BB is not set
+CONFIG_IMQ_NUM_DEVS=2
CONFIG_TUN=m
#
@@ -875,17 +880,15 @@ CONFIG_MTX1_WATCHDOG=y
#
# PCI-based Watchdog Cards
#
-CONFIG_PCIPCWATCHDOG=m
-CONFIG_WDTPCI=m
-CONFIG_WDT_501_PCI=y
+# CONFIG_PCIPCWATCHDOG is not set
+# CONFIG_WDTPCI is not set
#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set
-CONFIG_RTC=m
-CONFIG_GEN_RTC=m
-CONFIG_GEN_RTC_X=y
+# CONFIG_RTC is not set
+# CONFIG_GEN_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
@@ -1250,7 +1253,7 @@ CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
CONFIG_NFSD_V4=y
CONFIG_NFSD_TCP=y
-CONFIG_ROOT_NFS=y
+# CONFIG_ROOT_NFS is not set
CONFIG_LOCKD=y
CONFIG_LOCKD_V4=y
CONFIG_EXPORTFS=y
diff --git a/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch b/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch
index 3edd749bb8..c7e329b295 100644
--- a/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch
+++ b/openwrt/target/linux/au1000-2.6/patches/004-mtx1_watchdog.patch
@@ -1,6 +1,6 @@
diff -urN linux-2.6.16.7/drivers/char/watchdog/Kconfig linux-2.6.16.7.new/drivers/char/watchdog/Kconfig
--- linux-2.6.16.7/drivers/char/watchdog/Kconfig 2006-04-17 23:53:25.000000000 +0200
-+++ linux-2.6.16.7.new/drivers/char/watchdog/Kconfig 2006-04-22 16:40:32.000000000 +0200
++++ linux-2.6.16.7.new/drivers/char/watchdog/Kconfig 2006-04-22 23:23:53.000000000 +0200
@@ -460,6 +460,14 @@
timer expired and no process has written to /dev/watchdog during
that time.
@@ -18,7 +18,7 @@ diff -urN linux-2.6.16.7/drivers/char/watchdog/Kconfig linux-2.6.16.7.new/driver
config ZVM_WATCHDOG
diff -urN linux-2.6.16.7/drivers/char/watchdog/Makefile linux-2.6.16.7.new/drivers/char/watchdog/Makefile
--- linux-2.6.16.7/drivers/char/watchdog/Makefile 2006-04-17 23:53:25.000000000 +0200
-+++ linux-2.6.16.7.new/drivers/char/watchdog/Makefile 2006-04-22 16:38:31.000000000 +0200
++++ linux-2.6.16.7.new/drivers/char/watchdog/Makefile 2006-04-22 23:21:18.000000000 +0200
@@ -65,6 +65,7 @@
# MIPS Architecture
@@ -29,8 +29,8 @@ diff -urN linux-2.6.16.7/drivers/char/watchdog/Makefile linux-2.6.16.7.new/drive
diff -urN linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c linux-2.6.16.7.new/drivers/char/watchdog/mtx-1_watchdog.c
--- linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux-2.6.16.7.new/drivers/char/watchdog/mtx-1_watchdog.c 2006-04-22 16:38:49.000000000 +0200
-@@ -0,0 +1,252 @@
++++ linux-2.6.16.7.new/drivers/char/watchdog/mtx-1_watchdog.c 2006-04-22 23:20:53.000000000 +0200
+@@ -0,0 +1,246 @@
+/*
+ * Driver for the MTX-1 Watchdog.
+ *
@@ -119,7 +119,7 @@ diff -urN linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c linux-2.6.16.7.n
+{
+ if (timer_is_running)
+ mod_timer (&wd_trigger_timer, jiffies + 5 * HZ);
-+ mtx1_trigger_wd ();
++ mtx1_trigger_wd();
+}
+
+static void start_wd_timer (void)
@@ -241,17 +241,6 @@ diff -urN linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c linux-2.6.16.7.n
+//---------[ Module Functions ]-----------------
+
+
-+void cleanup_module (void)
-+{
-+ // stop the timer, if it is running.
-+ stop_wd_timer();
-+
-+ misc_deregister(&mtx1wd_miscdev);
-+
-+ mtx1_disable_wd ();
-+}
-+
-+
+static int __init init_mtx1_watchdog(void)
+{
+ printk("MTX-1 watchdog driver\n");
@@ -274,7 +263,12 @@ diff -urN linux-2.6.16.7/drivers/char/watchdog/mtx-1_watchdog.c linux-2.6.16.7.n
+
+static void __exit exit_mtx1_watchdog(void) {
+
++ // stop the timer, if it is running.
++ stop_wd_timer();
++
+ misc_deregister(&mtx1wd_miscdev);
++
++ mtx1_disable_wd();
+}
+
+module_init(init_mtx1_watchdog);
diff --git a/openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch b/openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch
new file mode 100644
index 0000000000..946bd84540
--- /dev/null
+++ b/openwrt/target/linux/au1000-2.6/patches/005-au1000_eth_link_beat.patch
@@ -0,0 +1,24 @@
+diff -urN linux-2.6.16.7/drivers/net/au1000_eth.c linux-2.6.16.7.new/drivers/net/au1000_eth.c
+--- linux-2.6.16.7/drivers/net/au1000_eth.c 2006-04-17 23:53:25.000000000 +0200
++++ linux-2.6.16.7.new/drivers/net/au1000_eth.c 2006-04-23 01:42:48.000000000 +0200
+@@ -12,6 +12,9 @@
+ * Author: MontaVista Software, Inc.
+ * ppopov@mvista.com or source@mvista.com
+ *
++ * Bjoern Riemer 2004
++ * riemer@fokus.fraunhofer.de or riemer@riemer-nt.de
++ * // fixed the link beat detection with ioctls (SIOCGMIIPHY)
+ * ########################################################################
+ *
+ * This program is free software; you can distribute it and/or modify it
+@@ -1672,6 +1675,10 @@
+ aup->phy_ops->phy_status(dev, aup->phy_addr, &link, &speed);
+ control = MAC_DISABLE_RX_OWN | MAC_RX_ENABLE | MAC_TX_ENABLE;
+ #ifndef CONFIG_CPU_LITTLE_ENDIAN
++ /*riemer: fix for startup without cable */
++ if (!link)
++ dev->flags &= ~IFF_RUNNING;
++
+ control |= MAC_BIG_ENDIAN;
+ #endif
+ if (link && (dev->if_port == IF_PORT_100BASEFX)) {
diff --git a/openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch b/openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch
new file mode 100644
index 0000000000..511df2c8da
--- /dev/null
+++ b/openwrt/target/linux/au1000-2.6/patches/006-mtx1_system_button.patch
@@ -0,0 +1,241 @@
+diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c
+--- linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c 2006-04-17 23:53:25.000000000 +0200
++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c 2006-04-23 11:54:31.000000000 +0200
+@@ -64,6 +64,7 @@
+ { AU1500_GPIO_202, INTC_INT_LOW_LEVEL, 0 },
+ { AU1500_GPIO_203, INTC_INT_LOW_LEVEL, 0 },
+ { AU1500_GPIO_205, INTC_INT_LOW_LEVEL, 0 },
++ { AU1500_GPIO_207, INTC_INT_RISE_AND_FALL_EDGE, 0 },
+ };
+
+ int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
+diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/Makefile linux-2.6.16.7.new/arch/mips/au1000/mtx-1/Makefile
+--- linux-2.6.16.7/arch/mips/au1000/mtx-1/Makefile 2006-04-17 23:53:25.000000000 +0200
++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/Makefile 2006-04-23 14:01:36.000000000 +0200
+@@ -8,3 +8,4 @@
+ #
+
+ lib-y := init.o board_setup.o irqmap.o
++obj-y := mtx-1_sysbtn.o
+diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c
+--- linux-2.6.16.7/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/mtx-1_sysbtn.c 2006-04-23 14:01:17.000000000 +0200
+@@ -0,0 +1,218 @@
++/*
++ * Driver for the MTX-1 System Button.
++ *
++ * (c) Copyright 2005 4G Systems <info@4g-systems.biz>, All Rights Reserved.
++ * http://www.4g-systems.biz
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; either version
++ * 2 of the License, or (at your option) any later version.
++ *
++ * Neither Michael Stickel nor 4G Systeme GmbH admit liability nor provide
++ * warranty for any of this software. This material is provided
++ * "AS-IS" and at no charge.
++ *
++ * (c) Copyright 2005 4G Systems <info@4g-systems.biz>
++ *
++ * Release 0.01.
++ *
++ * Author: Michael Stickel michael.stickel@4g-systems.biz
++ *
++ *
++ * After the module is loaded there is a device /dev/misc/btn
++ * that can be read. It returns one char '1' if the button
++ * has been pressed an '0' if it has been released.
++ */
++#include <linux/config.h>
++#include <linux/module.h>
++#include <linux/version.h>
++#include <linux/types.h>
++#include <linux/errno.h>
++#include <linux/kernel.h>
++#include <linux/poll.h>
++#include <linux/sched.h>
++#include <linux/miscdevice.h>
++#include <linux/slab.h>
++#include <linux/init.h>
++#include <linux/irq.h>
++#include <linux/interrupt.h>
++
++#include <asm/uaccess.h>
++
++#include <asm/mach-au1x00/au1000.h>
++
++
++#ifndef FALSE
++# define FALSE (0)
++#endif
++
++#ifndef TRUE
++# define TRUE (!FALSE)
++#endif
++
++
++//---------[ declarations ]-----------------
++
++
++static DECLARE_WAIT_QUEUE_HEAD(mtx1btn_wait_queue);
++static char state_changed;
++static char last_value;
++static char is_inuse;
++
++
++//---------[ Hardware Functions ]-----------------
++
++// The MTX-1 Button is attached to GPIO207.
++#define MTX1_GPIO2_SYSBTN (7)
++#define MTX1_SYSBTN_IRQ (AU1500_GPIO_207)
++
++
++static char mtx1_getbtn (int btnno)
++{
++ if (btnno==0) {
++ return (au_readl(GPIO2_PINSTATE) & (1<<MTX1_GPIO2_SYSBTN)) ? 0 : 1;
++ }
++ return 0;
++}
++
++static void mtx1_initbuttons (void)
++{
++ au_writel (au_readl(GPIO2_DIR) & ~(1<<MTX1_GPIO2_SYSBTN), GPIO2_DIR);
++}
++
++
++//---------[ Interrupt handling ]-----------------
++
++
++static void mtx1_btn_interrupt (int irq, void *private, struct pt_regs *regs)
++{
++ char value = mtx1_getbtn(0);
++ if (last_value != value)
++ {
++ last_value = value;
++ state_changed = 1;
++ wake_up (&mtx1btn_wait_queue);
++ }
++// kill_fasync(&async_queue, SIGIO, POLL_OUT);
++}
++
++
++static int mtx1_btn_startirq (void)
++{
++ if (!request_irq (MTX1_SYSBTN_IRQ, mtx1_btn_interrupt, 0 /* | SA_INTERRUPT */, "mtx1btn", (void *)&state_changed)) {
++ return 0;
++ }
++ return -1;
++}
++
++static int mtx1_btn_stopirq (void)
++{
++ free_irq(MTX1_SYSBTN_IRQ, (void *)&state_changed);
++ return 0;
++}
++
++
++
++//---------[ File Functions ]-----------------
++
++
++static int mtx1sysbtn_minor = -1;
++
++
++static int mtx1sysbtn_open (struct inode *inode, struct file *file)
++{
++ if (MINOR(inode->i_rdev)!=mtx1sysbtn_minor) return -ENODEV;
++ if (is_inuse) return -EBUSY;
++ is_inuse=1;
++ last_value = mtx1_getbtn(0);
++ state_changed = 0;
++ return 0;
++}
++
++
++static int mtx1sysbtn_release (struct inode *inode, struct file *file) {
++ if (MINOR(inode->i_rdev)==mtx1sysbtn_minor) {
++ is_inuse=0;
++ }
++ return 0;
++}
++
++
++static ssize_t mtx1sysbtn_read (struct file *file, char *buf, size_t count, loff_t *ppos)
++{
++ if (count < 1)
++ return -EINVAL;
++ if (!state_changed)
++ interruptible_sleep_on (&mtx1btn_wait_queue);
++ state_changed = 0;
++ char c = last_value ? '1' : '0'; /* mtx1_getbtn(0) */
++ if(copy_to_user(buf, &c, 1))
++ return -EFAULT;
++ return 1;
++}
++
++
++static unsigned int mtx1sysbtn_poll (struct file *file, poll_table * wait)
++{
++ unsigned int mask = 0;
++
++ poll_wait (file, &mtx1btn_wait_queue, wait);
++
++ if (state_changed) // state changed since last time.
++ mask |= POLLIN | POLLRDNORM;
++
++ return mask;
++}
++
++
++static struct file_operations mtx1sysbtn_fops = {
++ .owner = THIS_MODULE,
++ .read = mtx1sysbtn_read,
++ .poll = mtx1sysbtn_poll,
++ .open = mtx1sysbtn_open,
++ .release = mtx1sysbtn_release
++};
++
++
++static struct miscdevice mtx1sysbtn_miscdev = {
++ MISC_DYNAMIC_MINOR /* SYSBTN_MINOR */ ,
++ "btn",
++ &mtx1sysbtn_fops
++};
++
++
++
++//---------[ Module Functions ]-----------------
++
++
++void __exit exit_mtx1_sysbtn (void)
++{
++ is_inuse = 1;
++ mtx1_btn_stopirq ();
++ misc_deregister(&mtx1sysbtn_miscdev);
++}
++
++
++static int __init init_mtx1_sysbtn (void)
++{
++ printk("MTX-1 System Button driver\n");
++ is_inuse = 1;
++ mtx1_initbuttons ();
++ if (misc_register (&mtx1sysbtn_miscdev) >= 0) {
++ mtx1sysbtn_minor = mtx1sysbtn_miscdev.minor;
++ if (mtx1_btn_startirq () == 0) {
++ is_inuse=0;
++ return 0;
++ }
++ misc_deregister(&mtx1sysbtn_miscdev);
++ }
++ return 1;
++}
++
++module_init(init_mtx1_sysbtn);
++module_exit(exit_mtx1_sysbtn);
++
++MODULE_AUTHOR("Michael Stickel");
++MODULE_DESCRIPTION("Driver for the MTX-1 system button");
++MODULE_LICENSE("GPL");
diff --git a/openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch b/openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch
new file mode 100644
index 0000000000..34d1005347
--- /dev/null
+++ b/openwrt/target/linux/au1000-2.6/patches/007-mtx1_sio2.patch
@@ -0,0 +1,13 @@
+--- linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c 2006-04-17 23:53:25.000000000 +0200
++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c 2006-04-23 14:35:42.000000000 +0200
+@@ -71,9 +71,7 @@
+ #endif
+
+ // initialize sys_pinfunc:
+- // disable second ethernet port (SYS_PF_NI2)
+- // set U3/GPIO23 to GPIO23 (SYS_PF_U3)
+- au_writel( SYS_PF_NI2 | SYS_PF_U3, SYS_PINFUNC );
++ au_writel( SYS_PF_NI2, SYS_PINFUNC );
+
+ // initialize GPIO
+ au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
diff --git a/openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch b/openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch
new file mode 100644
index 0000000000..9e54ac1c59
--- /dev/null
+++ b/openwrt/target/linux/au1000-2.6/patches/008-isdel_cardbus.patch
@@ -0,0 +1,63 @@
+diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c
+--- linux-2.6.16.7/arch/mips/au1000/mtx-1/board_setup.c 2006-04-23 14:39:21.000000000 +0200
++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/board_setup.c 2006-04-23 14:39:03.000000000 +0200
+@@ -44,6 +44,9 @@
+ #include <asm/pgtable.h>
+ #include <asm/mach-au1x00/au1000.h>
+
++extern int (*board_pci_idsel)(unsigned int devsel, int assert);
++int mtx1_pci_idsel(unsigned int devsel, int assert);
++
+ void board_reset (void)
+ {
+ /* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
+@@ -77,11 +80,37 @@
+ au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
+ au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF
+ au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF
++ au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
+ au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF
+
+ // enable LED and set it to green
+ au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR );
+ au_writel( 0x18000800, GPIO2_OUTPUT );
+
++ board_pci_idsel = mtx1_pci_idsel;
++
+ printk("4G Systems MTX-1 Board\n");
+ }
++
++int
++mtx1_pci_idsel(unsigned int devsel, int assert)
++{
++#define MTX_IDSEL_ONLY_0_AND_3 0
++#if MTX_IDSEL_ONLY_0_AND_3
++ if (devsel != 0 && devsel != 3) {
++ printk("*** not 0 or 3\n");
++ return 0;
++ }
++#endif
++
++ if (assert && devsel != 0) {
++ // supress signal to cardbus
++ au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF
++ }
++ else {
++ au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
++ }
++ au_sync_udelay(1);
++ return 1;
++}
++
+diff -urN linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c
+--- linux-2.6.16.7/arch/mips/au1000/mtx-1/irqmap.c 2006-04-23 14:40:54.000000000 +0200
++++ linux-2.6.16.7.new/arch/mips/au1000/mtx-1/irqmap.c 2006-04-23 14:40:12.000000000 +0200
+@@ -48,7 +48,7 @@
+ #include <asm/mach-au1x00/au1000.h>
+
+ char irq_tab_alchemy[][5] __initdata = {
+- [0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */
++ [0] = { -1, INTA, INTA, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */
+ [1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */
+ [2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */
+ [3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */