Re: How to add uart driver for /dev/ttyS1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



vichy wrote:
Dear all:
while tracing 8250.c, serial8250_init, I find all the ports are
assigned with the same uart_driver 8250 as below:
static struct uart_driver serial8250_reg = {
	.owner			= THIS_MODULE,
	.driver_name		= "serial",
	.dev_name		= "ttyS",
	.major			= TTY_MAJOR,
	.minor			= 64,
	.nr			= UART_NR,
	.cons			= SERIAL8250_CONSOLE,
};

what make me curious is the minor# above is 64, but the minor number
of /dev/ttyS1 is 65.


Numbering starts at 0, the first serial port (/dev/ttyS0) is assigned minor 64.

Martyn

My questions are below:
1. if I want my /dev/ttyS1 work, since I want to take it to running
KGDB, should I call serial8250_init twice and pass the second
serial8250_init with another uart_driver with minor number 65?

2. The digit number of ttys* means ports or something else?
    if it means port, why we give him another minor number?
    Or the kernel will find the driver with the digit as port index
instead of checking the minor number.

appreciate your help,
vichy

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



--
Martyn Welch MEng MPhil MIET (Principal Software Engineer)   T:+44(0)127322748
GE Fanuc Intelligent Platforms Ltd,        |Registered in England and Wales
Tove Valley Business Park, Towcester,      |(3828642) at 100 Barbirolli Square,
Northants, NN12 6PF, UK T:+44(0)1327359444 |Manchester,M2 3AB  VAT:GB 927559189

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux