This is an automated email from Gerrit.

"Tomas Vanek <van...@fbl.cz>" just uploaded a new patch set to Gerrit, which 
you can find at https://review.openocd.org/c/openocd/+/8810

-- gerrit

commit 3cc06c8cda4c29f9c41ee6232df1d39ffeb080de
Author: Tomas Vanek <van...@fbl.cz>
Date:   Fri Mar 21 21:56:39 2025 +0100

    flash/nor/rp2xxx: define macro BOOTROM_MAGIC_MASK
    
    and use it instead of magic value.
    
    Change-Id: I5d006aaf990d4ef3a82e622b1e41cd2bfec359f7
    Signed-off-by: Tomas Vanek <van...@fbl.cz>
    Reported-by: Antonio Borneo <borneo.anto...@gmail.com>

diff --git a/src/flash/nor/rp2xxx.c b/src/flash/nor/rp2xxx.c
index 25c9adb6c0..31b17c942a 100644
--- a/src/flash/nor/rp2xxx.c
+++ b/src/flash/nor/rp2xxx.c
@@ -16,6 +16,7 @@
 #define BOOTROM_RP2040_MAGIC 0x01754d
 /* this is 'M' 'u', 2 (version) */
 #define BOOTROM_RP2350_MAGIC 0x02754d
+#define BOOTROM_MAGIC_MASK      0xffffff
 #define BOOTROM_MAGIC_ADDR 0x00000010
 
 #define MAKE_TAG(a, b) (((b)<<8) | a)
@@ -368,7 +369,7 @@ static int rp2xxx_lookup_rom_symbol(struct target *target, 
uint16_t tag, uint16_
                return err;
 
        /* Ignore version */
-       magic &= 0xffffff;
+       magic &= BOOTROM_MAGIC_MASK;
 
        if (magic == BOOTROM_RP2350_MAGIC) {
                /* Distinguish old-style RP2350 ROM table (A0, and earlier A1 
builds)

-- 

Reply via email to