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.
next prev parent reply other threads:[~2022-04-04 9:10 UTC|newest]
Thread overview: 5+ 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 07/12] serial: termbits: ADDRB to indicate 9th bit addressing mode Ilpo Järvinen
2022-04-04 8:52 ` Arnd Bergmann
2022-04-04 9:10 ` Ilpo Järvinen [this message]
2022-04-04 8:29 ` [PATCH v2 08/12] serial: General support for multipoint addresses 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@linux.intel.com \
--cc=James.Bottomley@hansenpartnership.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=davem@davemloft.net \
--cc=deller@gmx.de \
--cc=giulio.benetti@micronovasrl.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=heiko@sntech.de \
--cc=ink@jurassic.park.msu.ru \
--cc=jirislaby@kernel.org \
--cc=johan@kernel.org \
--cc=linux-alpha@vger.kernel.org \
--cc=linux-api@vger.kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-parisc@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=lukas@wunner.de \
--cc=mattst88@gmail.com \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=sparclinux@vger.kernel.org \
--cc=tsbogend@alpha.franken.de \
--cc=u.kleine-koenig@pengutronix.de \
/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;
as well as URLs for NNTP newsgroup(s).