aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap1/mailbox.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-03-28 17:03:14 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-03-28 17:03:14 -0400
commit0fe41b8982001cd14ee2c77cd776735a5024e98b (patch)
tree83e65d595c413d55259ea14fb97748ce5efe5707 /arch/arm/mach-omap1/mailbox.c
parenteedf2c5296a8dfaaf9aec1a938c1d3bd73159a30 (diff)
parent9759d22c8348343b0da4e25d6150c41712686c14 (diff)
Merge branch 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'devel' of master.kernel.org:/home/rmk/linux-2.6-arm: (422 commits) [ARM] 5435/1: fix compile warning in sanity_check_meminfo() [ARM] 5434/1: ARM: OMAP: Fix mailbox compile for 24xx [ARM] pxa: fix the bad assumption that PCMCIA sockets always start with 0 [ARM] pxa: fix Colibri PXA300 and PXA320 LCD backlight pins imxfb: Fix TFT mode i.MX21/27: remove ifdef CONFIG_FB_IMX imxfb: add clock support mxc: add arch_reset() function clkdev: add possibility to get a clock based on the device name i.MX1: remove fb support from mach-imx [ARM] pxa: build arch/arm/plat-pxa/mfp.c only when PXA3xx or ARCH_MMP defined Gemini: Add support for Teltonika RUT100 Gemini: gpiolib based GPIO support v2 MAINTAINERS: add myself as Gemini architecture maintainer ARM: Add Gemini architecture v3 [ARM] OMAP: Fix compile for omap2_init_common_hw() MAINTAINERS: Add myself as Faraday ARM core variant maintainer ARM: Add support for FA526 v2 [ARM] acorn,ebsa110,footbridge,integrator,sa1100: Convert asm/io.h to linux/io.h [ARM] collie: fix two minor formatting nits ...
Diffstat (limited to 'arch/arm/mach-omap1/mailbox.c')
-rw-r--r--arch/arm/mach-omap1/mailbox.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index 59abbf331a96..0af4d6c85b47 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * Mailbox reservation modules for DSP 2 * Mailbox reservation modules for DSP
3 * 3 *
4 * Copyright (C) 2006 Nokia Corporation 4 * Copyright (C) 2006-2009 Nokia Corporation
5 * Written by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com> 5 * Written by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
6 * 6 *
7 * This file is subject to the terms and conditions of the GNU General Public 7 * This file is subject to the terms and conditions of the GNU General Public
@@ -27,7 +27,7 @@
27#define MAILBOX_DSP2ARM1_Flag 0x1c 27#define MAILBOX_DSP2ARM1_Flag 0x1c
28#define MAILBOX_DSP2ARM2_Flag 0x20 28#define MAILBOX_DSP2ARM2_Flag 0x20
29 29
30unsigned long mbox_base; 30static void __iomem *mbox_base;
31 31
32struct omap_mbox1_fifo { 32struct omap_mbox1_fifo {
33 unsigned long cmd; 33 unsigned long cmd;
@@ -40,14 +40,14 @@ struct omap_mbox1_priv {
40 struct omap_mbox1_fifo rx_fifo; 40 struct omap_mbox1_fifo rx_fifo;
41}; 41};
42 42
43static inline int mbox_read_reg(unsigned int reg) 43static inline int mbox_read_reg(size_t ofs)
44{ 44{
45 return __raw_readw(mbox_base + reg); 45 return __raw_readw(mbox_base + ofs);
46} 46}
47 47
48static inline void mbox_write_reg(unsigned int val, unsigned int reg) 48static inline void mbox_write_reg(u32 val, size_t ofs)
49{ 49{
50 __raw_writew(val, mbox_base + reg); 50 __raw_writew(val, mbox_base + ofs);
51} 51}
52 52
53/* msg */ 53/* msg */
@@ -143,7 +143,7 @@ struct omap_mbox mbox_dsp_info = {
143}; 143};
144EXPORT_SYMBOL(mbox_dsp_info); 144EXPORT_SYMBOL(mbox_dsp_info);
145 145
146static int __init omap1_mbox_probe(struct platform_device *pdev) 146static int __devinit omap1_mbox_probe(struct platform_device *pdev)
147{ 147{
148 struct resource *res; 148 struct resource *res;
149 int ret = 0; 149 int ret = 0;
@@ -170,12 +170,10 @@ static int __init omap1_mbox_probe(struct platform_device *pdev)
170 } 170 }
171 mbox_dsp_info.irq = res->start; 171 mbox_dsp_info.irq = res->start;
172 172
173 ret = omap_mbox_register(&mbox_dsp_info); 173 return omap_mbox_register(&pdev->dev, &mbox_dsp_info);
174
175 return ret;
176} 174}
177 175
178static int omap1_mbox_remove(struct platform_device *pdev) 176static int __devexit omap1_mbox_remove(struct platform_device *pdev)
179{ 177{
180 omap_mbox_unregister(&mbox_dsp_info); 178 omap_mbox_unregister(&mbox_dsp_info);
181 179
@@ -184,9 +182,9 @@ static int omap1_mbox_remove(struct platform_device *pdev)
184 182
185static struct platform_driver omap1_mbox_driver = { 183static struct platform_driver omap1_mbox_driver = {
186 .probe = omap1_mbox_probe, 184 .probe = omap1_mbox_probe,
187 .remove = omap1_mbox_remove, 185 .remove = __devexit_p(omap1_mbox_remove),
188 .driver = { 186 .driver = {
189 .name = "mailbox", 187 .name = "omap1-mailbox",
190 }, 188 },
191}; 189};
192 190
@@ -203,4 +201,7 @@ static void __exit omap1_mbox_exit(void)
203module_init(omap1_mbox_init); 201module_init(omap1_mbox_init);
204module_exit(omap1_mbox_exit); 202module_exit(omap1_mbox_exit);
205 203
206MODULE_LICENSE("GPL"); 204MODULE_LICENSE("GPL v2");
205MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions");
206MODULE_AUTHOR("Hiroshi DOYU" <Hiroshi.DOYU@nokia.com>);
207MODULE_ALIAS("platform:omap1-mailbox");