You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by "kasjer (via GitHub)" <gi...@apache.org> on 2023/07/12 06:13:16 UTC

[GitHub] [mynewt-core] kasjer opened a new pull request, #3036: hw/drivers/mmc: Fix Multiple Block Read CMD18

kasjer opened a new pull request, #3036:
URL: https://github.com/apache/mynewt-core/pull/3036

   This PR:
   - fixes CMD18 multiple block read where read control token and CRC were handled correctly only if single block was read
   - adds code that switches to higher speed after initialization (was marked as TODO:)
   


-- 
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


[GitHub] [mynewt-core] kasjer merged pull request #3036: hw/drivers/mmc: Fix Multiple Block Read CMD18

Posted by "kasjer (via GitHub)" <gi...@apache.org>.
kasjer merged PR #3036:
URL: https://github.com/apache/mynewt-core/pull/3036


-- 
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


[GitHub] [mynewt-core] sjanc commented on a diff in pull request #3036: hw/drivers/mmc: Fix Multiple Block Read CMD18

Posted by "sjanc (via GitHub)" <gi...@apache.org>.
sjanc commented on code in PR #3036:
URL: https://github.com/apache/mynewt-core/pull/3036#discussion_r1262721572


##########
hw/drivers/mmc/src/mmc.c:
##########
@@ -173,36 +162,34 @@ send_mmc_cmd(struct mmc_cfg *mmc, uint8_t cmd, uint32_t payload)
  * @param spi_num Number of the SPI channel to be used by MMC
  * @param spi_cfg Low-level device specific SPI configuration
  * @param ss_pin Number of SS pin if SW controlled, -1 otherwise
- * @param mmc_spi_cfg 
  *
  * @return 0 on success, non-zero on failure
  */
 int
-mmc_init(int spi_num, void *spi_cfg, int ss_pin)
+mmc_init(int spi_num, struct mmc_spi_cfg *spi_cfg, int ss_pin)
 {
     int rc;
     int i;
     uint8_t status;
     uint8_t cmd_resp[4];
     uint32_t ocr;
     os_time_t timeout;
-    struct mmc_cfg *mmc;
-
     /* TODO: create new struct for every new spi mmc, add to SLIST */
-    mmc = &g_mmc_cfg;
-    mmc->spi_num = spi_num;
+    struct mmc_cfg *mmc = &g_mmc_cfg;
     mmc->ss_pin = ss_pin;
-    mmc->spi_cfg = spi_cfg;
-    mmc->settings = &mmc_settings;
+    mmc->mmc_spi_cfg = *(struct mmc_spi_cfg *)spi_cfg;

Review Comment:
   nitpick: this cast is no longer needed (as spi_cfg is not void * anymore)



-- 
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