Make uart_getenv() not be ns8250 dependent. This will allow, in the future,

compilation of kernels without ns8250 support but using the uart framework.
These kernels will be for machines where size matters more, so including code
that can never be executed is undesriable...
This commit is contained in:
Warner Losh 2005-12-12 21:00:58 +00:00
parent cf9e56b04e
commit fbd68c4b4c
6 changed files with 5 additions and 1 deletions

View File

@ -95,6 +95,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
}
/* Check the environment. */
di->ops = uart_ns8250_ops;
if (uart_getenv(devtype, di) == 0)
return (0);

View File

@ -52,6 +52,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
unsigned int i, ivar;
/* Check the environment. */
di->ops = uart_ns8250_ops;
if (uart_getenv(devtype, di) == 0)
return (0);

View File

@ -52,6 +52,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
unsigned int i, ivar;
/* Check the environment. */
di->ops = uart_ns8250_ops;
if (uart_getenv(devtype, di) == 0)
return (0);

View File

@ -104,5 +104,6 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
}
/* Check the environment. */
di->ops = uart_ns8250_ops;
return (uart_getenv(devtype, di));
}

View File

@ -52,6 +52,7 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di)
unsigned int i, ivar, flags;
/* Check the environment. */
di->ops = uart_ns8250_ops;
if (uart_getenv(devtype, di) == 0)
return (0);

View File

@ -182,7 +182,6 @@ uart_getenv(int devtype, struct uart_devinfo *di)
return (ENXIO);
/* Set defaults. */
di->ops = uart_ns8250_ops;
di->bas.chan = 0;
di->bas.regshft = 0;
di->bas.rclk = 0;