mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Ossman <pierre@ossman.eu>
To: Harald Welte <HaraldWelte@viatech.com>
Cc: Linux Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	JosephChan@via.com.tw, Bruce Chang <BruceChang@via.com.tw>
Subject: Re: [PATCH] mmc: Add new via-sdmmc host controller driver
Date: Sat, 13 Jun 2009 13:43:28 +0200	[thread overview]
Message-ID: <20090613134328.0c168205@mjolnir.ossman.eu> (raw)
In-Reply-To: <20090612075930.GB30843@prithivi.gnumonks.org>

[-- Attachment #1: Type: text/plain, Size: 1585 bytes --]

On Fri, 12 Jun 2009 15:59:30 +0800
Harald Welte <HaraldWelte@viatech.com> wrote:

> +
> +#define MMC_STOP_TRANSMISSION	12

This define is no longer used.

> +	/* It seems that our DMA can not work normally with 375kHz clock */
> +	/* FIXME: don't brute-force 8MHz but use PIO at 375kHz !! */
> +	addrbase = host->pcictrl_mmiobase;
> +	if (readb(addrbase + VIA_CRDR_PCISDCCLK) == PCI_CLK_375K) {
> +		dev_info(host->mmc->parent, "forcing card speed to 8MHz\n");
> +		writeb(PCI_CLK_8M, addrbase + VIA_CRDR_PCISDCCLK);
> +	}

This is pretty nasty. Please see if you can provide a workaround some
time soon.

> +	if (ios->power_mode != MMC_POWER_OFF)
> +		via_sdc_set_power(host, ios->vdd);

What if we actually do need to power off?
> +static void __devexit via_sd_remove(struct pci_dev *pcidev)
> +{
> +	struct via_crdr_mmc_host *sdhost;
> +	u8 gatt;
> +
> +	pr_info(DRV_NAME
> +		": VIA SDMMC controller at %s [%04x:%04x] has been removed\n",
> +		pci_name(pcidev), (int)pcidev->vendor, (int)pcidev->device);
> +
> +	sdhost = pci_get_drvdata(pcidev);
> +
> +	tasklet_kill(&sdhost->finish_tasklet);
> +
> +	if (&sdhost->timer)
> +		del_timer_sync(&sdhost->timer);
> +
> +	mmc_remove_host(sdhost->mmc);
> +

You need to do the removal as the first step and you might need to
explicitly kill any ongoing requests.

Rgds
-- 
     -- Pierre Ossman

  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.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]

  reply	other threads:[~2009-06-13 11:43 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-12  7:59 Harald Welte
2009-06-13 11:43 ` Pierre Ossman [this message]
2009-06-14  6:52   ` Harald Welte
2009-06-14 10:55     ` Pierre Ossman
2009-06-14 13:51       ` Harald Welte
2009-06-17 18:22 Harald Welte
2009-06-18  5:17 ` Joe Perches
2009-06-19 19:30 ` Pierre Ossman

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=20090613134328.0c168205@mjolnir.ossman.eu \
    --to=pierre@ossman.eu \
    --cc=BruceChang@via.com.tw \
    --cc=HaraldWelte@viatech.com \
    --cc=JosephChan@via.com.tw \
    --cc=linux-kernel@vger.kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®