public inbox for linux-doc@vger.kernel.org
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Randy Dunlap <rdunlap@infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: Timur Tabi <timur@kernel.org>, Jonathan Corbet <corbet@lwn.net>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-doc@vger.kernel.org" <linux-doc@vger.kernel.org>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Kumar Gala <galak@kernel.crashing.org>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	Jiri Slaby <jirislaby@kernel.org>
Subject: Re: [PATCH] Documentation: devices.txt: reconcile serial/ucc_uart minor numers
Date: Tue, 1 Aug 2023 05:21:11 +0000	[thread overview]
Message-ID: <dc334e93-1487-8058-195d-e90db7bdb53f@csgroup.eu> (raw)
In-Reply-To: <20230724063341.28198-1-rdunlap@infradead.org>



Le 24/07/2023 à 08:33, Randy Dunlap a écrit :
> Reconcile devices.txt with serial/ucc_uart.c regarding device number
> assignments. ucc_uart.c supports 4 ports and uses minor devnums
> 46-49, so update devices.txt with that info.
> Then update ucc_uart.c's reference to the location of the devices.txt
> list in the kernel source tree.

Devices ttyCPM* belong to cpm_uart driver. As explained in the comment 
you have modified in UCC uart driver, UCC uart borrows those devices and 
shall not be considered as the reference. But the lines you modify in 
device.txt doesn't mention QE UCC, it mentions CPM SCC and CPM SMC.

CPM uart driver supports up to 6 ports (4 SCC and 2 SMC).

On one of my boards which has a powerpc mpc866 CPU, I have:

[    2.393872] ff000a80.serial: ttyCPM0 at MMIO 0xfff00a80 (irq = 19, 
base_baud = 8250000) is a CPM UART
[    2.411899] ff000a90.serial: ttyCPM1 at MMIO 0xfff00a90 (irq = 20, 
base_baud = 8250000) is a CPM UART
[    2.430352] ff000a00.serial: ttyCPM2 at MMIO 0xfff00a00 (irq = 30, 
base_baud = 8250000) is a CPM UART
[    2.448944] ff000a20.serial: ttyCPM3 at MMIO 0xfff00a20 (irq = 29, 
base_baud = 8250000) is a CPM UART
[    2.467435] ff000a40.serial: ttyCPM4 at MMIO 0xfff00a40 (irq = 28, 
base_baud = 8250000) is a CPM UART
[    2.485924] ff000a60.serial: ttyCPM5 at MMIO 0xfff00a60 (irq = 27, 
base_baud = 8250000) is a CPM UART

# ll /dev/ttyCPM*
crw-------    1 root     root      204,  46 Jan  1 01:01 /dev/ttyCPM0
crw-------    1 root     root      204,  47 Jan  1 01:00 /dev/ttyCPM1
crw-------    1 root     root      204,  48 Jan  1 01:00 /dev/ttyCPM2
crw-------    1 root     root      204,  49 Jan  1 01:00 /dev/ttyCPM3
crw-------    1 root     root      204,  50 Jan  1 01:00 /dev/ttyCPM4
crw-------    1 root     root      204,  51 Jan  1 01:00 /dev/ttyCPM5

# cat /proc/tty/drivers
/dev/tty             /dev/tty        5       0 system:/dev/tty
/dev/console         /dev/console    5       1 system:console
/dev/ptmx            /dev/ptmx       5       2 system
ttyCPM               /dev/ttyCPM   204 46-51 serial
pty_slave            /dev/pts      136 0-1048575 pty:slave
pty_master           /dev/ptm      128 0-1048575 pty:master
pty_slave            /dev/ttyp       3 0-4 pty:slave
pty_master           /dev/pty        2 0-4 pty:master

Christophe


> 
> Fixes: d7584ed2b994 ("[POWERPC] qe-uart: add support for Freescale QUICCEngine UART")
> Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
> Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
> Cc: Timur Tabi <timur@kernel.org>
> Cc: Kumar Gala <galak@kernel.crashing.org>
> Cc: linuxppc-dev@lists.ozlabs.org
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: Jiri Slaby <jirislaby@kernel.org>
> Cc: linux-serial@vger.kernel.org
> Cc: Jonathan Corbet <corbet@lwn.net>
> Cc: linux-doc@vger.kernel.org
> ---
>   Documentation/admin-guide/devices.txt |    2 +-
>   drivers/tty/serial/ucc_uart.c         |    2 +-
>   2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff -- a/drivers/tty/serial/ucc_uart.c b/drivers/tty/serial/ucc_uart.c
> --- a/drivers/tty/serial/ucc_uart.c
> +++ b/drivers/tty/serial/ucc_uart.c
> @@ -59,7 +59,7 @@ static int firmware_loaded;
>   /* #define LOOPBACK */
>   
>   /* The major and minor device numbers are defined in
> - * http://www.lanana.org/docs/device-list/devices-2.6+.txt.  For the QE
> + * Documentation/admin-guide/devices.txt.  For the QE
>    * UART, we have major number 204 and minor numbers 46 - 49, which are the
>    * same as for the CPM2.  This decision was made because no Freescale part
>    * has both a CPM and a QE.
> diff -- a/Documentation/admin-guide/devices.txt b/Documentation/admin-guide/devices.txt
> --- a/Documentation/admin-guide/devices.txt
> +++ b/Documentation/admin-guide/devices.txt
> @@ -2691,7 +2691,7 @@
>   		 45 = /dev/ttyMM1		Marvell MPSC - port 1 (obsolete unused)
>   		 46 = /dev/ttyCPM0		PPC CPM (SCC or SMC) - port 0
>   		    ...
> -		 47 = /dev/ttyCPM5		PPC CPM (SCC or SMC) - port 5
> +		 49 = /dev/ttyCPM5		PPC CPM (SCC or SMC) - port 3
>   		 50 = /dev/ttyIOC0		Altix serial card
>   		    ...
>   		 81 = /dev/ttyIOC31		Altix serial card

  parent reply	other threads:[~2023-08-01  5:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-24  6:33 [PATCH] Documentation: devices.txt: reconcile serial/ucc_uart minor numers Randy Dunlap
2023-07-25 17:27 ` Greg Kroah-Hartman
2023-07-25 17:31   ` Randy Dunlap
2023-07-25 20:38 ` Timur Tabi
2023-07-25 20:51   ` Randy Dunlap
2023-08-01  5:21 ` Christophe Leroy [this message]
2023-08-01  5:30   ` Randy Dunlap
2023-08-01  8:58     ` Christophe Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dc334e93-1487-8058-195d-e90db7bdb53f@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=corbet@lwn.net \
    --cc=galak@kernel.crashing.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=rdunlap@infradead.org \
    --cc=timur@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox