<feed xmlns='http://www.w3.org/2005/Atom'>
<title>opensbi.git/lib/utils/serial/uart8250.c, branch master</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://cgit.235523.xyz/opensbi.git/atom/lib/utils/serial/uart8250.c?h=master</id>
<link rel='self' href='http://cgit.235523.xyz/opensbi.git/atom/lib/utils/serial/uart8250.c?h=master'/>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/'/>
<updated>2025-12-21T15:32:44Z</updated>
<entry>
<title>lib: utils/serial: Support multiple UART8250 devices</title>
<updated>2025-12-21T15:32:44Z</updated>
<author>
<name>Bo Gan</name>
<email>ganboing@gmail.com</email>
</author>
<published>2025-12-18T10:42:42Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=fbff3a7e0784a5bd42e87656e6d50cea94dfcff5'/>
<id>urn:sha1:fbff3a7e0784a5bd42e87656e6d50cea94dfcff5</id>
<content type='text'>
Previously we assume only 1 UART8250 instance can be used. Now we support
multiple instances by introducing counterpart functions to putc/getc/init
which take an extra *dev parameter, and name them as uart8250_device_xyz()
The original functions without the *dev parameter will operate on the
default instance exactly the same as before, so no changes on the caller
is required.

Note: uart8250_device_init only does device initialization without the
console registration logic.

Signed-off-by: Bo Gan &lt;ganboing@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251218104243.562667-7-ganboing@gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: typo Recieve</title>
<updated>2025-11-10T08:13:27Z</updated>
<author>
<name>Heinrich Schuchardt</name>
<email>heinrich.schuchardt@canonical.com</email>
</author>
<published>2025-11-05T01:16:48Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=976a6a86124d5d281217444f39ef46dced5b6c47'/>
<id>urn:sha1:976a6a86124d5d281217444f39ef46dced5b6c47</id>
<content type='text'>
%s/Recieve/Receive/

Signed-off-by: Heinrich Schuchardt &lt;heinrich.schuchardt@canonical.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20251105011648.9413-1-heinrich.schuchardt@canonical.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: Clear LSR status and check RBR status</title>
<updated>2025-07-20T15:07:18Z</updated>
<author>
<name>Yi Pei</name>
<email>neopimail@gmail.com</email>
</author>
<published>2025-07-20T15:07:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=b8f370aa3714ef37023e523c37c1981b0a5d1e12'/>
<id>urn:sha1:b8f370aa3714ef37023e523c37c1981b0a5d1e12</id>
<content type='text'>
On some platforms, read RBR when it is empty may result in an error.

Signed-off-by: Yi Pei &lt;neopimail@gmail.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/CAFPVDjQZ1gpf8-u--RBbAL1Y0FfDN2vZ3g=wBw+Bp-8ppuz3HA@mail.gmail.com
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: Add PXA UARTs support</title>
<updated>2025-03-27T14:50:05Z</updated>
<author>
<name>Junhui Liu</name>
<email>junhui.liu@pigmoral.tech</email>
</author>
<published>2025-03-27T06:48:18Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=8fe835303c4c7d134f07002c234ec5ec637953ca'/>
<id>urn:sha1:8fe835303c4c7d134f07002c234ec5ec637953ca</id>
<content type='text'>
The PXA variant of the uart8250 adds the UART Unit Enable bit (UUE) that
needs to be set to enable the XScale PXA UART. And it is required for
some RISC-V SoCs like the Spacemit K1 that implement the PXA UART.

This introduces the "intel,xscale-uart" compatible to handle setting the
UUE bit.

Signed-off-by: Junhui Liu &lt;junhui.liu@pigmoral.tech&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
Link: https://lore.kernel.org/r/20250327-pxa-uart-support-v2-1-c4400c1fcd0b@pigmoral.tech
Signed-off-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: Ensure proper allocation of PMP entries for uart8250</title>
<updated>2023-10-06T11:23:25Z</updated>
<author>
<name>Yu Chien Peter Lin</name>
<email>peterlin@andestech.com</email>
</author>
<published>2023-09-25T12:24:26Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=a12542316c98bbc8731dd6048d0a7ba3ab67fa6c'/>
<id>urn:sha1:a12542316c98bbc8731dd6048d0a7ba3ab67fa6c</id>
<content type='text'>
The added memory region should start from the base address.
Otherwise, the range will be shifted by reg_offset and not
able to merge consecutive NAPOT regions in the root domain,
resulting in wasted PMP entries.

Fixes: e8bc1621 ("lib: utils/serial: Add shared regions for
serial drivers")

Signed-off-by: Yu Chien Peter Lin &lt;peterlin@andestech.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: Add shared regions for serial drivers</title>
<updated>2023-09-24T11:34:41Z</updated>
<author>
<name>Mayuresh Chitale</name>
<email>mchitale@ventanamicro.com</email>
</author>
<published>2023-09-07T11:49:46Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=e8bc1621c6882766815d2a46f5c2ae88c977bfa4'/>
<id>urn:sha1:e8bc1621c6882766815d2a46f5c2ae88c977bfa4</id>
<content type='text'>
The serial driver regions used by OpenSBI should be marked as a shared
read-write regions between M-mode and SU-mode as those are accessed
by earlycon and the corresponding tty serial drivers running in 'S' mode.
When the smepmp extension is enabled, PMP entries for these shared regions
will get programmed.

Signed-off-by: Mayuresh Chitale &lt;mchitale@ventanamicro.com&gt;
Signed-off-by: Anup Patel &lt;apatel@ventanamicro.com&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: Ensure baudrate is non-zero before using</title>
<updated>2022-07-30T06:09:42Z</updated>
<author>
<name>Andrew Jones</name>
<email>ajones@ventanamicro.com</email>
</author>
<published>2022-07-18T17:20:28Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=f27203525aa2fc20d0074feb892a6f8433f84e3a'/>
<id>urn:sha1:f27203525aa2fc20d0074feb892a6f8433f84e3a</id>
<content type='text'>
RISC-V doesn't generate exceptions on divide-by-zero, but the result,
all bits set, is not likely what people expect either. In all cases
where we divide by baudrate there's a chance it's zero (when the DT
it came from is "bad"). To avoid difficult to debug situations, leave
baudrate dependent registers alone when baudrate is zero, as, also in
all cases, it appears we can skip initialization of those registers
and still [hopefully] have a functioning UART.

Signed-off-by: Andrew Jones &lt;ajones@ventanamicro.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: support 'reg-offset' property</title>
<updated>2022-04-17T08:27:48Z</updated>
<author>
<name>Zong Li</name>
<email>zong.li@sifive.com</email>
</author>
<published>2022-04-15T02:24:20Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5c5cbb53a4fd2f7d2a7038b584f8ee01266cef04'/>
<id>urn:sha1:5c5cbb53a4fd2f7d2a7038b584f8ee01266cef04</id>
<content type='text'>
reg-offset property is used for offset to apply to the mapbase
from the start of the registers in 8250 UART. In Linux kernel,
it has been handled in 8250 UART driver.

dt-bindings:
&lt;linux&gt;/Documentation/devicetree/bindings/serial/8250.yaml

Signed-off-by: Zong Li &lt;zong.li@sifive.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: utils/serial: Round UART8250 baud rate divisor to nearest integer</title>
<updated>2022-02-04T05:46:29Z</updated>
<author>
<name>Jakub Luzny</name>
<email>jakub.luzny@codasip.com</email>
</author>
<published>2022-01-21T15:06:14Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=ce4c0188d96b2c20c2e08d24646a5e517fe15a4b'/>
<id>urn:sha1:ce4c0188d96b2c20c2e08d24646a5e517fe15a4b</id>
<content type='text'>
Previously, it was rounded down and that gives suboptimal results when
non-standard clock sources or baud rates are used.

Signed-off-by: Jakub Luzny &lt;jakub.luzny@codasip.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
<entry>
<title>lib: fix pointer of type 'void *' used in arithmetic</title>
<updated>2022-01-21T16:28:12Z</updated>
<author>
<name>Jukka Laitinen</name>
<email>jukka.laitinen@iki.fi</email>
</author>
<published>2022-01-19T09:20:17Z</published>
<link rel='alternate' type='text/html' href='http://cgit.235523.xyz/opensbi.git/commit/?id=5d025eb2353550eadbd2fa9b8083a92fe9b07bd9'/>
<id>urn:sha1:5d025eb2353550eadbd2fa9b8083a92fe9b07bd9</id>
<content type='text'>
Using "void *" in arithmetic causes errors with strict compiler settings:
"error: pointer of type 'void *' used in arithmetic [-Werror=pointer-arith]"

Avoid these by calculating on "char *" where 1-byte data size is assumed.

Signed-off-by: Jukka Laitinen &lt;jukkax@ssrc.tii.ae&gt;
Reviewed-by: Dong Du &lt;Dd_nirvana@sjtu.edu.cn&gt;
Reviewed-by: Xiang W &lt;wxjstz@126.com&gt;
Reviewed-by: Anup Patel &lt;anup@brainfault.org&gt;
</content>
</entry>
</feed>
