linguini1 commented on code in PR #17208:
URL: https://github.com/apache/nuttx/pull/17208#discussion_r2462909372
##########
arch/arm/src/samv7/sam_mcan.c:
##########
@@ -4380,14 +4381,10 @@ struct can_dev_s *sam_mcan_initialize(int port)
/* Get the revision of the chip (A or B) */
-#ifdef CONFIG_ARCH_CHIP_PIC32CZCA70
- /* PIC32CZ CA70 series always have revision B MCAN */
-
- priv->rev = 1;
-#else
- regval = getreg32(SAM_CHIPID_CIDR);
- priv->rev = regval & CHIPID_CIDR_VERSION_MASK;
-#endif
+ if (sam_has_revb_periphs())
+ {
+ priv->rev = 1;
Review Comment:
I see, I'm not familiar with the contents of `SAM_CHIPID_CIDR` but I assumed
the version could be multiple non-zero things.
--
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]