From: Linus Walleij <linus.walleij@linaro.org>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Mika Westerberg <mika.westerberg@iki.fi>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
Vinod Koul <vinod.koul@intel.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"ryan@bluewatersys.com" <ryan@bluewatersys.com>,
Dan Williams <dan.j.williams@intel.com>,
Grant Likely <grant.likely@secretlab.ca>,
spi mailing list <spi-devel-general@lists.sourceforge.net>
Subject: Re: [PATCH 1/5] dmaengine: add ep93xx DMA support
Date: Fri, 27 May 2011 00:58:19 +0200 [thread overview]
Message-ID: <BANLkTimry2+rdp=9FA-fuhJLNfkcP3Db4w@mail.gmail.com> (raw)
In-Reply-To: <0D753D10438DA54287A00B027084269764D3319EC4@AUSP01VMBX24.collaborationhost.net>
2011/5/26 H Hartley Sweeten <hartleys@visionengravers.com>:
> I think the biggest hurdle with using the amba-pl022 driver is that the ep93xx
> spi peripheral does not have the registers with the pid and cid id's. Without
> those I don't think the amba bus driver will be able to match the device to
> the driver.
This is not a problem. We have this code to dynamically create and
register a device with a specific periphid on ux500. It worked even
before my recent patches to amba's bus.c if you have only
zeroes in these registers:
struct amba_device *
dbx500_add_amba_device(const char *name, resource_size_t base,
int irq, void *pdata, unsigned int periphid)
{
struct amba_device *dev;
int ret;
dev = kzalloc(sizeof *dev, GFP_KERNEL);
if (!dev)
return ERR_PTR(-ENOMEM);
dev->dev.init_name = name;
dev->res.start = base;
dev->res.end = base + SZ_4K - 1;
dev->res.flags = IORESOURCE_MEM;
dev->dma_mask = DMA_BIT_MASK(32);
dev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
dev->irq[0] = irq;
dev->irq[1] = NO_IRQ;
dev->periphid = periphid;
dev->dev.platform_data = pdata;
ret = amba_device_register(dev, &iomem_resource);
if (ret) {
kfree(dev);
return ERR_PTR(ret);
}
return dev;
}
I'd recommend coming up with some clever numbering scheme
with invented vendor ID.
Yours,
Linus Walleij
prev parent reply other threads:[~2011-05-26 22:58 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <cover.1306082097.git.mika.westerberg@iki.fi>
[not found] ` <e6777eb9f7228ee1dadec1f0c9f16c3afc44c307.1306082097.git.mika.westerberg@iki.fi>
[not found] ` <BANLkTi=3z3kO5VEe2up8Mfm+bNXkY3baUw@mail.gmail.com>
[not found] ` <20110525195413.GC2996@acer>
2011-05-25 20:47 ` [PATCH 1/5] dmaengine: add ep93xx DMA support Linus Walleij
2011-05-26 4:33 ` Mika Westerberg
2011-05-26 5:26 ` Ryan Mallon
2011-05-26 7:15 ` Linus Walleij
2011-05-26 18:38 ` Mika Westerberg
2011-05-26 18:48 ` H Hartley Sweeten
2011-05-26 21:53 ` Russell King - ARM Linux
2011-05-26 22:58 ` Linus Walleij [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='BANLkTimry2+rdp=9FA-fuhJLNfkcP3Db4w@mail.gmail.com' \
--to=linus.walleij@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=grant.likely@secretlab.ca \
--cc=hartleys@visionengravers.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mika.westerberg@iki.fi \
--cc=ryan@bluewatersys.com \
--cc=spi-devel-general@lists.sourceforge.net \
--cc=vinod.koul@intel.com \
/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).