aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Anna2016-04-06 15:55:59 -0500
committerSuman Anna2016-05-24 11:53:11 -0500
commit867158164b8f1e9133161a06477543a7fb672b26 (patch)
treeaef574129e846260f37a41371c06c2845eccf58f
parent925aa901c8fd90383eb9df4ecc34885c6bc462dd (diff)
downloadmailbox-linux-4.4.y.tar.gz
mailbox-linux-4.4.y.tar.xz
mailbox-linux-4.4.y.zip
mailbox/omap: kill omap_mbox_{save/restore}_ctx() functionsmailbox-linux-4.4.y
[ Upstream commit dd28216528cf67339cd4f5854166fbd4eefd7fa8 ] 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> [s-anna@ti.com: cherry-pick commit 'dd28216528cf' from v4.7]
-rw-r--r--drivers/mailbox/omap-mailbox.c51
-rw-r--r--include/linux/omap-mailbox.h2
2 files changed, 0 insertions, 53 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;
diff --git a/include/linux/omap-mailbox.h b/include/linux/omap-mailbox.h
index 587bbdd31f5a..c726bd833761 100644
--- a/include/linux/omap-mailbox.h
+++ b/include/linux/omap-mailbox.h
@@ -21,8 +21,6 @@ struct mbox_client;
21struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl, 21struct mbox_chan *omap_mbox_request_channel(struct mbox_client *cl,
22 const char *chan_name); 22 const char *chan_name);
23 23
24void omap_mbox_save_ctx(struct mbox_chan *chan);
25void omap_mbox_restore_ctx(struct mbox_chan *chan);
26void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq); 24void omap_mbox_enable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
27void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq); 25void omap_mbox_disable_irq(struct mbox_chan *chan, omap_mbox_irq_t irq);
28 26