#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/pci.h>
#include <linux/blkdev.h>
#include <linux/delay.h>
#include <linux/interrupt.h>
#include <linux/device.h>
#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <scsi/scsi.h>
#include <linux/libata.h>
#include <linux/of.h>
#include <linux/of_address.h>
#define DRV_NAME …
#define DRV_VERSION …
enum { … };
static u8 k2_stat_check_status(struct ata_port *ap);
static int k2_sata_check_atapi_dma(struct ata_queued_cmd *qc)
{ … }
static int k2_sata_scr_read(struct ata_link *link,
unsigned int sc_reg, u32 *val)
{ … }
static int k2_sata_scr_write(struct ata_link *link,
unsigned int sc_reg, u32 val)
{ … }
static int k2_sata_softreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{ … }
static int k2_sata_hardreset(struct ata_link *link,
unsigned int *class, unsigned long deadline)
{ … }
static void k2_sata_tf_load(struct ata_port *ap, const struct ata_taskfile *tf)
{ … }
static void k2_sata_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
{ … }
static void k2_bmdma_setup_mmio(struct ata_queued_cmd *qc)
{ … }
static void k2_bmdma_start_mmio(struct ata_queued_cmd *qc)
{ … }
static u8 k2_stat_check_status(struct ata_port *ap)
{ … }
static int k2_sata_show_info(struct seq_file *m, struct Scsi_Host *shost)
{ … }
static const struct scsi_host_template k2_sata_sht = …;
static struct ata_port_operations k2_sata_ops = …;
static const struct ata_port_info k2_port_info[] = …;
static void k2_sata_setup_port(struct ata_ioports *port, void __iomem *base)
{ … }
static int k2_sata_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
{ … }
static const struct pci_device_id k2_sata_pci_tbl[] = …;
static struct pci_driver k2_sata_pci_driver = …;
module_pci_driver(…) …;
MODULE_AUTHOR(…) …;
MODULE_DESCRIPTION(…) …;
MODULE_LICENSE(…) …;
MODULE_DEVICE_TABLE(pci, k2_sata_pci_tbl);
MODULE_VERSION(…);