[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20200708145814.GN3703480@smile.fi.intel.com>
Date: Wed, 8 Jul 2020 17:58:14 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: sean.wang@...iatek.com
Cc: gregkh@...uxfoundation.org, jslaby@...e.com,
mika.westerberg@...ux.intel.com, sr@...x.de, arnd@...db.de,
matthias.bgg@...il.com, tthayer@...nsource.altera.com,
linux-mediatek@...ts.infradead.org, linux-serial@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
Steven Liu <steven.liu@...iatek.com>,
Ryder Lee <ryder.lee@...iatek.com>
Subject: Re: [PATCH v5] tty: serial: don't do termios for BTIF
On Wed, Jul 08, 2020 at 07:11:22AM +0800, sean.wang@...iatek.com wrote:
> From: Sean Wang <sean.wang@...iatek.com>
>
> Bluetooth Interface (BTIF) is designed dedicatedly for MediaTek SOC with
> BT in order to be instead of the UART interface between BT module and Host
> CPU, and not exported to user space to access.
>
> As the UART design, BTIF will be an APB slave and can transmit or receive
> data by MCU access, but doesn't provide termios function like baudrate and
> flow control setup.
>
> Even LCR on offset 0xC that is just a FAKELCR
> a. If FAKELCR[7] is equaled to 1, RBR(0x00), THR(0x00), IER(0x04)
> will not be readable/writable.
>
> b. If FAKELCR is equaled to 0xBF, RBR(0x00), THR(0x00), IER(0x04),
> IIR(0x08), and LSR(0x14) will not be readable/writable.
>
> So adding a new capability 'UART_CAP_NTIO' for the unusual unsupported
> case.
>
> The bluetooth driver would use BTIF device as a serdev. So the termios
> still function would be called in kernelspace from ttyport_open in
> drivers/tty/serdev/serdev-ttyprt.c.
...
> up->port.quirks |= skip_txen_test ? UPQ_NO_TXEN_TEST : 0;
> +
> + if (up->port.type == PORT_MTK_BTIF)
> + up->port.quirks |= UPQ_IGNORE_TERMIOS;
I don't like to see this in core.
Can we have this inside 8250_port.c? Something like extending struct
serial8250_config to carry quirks and assign them when you add a port or start
it (wherever it's appropriated)?
--
With Best Regards,
Andy Shevchenko
Powered by blists - more mailing lists