Commit 4aa906f1 authored by Vasyl Gomonovych's avatar Vasyl Gomonovych Committed by Miquel Raynal

mtd: cadence: Fix cast to pointer from integer of different size warning

Use dma_addr_t type to pass memory address and control data in
DMA descriptor fields memory_pointer and ctrl_data_ptr
To fix warning: cast to pointer from integer of different size
Signed-off-by: default avatarVasyl Gomonovych <gomonovych@gmail.com>
Acked-by: default avatarOlof Johansson <olof@lixom.net>
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
parent 4114b17a
...@@ -914,8 +914,8 @@ static void cadence_nand_get_caps(struct cdns_nand_ctrl *cdns_ctrl) ...@@ -914,8 +914,8 @@ static void cadence_nand_get_caps(struct cdns_nand_ctrl *cdns_ctrl)
/* Prepare CDMA descriptor. */ /* Prepare CDMA descriptor. */
static void static void
cadence_nand_cdma_desc_prepare(struct cdns_nand_ctrl *cdns_ctrl, cadence_nand_cdma_desc_prepare(struct cdns_nand_ctrl *cdns_ctrl,
char nf_mem, u32 flash_ptr, char *mem_ptr, char nf_mem, u32 flash_ptr, dma_addr_t mem_ptr,
char *ctrl_data_ptr, u16 ctype) dma_addr_t ctrl_data_ptr, u16 ctype)
{ {
struct cadence_nand_cdma_desc *cdma_desc = cdns_ctrl->cdma_desc; struct cadence_nand_cdma_desc *cdma_desc = cdns_ctrl->cdma_desc;
...@@ -931,13 +931,13 @@ cadence_nand_cdma_desc_prepare(struct cdns_nand_ctrl *cdns_ctrl, ...@@ -931,13 +931,13 @@ cadence_nand_cdma_desc_prepare(struct cdns_nand_ctrl *cdns_ctrl,
cdma_desc->command_flags |= CDMA_CF_DMA_MASTER; cdma_desc->command_flags |= CDMA_CF_DMA_MASTER;
cdma_desc->command_flags |= CDMA_CF_INT; cdma_desc->command_flags |= CDMA_CF_INT;
cdma_desc->memory_pointer = (uintptr_t)mem_ptr; cdma_desc->memory_pointer = mem_ptr;
cdma_desc->status = 0; cdma_desc->status = 0;
cdma_desc->sync_flag_pointer = 0; cdma_desc->sync_flag_pointer = 0;
cdma_desc->sync_arguments = 0; cdma_desc->sync_arguments = 0;
cdma_desc->command_type = ctype; cdma_desc->command_type = ctype;
cdma_desc->ctrl_data_ptr = (uintptr_t)ctrl_data_ptr; cdma_desc->ctrl_data_ptr = ctrl_data_ptr;
} }
static u8 cadence_nand_check_desc_error(struct cdns_nand_ctrl *cdns_ctrl, static u8 cadence_nand_check_desc_error(struct cdns_nand_ctrl *cdns_ctrl,
...@@ -1280,8 +1280,7 @@ cadence_nand_cdma_transfer(struct cdns_nand_ctrl *cdns_ctrl, u8 chip_nr, ...@@ -1280,8 +1280,7 @@ cadence_nand_cdma_transfer(struct cdns_nand_ctrl *cdns_ctrl, u8 chip_nr,
} }
cadence_nand_cdma_desc_prepare(cdns_ctrl, chip_nr, page, cadence_nand_cdma_desc_prepare(cdns_ctrl, chip_nr, page,
(void *)dma_buf, (void *)dma_ctrl_dat, dma_buf, dma_ctrl_dat, ctype);
ctype);
status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr); status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
...@@ -1360,7 +1359,7 @@ static int cadence_nand_erase(struct nand_chip *chip, u32 page) ...@@ -1360,7 +1359,7 @@ static int cadence_nand_erase(struct nand_chip *chip, u32 page)
cadence_nand_cdma_desc_prepare(cdns_ctrl, cadence_nand_cdma_desc_prepare(cdns_ctrl,
cdns_chip->cs[chip->cur_cs], cdns_chip->cs[chip->cur_cs],
page, NULL, NULL, page, 0, 0,
CDMA_CT_ERASE); CDMA_CT_ERASE);
status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr); status = cadence_nand_cdma_send_and_wait(cdns_ctrl, thread_nr);
if (status) { if (status) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment