Name

cec_phys_addr_for_input — calculate the PA for an input

Synopsis

u16 cec_phys_addr_for_input (u16 phys_addr,
 u8 input);
 

Arguments

phys_addr

the physical address of the parent

input

the number of the input port, must be between 1 and 15

Description

This function calculates a new physical address based on the input port number. For example:

PA = 0.0.0.0 and input = 2 becomes 2.0.0.0

PA = 3.0.0.0 and input = 1 becomes 3.1.0.0

PA = 3.2.1.0 and input = 5 becomes 3.2.1.5

PA = 3.2.1.3 and input = 5 becomes f.f.f.f since it maxed out the depth.

Return

the new physical address or CEC_PHYS_ADDR_INVALID.