Lines Matching refs:unit
41 def _dt_units_to_scale(unit): argument
42 if not unit:
44 if unit in {'k', 'K'}:
46 if unit in {'m', 'M'}:
48 if unit in {'g', 'G'}:
50 if unit in {'kb', 'Kb'}:
52 if unit in {'mb', 'Mb'}:
54 if unit in {'gb', 'Gb'}:
167 def _node_reg_addr(node, index, unit): argument
180 return node.regs[int(index)].addr >> _dt_units_to_scale(unit)
183 def _node_reg_size(node, index, unit): argument
196 return node.regs[int(index)].size >> _dt_units_to_scale(unit)
199 def _node_int_prop(node, prop, unit=None): argument
224 return node.props[prop].val >> _dt_units_to_scale(unit)
227 def _node_array_prop(node, prop, index=0, unit=None): argument
250 return node.props[prop].val[int(index)] >> _dt_units_to_scale(unit)
252 def _node_ph_array_prop(node, prop, index, cell, unit=None): argument
278 return node.props[prop].val[int(index)].data[cell] >> _dt_units_to_scale(unit)
280 def _dt_chosen_reg_addr(kconf, chosen, index=0, unit=None): argument
301 return _node_reg_addr(node, index, unit)
304 def _dt_chosen_reg_size(kconf, chosen, index=0, unit=None): argument
325 return _node_reg_size(node, index, unit)
328 def dt_chosen_reg(kconf, name, chosen, index=0, unit=None): argument
334 return str(_dt_chosen_reg_size(kconf, chosen, index, unit))
336 return hex(_dt_chosen_reg_size(kconf, chosen, index, unit))
338 return str(_dt_chosen_reg_addr(kconf, chosen, index, unit))
340 return hex(_dt_chosen_reg_addr(kconf, chosen, index, unit))
343 def _dt_chosen_partition_addr(kconf, chosen, index=0, unit=None): argument
371 return _node_reg_addr(p_node.parent, index, unit) + _node_reg_addr(node, 0, unit)
374 def dt_chosen_partition_addr(kconf, name, chosen, index=0, unit=None): argument
380 return str(_dt_chosen_partition_addr(kconf, chosen, index, unit))
382 return hex(_dt_chosen_partition_addr(kconf, chosen, index, unit))
385 def _dt_node_reg_addr(kconf, path, index=0, unit=None): argument
408 return _node_reg_addr(node, index, unit)
411 def _dt_node_reg_size(kconf, path, index=0, unit=None): argument
434 return _node_reg_size(node, index, unit)
437 def dt_node_reg(kconf, name, path, index=0, unit=None): argument
443 return str(_dt_node_reg_size(kconf, path, index, unit))
445 return hex(_dt_node_reg_size(kconf, path, index, unit))
447 return str(_dt_node_reg_addr(kconf, path, index, unit))
449 return hex(_dt_node_reg_addr(kconf, path, index, unit))
451 def dt_nodelabel_reg(kconf, name, label, index=0, unit=None): argument
464 return str(_dt_node_reg_size(kconf, node.path, index, unit)) if node else "0"
466 return hex(_dt_node_reg_size(kconf, node.path, index, unit)) if node else "0x0"
468 return str(_dt_node_reg_addr(kconf, node.path, index, unit)) if node else "0"
470 return hex(_dt_node_reg_addr(kconf, node.path, index, unit)) if node else "0x0"
577 def dt_node_int_prop(kconf, name, path, prop, unit=None): argument
603 return str(_node_int_prop(node, prop, unit))
605 return hex(_node_int_prop(node, prop, unit))
608 def dt_node_array_prop(kconf, name, path, prop, index, unit=None): argument
630 return str(_node_array_prop(node, prop, index, unit))
632 return hex(_node_array_prop(node, prop, index, unit))
635 def dt_node_ph_array_prop(kconf, name, path, prop, index, cell, unit=None): argument
659 return str(_node_ph_array_prop(node, prop, index, cell, unit))
661 return hex(_node_ph_array_prop(node, prop, index, cell, unit))