[PATCH] yosemite serial support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

the patch below adds support for the second serial
port on the PMC-Sierra Yosemite board.

tk

--- linux-mips/arch/mips/pmc-sierra/yosemite/setup.c    2004-07-20 11:43:44.000000000 +0200
+++ linux-mips-work/arch/mips/pmc-sierra/yosemite/setup.c       2004-08-06 18:30:55.518022384 +0200
@@ -156,11 +156,13 @@
 #define TITAN_UART_CLK         3686400
 #define TITAN_SERIAL_BASE_BAUD (TITAN_UART_CLK / 16)
 #define TITAN_SERIAL_IRQ       4
-#define TITAN_SERIAL_BASE      0xfd000008UL
+#define TITAN_SERIAL_BASE      0xfd000000UL
+#define TITAN_SERIAL_REG_SIZE  8

 static void __init py_map_ocd(void)
 {
-        struct uart_port up;
+       struct uart_port up;
+       static const char serr[] = KERN_ERR "Early serial init of port %u failed\n";

        /*
         * Not specifically interrupt stuff but in case of SMP core_send_ipi
@@ -171,20 +173,26 @@
                panic("Mapping OCD failed - game over.  Your score is 0.");

        /*
-        * Register to interrupt zero because we share the interrupt with
-        * the serial driver which we don't properly support yet.
+        * Set up serial port #1. Do not use autodetection; the result is
+        * not what we want.
         */
        memset(&up, 0, sizeof(up));
-       up.membase      = (unsigned char *) ioremap(TITAN_SERIAL_BASE, 8);
+       up.membase      = (unsigned char *) ioremap(TITAN_SERIAL_BASE, TITAN_SERIAL_REG_SIZE * 2);
        up.irq          = TITAN_SERIAL_IRQ;
        up.uartclk      = TITAN_UART_CLK;
        up.regshift     = 0;
        up.iotype       = UPIO_MEM;
-       up.flags        = ASYNC_BOOT_AUTOCONF | ASYNC_SKIP_TEST;
-       up.line         = 0;
+       up.flags        = UPF_SHARE_IRQ;
+       up.line         = 1;
+       up.type         = PORT_16550A;
+       if (!up.membase || early_serial_setup(&up))
+               printk(serr, up.line);

+       /* And now for port #0. */
+       up.membase      += TITAN_SERIAL_REG_SIZE;
+       up.line         = 0;
        if (early_serial_setup(&up))
-               printk(KERN_ERR "Early serial init of port 0 failed\n");
+               printk(serr, up.line);
 }

 static int __init pmc_yosemite_setup(void)

-- 
--------------------------------------------------

Thomas Koeller, Software Development
Basler Vision Technologies

thomas dot koeller at baslerweb dot com
http://www.baslerweb.com

==============================


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux