You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2022/05/04 13:52:21 UTC

[GitHub] [mynewt-core] kasjer commented on a diff in pull request #2827: da1469x: hal_flash: Autodetect and configure flash

kasjer commented on code in PR #2827:
URL: https://github.com/apache/mynewt-core/pull/2827#discussion_r864843767


##########
hw/mcu/dialog/da1469x/src/hal_flash.c:
##########
@@ -395,35 +396,121 @@ da1469x_hff_sector_info(const struct hal_flash *dev, int idx,
     return 0;
 }
 
-#if MYNEWT_VAL(MCU_QSPIC_APP_CFG)
+#if MYNEWT_VAL(RAM_RESIDENT)
+struct qspi_qe_config {
+    uint8_t length;
+    uint8_t bytes[2];
+};
+
+struct qspi_flash_config {
+    uint32_t id;
+    uint32_t cmda;
+    uint32_t cmdb;
+    struct qspi_qe_config qe;
+};
+
+static const struct qspi_flash_config rdids[] =
+{
+    { .id = 0xc86015,                       /* gigaflash */

Review Comment:
   Probably should be gigadevice in comment.
   
   I would also move rdids to bsp as it is very picky about what flash can be detected and I think that BSP is more suitable for this. If someone wanted to have different flash we would need to modify this file again.
   
   Alternatively maybe it is enough to check vendor id (c8, or c2 and maybe Winbond) to determine how to enable quad mode. I guess vendor devices with different sizes still have same bit for enabling quad mode.
   



-- 
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@mynewt.apache.org

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