Skip to contentSkip to conversation

PATCH:2.4:tx4927 updates (mostly minor)

PATCH Michael Pruznick 3 participants 5 messages Sep 9, 2003 – Sep 10, 2003 MIPS

lore
Share & tools
lore
#0 lore raw

Please apply the attached patch. I'll be making a 2.6 version as soon as I can get to it.

Summary:

Index: arch/mips/config-shared.in
dummy keyboard needed for some .configs

Index: arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c
Index: arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c added prom_getcmdline() and changed the default command line setup

Index: drivers/char/Config.in
put the tx stuff together and in sort order

Index: drivers/char/serial_txx9.c
fixed compile problem when CONFIG_SERIAL_TXX9_CONSOLE=n, fixed up some devfs issues, and changed the raw output routine a bit.

Index: arch/mips/config-shared.in
===================================================================
RCS file: /home/cvs/linux/arch/mips/Attic/config-shared.in,v retrieving revision 1.1.2.85

mips/config-shared.in +1 -0
diff -u -r1.1.2.85 config-shared.in
@@ -647,6 +647,7 @@
    define_bool CONFIG_SWAP_IO_SPACE_L y
    define_bool CONFIG_ISA y
    define_bool CONFIG_NONCOHERENT_IO y
+   define_bool CONFIG_DUMMY_KEYB y
 fi
 if [ "$CONFIG_VICTOR_MPC30X" = "y" ]; then
    define_bool CONFIG_IRQ_CPU y

Index: arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c,v retrieving revision 1.1.2.2

mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_prom.c +7 -6
diff -u -r1.1.2.2 toshiba_rbtx4927_prom.c
@@ -36,11 +36,7 @@
 #include <asm/cpu.h>
 #include <asm/tx4927/tx4927.h>
 
-#ifndef COMMAND_LINE_SIZE
-#define COMMAND_LINE_SIZE CL_SIZE
-#endif
-
-char arcs_cmdline[COMMAND_LINE_SIZE] = "console=ttyS0,38400 ip=any root=nfs rw";
+char arcs_cmdline[CL_SIZE] = "";
 
 void __init prom_init_cmdline(int argc, char **argv)
 {
@@ -63,7 +59,7 @@
 {
 	extern int tx4927_get_mem_size(void);
 	int msize;
-        char* toshiba_name_list[] = GROUP_TOSHIBA_NAMES;
+        const char* toshiba_name_list[] = GROUP_TOSHIBA_NAMES;
         extern char* toshiba_name;
 
 	prom_init_cmdline(argc, argv);
@@ -79,6 +75,11 @@
 
 	msize = tx4927_get_mem_size();
 	add_memory_region(0, msize << 20, BOOT_MEM_RAM);
+}
+
+char * __init prom_getcmdline(void)
+{
+	return &(arcs_cmdline[0]);
 }
 
 void __init prom_free_prom_memory(void)

Index: arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
===================================================================
RCS file: /home/cvs/linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c,v retrieving revision 1.1.2.5

mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c +44 -13

99 lines not on this page · raw message

Index: drivers/char/Config.in
===================================================================
RCS file: /home/cvs/linux/drivers/char/Attic/Config.in,v retrieving revision 1.72.2.34

char/Config.in +4 -6
diff -u -r1.72.2.34 Config.in
@@ -82,10 +82,12 @@
      fi
    fi
    if [ "$CONFIG_MIPS" = "y" ]; then
-      bool '  TX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
-      dep_bool '     Console on TX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
       bool '  TMPTX39XX/49XX serial port support' CONFIG_SERIAL_TXX9
       dep_bool '     Console on TMPTX39XX/49XX serial port' CONFIG_SERIAL_TXX9_CONSOLE $CONFIG_SERIAL_TXX9
+      bool '  TX3912/PR31700 serial port support' CONFIG_SERIAL_TX3912
+      dep_bool '     Console on TX3912/PR31700 serial port' CONFIG_SERIAL_TX3912_CONSOLE $CONFIG_SERIAL_TX3912
+      bool '  TXx927 SIO support' CONFIG_TXX927_SERIAL 
+      dep_bool '    TXx927 SIO Console support' CONFIG_TXX927_SERIAL_CONSOLE $CONFIG_TXX927_SERIAL
       if [ "$CONFIG_SOC_AU1X00" = "y" ]; then
 	 bool '  Enable Au1x00 UART Support' CONFIG_AU1X00_UART
 	 if [ "$CONFIG_AU1X00_UART" = "y" ]; then
@@ -100,10 +102,6 @@
 		 define_bool CONFIG_AU1X00_USB_DEVICE y
 	    fi
       fi
-      bool '  TXx927 SIO support' CONFIG_TXX927_SERIAL 
-      if [ "$CONFIG_TXX927_SERIAL" = "y" ]; then
-         bool '    TXx927 SIO Console support' CONFIG_TXX927_SERIAL_CONSOLE  
-      fi                             
       if [ "$CONFIG_SIBYTE_SB1xxx_SOC" = "y" ]; then
          bool '  Support for BCM1xxx onchip DUART' CONFIG_SIBYTE_SB1250_DUART
          if [ "$CONFIG_SIBYTE_SB1250_DUART" = "y" ]; then

Index: drivers/char/serial_txx9.c
===================================================================
RCS file: /home/cvs/linux/drivers/char/serial_txx9.c,v retrieving revision 1.1.2.1

char/serial_txx9.c +27 -2
diff -u -r1.1.2.1 serial_txx9.c
@@ -52,6 +52,7 @@
 #ifdef CONFIG_SERIAL
 /* "ttyS","cua" is used for standard serial driver */
 #define TXX9_TTY_NAME "ttyTX"
+#define TXX9_TTY_DEVFS_NAME_SHORT "tts/TX"
 #define TXX9_TTY_DEVFS_NAME "tts/TX%d"
 #define TXX9_TTY_MINOR_START	(64 + 64)	/* ttyTX0(128), ttyTX1(129) */
 #define TXX9_CU_NAME "cuatx"
@@ -59,6 +60,7 @@
 #else
 /* acts like standard serial driver */
 #define TXX9_TTY_NAME "ttyS"
+#define TXX9_TTY_DEVFS_NAME_SHORT "tts/"
 #define TXX9_TTY_DEVFS_NAME "tts/%d"
 #define TXX9_TTY_MINOR_START	64
 #define TXX9_CU_NAME "cua"
@@ -1248,7 +1250,12 @@
 {
 	unsigned long flags;
 
-	if (port - &rs_ports[0] != sercons.index) {
+#ifdef CONFIG_SERIAL_TXX9_CONSOLE
+#define EXPR_1 port - &rs_ports[0] != sercons.index
+#else
+#define EXPR_1 1
+#endif
+	if (EXPR_1) {
 		local_irq_save(flags);
 		/*
 		 * Reset the UART.
@@ -1311,9 +1318,15 @@
 
 	txx9_config(port);
 
+#if defined(CONFIG_DEVFS_FS)
+	printk(KERN_INFO
+		"%s%d at 0x%08lx (irq = %d) is a TX39/49 SIO\n",
+		TXX9_TTY_DEVFS_NAME_SHORT, i, port->base, port->irq);
+#else
 	printk(KERN_INFO
 		"%s%d at 0x%08lx (irq = %d) is a TX39/49 SIO\n",
 		TXX9_TTY_NAME, i, port->base, port->irq);
+#endif
 	return 0;
 }
 
@@ -1395,9 +1408,15 @@
 				continue;
 		}
 		txx9_config(port);
+#if defined(CONFIG_DEVFS_FS)
+		printk(KERN_INFO
+		       "%s%d at 0x%08lx (irq = %d) is a TX39/49 SIO\n",
+		       TXX9_TTY_DEVFS_NAME_SHORT, i, port->base, port->irq);
+#else
 		printk(KERN_INFO
 		       "%s%d at 0x%08lx (irq = %d) is a TX39/49 SIO\n",
 		       TXX9_TTY_NAME, i, port->base, port->irq);
+#endif
 	}
 
 	/* Note: I didn't do anything to enable the second UART */
@@ -1637,7 +1656,11 @@
 }
 
 static struct console sercons = {
+#if defined(CONFIG_DEVFS_FS)
+	name:		TXX9_TTY_DEVFS_NAME_SHORT,
+#else
 	name:		TXX9_TTY_NAME,
+#endif
 	write:		serial_console_write,
 	device:		serial_console_device,
 	setup:		serial_console_setup,
@@ -1754,7 +1777,8 @@
 /* END: KDBG Routines                                                         */
 /******************************************************************************/
 
-void txx9_raw_output(char c)
+#if defined(CONFIG_RAW_PRINTK_OUTPUT) && defined(CONFIG_SERIAL_TXX9_CONSOLE)
+void emit_log_char(char c)
 {
 	struct rs_port *port = &rs_ports[0];
 	if ( c == '\n' )
@@ -1766,3 +1790,4 @@
 	wait_for_xmitr(port);
 	return;
 }
+#endif
#1 lore raw

Hi Michael.

May I ask why you are using 38400 for the baud rate and not the maximum 57600?

-Steve

#2 lore raw
Quoted 4 lines · Steven J. Hill

Hi Michael.

May I ask why you are using 38400 for the baud rate and not the maximum 57600?

His patch removes the hardwired options - good thing - but anyway, I still think shipping anything but 9600 8N1 as default is wrong in most cases - there are still plenty of terminal servers and ancient hardware terminals in use that just don't support anything else or anything faster.

Ralf

#4 lore raw
In reply to Steven J. Hill
Quoted 2 lines

May I ask why you are using 38400 for the baud rate and not the maximum 57600?

The PMON f/w I use on my boards defaults to 38400. Makes my life easier if the kernel and firmware default to the same baud rate. Especially, since I need to reload the f/w often to switch between LE and BE. NOTE: without the console= override, the driver defaults to 9600.

#3 lore raw
In reply to Ralf Baechle
Quoted 4 lines

His patch removes the hardwired options - good thing - but anyway, I still think shipping anything but 9600 8N1 as default is wrong in most cases - there are still plenty of terminal servers and ancient hardware terminals in use that just don't support anything else or anything faster.

Since the board's f/w defaults to 38400, you'll need a termal faster than 9600 anyway. I think this is one of the cases were the 9600 default makes sense for the driver, but it also makes sense for the board to override it.