Re: [PATCH 2/3] amiga: cslab ata support

Geert Uytterhoeven
2025-03-24T08:18:11Z

Hi Paolo,

On Fri, 21 Mar 2025 at 16:14, Paolo Pisati <p.pisati@gmail.com> wrote:
> Driver for the on-board IDE interface on CS-Lab Warp Expansion Card
> (NOTE that idemode=native has to be set in Warp Configuration)
>
> Signed-off-by: Paolo Pisati <p.pisati@gmail.com>

Thanks for your patch!

> --- /dev/null
> +++ b/drivers/ata/pata_cswarp.c

> +/*
> + * We cannot have a modalias for X-Surf boards, as it competes with the
> + * zorro8390 network driver. As a stopgap measure until we have proper
> + * MFD support for this board, we manually attach to it late after Zorro
> + * has enumerated its boards.

I started working on Zorro MFD a long time ago, but never finished...
https://web.git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k.git/log/?h=zorro-mfd

> + */
> +static int __init pata_cswarp_late_init(void)
> +{
> + struct zorro_dev *z = NULL;
> +
> + /* Auto-bind to regular boards */
> + zorro_register_driver(&pata_cswarp_driver);
> +
> + /* Manually bind to all boards */
> + while ((z = zorro_find_device(ZORRO_PROD_CSLAB_WARP_CTRL, z))) {
> + static struct zorro_device_id cswarp_ent = {
> + ZORRO_PROD_CSLAB_WARP_CTRL, 0
> + };
> +
> + pata_cswarp_probe(z, &cswarp_ent);

This looks very hackish to me...
I guess it blows up when trying to unbind either the zorro8390 or
cswarp driver?

> + }
> + return 0;
> +}
> +late_initcall(pata_cswarp_late_init);
> +
> +MODULE_AUTHOR("Andrzej Rogozynski");
> +MODULE_DESCRIPTION("low-level driver for CSWarp PATA");
> +MODULE_LICENSE("GPL");
> +MODULE_VERSION(DRV_VERSION);
> diff --git a/drivers/zorro/zorro.ids b/drivers/zorro/zorro.ids
> index 119abea8c6cb..33418af7488a 100644
> --- a/drivers/zorro/zorro.ids
> +++ b/drivers/zorro/zorro.ids
> @@ -400,6 +400,11 @@
> 0100 ISDN Blaster Z2 [ISDN Interface]
> 0200 HyperCom 4 [Multi I/O]
> 0600 HyperCom 4+ [Multi I/O]
> +1400 CSLab
> + 6000 Warp DDR3 Memory
> + 0001 Warp Video Memory
> + 0101 Warp Control Registers
> + 0201 Warp Flash ROM

This change belongs to the previous patch.
Why don't the product IDs match with the definitions below?

> 157c Information
> 6400 ISDN Engine I [ISDN Interface]
> 2017 Vortex
> diff --git a/include/uapi/linux/zorro_ids.h b/include/uapi/linux/zorro_ids.h
> index 0be1fb0c3915..5736d2bf0295 100644
> --- a/include/uapi/linux/zorro_ids.h
> +++ b/include/uapi/linux/zorro_ids.h
> @@ -455,6 +455,12 @@
> #define ZORRO_PROD_CSLAB_WARP_CTRL ZORRO_ID(CSLAB, 0x65, 0)
> #define ZORRO_PROD_CSLAB_WARP_XROM ZORRO_ID(CSLAB, 0x66, 1)
>
> +#define ZORRO_MANUF_CSLAB 0x1400
> +#define ZORRO_PROD_CSLAB_WARP_DDR3 ZORRO_ID(CSLAB, 0x3c, 0)
> +#define ZORRO_PROD_CSLAB_WARP_VRAM ZORRO_ID(CSLAB, 0x64, 0)
> +#define ZORRO_PROD_CSLAB_WARP_CTRL ZORRO_ID(CSLAB, 0x65, 0)
> +#define ZORRO_PROD_CSLAB_WARP_XROM ZORRO_ID(CSLAB, 0x66, 1)
> +

This does not belong in this patch, and adds duplicates?

> #define ZORRO_MANUF_INFORMATION 0x157C
> #define ZORRO_PROD_INFORMATION_ISDN_ENGINE_I ZORRO_ID(INFORMATION, 0x64, 0)

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds