diff -Naur linux-2.6.25.maxim/drivers/serial/atmel_serial.c linux-2.6.25.at91-20080908/drivers/serial/atmel_serial.c
--- linux-2.6.25.maxim/drivers/serial/atmel_serial.c	2008-04-16 21:49:44.000000000 -0500
+++ linux-2.6.25.at91-20080908/drivers/serial/atmel_serial.c	2008-09-03 16:58:59.000000000 -0500
@@ -1539,6 +1539,22 @@
 	return ret;
 }
 
+/**
+ * function to set a port to auto485 toggle mode
+ */
+int atmel_auto485(struct uart_port *port,int fos){
+	unsigned int mode = UART_GET_MR(port);
+
+	if (fos == 2)
+		return (((mode & ATMEL_US_USMODE_RS485) != 0)); /* return status */
+
+	mode = (fos ? (mode | ATMEL_US_USMODE_RS485) : (mode & (~ATMEL_US_USMODE_RS485)));
+
+	/* set to new mode */
+	UART_PUT_MR(port, mode);
+	return fos;
+}
+
 static struct platform_driver atmel_serial_driver = {
 	.probe		= atmel_serial_probe,
 	.remove		= __devexit_p(atmel_serial_remove),
diff -Naur linux-2.6.25.maxim/include/asm-arm/mach/serial_at91.h linux-2.6.25.at91-20080908/include/asm-arm/mach/serial_at91.h
--- linux-2.6.25.maxim/include/asm-arm/mach/serial_at91.h	2008-04-16 21:49:44.000000000 -0500
+++ linux-2.6.25.at91-20080908/include/asm-arm/mach/serial_at91.h	2008-09-03 16:58:59.000000000 -0500
@@ -26,8 +26,10 @@
 
 #if defined(CONFIG_SERIAL_ATMEL)
 void atmel_register_uart_fns(struct atmel_port_fns *fns);
+int atmel_auto485(struct uart_port *port,int fos);
 #else
 #define atmel_register_uart_fns(fns) do { } while (0)
+#define atmel_auto485(port,fos) do { } while (0)
 #endif
 
 
