OPAL_LPC_READ¶
#define OPAL_LPC_READ 67
/*
* Address cycle types for LPC accesses. These also correspond
* to the content of the first cell of the "reg" property for
* device nodes on the LPC bus
*/
enum OpalLPCAddressType {
OPAL_LPC_MEM = 0,
OPAL_LPC_IO = 1,
OPAL_LPC_FW = 2,
};
int64_t opal_lpc_read(uint32_t chip_id, enum OpalLPCAddressType addr_type,
uint32_t addr, uint32_t *data, uint32_t sz);
This function related to Low Pin Count (LPC) bus. This function reads the
data from IDSEL register for chip_id, which has LPC information.
From addr for addr_type with read size sz bytes in to a
variable named data.
Parameters¶
chip_idThe
chip_idparameter contains value of the chip number identified at boot time.addr_typeThe
addr_typeis one of the LPC supported address types. Supported address types are:LPC memory,
LPC IO and
LPC firmware.
addrThe
addrfrom which the data has to be read.dataThe
datawill be used to store the read data.szHow many
szbytes to be read in todata.
Return Codes¶
- OPAL_PARAMETER
Indicates either
chip_idnot found orchip_iddoesn’t contain LPC information.- OPAL_SUCCESS
Indicates Success!
OPAL_LPC_WRITE¶
#define OPAL_LPC_WRITE 68
/*
* Address cycle types for LPC accesses. These also correspond
* to the content of the first cell of the "reg" property for
* device nodes on the LPC bus
*/
enum OpalLPCAddressType {
OPAL_LPC_MEM = 0,
OPAL_LPC_IO = 1,
OPAL_LPC_FW = 2,
};
int64_t opal_lpc_write(uint32_t chip_id, enum OpalLPCAddressType addr_type,
uint32_t addr, uint32_t data, uint32_t sz);
This function related to Low Pin Count (LPC) bus. This function writes the
data in to ECCB register for chip_id, which has LPC information.
From addr for addr_type with write size sz bytes.
Parameters¶
chip_idThe
chip_idparameter contains value of the chip number identified at boot time.addr_typeThe
addr_typeis one of the address types LPC supported. Supported address types are:LPC memory,
LPC IO and
LPC firmware.
addrThe
addrto where thedataneed to be written.dataThe
datafor writing.szHow many
szbytes to write.
Return Codes¶
- OPAL_PARAMETER
Indicates either
chip_idnot found orchip_iddoesn’t contain LPC information.- OPAL_SUCCESS
Indicates Success!