]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/amdgpu: Set FRU bus for Aldebaran and Vega 20
authorLuben Tuikov <luben.tuikov@amd.com>
Fri, 4 Feb 2022 18:35:51 +0000 (13:35 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 7 Feb 2022 22:59:53 +0000 (17:59 -0500)
The FRU and RAS EEPROMs share the same I2C bus on Aldebaran and Vega 20
ASICs. Set the FRU bus "pointer" to this single bus, as access to the FRU
is sought through that bus "pointer" and not through the RAS bus "pointer".

Cc: Roy Sun <Roy.Sun@amd.com>
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Fixes: 2f60dd50769efc ("drm/amd: Expose the FRU SMU I2C bus")
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
Reviewed-by: Alex Deucher <Alexander.Deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/smu_v11_0_i2c.c
drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

index 87acb089cfccd5502d93a09e72cbaee6fd20ccad..dd2d66090d23749c318eab2fe7a93c76cb8be205 100644 (file)
@@ -741,7 +741,7 @@ int smu_v11_0_i2c_control_init(struct amdgpu_device *adev)
        i2c_set_adapdata(control, smu_i2c);
 
        adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
-       adev->pm.fru_eeprom_i2c_bus = NULL;
+       adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
 
        res = i2c_add_adapter(control);
        if (res)
@@ -756,6 +756,7 @@ void smu_v11_0_i2c_control_fini(struct amdgpu_device *adev)
 
        i2c_del_adapter(control);
        adev->pm.ras_eeprom_i2c_bus = NULL;
+       adev->pm.fru_eeprom_i2c_bus = NULL;
 }
 
 /*
index ba4c9771ffc56b6eadee9c2bc87c9a941eb9b84b..3d96d4af92d97fe105a037eb949fbc56fdb7918b 100644 (file)
@@ -1583,6 +1583,7 @@ static int aldebaran_i2c_control_init(struct smu_context *smu)
        }
 
        adev->pm.ras_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
+       adev->pm.fru_eeprom_i2c_bus = &adev->pm.smu_i2c[0].adapter;
 
        return 0;
 Out_err: