aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/mpc52xx_uart.c
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2006-01-06 03:11:32 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:30 -0500
commitd62de3aa8ac762c09845aa38634a845da55f31dc (patch)
tree22cb364644ecdacb2fe678b93ae0f446932cc971 /drivers/serial/mpc52xx_uart.c
parent2d8179c0b77b54e27321944e16f65defeda81e27 (diff)
[PATCH] ppc32/serial: Change mpc52xx_uart.c to use the Low Density Serial port major
Before this patch we were just using the "classic" /dev/ttySx devices. However when another on the system is loaded that uses those (like drivers for serial PCMCIA), that creates a conflict for the minors. Therefore, we now use /dev/ttyPSC[0:5] (note the 0-based numbering !) with some minors we've been assigned in the "Low Density Serial port major" Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/serial/mpc52xx_uart.c')
-rw-r--r--drivers/serial/mpc52xx_uart.c26
1 files changed, 15 insertions, 11 deletions
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c
index 4dcf0310bef5..1288d6203e94 100644
--- a/drivers/serial/mpc52xx_uart.c
+++ b/drivers/serial/mpc52xx_uart.c
@@ -37,11 +37,11 @@
37 * by the bootloader or in the platform init code. 37 * by the bootloader or in the platform init code.
38 * 38 *
39 * The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2, 39 * The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
40 * and so on). So the PSC1 is mapped to /dev/ttyS0, PSC2 to /dev/ttyS1 and so 40 * and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
41 * on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly for 41 * so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
42 * the console code : without this 1:1 mapping, at early boot time, when we are 42 * fpr the console code : without this 1:1 mapping, at early boot time, when we
43 * parsing the kernel args console=ttyS?, we wouldn't know wich PSC it will be 43 * are parsing the kernel args console=ttyPSC?, we wouldn't know wich PSC it
44 * mapped to. 44 * will be mapped to.
45 */ 45 */
46 46
47#include <linux/config.h> 47#include <linux/config.h>
@@ -65,6 +65,10 @@
65#include <linux/serial_core.h> 65#include <linux/serial_core.h>
66 66
67 67
68/* We've been assigned a range on the "Low-density serial ports" major */
69#define SERIAL_PSC_MAJOR 204
70#define SERIAL_PSC_MINOR 148
71
68 72
69#define ISR_PASS_LIMIT 256 /* Max number of iteration in the interrupt */ 73#define ISR_PASS_LIMIT 256 /* Max number of iteration in the interrupt */
70 74
@@ -671,12 +675,12 @@ mpc52xx_console_setup(struct console *co, char *options)
671static struct uart_driver mpc52xx_uart_driver; 675static struct uart_driver mpc52xx_uart_driver;
672 676
673static struct console mpc52xx_console = { 677static struct console mpc52xx_console = {
674 .name = "ttyS", 678 .name = "ttyPSC",
675 .write = mpc52xx_console_write, 679 .write = mpc52xx_console_write,
676 .device = uart_console_device, 680 .device = uart_console_device,
677 .setup = mpc52xx_console_setup, 681 .setup = mpc52xx_console_setup,
678 .flags = CON_PRINTBUFFER, 682 .flags = CON_PRINTBUFFER,
679 .index = -1, /* Specified on the cmdline (e.g. console=ttyS0 ) */ 683 .index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0 ) */
680 .data = &mpc52xx_uart_driver, 684 .data = &mpc52xx_uart_driver,
681}; 685};
682 686
@@ -703,10 +707,10 @@ console_initcall(mpc52xx_console_init);
703static struct uart_driver mpc52xx_uart_driver = { 707static struct uart_driver mpc52xx_uart_driver = {
704 .owner = THIS_MODULE, 708 .owner = THIS_MODULE,
705 .driver_name = "mpc52xx_psc_uart", 709 .driver_name = "mpc52xx_psc_uart",
706 .dev_name = "ttyS", 710 .dev_name = "ttyPSC",
707 .devfs_name = "ttyS", 711 .devfs_name = "ttyPSC",
708 .major = TTY_MAJOR, 712 .major = SERIAL_PSC_MAJOR,
709 .minor = 64, 713 .minor = SERIAL_PSC_MINOR,
710 .nr = MPC52xx_PSC_MAXNUM, 714 .nr = MPC52xx_PSC_MAXNUM,
711 .cons = MPC52xx_PSC_CONSOLE, 715 .cons = MPC52xx_PSC_CONSOLE,
712}; 716};