This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

DRA756: How to disable J6 emmc power save mode.

Part Number: DRA756

Hi experts:

Our customer need use PON (Power off notification) function at their project. Micron eMMC when received PON command -- CMD6, Micron emmc need long time to process the PON command. But J6 emmc driver will stop eMMC_CLK very quickly. So micron emmc can not successful finish PON command.

Could you please suggest how to disable J6 emmc power save mode? We have try to modify omap_hsmmc_set_ios() power_off case and delete all those POWER_OFF function. it can not keep eMMC send out clock.

Best Regars!

Han Tao

  • Hi Tao Han,

    Could you share the procedure you are using to test Power Off Notification on Linux?

    Regards,
    Vishal

  • Hi Han Tao,

    In Linux Kernel omap_hsmmc driver we don't think there is an issue handling power off notification.

    -1-
    In poweroff_notify timeout is correctly chosen based on SHORT or LONG

    static int mmc_poweroff_notify(struct mmc_card *card, unsigned int notify_type)
    {
            unsigned int timeout = card->ext_csd.generic_cmd6_time;
            int err;
    
            /* Use EXT_CSD_POWER_OFF_SHORT as default notification type. */
            if (notify_type == EXT_CSD_POWER_OFF_LONG)
                    timeout = card->ext_csd.power_off_longtime;
    
            err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,
                            EXT_CSD_POWER_OFF_NOTIFICATION,
                            notify_type, timeout, true, false, false);
            if (err)
                    pr_err("%s: Power Off Notification timed out, %u\n",
                           mmc_hostname(card->host), timeout);
    
            /* Disable the power off notification after the switch operation. */
            card->ext_csd.power_off_notification = EXT_CSD_NO_POWER_NOTIFICATION;
    
            return err;
    }

    -2-
    In __mmc_switch API, this timeout is stored as busy_timeout

    int __mmc_switch(struct mmc_card *card, u8 set, u8 index, u8 value,
                    unsigned int timeout_ms, bool use_busy_signal, bool send_status,
                    bool ignore_crc)
    {
    .
    .
                    cmd.busy_timeout = timeout_ms;
    

    -3-
    In omap_hsmmc driver, this busy_timeout is used as data timeout.

    static int
    omap_hsmmc_prepare_data(struct omap_hsmmc_host *host, struct mmc_request *req)
    {
            int ret;
            unsigned long long timeout;
    
            host->data = req->data;
    
            if (req->data == NULL) {
                    OMAP_HSMMC_WRITE(host->base, BLK, 0);
                    if (req->cmd->flags & MMC_RSP_BUSY) {
                            timeout = req->cmd->busy_timeout * NSEC_PER_MSEC;
    
                            /*
                             * Set an arbitrary 100ms data timeout for commands with
                             * busy signal and no indication of busy_timeout.
                             */
                            if (!timeout)
                                    timeout = 100000000U;
    
                            set_data_timeout(host, timeout, 0);
                   }
                    return 0;
            }
    




    Regards,
    Vishal

  • Hi Vishal:

    Thanks for your help.

    Except your provided driver modify. At linux PSDK release use below command can continue send out MMC clock.

    With below command, now can continue send out eMMC_CLK at EVM board. Believe this method can work.

    dd if=/dev/mmcblk0 of=/dev/null count=1000000 &

    omapconf write 0x480B4010 0x14

    omapconf write 0x480b4110 0x130C

    omapconf write 0x480b412C 0x118620

    Best Regards!

    Han Tao