[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>
This commit is contained in:
committed by
Linus Torvalds
parent
2d8179c0b7
commit
d62de3aa8a
@@ -37,11 +37,11 @@
|
|||||||
* by the bootloader or in the platform init code.
|
* by the bootloader or in the platform init code.
|
||||||
*
|
*
|
||||||
* The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
|
* The idx field must be equal to the PSC index ( e.g. 0 for PSC1, 1 for PSC2,
|
||||||
* and so on). So the PSC1 is mapped to /dev/ttyS0, PSC2 to /dev/ttyS1 and so
|
* and so on). So the PSC1 is mapped to /dev/ttyPSC0, PSC2 to /dev/ttyPSC1 and
|
||||||
* on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly for
|
* so on. But be warned, it's an ABSOLUTE REQUIREMENT ! This is needed mainly
|
||||||
* the console code : without this 1:1 mapping, at early boot time, when we are
|
* fpr the console code : without this 1:1 mapping, at early boot time, when we
|
||||||
* parsing the kernel args console=ttyS?, we wouldn't know wich PSC it will be
|
* are parsing the kernel args console=ttyPSC?, we wouldn't know wich PSC it
|
||||||
* mapped to.
|
* will be mapped to.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <linux/config.h>
|
#include <linux/config.h>
|
||||||
@@ -65,6 +65,10 @@
|
|||||||
#include <linux/serial_core.h>
|
#include <linux/serial_core.h>
|
||||||
|
|
||||||
|
|
||||||
|
/* We've been assigned a range on the "Low-density serial ports" major */
|
||||||
|
#define SERIAL_PSC_MAJOR 204
|
||||||
|
#define SERIAL_PSC_MINOR 148
|
||||||
|
|
||||||
|
|
||||||
#define ISR_PASS_LIMIT 256 /* Max number of iteration in the interrupt */
|
#define ISR_PASS_LIMIT 256 /* Max number of iteration in the interrupt */
|
||||||
|
|
||||||
@@ -671,12 +675,12 @@ mpc52xx_console_setup(struct console *co, char *options)
|
|||||||
static struct uart_driver mpc52xx_uart_driver;
|
static struct uart_driver mpc52xx_uart_driver;
|
||||||
|
|
||||||
static struct console mpc52xx_console = {
|
static struct console mpc52xx_console = {
|
||||||
.name = "ttyS",
|
.name = "ttyPSC",
|
||||||
.write = mpc52xx_console_write,
|
.write = mpc52xx_console_write,
|
||||||
.device = uart_console_device,
|
.device = uart_console_device,
|
||||||
.setup = mpc52xx_console_setup,
|
.setup = mpc52xx_console_setup,
|
||||||
.flags = CON_PRINTBUFFER,
|
.flags = CON_PRINTBUFFER,
|
||||||
.index = -1, /* Specified on the cmdline (e.g. console=ttyS0 ) */
|
.index = -1, /* Specified on the cmdline (e.g. console=ttyPSC0 ) */
|
||||||
.data = &mpc52xx_uart_driver,
|
.data = &mpc52xx_uart_driver,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -703,10 +707,10 @@ console_initcall(mpc52xx_console_init);
|
|||||||
static struct uart_driver mpc52xx_uart_driver = {
|
static struct uart_driver mpc52xx_uart_driver = {
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
.driver_name = "mpc52xx_psc_uart",
|
.driver_name = "mpc52xx_psc_uart",
|
||||||
.dev_name = "ttyS",
|
.dev_name = "ttyPSC",
|
||||||
.devfs_name = "ttyS",
|
.devfs_name = "ttyPSC",
|
||||||
.major = TTY_MAJOR,
|
.major = SERIAL_PSC_MAJOR,
|
||||||
.minor = 64,
|
.minor = SERIAL_PSC_MINOR,
|
||||||
.nr = MPC52xx_PSC_MAXNUM,
|
.nr = MPC52xx_PSC_MAXNUM,
|
||||||
.cons = MPC52xx_PSC_CONSOLE,
|
.cons = MPC52xx_PSC_CONSOLE,
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user