What's New - 2024.1 English

Porting Guide for embeddedsw Components System Device Tree Based Build Flow (UG1647)

Document ID
Release Date
2024.1 English

The following changes are new to this flow:

  • The open source system device tree specifications borrows heavily from Linux device tree specifications. These specifications do not have the concept of Device IDs to identify between similar peripherals. As an example, in the legacy flow, if there are two Ethernet MACs in a system from the same vendor, each MAC would be assigned a separate Device ID. The Device IDs are positive integers starting from 0. The driver config structure always has a field u16 DeviceId that represents the assigned Device ID.
    Important: The system device tree based flow does not use Device ID and hence driver Config structures do not have an entry for Device ID.

    In the new flow, driver Config structures have an entry for char *Name that stores the Compatible String(s) for the corresponding device. This compatible property along with the base address of the device are used the uniquely identify a device in a system. For more details refer to Porting a Driver.

  • The system device tree based flow abstracts interrupt handling through a wrapper. In the legacy flow, driver users had the responsibility to figure out the interrupt controller to be initialized (GIC or Soft AXI INTC), which complicated the interrupt controller initialization and handling processes.

    The new flow provides generic APIs that are to be called with the generated interrupt ID available in the driver config structures. The new flow introduces a new entry in the driver Config structure with the name IntrParent that identifies whether the peripheral device is connected to GIC or AXI INTC for interrupt management.

  • The system device tree based flow makes the XilTimer library inclusion mandatory. The XilTimer library abstracts out the timer and sleep handling in bare-metal environments. A typical system can have multiple timer devices which can be used as timers or to implement sleep functionality. The XilTimer provides uniform implementation, therefore you do not have to worry about the underlying hardware timer. For more details, refer to the XilTimer section in BSP and Libraries Document Collection (UG643).