@@ -20,7 +20,7 @@ static int amd_sfh_wait_response(struct amd_mp2_dev *mp2, u8 sid, u32 cmd_id)
2020 struct sfh_cmd_response cmd_resp ;
2121
2222 /* Get response with status within a max of 10000 ms timeout */
23- if (!readl_poll_timeout (mp2 -> mmio + AMD_P2C_MSG ( 0 ), cmd_resp .resp ,
23+ if (!readl_poll_timeout (mp2 -> mmio + amd_get_p2c_val ( mp2 , 0 ), cmd_resp .resp ,
2424 (cmd_resp .response .response == 0 &&
2525 cmd_resp .response .cmd_id == cmd_id && (sid == 0xff ||
2626 cmd_resp .response .sensor_id == sid )), 500 , 10000000 ))
@@ -39,7 +39,7 @@ static void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor
3939 cmd_base .cmd .sub_cmd_value = 1 ;
4040 cmd_base .cmd .sensor_id = info .sensor_idx ;
4141
42- writel (cmd_base .ul , privdata -> mmio + AMD_C2P_MSG ( 0 ));
42+ writel (cmd_base .ul , privdata -> mmio + amd_get_c2p_val ( privdata , 0 ));
4343}
4444
4545static void amd_stop_sensor (struct amd_mp2_dev * privdata , u16 sensor_idx )
@@ -52,8 +52,8 @@ static void amd_stop_sensor(struct amd_mp2_dev *privdata, u16 sensor_idx)
5252 cmd_base .cmd .sub_cmd_value = 1 ;
5353 cmd_base .cmd .sensor_id = sensor_idx ;
5454
55- writeq (0x0 , privdata -> mmio + AMD_C2P_MSG ( 1 ));
56- writel (cmd_base .ul , privdata -> mmio + AMD_C2P_MSG ( 0 ));
55+ writeq (0x0 , privdata -> mmio + amd_get_c2p_val ( privdata , 1 ));
56+ writel (cmd_base .ul , privdata -> mmio + amd_get_c2p_val ( privdata , 0 ));
5757}
5858
5959static void amd_stop_all_sensor (struct amd_mp2_dev * privdata )
@@ -66,7 +66,7 @@ static void amd_stop_all_sensor(struct amd_mp2_dev *privdata)
6666 /* 0xf indicates all sensors */
6767 cmd_base .cmd .sensor_id = 0xf ;
6868
69- writel (cmd_base .ul , privdata -> mmio + AMD_C2P_MSG ( 0 ));
69+ writel (cmd_base .ul , privdata -> mmio + amd_get_c2p_val ( privdata , 0 ));
7070}
7171
7272static struct amd_mp2_ops amd_sfh_ops = {
0 commit comments