From: "Ilpo Järvinen" <ilpo.jarvinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
To: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
Cc: "open list:SERIAL DRIVERS"
<linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Greg KH"
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
"Jiri Slaby" <jirislaby-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Lukas Wunner" <lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org>,
"Andy Shevchenko"
<andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
"Johan Hovold" <johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
"Heiko Stuebner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
giulio.benetti-W14uJ/fiAyBY2hyreNRi6g@public.gmane.org,
"Heikki Krogerus"
<heikki.krogerus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
"Uwe Kleine-König"
<u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
"Linux API" <linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Ivan Kokshaysky"
<ink-biIs/Y0ymYJMZLIVYojuPNP0rXTJTi09@public.gmane.org>,
"Matt Turner" <mattst88-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
alpha <linux-alpha-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"Thomas Bogendoerfer"
<tsbogend-I1c7kopa9pxLokYuJOExCg@public.gmane.org>,
"open list:BROADCOM NVRAM DRIVER"
<linux-mips-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
"James E.J. Bottomley" <James.Bottomley@hansenpartner>
Subject: Re: [PATCH v2 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode
Date: Mon, 4 Apr 2022 12:10:18 +0300 (EEST) [thread overview]
Message-ID: <a05978b6-ed73-4ee-c688-e383b47c35d5@linux.intel.com> (raw)
In-Reply-To: <CAK8P3a0iP79RQWr6-YDf=xQZvonZchYN-Rn7HN2pkNihZ=anAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 2878 bytes --]
On Mon, 4 Apr 2022, Arnd Bergmann wrote:
> On Mon, Apr 4, 2022 at 10:29 AM Ilpo Järvinen
> <ilpo.jarvinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org> wrote:
>
> >
> > #define CLOCAL 00100000
> > +#define ADDRB 010000000 /* address bit */
> > #define CMSPAR 010000000000 /* mark or space (stick) parity */
> > #define CRTSCTS 020000000000 /* flow control */
> >
> > diff --git a/arch/mips/include/uapi/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h
> > index dfeffba729b7..e7ea31cfec78 100644
> > --- a/arch/mips/include/uapi/asm/termbits.h
> > +++ b/arch/mips/include/uapi/asm/termbits.h
> > @@ -181,6 +181,7 @@ struct ktermios {
> > #define B3000000 0010015
> > #define B3500000 0010016
> > #define B4000000 0010017
> > +#define ADDRB 0020000 /* address bit */
> > #define CIBAUD 002003600000 /* input baud rate */
> > #define CMSPAR 010000000000 /* mark or space (stick) parity */
> > #define CRTSCTS 020000000000 /* flow control */
>
> It looks like the top bits are used the same way on all architectures
> already, while the bottom bits of the flag differ. Could you pick
> the next free bit from the top to use the same value 04000000000
> everywhere?
04000000000 isn't the top of the use:
diff --git a/arch/alpha/include/uapi/asm/termbits.h
b/arch/alpha/include/uapi/asm/termbits.h
index 4575ba34a0ea..285169c794ec 100644
--- a/arch/alpha/include/uapi/asm/termbits.h
+++ b/arch/alpha/include/uapi/asm/termbits.h
@@ -178,10 +178,11 @@ struct ktermios {
#define PARENB 00010000
#define PARODD 00020000
#define HUPCL 00040000
#define CLOCAL 00100000
+#define ADDRB 010000000 /* address bit */
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CRTSCTS 020000000000 /* flow control */
#define CIBAUD 07600000
#define IBSHIFT 16
diff --git a/arch/sparc/include/uapi/asm/termbits.h
b/arch/sparc/include/uapi/asm/termbits.h
index ce5ad5d0f105..4ad60c4acf65 100644
--- a/arch/sparc/include/uapi/asm/termbits.h
+++ b/arch/sparc/include/uapi/asm/termbits.h
@@ -198,10 +198,11 @@ struct ktermios {
adjust CBAUD constant and drivers accordingly.
#define B4000000 0x00001013 */
+#define ADDRB 0x00002000 /* address bit */
#define CIBAUD 0x100f0000 /* input baud rate (not used) */
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
#define CRTSCTS 0x80000000 /* flow control */
Somehow I managed to convince myself earlier there isn't a bit available
that would be consistent across archs but now that I recheck the
04000000000 bit (0x20000000) you propose, it seems to be that nothing is
using it.
It's not suprising I didn't get the magnitude of those long octal numbers
right. ...They are such a pain to interpret correctly.
--
i.
WARNING: multiple messages have this Message-ID (diff)
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
"Greg KH" <gregkh@linuxfoundation.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
"Lukas Wunner" <lukas@wunner.de>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Johan Hovold" <johan@kernel.org>,
"Heiko Stuebner" <heiko@sntech.de>,
giulio.benetti@micronovasrl.com,
"Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Linux API" <linux-api@vger.kernel.org>,
"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
"Matt Turner" <mattst88@gmail.com>,
alpha <linux-alpha@vger.kernel.org>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Helge Deller" <deller@gmx.de>,
"Parisc List" <linux-parisc@vger.kernel.org>,
"Michael Ellerman" <mpe@ellerman.id.au>,
"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
"Paul Mackerras" <paulus@samba.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
"David S. Miller" <davem@davemloft.net>,
sparclinux <sparclinux@vger.kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
"USB list" <linux-usb@vger.kernel.org>
Subject: Re: [PATCH v2 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode
Date: Mon, 4 Apr 2022 12:10:18 +0300 (EEST) [thread overview]
Message-ID: <a05978b6-ed73-4ee-c688-e383b47c35d5@linux.intel.com> (raw)
In-Reply-To: <CAK8P3a0iP79RQWr6-YDf=xQZvonZchYN-Rn7HN2pkNihZ=anAw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2854 bytes --]
On Mon, 4 Apr 2022, Arnd Bergmann wrote:
> On Mon, Apr 4, 2022 at 10:29 AM Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> wrote:
>
> >
> > #define CLOCAL 00100000
> > +#define ADDRB 010000000 /* address bit */
> > #define CMSPAR 010000000000 /* mark or space (stick) parity */
> > #define CRTSCTS 020000000000 /* flow control */
> >
> > diff --git a/arch/mips/include/uapi/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h
> > index dfeffba729b7..e7ea31cfec78 100644
> > --- a/arch/mips/include/uapi/asm/termbits.h
> > +++ b/arch/mips/include/uapi/asm/termbits.h
> > @@ -181,6 +181,7 @@ struct ktermios {
> > #define B3000000 0010015
> > #define B3500000 0010016
> > #define B4000000 0010017
> > +#define ADDRB 0020000 /* address bit */
> > #define CIBAUD 002003600000 /* input baud rate */
> > #define CMSPAR 010000000000 /* mark or space (stick) parity */
> > #define CRTSCTS 020000000000 /* flow control */
>
> It looks like the top bits are used the same way on all architectures
> already, while the bottom bits of the flag differ. Could you pick
> the next free bit from the top to use the same value 04000000000
> everywhere?
04000000000 isn't the top of the use:
diff --git a/arch/alpha/include/uapi/asm/termbits.h
b/arch/alpha/include/uapi/asm/termbits.h
index 4575ba34a0ea..285169c794ec 100644
--- a/arch/alpha/include/uapi/asm/termbits.h
+++ b/arch/alpha/include/uapi/asm/termbits.h
@@ -178,10 +178,11 @@ struct ktermios {
#define PARENB 00010000
#define PARODD 00020000
#define HUPCL 00040000
#define CLOCAL 00100000
+#define ADDRB 010000000 /* address bit */
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CRTSCTS 020000000000 /* flow control */
#define CIBAUD 07600000
#define IBSHIFT 16
diff --git a/arch/sparc/include/uapi/asm/termbits.h
b/arch/sparc/include/uapi/asm/termbits.h
index ce5ad5d0f105..4ad60c4acf65 100644
--- a/arch/sparc/include/uapi/asm/termbits.h
+++ b/arch/sparc/include/uapi/asm/termbits.h
@@ -198,10 +198,11 @@ struct ktermios {
adjust CBAUD constant and drivers accordingly.
#define B4000000 0x00001013 */
+#define ADDRB 0x00002000 /* address bit */
#define CIBAUD 0x100f0000 /* input baud rate (not used) */
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
#define CRTSCTS 0x80000000 /* flow control */
Somehow I managed to convince myself earlier there isn't a bit available
that would be consistent across archs but now that I recheck the
04000000000 bit (0x20000000) you propose, it seems to be that nothing is
using it.
It's not suprising I didn't get the magnitude of those long octal numbers
right. ...They are such a pain to interpret correctly.
--
i.
WARNING: multiple messages have this Message-ID (diff)
From: "Ilpo Järvinen" <ilpo.jarvinen@linux.intel.com>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "Heikki Krogerus" <heikki.krogerus@linux.intel.com>,
"Heiko Stuebner" <heiko@sntech.de>,
"James E.J. Bottomley" <James.Bottomley@hansenpartnership.com>,
"Paul Mackerras" <paulus@samba.org>,
sparclinux <sparclinux@vger.kernel.org>,
"Linux API" <linux-api@vger.kernel.org>,
"Jiri Slaby" <jirislaby@kernel.org>,
linux-arch <linux-arch@vger.kernel.org>,
"Helge Deller" <deller@gmx.de>,
"open list:SERIAL DRIVERS" <linux-serial@vger.kernel.org>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Matt Turner" <mattst88@gmail.com>,
"Johan Hovold" <johan@kernel.org>,
"Ivan Kokshaysky" <ink@jurassic.park.msu.ru>,
"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
"Thomas Bogendoerfer" <tsbogend@alpha.franken.de>,
"Parisc List" <linux-parisc@vger.kernel.org>,
"Greg KH" <gregkh@linuxfoundation.org>,
"USB list" <linux-usb@vger.kernel.org>,
"open list:BROADCOM NVRAM DRIVER" <linux-mips@vger.kernel.org>,
"David S. Miller" <davem@davemloft.net>,
"Lukas Wunner" <lukas@wunner.de>,
alpha <linux-alpha@vger.kernel.org>,
linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
giulio.benetti@micronovasrl.com
Subject: Re: [PATCH v2 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode
Date: Mon, 4 Apr 2022 12:10:18 +0300 (EEST) [thread overview]
Message-ID: <a05978b6-ed73-4ee-c688-e383b47c35d5@linux.intel.com> (raw)
In-Reply-To: <CAK8P3a0iP79RQWr6-YDf=xQZvonZchYN-Rn7HN2pkNihZ=anAw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2854 bytes --]
On Mon, 4 Apr 2022, Arnd Bergmann wrote:
> On Mon, Apr 4, 2022 at 10:29 AM Ilpo Järvinen
> <ilpo.jarvinen@linux.intel.com> wrote:
>
> >
> > #define CLOCAL 00100000
> > +#define ADDRB 010000000 /* address bit */
> > #define CMSPAR 010000000000 /* mark or space (stick) parity */
> > #define CRTSCTS 020000000000 /* flow control */
> >
> > diff --git a/arch/mips/include/uapi/asm/termbits.h b/arch/mips/include/uapi/asm/termbits.h
> > index dfeffba729b7..e7ea31cfec78 100644
> > --- a/arch/mips/include/uapi/asm/termbits.h
> > +++ b/arch/mips/include/uapi/asm/termbits.h
> > @@ -181,6 +181,7 @@ struct ktermios {
> > #define B3000000 0010015
> > #define B3500000 0010016
> > #define B4000000 0010017
> > +#define ADDRB 0020000 /* address bit */
> > #define CIBAUD 002003600000 /* input baud rate */
> > #define CMSPAR 010000000000 /* mark or space (stick) parity */
> > #define CRTSCTS 020000000000 /* flow control */
>
> It looks like the top bits are used the same way on all architectures
> already, while the bottom bits of the flag differ. Could you pick
> the next free bit from the top to use the same value 04000000000
> everywhere?
04000000000 isn't the top of the use:
diff --git a/arch/alpha/include/uapi/asm/termbits.h
b/arch/alpha/include/uapi/asm/termbits.h
index 4575ba34a0ea..285169c794ec 100644
--- a/arch/alpha/include/uapi/asm/termbits.h
+++ b/arch/alpha/include/uapi/asm/termbits.h
@@ -178,10 +178,11 @@ struct ktermios {
#define PARENB 00010000
#define PARODD 00020000
#define HUPCL 00040000
#define CLOCAL 00100000
+#define ADDRB 010000000 /* address bit */
#define CMSPAR 010000000000 /* mark or space (stick) parity */
#define CRTSCTS 020000000000 /* flow control */
#define CIBAUD 07600000
#define IBSHIFT 16
diff --git a/arch/sparc/include/uapi/asm/termbits.h
b/arch/sparc/include/uapi/asm/termbits.h
index ce5ad5d0f105..4ad60c4acf65 100644
--- a/arch/sparc/include/uapi/asm/termbits.h
+++ b/arch/sparc/include/uapi/asm/termbits.h
@@ -198,10 +198,11 @@ struct ktermios {
adjust CBAUD constant and drivers accordingly.
#define B4000000 0x00001013 */
+#define ADDRB 0x00002000 /* address bit */
#define CIBAUD 0x100f0000 /* input baud rate (not used) */
#define CMSPAR 0x40000000 /* mark or space (stick) parity */
#define CRTSCTS 0x80000000 /* flow control */
Somehow I managed to convince myself earlier there isn't a bit available
that would be consistent across archs but now that I recheck the
04000000000 bit (0x20000000) you propose, it seems to be that nothing is
using it.
It's not suprising I didn't get the magnitude of those long octal numbers
right. ...They are such a pain to interpret correctly.
--
i.
next prev parent reply other threads:[~2022-04-04 9:10 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-04 8:29 [PATCH v2 00/12] Add RS485 support to DW UART Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 01/12] serial: Store character timing information to uart_port Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 02/12] serial: 8250: Handle UART without interrupt on TEMT Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 03/12] serial: 8250_dwlib: RS485 HW half & full duplex support Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 04/12] serial: 8250_dwlib: Implement SW half " Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 05/12] dt_bindings: rs485: Add receiver enable polarity Ilpo Järvinen
2022-04-06 17:54 ` Rob Herring
2022-04-04 8:29 ` [PATCH v2 06/12] ACPI / property: Document RS485 _DSD properties Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode Ilpo Järvinen
2022-04-04 8:29 ` Ilpo Järvinen
2022-04-04 8:29 ` Ilpo Järvinen
2022-04-04 8:52 ` Arnd Bergmann
2022-04-04 8:52 ` Arnd Bergmann
2022-04-04 8:52 ` Arnd Bergmann
[not found] ` <CAK8P3a0iP79RQWr6-YDf=xQZvonZchYN-Rn7HN2pkNihZ=anAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2022-04-04 9:10 ` Ilpo Järvinen [this message]
2022-04-04 9:10 ` Ilpo Järvinen
2022-04-04 9:10 ` Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 08/12] serial: General support for multipoint addresses Ilpo Järvinen
2022-04-04 8:29 ` Ilpo Järvinen
2022-04-04 8:29 ` Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 09/12] serial: 8250: make saved LSR larger Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 10/12] serial: 8250: create lsr_save_mask Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 11/12] serial: 8250_lpss: Use 32-bit reads Ilpo Järvinen
2022-04-04 8:29 ` [PATCH v2 12/12] serial: 8250_dwlib: Support for 9th bit multipoint addressing Ilpo Järvinen
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=a05978b6-ed73-4ee-c688-e383b47c35d5@linux.intel.com \
--to=ilpo.jarvinen-vuqaysv1563yd54fqh9/ca@public.gmane.org \
--cc=James.Bottomley@hansenpartner \
--cc=andriy.shevchenko-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=arnd-r2nGTMty4D4@public.gmane.org \
--cc=giulio.benetti-W14uJ/fiAyBY2hyreNRi6g@public.gmane.org \
--cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
--cc=heikki.krogerus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
--cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
--cc=ink-biIs/Y0ymYJMZLIVYojuPNP0rXTJTi09@public.gmane.org \
--cc=jirislaby-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=johan-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=linux-alpha-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-mips-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-serial-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lukas-JFq808J9C/izQB+pC5nmwQ@public.gmane.org \
--cc=mattst88-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=tsbogend-I1c7kopa9pxLokYuJOExCg@public.gmane.org \
--cc=u.kleine-koenig-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.