MCPcopy Create free account
hub / github.com/cloud-hypervisor/cloud-hypervisor / create_clock_node

Function create_clock_node

arch/src/aarch64/fdt.rs:707–721  ·  view source on GitHub ↗
(fdt: &mut FdtWriter)

Source from the content-addressed store, hash-verified

705}
706
707fn create_clock_node(fdt: &mut FdtWriter) -> FdtWriterResult<()> {
708 // The Advanced Peripheral Bus (APB) is part of the Advanced Microcontroller Bus Architecture
709 // (AMBA) protocol family. It defines a low-cost interface that is optimized for minimal power
710 // consumption and reduced interface complexity.
711 // PCLK is the clock source and this node defines exactly the clock for the APB.
712 let clock_node = fdt.begin_node("apb-pclk")?;
713 fdt.property_string("compatible", "fixed-clock")?;
714 fdt.property_u32("#clock-cells", 0x0)?;
715 fdt.property_u32("clock-frequency", 24000000)?;
716 fdt.property_string("clock-output-names", "clk24mhz")?;
717 fdt.property_u32("phandle", CLOCK_PHANDLE)?;
718 fdt.end_node(clock_node)?;
719
720 Ok(())
721}
722
723fn create_timer_node(fdt: &mut FdtWriter) -> FdtWriterResult<()> {
724 // See

Callers 1

create_fdtFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected