linux/drivers/ata/ahci_mvebu.c

/*
 * AHCI glue platform driver for Marvell EBU SOCs
 *
 * Copyright (C) 2014 Marvell
 *
 * Thomas Petazzoni <[email protected]>
 * Marcin Wojtas <[email protected]>
 *
 * This file is licensed under the terms of the GNU General Public
 * License version 2.  This program is licensed "as is" without any
 * warranty of any kind, whether express or implied.
 */

#include <linux/ahci_platform.h>
#include <linux/kernel.h>
#include <linux/mbus.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include "ahci.h"

#define DRV_NAME

#define AHCI_VENDOR_SPECIFIC_0_ADDR
#define AHCI_VENDOR_SPECIFIC_0_DATA

#define AHCI_WINDOW_CTRL(win)
#define AHCI_WINDOW_BASE(win)
#define AHCI_WINDOW_SIZE(win)

struct ahci_mvebu_plat_data {};

static void ahci_mvebu_mbus_config(struct ahci_host_priv *hpriv,
				   const struct mbus_dram_target_info *dram)
{}

static void ahci_mvebu_regret_option(struct ahci_host_priv *hpriv)
{}

static int ahci_mvebu_armada_380_config(struct ahci_host_priv *hpriv)
{}

static int ahci_mvebu_armada_3700_config(struct ahci_host_priv *hpriv)
{}

/**
 * ahci_mvebu_stop_engine
 *
 * @ap:	Target ata port
 *
 * Errata Ref#226 - SATA Disk HOT swap issue when connected through
 * Port Multiplier in FIS-based Switching mode.
 *
 * To avoid the issue, according to design, the bits[11:8, 0] of
 * register PxFBS are cleared when Port Command and Status (0x18) bit[0]
 * changes its value from 1 to 0, i.e. falling edge of Port
 * Command and Status bit[0] sends PULSE that resets PxFBS
 * bits[11:8; 0].
 *
 * This function is used to override function of "ahci_stop_engine"
 * from libahci.c by adding the mvebu work around(WA) to save PxFBS
 * value before the PxCMD ST write of 0, then restore PxFBS value.
 *
 * Return: 0 on success; Error code otherwise.
 */
static int ahci_mvebu_stop_engine(struct ata_port *ap)
{}

#ifdef CONFIG_PM_SLEEP
static int ahci_mvebu_suspend(struct platform_device *pdev, pm_message_t state)
{}

static int ahci_mvebu_resume(struct platform_device *pdev)
{}
#else
#define ahci_mvebu_suspend
#define ahci_mvebu_resume
#endif

static const struct ata_port_info ahci_mvebu_port_info =;

static const struct scsi_host_template ahci_platform_sht =;

static int ahci_mvebu_probe(struct platform_device *pdev)
{}

static const struct ahci_mvebu_plat_data ahci_mvebu_armada_380_plat_data =;

static const struct ahci_mvebu_plat_data ahci_mvebu_armada_3700_plat_data =;

static const struct of_device_id ahci_mvebu_of_match[] =;
MODULE_DEVICE_TABLE(of, ahci_mvebu_of_match);

static struct platform_driver ahci_mvebu_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_AUTHOR();
MODULE_LICENSE();
MODULE_ALIAS();