From: Paolo Pisati <p.pisati@gmail.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>,
Damien Le Moal <dlemoal@kernel.org>,
Niklas Cassel <cassel@kernel.org>
Cc: linux-m68k@lists.linux-m68k.org, linux-ide@vger.kernel.org,
linux-kernel@vger.kernel.org, Lee Jones <lee@kernel.org>,
mfd@lists.linux.dev
Subject: [PATCH v1 2/7] ata: pata_cswarp: bind to the Warp mfd cell instead of the Zorro device
Date: Wed, 11 Nov 2026 17:37:29 +0100 [thread overview]
Message-ID: <20261111163735.227286-3-p.pisati@gmail.com> (raw)
In-Reply-To: <20261111163735.227286-1-p.pisati@gmail.com>
Now that warp-mfd owns the device and hands the window out as the
"warp-pata" cell, take it from there.
PATA_CSWARP depends on WARP_MFD from here on.
Signed-off-by: Paolo Pisati <p.pisati@gmail.com>
---
drivers/ata/Kconfig | 2 +-
drivers/ata/pata_cswarp.c | 48 ++++++++++++++-------------------------
2 files changed, 18 insertions(+), 32 deletions(-)
diff --git a/drivers/ata/Kconfig b/drivers/ata/Kconfig
index 9704ed688775..407b79bf9405 100644
--- a/drivers/ata/Kconfig
+++ b/drivers/ata/Kconfig
@@ -1035,7 +1035,7 @@ config PATA_GAYLE
config PATA_CSWARP
tristate "Amiga CS Warp PATA support"
- depends on M68K && AMIGA && ZORRO
+ depends on WARP_MFD
help
This option enables support for the on-board IDE interface on
CS-Lab Warp Expansion Card (NOTE that idemode=native has to be
diff --git a/drivers/ata/pata_cswarp.c b/drivers/ata/pata_cswarp.c
index 58fe6d0012dc..41b4c93052cf 100644
--- a/drivers/ata/pata_cswarp.c
+++ b/drivers/ata/pata_cswarp.c
@@ -14,14 +14,12 @@
#include <linux/ata.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
-#include <linux/device-id/zorro.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/libata.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/platform_device.h>
-#include <linux/zorro.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi_host.h>
@@ -32,8 +30,6 @@
#define DRV_NAME "pata_cswarp"
-#define WARP_OFFSET_ATA 0x6000
-
static const struct scsi_host_template pata_cswarp_sht = {
ATA_PIO_SHT(DRV_NAME),
};
@@ -92,33 +88,27 @@ static struct ata_port_operations pata_cswarp_ops = {
.set_mode = pata_cswarp_set_mode,
};
-static int pata_cswarp_probe(struct zorro_dev *z,
- const struct zorro_device_id *ent)
+static int pata_cswarp_probe(struct platform_device *pdev)
{
static const char board_name[] = "csWarp";
struct ata_host *host;
struct ata_port *ap;
struct resource *res;
void __iomem *base;
- unsigned long board = z->resource.start;
- dev_info(&z->dev, "%s IDE controller (board: 0x%lx)\n", board_name,
- board);
+ res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "pata");
+ base = devm_ioremap_resource(&pdev->dev, res);
+ if (IS_ERR(base))
+ return PTR_ERR(base);
- res = devm_request_mem_region(&z->dev, board + WARP_OFFSET_ATA, 0x1800,
- DRV_NAME);
- if (!res)
- return -ENXIO;
+ dev_info(&pdev->dev, "%s IDE controller (board: %pR)\n", board_name,
+ res);
- host = ata_host_alloc(&z->dev, 1);
+ host = ata_host_alloc(&pdev->dev, 1);
if (!host)
return -ENXIO;
ap = host->ports[0];
- base = devm_ioremap(&z->dev, board + WARP_OFFSET_ATA, 0x1800);
- if (!base)
- return -ENOMEM;
-
ap->ops = &pata_cswarp_ops;
ap->pio_mask = ATA_PIO4;
@@ -145,34 +135,29 @@ static int pata_cswarp_probe(struct zorro_dev *z,
IRQF_SHARED, &pata_cswarp_sht);
}
-static void pata_cswarp_remove(struct zorro_dev *z)
+static void pata_cswarp_remove(struct platform_device *pdev)
{
- struct ata_host *host = dev_get_drvdata(&z->dev);
+ struct ata_host *host = dev_get_drvdata(&pdev->dev);
ata_host_detach(host);
}
-static const struct zorro_device_id pata_cswarp_zorro_tbl[] = {
- { .id = ZORRO_PROD_CSLAB_WARP_1260 },
- { }
-};
-MODULE_DEVICE_TABLE(zorro, pata_cswarp_zorro_tbl);
-
-static struct zorro_driver pata_cswarp_driver = {
- .name = "pata_cswarp",
- .id_table = pata_cswarp_zorro_tbl,
+static struct platform_driver pata_cswarp_driver = {
+ .driver = {
+ .name = "warp-pata",
+ },
.probe = pata_cswarp_probe,
.remove = pata_cswarp_remove,
};
static int __init pata_cswarp_init(void)
{
- return zorro_register_driver(&pata_cswarp_driver);
+ return platform_driver_register(&pata_cswarp_driver);
}
static void __exit pata_cswarp_unregister(void)
{
- zorro_unregister_driver(&pata_cswarp_driver);
+ platform_driver_unregister(&pata_cswarp_driver);
}
module_init(pata_cswarp_init);
@@ -181,3 +166,4 @@ module_exit(pata_cswarp_unregister);
MODULE_AUTHOR("Andrzej Rogozynski");
MODULE_DESCRIPTION("low-level driver for CSWarp PATA");
MODULE_LICENSE("GPL");
+MODULE_ALIAS("platform:warp-pata");
--
2.43.0
next prev parent reply other threads:[~2026-11-11 16:37 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-11 16:37 [PATCH v1 0/7] zorro: add a CS-Lab Warp 1260 MFD Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 1/7] zorro: warp mfd: add the CS-Lab Warp multifunction parent Paolo Pisati
2026-11-11 17:03 ` sashiko-bot
2026-11-11 18:04 ` Lee Jones
2026-11-12 15:21 ` Paolo Pisati
2026-11-11 16:37 ` Paolo Pisati [this message]
2026-11-11 17:12 ` [PATCH v1 2/7] ata: pata_cswarp: bind to the Warp mfd cell instead of the Zorro device sashiko-bot
2026-11-11 16:37 ` [PATCH v1 3/7] m68k: defconfig: enable WARP_MFD Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 4/7] zorro: warp mfd: add the dual-port RAM command channel and expose the board identity Paolo Pisati
2026-11-11 17:23 ` sashiko-bot
2026-11-11 16:37 ` [PATCH v1 5/7] zorro: warp mfd: expose the voltage and temperature sensors Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 6/7] zorro: warp mfd: expose the fan duty cycle Paolo Pisati
2026-11-11 16:37 ` [PATCH v1 7/7] zorro: warp mfd: expose the Kickstart slot selection Paolo Pisati
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=20261111163735.227286-3-p.pisati@gmail.com \
--to=p.pisati@gmail.com \
--cc=cassel@kernel.org \
--cc=dlemoal@kernel.org \
--cc=geert@linux-m68k.org \
--cc=lee@kernel.org \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=mfd@lists.linux.dev \
/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.