mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-09-03 10:33:11 +02:00
MLK-17253-1: crypto: caam: Fix computation of SM pages addresses
The computation of the base address of the physical and virtual need to be the same depending on the architecture. The addresses are computed using a pointer on u8 so the additions always works as expected. Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com> Signed-off-by: Vipul Kumar <vipul_kumar@mentor.com>
This commit is contained in:
parent
ba233fce69
commit
bb87424812
|
@ -1112,11 +1112,11 @@ int caam_sm_startup(struct platform_device *pdev)
|
|||
(pgstat & SMCS_PAGE_MASK) >> SMCS_PAGE_SHIFT;
|
||||
lpagedesc[page].own_part =
|
||||
(pgstat & SMCS_PART_SHIFT) >> SMCS_PART_MASK;
|
||||
lpagedesc[page].pg_base = ctrlpriv->sm_base +
|
||||
((smpriv->page_size * page) / sizeof(u32));
|
||||
lpagedesc[page].pg_base = (u8 *)ctrlpriv->sm_base +
|
||||
(smpriv->page_size * page);
|
||||
/* FIXME: get base address from platform property... */
|
||||
lpagedesc[page].pg_phys = (u32 *)0x00100000 +
|
||||
((smpriv->page_size * page) / sizeof(u32));
|
||||
lpagedesc[page].pg_phys = (u8 *)0x00100000 +
|
||||
(smpriv->page_size * page);
|
||||
lpagect++;
|
||||
#ifdef SM_DEBUG
|
||||
dev_info(smdev,
|
||||
|
|
Loading…
Reference in New Issue
Block a user