class RangesProperty

Defined at line 349 of file ../../zircon/kernel/lib/devicetree/include/lib/devicetree/devicetree.h

Public Methods

std::optional<RangesProperty> Create (uint32_t num_address_cells, uint32_t num_size_cells, uint32_t num_parent_address_cells, ByteView bytes)

Defined at line 220 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (uint32_t num_address_cells, uint32_t num_size_cells, uint32_t num_parent_address_cells, ByteView bytes)

Defined at line 220 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (uint32_t num_address_cells, uint32_t num_size_cells, uint32_t num_parent_address_cells, ByteView bytes)

Defined at line 220 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (uint32_t num_address_cells, uint32_t num_size_cells, uint32_t num_parent_address_cells, ByteView bytes)

Defined at line 220 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (const PropertyDecoder & decoder, ByteView bytes)

Defined at line 235 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (const PropertyDecoder & decoder, ByteView bytes)

Defined at line 235 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (const PropertyDecoder & decoder, ByteView bytes)

Defined at line 235 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<RangesProperty> Create (const PropertyDecoder & decoder, ByteView bytes)

Defined at line 235 of file ../../zircon/kernel/lib/devicetree/devicetree.cc

std::optional<uint64_t> TranslateChildAddress (uint64_t address)

Returns the translated address from a child address to parent address.

Essentially a ranges property dictates how addresses in child nodes are translated

into parent node address range. For example:

'/' {

foo {

ranges =

<

0 123 4>

<

4 256 4>

bar {

reg =

<

0 2>

}

}

If we wanted to translate the register bank of device node |bar|, we would need to use the

ranges property, such that the child bus address is translated to the parent bus address (in

this case, this is the root), To achieve that would look for the first range where the address

would fit, in this case that is the first range. This range tells us that child addresses from

[0, 4] are at offset 123 from the parent bus address, so the parent address for 'bar' node

would be '123 + 0'. This address would then be used for mmio access in the case of register

banks.

Defined at line 376 of file ../../zircon/kernel/lib/devicetree/include/lib/devicetree/devicetree.h

std::optional<uint64_t> TranslateChildAddress (uint64_t address)

Returns the translated address from a child address to parent address.

Essentially a ranges property dictates how addresses in child nodes are translated

into parent node address range. For example:

'/' {

foo {

ranges =

<

0 123 4>

<

4 256 4>

bar {

reg =

<

0 2>

}

}

If we wanted to translate the register bank of device node |bar|, we would need to use the

ranges property, such that the child bus address is translated to the parent bus address (in

this case, this is the root), To achieve that would look for the first range where the address

would fit, in this case that is the first range. This range tells us that child addresses from

[0, 4] are at offset 123 from the parent bus address, so the parent address for 'bar' node

would be '123 + 0'. This address would then be used for mmio access in the case of register

banks.

Defined at line 376 of file ../../zircon/kernel/lib/devicetree/include/lib/devicetree/devicetree.h