mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pierre Ossman <pierre@ossman.eu>
To: "Li, Jiebing" <jiebing.li@intel.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Johnson, Charles F" <charles.f.johnson@intel.com>,
	"Zhu, Daniel" <daniel.zhu@intel.com>,
	"Yuan, Hang" <hang.yuan@intel.com>,
	"Pasrija, Geeta" <geeta.pasrija@intel.com>,
	"Li, Jiebing" <jiebing.li@intel.com>
Subject: Re: [PATCH 2/2] MMC: MMC/SD/CE-ATA/SDIO driver for Intel Moorestown platform
Date: Sun, 10 May 2009 20:42:14 +0200	[thread overview]
Message-ID: <20090510204214.2c0ce736@mjolnir.ossman.eu> (raw)
In-Reply-To: <95608CFE3D0C064B8468DB61F8403BE029D298B1FF@PDSMSX501.ccr.corp.intel.com>

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

On Thu, 30 Apr 2009 17:19:06 +0800
"Li, Jiebing" <jiebing.li@intel.com> wrote:

> 
> This patch enables support of SDIO bus driver suspend/resume operation and supply sysfs interface for user
> to call suspend/resume selectively.Remind that this function should work together with SDIO device driver's
> suspend/resume function.
> 

As Matthew asked, what's the use case?

> And Moorestown's specific code is added into this patch to enable the second SDIO slot of the host controller.
> 

Again, stop mixing unrelated things in the same patch.

> @@ -452,3 +828,84 @@ err:
>         return err;
>  }
> 
> +/*
> + * warn device driver and perform a SDIO device reset.
> + * Assume that device driver knows hot to handle resets.
> + */
> +int sdio_reset_device(struct mmc_card *card)
> +{

Use case?

> diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig
> index b4cf691..0c9d2eb 100644
> --- a/drivers/mmc/host/Kconfig
> +++ b/drivers/mmc/host/Kconfig
> @@ -44,6 +44,14 @@ config MMC_SDHCI_IO_ACCESSORS
>           This is silent Kconfig symbol that is selected by the drivers that
>           need to overwrite SDHCI IO memory accessors.
> 
> +config MMC_SDHCI_MRST_SDIO1
> +       bool
> +       depends on MMC_SDHCI
> +       help
> +         This enables Moorestown SD host controller's 2nd SDIO slot.
> +
> +         If unsure, say N.
> +

Detect this at runtime.

> diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
> index a2804f1..4d4ad6d 100644
> --- a/drivers/mmc/host/sdhci.c
> +++ b/drivers/mmc/host/sdhci.c
> @@ -914,6 +914,17 @@ static void sdhci_send_command(struct sdhci_host *host, struct mmc_command *cmd)
>         if (cmd->data)
>                 flags |= SDHCI_CMD_DATA;
> 
> +#ifdef CONFIG_MMC_SDHCI_MRST_SDIO1
> +       if (host->quirks & SDHCI_QUIRK_MRST_RESTRICTION) {
> +               u16 clk;
> +
> +               clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
> +
> +               clk |= SDHCI_CLOCK_CARD_EN;
> +               sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL);
> +       }
> +#endif
> +
>         sdhci_writew(host, SDHCI_MAKE_CMD(cmd->opcode, flags), SDHCI_COMMAND);
>  }
> 

Huh? Is this some kind of multiplexed nonsense?

> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h
> index fa87b8b..50be698 100644
> --- a/drivers/mmc/host/sdhci.h
> +++ b/drivers/mmc/host/sdhci.h
> @@ -227,6 +227,8 @@ struct sdhci_host {
>  #define SDHCI_QUIRK_RESTORE_IRQS_AFTER_RESET           (1<<19)
>  /* Controller has to be forced to use block size of 2048 bytes */
>  #define SDHCI_QUIRK_FORCE_BLK_SZ_2048                  (1<<20)
> +/* Controller of Moorestown specific restriction */
> +#define SDHCI_QUIRK_MRST_RESTRICTION                   (1<<21)
> 

No. Quirks should be defined in a way that allows reuse.

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

  parent reply	other threads:[~2009-05-10 18:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-30  9:14 [PATCH 0/2] " Li, Jiebing
2009-04-30  9:16 ` [PATCH 1/2] " Li, Jiebing
2009-04-30 13:44   ` Alan Cox
2009-05-10 18:29   ` Pierre Ossman
2009-04-30  9:19 ` [PATCH 2/2] " Li, Jiebing
2009-04-30 12:11   ` Matthew Garrett
2009-05-10 18:42   ` Pierre Ossman [this message]
2009-05-20 10:55     ` Li, Jiebing

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=20090510204214.2c0ce736@mjolnir.ossman.eu \
    --to=pierre@ossman.eu \
    --cc=charles.f.johnson@intel.com \
    --cc=daniel.zhu@intel.com \
    --cc=geeta.pasrija@intel.com \
    --cc=hang.yuan@intel.com \
    --cc=jiebing.li@intel.com \
    --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®