All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre Ossman <drzeus-mmc@drzeus.cx>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.arm.linux.org.uk,
	linux-omap@vger.kernel.org,
	Madhusudhan Chikkature <madhu.cr@ti.com>
Subject: Re: [PATCH 5/5] omap mmc: Add new omap hsmmc controller for 2430 and 34xx
Date: Sun, 21 Dec 2008 17:17:00 +0100	[thread overview]
Message-ID: <20081221171700.3efc0c3a@mjolnir.drzeus.cx> (raw)
In-Reply-To: <20081207215139.10456.46405.stgit@localhost>

On Sun, 07 Dec 2008 13:51:39 -0800
Tony Lindgren <tony@atomide.com> wrote:

> +	/*
> +	 * Unlike OMAP1 controller, the cmdtype does not seem to be based on
> +	 * ac, bc, adtc, bcr. Only CMD12 needs a val of 0x3, rest 0x0.
> +	 */
> +	if (cmd->opcode == 12)
> +		cmdtype = 0x3;

Isn't it more likely that it needs 0x3 for any commands that ends an
open ended transfer? I.e. every time cmd == mrq.stop.

> +	host->dbclk = clk_get(&pdev->dev, "mmchsdb_fck");
> +	/*
> +	 * MMC can still work without debounce clock.
> +	 */
> +	if (IS_ERR(host->dbclk))
> +		dev_dbg(mmc_dev(host->mmc), "Failed to get debounce clock\n");

Perhaps a warning should be printed though, as there could be some
problems caused by trying to init a card that is still bouncing.

> +static int omap_mmc_remove(struct platform_device *pdev)
> +{
> +	struct mmc_omap_host *host = platform_get_drvdata(pdev);
> +	struct resource *res;
> +	u16 vdd = 0;
> +
> +	if (!(OMAP_HSMMC_READ(host->base, HCTL) & SDVSDET)) {
> +	/*
> +	 * Set the vdd back to 3V,
> +	 * applicable for dual volt support.
> +	 */
> +		vdd = fls(host->mmc->ocr_avail) - 1;
> +		if (omap_mmc_switch_opcond(host, vdd) != 0)
> +			host->mmc->ios.vdd = vdd;
> +	}
> +
> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> +	if (res)
> +		release_mem_region(res->start, res->end - res->start + 1);
> +
> +	platform_set_drvdata(pdev, NULL);
> +	if (host) {
> +		mmc_remove_host(host->mmc);

You can't go fiddling with the voltage and removing the MMIO until
you've made sure that there is no more activity on the slot.


Fix the above issues and you can let it go via Russell with a:

Acked-by: Pierre Ossman <drzeus@drzeus.cx>

Rgds
-- 
     -- Pierre Ossman

  Linux kernel, MMC maintainer        http://www.kernel.org
  rdesktop, core developer          http://www.rdesktop.org

  WARNING: This correspondence is being monitored by the
  Swedish government. Make sure your server uses encryption
  for SMTP traffic and consider using PGP for end-to-end
  encryption.

  reply	other threads:[~2008-12-21 16:17 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-07 21:45 [PATCH 0/5] Omap MMC init updates and new controller for 2.6.29 merge window Tony Lindgren
2008-12-07 21:46 ` [PATCH 1/5] omap mmc: Remove broken MMC init code Tony Lindgren
2008-12-07 21:47 ` [PATCH 2/5] omap mmc: Add better MMC low-level init Tony Lindgren
2009-01-10 22:49   ` Ladislav Michl
2009-01-10 23:00     ` Ladislav Michl
2009-01-13 13:43       ` Tony Lindgren
2009-03-23 17:47         ` Ladislav Michl
2009-03-24 20:04           ` [APPLIED] " Tony Lindgren
2009-01-10 23:03   ` Ladislav Michl
2008-12-07 21:49 ` [PATCH 3/5] omap mmc: Add low-level initialization for hsmmc controller Tony Lindgren
2008-12-07 21:50 ` [PATCH 4/5] omap mmc: force MMC module reset on boot Tony Lindgren
2008-12-07 21:51 ` [PATCH 5/5] omap mmc: Add new omap hsmmc controller for 2430 and 34xx Tony Lindgren
2008-12-21 16:17   ` Pierre Ossman [this message]
2008-12-29 16:55     ` Tony Lindgren
2008-12-30  8:36       ` Tony Lindgren
2008-12-31 17:59         ` Pierre Ossman
2009-01-07 10:18           ` Tony Lindgren
2009-01-07 10:28             ` [PATCH] OMAP: MMC: recover from transfer failures (was: Re: [PATCH 5/5] omap mmc: Add new omap hsmmc controller for 2430 and 34xx) Jean Pihet
2009-01-07 15:40               ` Tony Lindgren
2009-01-08  9:02               ` [PATCH] OMAP: MMC: recover from transfer failures Adrian Hunter
2009-01-08 11:49                 ` Jean Pihet
2009-01-08 12:17                   ` Adrian Hunter
2009-02-02  8:46                   ` Jean Pihet
2009-02-02 19:05                     ` Tony Lindgren
2009-02-03 14:05                       ` [PATCH] OMAP: MMC: recover from transfer failures - Resend Jean Pihet
2009-02-03 14:05                         ` Jean Pihet
2009-02-05 20:10                         ` Andrew Morton
2009-02-05 20:10                           ` Andrew Morton
2009-02-05 20:32                           ` Paul Walmsley
2009-02-06 13:22                             ` Jean Pihet
2009-02-06 13:53                               ` Pierre Ossman
2009-02-06 15:53                                 ` [PATCH] OMAP: MMC: replace infinite loops with timeouts (was Re: [PATCH] OMAP: MMC: recover from transfer failures - Resend) Jean Pihet
2009-02-09 15:58                                   ` Adrian Hunter
2009-02-09 15:58                                     ` Adrian Hunter
2009-02-11  9:41                                     ` Jean Pihet
2009-02-11  9:41                                       ` Jean Pihet
2009-02-09 17:58                                 ` [PATCH] OMAP: MMC: recover from transfer failures - Resend Jarkko Lavinen
2009-02-09 17:58                                   ` Jarkko Lavinen
2009-02-09 18:46                                   ` Tony Lindgren
2009-02-09 18:46                                     ` Tony Lindgren
2009-02-10  0:09                               ` Paul Walmsley
2009-02-08 20:27                             ` David Brownell
2009-02-08 20:27                               ` David Brownell
2008-12-15 22:26 ` git pull request for omap mmc init changes (Re: [PATCH 0/5] Omap MMC init updates and new controller for 2.6.29 merge window) Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081221171700.3efc0c3a@mjolnir.drzeus.cx \
    --to=drzeus-mmc@drzeus.cx \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=madhu.cr@ti.com \
    --cc=tony@atomide.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.