linux/drivers/ata/sata_fsl.c

// SPDX-License-Identifier: GPL-2.0-or-later
/*
 * drivers/ata/sata_fsl.c
 *
 * Freescale 3.0Gbps SATA device driver
 *
 * Author: Ashish Kalra <[email protected]>
 * Li Yang <[email protected]>
 *
 * Copyright (c) 2006-2007, 2011-2012 Freescale Semiconductor, Inc.
 */

#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#include <scsi/scsi_host.h>
#include <scsi/scsi_cmnd.h>
#include <linux/libata.h>
#include <asm/io.h>

static unsigned int intr_coalescing_count;
module_param(intr_coalescing_count, int, S_IRUGO);
MODULE_PARM_DESC();

static unsigned int intr_coalescing_ticks;
module_param(intr_coalescing_ticks, int, S_IRUGO);
MODULE_PARM_DESC();
/* Controller information */
enum {};

/*
 * Interrupt Coalescing Control Register bitdefs  */
enum {};

/*
* Host Controller command register set - per port
*/
enum {};

/*
 * SATA Superset Registers
 */
enum {};

/*
 * Control Status Register Set
 */
enum {};

/* TRANSCFG (transport-layer) configuration control */
enum {};

/* PHY (link-layer) configuration control */
enum {};

/*
 * Command Header Table entry, i.e, command slot
 * 4 Dwords per command slot, command header size ==  64 Dwords.
 */
struct cmdhdr_tbl_entry {};

/*
 * Description information bitdefs
 */
enum {};

/*
 * Command Descriptor
 */
struct command_desc {};

/*
 * Physical region table descriptor(PRD)
 */

struct prde {};

/*
 * ata_port private data
 * This is our per-port instance data.
 */
struct sata_fsl_port_priv {};

/*
 * ata_port->host_set private data
 */
struct sata_fsl_host_priv {};

static void fsl_sata_set_irq_coalescing(struct ata_host *host,
		unsigned int count, unsigned int ticks)
{}

static ssize_t fsl_sata_intr_coalescing_show(struct device *dev,
		struct device_attribute *attr, char *buf)
{}

static ssize_t fsl_sata_intr_coalescing_store(struct device *dev,
		struct device_attribute *attr,
		const char *buf, size_t count)
{}

static ssize_t fsl_sata_rx_watermark_show(struct device *dev,
		struct device_attribute *attr, char *buf)
{}

static ssize_t fsl_sata_rx_watermark_store(struct device *dev,
		struct device_attribute *attr,
		const char *buf, size_t count)
{}

static inline unsigned int sata_fsl_tag(struct ata_port *ap,
					unsigned int tag,
					void __iomem *hcr_base)
{}

static void sata_fsl_setup_cmd_hdr_entry(struct ata_port *ap,
					 struct sata_fsl_port_priv *pp,
					 unsigned int tag, u32 desc_info,
					 u32 data_xfer_len, u8 num_prde,
					 u8 fis_len)
{}

static unsigned int sata_fsl_fill_sg(struct ata_queued_cmd *qc, void *cmd_desc,
				     u32 *ttl, dma_addr_t cmd_desc_paddr,
				     int data_snoop)
{}

static enum ata_completion_errors sata_fsl_qc_prep(struct ata_queued_cmd *qc)
{}

static unsigned int sata_fsl_qc_issue(struct ata_queued_cmd *qc)
{}

static void sata_fsl_qc_fill_rtf(struct ata_queued_cmd *qc)
{}

static int sata_fsl_scr_write(struct ata_link *link,
			      unsigned int sc_reg_in, u32 val)
{}

static int sata_fsl_scr_read(struct ata_link *link,
			     unsigned int sc_reg_in, u32 *val)
{}

static void sata_fsl_freeze(struct ata_port *ap)
{}

static void sata_fsl_thaw(struct ata_port *ap)
{}

static void sata_fsl_pmp_attach(struct ata_port *ap)
{}

static void sata_fsl_pmp_detach(struct ata_port *ap)
{}

static int sata_fsl_port_start(struct ata_port *ap)
{}

static void sata_fsl_port_stop(struct ata_port *ap)
{}

static unsigned int sata_fsl_dev_classify(struct ata_port *ap)
{}

static int sata_fsl_hardreset(struct ata_link *link, unsigned int *class,
					unsigned long deadline)
{}

static int sata_fsl_softreset(struct ata_link *link, unsigned int *class,
					unsigned long deadline)
{}

static void sata_fsl_error_handler(struct ata_port *ap)
{}

static void sata_fsl_post_internal_cmd(struct ata_queued_cmd *qc)
{}

static void sata_fsl_error_intr(struct ata_port *ap)
{}

static void sata_fsl_host_intr(struct ata_port *ap)
{}

static irqreturn_t sata_fsl_interrupt(int irq, void *dev_instance)
{}

/*
 * Multiple ports are represented by multiple SATA controllers with
 * one port per controller
 */
static int sata_fsl_init_controller(struct ata_host *host)
{}

static void sata_fsl_host_stop(struct ata_host *host)
{}

/*
 * scsi mid-layer and libata interface structures
 */
static const struct scsi_host_template sata_fsl_sht =;

static struct ata_port_operations sata_fsl_ops =;

static const struct ata_port_info sata_fsl_port_info[] =;

static int sata_fsl_probe(struct platform_device *ofdev)
{}

static void sata_fsl_remove(struct platform_device *ofdev)
{}

#ifdef CONFIG_PM_SLEEP
static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
{}

static int sata_fsl_resume(struct platform_device *op)
{}
#endif

static const struct of_device_id fsl_sata_match[] =;

MODULE_DEVICE_TABLE(of, fsl_sata_match);

static struct platform_driver fsl_sata_driver =;

module_platform_driver();

MODULE_LICENSE();
MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_VERSION();