linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Walleij <linus.walleij@linaro.org>
To: Arnd Bergmann <arnd@arndb.de>
Cc: "linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
	linux-soc@vger.kernel.org, Andy Gross <andy.gross@linaro.org>,
	David Brown <david.brown@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>
Subject: Re: [PATCH 2/4 v2] soc: qcom: add EBI2 driver
Date: Mon, 29 Aug 2016 15:28:41 +0200	[thread overview]
Message-ID: <CACRpkdZHHGZaaxym9f-3mGREmokRhgNm3yb_HxaP0=_iuZNk1g@mail.gmail.com> (raw)
In-Reply-To: <201608291520.07798.arnd@arndb.de>

On Mon, Aug 29, 2016 at 3:20 PM, Arnd Bergmann <arnd@arndb.de> wrote:
> 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.

OK changing it.

>> +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?

I don't see any point in it, it's so basic to be able to access the
MMIO devices on the platform, the plan was to select the driver
from the corresponding mach-qcom SoC type (MSM8660+APQ8060).

But I can make it a module instead, if preferred.

Yours,
Linus Walleij

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

Thread overview: 13+ 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
     [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
     [not found]     ` <1472028758-29272-2-git-send-email-linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
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-24  8:52 ` [PATCH 2/4 v2] soc: qcom: add EBI2 driver Linus Walleij
2016-08-29 13:20   ` Arnd Bergmann
2016-08-29 13:28     ` Linus Walleij [this message]
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 ` [PATCH 4/4 v2] ARM: dts: add SMSC ethernet on the APQ8060 Dragonboard Linus Walleij
2016-08-29 13:21   ` Arnd Bergmann
2016-08-29 13:36     ` Linus Walleij
2016-08-24  8:55 ` [PATCH 0/4] EBI2 bus and ethernet on MSM8660/APQ8060 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='CACRpkdZHHGZaaxym9f-3mGREmokRhgNm3yb_HxaP0=_iuZNk1g@mail.gmail.com' \
    --to=linus.walleij@linaro.org \
    --cc=andy.gross@linaro.org \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=david.brown@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 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).