<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/tty/serial/8250/8250_dwlib.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-06-21T12:40:38Z</updated>
<entry>
<title>serial: 8250_dw: Don't use struct dw8250_data outside of 8250_dw</title>
<updated>2024-06-21T12:40:38Z</updated>
<author>
<name>Andy Shevchenko</name>
<email>andriy.shevchenko@linux.intel.com</email>
</author>
<published>2024-05-14T19:05:53Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db9b1ef8d76aed37258f8552e56bc5e028a0632d'/>
<id>urn:sha1:db9b1ef8d76aed37258f8552e56bc5e028a0632d</id>
<content type='text'>
[ Upstream commit 87d80bfbd577912462061b1a45c0ed9c7fcb872f ]

The container of the struct dw8250_port_data is private to the actual
driver. In particular, 8250_lpss and 8250_dw use different data types
that are assigned to the UART port private_data. Hence, it must not
be used outside the specific driver.

Currently the only cpr_val is required by the common code, make it
be available via struct dw8250_port_data.

This fixes the UART breakage on Intel Galileo boards.

Fixes: 593dea000bc1 ("serial: 8250: dw: Allow to use a fallback CPR value if not synthesized")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20240514190730.2787071-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_dw: Do not bailout on UCV read returning zero</title>
<updated>2024-01-04T15:21:43Z</updated>
<author>
<name>Vamshi Gajjela</name>
<email>vamshigajjela@google.com</email>
</author>
<published>2023-12-31T18:29:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d8a02844791360ed156ce5935bc50754ea22e299'/>
<id>urn:sha1:d8a02844791360ed156ce5935bc50754ea22e299</id>
<content type='text'>
Designware UART has optional feature FIFO_MODE to implement FIFO.
Encoding FIFO capabilities through Component Parameter Register CPR is
optional and it can be enabled using parameter UART_ADD_ENCODED_PARAMS.

Driver can exercise fifo capabilities by decoding CPR if implemented
or from cpr_val provided from the dw8250_platform_data otherwise.

dw8250_setup_port() checks for CPR or cpr_val to determine FIFO size
only when Component Version (UCV) is non-zero. Bailing out early on UCV
read returning zero will leave fifosize as zero and !UART_CAP_FIFO,
hence prevent early return and continue to process CPR or cpr_val for
the driver to utilize FIFO.

Non-zero UCV implies ADDITIONAL_FEATURES=1, preventing early return
will not be an overhead here.

Signed-off-by: Vamshi Gajjela &lt;vamshigajjela@google.com&gt;
Link: https://lore.kernel.org/r/20231231182951.877805-1-vamshigajjela@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_dw: Decouple DLF register check from UCV</title>
<updated>2023-11-28T19:24:14Z</updated>
<author>
<name>Vamshi Gajjela</name>
<email>vamshigajjela@google.com</email>
</author>
<published>2023-11-26T16:04:20Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=d804987153e7bedf503f8e4ba649afe52cfd7f6d'/>
<id>urn:sha1:d804987153e7bedf503f8e4ba649afe52cfd7f6d</id>
<content type='text'>
Designware UART has an optional feature to enable Fractional Baud Rate
Divisor (DLF) through the FRACTIONAL_BAUD_DIVISOR_EN configuration
parameter, and it is not dependent on ADDITIONAL_FEATURES.

dw8250_setup_port() checks DLF to determine dlf_size only when UART
Component Version (UCV) is non-zero. As mentioned above DLF and UCV are
independent features. Move the logic corresponding to DLF size
calculation ahead of the UCV check to prevent early return. Otherwise,
dlf_size will be zero and driver will not be able to use the
controller's fractional baud rate divisor (DLF) feature.

Signed-off-by: Vamshi Gajjela &lt;vamshigajjela@google.com&gt;
Link: https://lore.kernel.org/r/20231126160420.2442330-1-vamshigajjela@google.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_dw: Preserve original value of DLF register</title>
<updated>2023-07-25T18:31:31Z</updated>
<author>
<name>Ruihong Luo</name>
<email>colorsu1922@gmail.com</email>
</author>
<published>2023-07-13T00:42:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=748c5ea8b8796ae8ee80b8d3a3d940570b588d59'/>
<id>urn:sha1:748c5ea8b8796ae8ee80b8d3a3d940570b588d59</id>
<content type='text'>
Preserve the original value of the Divisor Latch Fraction (DLF) register.
When the DLF register is modified without preservation, it can disrupt
the baudrate settings established by firmware or bootloader, leading to
data corruption and the generation of unreadable or distorted characters.

Fixes: 701c5e73b296 ("serial: 8250_dw: add fractional divisor support")
Cc: stable &lt;stable@kernel.org&gt;
Signed-off-by: Ruihong Luo &lt;colorsu1922@gmail.com&gt;
Link: https://lore.kernel.org/stable/20230713004235.35904-1-colorsu1922%40gmail.com
Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Reviewed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20230713004235.35904-1-colorsu1922@gmail.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: Make -&gt;set_termios() old ktermios const</title>
<updated>2022-08-30T12:22:35Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-08-16T11:57:37Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bec5b814d46c2a704c3c8148752e62a33e9fa6dc'/>
<id>urn:sha1:bec5b814d46c2a704c3c8148752e62a33e9fa6dc</id>
<content type='text'>
There should be no reason to adjust old ktermios which is going to get
discarded anyway.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220816115739.10928-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_dwlib: remove redundant sanity check for RS485 flags</title>
<updated>2022-07-14T14:34:24Z</updated>
<author>
<name>Lino Sanfilippo</name>
<email>l.sanfilippo@kunbus.com</email>
</author>
<published>2022-07-10T16:44:41Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c64e17584ba78552b51a27374b54686259826360'/>
<id>urn:sha1:c64e17584ba78552b51a27374b54686259826360</id>
<content type='text'>
Before the drivers rs485_config() function is called the serial core
already ensures that only one of both options RTS on send or RTS after send
is set. So remove the concerning sanity check in the driver function to
avoid redundancy.

Reviewed-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Signed-off-by: Lino Sanfilippo &lt;l.sanfilippo@kunbus.com&gt;
Link: https://lore.kernel.org/r/20220710164442.2958979-8-LinoSanfilippo@gmx.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: Embed rs485_supported to uart_port</title>
<updated>2022-07-08T13:14:09Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-07-04T09:45:14Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=0139da50dc53f0ce2804e83566d290c7e626fd17'/>
<id>urn:sha1:0139da50dc53f0ce2804e83566d290c7e626fd17</id>
<content type='text'>
Embed rs485_supported to uart_port to allow serial core to tweak it as
needed.

Reviewed-by: Lino Sanfilippo &lt;l.sanfilippo@kunbus.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220704094515.6831-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>8250_dwlib: Convert bitops to newer form</title>
<updated>2022-06-30T15:11:03Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-06-30T10:05:36Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=e9f9736679566cfa4158a40820cd50a46e601349'/>
<id>urn:sha1:e9f9736679566cfa4158a40820cd50a46e601349</id>
<content type='text'>
Instead of open-coding, use BIT(), GENMASK(), and FIELD_GET() helpers.

Reviewed-by: Andy Shevchenko &lt;andy.shevchenko@gmail.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220630100536.41329-1-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: 8250_dwlib: Support for 9th bit multipoint addressing</title>
<updated>2022-06-27T12:44:20Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-06-24T20:42:10Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=f287f971e2569827fe9fb3a8d55a37703a13cf29'/>
<id>urn:sha1:f287f971e2569827fe9fb3a8d55a37703a13cf29</id>
<content type='text'>
Add 9th bit multipoint addressing mode for DW UART. 9th bit addressing
can be used only when HW RS485 is available.

Updating RAR (receive address register) is bit tricky because busy
indication is not be available when DW UART is strictly 16550
compatible, which is the case with the hardware I was testing with. RAR
should not be updated while receive is in progress which is now
achieved by deasserting RE and waiting for one frame (in case rx would
be in progress, the driver seems to have no way of knowing it w/o busy
indication). Because of this complexity, it's better to avoid doing it
unless really needed.

Co-developed-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Co-developed-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Co-developed-by: Raymond Tan &lt;raymond.tan@intel.com&gt;
Co-developed-by: Lakshmi Sowjanya &lt;lakshmi.sowjanya.d@intel.com&gt;
Signed-off-by: Heikki Krogerus &lt;heikki.krogerus@linux.intel.com&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Signed-off-by: Raymond Tan &lt;raymond.tan@intel.com&gt;
Signed-off-by: Lakshmi Sowjanya &lt;lakshmi.sowjanya.d@intel.com&gt;
Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220624204210.11112-7-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: take termios_rwsem for -&gt;rs485_config() &amp; pass termios as param</title>
<updated>2022-06-27T12:44:20Z</updated>
<author>
<name>Ilpo Järvinen</name>
<email>ilpo.jarvinen@linux.intel.com</email>
</author>
<published>2022-06-24T20:42:08Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=ae50bb2752836277ae15aa4e9d99074d6d947946'/>
<id>urn:sha1:ae50bb2752836277ae15aa4e9d99074d6d947946</id>
<content type='text'>
To be able to alter ADDRB within -&gt;rs485_config(), take termios_rwsem
before calling -&gt;rs485_config() and pass termios.

Signed-off-by: Ilpo Järvinen &lt;ilpo.jarvinen@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20220624204210.11112-5-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
