diff options
| author | Anton Vorontsov <cbouatmailru@gmail.com> | 2010-10-01 10:23:24 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-10-22 13:20:08 -0400 |
| commit | 99793c660c811309ae4ca94cc9cf1c2f34940197 (patch) | |
| tree | f75092dd60f6186c4a8ff52e848ae40687c3c60c | |
| parent | 0d426eda7c94d864ead913f7099c623521368443 (diff) | |
altera_uart: Make it possible to use Altera UART and 8250 ports together
This fixes tty name, major and minor numbers. The major number
204 is used across many platform-specific serial drivers, so we
use that.
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Acked-by: Tobias Klauser <tklauser@distanz.ch>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| -rw-r--r-- | drivers/serial/altera_uart.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c index f1985aaf2cbc..fbc8f8e4ffaa 100644 --- a/drivers/serial/altera_uart.c +++ b/drivers/serial/altera_uart.c | |||
| @@ -28,6 +28,8 @@ | |||
| 28 | #include <linux/altera_uart.h> | 28 | #include <linux/altera_uart.h> |
| 29 | 29 | ||
| 30 | #define DRV_NAME "altera_uart" | 30 | #define DRV_NAME "altera_uart" |
| 31 | #define SERIAL_ALTERA_MAJOR 204 | ||
| 32 | #define SERIAL_ALTERA_MINOR 213 | ||
| 31 | 33 | ||
| 32 | /* | 34 | /* |
| 33 | * Altera UART register definitions according to the Nios UART datasheet: | 35 | * Altera UART register definitions according to the Nios UART datasheet: |
| @@ -471,7 +473,7 @@ static int __init altera_uart_console_setup(struct console *co, char *options) | |||
| 471 | static struct uart_driver altera_uart_driver; | 473 | static struct uart_driver altera_uart_driver; |
| 472 | 474 | ||
| 473 | static struct console altera_uart_console = { | 475 | static struct console altera_uart_console = { |
| 474 | .name = "ttyS", | 476 | .name = "ttyAL", |
| 475 | .write = altera_uart_console_write, | 477 | .write = altera_uart_console_write, |
| 476 | .device = uart_console_device, | 478 | .device = uart_console_device, |
| 477 | .setup = altera_uart_console_setup, | 479 | .setup = altera_uart_console_setup, |
| @@ -502,9 +504,9 @@ console_initcall(altera_uart_console_init); | |||
| 502 | static struct uart_driver altera_uart_driver = { | 504 | static struct uart_driver altera_uart_driver = { |
| 503 | .owner = THIS_MODULE, | 505 | .owner = THIS_MODULE, |
| 504 | .driver_name = DRV_NAME, | 506 | .driver_name = DRV_NAME, |
| 505 | .dev_name = "ttyS", | 507 | .dev_name = "ttyAL", |
| 506 | .major = TTY_MAJOR, | 508 | .major = SERIAL_ALTERA_MAJOR, |
| 507 | .minor = 64, | 509 | .minor = SERIAL_ALTERA_MINOR, |
| 508 | .nr = CONFIG_SERIAL_ALTERA_UART_MAXPORTS, | 510 | .nr = CONFIG_SERIAL_ALTERA_UART_MAXPORTS, |
| 509 | .cons = ALTERA_UART_CONSOLE, | 511 | .cons = ALTERA_UART_CONSOLE, |
| 510 | }; | 512 | }; |
| @@ -603,3 +605,4 @@ MODULE_DESCRIPTION("Altera UART driver"); | |||
| 603 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); | 605 | MODULE_AUTHOR("Thomas Chou <thomas@wytron.com.tw>"); |
| 604 | MODULE_LICENSE("GPL"); | 606 | MODULE_LICENSE("GPL"); |
| 605 | MODULE_ALIAS("platform:" DRV_NAME); | 607 | MODULE_ALIAS("platform:" DRV_NAME); |
| 608 | MODULE_ALIAS_CHARDEV_MAJOR(SERIAL_ALTERA_MAJOR); | ||
