⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 1003.uart.patch

📁 sm86xx内核源包括补丁( GPL )的
💻 PATCH
📖 第 1 页 / 共 2 页
字号:
+#else 	serial_outp(info, UART_DLL, scratch3); 	serial_outp(info, UART_DLM, scratch4);+#endif /* CONFIG_TANGO2 */ 	serial_outp(info, UART_LCR, 0); 	/* 	 * We distinguish between the '654 and the '650 by counting@@ -4604,7 +4742,7 @@ 	 * Iterate through all of the ports finding those that belong 	 * to this PCI device. 	 */-	for(i = 0; i < NR_PORTS; i++) {+	for(i = 0; i < serial_nr_ports; i++) { 		if (rs_table[i].dev != dev) 			continue; 		unregister_serial(i);@@ -5294,7 +5432,7 @@ 	struct isapnp_irq *irq; 	struct isapnp_resources *res = dev->sysdata; -	for (i = 0; i < NR_PORTS; i++) {+	for (i = 0; i < serial_nr_ports; i++) { 		if (state->type != PORT_UNKNOWN) 			clear_bit(state->irq, &map); 		state++;@@ -5454,12 +5592,21 @@ 	 *	can't be shared. 	 */ 	if (sercons.flags & CON_CONSDEV) {-		for(i = 0; i < NR_PORTS; i++)+		for(i = 0; i < serial_nr_ports; i++) 			if (i != sercons.index && 			    rs_table[i].irq == rs_table[sercons.index].irq) 				rs_table[i].irq = 0; 	} #endif++#ifdef CONFIG_TANGO2+#if defined(CONFIG_TANGO2_SIG_BLOCK) || defined(CONFIG_TANGO2_XENV)+	for (i = 0; i < serial_nr_ports; i++)+		rs_table[i].baud_base = +			(rs_table[i].iomem_base == (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base))+				? em8xxx_baudrates[1] : em8xxx_baudrates[0];+#endif+#endif 	show_serial_version();  	/* Initialize the tty_driver structure */@@ -5477,7 +5624,7 @@ 	serial_driver.major = TTY_MAJOR; 	serial_driver.minor_start = 64 + SERIAL_DEV_OFFSET; 	serial_driver.name_base = SERIAL_DEV_OFFSET;-	serial_driver.num = NR_PORTS;+	serial_driver.num = serial_nr_ports; 	serial_driver.type = TTY_DRIVER_TYPE_SERIAL; 	serial_driver.subtype = SERIAL_TYPE_NORMAL; 	serial_driver.init_termios = tty_std_termios;@@ -5535,7 +5682,7 @@ 	if (tty_register_driver(&callout_driver)) 		panic("Couldn't register callout driver\n"); 	-	for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {+	for (i = 0, state = rs_table; i < serial_nr_ports; i++,state++) { 		state->magic = SSTATE_MAGIC; 		state->line = i; 		state->type = PORT_UNKNOWN;@@ -5561,7 +5708,7 @@ 		if (state->flags & ASYNC_BOOT_AUTOCONF) 			autoconfig(state); 	}-	for (i = 0, state = rs_table; i < NR_PORTS; i++,state++) {+	for (i = 0, state = rs_table; i < serial_nr_ports; i++,state++) { 		if (state->type == PORT_UNKNOWN) 			continue; 		if (   (state->flags & ASYNC_BOOT_AUTOCONF)@@ -5658,26 +5805,26 @@ 		port += (unsigned long) req->port_high << HIGH_BITS_OFFSET;  	save_flags(flags); cli();-	for (i = 0; i < NR_PORTS; i++) {+	for (i = 0; i < serial_nr_ports; i++) { 		if ((rs_table[i].port == port) && 		    (rs_table[i].iomem_base == req->iomem_base)) 			break; 	} #ifdef __i386__-	if (i == NR_PORTS) {-		for (i = 4; i < NR_PORTS; i++)+	if (i == serial_nr_ports) {+		for (i = 4; i < serial_nr_ports; i++) 			if ((rs_table[i].type == PORT_UNKNOWN) && 			    (rs_table[i].count == 0)) 				break; 	} #endif-	if (i == NR_PORTS) {-		for (i = 0; i < NR_PORTS; i++)+	if (i == serial_nr_ports) {+		for (i = 0; i < serial_nr_ports; i++) 			if ((rs_table[i].type == PORT_UNKNOWN) && 			    (rs_table[i].count == 0)) 				break; 	}-	if (i == NR_PORTS) {+	if (i == serial_nr_ports) { 		restore_flags(flags); 		return -1; 	}@@ -5774,7 +5921,7 @@ 		       e2); 	restore_flags(flags); -	for (i = 0; i < NR_PORTS; i++) {+	for (i = 0; i < serial_nr_ports; i++) { 		if ((info = rs_table[i].info)) { 			rs_table[i].info = NULL; 			kfree(info);@@ -5921,7 +6068,11 @@ 	static struct async_struct *info; 	struct serial_state *state; 	unsigned cval;+#if defined(CONFIG_TANGO2_SIG_BLOCK) || defined(CONFIG_TANGO2_XENV)+	int	baud = em8xxx_baudrates[xenv_uart_console_port];+#else 	int	baud = 9600;+#endif 	int	bits = 8; 	int	parity = 'n'; 	int	doflow = 0;@@ -5996,6 +6147,13 @@ 	 *	Divisor, bytesize and parity 	 */ 	state = rs_table + co->index;++#ifdef CONFIG_TANGO2+#if defined(CONFIG_TANGO2_SIG_BLOCK) || defined(CONFIG_TANGO2_XENV)+	if (em8xxx_baudrates[xenv_uart_console_port] != 0)+		state->baud_base = em8xxx_baudrates[xenv_uart_console_port];+#endif+#endif 	if (doflow) 		state->flags |= ASYNC_CONS_FLOW; 	info = &async_sercons;@@ -6026,8 +6184,15 @@ 	 *	and set speed. 	 */ 	serial_out(info, UART_LCR, cval | UART_LCR_DLAB);	/* set DLAB */+#ifdef CONFIG_TANGO2+#if !defined(CONFIG_TANGO2_XENV)+	serial_out(info, UART_GPIOMODE, 0xff00);+#endif+	serial_out(info, UART_DL, quot);+#else 	serial_out(info, UART_DLL, quot & 0xff);	/* LS of divisor */ 	serial_out(info, UART_DLM, quot >> 8);		/* MS of divisor */+#endif /* CONFIG_TANGO2 */ 	serial_out(info, UART_LCR, cval);		/* reset DLAB */ 	serial_out(info, UART_IER, 0); 	serial_out(info, UART_MCR, UART_MCR_DTR | UART_MCR_RTS);diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/include/asm-mips/serial.h linuxmips-2.4.30/include/asm-mips/serial.h--- linuxmips-2.4.30.ref/include/asm-mips/serial.h	2004-08-19 15:33:33.000000000 -0700+++ linuxmips-2.4.30/include/asm-mips/serial.h	2007-02-28 15:29:24.000000000 -0800@@ -87,6 +87,129 @@ #define ATLAS_SERIAL_PORT_DEFNS #endif +#ifdef CONFIG_TANGO2+#include <asm/tango2/tango2.h>+#ifdef CONFIG_TANGO2_SMP863X+#if defined(CONFIG_TANGO2_XENV)+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 			       \+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART0_INT,           \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       \+          .io_type = SERIAL_IO_MEM }, \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART1_INT,            \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	  .iomem_reg_shift = 2,       \+          .io_type = SERIAL_IO_MEM },+#else+#if CONFIG_SERIAL_TANGO2_UARTNR == 1	/* Use UART0 or UART1 */+#ifdef CONFIG_SERIAL_TANGO2_SWAPPORT	/* UART1 */	+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART1_INT,            \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	   .iomem_reg_shift = 2,       					\+          .io_type = SERIAL_IO_MEM },	+#else /* UART0 */+#define TANGO2_SERIAL_PORT_DEFNS                                \+	{ .baud_base = TANGO2_BASE_BAUD, 			\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART0_INT,    \+          .flags = STD_COM_FLAGS,                               \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       				\+          .io_type = SERIAL_IO_MEM }, +#endif+#else /* Use 2 ports */+#ifdef CONFIG_SERIAL_TANGO2_SWAPPORT	/* UART1, UART0 */+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART1_INT,            \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	  .iomem_reg_shift = 2,       					\+          .io_type = SERIAL_IO_MEM },					\+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART0_INT ,           \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       					\+          .io_type = SERIAL_IO_MEM }, +#else /* UART0, UART1 */+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 			       \+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART0_INT,           \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       \+          .io_type = SERIAL_IO_MEM }, \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART1_INT,            \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	  .iomem_reg_shift = 2,       \+          .io_type = SERIAL_IO_MEM },+#endif /* CONFIG_SERIAL_TANGO2_SWAPPPORT */+#endif /* CONFIG_SERIAL_TANGO2_UARTNR == 1 */+#endif /* CONFIG_TANGO2_XENV */+#elif defined(CONFIG_QUICKTURN) +#if CONFIG_SERIAL_TANGO2_UARTNR == 1	/* Use UART0 or UART1 */+#ifdef CONFIG_SERIAL_TANGO2_SWAPPORT	/* UART1 */	+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = 0, 							\+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	   .iomem_reg_shift = 2,       					\+          .io_type = SERIAL_IO_MEM },	+#else /* UART0 */+#define TANGO2_SERIAL_PORT_DEFNS                                \+	{ .baud_base = TANGO2_BASE_BAUD, 			\+	  .irq = 0,						\+          .flags = STD_COM_FLAGS,                               \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       				\+          .io_type = SERIAL_IO_MEM }, +#endif+#else /* Use 2 ports */+#ifdef CONFIG_SERIAL_TANGO2_SWAPPORT	/* UART1, UART0 */+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = 0,							\+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	  .iomem_reg_shift = 2,       					\+          .io_type = SERIAL_IO_MEM },					\+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART0_INT ,           \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       					\+          .io_type = SERIAL_IO_MEM }, +#else /* UART0, UART1 */+#define TANGO2_SERIAL_PORT_DEFNS                                       \+	{ .baud_base = TANGO2_BASE_BAUD, 			       \+	  .irq = 0,							\+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART0_base), \+	  .iomem_reg_shift = 2,       \+          .io_type = SERIAL_IO_MEM }, \+	{ .baud_base = TANGO2_BASE_BAUD, 				\+	  .irq = IRQ_CONTROLLER_IRQ_BASE+LOG2_CPU_UART1_INT,            \+          .flags = STD_COM_FLAGS,                                      \+          .iomem_base = (unsigned char *)(REG_BASE_cpu_block+CPU_UART1_base), \+	  .iomem_reg_shift = 2,       \+          .io_type = SERIAL_IO_MEM },+#endif /* CONFIG_SERIAL_TANGO2_SWAPPPORT */+#endif /* CONFIG_SERIAL_TANGO2_UARTNR == 1 */+#else /* !CONFIG_TANGO2_SMP863X && !CONFIG_QUICKTURN */+#define TANGO2_SERIAL_PORT_DEFNS+#endif+#endif+ #ifdef CONFIG_MIPS_SEAD #include <asm/mips-boards/sead.h> #include <asm/mips-boards/seadint.h>@@ -469,6 +592,7 @@  #define SERIAL_PORT_DFNS			\ 	ATLAS_SERIAL_PORT_DEFNS			\+	TANGO2_SERIAL_PORT_DEFNS                \ 	AU1000_SERIAL_PORT_DEFNS		\ 	COBALT_SERIAL_PORT_DEFNS		\ 	DDB5477_SERIAL_PORT_DEFNS		\diff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/include/linux/serial_reg.h linuxmips-2.4.30/include/linux/serial_reg.h--- linuxmips-2.4.30.ref/include/linux/serial_reg.h	2001-06-13 21:24:27.000000000 -0700+++ linuxmips-2.4.30/include/linux/serial_reg.h	2007-02-28 15:29:25.000000000 -0800@@ -13,7 +13,29 @@  #ifndef _LINUX_SERIAL_REG_H #define _LINUX_SERIAL_REG_H+ +#ifdef CONFIG_TANGO2+// mapping of Tango2 uart is close but not identical to regular ones+#define UART_RX        0+#define UART_TX        1+#define UART_IER       2+#define UART_IIR       3+#define UART_FCR       4+#define UART_LCR       5+#define UART_MCR       6+#define UART_LSR       7+#define UART_MSR       8+#define UART_SCR       9+#define UART_DL        10++#define UART_GPIOMODE  14++// ?+#define UART_TRG       0+#define UART_FCTR      1+#define UART_EFR       2 +#else /* !CONFIG_TANGO2 */ #define UART_RX		0	/* In:  Receive buffer (DLAB=0) */ #define UART_TX		0	/* Out: Transmit buffer (DLAB=0) */ #define UART_DLL	0	/* Out: Divisor Latch Low (DLAB=1) */@@ -40,6 +62,7 @@ #define UART_EMSR	7	/* (LCR=BF) Extended Mode Select Register  				 * FCTR bit 6 selects SCR or EMSR 				 * XR16c85x only */+#endif /* CONFIG_TANGO2 */  /*  * These are the definitions for the FIFO Control Registerdiff -Naur --exclude=CVS --exclude='*.o' --exclude='*.a' --exclude='*.so' --exclude='*.elf' --exclude=System.map --exclude=Makefile.d --exclude='*log' --exclude='*log2' --exclude='*~' --exclude='.*~' --exclude='.#*' --exclude='*.bak' --exclude='*.orig' --exclude='*.rej' --exclude='core.[0-9]*' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=.depend --exclude='.*.o.flags' --exclude='*.gz' --exclude=vmlinux --exclude=vmlinux.bin --exclude=yamon-02.06-SIGMADESIGNS-01_el.bin linuxmips-2.4.30.ref/README.1003.uart.patch linuxmips-2.4.30/README.1003.uart.patch--- linuxmips-2.4.30.ref/README.1003.uart.patch	1969-12-31 16:00:00.000000000 -0800+++ linuxmips-2.4.30/README.1003.uart.patch	2007-02-28 16:00:25.000000000 -0800@@ -0,0 +1,19 @@+Feature:+--------+UART driver for SMP863x.++Prerequisite patch numbers:+---------------------------+0000+1000++Primary author:+---------------+Emmanuel Michon/YH Lin++Related to which chip version SMP863x x=?+-----------------------------------------+all++(linux patches) which CONFIG_... are provided:+----------------------------------------------

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -