Skip to content

Commit faf88ed

Browse files
Dan Carpenterandersson
authored andcommitted
remoteproc: meson-mx-ao-arc: fix a bit test
The MESON_AO_RPROC_SRAM_USABLE_BITS macro is used like this: if (priv->sram_pa & ~MESON_AO_RPROC_SRAM_USABLE_BITS) { dev_err(dev, "SRAM address contains unusable bits\n"); The problem is that "->sram_pa" is type phys_addr_t which is potentially 64 bits. That means the MESON_AO_RPROC_SRAM_USABLE_BITS macro needs to be a 64 bit type as well to ensure that high 32 bits are cleared. Fixes: 6cb58ea ("remoteproc: meson-mx-ao-arc: Add a driver for the AO ARC remote procesor") Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: Bjorn Andersson <[email protected]> Link: https://lore.kernel.org/r/20211004105257.GA27301@kili
1 parent c842379 commit faf88ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/remoteproc/meson_mx_ao_arc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#define AO_SECURE_REG0_AHB_SRAM_BITS_19_12 GENMASK(15, 8)
4040

4141
/* Only bits [31:20] and [17:14] are usable, all other bits must be zero */
42-
#define MESON_AO_RPROC_SRAM_USABLE_BITS 0xfff3c000
42+
#define MESON_AO_RPROC_SRAM_USABLE_BITS 0xfff3c000ULL
4343

4444
#define MESON_AO_RPROC_MEMORY_OFFSET 0x10000000
4545

0 commit comments

Comments
 (0)