diff options
Diffstat (limited to 'arch/arm/mach-omap1/mailbox.c')
-rw-r--r-- | arch/arm/mach-omap1/mailbox.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c index 59abbf331a9..0af4d6c85b4 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 | ||
30 | unsigned long mbox_base; | 30 | static void __iomem *mbox_base; |
31 | 31 | ||
32 | struct omap_mbox1_fifo { | 32 | struct 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 | ||
43 | static inline int mbox_read_reg(unsigned int reg) | 43 | static 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 | ||
48 | static inline void mbox_write_reg(unsigned int val, unsigned int reg) | 48 | static 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 | }; |
144 | EXPORT_SYMBOL(mbox_dsp_info); | 144 | EXPORT_SYMBOL(mbox_dsp_info); |
145 | 145 | ||
146 | static int __init omap1_mbox_probe(struct platform_device *pdev) | 146 | static 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 | ||
178 | static int omap1_mbox_remove(struct platform_device *pdev) | 176 | static 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 | ||
185 | static struct platform_driver omap1_mbox_driver = { | 183 | static 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) | |||
203 | module_init(omap1_mbox_init); | 201 | module_init(omap1_mbox_init); |
204 | module_exit(omap1_mbox_exit); | 202 | module_exit(omap1_mbox_exit); |
205 | 203 | ||
206 | MODULE_LICENSE("GPL"); | 204 | MODULE_LICENSE("GPL v2"); |
205 | MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions"); | ||
206 | MODULE_AUTHOR("Hiroshi DOYU" <Hiroshi.DOYU@nokia.com>); | ||
207 | MODULE_ALIAS("platform:omap1-mailbox"); | ||