Skip to content

Commit ef2c5ef

Browse files
Hieu Nguyennhutnguyenkc
authored andcommitted
hal: renesas: rza: Change the cast type from uint32_t to uintptr_t
Change the cast type from uint32_t to uintptr_t when assigning an address to a register in the DMAC FSP driver of the RZ/A3UL to avoid build warnings Signed-off-by: Hieu Nguyen <[email protected]> Signed-off-by: Nhut Nguyen <[email protected]>
1 parent d352ada commit ef2c5ef

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

drivers/rz/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,3 +97,8 @@ Patch List:
9797
FSP MMU functions and let Zephyr handle MMU
9898
Impacted files:
9999
drivers/rz/fsp/src/rza/bsp/mcu/rza3ul/bsp_feature.h
100+
101+
* Change the cast type from uint32_t to uintptr_t when assigning an address to a register in the
102+
DMAC FSP driver of the RZ/A3UL to avoid build warnings
103+
Impacted files:
104+
drivers/rz/fsp/src/rza/r_dmac/r_dmac.c

drivers/rz/fsp/src/rza/r_dmac/r_dmac.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ fsp_err_t R_DMAC_LinkDescriptorSet (transfer_ctrl_t * const p_api_ctrl, dmac_lin
259259
#else
260260

261261
/* Set address of the link destination */
262-
p_ctrl->p_reg->NXLA = (uint32_t) p_descriptor;
262+
p_ctrl->p_reg->NXLA = (uintptr_t) p_descriptor;
263263
#endif
264264

265265
err = r_dmac_prv_enable(p_ctrl);
@@ -504,8 +504,8 @@ fsp_err_t R_DMAC_Reload (transfer_ctrl_t * const p_api_ctrl,
504504
R_MMU_VAtoPA(&g_mmu_ctrl, va, (void *) &pa);
505505
p_ctrl->p_reg->N1DA = (uint32_t) pa;
506506
#else
507-
p_ctrl->p_reg->N1SA = p_src_cast;
508-
p_ctrl->p_reg->N1DA = p_dest_cast;
507+
p_ctrl->p_reg->N1SA = (uintptr_t) p_src_cast;
508+
p_ctrl->p_reg->N1DA = (uintptr_t) p_dest_cast;
509509
#endif
510510
p_ctrl->p_reg->N1TB = num_transfers;
511511
}
@@ -520,8 +520,8 @@ fsp_err_t R_DMAC_Reload (transfer_ctrl_t * const p_api_ctrl,
520520
R_MMU_VAtoPA(&g_mmu_ctrl, va, (void *) &pa);
521521
p_ctrl->p_reg->N0DA = (uint32_t) pa;
522522
#else
523-
p_ctrl->p_reg->N0SA = p_src_cast;
524-
p_ctrl->p_reg->N0DA = p_dest_cast;
523+
p_ctrl->p_reg->N0SA = (uintptr_t) p_src_cast;
524+
p_ctrl->p_reg->N0DA = (uintptr_t) p_dest_cast;
525525
#endif
526526
p_ctrl->p_reg->N0TB = num_transfers;
527527
}
@@ -794,7 +794,7 @@ static void r_dmac_config_transfer_info_link_mode (dmac_instance_ctrl_t * p_ctrl
794794
#else
795795

796796
/* Set address of the link destination */
797-
p_ctrl->p_reg->NXLA = (uint32_t) (p_extend->p_descriptor);
797+
p_ctrl->p_reg->NXLA = (uintptr_t) (p_extend->p_descriptor);
798798
#endif
799799

800800
/* Store current descriptor. */

0 commit comments

Comments
 (0)