mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
To: linux-kernel@vger.kernel.org
Cc: linux-arm-kernel@lists.arm.linux.org.uk, linux-omap@vger.kernel.org
Subject: [PATCH 05/10] omap mailbox: fix empty struct device for omap1
Date: Fri, 16 Jan 2009 10:27:27 +0200	[thread overview]
Message-ID: <20090116082727.17571.87307.stgit@oreo.research.nokia.com> (raw)
In-Reply-To: <20090116081919.17571.34378.stgit@oreo.research.nokia.com>

Signed-off-by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
---

 arch/arm/mach-omap1/devices.c |    2 +-
 arch/arm/mach-omap1/mailbox.c |   31 +++++++++++++++++--------------
 2 files changed, 18 insertions(+), 15 deletions(-)

diff --git a/arch/arm/mach-omap1/devices.c b/arch/arm/mach-omap1/devices.c
index 77382d8..b4b6106 100644
--- a/arch/arm/mach-omap1/devices.c
+++ b/arch/arm/mach-omap1/devices.c
@@ -86,7 +86,7 @@ static struct resource mbox_resources[] = {
 };
 
 static struct platform_device mbox_device = {
-	.name		= "mailbox",
+	.name		= "omap1-mailbox",
 	.id		= -1,
 	.num_resources	= ARRAY_SIZE(mbox_resources),
 	.resource	= mbox_resources,
diff --git a/arch/arm/mach-omap1/mailbox.c b/arch/arm/mach-omap1/mailbox.c
index 59abbf3..87539db 100644
--- a/arch/arm/mach-omap1/mailbox.c
+++ b/arch/arm/mach-omap1/mailbox.c
@@ -1,7 +1,7 @@
 /*
  * Mailbox reservation modules for DSP
  *
- * Copyright (C) 2006 Nokia Corporation
+ * Copyright (C) 2006-2008 Nokia Corporation
  * Written by: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
  *
  * This file is subject to the terms and conditions of the GNU General Public
@@ -17,6 +17,8 @@
 #include <mach/mailbox.h>
 #include <mach/irqs.h>
 
+#define DRV_NAME "omap1-mailbox"
+
 #define MAILBOX_ARM2DSP1		0x00
 #define MAILBOX_ARM2DSP1b		0x04
 #define MAILBOX_DSP2ARM1		0x08
@@ -27,7 +29,7 @@
 #define MAILBOX_DSP2ARM1_Flag		0x1c
 #define MAILBOX_DSP2ARM2_Flag		0x20
 
-unsigned long mbox_base;
+static void __iomem *mbox_base;
 
 struct omap_mbox1_fifo {
 	unsigned long cmd;
@@ -40,14 +42,14 @@ struct omap_mbox1_priv {
 	struct omap_mbox1_fifo rx_fifo;
 };
 
-static inline int mbox_read_reg(unsigned int reg)
+static inline int mbox_read_reg(size_t ofs)
 {
-	return __raw_readw(mbox_base + reg);
+	return __raw_readw(mbox_base + ofs);
 }
 
-static inline void mbox_write_reg(unsigned int val, unsigned int reg)
+static inline void mbox_write_reg(u32 val, size_t ofs)
 {
-	__raw_writew(val, mbox_base + reg);
+	__raw_writew(val, mbox_base + ofs);
 }
 
 /* msg */
@@ -143,7 +145,7 @@ struct omap_mbox mbox_dsp_info = {
 };
 EXPORT_SYMBOL(mbox_dsp_info);
 
-static int __init omap1_mbox_probe(struct platform_device *pdev)
+static int __devinit omap1_mbox_probe(struct platform_device *pdev)
 {
 	struct resource *res;
 	int ret = 0;
@@ -170,12 +172,10 @@ static int __init omap1_mbox_probe(struct platform_device *pdev)
 	}
 	mbox_dsp_info.irq = res->start;
 
-	ret = omap_mbox_register(&mbox_dsp_info);
-
-	return ret;
+	return omap_mbox_register(&pdev->dev, &mbox_dsp_info);
 }
 
-static int omap1_mbox_remove(struct platform_device *pdev)
+static int __devexit omap1_mbox_remove(struct platform_device *pdev)
 {
 	omap_mbox_unregister(&mbox_dsp_info);
 
@@ -184,9 +184,9 @@ static int omap1_mbox_remove(struct platform_device *pdev)
 
 static struct platform_driver omap1_mbox_driver = {
 	.probe	= omap1_mbox_probe,
-	.remove	= omap1_mbox_remove,
+	.remove	= __devexit_p(omap1_mbox_remove),
 	.driver	= {
-		.name	= "mailbox",
+		.name	= DRV_NAME,
 	},
 };
 
@@ -203,4 +203,7 @@ static void __exit omap1_mbox_exit(void)
 module_init(omap1_mbox_init);
 module_exit(omap1_mbox_exit);
 
-MODULE_LICENSE("GPL");
+MODULE_LICENSE("GPL v2");
+MODULE_DESCRIPTION("omap mailbox: omap1 architecture specific functions");
+MODULE_AUTHOR("Hiroshi DOYU" <Hiroshi.DOYU@nokia.com>);
+MODULE_ALIAS("platform:"DRV_NAME);


  parent reply	other threads:[~2009-01-16  8:29 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-16  8:27 [PATCH 00/10] arm: omap mailbox: add omap3 support with some fixes Hiroshi DOYU
2009-01-16  8:27 ` [PATCH 01/10] omap mailbox: cleanup omap2 register definition with macro Hiroshi DOYU
2009-01-16  9:56   ` roel kluin
2009-01-16 12:15     ` Hiroshi DOYU
2009-01-16 13:21       ` Hiroshi DOYU
2009-01-16  8:27 ` [PATCH 02/10] omap mailbox: add initial omap3 support Hiroshi DOYU
2009-01-16 15:43   ` Felipe Balbi
2009-01-16  8:27 ` [PATCH 03/10] omap mailbox: print hardware revision at startup Hiroshi DOYU
2009-01-16  8:27 ` [PATCH 04/10] omap mailbox: fix empty struct device for omap_mbox Hiroshi DOYU
2009-01-16  8:27 ` Hiroshi DOYU [this message]
2009-01-28 14:49   ` [PATCH 05/10] omap mailbox: fix empty struct device for omap1 Russell King - ARM Linux
2009-01-28 15:29     ` Hiroshi DOYU
2009-01-28 17:50       ` Russell King - ARM Linux
2009-01-28 19:21         ` Hiroshi DOYU
2009-01-28 19:41           ` Russell King - ARM Linux
2009-01-16  8:27 ` [PATCH 06/10] omap mailbox: fix empty struct device for omap2 Hiroshi DOYU
2009-01-16  8:27 ` [PATCH 07/10] omap mailbox: add save_/restore_ctx() for PM Hiroshi DOYU
2009-01-17 17:10   ` Russell King - ARM Linux
2009-01-17 17:20     ` Russell King - ARM Linux
2009-01-19 10:36       ` Hiroshi DOYU
2009-01-19 22:00         ` Russell King - ARM Linux
2009-01-16  8:27 ` [PATCH 08/10] omap mailbox: move mailbox.h into mailbox.c Hiroshi DOYU
2009-01-16  8:27 ` [PATCH 09/10] omap mailbox: convert sequence bit checking to module paramter Hiroshi DOYU
2009-01-16  8:27 ` [PATCH 10/10] omap mailbox: remove unnecessary header file inclusion Hiroshi DOYU
2009-01-30 18:57 ` [PATCH 00/10] arm: omap mailbox: add omap3 support with some fixes Tony Lindgren

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090116082727.17571.87307.stgit@oreo.research.nokia.com \
    --to=hiroshi.doyu@nokia.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome