]>
git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blob - include/linux/ahci_platform.h
2 * AHCI SATA platform driver
4 * Copyright 2004-2005 Red Hat, Inc.
5 * Jeff Garzik <jgarzik@pobox.com>
6 * Copyright 2010 MontaVista Software, LLC.
7 * Anton Vorontsov <avorontsov@ru.mvista.com>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2, or (at your option)
15 #ifndef _AHCI_PLATFORM_H
16 #define _AHCI_PLATFORM_H
18 #include <linux/compiler.h>
22 struct ahci_host_priv
;
23 struct platform_device
;
26 * Note ahci_platform_data is deprecated, it is only kept around for use
27 * by the old da850 and spear13xx ahci code.
28 * New drivers should instead declare their own platform_driver struct, and
29 * use ahci_platform* functions in their own probe, suspend and resume methods.
31 struct ahci_platform_data
{
32 int (*init
)(struct device
*dev
, void __iomem
*addr
);
33 void (*exit
)(struct device
*dev
);
34 int (*suspend
)(struct device
*dev
);
35 int (*resume
)(struct device
*dev
);
38 int ahci_platform_enable_clks(struct ahci_host_priv
*hpriv
);
39 void ahci_platform_disable_clks(struct ahci_host_priv
*hpriv
);
40 int ahci_platform_enable_resources(struct ahci_host_priv
*hpriv
);
41 void ahci_platform_disable_resources(struct ahci_host_priv
*hpriv
);
42 struct ahci_host_priv
*ahci_platform_get_resources(
43 struct platform_device
*pdev
);
44 int ahci_platform_init_host(struct platform_device
*pdev
,
45 struct ahci_host_priv
*hpriv
,
46 const struct ata_port_info
*pi_template
,
47 unsigned int force_port_map
,
48 unsigned int mask_port_map
);
50 int ahci_platform_suspend_host(struct device
*dev
);
51 int ahci_platform_resume_host(struct device
*dev
);
52 int ahci_platform_suspend(struct device
*dev
);
53 int ahci_platform_resume(struct device
*dev
);
55 #endif /* _AHCI_PLATFORM_H */