summaryrefslogtreecommitdiffstats
path: root/drivers/mailbox
diff options
context:
space:
mode:
authorSuman Anna <s-anna@ti.com>2016-04-06 19:37:20 -0400
committerJassi Brar <jaswinder.singh@linaro.org>2016-04-26 00:49:38 -0400
commitdd28216528cf67339cd4f5854166fbd4eefd7fa8 (patch)
tree4c7ee604e34c769228e2c17e2a676723873bb06c /drivers/mailbox
parent9f0cee984a25a34c169dac67a11d9c951727e47a (diff)
mailbox/omap: kill omap_mbox_{save/restore}_ctx() functions
The omap_mbox_save_ctx() and omap_mbox_restore_ctx() API were previously provided to OMAP mailbox clients to save and restore the mailbox context during system suspend/resume. The save and restore functionality is now implemented through System PM driver callbacks, and there is no need for these functions, so kill these API. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Diffstat (limited to 'drivers/mailbox')
-rw-r--r--drivers/mailbox/omap-mailbox.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
index d8d3a4bc5262..c5e8b9cb170d 100644
--- a/drivers/mailbox/omap-mailbox.c
+++ b/drivers/mailbox/omap-mailbox.c
@@ -55,13 +55,6 @@
55#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m))) 55#define MAILBOX_IRQ_NEWMSG(m) (1 << (2 * (m)))
56#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1)) 56#define MAILBOX_IRQ_NOTFULL(m) (1 << (2 * (m) + 1))
57 57
58#define MBOX_REG_SIZE 0x120
59
60#define OMAP4_MBOX_REG_SIZE 0x130
61
62#define MBOX_NR_REGS (MBOX_REG_SIZE / sizeof(u32))
63#define OMAP4_MBOX_NR_REGS (OMAP4_MBOX_REG_SIZE / sizeof(u32))
64
65/* Interrupt register configuration types */ 58/* Interrupt register configuration types */
66#define MBOX_INTR_CFG_TYPE1 0 59#define MBOX_INTR_CFG_TYPE1 0
67#define MBOX_INTR_CFG_TYPE2 1 60#define MBOX_INTR_CFG_TYPE2 1
@@ -118,7 +111,6 @@ struct omap_mbox {
118 struct omap_mbox_device *parent; 111 struct omap_mbox_device *parent;
119 struct omap_mbox_fifo tx_fifo; 112 struct omap_mbox_fifo tx_fifo;
120 struct omap_mbox_fifo rx_fifo; 113 struct omap_mbox_fifo rx_fifo;
121 u32 ctx[OMAP4_MBOX_NR_REGS];
122 u32 intr_type; 114 u32 intr_type;
123 struct mbox_chan *chan; 115 struct mbox_chan *chan;
124 bool send_no_irq; 116 bool send_no_irq;
@@ -209,49 +201,6 @@ static int is_mbox_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
209 return (int)(enable & status & bit); 201 return (int)(enable & status & bit);
210} 202}
211 203
212void omap_mbox_save_ctx(struct mbox_chan *chan)
213{
214 int i;
215 int nr_regs;
216 struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
217
218 if (WARN_ON(!mbox))
219 return;
220
221 if (mbox->intr_type)
222 nr_regs = OMAP4_MBOX_NR_REGS;
223 else
224 nr_regs = MBOX_NR_REGS;
225 for (i = 0; i < nr_regs; i++) {
226 mbox->ctx[i] = mbox_read_reg(mbox->parent, i * sizeof(u32));
227
228 dev_dbg(mbox->dev, "%s: [%02x] %08x\n", __func__,
229 i, mbox->ctx[i]);
230 }
231}
232EXPORT_SYMBOL(omap_mbox_save_ctx);
233
234void omap_mbox_restore_ctx(struct mbox_chan *chan)
235{
236 int i;
237 int nr_regs;
238 struct omap_mbox *mbox = mbox_chan_to_omap_mbox(chan);
239
240 if (WARN_ON(!mbox))
241 return;
242
243 if (mbox->intr_type)
244 nr_regs = OMAP4_MBOX_NR_REGS;
245 else
246 nr_regs = MBOX_NR_REGS;
247 for (i = 0; i < nr_regs; i++) {
248 mbox_write_reg(mbox->parent, mbox->ctx[i], i * sizeof(u32));
249 dev_dbg(mbox->dev, "%s: [%02x] %08x\n", __func__,
250 i, mbox->ctx[i]);
251 }
252}
253EXPORT_SYMBOL(omap_mbox_restore_ctx);
254
255static void _omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq) 204static void _omap_mbox_enable_irq(struct omap_mbox *mbox, omap_mbox_irq_t irq)
256{ 205{
257 u32 l; 206 u32 l;