]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/amd/powerplay: delete SMUM_WRITE_FIELD
authorRex Zhu <Rex.Zhu@amd.com>
Wed, 20 Sep 2017 09:18:16 +0000 (17:18 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 19:14:32 +0000 (15:14 -0400)
the macro is as same as PHM_WRITE_FIELD

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/powerplay/inc/smumgr.h
drivers/gpu/drm/amd/powerplay/smumgr/ci_smc.c
drivers/gpu/drm/amd/powerplay/smumgr/iceland_smumgr.c
drivers/gpu/drm/amd/powerplay/smumgr/smu7_smumgr.c

index 10d745737e05611db27ad45d1036acdc44ce2996..4433e0024cf9e4e097ac18d36841960ef444c4a8 100644 (file)
@@ -185,9 +185,6 @@ extern bool smum_is_hw_avfs_present(struct pp_hwmgr *hwmgr);
                SMUM_GET_FIELD(cgs_read_ind_register(device, port, ix##reg), \
                        reg, field)
 
-#define SMUM_WRITE_FIELD(device, reg, field, fieldval)            \
-               cgs_write_register(device, mm##reg, \
-               SMUM_SET_FIELD(cgs_read_register(device, mm##reg), reg, field, fieldval))
 
 #define SMUM_WRITE_VFPF_INDIRECT_FIELD(device, port, reg, field, fieldval)    \
                cgs_write_ind_register(device, port, ix##reg, \
index 75ee6233c624c6a2288f586acb4914edbc303269..5c531eb96648ae68b9adec3ffb5625b6ad924ce7 100644 (file)
@@ -104,7 +104,7 @@ static int ci_set_smc_sram_address(struct pp_hwmgr *hwmgr,
        }
 
        cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_0, smc_addr);
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
        return 0;
 }
 
@@ -2322,14 +2322,14 @@ static int ci_load_smc_ucode(struct pp_hwmgr *hwmgr)
        }
 
        cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_0, start_addr);
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 1);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 1);
 
        for (; byte_count >= 4; byte_count -= 4) {
                data = (src[0] << 24) | (src[1] << 16) | (src[2] << 8) | src[3];
                cgs_write_register(hwmgr->device, mmSMC_IND_DATA_0, data);
                src += 4;
        }
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
        if (0 != byte_count) {
                pr_err("SMC size must be dividable by 4\n");
index fe57335152d529fd3039654effee5cb38c8baf91..b729a393e5887675a8a91ecd0a29ab5680507f8b 100644 (file)
@@ -97,7 +97,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
        PP_ASSERT_WITH_CODE((limit >= byte_count), "SMC address is beyond the SMC RAM area.", return -EINVAL);
 
        cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_0, start_addr);
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 1);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 1);
 
        while (byte_count >= 4) {
                data = src[0] * 0x1000000 + src[1] * 0x10000 + src[2] * 0x100 + src[3];
@@ -106,7 +106,7 @@ static int iceland_upload_smc_firmware_data(struct pp_hwmgr *hwmgr,
                byte_count -= 4;
        }
 
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_0, 0);
 
        PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);
 
index 0f23e238c5f1b266a0cafe287617c4cda2dc71db..af5c4d30cf3e796314c41ba20bd87daad1153567 100644 (file)
@@ -40,7 +40,7 @@ static int smu7_set_smc_sram_address(struct pp_hwmgr *hwmgr, uint32_t smc_addr,
        PP_ASSERT_WITH_CODE((limit > (smc_addr + 3)), "SMC addr is beyond the SMC RAM area.", return -EINVAL);
 
        cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_11, smc_addr);
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0); /* on ci, SMC_IND_ACCESS_CNTL is different */
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0); /* on ci, SMC_IND_ACCESS_CNTL is different */
        return 0;
 }
 
@@ -506,12 +506,12 @@ static int smu7_upload_smc_firmware_data(struct pp_hwmgr *hwmgr, uint32_t length
        PP_ASSERT_WITH_CODE((limit >= byte_count), "SMC address is beyond the SMC RAM area.", return -EINVAL);
 
        cgs_write_register(hwmgr->device, mmSMC_IND_INDEX_11, 0x20000);
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 1);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 1);
 
        for (; byte_count >= 4; byte_count -= 4)
                cgs_write_register(hwmgr->device, mmSMC_IND_DATA_11, *src++);
 
-       SMUM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
+       PHM_WRITE_FIELD(hwmgr->device, SMC_IND_ACCESS_CNTL, AUTO_INCREMENT_IND_11, 0);
 
        PP_ASSERT_WITH_CODE((0 == byte_count), "SMC size must be dividable by 4.", return -EINVAL);