hw/char/cadence_uart: Add BXRS register
PATCH 1/1 hw/char/cadence_uart: Add BXRS register
The new CADENCE UART driver in upstream kernel access BXRS register This patch adds BXRS (RX FIFO byte status register) or there would be kernel panic if user are using the new CADENCE UART driver
--- hw/char/cadence_uart.c | 2 ++ include/hw/char/cadence_uart.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-)
hw/char/cadence_uart.c +2 -0
@@ -120,6 +120,7 @@#define R_PMIN (0x3C/4)#define R_PWID (0x40/4)#define R_TTRIG (0x44/4) +#define R_RXBS (0x48/4)static void uart_update_status (CadenceUARTState *s)
@@ -523,6 +524,7 @@ static void cadence_uart_reset_init(Object *obj, ResetType type) s->r[R_BRGR ] =0x0000028B ; s->r[R_BDIV ] =0x0000000F ; s->r[R_TTRIG ] =0x00000020 ; + s->r[R_RXBS ] =0 ; }static void cadence_uart_reset_hold (Object *obj,ResetType type)
include/hw/char/cadence_uart.h +1 -1
@@ -29,7 +29,7 @@#define CADENCE_UART_RX_FIFO_SIZE 16#define CADENCE_UART_TX_FIFO_SIZE 16 -#define CADENCE_UART_R_MAX (0x48/4) +#define CADENCE_UART_R_MAX (0x4C/4)#define TYPE_CADENCE_UART "cadence_uart"OBJECT_DECLARE_SIMPLE_TYPE (CadenceUARTState,CADENCE_UART )
Signature · 1 line
2.34.1
Quoted 6 lines · Kuan-Jui Chiu
The new CADENCE UART driver in upstream kernel access BXRS register This patch adds BXRS (RX FIFO byte status register) or there would be kernel panic if user are using the new CADENCE UART driver
Signed-off-by Kuan-Jui Chiu <[email protected]>
Hi; thanks for this patch.
hw/char/cadence_uart.c line 123
Quoted 9 lines
hw/char/cadence_uart.c +1
-0@@ -120,6 +120,7 @@#define R_PMIN (0x3C/4)#define R_PWID (0x40/4)#define R_TTRIG (0x44/4) +#define R_RXBS (0x48/4)
Where is this register documented? The cadence_uart.c file references the Zynq 7000 Soc TRM UG585; its URL for that is out of date, but looking at the copy on the AMD website, there is a table giving the register summary for the UART:
https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
and it lists only registers from offsets 0 to 0x44.
thanks
-- PMM
Hi
I was referring this commit of upstream kernel which xilinx added BXRS register in Cadence UART driver
serial: xuartps: Adds RXBS register support for zynqmp · torvalds/linux@3816b2f <https://github.com/torvalds/linux/commit/3816b2f886d0918d8a8ae593b2db203ab905a889>
Peter Maydell 於 2026/2/16 下午 06:53 寫道:
Quoted 29 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 5 lines · Kuan-Jui Chiu
The new CADENCE UART driver in upstream kernel access BXRS register This patch adds BXRS (RX FIFO byte status register) or there would be kernel panic if user are using the new CADENCE UART driver
Signed-off-by Kuan-Jui Chiu <[email protected]>Hi; thanks for this patch.
hw/char/cadence_uart.c line 123
Quoted 9 lines
hw/char/cadence_uart.c +1
-0@@ -120,6 +120,7 @@#define R_PMIN (0x3C/4)#define R_PWID (0x40/4)#define R_TTRIG (0x44/4) +#define R_RXBS (0x48/4)Where is this register documented? The
cadence_uart.cfile references the Zynq 7000 Soc TRM UG585; its URL for that is out of date, but looking at the copy on the AMD website, there is a table giving the register summary for the UART:
https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
and it lists only registers from offsets 0 to0x44.thanks
-- PMM
Quoted 38 lines · Kuan-Jui Chiu
Hi
I was referring this commit of upstream kernel which xilinx added BXRS register in Cadence UART driver
serial: xuartps: Adds RXBS register support for zynqmp · torvalds/linux@3816b2f
<
https://github.com/torvalds/linux/commit/3816b2f886d0918d8a8ae593b2db203ab905a889Quoted 1 line
Peter Maydell 於 2026/2/16 下午 06:53 寫道:
Quoted 1 line
CAUTION: This email originated from outside of the organization. Do not
click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 10 lines · Kuan-Jui Chiu
Quoted 5 lines
The new CADENCE UART driver in upstream kernel access BXRS register This patch adds BXRS (RX FIFO byte status register) or there would be kernel panic if user are using the new CADENCE UART driver
Signed-off-by Kuan-Jui Chiu <[email protected]>Hi; thanks for this patch.
Quoted 14 lines
hw/char/cadence_uart.c line 123
Quoted 9 lines
hw/char/cadence_uart.c +1
-0@@ -120,6 +120,7 @@#define R_PMIN (0x3C/4)#define R_PWID (0x40/4)#define R_TTRIG (0x44/4) +#define R_RXBS (0x48/4)Where is this register documented? The
cadence_uart.cfile references the Zynq 7000 Soc TRM UG585; its URL for that is out of date, but looking at the copy on the AMD website, there is a table giving the register summary for the UART:
Quoted 6 lines
https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
Quoted 4 lines
and it lists only registers from offsets 0 to
0x44.thanks
-- PMM
Hi,
There's documentation here for zynqmp:
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/Rx_FIFO_byte_status-UART-Register
I haven't looked to carefully, it may be a register that didn't exist in the version of the UART on zynq and was added in the version of the uart in the zynqmp.
Cheers,
Edgar
Quoted 22 lines · Edgar E. Iglesias
Quoted 17 lines · Kuan-Jui Chiu
Hi
I was referring this commit of upstream kernel which xilinx added BXRS register in Cadence UART driver
serial: xuartps: Adds RXBS register support for zynqmp · torvalds/linux@3816b2f
<https://github.com/torvalds/linux/commit/3816b2f886d0918d8a8ae593b2db203ab905a889>Peter Maydell 於 2026/2/16 下午 06:53 寫道:
Quoted 6 lines
Where is this register documented? The
cadence_uart.cfile references the Zynq 7000 Soc TRM UG585; its URL for that is out of date, but looking at the copy on the AMD website, there is a table giving the register summary for the UART:
https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
and it lists only registers from offsets 0 to0x44.
Quoted 4 lines
There's documentation here for zynqmp:
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/Rx_FIFO_byte_status-UART-RegisterI haven't looked to carefully, it may be a register that didn't exist in the version of the UART on zynq and was added in the version of the uart in the zynqmp.
Thanks. On the subject of Xilinx specs, do you have an opinion on
https://gitlab.com/qemu-project/qemu/-/issues/3297 ? Our Xilinx AXI ethernet device model lets software write to the PHY registers for the PHY ID, and it's not clear to me whether these registers are supposed to be read-only or not.
thanks
-- PMM
Quoted 32 lines · Peter Maydell
Quoted 5 lines · Edgar E. Iglesias
Quoted 1 line · Kuan-Jui Chiu
Quoted 7 lines
Quoted 7 lines
Hi
I was referring this commit of upstream kernel which xilinx added BXRS register in Cadence UART driver
serial: xuartps: Adds RXBS register support for zynqmp · torvalds/linux@3816b2f
<https://github.com/torvalds/linux/commit/3816b2f886d0918d8a8ae593b2db203ab905a889
Quoted 9 lines
Quoted 9 lines
Peter Maydell 於 2026/2/16 下午 06:53 寫道:
Quoted 5 lines
Where is this register documented? The
cadence_uart.cfile references the Zynq 7000 Soc TRM UG585; its URL for that is out of date, but looking at the copy on the AMD website, there is a table giving the register summary for the UART:https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
Quoted 4 lines
Quoted 1 line
Quoted 1 line
and it lists only registers from offsets 0 to
0x44.There's documentation here for zynqmp:
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/Rx_FIFO_byte_status-UART-Register
Quoted 2 lines
I haven't looked to carefully, it may be a register that didn't exist in
Quoted 10 lines
the version of the UART on zynq and was added in the version of the uart in the zynqmp.
Thanks. On the subject of Xilinx specs, do you have an opinion on
https://gitlab.com/qemu-project/qemu/-/issues/3297 ? Our Xilinx AXI ethernet device model lets software write to the PHY registers for the PHY ID, and it's not clear to me whether these registers are supposed to be read-only or not.
Yes, they should be read-only, there's probably more registers and fields that have the wrong access restrictions as well. The PHY model is super simple, created just to get guests to not get stuck on boot or fail to use the PHY...
IIRC, there's been several attempts on list to create a better MDIO/PHY interface with shared PHY models but never got merged.
Cheers,
Edgar
Quoted 52 lines · Edgar E. Iglesias
Quoted 32 lines · Peter Maydell
Quoted 5 lines · Edgar E. Iglesias
Quoted 1 line · Kuan-Jui Chiu
Quoted 7 lines
Quoted 7 lines
Hi
I was referring this commit of upstream kernel which xilinx added BXRS register in Cadence UART driver
serial: xuartps: Adds RXBS register support for zynqmp · torvalds/linux@3816b2f
<https://github.com/torvalds/linux/commit/3816b2f886d0918d8a8ae593b2db203ab905a889
Quoted 9 lines
Quoted 9 lines
Peter Maydell 於 2026/2/16 下午 06:53 寫道:
Quoted 5 lines
Where is this register documented? The
cadence_uart.cfile references the Zynq 7000 Soc TRM UG585; its URL for that is out of date, but looking at the copy on the AMD website, there is a table giving the register summary for the UART:https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
Quoted 4 lines
Quoted 1 line
Quoted 1 line
and it lists only registers from offsets 0 to
0x44.There's documentation here for zynqmp:
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/Rx_FIFO_byte_status-UART-Register
Quoted 2 lines
I haven't looked to carefully, it may be a register that didn't exist
Quoted 10 lines
in the version of the UART on zynq and was added in the version of the uart in the zynqmp.
Thanks. On the subject of Xilinx specs, do you have an opinion on
https://gitlab.com/qemu-project/qemu/-/issues/3297 ? Our Xilinx AXI ethernet device model lets software write to the PHY registers for the PHY ID, and it's not clear to me whether these registers are supposed to be read-only or not.Yes, they should be read-only, there's probably more registers and fields that have the wrong access restrictions as well. The PHY model is super simple, created just to get guests to not get stuck on boot or fail to use the PHY...
Quoted 6 lines
IIRC, there's been several attempts on list to create a better MDIO/PHY interface with shared PHY models but never got merged.
Cheers,
Edgar
For example:
https://patchew.org/QEMU/[email protected]/
Hi
Do I need to take further action on this patch?
B.R.
Howard
Edgar E. Iglesias 於 2026/3/4 上午 03:04 寫道:
Quoted 70 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
On Tue, Mar 3, 2026 at 12:59 PM Edgar E. Iglesias <[email protected]> wrote:
On Tue, Mar 3, 2026 at 12:44 PM Peter Maydell
<[email protected]> wrote:On Tue, 3 Mar 2026 at 18:32, Edgar E. Iglesias <[email protected]> wrote:
>
>
>
> On Tue, Mar 3, 2026 at 2:33 AM Kuan-Jui Chiu <[email protected]> wrote:
>>
>> Hi
>>
>> I was referring this commit of upstream kernel which xilinx added BXRS
>> register in Cadence UART driver
>> serial: xuartps: Adds RXBS register support for zynqmp · >> torvalds/linux@3816b2f
>>
<https://github.com/torvalds/linux/commit/3816b2f886d0918d8a8ae593b2db203ab905a889>
>>
>> Peter Maydell 於 2026/2/16 下午 06:53 寫道:>> > Where is this register documented? The
cadence_uart.cfile >> > references the Zynq 7000 Soc TRM UG585; its URL for that >> > is out of date, but looking at the copy on the AMD website, >> > there is a table giving the register summary for the UART:
>> >
https://docs.amd.com/r/en-US/ug585-zynq-7000-SoC-TRM/UART-Controller-UART
>> > and it lists only registers from offsets 0 to0x44.> There's documentation here for zynqmp:
>
https://docs.amd.com/r/en-US/ug1087-zynq-ultrascale-registers/Rx_FIFO_byte_status-UART-Register
>
> I haven't looked to carefully, it may be a register that didn't exist in the version of the UART on zynq and was added in the version of the uart in the zynqmp.Thanks. On the subject of Xilinx specs, do you have an opinion on
https://gitlab.com/qemu-project/qemu/-/issues/3297 ? Our Xilinx AXI ethernet device model lets software write to the PHY registers for the PHY ID, and it's not clear to me whether these registers are supposed to be read-only or not.Yes, they should be read-only, there's probably more registers and fields that have the wrong access restrictions as well. The PHY model is super simple, created just to get guests to not get stuck on boot or fail to use the PHY...
IIRC, there's been several attempts on list to create a better MDIO/PHY interface with shared PHY models but never got merged.
Cheers,
EdgarFor example:
https://patchew.org/QEMU/[email protected]/
Quoted 4 lines · Kuan-Jui Chiu
Hi
Do I need to take further action on this patch?
It sounds from what Edgar says that there are multiple versions of this hardware device, which suggests that we ought to have the device have a "version" property or something similar so we can select the right behaviour for zynq and zynqmp.
Checking whether there's anything else missing in the new version of the device might also be a good idea.
-- PMM
Hi Edgar
Could you send me more document about the new version of Cadence UART device? I am not familiar with zynqmp so I don't know if anything missing except for BXRS register
B.R.
Howard
Peter Maydell 於 2026/4/24 下午 04:16 寫道:
Quoted 17 lines
CAUTION: This email originated from outside of the organization. Do not click links or open attachments unless you recognize the sender and know the content is safe.
Quoted 3 lines · Kuan-Jui Chiu
Hi
Do I need to take further action on this patch?
It sounds from what Edgar says that there are multiple versions of this hardware device, which suggests that we ought to have the device have a "version" property or something similar so we can select the right behaviour for zynq and zynqmp.
Checking whether there's anything else missing in the new version of the device might also be a good idea.
-- PMM