2019-06-04 16:11:33 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0-only
|
2006-11-15 02:43:21 +08:00
|
|
|
/*
|
|
|
|
* ixp4xx PATA/Compact Flash driver
|
2007-05-27 07:26:55 +08:00
|
|
|
* Copyright (C) 2006-07 Tower Technologies
|
2006-11-15 02:43:21 +08:00
|
|
|
* Author: Alessandro Zummo <a.zummo@towertech.it>
|
|
|
|
*
|
|
|
|
* An ATA driver to handle a Compact Flash connected
|
|
|
|
* to the ixp4xx expansion bus in TrueIDE mode. The CF
|
|
|
|
* must have it chip selects connected to two CS lines
|
2007-05-27 07:26:55 +08:00
|
|
|
* on the ixp4xx. In the irq is not available, you might
|
|
|
|
* want to modify both this driver and libata to run in
|
|
|
|
* polling mode.
|
2006-11-15 02:43:21 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <linux/kernel.h>
|
2021-07-26 16:44:45 +08:00
|
|
|
#include <linux/mfd/syscon.h>
|
2006-11-15 02:43:21 +08:00
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/libata.h>
|
|
|
|
#include <linux/irq.h>
|
|
|
|
#include <linux/platform_device.h>
|
2021-07-26 16:44:45 +08:00
|
|
|
#include <linux/regmap.h>
|
2006-11-15 02:43:21 +08:00
|
|
|
#include <scsi/scsi_host.h>
|
|
|
|
|
|
|
|
#define DRV_NAME "pata_ixp4xx_cf"
|
2021-07-26 16:44:45 +08:00
|
|
|
#define DRV_VERSION "1.0"
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
struct ixp4xx_pata {
|
|
|
|
struct ata_host *host;
|
|
|
|
struct regmap *rmap;
|
|
|
|
u32 cmd_csreg;
|
|
|
|
void __iomem *cmd;
|
|
|
|
void __iomem *ctl;
|
|
|
|
};
|
|
|
|
|
|
|
|
#define IXP4XX_EXP_TIMING_STRIDE 0x04
|
|
|
|
/* The timings for the chipselect is in bits 29..16 */
|
|
|
|
#define IXP4XX_EXP_T1_T5_MASK GENMASK(29, 16)
|
|
|
|
#define IXP4XX_EXP_PIO_0_8 0x0a470000
|
|
|
|
#define IXP4XX_EXP_PIO_1_8 0x06430000
|
|
|
|
#define IXP4XX_EXP_PIO_2_8 0x02410000
|
|
|
|
#define IXP4XX_EXP_PIO_3_8 0x00820000
|
|
|
|
#define IXP4XX_EXP_PIO_4_8 0x00400000
|
|
|
|
#define IXP4XX_EXP_PIO_0_16 0x29640000
|
|
|
|
#define IXP4XX_EXP_PIO_1_16 0x05030000
|
|
|
|
#define IXP4XX_EXP_PIO_2_16 0x00b20000
|
|
|
|
#define IXP4XX_EXP_PIO_3_16 0x00820000
|
|
|
|
#define IXP4XX_EXP_PIO_4_16 0x00400000
|
|
|
|
#define IXP4XX_EXP_BW_MASK (BIT(6)|BIT(0))
|
|
|
|
#define IXP4XX_EXP_BYTE_RD16 BIT(6) /* Byte reads on half-word devices */
|
|
|
|
#define IXP4XX_EXP_BYTE_EN BIT(0) /* Use 8bit data bus if set */
|
|
|
|
|
|
|
|
static void ixp4xx_set_8bit_timing(struct ixp4xx_pata *ixpp, u8 pio_mode)
|
|
|
|
{
|
|
|
|
switch (pio_mode) {
|
|
|
|
case XFER_PIO_0:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_0_8);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_1:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_1_8);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_2:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_2_8);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_3:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_3_8);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_4:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_4_8);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_BW_MASK, IXP4XX_EXP_BYTE_RD16|IXP4XX_EXP_BYTE_EN);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void ixp4xx_set_16bit_timing(struct ixp4xx_pata *ixpp, u8 pio_mode)
|
2006-11-15 02:43:21 +08:00
|
|
|
{
|
2021-07-26 16:44:45 +08:00
|
|
|
switch (pio_mode){
|
|
|
|
case XFER_PIO_0:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_0_16);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_1:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_1_16);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_2:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_2_16);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_3:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_3_16);
|
|
|
|
break;
|
|
|
|
case XFER_PIO_4:
|
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_T1_T5_MASK, IXP4XX_EXP_PIO_4_16);
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
2021-07-26 16:44:45 +08:00
|
|
|
regmap_update_bits(ixpp->rmap, ixpp->cmd_csreg,
|
|
|
|
IXP4XX_EXP_BW_MASK, IXP4XX_EXP_BYTE_RD16);
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
/* This sets up the timing on the chipselect CMD accordingly */
|
|
|
|
static void ixp4xx_set_piomode(struct ata_port *ap, struct ata_device *adev)
|
|
|
|
{
|
|
|
|
struct ixp4xx_pata *ixpp = ap->host->private_data;
|
|
|
|
|
|
|
|
ata_dev_printk(adev, KERN_INFO, "configured for PIO%d 8bit\n",
|
|
|
|
adev->pio_mode - XFER_PIO_0);
|
|
|
|
ixp4xx_set_8bit_timing(ixpp, adev->pio_mode);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2016-12-30 22:01:17 +08:00
|
|
|
static unsigned int ixp4xx_mmio_data_xfer(struct ata_queued_cmd *qc,
|
2021-07-26 16:44:45 +08:00
|
|
|
unsigned char *buf, unsigned int buflen, int rw)
|
2006-11-15 02:43:21 +08:00
|
|
|
{
|
|
|
|
unsigned int i;
|
|
|
|
unsigned int words = buflen >> 1;
|
|
|
|
u16 *buf16 = (u16 *) buf;
|
2021-07-26 16:44:45 +08:00
|
|
|
struct ata_device *adev = qc->dev;
|
2016-12-30 22:01:17 +08:00
|
|
|
struct ata_port *ap = qc->dev->link->ap;
|
2007-05-28 19:07:20 +08:00
|
|
|
void __iomem *mmio = ap->ioaddr.data_addr;
|
2021-07-26 16:44:45 +08:00
|
|
|
struct ixp4xx_pata *ixpp = ap->host->private_data;
|
|
|
|
unsigned long flags;
|
|
|
|
|
|
|
|
ata_dev_printk(adev, KERN_DEBUG, "%s %d bytes\n", (rw == READ) ? "READ" : "WRITE",
|
|
|
|
buflen);
|
|
|
|
spin_lock_irqsave(ap->lock, flags);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
|
|
|
/* set the expansion bus in 16bit mode and restore
|
|
|
|
* 8 bit mode after the transaction.
|
|
|
|
*/
|
2021-07-26 16:44:45 +08:00
|
|
|
ixp4xx_set_16bit_timing(ixpp, adev->pio_mode);
|
|
|
|
udelay(5);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
|
|
|
/* Transfer multiple of 2 bytes */
|
2007-12-05 15:43:07 +08:00
|
|
|
if (rw == READ)
|
2006-11-15 02:43:21 +08:00
|
|
|
for (i = 0; i < words; i++)
|
|
|
|
buf16[i] = readw(mmio);
|
2007-12-05 15:43:07 +08:00
|
|
|
else
|
|
|
|
for (i = 0; i < words; i++)
|
|
|
|
writew(buf16[i], mmio);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
|
|
|
/* Transfer trailing 1 byte, if any. */
|
|
|
|
if (unlikely(buflen & 0x01)) {
|
|
|
|
u16 align_buf[1] = { 0 };
|
|
|
|
unsigned char *trailing_buf = buf + buflen - 1;
|
|
|
|
|
2007-12-05 15:43:07 +08:00
|
|
|
if (rw == READ) {
|
2006-11-15 02:43:21 +08:00
|
|
|
align_buf[0] = readw(mmio);
|
|
|
|
memcpy(trailing_buf, align_buf, 1);
|
2007-12-05 15:43:07 +08:00
|
|
|
} else {
|
|
|
|
memcpy(align_buf, trailing_buf, 1);
|
|
|
|
writew(align_buf[0], mmio);
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
2007-12-05 15:43:07 +08:00
|
|
|
words++;
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
ixp4xx_set_8bit_timing(ixpp, adev->pio_mode);
|
|
|
|
udelay(5);
|
|
|
|
|
|
|
|
spin_unlock_irqrestore(ap->lock, flags);
|
2007-12-05 15:43:07 +08:00
|
|
|
|
|
|
|
return words << 1;
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
static struct scsi_host_template ixp4xx_sht = {
|
2008-03-25 11:22:49 +08:00
|
|
|
ATA_PIO_SHT(DRV_NAME),
|
2006-11-15 02:43:21 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
static struct ata_port_operations ixp4xx_port_ops = {
|
libata: implement and use ops inheritance
libata lets low level drivers build ata_port_operations table and
register it with libata core layer. This allows low level drivers
high level of flexibility but also burdens them with lots of
boilerplate entries.
This becomes worse for drivers which support related similar
controllers which differ slightly. They share most of the operations
except for a few. However, the driver still needs to list all
operations for each variant. This results in large number of
duplicate entries, which is not only inefficient but also error-prone
as it becomes very difficult to tell what the actual differences are.
This duplicate boilerplates all over the low level drivers also make
updating the core layer exteremely difficult and error-prone. When
compounded with multi-branched development model, it ends up
accumulating inconsistencies over time. Some of those inconsistencies
cause immediate problems and fixed. Others just remain there dormant
making maintenance increasingly difficult.
To rectify the problem, this patch implements ata_port_operations
inheritance. To allow LLDs to easily re-use their own ops tables
overriding only specific methods, this patch implements poor man's
class inheritance. An ops table has ->inherits field which can be set
to any ops table as long as it doesn't create a loop. When the host
is started, the inheritance chain is followed and any operation which
isn't specified is taken from the nearest ancestor which has it
specified. This operation is called finalization and done only once
per an ops table and the LLD doesn't have to do anything special about
it other than making the ops table non-const such that libata can
update it.
libata provides four base ops tables lower drivers can inherit from -
base, sata, pmp, sff and bmdma. To avoid overriding these ops
accidentaly, these ops are declared const and LLDs should always
inherit these instead of using them directly.
After finalization, all the ops table are identical before and after
the patch except for setting .irq_handler to ata_interrupt in drivers
which didn't use to. The .irq_handler doesn't have any actual effect
and the field will soon be removed by later patch.
* sata_sx4 is still using old style EH and currently doesn't take
advantage of ops inheritance.
Signed-off-by: Tejun Heo <htejun@gmail.com>
2008-03-25 11:22:49 +08:00
|
|
|
.inherits = &ata_sff_port_ops,
|
2008-04-07 21:47:16 +08:00
|
|
|
.sff_data_xfer = ixp4xx_mmio_data_xfer,
|
2007-05-27 07:26:55 +08:00
|
|
|
.cable_detect = ata_cable_40wire,
|
2021-07-26 16:44:45 +08:00
|
|
|
.set_piomode = ixp4xx_set_piomode,
|
|
|
|
};
|
|
|
|
|
|
|
|
static struct ata_port_info ixp4xx_port_info = {
|
|
|
|
.flags = ATA_FLAG_NO_ATAPI,
|
|
|
|
.pio_mask = ATA_PIO4,
|
|
|
|
.port_ops = &ixp4xx_port_ops,
|
2006-11-15 02:43:21 +08:00
|
|
|
};
|
|
|
|
|
2008-01-06 09:05:28 +08:00
|
|
|
static void ixp4xx_setup_port(struct ata_port *ap,
|
2021-07-26 16:44:45 +08:00
|
|
|
struct ixp4xx_pata *ixpp,
|
2021-07-26 16:37:55 +08:00
|
|
|
unsigned long raw_cmd, unsigned long raw_ctl)
|
2006-11-15 02:43:21 +08:00
|
|
|
{
|
2008-01-06 09:05:28 +08:00
|
|
|
struct ata_ioports *ioaddr = &ap->ioaddr;
|
2007-08-18 12:14:55 +08:00
|
|
|
|
2021-07-26 16:37:55 +08:00
|
|
|
raw_ctl += 0x06;
|
2021-07-26 16:44:45 +08:00
|
|
|
ioaddr->cmd_addr = ixpp->cmd;
|
|
|
|
ioaddr->altstatus_addr = ixpp->ctl + 0x06;
|
|
|
|
ioaddr->ctl_addr = ixpp->ctl + 0x06;
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2008-04-07 21:47:16 +08:00
|
|
|
ata_sff_std_ports(ioaddr);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 07:28:05 +08:00
|
|
|
if (!IS_ENABLED(CONFIG_CPU_BIG_ENDIAN)) {
|
|
|
|
/* adjust the addresses to handle the address swizzling of the
|
|
|
|
* ixp4xx in little endian mode.
|
|
|
|
*/
|
|
|
|
|
|
|
|
*(unsigned long *)&ioaddr->data_addr ^= 0x02;
|
|
|
|
*(unsigned long *)&ioaddr->cmd_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->altstatus_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->ctl_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->error_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->feature_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->nsect_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->lbal_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->lbam_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->lbah_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->device_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->status_addr ^= 0x03;
|
|
|
|
*(unsigned long *)&ioaddr->command_addr ^= 0x03;
|
|
|
|
|
|
|
|
raw_cmd ^= 0x03;
|
|
|
|
raw_ctl ^= 0x03;
|
|
|
|
}
|
2007-08-18 12:14:55 +08:00
|
|
|
|
|
|
|
ata_port_desc(ap, "cmd 0x%lx ctl 0x%lx", raw_cmd, raw_ctl);
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
|
|
|
|
2012-12-22 05:19:58 +08:00
|
|
|
static int ixp4xx_pata_probe(struct platform_device *pdev)
|
2006-11-15 02:43:21 +08:00
|
|
|
{
|
2021-07-26 16:37:55 +08:00
|
|
|
struct resource *cmd, *ctl;
|
2021-07-26 16:44:45 +08:00
|
|
|
struct ata_port_info pi = ixp4xx_port_info;
|
|
|
|
const struct ata_port_info *ppi[] = { &pi, NULL };
|
2021-05-11 06:54:41 +08:00
|
|
|
struct device *dev = &pdev->dev;
|
2021-07-26 16:44:45 +08:00
|
|
|
struct device_node *np = dev->of_node;
|
|
|
|
struct ixp4xx_pata *ixpp;
|
|
|
|
u32 csindex;
|
2013-06-11 01:41:59 +08:00
|
|
|
int ret;
|
2021-04-09 21:54:26 +08:00
|
|
|
int irq;
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 16:37:55 +08:00
|
|
|
cmd = platform_get_resource(pdev, IORESOURCE_MEM, 0);
|
|
|
|
ctl = platform_get_resource(pdev, IORESOURCE_MEM, 1);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 16:37:55 +08:00
|
|
|
if (!cmd || !ctl)
|
2006-11-15 02:43:21 +08:00
|
|
|
return -EINVAL;
|
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
ixpp = devm_kzalloc(dev, sizeof(*ixpp), GFP_KERNEL);
|
|
|
|
if (!ixpp)
|
|
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
ixpp->rmap = syscon_node_to_regmap(np->parent);
|
|
|
|
if (IS_ERR(ixpp->rmap))
|
|
|
|
return dev_err_probe(dev, PTR_ERR(ixpp->rmap), "no regmap\n");
|
|
|
|
/* Inspect our address to figure out what chipselect the CMD is on */
|
|
|
|
ret = of_property_read_u32_index(np, "reg", 0, &csindex);
|
|
|
|
if (ret)
|
|
|
|
return dev_err_probe(dev, ret, "can't inspect CMD address\n");
|
|
|
|
dev_info(dev, "using CS%d for PIO timing configuration\n", csindex);
|
|
|
|
ixpp->cmd_csreg = csindex * IXP4XX_EXP_TIMING_STRIDE;
|
|
|
|
|
|
|
|
ixpp->host = ata_host_alloc_pinfo(dev, ppi, 1);
|
|
|
|
if (!ixpp->host)
|
libata: convert the remaining PATA drivers to new init model
Convert pdc_adma, pata_cs5520, pata_isapnp, pata_ixp4xx_cf,
pata_legacy, pata_mpc52xx, pata_mpiix, pata_pcmcia, pata_pdc2027x,
pata_platform, pata_qdi, pata_scc and pata_winbond to new init model.
* init_one()'s now follow more consistent init order
* cs5520 now registers one host with two ports, not two hosts. If any
of the two ports are disabled, it's made dummy as other drivers do.
Tested pdc_adma and pata_legacy. Both are as broken as before. The
rest are compile tested only.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-17 22:44:08 +08:00
|
|
|
return -ENOMEM;
|
2021-07-26 16:44:45 +08:00
|
|
|
ixpp->host->private_data = ixpp;
|
libata: convert the remaining PATA drivers to new init model
Convert pdc_adma, pata_cs5520, pata_isapnp, pata_ixp4xx_cf,
pata_legacy, pata_mpc52xx, pata_mpiix, pata_pcmcia, pata_pdc2027x,
pata_platform, pata_qdi, pata_scc and pata_winbond to new init model.
* init_one()'s now follow more consistent init order
* cs5520 now registers one host with two ports, not two hosts. If any
of the two ports are disabled, it's made dummy as other drivers do.
Tested pdc_adma and pata_legacy. Both are as broken as before. The
rest are compile tested only.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2007-04-17 22:44:08 +08:00
|
|
|
|
2021-05-11 06:54:41 +08:00
|
|
|
ret = dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
|
2013-06-11 01:41:59 +08:00
|
|
|
if (ret)
|
|
|
|
return ret;
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
ixpp->cmd = devm_ioremap_resource(dev, cmd);
|
|
|
|
ixpp->ctl = devm_ioremap_resource(dev, ctl);
|
|
|
|
if (IS_ERR(ixpp->cmd) || IS_ERR(ixpp->ctl))
|
2007-10-03 04:53:01 +08:00
|
|
|
return -ENOMEM;
|
|
|
|
|
2006-11-15 02:43:21 +08:00
|
|
|
irq = platform_get_irq(pdev, 0);
|
2021-03-26 04:51:10 +08:00
|
|
|
if (irq > 0)
|
2011-03-28 23:49:12 +08:00
|
|
|
irq_set_irq_type(irq, IRQ_TYPE_EDGE_RISING);
|
2021-03-26 04:51:10 +08:00
|
|
|
else if (irq < 0)
|
|
|
|
return irq;
|
|
|
|
else
|
|
|
|
return -EINVAL;
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
/* Just one port to set up */
|
|
|
|
ixp4xx_setup_port(ixpp->host->ports[0], ixpp, cmd->start, ctl->start);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-05-11 06:54:41 +08:00
|
|
|
ata_print_version_once(dev, DRV_VERSION);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
return ata_host_activate(ixpp->host, irq, ata_sff_interrupt, 0, &ixp4xx_sht);
|
2006-11-15 02:43:21 +08:00
|
|
|
}
|
|
|
|
|
2021-07-26 16:44:45 +08:00
|
|
|
static const struct of_device_id ixp4xx_pata_of_match[] = {
|
|
|
|
{ .compatible = "intel,ixp4xx-compact-flash", },
|
|
|
|
{ },
|
|
|
|
};
|
|
|
|
|
2006-11-15 02:43:21 +08:00
|
|
|
static struct platform_driver ixp4xx_pata_platform_driver = {
|
|
|
|
.driver = {
|
|
|
|
.name = DRV_NAME,
|
2021-07-26 16:44:45 +08:00
|
|
|
.of_match_table = ixp4xx_pata_of_match,
|
2006-11-15 02:43:21 +08:00
|
|
|
},
|
|
|
|
.probe = ixp4xx_pata_probe,
|
2012-11-02 15:46:20 +08:00
|
|
|
.remove = ata_platform_remove_one,
|
2006-11-15 02:43:21 +08:00
|
|
|
};
|
|
|
|
|
2011-11-27 14:44:26 +08:00
|
|
|
module_platform_driver(ixp4xx_pata_platform_driver);
|
2006-11-15 02:43:21 +08:00
|
|
|
|
|
|
|
MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
|
|
|
|
MODULE_DESCRIPTION("low-level driver for ixp4xx Compact Flash PATA");
|
|
|
|
MODULE_LICENSE("GPL");
|
|
|
|
MODULE_VERSION(DRV_VERSION);
|
2008-04-19 04:41:57 +08:00
|
|
|
MODULE_ALIAS("platform:" DRV_NAME);
|