2010-03-05 01:06:06 +08:00
|
|
|
/*
|
|
|
|
* AHCI SATA platform driver
|
|
|
|
*
|
|
|
|
* Copyright 2004-2005 Red Hat, Inc.
|
|
|
|
* Jeff Garzik <jgarzik@pobox.com>
|
|
|
|
* Copyright 2010 MontaVista Software, LLC.
|
|
|
|
* Anton Vorontsov <avorontsov@ru.mvista.com>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
* any later version.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _AHCI_PLATFORM_H
|
|
|
|
#define _AHCI_PLATFORM_H
|
|
|
|
|
2010-06-25 17:21:19 +08:00
|
|
|
#include <linux/compiler.h>
|
|
|
|
|
2010-03-05 01:06:06 +08:00
|
|
|
struct device;
|
|
|
|
struct ata_port_info;
|
2014-02-22 23:53:31 +08:00
|
|
|
struct ahci_host_priv;
|
2014-02-22 23:53:34 +08:00
|
|
|
struct platform_device;
|
2010-03-05 01:06:06 +08:00
|
|
|
|
2014-02-22 23:53:34 +08:00
|
|
|
/*
|
|
|
|
* Note ahci_platform_data is deprecated, it is only kept around for use
|
|
|
|
* by the old da850 and spear13xx ahci code.
|
|
|
|
* New drivers should instead declare their own platform_driver struct, and
|
|
|
|
* use ahci_platform* functions in their own probe, suspend and resume methods.
|
|
|
|
*/
|
2010-03-05 01:06:06 +08:00
|
|
|
struct ahci_platform_data {
|
2010-06-25 17:21:19 +08:00
|
|
|
int (*init)(struct device *dev, void __iomem *addr);
|
2010-03-05 01:06:06 +08:00
|
|
|
void (*exit)(struct device *dev);
|
2011-11-19 03:10:10 +08:00
|
|
|
int (*suspend)(struct device *dev);
|
|
|
|
int (*resume)(struct device *dev);
|
2010-03-05 01:06:06 +08:00
|
|
|
};
|
|
|
|
|
2014-02-22 23:53:31 +08:00
|
|
|
int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
|
|
|
|
void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
|
2014-02-22 23:53:33 +08:00
|
|
|
int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
|
|
|
|
void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
|
2014-02-22 23:53:34 +08:00
|
|
|
struct ahci_host_priv *ahci_platform_get_resources(
|
|
|
|
struct platform_device *pdev);
|
|
|
|
int ahci_platform_init_host(struct platform_device *pdev,
|
|
|
|
struct ahci_host_priv *hpriv,
|
|
|
|
const struct ata_port_info *pi_template,
|
|
|
|
unsigned int force_port_map,
|
|
|
|
unsigned int mask_port_map);
|
2014-02-22 23:53:31 +08:00
|
|
|
|
2014-02-22 23:53:35 +08:00
|
|
|
int ahci_platform_suspend_host(struct device *dev);
|
|
|
|
int ahci_platform_resume_host(struct device *dev);
|
|
|
|
int ahci_platform_suspend(struct device *dev);
|
|
|
|
int ahci_platform_resume(struct device *dev);
|
|
|
|
|
2010-03-05 01:06:06 +08:00
|
|
|
#endif /* _AHCI_PLATFORM_H */
|