yangsong8-a1 opened a new pull request, #21803:
URL: https://github.com/apache/nuttx/pull/21803
## Summary
Some platforms, e.g. the ACRN hypervisor and PC-style UARTs, only raise the
serial interrupt when OUT2 in MCR is set. Linux and Windows always set it.
- Make CONFIG_16550_SET_MCR_OUT2 default to y, and drop the now redundant
`CONFIG_16550_SET_MCR_OUT2=y` from the am62x and rk3588 defconfigs.
- Then remove the option: u16550_setup() always sets OUT2, with a single MCR
read-modify-write shared with the flow control setup.
- Remove the intel64 uart_putreg() workaround that forced OUT2 on every MCR
write. It only took effect if something wrote MCR, which qemu-intel64:nsh
(no flow control, option off) never did.
## Impact
All 16550 users now get OUT2 set in u16550_setup(). Boards that already set
the option (BeaglePlay, PocketBeagle2, Orange Pi 5 Pro) and x86_64 behave as
before. On other boards OUT2 is usually an unused auxiliary output; a board
that wires OUT2 to something else would see it asserted after setup.
CONFIG_16550_SET_MCR_OUT2 no longer exists.
## Testing
Ubuntu 22.04, gcc 13.1, aarch64-none-elf-gcc 13.2, riscv64-unknown-elf-gcc.
Builds, no warnings: qemu-intel64:nsh, qemu-intel64:nsh_pci_smp,
qemu-i486:nsh, beagleplay:nsh, pocketbeagle2:nsh, orangepi-5-pro:nsh,
avaota-a1:nsh, rv-virt:nsh. With the first two commits beagleplay:nsh and
qemu-intel64:nsh get `CONFIG_16550_SET_MCR_OUT2=y` from the default; after
the last commit the symbol is gone from the generated .config.
qemu-intel64:nsh on QEMU 6.2 (KVM) with `-trace serial_write`, typing
`help`, `echo RXOK_X` and `uname -a` on the console:
| | apache/master | This PR |
|---|---|---|
| MCR (offset 4) writes | none, OUT2 never set | one write, `addr 0x04 val
0x08` |
| Console RX/TX | works | works |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]