All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: linux-arm-msm@vger.kernel.org,
	Linus Walleij <linus.walleij@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Andy Gross <andy.gross@linaro.org>,
	linux-soc@vger.kernel.org
Subject: Re: [PATCH 2/4 v2] soc: qcom: add EBI2 driver
Date: Mon, 29 Aug 2016 15:20:07 +0200	[thread overview]
Message-ID: <201608291520.07798.arnd@arndb.de> (raw)
In-Reply-To: <1472028758-29272-3-git-send-email-linus.walleij@linaro.org>

On Wednesday 24 August 2016, Linus Walleij wrote:

> +static void qcom_ebi2_setup_chipselect(struct device_node *np,
> +				       struct device *dev,
> +				       void __iomem *ebi2_base,
> +				       void __iomem *ebi2_xmem,
> +				       u32 csindex)
> +{
> +	const struct cs_data *csd;
> +	u32 slowcfg, fastcfg;
> +	u32 val;
> +	int ret;
> +	int i;
> +
> +	csd = &cs_info[csindex];
> +	val = readl_relaxed(ebi2_base);
> +	val |= csd->enable_mask;
> +	writel_relaxed(val, ebi2_base);
> +	dev_dbg(dev, "enabled CS%u\n", csindex);

better use readl/writel instead of *_relaxed() if it's not performance critical.
If you have a function that is worth optimizing with relaxed accessors, add a
comment about how your concluded that it's safe to do so.

> +static struct platform_driver qcom_ebi2_driver = {
> +	.probe = qcom_ebi2_probe,
> +	.driver = {
> +		.name = "qcom-ebi2",
> +		.of_match_table = qcom_ebi2_of_match,
> +	},
> +};
> +builtin_platform_driver(qcom_ebi2_driver);

Why not allow this to be a loadable module?

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/4 v2] soc: qcom: add EBI2 driver
Date: Mon, 29 Aug 2016 15:20:07 +0200	[thread overview]
Message-ID: <201608291520.07798.arnd@arndb.de> (raw)
In-Reply-To: <1472028758-29272-3-git-send-email-linus.walleij@linaro.org>

On Wednesday 24 August 2016, Linus Walleij wrote:

> +static void qcom_ebi2_setup_chipselect(struct device_node *np,
> +				       struct device *dev,
> +				       void __iomem *ebi2_base,
> +				       void __iomem *ebi2_xmem,
> +				       u32 csindex)
> +{
> +	const struct cs_data *csd;
> +	u32 slowcfg, fastcfg;
> +	u32 val;
> +	int ret;
> +	int i;
> +
> +	csd = &cs_info[csindex];
> +	val = readl_relaxed(ebi2_base);
> +	val |= csd->enable_mask;
> +	writel_relaxed(val, ebi2_base);
> +	dev_dbg(dev, "enabled CS%u\n", csindex);

better use readl/writel instead of *_relaxed() if it's not performance critical.
If you have a function that is worth optimizing with relaxed accessors, add a
comment about how your concluded that it's safe to do so.

> +static struct platform_driver qcom_ebi2_driver = {
> +	.probe = qcom_ebi2_probe,
> +	.driver = {
> +		.name = "qcom-ebi2",
> +		.of_match_table = qcom_ebi2_of_match,
> +	},
> +};
> +builtin_platform_driver(qcom_ebi2_driver);

Why not allow this to be a loadable module?

	Arnd

  reply	other threads:[~2016-08-29 13:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-24  8:52 [PATCH 0/4] EBI2 bus and ethernet on MSM8660/APQ8060 Linus Walleij
2016-08-24  8:52 ` Linus Walleij
     [not found] ` <1472028758-29272-1-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-08-24  8:52   ` [PATCH 1/4 v2] soc: qcom: add EBI2 device tree bindings Linus Walleij
2016-08-24  8:52     ` Linus Walleij
     [not found]     ` <1472028758-29272-2-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2016-08-29 13:16       ` Arnd Bergmann
2016-08-29 13:16         ` Arnd Bergmann
     [not found]         ` <201608291516.59380.arnd-r2nGTMty4D4@public.gmane.org>
2016-08-29 13:22           ` Linus Walleij
2016-08-29 13:22             ` Linus Walleij
2016-08-24  8:52 ` [PATCH 2/4 v2] soc: qcom: add EBI2 driver Linus Walleij
2016-08-24  8:52   ` Linus Walleij
2016-08-29 13:20   ` Arnd Bergmann [this message]
2016-08-29 13:20     ` Arnd Bergmann
2016-08-29 13:28     ` Linus Walleij
2016-08-29 13:28       ` Linus Walleij
2016-08-29 13:36       ` Arnd Bergmann
2016-08-29 13:36         ` Arnd Bergmann
2016-08-24  8:52 ` [PATCH 3/4 v2] ARM: dts: add EBI2 to the Qualcomm MSM8660 DTSI Linus Walleij
2016-08-24  8:52   ` Linus Walleij
2016-08-24  8:52 ` [PATCH 4/4 v2] ARM: dts: add SMSC ethernet on the APQ8060 Dragonboard Linus Walleij
2016-08-24  8:52   ` Linus Walleij
2016-08-29 13:21   ` Arnd Bergmann
2016-08-29 13:21     ` Arnd Bergmann
2016-08-29 13:36     ` Linus Walleij
2016-08-29 13:36       ` Linus Walleij
2016-08-24  8:55 ` [PATCH 0/4] EBI2 bus and ethernet on MSM8660/APQ8060 Linus Walleij
2016-08-24  8:55   ` Linus Walleij

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=201608291520.07798.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=andy.gross@linaro.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@linaro.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=sboyd@codeaurora.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.