jerpelea opened a new pull request, #19647:
URL: https://github.com/apache/nuttx/pull/19647

   ## Summary
   
   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.
   
   ## Impact
   
   RELEASE
   
   ## Testing
   
   CI


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to