From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Petr Kulhavy <petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
Cc: balbi-l0cyMroinI0@public.gmane.org,
sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support
Date: Thu, 04 Feb 2016 14:37:52 +0100 [thread overview]
Message-ID: <2084444.JalqY5vdCm@wuerfel> (raw)
In-Reply-To: <1454590807-26566-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
On Thursday 04 February 2016 14:00:07 Petr Kulhavy wrote:
> @@ -560,6 +626,97 @@ static int da8xx_probe(struct platform_device *pdev)
> glue->dev = &pdev->dev;
> glue->clk = clk;
>
> + if (np) {
> + struct musb_hdrc_config *config;
> + struct musb_hdrc_platform_data *data;
> + u32 phy20_refclock_freq, phy20_clkmux_cfg;
> +
> + pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
> + if (!pdata) {
> + ret = -ENOMEM;
> + goto err5;
> + }
So all the code here is built unconditionally...
> @@ -627,11 +784,22 @@ static int da8xx_remove(struct platform_device *pdev)
> return 0;
> }
>
> +#ifdef CONFIG_OF
> +static const struct of_device_id da8xx_id_table[] = {
> + {
> + .compatible = "ti,da8xx-musb"
> + },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, da8xx_id_table);
> +#endif
> +
but this is in an #ifdef?
I would suggest you do the opposite and leave the id table in there
but change the first check to
if (IS_ENABLED(CONFIG_OF) && np)
So the compiler can discard that code when CONFIG_OF is disabled.
> + pdev->dev.dma_mask = &da8xx_dmamask;
> + pdev->dev.coherent_dma_mask = da8xx_dmamask;
Don't hardcode DMA masks like this, the mask should be set to a 32-bit
mask whenever the device is created, and the driver can override it
by calling dma_set_mask().
Arnd
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-02-04 13:37 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-04 13:00 [PATCH 1/1] Drivers: USB: DA8xx MUSB: added DT support Petr Kulhavy
[not found] ` <1454590807-26566-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-04 13:37 ` Arnd Bergmann [this message]
2016-02-04 16:17 ` Petr Kulhavy
-- strict thread matches above, loose matches on Subject: below --
2016-02-05 17:34 Petr Kulhavy
[not found] ` <1454693676-20211-1-git-send-email-petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-05 22:22 ` Arnd Bergmann
2016-02-05 23:55 ` Petr Kulhavy
[not found] ` <CAEP=dzCDWTC1p1=gJebmLUQGqw+H8=T5wFNUbLBOh-uX=uuvLA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-06 21:48 ` Sergei Shtylyov
2016-02-08 13:04 ` Petr Kulhavy
[not found] ` <56B89256.9050708-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-08 13:34 ` Arnd Bergmann
2016-02-06 22:27 ` Sergei Shtylyov
[not found] ` <56B67351.1030604-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-08 9:19 ` Petr Kulhavy
[not found] ` <56B85DB6.9030605-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-08 11:20 ` Sergei Shtylyov
[not found] ` <56B87A07.1060103-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-08 11:48 ` Petr Kulhavy
[not found] ` <56B88098.1070309-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-08 12:25 ` Sergei Shtylyov
[not found] ` <56B8891C.3080409-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-08 12:49 ` Petr Kulhavy
[not found] ` <56B88ED5.9000104-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-08 13:49 ` Sergei Shtylyov
2016-02-08 15:32 ` Petr Kulhavy
[not found] ` <56B8B515.5080106-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-08 17:55 ` Sergei Shtylyov
[not found] ` <56B8D676.1050809-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-09 8:30 ` Petr Kulhavy
[not found] ` <56B9A3C1.4000600-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-09 10:50 ` Sergei Shtylyov
[not found] ` <56B9C46B.30708-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-10 11:26 ` Petr Kulhavy
[not found] ` <56BB1E5F.4050100-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org>
2016-02-10 14:07 ` Sergei Shtylyov
[not found] ` <56BB4418.4090403-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-10 14:12 ` Sergei Shtylyov
[not found] ` <56BB4553.30707-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@public.gmane.org>
2016-02-10 14:29 ` Petr Kulhavy
2016-02-08 11:47 ` Sergei Shtylyov
2016-02-08 19:49 ` Rob Herring
2016-02-08 19:59 ` Sergei Shtylyov
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=2084444.JalqY5vdCm@wuerfel \
--to=arnd-r2ngtmty4d4@public.gmane.org \
--cc=balbi-l0cyMroinI0@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=petr-Qh/3xLP0EvwAvxtiuMwx3w@public.gmane.org \
--cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox