r3015 - in trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27: config/mipsel debian debian/patches
Thiemo Seufer
ths-guest@costa.debian.org
Mon, 02 May 2005 22:51:05 +0000
Author: ths-guest
Date: 2005-05-02 22:51:02 +0000 (Mon, 02 May 2005)
New Revision: 3015
Added:
trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/12_cobalt-qube1-serial.dpatch
Modified:
trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/config/mipsel/r5k-cobalt
trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog
trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/00list
trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/10_cobalt-patch.dpatch
Log:
Update for sarge mips kernels.
Modified: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/config/mipsel/r5k-cobalt
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/config/mipsel/r5k-cobalt 2005-05-01 07:12:14 UTC (rev 3014)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/config/mipsel/r5k-cobalt 2005-05-02 22:51:02 UTC (rev 3015)
@@ -412,7 +412,7 @@
CONFIG_BLK_DEV_IDEDMA_PCI=y
# CONFIG_BLK_DEV_OFFBOARD is not set
# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
-CONFIG_IDEDMA_PCI_AUTO=y
+# CONFIG_IDEDMA_PCI_AUTO is not set
# CONFIG_IDEDMA_ONLYDISK is not set
CONFIG_BLK_DEV_IDEDMA=y
# CONFIG_IDEDMA_PCI_WIP is not set
@@ -445,7 +445,7 @@
# CONFIG_BLK_DEV_TRM290 is not set
CONFIG_BLK_DEV_VIA82CXXX=y
# CONFIG_IDE_CHIPSETS is not set
-CONFIG_IDEDMA_AUTO=y
+# CONFIG_IDEDMA_AUTO is not set
# CONFIG_IDEDMA_IVB is not set
# CONFIG_DMA_NONPCI is not set
# CONFIG_BLK_DEV_ATARAID is not set
Modified: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog 2005-05-01 07:12:14 UTC (rev 3014)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/changelog 2005-05-02 22:51:02 UTC (rev 3015)
@@ -1,3 +1,12 @@
+kernel-patch-2.4.27-mips (2.4.27-9.040815-2) UNRELEASED; urgency=low
+
+ * Fix crash for serial-less Cobalt Qube1, 12_cobalt-qube1-serial.dpatch.
+ * Fix Cobalt PCI initialization.
+ * Disable CONFIG_IDEDMA_PCI_AUTO, CONFIG_IDEDMA_AUTO again for Cobalt
+ because of crashes under I/O load.
+
+ -- Thiemo Seufer <ths@debian.org> Mon, 02 May 2005 20:44:40 +0200
+
kernel-patch-2.4.27-mips (2.4.27-9.040815-1) unstable; urgency=low
* Update to debian kernel source 2.4.27-9 for security fixes.
@@ -3,5 +12,5 @@
See kernel source changelog for details.
* Relicense the elf2ecoff manpage to GPL 2.
- * Fix broken ptrace patch (Closes #299204).
+ * Fix broken ptrace patch (Closes: #299204).
-- Thiemo Seufer <ths@debian.org> Wed, 26 Jan 2005 17:23:37 +0100
Modified: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/00list
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/00list 2005-05-01 07:12:14 UTC (rev 3014)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/00list 2005-05-02 22:51:02 UTC (rev 3015)
@@ -6,6 +6,7 @@
07_mips32-tlb.dpatch
10_cobalt-patch.dpatch
11_cobalt-tulip.dpatch
+12_cobalt-qube1-serial.dpatch
20_sb1-mipsrtc.dpatch
21_sb-duart.dpatch
22_swarm-pcmcia.dpatch
Modified: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/10_cobalt-patch.dpatch
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/10_cobalt-patch.dpatch 2005-05-01 07:12:14 UTC (rev 3014)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/10_cobalt-patch.dpatch 2005-05-02 22:51:02 UTC (rev 3015)
@@ -26,40 +26,34 @@
diff -urN linux.cvs/arch/mips/cobalt/pci.c linux.pdh/arch/mips/cobalt/pci.c
--- linux.cvs/arch/mips/cobalt/pci.c 2003-07-05 14:17:03.000000000 +0100
+++ linux.pdh/arch/mips/cobalt/pci.c 2004-04-11 16:27:59.000000000 +0100
-@@ -211,7 +211,14 @@
- pci_write_config_byte(dev, PCI_LATENCY_TIMER, 64);
- pci_write_config_byte(dev, PCI_CACHE_LINE_SIZE, 7);
-
-- /* On all machines prior to Q2, we had the STOP line disconnected
-+ /* The code described by the comment below has been removed
-+ * as it causes bus mastering by the Ethernet controllers
-+ * to break under any kind of network load. We always set
-+ * the retry timeouts to their maximum.
-+ *
-+ * --x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--x--
-+ *
-+ * On all machines prior to Q2, we had the STOP line disconnected
- * from Galileo to VIA on PCI. The new Galileo does not function
- * correctly unless we have it connected.
- *
-@@ -220,10 +227,16 @@
- */
- pci_read_config_word(dev, PCI_REVISION_ID, &galileo_id);
- galileo_id &= 0xff; /* mask off class info */
-+
-+ printk("Galileo ID: %u\n", galileo_id);
-+
-+#if 0
- if (galileo_id >= 0x10) {
- /* New Galileo, assumes PCI stop line to VIA is connected. */
- GALILEO_OUTL(0x4020, GT_PCI0_TOR_OFS);
-- } else if (galileo_id == 0x1 || galileo_id == 0x2) {
-+ } else if (galileo_id == 0x1 || galileo_id == 0x2)
-+#endif
-+ {
- signed int timeo;
+@@ -220,7 +227,14 @@
/* XXX WE MUST DO THIS ELSE GALILEO LOCKS UP! -DaveM */
timeo = GALILEO_INL(GT_PCI0_TOR_OFS);
+ /* Old Galileo, assumes PCI STOP line to VIA is disconnected. */
+- GALILEO_OUTL(0xffff, GT_PCI0_TOR_OFS);
++ GALILEO_OUTL(
++ (0xff << 16) | /* retry count */
++ (0xff << 8) | /* timeout 1 */
++ 0xff, /* timeout 0 */
++ GT_PCI0_TOR_OFS);
++
++ /* enable PCI retry exceeded interrupt */
++ GALILEO_OUTL(GALILEO_INTR_RETRY_CTR | GALILEO_INL(GT_INTRMASK_OFS), GT_INTRMASK_OFS);
+ }
+ }
+
+Index: linux/include/asm-mips/cobalt/cobalt.h
+===================================================================
+--- linux.orig/include/asm-mips/cobalt/cobalt.h 2005-04-10 13:16:12.000000000 +0100
++++ linux/include/asm-mips/cobalt/cobalt.h 2005-04-10 13:16:12.000000000 +0100
+@@ -89,6 +89,7 @@
+ #define GALILEO_OUTL(val, port) outl(val, GALILEO_REG(port))
+
+ #define GALILEO_T0EXP 0x0100
++#define GALILEO_INTR_RETRY_CTR (1 << 20)
+ #define GALILEO_ENTC0 0x01
+ #define GALILEO_SELTC0 0x02
+
diff -urN linux.cvs/arch/mips/cobalt/setup.c linux.pdh/arch/mips/cobalt/setup.c
--- linux.cvs/arch/mips/cobalt/setup.c 2003-07-05 14:17:03.000000000 +0100
+++ linux.pdh/arch/mips/cobalt/setup.c 2004-04-11 17:50:11.000000000 +0100
Added: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/12_cobalt-qube1-serial.dpatch
===================================================================
--- trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/12_cobalt-qube1-serial.dpatch 2005-05-01 07:12:14 UTC (rev 3014)
+++ trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/12_cobalt-qube1-serial.dpatch 2005-05-02 22:51:02 UTC (rev 3015)
@@ -0,0 +1,183 @@
+#! /bin/sh -e
+## 12_cobalt-qube1-serial.dpatch by Peter Horton <pdh@colonel-panic.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Add proper detection for serial console, this fixes a crash for
+## DP: Qube1 without serials.
+
+if [ $# -lt 1 ]; then
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"
+
+case "$1" in
+ -patch) patch -p1 ${patch_opts} < $0;;
+ -unpatch) patch -R -p1 ${patch_opts} < $0;;
+ *)
+ echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
+ exit 1;;
+esac
+
+exit 0
+
+Index: kernel-source-2.4.27/include/asm-mips/serial.h
+===================================================================
+--- kernel-source-2.4.27.orig/include/asm-mips/serial.h 2005-05-01 15:26:34.000000000 +0100
++++ kernel-source-2.4.27/include/asm-mips/serial.h 2005-05-01 15:56:02.000000000 +0100
+@@ -97,16 +97,6 @@
+ #define SEAD_SERIAL_PORT_DEFNS
+ #endif
+
+-#ifdef CONFIG_MIPS_COBALT
+-#include <asm/cobalt/cobalt.h>
+-#define COBALT_BASE_BAUD (18432000 / 16)
+-#define COBALT_SERIAL_PORT_DEFNS \
+- /* UART CLK PORT IRQ FLAGS */ \
+- { 0, COBALT_BASE_BAUD, 0xc800000, COBALT_SERIAL_IRQ, STD_COM_FLAGS }, /* ttyS0 */
+-#else
+-#define COBALT_SERIAL_PORT_DEFNS
+-#endif
+-
+ /*
+ * Both Galileo boards have the same UART mappings.
+ */
+@@ -452,7 +442,6 @@
+ #define SERIAL_PORT_DFNS \
+ ATLAS_SERIAL_PORT_DEFNS \
+ AU1000_SERIAL_PORT_DEFNS \
+- COBALT_SERIAL_PORT_DEFNS \
+ DDB5477_SERIAL_PORT_DEFNS \
+ EV96100_SERIAL_PORT_DEFNS \
+ EXTRA_SERIAL_PORT_DEFNS \
+Index: kernel-source-2.4.27/arch/mips/cobalt/setup.c
+===================================================================
+--- kernel-source-2.4.27.orig/arch/mips/cobalt/setup.c 2005-05-01 15:26:34.000000000 +0100
++++ kernel-source-2.4.27/arch/mips/cobalt/setup.c 2005-05-01 16:01:28.000000000 +0100
+@@ -16,6 +16,7 @@
+ #include <linux/mc146818rtc.h>
+ #include <linux/init.h>
+ #include <linux/ide.h>
++#include <linux/serial.h>
+
+ #include <asm/bootinfo.h>
+ #include <asm/time.h>
+@@ -24,6 +25,7 @@
+ #include <asm/processor.h>
+ #include <asm/reboot.h>
+ #include <asm/gt64120/gt64120.h>
++#include <asm/serial.h>
+
+ #include <asm/cobalt/cobalt.h>
+
+@@ -84,6 +86,32 @@
+ GALILEO_OUTL(0x100, GT_INTRMASK_OFS);
+ }
+
++static void __init cobalt_probe_unit(void)
++{
++ struct pci_dev dev;
++
++ /* Read the cobalt id register out of the PCI config space */
++ dev.devfn = PCI_DEVFN(COBALT_PCICONF_VIA, 0);
++ PCI_CFG_SET(&dev, (VIA_COBALT_BRD_ID_REG & ~0x3));
++ cobalt_board_id = GALILEO_INL(GT_PCI0_CFGDATA_OFS) >> ((VIA_COBALT_BRD_ID_REG & 3) * 8);
++ cobalt_board_id = VIA_COBALT_BRD_REG_to_ID(cobalt_board_id);
++
++ printk("Cobalt Board ID: %d\n", cobalt_board_id);
++}
++
++static void __init cobalt_console_setup(void)
++{
++ struct serial_struct cons;
++
++ memset(&cons, 0, sizeof(cons));
++ cons.irq = COBALT_SERIAL_IRQ;
++ cons.flags = STD_COM_FLAGS;
++ cons.io_type = SERIAL_IO_MEM;
++ cons.baud_base = 18432000 / 16;
++ cons.iomem_base = KSEG1ADDR(0x1c800000);
++
++ register_serial(&cons);
++}
+
+ void __init cobalt_setup(void)
+ {
+@@ -101,13 +129,20 @@
+
+ set_io_port_base(KSEG1ADDR(0x10000000));
+
+- /*
+- * This is a prom style console. We just poke at the
+- * UART to make it talk.
+- * Only use this console if you really screw up and can't
+- * get to the stage of setting up a real serial console.
+- */
+- /*ns16550_setup_console();*/
++ cobalt_probe_unit();
++
++ if (cobalt_board_id != COBALT_BRD_ID_QUBE1) {
++
++ /*
++ * This is a prom style console. We just poke at the
++ * UART to make it talk.
++ * Only use this console if you really screw up and can't
++ * get to the stage of setting up a real serial console.
++ */
++ /*ns16550_setup_console();*/
++
++ cobalt_console_setup();
++ }
+ }
+
+ #ifdef CONFIG_BLK_DEV_INITRD
+Index: kernel-source-2.4.27/arch/mips/cobalt/pci.c
+===================================================================
+--- kernel-source-2.4.27.orig/arch/mips/cobalt/pci.c 2005-05-01 12:43:42.000000000 +0100
++++ kernel-source-2.4.27/arch/mips/cobalt/pci.c 2005-05-01 15:54:44.000000000 +0100
+@@ -283,10 +283,6 @@
+ return -1; /* NOT ok device number */
+ }
+
+-#define PCI_CFG_SET(dev,where) \
+- GALILEO_OUTL((0x80000000 | (((dev)->devfn) << 8) | \
+- (where)), GT_PCI0_CFGADDR_OFS)
+-
+ static int qube_pci_read_config_dword (struct pci_dev *dev,
+ int where,
+ u32 *val)
+@@ -391,18 +387,8 @@
+
+ void __init pcibios_init(void)
+ {
+- struct pci_dev dev;
+-
+ printk("PCI: Probing PCI hardware\n");
+
+- /* Read the cobalt id register out of the PCI config space */
+- dev.devfn = PCI_DEVFN(COBALT_PCICONF_VIA, 0);
+- PCI_CFG_SET(&dev, (VIA_COBALT_BRD_ID_REG & ~0x3));
+- cobalt_board_id = GALILEO_INL(GT_PCI0_CFGDATA_OFS) >> ((VIA_COBALT_BRD_ID_REG & 3) * 8);
+- cobalt_board_id = VIA_COBALT_BRD_REG_to_ID(cobalt_board_id);
+-
+- printk("Cobalt Board ID: %d\n", cobalt_board_id);
+-
+ ioport_resource.start = 0x00000000;
+ ioport_resource.end = 0x0fffffff;
+
+Index: kernel-source-2.4.27/include/asm-mips/cobalt/cobalt.h
+===================================================================
+--- kernel-source-2.4.27.orig/include/asm-mips/cobalt/cobalt.h 2005-05-01 15:55:33.000000000 +0100
++++ kernel-source-2.4.27/include/asm-mips/cobalt/cobalt.h 2005-05-01 15:55:40.000000000 +0100
+@@ -93,4 +93,8 @@
+ #define GALILEO_ENTC0 0x01
+ #define GALILEO_SELTC0 0x02
+
++#define PCI_CFG_SET(dev,where) \
++ GALILEO_OUTL((0x80000000 | (((dev)->devfn) << 8) | \
++ (where)), GT_PCI0_CFGADDR_OFS)
++
+ #endif /* __ASM_MIPS_COBALT_H */
+
Property changes on: trunk/kernel-2.4/mips/kernel-patch-2.4.27-mips-2.4.27/debian/patches/12_cobalt-qube1-serial.dpatch
___________________________________________________________________
Name: svn:executable
+ *