Defining buses and memory-addressable devices

Buses are typically defined by the compatible property or the simple-bus property (to define a memory-mapped bus with no specific driver binding), or both. The simple-bus property is needed so that child nodes to the bus are registered as platform devices.

For example, the soc node is defined as follows:

soc { 
    compatible = "simple-bus"; 
    #address-cells = <1>; 
    #size-cells = <1>; 
    ranges; 
 
    aips-bus@02000000 { /* AIPS1 */ 
        compatible = "fsl,aips-bus", "simple-bus"; 
        reg = <0x02000000 0x100000>; 
    } 
} 

The properties on the soc node are used to specify the memory addressability of the child nodes:

  • address-cells: This property indicates how many base address cells are needed in the reg property.
  • size-cells: This property indicates how many size cells are needed in the reg property.
  • ranges: This one describes an address translation between parent and child buses. In here, there is no translation and parent and child addressing are identical.

In this case, any child of soc needs to define its memory addressing with a reg property that contains one cell for the address and one cell for the size. The aips-bus node does that with the following property:

reg = <0x02000000 0x100000>; 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset