diff options
author | Ashwin Chaugule <ashwin.chaugule@linaro.org> | 2014-11-12 19:59:38 -0500 |
---|---|---|
committer | Jassi Brar <jaswinder.singh@linaro.org> | 2014-11-27 12:51:09 +0530 |
commit | 86c22f8c9a3b71d42d38bfcd80372de72f573713 (patch) | |
tree | c8e30e35cfd742f46fb8e96a584954e895d4f36b /drivers/mailbox/mailbox.h | |
parent | 8841a66aaa7c3b1dfeeb4192d05f2ca86df58f00 (diff) |
Mailbox: Add support for Platform Communication Channel
ACPI 5.0+ spec defines a generic mode of communication
between the OS and a platform such as the BMC. This medium
(PCC) is typically used by CPPC (ACPI CPU Performance management),
RAS (ACPI reliability protocol) and MPST (ACPI Memory power
states).
This patch adds PCC support as a Mailbox Controller. As of
ACPI v5.1 there is no provision for clients to lookup mailbox
controllers in a way that Linux expects. e.g. in DT the clients
can list the mailboxes they can associate with in the DT binding
and then provide a unique index to lookup a channel within a mailbox.
Since the ACPI spec doesn't have anything similar, we introduce a
mailbox controller specific API so that when the client calls it,
we know to lookup in the context of a specific controller. This
also helps in keeping a consistent interface across DT and ACPI
for such drivers.
This patch implements basic PCC support using the ACPI v5.1
structures. IRQ mode support will be provided as follow up patches.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule@linaro.org>
Reviewed-by: Mark Brown <broonie@kernel.org>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox/mailbox.h')
-rw-r--r-- | drivers/mailbox/mailbox.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/drivers/mailbox/mailbox.h b/drivers/mailbox/mailbox.h new file mode 100644 index 000000000000..456ba68513bb --- /dev/null +++ b/drivers/mailbox/mailbox.h @@ -0,0 +1,14 @@ +/* + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __MAILBOX_H +#define __MAILBOX_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 */ + +#endif /* __MAILBOX_H */ |