[Accton] Support 0x56 device access via onlp_sfpi_dev_writew/readw #993
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Allow access to Marvell PHY device (0x56) through the following APIs:
onlp_sfpi_dev_readw(int port, uint8_t devaddr, uint8_t addr)
onlp_sfpi_dev_writew(int port, uint8_t devaddr, uint8_t addr, uint16_t value)
onlp_sfpi_dev_read(int port, uint8_t devaddr, uint8_t addr, uint8_t* rdata, int size)
onlp_sfpi_dev_write(int port, uint8_t devaddr, uint8_t addr, uint8_t* data, int size)
Parameter Descriptions:
port
: Range from 0 to 47, specifies the port number.devaddr
: Device address, fixed to 0x56 for the Marvell PHY device.addr
: Register address, range from 0 to 0x1F.value
: Register value to write, formatted as (High byte << 8) | (Low byte).rdata
: Pointer to the buffer where register values will be read into.data
: Pointer to the buffer containing the register values to be written.size
: Must be greater than 0 and an even value.