ahci_platform.h 1.61 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * 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

18 19
#include <linux/compiler.h>

20 21
struct device;
struct ata_port_info;
22
struct ahci_host_priv;
23
struct platform_device;
24
struct scsi_host_template;
25

26 27
int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
28 29
int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
30 31
int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
32
struct ahci_host_priv *ahci_platform_get_resources(
33
	struct platform_device *pdev, unsigned int flags);
34 35
int ahci_platform_init_host(struct platform_device *pdev,
			    struct ahci_host_priv *hpriv,
36 37
			    const struct ata_port_info *pi_template,
			    struct scsi_host_template *sht);
38

39 40
void ahci_platform_shutdown(struct platform_device *pdev);

41 42 43 44 45
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);

46 47
#define AHCI_PLATFORM_GET_RESETS	0x01

48
#endif /* _AHCI_PLATFORM_H */