Cobalt NASRaq patches
Subsystems (3)
Hallo everybody,
Peter de Schrijver and I have been working on the support for the Cobalt NASRaq. The results are several patches, of which the first three are IMHO ready for inclusion into oss cvs (patches are short and self-explaining and should not have any side effects). These are:
- cobalt-2.4-20020908-2-galileo.diff
Small change in the code fragment distinguishing between "old" and "new" galileo chipsets). The old code did not take into account that there are systems with newer chip revisions than 0x10.
- cobalt-2.4-20020908-2-rootdev.diff
Allow setting the root device through a config option. The firmware of the MIPS-based Cobalt systems does not allow to pass commandline parameters to the kernel, so the root device has to be compiled in.
- cobalt-2.4-20020908-2-serial.diff
The NASRaq has an ST16C650 serial controller, which has some differences in the register set in comparison to the standard 16C550 which need to be handled.
Besides these, the tulip driver needs some patches, too. These are not yet ready for inclusion into cvs and will be submitted later.
Ralf, Maciej, could you please apply the appended patches?
Regards,
Karsten
Signature · 4 lines
#include <standard_disclaimer> Nach Paragraph 28 Abs. 3 Bundesdatenschutzgesetz widerspreche ich der Nutzung oder Uebermittlung meiner Daten fuer Werbezwecke oder fuer die Markt- oder Meinungsforschung.
arch/mips/cobalt/pci.c +20 -1
@@ -8,6 +8,9 @@* Copyright (C) 1995, 1996, 1997 by Ralf Baechle * Copyright (C) 2001 by Liam Davies ([email protected]) * +* 2002/09/08 changed qube_raq_galileo_fixup to handle newer Galileo revisions +* Peter de Schrijver <[email protected]>, +* Karsten Merker <[email protected]> */ #include <linux/config.h>
@@ -20,6 +23,8 @@#include <asm/pci.h> #include <asm/io.h> +#undef DEBUG +#ifdef CONFIG_PCI int cobalt_board_id;
@@ -204,6 +209,10 @@ {unsigned short galileo_id; +#ifdef DEBUG +printk ("pci.c: qube_raq_galileo_fixup: pci vendor id: %04x, pci device id: %04x\n" ,dev->vendor,dev->device); +#endif +/* Fix PCI latency-timer and cache-line-size values in Galileo * host bridge. */
@@ -219,7 +228,17 @@*/ pci_read_config_word (dev,PCI_REVISION_ID , &galileo_id); galileo_id &=0xff ;/* mask off class info */ -if (galileo_id ==0x10 ) { + +/* Originally the code checked only for existence of revision +* 0x10 (new Galileo) or 0x01/0x02 (old Galileo). At least in +* the NASRAQ there is a revision 0x11, which should probably +* be handled as new Galileo too, so we now check for +* galileo_id >= 0x10 instead of galileo_id == 0x10. +* Peter de Schrijver <[email protected]>, +* Karsten Merker <[email protected]>, 2002/09/08 +*/ + +if (galileo_id >=0x10 ) {/* New Galileo, assumes PCI stop line to VIA is connected. */ *((volatile unsigned int *)0xb4000c04 ) =0x00004020 ; }else if (galileo_id ==0x1 || galileo_id ==0x2 ) {
Documentation/Configure.help +9 -0
@@ -2336,6 +2336,15 @@ behaviour is platform-dependent, but normally the flash frequency is a hyperbolic function of the 5-minute load average. +Root device for the MIPS-based Cobalt systems +CONFIG_COBALT_MIPS_ROOTDEVICE + The firmware of the MIPS-based Cobalt systems does not allow to + specify a kernel command line, so it has to be compiled into the + kernel. This includes the root device to use, so you have to change + this option and recompile the kernel to use another root partition. + Please note that this option is overridden by CONFIG_ROOT_NFS, + which implies a "root=/dev/nfs rw". + Networking support CONFIG_NET Unless you really know what you are doing, you should say Y here.
arch/mips/cobalt/setup.c +13 -2
@@ -8,6 +8,14 @@* Copyright (C) 1996, 1997 by Ralf Baechle * Copyright (C) 2001 by Liam Davies ([email protected]) * +* 2002/09/08 added CONFIG_COBALT_MIPS_ROOTDEVICE option +* The Cobalt firmware does not allow to specify a kernel command +* line, so it has to be compiled into the kernel. Made the +* root device a config option so one does not always have to +* modify the sources to boot from another partition. +* Peter de Schrijver <[email protected]>, +* Karsten Merker <[email protected]> +* */ #include <linux/config.h>
@@ -34,6 +42,9 @@extern struct rtc_ops std_rtc_ops;extern struct ide_ops std_ide_ops; +#ifndef CONFIG_COBALT_MIPS_ROOTDEVICE +#define CONFIG_COBALT_MIPS_ROOTDEVICE "/dev/hda1" +#endif char arcs_cmdline[CL_SIZE ] = {"console=ttyS0,115200 "
@@ -41,9 +52,9 @@ "ip=on "#endif #ifdef CONFIG_ROOT_NFS -"root=/dev/nfs " +"root=/dev/nfs rw " #else - "root=/dev/hda1 " + "root=" CONFIG_COBALT_MIPS_ROOTDEVICE#endif };
arch/mips/config-shared.in +4 -0
@@ -584,6 +584,10 @@ bool ' ISA bus support' CONFIG_ISA fi +if [ "$CONFIG_MIPS_COBALT" = "y" ]; then + string 'Cobalt systems root device' CONFIG_COBALT_MIPS_ROOTDEVICE "/dev/hda1" +fi + bool 'Networking support' CONFIG_NET if [ "$CONFIG_PCI" != "y" ]; then
drivers/char/serial.c +21 -2
@@ -68,6 +68,14 @@* Kevin D. Kissell, [email protected] and Carsten Langgaard, * [email protected] * Copyright (C) 2000 MIPS Technologies, Inc. All rights reserved. +* +* 2002/09/08 fixed handling of the ST16C650 UART +* The ST16C650, which is used in the Cobalt NASRAQ, differs +* from the "normal" 16C550 regarding the FIFO handling and needs +* special treatment (e.g. FIFO trigger level bits are defined +* differently than for the 16C550). +* Peter de Schrijver <[email protected]>, Karsten Merker <[email protected]> +* */ static char *serial_version ="5.05c" ;
@@ -307,8 +315,15 @@ { "16550A", 16, UART_CLEAR_FIFO | UART_USE_FIFO }, { "cirrus", 1, 0 }, /* usurped by cyclades.c */ { "ST16650", 1, UART_CLEAR_FIFO | UART_STARTECH }, - { "ST16650V2", 32, UART_CLEAR_FIFO | UART_USE_FIFO | - UART_STARTECH }, + { "ST16650V2", 16, UART_CLEAR_FIFO | UART_USE_FIFO | + UART_STARTECH }, /* Although the datasheet indicates a 32byte +Tx FIFO size, the lowest possible trigger +level is 8 bytes, which effectively should +give us a 24 byte guaranteed FIFO. But +testing has indicated this doesn't work, +although it's unclear why. +Limiting the Tx FIFO size to 16bytes does +work. */ { "TI16750", 64, UART_CLEAR_FIFO | UART_USE_FIFO}, { "Startech", 1, 0}, /* usurped by cyclades.c */ { "16C950/954", 128, UART_CLEAR_FIFO | UART_USE_FIFO},
@@ -1753,6 +1768,10 @@ else if (info->state->type == PORT_RSA) fcr =UART_FCR_ENABLE_FIFO |UART_FCR_TRIGGER_14 ;#endif + else if (info->state->type == PORT_16650V2) { + fcr =UART_FCR_ENABLE_FIFO |UART_FCR6_R_TRIGGER_8 + |UART_FCR6_T_TRIGGER_8 ; + } else fcr =UART_FCR_ENABLE_FIFO |UART_FCR_TRIGGER_8 ; }