@@ -550,9 +550,9 @@ static int ufshcd_map_sg(struct ufshcd_lrb *lrbp)
prd_table[i].size =
cpu_to_le32(((u32) sg_dma_len(sg))-1);
prd_table[i].base_addr =
- cpu_to_le32(sg->dma_address);
+ cpu_to_le32(lower_32_bits(sg->dma_address));
prd_table[i].upper_addr =
- cpu_to_le32((sg->dma_address >> 32));
+ cpu_to_le32(upper_32_bits(sg->dma_address));
}
} else {
lrbp->utr_descriptor_ptr->prd_table_length = 0;
@@ -826,9 +826,9 @@ static void ufshcd_host_memory_configure(struct ufs_hba *hba)
cmd_desc_element_addr =
(cmd_desc_dma_addr + (cmd_desc_size * i));
utrdlp[i].command_desc_base_addr_lo =
- cpu_to_le32(cmd_desc_element_addr);
+ cpu_to_le32(lower_32_bits(cmd_desc_element_addr));
utrdlp[i].command_desc_base_addr_hi =
- cpu_to_le32(cmd_desc_element_addr >> 32);
+ cpu_to_le32(upper_32_bits(cmd_desc_element_addr));
/* Response upiu and prdt offset should be in double words */
utrdlp[i].response_upiu_offset =
@@ -1034,11 +1034,11 @@ static int ufshcd_initialize_hba(struct ufs_hba *hba)
/* Configure UTRL and UTMRL base address registers */
writel(hba->utrdl_dma_addr,
(hba->mmio_base + REG_UTP_TRANSFER_REQ_LIST_BASE_L));
- writel((hba->utrdl_dma_addr >> 32),
+ writel(lower_32_bits(hba->utrdl_dma_addr),
(hba->mmio_base + REG_UTP_TRANSFER_REQ_LIST_BASE_H));
writel(hba->utmrdl_dma_addr,
(hba->mmio_base + REG_UTP_TASK_REQ_LIST_BASE_L));
- writel((hba->utmrdl_dma_addr >> 32),
+ writel(upper_32_bits(hba->utmrdl_dma_addr),
(hba->mmio_base + REG_UTP_TASK_REQ_LIST_BASE_H));
/* Initialize unipro link startup procedure */