From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2] dmaengine: sirf: add CSRatlas7 SoC support
Date: Fri, 15 May 2015 13:13:47 +0200 [thread overview]
Message-ID: <2307498.30iKRMPrgR@wuerfel> (raw)
In-Reply-To: <1431684903-11219-1-git-send-email-21cnbao@gmail.com>
On Friday 15 May 2015 10:15:03 Barry Song wrote:
> @@ -658,8 +849,16 @@ static int sirfsoc_dma_probe(struct platform_device *op)
> return -ENOMEM;
> }
>
> - if (of_device_is_compatible(dn, "sirf,marco-dmac"))
> - sdma->is_marco = true;
> + if (of_device_is_compatible(dn, "sirf,atlas7-dmac")) {
> + sdma->ip_ver = SIRFSOC_DMA_VER_A7V1;
> + sdma->exec_desc = sirfsoc_dma_execute_hw_a7v1;
> + } else if (of_device_is_compatible(dn, "sirf,atlas7-dmac-v2")) {
> + sdma->ip_ver = SIRFSOC_DMA_VER_A7V2;
> + sdma->exec_desc = sirfsoc_dma_execute_hw_a7v2;
> + } else {
> + sdma->ip_ver = SIRFSOC_DMA_VER_A6;
> + sdma->exec_desc = sirfsoc_dma_execute_hw_a6;
> + }
>
> if (of_property_read_u32(dn, "cell-index", &id)) {
> dev_err(dev, "Fail to get DMAC index\n");
Please send a separate patch for the removal of the marco support, it's
always better to keep those things separate.
When you have noticeable differences like this, use the data field of
the sirfsoc_dma_match[] array to pass a structure with the differences,
to avoid the chain of 'of_device_is_compatible' calls. You can use
data = of_match_device(dev->driver->of_match_table, dev)->data;
to get that pointer from the probe function.
Arnd
next prev parent reply other threads:[~2015-05-15 11:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-15 10:15 [PATCH v2] dmaengine: sirf: add CSRatlas7 SoC support Barry Song
2015-05-15 11:13 ` Arnd Bergmann [this message]
2015-05-16 15:00 ` Barry Song
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=2307498.30iKRMPrgR@wuerfel \
--to=arnd@arndb.de \
--cc=linux-arm-kernel@lists.infradead.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