“f7bd1761a0a32575845785d562bf855e84f97940”上不存在“...fluid/contrib/git@gitcode.net:paddlepaddle/Paddle.git”
提交 fabe01d7 编写于 作者: J John Clements 提交者: Alex Deucher

drm/amdgpu: disabled fru eeprom access

added asic support checking function to be filled in by supported asic types
Reviewed-by: NHawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: NJohn Clements <john.clements@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 1f02c97b
...@@ -29,6 +29,13 @@ ...@@ -29,6 +29,13 @@
#define I2C_PRODUCT_INFO_ADDR_SIZE 0x2 #define I2C_PRODUCT_INFO_ADDR_SIZE 0x2
#define I2C_PRODUCT_INFO_OFFSET 0xC0 #define I2C_PRODUCT_INFO_OFFSET 0xC0
bool is_fru_eeprom_supported(struct amdgpu_device *adev)
{
/* TODO: Resolve supported ASIC type */
return false;
}
int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr, int amdgpu_fru_read_eeprom(struct amdgpu_device *adev, uint32_t addrptr,
unsigned char *buff) unsigned char *buff)
{ {
...@@ -71,6 +78,9 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev) ...@@ -71,6 +78,9 @@ int amdgpu_fru_get_product_info(struct amdgpu_device *adev)
unsigned char buff[32]; unsigned char buff[32];
int addrptr = 0, size = 0; int addrptr = 0, size = 0;
if (!is_fru_eeprom_supported(adev))
return 0;
/* If algo exists, it means that the i2c_adapter's initialized */ /* If algo exists, it means that the i2c_adapter's initialized */
if (!adev->pm.smu_i2c.algo) { if (!adev->pm.smu_i2c.algo) {
DRM_WARN("Cannot access FRU, EEPROM accessor not initialized"); DRM_WARN("Cannot access FRU, EEPROM accessor not initialized");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册