@@ -156,8 +156,8 @@ static int hccs_register_pcc_channel(struct hccs_dev *hdev)
156
156
}
157
157
158
158
if (pcc_chan -> shmem_base_addr ) {
159
- cl_info -> pcc_comm_addr = ( void __force * ) ioremap (
160
- pcc_chan -> shmem_base_addr , pcc_chan -> shmem_size );
159
+ cl_info -> pcc_comm_addr = ioremap (pcc_chan -> shmem_base_addr ,
160
+ pcc_chan -> shmem_size );
161
161
if (!cl_info -> pcc_comm_addr ) {
162
162
dev_err (dev , "Failed to ioremap PCC communication region for channel-%d.\n" ,
163
163
hdev -> chan_id );
@@ -177,7 +177,8 @@ static int hccs_register_pcc_channel(struct hccs_dev *hdev)
177
177
static int hccs_check_chan_cmd_complete (struct hccs_dev * hdev )
178
178
{
179
179
struct hccs_mbox_client_info * cl_info = & hdev -> cl_info ;
180
- struct acpi_pcct_shared_memory * comm_base = cl_info -> pcc_comm_addr ;
180
+ struct acpi_pcct_shared_memory __iomem * comm_base =
181
+ cl_info -> pcc_comm_addr ;
181
182
u16 status ;
182
183
int ret ;
183
184
@@ -199,8 +200,8 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
199
200
struct hccs_desc * desc )
200
201
{
201
202
struct hccs_mbox_client_info * cl_info = & hdev -> cl_info ;
202
- struct acpi_pcct_shared_memory * comm_base = cl_info -> pcc_comm_addr ;
203
- void * comm_space = ( void * )( comm_base + 1 );
203
+ void __iomem * comm_space = cl_info -> pcc_comm_addr +
204
+ sizeof ( struct acpi_pcct_shared_memory );
204
205
struct hccs_fw_inner_head * fw_inner_head ;
205
206
struct acpi_pcct_shared_memory tmp = {0 };
206
207
u16 comm_space_size ;
@@ -212,7 +213,7 @@ static int hccs_pcc_cmd_send(struct hccs_dev *hdev, u8 cmd,
212
213
tmp .command = cmd ;
213
214
/* Clear cmd complete bit */
214
215
tmp .status = 0 ;
215
- memcpy_toio (comm_base , (void * )& tmp ,
216
+ memcpy_toio (cl_info -> pcc_comm_addr , (void * )& tmp ,
216
217
sizeof (struct acpi_pcct_shared_memory ));
217
218
218
219
/* Copy the message to the PCC comm space */
0 commit comments