Source
/*
* drivers/ata/pata_palmld.c
*
* Driver for IDE channel in Palm LifeDrive
*
* Based on research of:
* Alex Osborne <ato@meshy.org>
*
* Rewrite for mainline:
* Marek Vasut <marek.vasut@gmail.com>
*
* Rewritten version based on pata_ixp4xx_cf.c:
* ixp4xx PATA/Compact Flash driver
* Copyright (C) 2006-07 Tower Technologies
* Author: Alessandro Zummo <a.zummo@towertech.it>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
*/
struct palmld_pata {
struct ata_host *host;
struct gpio_desc *power;
struct gpio_desc *reset;
};
static struct scsi_host_template palmld_sht = {
ATA_PIO_SHT(DRV_NAME),
};
static struct ata_port_operations palmld_port_ops = {
.inherits = &ata_sff_port_ops,
.sff_data_xfer = ata_sff_data_xfer32,
.cable_detect = ata_cable_40wire,
};
static int palmld_pata_probe(struct platform_device *pdev)
{
struct palmld_pata *lda;
struct ata_port *ap;
void __iomem *mem;
struct device *dev = &pdev->dev;
int ret;
lda = devm_kzalloc(dev, sizeof(*lda), GFP_KERNEL);
if (!lda)
return -ENOMEM;