From: "Andrew Jeffery" <andrew@aj.id.au>
To: "Adrian Hunter" <adrian.hunter@intel.com>,
linux-mmc <linux-mmc@vger.kernel.org>
Cc: mark.rutland@arm.com, devicetree@vger.kernel.org,
Ulf Hansson <ulf.hansson@linaro.org>,
linux-aspeed@lists.ozlabs.org,
Ryan Chen <ryanchen.aspeed@gmail.com>,
linux-kernel@vger.kernel.org, Rob Herring <robh+dt@kernel.org>,
Joel Stanley <joel@jms.id.au>,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v2 2/2] mmc: Add support for the ASPEED SD controller
Date: Fri, 26 Jul 2019 16:17:31 +0930 [thread overview]
Message-ID: <4c6c020d-5985-4c57-aaae-c2393f9cc2fc@www.fastmail.com> (raw)
In-Reply-To: <8a7bfe52-83ca-7601-7d75-e5615da7b5de@intel.com>
On Fri, 26 Jul 2019, at 15:27, Adrian Hunter wrote:
> On 26/07/19 3:52 AM, Andrew Jeffery wrote:
> > On Thu, 25 Jul 2019, at 22:49, Adrian Hunter wrote:
> >> On 12/07/19 6:32 AM, Andrew Jeffery wrote:
> >>> +static int aspeed_sdhci_probe(struct platform_device *pdev)
> >>> +{
> >>> + struct sdhci_pltfm_host *pltfm_host;
> >>> + struct aspeed_sdhci *dev;
> >>> + struct sdhci_host *host;
> >>> + struct resource *res;
> >>> + int slot;
> >>> + int ret;
> >>> +
> >>> + host = sdhci_pltfm_init(pdev, &aspeed_sdc_pdata, sizeof(*dev));
> >>> + if (IS_ERR(host))
> >>> + return PTR_ERR(host);
> >>> +
> >>> + pltfm_host = sdhci_priv(host);
> >>> + dev = sdhci_pltfm_priv(pltfm_host);
> >>> + dev->parent = dev_get_drvdata(pdev->dev.parent);
> >>> +
> >>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> >>> + slot = aspeed_sdhci_calculate_slot(dev, res);
> >>> + if (slot < 0)
> >>> + return slot;
> >>> + dev_info(&pdev->dev, "Configuring for slot %d\n", slot);
> >>> + dev->width_mask = !slot ? ASPEED_SDC_S0MMC8 : ASPEED_SDC_S1MMC8;
> >>
> >> That implies that you only support 2 slots which begs the question why
> >> you don't validate slot.
> >
> > I'm not sure what you mean here, but I'll dig into it.
>
> I just meant, if you only support 2 slots:
>
> if (slot > 1)
> return -EINVAL;
>
Oh, sure.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2019-07-26 6:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-12 3:32 [PATCH v2 0/2] mmc: Add support for the ASPEED SD controller Andrew Jeffery
2019-07-12 3:32 ` [PATCH v2 1/2] dt-bindings: mmc: Document Aspeed " Andrew Jeffery
2019-07-12 13:03 ` Rob Herring
2019-07-12 13:10 ` Maxime Ripard
2019-07-15 2:30 ` Andrew Jeffery
2019-07-15 13:26 ` Rob Herring
2019-07-15 22:16 ` Rob Herring
2019-07-16 0:36 ` Andrew Jeffery
2019-07-16 14:57 ` Rob Herring
2019-07-17 3:57 ` Andrew Jeffery
2019-07-17 13:43 ` Rob Herring
2019-07-18 1:49 ` Andrew Jeffery
2019-07-12 3:32 ` [PATCH v2 2/2] mmc: Add support for the ASPEED " Andrew Jeffery
2019-07-25 13:18 ` Adrian Hunter
2019-07-26 0:52 ` Andrew Jeffery
2019-07-26 5:56 ` Adrian Hunter
2019-07-26 6:47 ` Andrew Jeffery [this message]
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=4c6c020d-5985-4c57-aaae-c2393f9cc2fc@www.fastmail.com \
--to=andrew@aj.id.au \
--cc=adrian.hunter@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=joel@jms.id.au \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=robh+dt@kernel.org \
--cc=ryanchen.aspeed@gmail.com \
--cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).