From: Michael Schmitz <schmitzmic@gmail.com>
To: linux-m68k@vger.kernel.org, arnd@kernel.org
Cc: linux-scsi@vger.kernel.org, geert@linux-m68k.org,
Michael Schmitz <schmitzmic@gmail.com>
Subject: [PATCH v1 2/4] m68k - set up platform device for mvme147_scsi
Date: Sat, 9 Jul 2022 12:10:17 +1200 [thread overview]
Message-ID: <20220709001019.11149-3-schmitzmic@gmail.com> (raw)
In-Reply-To: <20220709001019.11149-1-schmitzmic@gmail.com>
Set up a platform device for the mvme147_scsi driver. The
platform device is required for conversion of the driver to
the DMA API.
CC: linux-scsi@vger.kernel.org
Link: https://lore.kernel.org/r/6d1d88ee-1cf6-c735-1e6d-bafd2096e322@gmail.com
Signed-off-by: Michael Schmitz <schmitzmic@gmail.com>
---
arch/m68k/mvme147/config.c | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/arch/m68k/mvme147/config.c b/arch/m68k/mvme147/config.c
index 4e6218115f43..c6e7dfe3eb54 100644
--- a/arch/m68k/mvme147/config.c
+++ b/arch/m68k/mvme147/config.c
@@ -21,6 +21,7 @@
#include <linux/console.h>
#include <linux/linkage.h>
#include <linux/init.h>
+#include <linux/platform_device.h>
#include <linux/major.h>
#include <linux/rtc.h>
#include <linux/interrupt.h>
@@ -188,3 +189,23 @@ int mvme147_hwclk(int op, struct rtc_time *t)
}
return 0;
}
+
+static const struct resource mvme147_scsi_rsrc[] __initconst = {
+ DEFINE_RES_MEM(MVME147_SCSI_BASE, 0xff),
+ DEFINE_RES_IRQ(MVME147_IRQ_SCSI_PORT),
+};
+
+int __init mvme147_platform_init(void)
+{
+ struct platform_device *pdev;
+ int rv = 0;
+
+ pdev = platform_device_register_simple("mvme147-scsi", -1,
+ mvme147_scsi_rsrc, ARRAY_SIZE(mvme147_scsi_rsrc));
+ if (IS_ERR(pdev))
+ rv = PTR_ERR(pdev);
+
+ return rv;
+}
+
+arch_initcall(mvme147_platform_init);
--
2.17.1
next prev parent reply other threads:[~2022-07-09 0:10 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-09 0:10 [PATCH v1 0/4] Convert m68k MVME147 WD33C93 SCSI driver to DMA API Michael Schmitz
2022-07-09 0:10 ` [PATCH v1 1/4] m68k - add MVME147 SCSI base address to mvme147hw.h Michael Schmitz
2022-07-10 16:06 ` Arnd Bergmann
2022-07-11 4:16 ` Michael Schmitz
2022-07-11 8:45 ` Arnd Bergmann
2022-07-11 20:04 ` Michael Schmitz
2022-07-11 22:39 ` Brad Boyer
2022-07-09 0:10 ` Michael Schmitz [this message]
2022-07-09 5:29 ` [PATCH v1 2/4] m68k - set up platform device for mvme147_scsi kernel test robot
2022-07-10 15:56 ` Arnd Bergmann
2022-07-11 4:11 ` Michael Schmitz
2022-07-09 0:10 ` [PATCH v1 3/4] scsi - convert mvme146_scsi.c to platform device Michael Schmitz
2022-07-10 16:11 ` Arnd Bergmann
2022-07-11 7:16 ` Geert Uytterhoeven
2022-07-11 7:57 ` Michael Schmitz
2022-07-11 8:27 ` Geert Uytterhoeven
2022-07-11 20:02 ` Michael Schmitz
2022-07-12 3:27 ` Michael Schmitz
2022-07-12 6:57 ` Geert Uytterhoeven
2022-07-12 7:59 ` Michael Schmitz
2022-07-09 0:10 ` [PATCH v1 4/4] scsi - convert mvme147_scsi driver to DMA API Michael Schmitz
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=20220709001019.11149-3-schmitzmic@gmail.com \
--to=schmitzmic@gmail.com \
--cc=arnd@kernel.org \
--cc=geert@linux-m68k.org \
--cc=linux-m68k@vger.kernel.org \
--cc=linux-scsi@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.