Skip to content

Commit

Permalink
devices/legacy: import PL011 for aarch64
Browse files Browse the repository at this point in the history
Import a PL011 implementation and use it when building for aarch64.
While it's techicanlly possible to use a mmio 8250/16550 UART on
aarch64, it's more common to have a PL011, and software such as EDK2 is
built on top of this expectation.

Signed-off-by: Sergio Lopez <[email protected]>
  • Loading branch information
slp committed Feb 6, 2024
1 parent c16ffcf commit 6ef599c
Show file tree
Hide file tree
Showing 7 changed files with 464 additions and 13 deletions.
3 changes: 2 additions & 1 deletion src/arch/src/aarch64/fdt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,8 @@ fn create_serial_node<T: DeviceInfoForFDT + Clone + Debug>(
let irq = generate_prop32(&[GIC_FDT_IRQ_TYPE_SPI, dev_info.irq(), IRQ_TYPE_EDGE_RISING]);

let node = fdt.begin_node(&format!("uart@{:x}", dev_info.addr()))?;
fdt.property_string("compatible", "ns16550a")?;
fdt.property_string("compatible", "arm,pl011")?;
fdt.property_string("status", "okay")?;
fdt.property("reg", &serial_reg_prop)?;
fdt.property_u32("clocks", CLOCK_PHANDLE)?;
fdt.property_string("clock-names", "apb_pclk")?;
Expand Down
1 change: 1 addition & 0 deletions src/devices/src/legacy/aarch64/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pub mod serial;
Loading

0 comments on commit 6ef599c

Please sign in to comment.