From: Ashwin Chaugule <ashwin.chaugule@linaro.org>
To: arnd@arndb.de
Cc: linux-acpi@vger.kernel.org, linaro-acpi@lists.linaro.org,
rjw@rjwysocki.net, broonie@kernel.org,
Ashwin Chaugule <ashwin.chaugule@linaro.org>
Subject: [PATCH v4 1/4] Mailbox: Prepare to add PCC Mailbox support
Date: Wed, 3 Sep 2014 15:38:56 -0400 [thread overview]
Message-ID: <1409773139-10356-2-git-send-email-ashwin.chaugule@linaro.org> (raw)
In-Reply-To: <1409773139-10356-1-git-send-email-ashwin.chaugule@linaro.org>
Restructure code to allow extending the Mailbox
functionality for PCC (Platform Communication Channel)
as a Mailbox.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
---
drivers/mailbox/mailbox.c | 10 +++-------
include/linux/mailbox_controller.h | 4 ++++
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index 63ecc17..5866412 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -21,12 +21,8 @@
#include <linux/mailbox_client.h>
#include <linux/mailbox_controller.h>
-#define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */
-#define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */
-#define TXDONE_BY_ACK BIT(2) /* S/W ACK recevied by Client ticks the TX */
-
-static LIST_HEAD(mbox_cons);
-static DEFINE_MUTEX(con_mutex);
+LIST_HEAD(mbox_cons);
+DEFINE_MUTEX(con_mutex);
static int add_to_rbuf(struct mbox_chan *chan, void *mssg)
{
@@ -107,7 +103,7 @@ static void tx_tick(struct mbox_chan *chan, int r)
complete(&chan->tx_complete);
}
-static void poll_txdone(unsigned long data)
+void poll_txdone(unsigned long data)
{
struct mbox_controller *mbox = (struct mbox_controller *)data;
bool txdone, resched = false;
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index 9ee195b..956cc06 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -15,6 +15,10 @@
struct mbox_chan;
+#define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */
+#define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */
+#define TXDONE_BY_ACK BIT(2) /* S/W ACK recevied by Client ticks the TX */
+
/**
* struct mbox_chan_ops - methods to control mailbox channels
* @send_data: The API asks the MBOX controller driver, in atomic
--
1.9.1
next prev parent reply other threads:[~2014-09-03 19:39 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-03 19:38 [PATCH v4 0/4] PCC: Platform Communication Channel Ashwin Chaugule
2014-09-03 19:38 ` Ashwin Chaugule [this message]
2014-09-03 19:38 ` [PATCH v4 2/4] Mailbox: Add PCC Mailbox Helper functions Ashwin Chaugule
2014-09-03 19:56 ` Arnd Bergmann
2014-09-03 20:06 ` Ashwin Chaugule
2014-09-03 19:38 ` [PATCH v4 3/4] Mailbox: Add support for Platform Communication Channel Ashwin Chaugule
2014-09-03 19:38 ` [PATCH v4 4/4] PCC test Ashwin Chaugule
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=1409773139-10356-2-git-send-email-ashwin.chaugule@linaro.org \
--to=ashwin.chaugule@linaro.org \
--cc=arnd@arndb.de \
--cc=broonie@kernel.org \
--cc=linaro-acpi@lists.linaro.org \
--cc=linux-acpi@vger.kernel.org \
--cc=rjw@rjwysocki.net \
/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