All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
To: Stefan Wahren <stefan.wahren-eS4NqCHxEME@public.gmane.org>
Cc: Scott Branden <sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Ray Jui <rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Jon Mason <jonmason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org>,
	Lee Jones <lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Eric Anholt <eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
	Ulf Hansson <ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org
Subject: Re: [PATCH 4/5 RFC] mmc: sdhci-iproc: add bcm2835 support
Date: Mon, 25 Jan 2016 21:34:04 -0700	[thread overview]
Message-ID: <56A6F73C.3030209@wwwdotorg.org> (raw)
In-Reply-To: <1453042744-16196-5-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>

On 01/17/2016 07:59 AM, Stefan Wahren wrote:
> Scott Branden from Broadcom said that the BCM2835 eMMC IP core is
> very similar to IPROC and share most of the quirks. So use this driver
> instead of separate one.
> 
> The sdhci-iproc contains a better workaround for the clock domain
> crossing problem which doesn't need any delays. This results in a
> better write performance.
> 
> Btw we get the rid of the SDHCI_CAPABILITIES hack in the sdhci_readl
> function.

> diff --git a/drivers/mmc/host/sdhci-iproc.c b/drivers/mmc/host/sdhci-iproc.c

> +static const struct sdhci_pltfm_data sdhci_bcm2835_pltfm_data = {
> +	.quirks = SDHCI_QUIRK_DATA_TIMEOUT_USES_SDCLK
> +		| SDHCI_QUIRK_MISSING_CAPS,
> +	.ops = &sdhci_iproc_ops,
> +};
> +
> +static const struct sdhci_iproc_data bcm2835_data = {
> +	.pdata = &sdhci_bcm2835_pltfm_data,
> +	.caps = SDHCI_CAN_VDD_330,
> +	.caps1 = 0x00000000,
> +};

> @@ -199,8 +213,10 @@ static int sdhci_iproc_probe(struct platform_device *pdev)

> -	/* Enable EMMC 1/8V DDR capable */
> -	host->mmc->caps |= MMC_CAP_1_8V_DDR;
> +	if (of_device_is_compatible(np, "brcm,sdhci-iproc-cygnus")) {
> +		/* Enable EMMC 1/8V DDR capable */
> +		host->mmc->caps |= MMC_CAP_1_8V_DDR;
> +	}

Rather that placing device-specific of_device_is_compatible() throughout
the driver, I think it'd be better to key off a field in bcm2835_data or
sdhci_bcm2835_pltfm_data. That way, if the driver starts supporting
additional devices that want this MMC_CAP_1_8V_DDR, you can simply set
that up in the relevant data structure, rather than adding a mess of
of_device_is_compatible("a") || of_device_is_compatible("b") || ... to
the code.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2016-01-26  4:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-17 14:58 [PATCH 0/5 RFC] mmc: sdhci-iproc: add bcm2835 support Stefan Wahren
     [not found] ` <1453042744-16196-1-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-17 14:59   ` [PATCH 1/5 RFC] mmc: sdhci-iproc: Clean up platform allocations if shdci init fails Stefan Wahren
2016-01-18 21:31     ` Scott Branden
2016-01-27 14:16     ` Ulf Hansson
2016-01-17 14:59   ` [PATCH 2/5 RFC] mmc: sdhci-iproc: Actually enable the clock Stefan Wahren
2016-01-18 21:35     ` Scott Branden
     [not found]     ` <1453042744-16196-3-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-27 14:16       ` Ulf Hansson
2016-01-27 19:11         ` Stefan Wahren
2016-01-27 21:11           ` Ulf Hansson
2016-01-17 14:59   ` [PATCH 3/5 RFC] ARM: bcm283x: specify sdhci quirks in dtsi file Stefan Wahren
2016-01-18 21:40     ` Scott Branden
     [not found]     ` <1453042744-16196-4-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-26  4:31       ` Stephen Warren
2016-01-17 14:59   ` [PATCH 4/5 RFC] mmc: sdhci-iproc: add bcm2835 support Stefan Wahren
2016-01-18 21:47     ` Scott Branden
2016-01-19 19:25       ` Stefan Wahren
2016-01-19 19:47         ` Scott Branden
2016-01-19  1:32     ` Jaehoon Chung
     [not found]       ` <569D923D.60306-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2016-01-20 21:23         ` Stefan Wahren
     [not found]     ` <1453042744-16196-5-git-send-email-stefan.wahren-eS4NqCHxEME@public.gmane.org>
2016-01-26  4:34       ` Stephen Warren [this message]
2016-01-17 14:59 ` [PATCH 5/5 RFC] DT: sdhci-iproc: add bcm2835 compatible Stefan Wahren
2016-01-18 21:47   ` Scott Branden
2016-01-20 16:50   ` Rob Herring
2016-01-19 21:00 ` [PATCH 0/5 RFC] mmc: sdhci-iproc: add bcm2835 support Eric Anholt
2016-01-20 21:18   ` Stefan Wahren
2016-01-28 22:19     ` Eric Anholt

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=56A6F73C.3030209@wwwdotorg.org \
    --to=swarren-3lzwwm7+weoh9zmkesr00q@public.gmane.org \
    --cc=arnd-r2nGTMty4D4@public.gmane.org \
    --cc=bcm-kernel-feedback-list-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=eric-WhKQ6XTQaPysTnJN9+BGXg@public.gmane.org \
    --cc=jonmason-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org \
    --cc=lee-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=linux-mmc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-rpi-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=rjui-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sbranden-dY08KVG/lbpWk0Htik3J/w@public.gmane.org \
    --cc=stefan.wahren-eS4NqCHxEME@public.gmane.org \
    --cc=ulf.hansson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.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 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.