]> git.sur5r.net Git - u-boot/blobdiff - arch/powerpc/cpu/mpc512x/serial.c
arm: mach-omap2: Generate MLO file from SD boot capable targets
[u-boot] / arch / powerpc / cpu / mpc512x / serial.c
index 42e0dc96f7502f236703107dc350741e69959df9..ac77ddcf4da0a939ac1ee306e14dad52552ec871 100644 (file)
@@ -203,18 +203,6 @@ void serial_putc_dev(unsigned int idx, const char c)
        out_8(&psc->tfdata_8, c);
 }
 
-void serial_putc_raw_dev(unsigned int idx, const char c)
-{
-       volatile immap_t *im = (immap_t *) CONFIG_SYS_IMMR;
-       volatile psc512x_t *psc = (psc512x_t *) &im->psc[idx];
-
-       /* Wait for last character to go. */
-       while (!(in_be16(&psc->psc_status) & PSC_SR_TXEMP))
-               ;
-
-       out_8(&psc->tfdata_8, c);
-}
-
 void serial_puts_dev(unsigned int idx, const char *s)
 {
        while (*s)
@@ -384,7 +372,7 @@ struct stdio_dev *open_port(int num, int baudrate)
                sprintf(env_val, "%d", baudrate);
                setenv(env_var, env_val);
 
-               if (port->start())
+               if (port->start(port))
                        return NULL;
 
                set_bit(num, &initialized);
@@ -407,7 +395,7 @@ int close_port(int num)
        if (!port)
                return -1;
 
-       ret = port->stop();
+       ret = port->stop(port);
        clear_bit(num, &initialized);
 
        return ret;
@@ -418,7 +406,7 @@ int write_port(struct stdio_dev *port, char *buf)
        if (!port || !buf)
                return -1;
 
-       port->puts(buf);
+       port->puts(port, buf);
 
        return 0;
 }
@@ -433,8 +421,8 @@ int read_port(struct stdio_dev *port, char *buf, int size)
        if (!size)
                return 0;
 
-       while (port->tstc()) {
-               buf[cnt++] = port->getc();
+       while (port->tstc(port)) {
+               buf[cnt++] = port->getc(port);
                if (cnt > size)
                        break;
        }