* HSMMC pending fixes @ 2008-08-18 15:13 Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] OMAP: HSMMC: Check wether board specific suspend / resume exists Jarkko Lavinen 2008-08-18 21:07 ` HSMMC pending fixes Woodruff, Richard 0 siblings, 2 replies; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Jarkko Lavinen Hi alll Here are some pending patches for Omap HSMMC driver. First two patches are PM patches by Jouni Högrander: 1: Do not try to call board specific suspend / resume functions if there is no such. 2: Disable smartidle mode while suspending (workaround) Next four patches are cleanups, slot_name, and cover_state sysfs entries by Francisco Alecrim: 3: Readable output for IRQ status register 4: Re organizing some goto at hsmmc probe 5: Add slot_name entry to sysfs 6: Add sysfs file cover_switch.patch Cheers Jarkko Lavinen omap_hsmmc.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 119 insertions(+), 17 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH] OMAP: HSMMC: Check wether board specific suspend / resume exists 2008-08-18 15:13 HSMMC pending fixes Jarkko Lavinen @ 2008-08-18 15:13 ` Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Disable smartidle mode while suspending (workaround) Jarkko Lavinen 2008-08-18 21:07 ` HSMMC pending fixes Woodruff, Richard 1 sibling, 1 reply; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Högander Jouni, Jarkko Lavinen From: Högander Jouni <jouni.hogander@nokia.com> Do not try to call board specific suspend / resume functions if there is no such. Signed-off-by: Jouni Högander <jouni.hogander@nokia.com> --- drivers/mmc/host/omap_hsmmc.c | 20 ++++++++++++-------- 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index af34871..9462e4c 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -960,11 +960,13 @@ static int omap_mmc_suspend(struct platform_device *pdev, pm_message_t state) OMAP_HSMMC_WRITE(host->base, ISE, 0); OMAP_HSMMC_WRITE(host->base, IE, 0); - ret = host->pdata->suspend(&pdev->dev, host->slot_id); - if (ret) - dev_dbg(mmc_dev(host->mmc), - "Unable to handle MMC board" - " level suspend\n"); + if (host->pdata->suspend) { + ret = host->pdata->suspend(&pdev->dev, host->slot_id); + if (ret) + dev_dbg(mmc_dev(host->mmc), + "Unable to handle MMC board" + " level suspend\n"); + } if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) { OMAP_HSMMC_WRITE(host->base, HCTL, @@ -1013,10 +1015,12 @@ static int omap_mmc_resume(struct platform_device *pdev) dev_dbg(mmc_dev(host->mmc), "Enabling debounce clk failed\n"); - ret = host->pdata->resume(&pdev->dev, host->slot_id); - if (ret) - dev_dbg(mmc_dev(host->mmc), + if (host->pdata->resume) { + ret = host->pdata->resume(&pdev->dev, host->slot_id); + if (ret) + dev_dbg(mmc_dev(host->mmc), "Unmask interrupt failed\n"); + } /* Notify the core to resume the host */ ret = mmc_resume_host(host->mmc); -- 1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] MMC: OMAP: Disable smartidle mode while suspending (workaround) 2008-08-18 15:13 ` [PATCH] OMAP: HSMMC: Check wether board specific suspend / resume exists Jarkko Lavinen @ 2008-08-18 15:13 ` Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Readable output for IRQ status register Jarkko Lavinen 0 siblings, 1 reply; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Högander Jouni, Jarkko Lavinen From: Högander Jouni <jouni.hogander@nokia.com> For some reason mmc doesn't ack idle request if smartidle mode is used. This is just workaround. There is something wrong in driver code or in hw(omap). Signed-off-by: Jouni Högander <jouni.hogander@nokia.com> --- drivers/mmc/host/omap_hsmmc.c | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 9462e4c..e361213 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -58,6 +58,7 @@ #define SDVSCLR 0xFFFFF1FF #define SDVSDET 0x00000400 #define AUTOIDLE 0x1 +#define SMARTIDLE (2 << 3) #define SDBP (1<<8) #define DTO 0xe #define ICE 0x1 @@ -980,6 +981,11 @@ static int omap_mmc_suspend(struct platform_device *pdev, pm_message_t state) | SDBP); } + /* XXX Disable smartidle mode. For some reason + * this is preventing core retention */ + OMAP_HSMMC_WRITE(host->base, SYSCONFIG, + OMAP_HSMMC_READ(host->base, SYSCONFIG) & ~SMARTIDLE); + clk_disable(host->fclk); clk_disable(host->iclk); clk_disable(host->dbclk); @@ -1015,6 +1021,11 @@ static int omap_mmc_resume(struct platform_device *pdev) dev_dbg(mmc_dev(host->mmc), "Enabling debounce clk failed\n"); + /* XXX Enable smartidle mode. For some reason + * this is preventing core retention */ + OMAP_HSMMC_WRITE(host->base, SYSCONFIG, + OMAP_HSMMC_READ(host->base, SYSCONFIG) | SMARTIDLE); + if (host->pdata->resume) { ret = host->pdata->resume(&pdev->dev, host->slot_id); if (ret) -- 1.5.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] MMC: OMAP: Readable output for IRQ status register 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Disable smartidle mode while suspending (workaround) Jarkko Lavinen @ 2008-08-18 15:13 ` Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Jarkko Lavinen 0 siblings, 1 reply; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Francisco Alecrim, Jarkko Lavinen From: Francisco Alecrim <francisco.alecrim@indt.org.br> Readable output for IRQ status register Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br> Acked-by: Anderson Lizardo <anderson.lizardo@indt.org.br> --- drivers/mmc/host/omap_hsmmc.c | 34 ++++++++++++++++++++++++++++++++++ 1 files changed, 34 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index e361213..f5acf91 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -298,6 +298,37 @@ static void mmc_dma_cleanup(struct mmc_omap_host *host) } /* + * Readable error output + */ +#ifdef CONFIG_MMC_DEBUG +static void mmc_omap_report_irq(struct mmc_omap_host *host, u32 status) +{ + /* --- means reserved bit without definition at documentation */ + static const char *mmc_omap_status_bits[] = { + "CC", "TC", "BGE", "---", "BWR", "BRR", "---", "---", "CIRQ", + "OBI", "---", "---", "---", "---", "---", "ERRI", "CTO", "CCRC", + "CEB", "CIE", "DTO", "DCRC", "DEB", "---", "ACE", "---", + "---", "---", "---", "CERR", "CERR", "BADA", "---", "---", "---" + }; + int i; + + dev_dbg(mmc_dev(host->mmc), "MMC IRQ 0x%x :", status); + + for (i = 0; i < ARRAY_SIZE(mmc_omap_status_bits); i++) + if (status & (1 << i)) + /* + * KERN_* facility is not used here because this should + * print a single line. + */ + printk(" %s", mmc_omap_status_bits[i]); + + printk("\n"); + +} +#endif /* CONFIG_MMC_DEBUG */ + + +/* * MMC controller IRQ handler */ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) @@ -317,6 +348,9 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) dev_dbg(mmc_dev(host->mmc), "IRQ Status is %x\n", status); if (status & ERR) { +#ifdef CONFIG_MMC_DEBUG + mmc_omap_report_irq(host, status); +#endif if ((status & CMD_TIMEOUT) || (status & CMD_CRC)) { if (host->cmd) { -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Readable output for IRQ status register Jarkko Lavinen @ 2008-08-18 15:13 ` Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Add slot_name entry to sysfs Jarkko Lavinen 2008-08-21 13:23 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Madhusudhan Chikkature 0 siblings, 2 replies; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Jarkko Lavinen Re-organizing some goto at hsmmc probe. Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br> Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> --- drivers/mmc/host/omap_hsmmc.c | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index f5acf91..824e7e9 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -878,7 +878,7 @@ static int __init omap_mmc_probe(struct platform_device *pdev) host); if (ret) { dev_dbg(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n"); - goto irq_err; + goto err_irq; } /* Request IRQ for card detect */ @@ -888,18 +888,17 @@ static int __init omap_mmc_probe(struct platform_device *pdev) host); if (ret) { dev_dbg(mmc_dev(host->mmc), - "Unable to grab MMC CD IRQ"); - free_irq(host->irq, host); - goto irq_err; + "Unable to grab MMC CD IRQ\n"); + goto err_irq_cd; } } INIT_WORK(&host->mmc_carddetect_work, mmc_omap_detect); if (pdata->init != NULL) { if (pdata->init(&pdev->dev) != 0) { - free_irq(mmc_slot(host).card_detect_irq, host); - free_irq(host->irq, host); - goto irq_err; + dev_dbg(mmc_dev(host->mmc), + "Unable to configure MMC IRQs\n"); + goto err_irq_cd_init; } } @@ -911,8 +910,11 @@ static int __init omap_mmc_probe(struct platform_device *pdev) return 0; -irq_err: - dev_dbg(mmc_dev(host->mmc), "Unable to configure MMC IRQs\n"); +err_irq_cd_init: + free_irq(mmc_slot(host).card_detect_irq, host); +err_irq_cd: + free_irq(host->irq, host); +err_irq: clk_disable(host->fclk); clk_disable(host->iclk); clk_put(host->fclk); -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] MMC: OMAP: Add slot_name entry to sysfs 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Jarkko Lavinen @ 2008-08-18 15:13 ` Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: Add sysfs file cover_switch Jarkko Lavinen 2008-08-21 13:23 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Madhusudhan Chikkature 1 sibling, 1 reply; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Francisco Alecrim, Jarkko Lavinen From: Francisco Alecrim <francisco.alecrim@indt.org.br> Add slot_name entry to sysfs. Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br> Acked-by: Anderson Lizardo <anderson.lizardo@indt.org.br> --- drivers/mmc/host/omap_hsmmc.c | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 824e7e9..17a3d8c 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -175,6 +175,19 @@ static void send_init_stream(struct mmc_omap_host *host) enable_irq(host->irq); } +static ssize_t +mmc_omap_show_slot_name(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct mmc_host *mmc = container_of(dev, struct mmc_host, class_dev); + struct mmc_omap_host *host = mmc_priv(mmc); + struct omap_mmc_slot_data slot = host->pdata->slots[host->slot_id]; + + return sprintf(buf, "slot:%s\n", slot.name); +} + +static DEVICE_ATTR(slot_name, S_IRUGO, mmc_omap_show_slot_name, NULL); + /* * Configure the response type and send the cmd. */ @@ -908,8 +921,16 @@ static int __init omap_mmc_probe(struct platform_device *pdev) platform_set_drvdata(pdev, host); mmc_add_host(mmc); + if (host->pdata->slots[host->slot_id].name != NULL) { + ret = device_create_file(&mmc->class_dev, &dev_attr_slot_name); + if (ret < 0) + goto err_slot_name; + } + return 0; +err_slot_name: + mmc_remove_host(mmc); err_irq_cd_init: free_irq(mmc_slot(host).card_detect_irq, host); err_irq_cd: -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH] MMC: Add sysfs file cover_switch 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Add slot_name entry to sysfs Jarkko Lavinen @ 2008-08-18 15:13 ` Jarkko Lavinen 0 siblings, 0 replies; 12+ messages in thread From: Jarkko Lavinen @ 2008-08-18 15:13 UTC (permalink / raw) To: linux-omap; +Cc: Jarkko Lavinen Add sysfs cover_switch with the status of cover. Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br> Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> --- drivers/mmc/host/omap_hsmmc.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 17a3d8c..f9ba09d 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -175,6 +175,27 @@ static void send_init_stream(struct mmc_omap_host *host) enable_irq(host->irq); } +static inline +int mmc_omap_cover_is_closed(struct mmc_omap_host *host) +{ + if (host->pdata->slots[host->slot_id].get_cover_state) + return host->pdata->slots[host->slot_id].get_cover_state(host->dev, host->slot_id); + return 1; +} + +static ssize_t +mmc_omap_show_cover_switch(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct mmc_host *mmc = container_of(dev, struct mmc_host, class_dev); + struct mmc_omap_host *host = mmc_priv(mmc); + + return sprintf(buf, "%s\n", mmc_omap_cover_is_closed(host) ? "closed" : + "open"); +} + +static DEVICE_ATTR(cover_switch, S_IRUGO, mmc_omap_show_cover_switch, NULL); + static ssize_t mmc_omap_show_slot_name(struct device *dev, struct device_attribute *attr, char *buf) @@ -476,6 +497,7 @@ static void mmc_omap_detect(struct work_struct *work) struct mmc_omap_host *host = container_of(work, struct mmc_omap_host, mmc_carddetect_work); + sysfs_notify(&host->mmc->class_dev.kobj, NULL, "cover_switch"); if (host->carddetect) { if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) { /* @@ -926,9 +948,17 @@ static int __init omap_mmc_probe(struct platform_device *pdev) if (ret < 0) goto err_slot_name; } + if (mmc_slot(host).card_detect_irq && mmc_slot(host).card_detect && + host->pdata->slots[host->slot_id].get_cover_state) { + ret = device_create_file(&mmc->class_dev, &dev_attr_cover_switch); + if (ret < 0) + goto err_cover_switch; + } return 0; +err_cover_switch: + device_remove_file(&mmc->class_dev, &dev_attr_cover_switch); err_slot_name: mmc_remove_host(mmc); err_irq_cd_init: -- 1.5.6.3 ^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Add slot_name entry to sysfs Jarkko Lavinen @ 2008-08-21 13:23 ` Madhusudhan Chikkature 1 sibling, 0 replies; 12+ messages in thread From: Madhusudhan Chikkature @ 2008-08-21 13:23 UTC (permalink / raw) To: linux-omap; +Cc: Jarkko Lavinen Hi Jarkko, I am not clear what this patch is doing? Is it fixing any perticular issue? Regards, Madhu ----- Original Message ----- From: "Jarkko Lavinen" <jarkko.lavinen@nokia.com> To: <linux-omap@vger.kernel.org> Cc: "Jarkko Lavinen" <jarkko.lavinen@nokia.com> Sent: Monday, August 18, 2008 8:43 PM Subject: [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe > Re-organizing some goto at hsmmc probe. > > Signed-off-by: Francisco Alecrim <francisco.alecrim@indt.org.br> > Signed-off-by: Jarkko Lavinen <jarkko.lavinen@nokia.com> > --- > drivers/mmc/host/omap_hsmmc.c | 20 +++++++++++--------- > 1 files changed, 11 insertions(+), 9 deletions(-) > > diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c > index f5acf91..824e7e9 100644 > --- a/drivers/mmc/host/omap_hsmmc.c > +++ b/drivers/mmc/host/omap_hsmmc.c > @@ -878,7 +878,7 @@ static int __init omap_mmc_probe(struct platform_device *pdev) > host); > if (ret) { > dev_dbg(mmc_dev(host->mmc), "Unable to grab HSMMC IRQ\n"); > - goto irq_err; > + goto err_irq; > } > > /* Request IRQ for card detect */ > @@ -888,18 +888,17 @@ static int __init omap_mmc_probe(struct platform_device *pdev) > host); > if (ret) { > dev_dbg(mmc_dev(host->mmc), > - "Unable to grab MMC CD IRQ"); > - free_irq(host->irq, host); > - goto irq_err; > + "Unable to grab MMC CD IRQ\n"); > + goto err_irq_cd; > } > } > > INIT_WORK(&host->mmc_carddetect_work, mmc_omap_detect); > if (pdata->init != NULL) { > if (pdata->init(&pdev->dev) != 0) { > - free_irq(mmc_slot(host).card_detect_irq, host); > - free_irq(host->irq, host); > - goto irq_err; > + dev_dbg(mmc_dev(host->mmc), > + "Unable to configure MMC IRQs\n"); > + goto err_irq_cd_init; > } > } > > @@ -911,8 +910,11 @@ static int __init omap_mmc_probe(struct platform_device *pdev) > > return 0; > > -irq_err: > - dev_dbg(mmc_dev(host->mmc), "Unable to configure MMC IRQs\n"); > +err_irq_cd_init: > + free_irq(mmc_slot(host).card_detect_irq, host); > +err_irq_cd: > + free_irq(host->irq, host); > +err_irq: > clk_disable(host->fclk); > clk_disable(host->iclk); > clk_put(host->fclk); > -- > 1.5.6.3 > > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: HSMMC pending fixes 2008-08-18 15:13 HSMMC pending fixes Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] OMAP: HSMMC: Check wether board specific suspend / resume exists Jarkko Lavinen @ 2008-08-18 21:07 ` Woodruff, Richard 2008-09-11 0:05 ` Tony Lindgren 1 sibling, 1 reply; 12+ messages in thread From: Woodruff, Richard @ 2008-08-18 21:07 UTC (permalink / raw) To: Jarkko Lavinen, linux-omap@vger.kernel.org Hi, > owner@vger.kernel.org] On Behalf Of Jarkko Lavinen > 2: Disable smartidle mode while suspending (workaround) This was the work around we had in internal trees for a long time. However Madhu C. recently updated this based on an internal investigation. It is required to reset the command pin to clear the system for sleep. This allows retention to work. The non-idle work around when profiled showed it was taking a huge amount of time for the clock re-enable to work. This actually would noticeably reduce MMC throughput when doing aggressive clock cutting in the driver and increase power usage. + } else { + OMAP_HSMMC_WRITE(host->base, SYSCTL, + OMAP_HSMMC_READ(host->base, SYSCTL) | SRD); + while (OMAP_HSMMC_READ(host->base, SYSCTL) & SRD) ; If you use a really long time out then perhaps it doesn't matter. But if you try and be aggressive it will hurt you. Regards, Richard W. ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HSMMC pending fixes 2008-08-18 21:07 ` HSMMC pending fixes Woodruff, Richard @ 2008-09-11 0:05 ` Tony Lindgren 2008-09-11 4:13 ` Madhusudhan Chikkature 0 siblings, 1 reply; 12+ messages in thread From: Tony Lindgren @ 2008-09-11 0:05 UTC (permalink / raw) To: Woodruff, Richard; +Cc: Jarkko Lavinen, linux-omap@vger.kernel.org * Woodruff, Richard <r-woodruff2@ti.com> [080818 14:09]: > Hi, > > > owner@vger.kernel.org] On Behalf Of Jarkko Lavinen > > > > 2: Disable smartidle mode while suspending (workaround) > > This was the work around we had in internal trees for a long time. > > However Madhu C. recently updated this based on an internal investigation. It is required to reset the command pin to clear the system for sleep. This allows retention to work. > > The non-idle work around when profiled showed it was taking a huge amount of time for the clock re-enable to work. This actually would noticeably reduce MMC throughput when doing aggressive clock cutting in the driver and increase power usage. > > + } else { > + OMAP_HSMMC_WRITE(host->base, SYSCTL, > + OMAP_HSMMC_READ(host->base, SYSCTL) | SRD); > + while (OMAP_HSMMC_READ(host->base, SYSCTL) & SRD) ; > > If you use a really long time out then perhaps it doesn't matter. But if you try and be aggressive it will hurt you. Pushing all except the workaround. Madhu, can you please send a patch for what Richard is describing? Thanks, Tony ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HSMMC pending fixes 2008-09-11 0:05 ` Tony Lindgren @ 2008-09-11 4:13 ` Madhusudhan Chikkature 2008-09-12 17:58 ` Tony Lindgren 0 siblings, 1 reply; 12+ messages in thread From: Madhusudhan Chikkature @ 2008-09-11 4:13 UTC (permalink / raw) To: Tony Lindgren, Woodruff, Richard; +Cc: Jarkko Lavinen, linux-omap ----- Original Message ----- From: "Tony Lindgren" <tony@atomide.com> To: "Woodruff, Richard" <r-woodruff2@ti.com> Cc: "Jarkko Lavinen" <jarkko.lavinen@nokia.com>; <linux-omap@vger.kernel.org> Sent: Thursday, September 11, 2008 5:35 AM Subject: Re: HSMMC pending fixes >* Woodruff, Richard <r-woodruff2@ti.com> [080818 14:09]: >> Hi, >> >> > owner@vger.kernel.org] On Behalf Of Jarkko Lavinen >> >> >> > 2: Disable smartidle mode while suspending (workaround) >> >> This was the work around we had in internal trees for a long time. >> >> However Madhu C. recently updated this based on an internal investigation. It is required to reset the command pin to clear the system for sleep. This allows retention to work. >> >> The non-idle work around when profiled showed it was taking a huge amount of time for the clock re-enable to work. This actually would noticeably reduce MMC throughput when doing aggressive clock cutting in the driver and increase power usage. >> >> + } else { >> + OMAP_HSMMC_WRITE(host->base, SYSCTL, >> + OMAP_HSMMC_READ(host->base, SYSCTL) | SRD); >> + while (OMAP_HSMMC_READ(host->base, SYSCTL) & SRD) ; >> >> If you use a really long time out then perhaps it doesn't matter. But if you try and be aggressive it will hurt you. > > Pushing all except the workaround. Madhu, can you please send a patch > for what Richard is describing? Tony, I have already posted the above fix to L-o. I see that it is merged as well. With this fix, I guess there is no need to disable smart idle mode while suspending. Am I missing any other thing here? Regards, Madhu > > Thanks, > > Tony > -- > To unsubscribe from this list: send the line "unsubscribe linux-omap" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > ^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: HSMMC pending fixes 2008-09-11 4:13 ` Madhusudhan Chikkature @ 2008-09-12 17:58 ` Tony Lindgren 0 siblings, 0 replies; 12+ messages in thread From: Tony Lindgren @ 2008-09-12 17:58 UTC (permalink / raw) To: Madhusudhan Chikkature; +Cc: Woodruff, Richard, Jarkko Lavinen, linux-omap * Madhusudhan Chikkature <madhu.cr@ti.com> [080910 21:13]: > > ----- Original Message ----- > From: "Tony Lindgren" <tony@atomide.com> > To: "Woodruff, Richard" <r-woodruff2@ti.com> > Cc: "Jarkko Lavinen" <jarkko.lavinen@nokia.com>; <linux-omap@vger.kernel.org> > Sent: Thursday, September 11, 2008 5:35 AM > Subject: Re: HSMMC pending fixes > > > >* Woodruff, Richard <r-woodruff2@ti.com> [080818 14:09]: > >> Hi, > >> > >> > owner@vger.kernel.org] On Behalf Of Jarkko Lavinen > >> > >> > >> > 2: Disable smartidle mode while suspending (workaround) > >> > >> This was the work around we had in internal trees for a long time. > >> > >> However Madhu C. recently updated this based on an internal investigation. It is required to reset the command pin to clear the system for sleep. This allows retention to work. > >> > >> The non-idle work around when profiled showed it was taking a huge amount of time for the clock re-enable to work. This actually would noticeably reduce MMC throughput when doing aggressive clock cutting in the driver and increase power usage. > >> > >> + } else { > >> + OMAP_HSMMC_WRITE(host->base, SYSCTL, > >> + OMAP_HSMMC_READ(host->base, SYSCTL) | SRD); > >> + while (OMAP_HSMMC_READ(host->base, SYSCTL) & SRD) ; > >> > >> If you use a really long time out then perhaps it doesn't matter. But if you try and be aggressive it will hurt you. > > > > Pushing all except the workaround. Madhu, can you please send a patch > > for what Richard is describing? > Tony, I have already posted the above fix to L-o. I see that it is merged as well. With this fix, I guess there is no need to disable smart idle mode while suspending. Am I missing any other thing here? Hmm OK. I guess the test then is to see if suspend works now properly. Tony ^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2008-09-12 17:58 UTC | newest] Thread overview: 12+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2008-08-18 15:13 HSMMC pending fixes Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] OMAP: HSMMC: Check wether board specific suspend / resume exists Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Disable smartidle mode while suspending (workaround) Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Readable output for IRQ status register Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: OMAP: Add slot_name entry to sysfs Jarkko Lavinen 2008-08-18 15:13 ` [PATCH] MMC: Add sysfs file cover_switch Jarkko Lavinen 2008-08-21 13:23 ` [PATCH] MMC: OMAP: Re-organizing some goto at hsmmc probe Madhusudhan Chikkature 2008-08-18 21:07 ` HSMMC pending fixes Woodruff, Richard 2008-09-11 0:05 ` Tony Lindgren 2008-09-11 4:13 ` Madhusudhan Chikkature 2008-09-12 17:58 ` Tony Lindgren
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox