From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 2/7] mailbox: arm_mhu: add driver for ARM MHU controller
Date: Tue, 3 Feb 2015 12:32:16 +0000 [thread overview]
Message-ID: <20150203123216.GO8656@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1422955763-6630-1-git-send-email-Vincent.Yang@tw.fujitsu.com>
On Tue, Feb 03, 2015 at 05:29:23PM +0800, Vincent Yang wrote:
> +static int mhu_send_data(struct mbox_chan *chan, void *data)
> +{
> + struct mhu_link *mlink = chan->con_priv;
> +
> + pr_debug("%s:%d\n", __func__, __LINE__);
> + if (!mhu_last_tx_done(chan)) {
> + dev_err(chan->mbox->dev, "Last TX(%d) pending!\n", mlink->irq);
> + return -EBUSY;
> + }
> +
> + writel_relaxed((u32)data, mlink->tx_reg + INTR_SET_OFS);
Doesn't that cause a GCC warning?
> +static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
> +{
> + int i, err;
> + struct arm_mhu *mhu;
> + struct device *dev = &adev->dev;
> + int mhu_reg[3] = {0x0, 0x20, 0x200};
> +
> + err = amba_request_regions(adev, NULL);
> + if (err)
> + return err;
> +
> + /* Allocate memory for device */
> + mhu = devm_kzalloc(dev, sizeof(*mhu), GFP_KERNEL);
> + if (!mhu)
> + return -ENOMEM;
> +
> + mhu->base = devm_ioremap(dev, adev->res.start,
> + resource_size(&adev->res));
> + if (!mhu->base) {
> + dev_err(dev, "ioremap failed\n");
> + return -ENXIO;
mhu->base = devm_ioremap_resource(dev, &adev->res);
if (IS_ERR(mhu->base)) {
dev_err(dev, "ioremap failed\n");
return PTR_ERR(mhu->base);
> + }
> +
> + for (i = 0; i < 3; i++) {
> + mhu->chan[i].con_priv = &mhu->mlink[i];
> + mhu->mlink[i].irq = adev->irq[i];
> + mhu->mlink[i].rx_reg = mhu->base + mhu_reg[i];
> + mhu->mlink[i].tx_reg = mhu->mlink[i].rx_reg + 0x100;
> + }
> +
> + mhu->mbox.dev = dev;
> + mhu->mbox.chans = &mhu->chan[0];
> + mhu->mbox.num_chans = 3;
> + mhu->mbox.ops = &mhu_ops;
> + mhu->mbox.txdone_irq = false;
> + mhu->mbox.txdone_poll = true;
> + mhu->mbox.txpoll_period = 10;
> +
> + amba_set_drvdata(adev, mhu);
> +
> + err = mbox_controller_register(&mhu->mbox);
> + if (err) {
> + dev_err(dev, "Failed to register mailboxes %d\n", err);
> + return err;
> + }
> +
> + dev_err(dev, "ARM MHU Mailbox registered\n");
Why is this an error?
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
next prev parent reply other threads:[~2015-02-03 12:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-03 9:21 [PATCH v5 0/7] Support for Fujitsu MB86S7X SoCs Vincent Yang
2015-02-03 9:27 ` [PATCH v5 1/7] ARM: Add platform support " Vincent Yang
2015-02-03 9:29 ` [PATCH v5 2/7] mailbox: arm_mhu: add driver for ARM MHU controller Vincent Yang
2015-02-03 12:32 ` Russell King - ARM Linux [this message]
2015-02-03 14:39 ` Jassi Brar
2015-02-03 14:46 ` Russell King - ARM Linux
2015-02-03 15:25 ` Arnd Bergmann
2015-02-04 3:27 ` Jassi Brar
2015-02-04 10:29 ` Arnd Bergmann
2015-02-04 14:34 ` Jassi Brar
2015-02-04 14:48 ` Arnd Bergmann
2015-02-04 15:33 ` Jassi Brar
2015-02-04 16:42 ` Arnd Bergmann
2015-02-05 5:08 ` Jassi Brar
2015-02-05 11:43 ` Arnd Bergmann
[not found] ` <CAJe_Zhf_WuRK2EE0Sj9ksXDDe5VA=DJ+H3eS4YRKpDZLdRRfow@mail.gmail.com>
2015-02-05 12:08 ` Russell King - ARM Linux
2015-02-05 12:31 ` Arnd Bergmann
2015-02-05 14:50 ` Jassi Brar
2015-02-04 15:09 ` Russell King - ARM Linux
2015-02-03 9:30 ` [PATCH v5 3/7] ARM: MB86S7X: Add MCPM support Vincent Yang
2015-02-03 9:31 ` [PATCH v5 4/7] clk: Add clock driver for mb86s7x Vincent Yang
2015-02-03 9:32 ` [PATCH v5 5/7] dt: mb86s7x: add dt files for MB86S7x evbs Vincent Yang
2015-02-03 9:34 ` [PATCH v5 6/7] of: add Fujitsu vendor prefix Vincent Yang
2015-02-03 9:35 ` [PATCH v5 7/7] ARM: MB86S7x: Add configs Vincent Yang
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=20150203123216.GO8656@n2100.arm.linux.org.uk \
--to=linux@arm.linux.org.uk \
--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;
as well as URLs for NNTP newsgroup(s).