| 705 | } |
| 706 | |
| 707 | fn 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 | |
| 723 | fn create_timer_node(fdt: &mut FdtWriter) -> FdtWriterResult<()> { |
| 724 | // See |