Re: [PATCH] ata: add Amiga Gayle PATA controller driver
Hi Bartlomiej! Any chance you had a chance working on the libata port of the Buddha driver? The Amiga 4000 here is equipped with a Buddha and I'm happy to help testing the driver: root@elgar:~> lszorro 00: Phase 5 Digital Products CyberSCSI/Blizzard 1220 01: Village Tronic Ariadne Ethernet Card 02: individual Computers X-Surf 100 Z-II/ZIII Ethernet 03: individual Computers Buddha IDE Controller 04: Phase 5 Digital Products CyberVision 64 root@elgar:~> Adrian On 3/1/18 11:52 AM, Bartlomiej Zolnierkiewicz wrote: > On Thursday, March 01, 2018 10:55:48 AM John Paul Adrian Glaubitz wrote: >> Hello! > > Hi, > >> On 02/18/2018 05:18 PM, John Paul Adrian Glaubitz wrote: >>> Is there any progress on this? Is it just the SDPX headers now that >>> are missing? >> >> Would it be okay if re-send the patch with the SPDX headers added? >> >> Or can we get the patch merged, then I'll send a patch to add the >> SPDX headers? > > I'll post updated version later today, sorry for the delay (I've been > busy with other things and the patch is not v4.16 material anyway). > > Best regards, > -- > Bartlomiej Zolnierkiewicz > Samsung R&D Institute Poland > Samsung Electronics > > -- > To unsubscribe from this list: send the line "unsubscribe linux-m68k" in > the body of a message to majord...@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Re: [PATCH] ata: add Amiga Gayle PATA controller driver
On Thursday, March 01, 2018 10:55:48 AM John Paul Adrian Glaubitz wrote: > Hello! Hi, > On 02/18/2018 05:18 PM, John Paul Adrian Glaubitz wrote: > > Is there any progress on this? Is it just the SDPX headers now that > > are missing? > > Would it be okay if re-send the patch with the SPDX headers added? > > Or can we get the patch merged, then I'll send a patch to add the > SPDX headers? I'll post updated version later today, sorry for the delay (I've been busy with other things and the patch is not v4.16 material anyway). Best regards, -- Bartlomiej Zolnierkiewicz Samsung R&D Institute Poland Samsung Electronics -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ata: add Amiga Gayle PATA controller driver
Hello! On 02/18/2018 05:18 PM, John Paul Adrian Glaubitz wrote: Is there any progress on this? Is it just the SDPX headers now that are missing? Would it be okay if re-send the patch with the SPDX headers added? Or can we get the patch merged, then I'll send a patch to add the SPDX headers? Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ata: add Amiga Gayle PATA controller driver
Hello! On 02/12/2018 02:49 PM, Bartlomiej Zolnierkiewicz wrote: > Add Amiga Gayle PATA controller driver. It enables libata support > for the on-board IDE interfaces on some Amiga models (A600, A1200, > A4000 and A4000T) and also for IDE interfaces on the Zorro expansion > bus (M-Tech E-Matrix 530 expansion card). > > Thanks to John Paul Adrian Glaubitz and Michael Schmitz for help > with testing the driver. Is there any progress on this? Is it just the SDPX headers now that are missing? Thanks, Adrian -- .''`. John Paul Adrian Glaubitz : :' : Debian Developer - glaub...@debian.org `. `' Freie Universitaet Berlin - glaub...@physik.fu-berlin.de `-GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913 -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] ata: add Amiga Gayle PATA controller driver
On Mon, Feb 12, 2018 at 2:49 PM, Bartlomiej Zolnierkiewicz wrote: > Add Amiga Gayle PATA controller driver. It enables libata support > for the on-board IDE interfaces on some Amiga models (A600, A1200, > A4000 and A4000T) and also for IDE interfaces on the Zorro expansion > bus (M-Tech E-Matrix 530 expansion card). > > Thanks to John Paul Adrian Glaubitz and Michael Schmitz for help > with testing the driver. > > Tested-by: John Paul Adrian Glaubitz > Cc: Michael Schmitz > Cc: Geert Uytterhoeven > Signed-off-by: Bartlomiej Zolnierkiewicz > + * > + * This file is subject to the terms and conditions of the GNU General Public > + * License. See the file "COPYING" in the main directory of this archive > + * for more details. > + */ Do you mind using the new SDPX ids? (well not so new anymore). [1] > + > +MODULE_AUTHOR("Bartlomiej Zolnierkiewicz"); > +MODULE_DESCRIPTION("low-level driver for Amiga Gayle PATA"); > +MODULE_LICENSE("GPL"); > +MODULE_ALIAS("platform:amiga-gayle-ide"); > +MODULE_VERSION(DRV_VERSION); > and while doing it please make sure your MODULE_LICENSE matches the license. Here for instance it is not clear to me if this a GPL-2.0 or a GPL-2.0+ Thanks! [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/process/license-rules.rst -- Cordially Philippe Ombredanne +1 650 799 0949 | pombreda...@nexb.com DejaCode - What's in your code?! - http://www.dejacode.com AboutCode - Open source for open source - https://www.aboutcode.org nexB Inc. - http://www.nexb.com CONFIDENTIALITY NOTICE: This e-mail (including attachments) may contain information that is proprietary or confidential. If you are not the intended recipient or a person responsible for its delivery to the intended recipient, do not copy or distribute it. Please permanently delete the e-mail and any attachments, and notify us immediately at (650) 799 0949. -- To unsubscribe from this list: send the line "unsubscribe linux-m68k" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] ata: add Amiga Gayle PATA controller driver
Add Amiga Gayle PATA controller driver. It enables libata support for the on-board IDE interfaces on some Amiga models (A600, A1200, A4000 and A4000T) and also for IDE interfaces on the Zorro expansion bus (M-Tech E-Matrix 530 expansion card). Thanks to John Paul Adrian Glaubitz and Michael Schmitz for help with testing the driver. Tested-by: John Paul Adrian Glaubitz Cc: Michael Schmitz Cc: Geert Uytterhoeven Signed-off-by: Bartlomiej Zolnierkiewicz --- drivers/ata/Kconfig | 12 ++ drivers/ata/Makefile |1 drivers/ata/pata_gayle.c | 224 +++ 3 files changed, 237 insertions(+) Index: b/drivers/ata/Kconfig === --- a/drivers/ata/Kconfig 2018-01-30 17:02:59.792831900 +0100 +++ b/drivers/ata/Kconfig 2018-01-30 17:02:59.792831900 +0100 @@ -963,6 +963,18 @@ config PATA_FALCON If unsure, say N. +config PATA_GAYLE + tristate "Amiga Gayle PATA support" + depends on M68K && AMIGA + help + This option enables support for the on-board IDE + interfaces on some Amiga models (A600, A1200, + A4000 and A4000T) and also for IDE interfaces on + the Zorro expansion bus (M-Tech E-Matrix 530 + expansion card). + + If unsure, say N. + config PATA_ISAPNP tristate "ISA Plug and Play PATA support" depends on ISAPNP Index: b/drivers/ata/Makefile === --- a/drivers/ata/Makefile 2018-01-30 17:02:59.792831900 +0100 +++ b/drivers/ata/Makefile 2018-01-30 17:02:59.792831900 +0100 @@ -98,6 +98,7 @@ obj-$(CONFIG_PATA_WINBOND)+= pata_sl82c # SFF PIO only obj-$(CONFIG_PATA_CMD640_PCI) += pata_cmd640.o obj-$(CONFIG_PATA_FALCON) += pata_falcon.o +obj-$(CONFIG_PATA_GAYLE) += pata_gayle.o obj-$(CONFIG_PATA_ISAPNP) += pata_isapnp.o obj-$(CONFIG_PATA_IXP4XX_CF) += pata_ixp4xx_cf.o obj-$(CONFIG_PATA_MPIIX) += pata_mpiix.o Index: b/drivers/ata/pata_gayle.c === --- /dev/null 1970-01-01 00:00:00.0 + +++ b/drivers/ata/pata_gayle.c 2018-01-30 17:05:04.780835047 +0100 @@ -0,0 +1,224 @@ +/* + * Amiga Gayle PATA controller driver + * + * Copyright (c) 2018 Samsung Electronics Co., Ltd. + * http://www.samsung.com + * + * Based on gayle.c: + * + * Created 12 Jul 1997 by Geert Uytterhoeven + * + * This file is subject to the terms and conditions of the GNU General Public + * License. See the file "COPYING" in the main directory of this archive + * for more details. + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#define DRV_NAME "pata_gayle" +#define DRV_VERSION "0.1.0" + +#define GAYLE_CONTROL 0x101a + +static struct scsi_host_template pata_gayle_sht = { + ATA_PIO_SHT(DRV_NAME), +}; + +/* FIXME: is this needed? */ +static unsigned int pata_gayle_data_xfer(struct ata_queued_cmd *qc, +unsigned char *buf, +unsigned int buflen, int rw) +{ + struct ata_device *dev = qc->dev; + struct ata_port *ap = dev->link->ap; + void __iomem *data_addr = ap->ioaddr.data_addr; + unsigned int words = buflen >> 1; + + /* Transfer multiple of 2 bytes */ + if (rw == READ) + raw_insw((u16 *)data_addr, (u16 *)buf, words); + else + raw_outsw((u16 *)data_addr, (u16 *)buf, words); + + /* Transfer trailing byte, if any. */ + if (unlikely(buflen & 0x01)) { + unsigned char pad[2] = { }; + + /* Point buf to the tail of buffer */ + buf += buflen - 1; + + if (rw == READ) { + raw_insw((u16 *)data_addr, (u16 *)pad, 1); + *buf = pad[0]; + } else { + pad[0] = *buf; + raw_outsw((u16 *)data_addr, (u16 *)pad, 1); + } + words++; + } + + return words << 1; +} + +/* + * Provide our own set_mode() as we don't want to change anything that has + * already been configured.. + */ +static int pata_gayle_set_mode(struct ata_link *link, + struct ata_device **unused) +{ + struct ata_device *dev; + + ata_for_each_dev(dev, link, ENABLED) { + /* We don't really care */ + dev->pio_mode = dev->xfer_mode = XFER_PIO_0; + dev->xfer_shift = ATA_SHIFT_PIO; + dev->flags |= ATA_DFLAG_PIO; + ata_dev_info(dev, "configured for PIO\n"); + } + return 0; +} + +static bool pata_gayle_irq_check(struct ata_port *ap) +{ + u8 ch; + + ch = z_readb