nuttx/arch
Marco Casaroli 459c4b7f60 arch/rp23xx: Fix six register/bit macro name clashes.
The rp23xx hardware headers define a register address macro for every
register, then a block of register bit definitions.  In three headers a bit
definition reuses the name of a register address macro, so the register
address is silently redefined as a bit mask:

  RP23XX_POWMAN_BADPASSWD           address 0x40100000 -> (1 << 0)
  RP23XX_POWMAN_BOD_CTRL            address 0x40100018 -> (1 << 12)
  RP23XX_POWMAN_DBG_PWRCFG          address 0x401000a4 -> (1 << 0)
  RP23XX_BUSCTRL_BUS_PRIORITY_ACK   address 0x40068004 -> (1 << 0)
  RP23XX_BUSCTRL_PERFCTR_EN         address 0x40068008 -> (1 << 0)
  RP23XX_PADS_QSPI_VOLTAGE_SELECT   address 0x40040000 -> (1 << 0)

None of these headers has an in-tree user yet, which is why this has gone
unnoticed; each clash appears as a "macro redefined" warning as soon as a
driver includes the header.  Code that included one of them and used the
register by name would have dereferenced 1 or 0x1000 instead of the register.

Two of the POWMAN clashes were plain duplicates.  Per the RP2350 datasheet
BOD_CTRL bit 12 is ISOLATE and DBG_PWRCFG bit 0 is IGNORE, and the correctly
named RP23XX_POWMAN_BOD_CTRL_ISOLATE and RP23XX_POWMAN_DBG_PWRCFG_IGNORE were
already defined with the same values on the following lines, so the bare names
are simply removed.  The blank line separating the VREG_LP_EXIT and BOD_CTRL
groups is restored at the same time; its absence is what let the duplicate
hide inside the preceding group.

The other four are single field registers whose field carries no separate name
(the datasheet and the SDK describe each as a one bit register), so their bit
definitions are renamed to <REGISTER>_MASK, following the _MASK spelling these
headers already use for a field extent, and written in hex like their peers.

The rp23xx-rv copies of the three headers are identical to the arm ones and
carry the same clashes, so they get the same change and stay in sync.

No functional change: none of the six names has any user in the tree.

Assisted-by: Claude Code:claude-opus-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
2026-08-03 23:17:05 +08:00
..
arm arch/rp23xx: Fix six register/bit macro name clashes. 2026-08-03 23:17:05 +08:00
arm64 arch/arm64: nxstyle fix Relative files path 2026-08-03 23:15:16 +08:00
avr arch/avr/src/avrdx/avrdx_delay: add custom up_udelay function 2026-06-17 17:10:02 +08:00
ceva arch/ceva: Replace board_app_initialize 2026-05-02 18:36:46 +08:00
dummy
hc style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
mips drivers: Fix comment typos — 'Pubic' → 'Public' across drivers and headers. 2026-07-04 02:00:24 +08:00
misoc include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
or1k include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
renesas drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-08-03 17:23:22 +08:00
risc-v arch/rp23xx: Fix six register/bit macro name clashes. 2026-08-03 23:17:05 +08:00
sim fs/dirent: add d_ino member to struct dirent 2026-08-03 20:58:39 +08:00
sparc drivers: Fix comment typos — 'Pubic' → 'Public' across drivers and headers. 2026-07-04 02:00:24 +08:00
tricore arch/tricore: nxstyle fix Relative files path 2026-08-03 23:15:16 +08:00
x86 drivers/efuse/efuse: Drivers Registered With World Write Permissions(Part 1) 2026-08-03 17:23:22 +08:00
x86_64 !include/fcntl.h: align open flags with Linux values 2026-07-03 10:33:47 +08:00
xtensa drivers/: Multiple Drivers Are Registered With World Writable - Part 2 2026-08-03 17:23:22 +08:00
z16 include/debug.h: Move to include/nuttx/debug.h 2026-04-07 07:50:06 -03:00
z80 style: fix checkpatch issues after debug.h move 2026-04-07 07:50:06 -03:00
CMakeLists.txt
Kconfig sched/clock/clock_delay: added config flag to remove weak up_udelay 2026-06-17 17:10:02 +08:00