You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/03/11 18:26:52 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #5720: arch: Merge up_arch.h into up_internal.h

xiaoxiang781216 opened a new pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720


   ## Summary
   
   ## Impact
   Code refactor
   
   ## Testing
   Pass 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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko merged pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720


   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825567007



##########
File path: arch/sparc/src/common/up_internal.h
##########
@@ -175,6 +182,12 @@ extern uint32_t _bmxdupba_address;   /* BMX register setting */
  * functions prototyped in include/nuttx/arch.h.
  */
 
+/* Atomic modification of registers */
+
+void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
+void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
+void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
+

Review comment:
       But `/* Common Functions *********************************************************/` is before this block in all other place:
    https://github.com/apache/incubator-nuttx/pull/5720/files?file-filters%5B%5D=.h&show-deleted-files=true&show-viewed-files=true#diff-206bf33ecfcef35eb3b5bf095ebc866558dc44a86ec3bfcf099295c304c944e3R181-R193
   https://github.com/apache/incubator-nuttx/blob/master/arch/xtensa/src/common/xtensa.h#L217-L228




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#issuecomment-1066019262


   > looks like `USB_DmaDesc` has to be `g_usbddesc`
   
   Done.


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825371300



##########
File path: arch/arm/src/lpc54xx/lpc54_emc.c
##########
@@ -388,7 +387,7 @@ void lpc54_emc_sdram_initialize(
 
   putreg32(2 * EMC_REFRESH_CLOCK_SCALE, LPC54_EMC_DYNREFRESH);
 
-  for (i = 0; i < EMC_SDRAM_WAIT_CYCLES / 2; i ++)
+  for (i = 0; i < EMC_SDRAM_WAIT_CYCLES / 2; i++)

Review comment:
       ```suggestion
     for (j = 0; j < EMC_SDRAM_WAIT_CYCLES / 2; j++)
   ```




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825384473



##########
File path: arch/arm/src/armv7-m/mpu.h
##########
@@ -33,8 +33,6 @@
 #  include <stdbool.h>
 #  include <assert.h>
 #  include <debug.h>
-
-#  include "arm_arch.h"

Review comment:
       Don't, since mpu.h doesn't use putregx/getregx/modifyregx.
   Instead, I add the inclusion here:
   https://github.com/apache/incubator-nuttx/blob/master/arch/arm/src/kinetis/kinetis_mpuinit.c#L32




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825384544



##########
File path: arch/arm/src/lpc54xx/lpc54_emc.c
##########
@@ -388,7 +387,7 @@ void lpc54_emc_sdram_initialize(
 
   putreg32(2 * EMC_REFRESH_CLOCK_SCALE, LPC54_EMC_DYNREFRESH);
 
-  for (i = 0; i < EMC_SDRAM_WAIT_CYCLES / 2; i ++)
+  for (i = 0; i < EMC_SDRAM_WAIT_CYCLES / 2; i++)

Review comment:
       Done.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825556113



##########
File path: arch/z80/src/common/z80_internal.h
##########
@@ -73,6 +73,21 @@
 #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
 #define STACK_ALIGN_UP(a)   (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
 
+/* Register access macros ***************************************************
+ *
+ * The register access mechanism provided in ez8.h differs from the useful in
+ * other NuttX architectures. The following NuttX common macros will at least
+ * make the access compatible at the source level (however, strict type check
+ * is lost).
+ */
+
+#define getreg8(a)          (a)
+#define putreg8(v,a)        (a) = (v)
+#define getreg16(a)         (a)
+#define putreg16(v,a)       (a) = (v)
+#define getreg32(a)         (a)
+#define putreg32(v,a)       (a) = (v)

Review comment:
       Done.

##########
File path: arch/z80/src/common/z80_internal.h
##########
@@ -73,6 +73,21 @@
 #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
 #define STACK_ALIGN_UP(a)   (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
 
+/* Register access macros ***************************************************
+ *
+ * The register access mechanism provided in ez8.h differs from the useful in
+ * other NuttX architectures. The following NuttX common macros will at least
+ * make the access compatible at the source level (however, strict type check
+ * is lost).
+ */
+
+#define getreg8(a)          (a)
+#define putreg8(v,a)        (a) = (v)
+#define getreg16(a)         (a)
+#define putreg16(v,a)       (a) = (v)

Review comment:
       Done.

##########
File path: arch/z80/src/common/z80_internal.h
##########
@@ -73,6 +73,21 @@
 #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
 #define STACK_ALIGN_UP(a)   (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
 
+/* Register access macros ***************************************************
+ *
+ * The register access mechanism provided in ez8.h differs from the useful in
+ * other NuttX architectures. The following NuttX common macros will at least
+ * make the access compatible at the source level (however, strict type check
+ * is lost).
+ */
+
+#define getreg8(a)          (a)
+#define putreg8(v,a)        (a) = (v)

Review comment:
       Done.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825362660



##########
File path: arch/arm/src/common/arm_internal.h
##########
@@ -182,6 +182,19 @@
 #define INTSTACK_COLOR 0xdeadbeef
 #define HEAP_COLOR     'h'
 
+#define getreg8(a)     (*(volatile uint8_t *)(a))
+#define putreg8(v,a)   (*(volatile uint8_t *)(a) = (v))
+#define getreg16(a)    (*(volatile uint16_t *)(a))
+#define putreg16(v,a)  (*(volatile uint16_t *)(a) = (v))
+#define getreg32(a)    (*(volatile uint32_t *)(a))
+#define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
+
+/* Non-atomic, but more effective modification of registers */
+
+#define modreg8(v,m,a)  putreg8((getreg8(a) & ~(m)) | ((v) & (m)), a)
+#define modreg16(v,m,a) putreg16((getreg16(a) & ~(m)) | ((v) & (m)), a)
+#define modreg32(v,m,a) putreg32((getreg32(a) & ~(m)) | ((v) & (m)), a)

Review comment:
       ```suggestion
   #define modreg8(v,m,a)  putreg8((getreg8(a) & ~(m)) | ((v) & (m)), (a))
   #define modreg16(v,m,a) putreg16((getreg16(a) & ~(m)) | ((v) & (m)), (a))
   #define modreg32(v,m,a) putreg32((getreg32(a) & ~(m)) | ((v) & (m)), (a))
   ```

##########
File path: arch/arm/src/dm320/dm320_gio.h
##########
@@ -27,7 +27,7 @@
 
 #ifndef __ASSEMBLY__
 # include <stdint.h>
-# include "arm_arch.h"
+# include "arm_internal.h"
 #endif

Review comment:
       ```suggestion
   #endif
   
   #include "arm_internal.h"
   ```




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825360034



##########
File path: arch/arm/src/armv7-m/mpu.h
##########
@@ -33,8 +33,6 @@
 #  include <stdbool.h>
 #  include <assert.h>
 #  include <debug.h>
-
-#  include "arm_arch.h"

Review comment:
       ```suggestion
   #  include "arm_internal.h"
   ```




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] hartmannathan commented on pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
hartmannathan commented on pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#issuecomment-1066957086


   Applied the "breaking change" label as this requires out-of-tree boards that `#include "arm_arch.h"` to remove that include (and `#include "arm_internal.h"` if necessary). I'll add an entry to the draft release notes at: [https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.3](https://cwiki.apache.org/confluence/display/NUTTX/NuttX+10.3). Cheers


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825384473



##########
File path: arch/arm/src/armv7-m/mpu.h
##########
@@ -33,8 +33,6 @@
 #  include <stdbool.h>
 #  include <assert.h>
 #  include <debug.h>
-
-#  include "arm_arch.h"

Review comment:
       Don't, since mpu.h doesn't use putregx/getregx/modifyregx.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#issuecomment-1066975888


   @hartmannathan thank you!


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825360034



##########
File path: arch/arm/src/armv7-m/mpu.h
##########
@@ -33,8 +33,6 @@
 #  include <stdbool.h>
 #  include <assert.h>
 #  include <debug.h>
-
-#  include "arm_arch.h"

Review comment:
       ```suggestion
   #  include "arm_internal.h"
   ```




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825626922



##########
File path: arch/sparc/src/common/up_internal.h
##########
@@ -175,6 +182,12 @@ extern uint32_t _bmxdupba_address;   /* BMX register setting */
  * functions prototyped in include/nuttx/arch.h.
  */
 
+/* Atomic modification of registers */
+
+void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
+void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
+void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
+

Review comment:
       Ok




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825364025



##########
File path: arch/arm/src/armv7-m/mpu.h
##########
@@ -33,8 +33,6 @@
 #  include <stdbool.h>
 #  include <assert.h>
 #  include <debug.h>
-
-#  include "arm_arch.h"

Review comment:
       Do we need to change to `arm_internal.h`?




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825384301



##########
File path: arch/arm/src/common/arm_internal.h
##########
@@ -182,6 +182,19 @@
 #define INTSTACK_COLOR 0xdeadbeef
 #define HEAP_COLOR     'h'
 
+#define getreg8(a)     (*(volatile uint8_t *)(a))
+#define putreg8(v,a)   (*(volatile uint8_t *)(a) = (v))
+#define getreg16(a)    (*(volatile uint16_t *)(a))
+#define putreg16(v,a)  (*(volatile uint16_t *)(a) = (v))
+#define getreg32(a)    (*(volatile uint32_t *)(a))
+#define putreg32(v,a)  (*(volatile uint32_t *)(a) = (v))
+
+/* Non-atomic, but more effective modification of registers */
+
+#define modreg8(v,m,a)  putreg8((getreg8(a) & ~(m)) | ((v) & (m)), a)
+#define modreg16(v,m,a) putreg16((getreg16(a) & ~(m)) | ((v) & (m)), a)
+#define modreg32(v,m,a) putreg32((getreg32(a) & ~(m)) | ((v) & (m)), a)

Review comment:
       Done.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825384453



##########
File path: arch/arm/src/dm320/dm320_gio.h
##########
@@ -27,7 +27,7 @@
 
 #ifndef __ASSEMBLY__
 # include <stdint.h>
-# include "arm_arch.h"
+# include "arm_internal.h"
 #endif

Review comment:
       Done.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825556408



##########
File path: arch/risc-v/src/bl602/bl602_systemreset.c
##########
@@ -68,6 +67,7 @@ void up_systemreset(void)
   asm volatile("csrci mstatus, 8");
 
   bl602_romapi_reset_system();
+  for (; ; );

Review comment:
       Done.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] pkarashchenko commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825506055



##########
File path: arch/risc-v/src/mpfs/mpfs_opensbi.c
##########
@@ -22,25 +22,12 @@
  * Included Files
  ****************************************************************************/
 
-#include <nuttx/config.h>
-#include <assert.h>
-#include <errno.h>
-#include <stdint.h>
-#include "riscv_arch.h"
-
 #include <hardware/mpfs_plic.h>
 #include <hardware/mpfs_memorymap.h>
 #include <hardware/mpfs_clint.h>
 #include <hardware/mpfs_sysreg.h>
 
-/* OpenSBI will also define NULL. Undefine NULL in order to avoid warning:
- * 'warning: "NULL" redefined'
- */
-
-#ifdef NULL
-  #undef NULL
-#endif
-
+#include <sbi/riscv_io.h>

Review comment:
       Probably after this PR I will try to renew my changes with OpenSBI NuttX types header file.

##########
File path: arch/sparc/src/common/up_internal.h
##########
@@ -175,6 +182,12 @@ extern uint32_t _bmxdupba_address;   /* BMX register setting */
  * functions prototyped in include/nuttx/arch.h.
  */
 
+/* Atomic modification of registers */
+
+void modifyreg8(unsigned int addr, uint8_t clearbits, uint8_t setbits);
+void modifyreg16(unsigned int addr, uint16_t clearbits, uint16_t setbits);
+void modifyreg32(unsigned int addr, uint32_t clearbits, uint32_t setbits);
+

Review comment:
       Can we move this block before `/* Common Functions *********************************************************/`, just for consistency with other similar changes?

##########
File path: arch/z80/src/common/z80_internal.h
##########
@@ -73,6 +73,21 @@
 #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
 #define STACK_ALIGN_UP(a)   (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
 
+/* Register access macros ***************************************************
+ *
+ * The register access mechanism provided in ez8.h differs from the useful in
+ * other NuttX architectures. The following NuttX common macros will at least
+ * make the access compatible at the source level (however, strict type check
+ * is lost).
+ */
+
+#define getreg8(a)          (a)
+#define putreg8(v,a)        (a) = (v)
+#define getreg16(a)         (a)
+#define putreg16(v,a)       (a) = (v)

Review comment:
       ```suggestion
   #define putreg16(v,a)       ((a) = (v))
   ```

##########
File path: arch/risc-v/src/bl602/bl602_systemreset.c
##########
@@ -68,6 +67,7 @@ void up_systemreset(void)
   asm volatile("csrci mstatus, 8");
 
   bl602_romapi_reset_system();
+  for (; ; );

Review comment:
       ```suggestion
   
     /* Wait for the reset */
   
     for (; ; );
   ```

##########
File path: boards/arm/sama5/sama5d4-ek/src/sam_sdram.c
##########
@@ -274,7 +273,7 @@ static void sam_config_slaveddr(void)
  *   "Two DDR2/SDRAM (MT47H64M16HR) used as main system memory (256 MByte).
  *   The board includes 2 Gbits of on-board solderedDDR2 (double data rate)
  *   SDRAM. The footprints can also host two DDR2 (MT47H128M16RT) from
- *   Micron� for a total of 512 MBytes of DDR2 memory. The memory bus is 32
+ *   Micron� for a total of 512 MBytes of DDR2 memory. The memory bus is 32

Review comment:
       Please revert or replace with something meaningful 

##########
File path: arch/z80/src/common/z80_internal.h
##########
@@ -73,6 +73,21 @@
 #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
 #define STACK_ALIGN_UP(a)   (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
 
+/* Register access macros ***************************************************
+ *
+ * The register access mechanism provided in ez8.h differs from the useful in
+ * other NuttX architectures. The following NuttX common macros will at least
+ * make the access compatible at the source level (however, strict type check
+ * is lost).
+ */
+
+#define getreg8(a)          (a)
+#define putreg8(v,a)        (a) = (v)

Review comment:
       ```suggestion
   #define putreg8(v,a)        ((a) = (v))
   ```

##########
File path: arch/z80/src/common/z80_internal.h
##########
@@ -73,6 +73,21 @@
 #define STACK_ALIGN_DOWN(a) ((a) & ~STACK_ALIGN_MASK)
 #define STACK_ALIGN_UP(a)   (((a) + STACK_ALIGN_MASK) & ~STACK_ALIGN_MASK)
 
+/* Register access macros ***************************************************
+ *
+ * The register access mechanism provided in ez8.h differs from the useful in
+ * other NuttX architectures. The following NuttX common macros will at least
+ * make the access compatible at the source level (however, strict type check
+ * is lost).
+ */
+
+#define getreg8(a)          (a)
+#define putreg8(v,a)        (a) = (v)
+#define getreg16(a)         (a)
+#define putreg16(v,a)       (a) = (v)
+#define getreg32(a)         (a)
+#define putreg32(v,a)       (a) = (v)

Review comment:
       ```suggestion
   #define putreg32(v,a)       ((a) = (v))
   ```




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5720: arch: Merge up_arch.h into up_internal.h

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5720:
URL: https://github.com/apache/incubator-nuttx/pull/5720#discussion_r825555833



##########
File path: boards/arm/sama5/sama5d4-ek/src/sam_sdram.c
##########
@@ -274,7 +273,7 @@ static void sam_config_slaveddr(void)
  *   "Two DDR2/SDRAM (MT47H64M16HR) used as main system memory (256 MByte).
  *   The board includes 2 Gbits of on-board solderedDDR2 (double data rate)
  *   SDRAM. The footprints can also host two DDR2 (MT47H128M16RT) from
- *   Micron� for a total of 512 MBytes of DDR2 memory. The memory bus is 32
+ *   Micron� for a total of 512 MBytes of DDR2 memory. The memory bus is 32

Review comment:
       Done.




-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org