blob: 6782f0d45ebe5dce4687f1f5db4ab39f3673c3a0 [file] [log] [blame]
Thomas Gleixner8d7c56d2019-05-20 19:08:10 +02001/* SPDX-License-Identifier: GPL-2.0-or-later */
Anton Vorontsov1c2a49f2010-03-04 20:06:06 +03002/*
3 * AHCI SATA platform driver
4 *
5 * Copyright 2004-2005 Red Hat, Inc.
6 * Jeff Garzik <jgarzik@pobox.com>
7 * Copyright 2010 MontaVista Software, LLC.
8 * Anton Vorontsov <avorontsov@ru.mvista.com>
Anton Vorontsov1c2a49f2010-03-04 20:06:06 +03009 */
10
11#ifndef _AHCI_PLATFORM_H
12#define _AHCI_PLATFORM_H
13
Jassi Brar08354802010-06-25 18:21:19 +090014#include <linux/compiler.h>
15
Anton Vorontsov1c2a49f2010-03-04 20:06:06 +030016struct device;
17struct ata_port_info;
Hans de Goede156c5882014-02-22 16:53:31 +010018struct ahci_host_priv;
Hans de Goede23b07d42014-02-22 16:53:34 +010019struct platform_device;
Akinobu Mita018d5ef2015-01-29 08:30:29 +090020struct scsi_host_template;
Anton Vorontsov1c2a49f2010-03-04 20:06:06 +030021
Hans de Goede156c5882014-02-22 16:53:31 +010022int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
23void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
Gregory CLEMENTc7d7dde2015-01-15 15:09:37 +010024int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
25void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
Hans de Goede96a01ba2014-02-22 16:53:33 +010026int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
27void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
Hans de Goede23b07d42014-02-22 16:53:34 +010028struct ahci_host_priv *ahci_platform_get_resources(
Kunihiko Hayashi16af2d62018-08-22 21:13:01 +090029 struct platform_device *pdev, unsigned int flags);
Hans de Goede23b07d42014-02-22 16:53:34 +010030int ahci_platform_init_host(struct platform_device *pdev,
31 struct ahci_host_priv *hpriv,
Akinobu Mita018d5ef2015-01-29 08:30:29 +090032 const struct ata_port_info *pi_template,
33 struct scsi_host_template *sht);
Hans de Goede156c5882014-02-22 16:53:31 +010034
Nate Watterson8eede5b2017-07-20 15:26:24 -040035void ahci_platform_shutdown(struct platform_device *pdev);
36
Hans de Goede648cb6f2014-02-22 16:53:35 +010037int ahci_platform_suspend_host(struct device *dev);
38int ahci_platform_resume_host(struct device *dev);
39int ahci_platform_suspend(struct device *dev);
40int ahci_platform_resume(struct device *dev);
41
Kunihiko Hayashi9d2ab992018-08-22 21:13:02 +090042#define AHCI_PLATFORM_GET_RESETS 0x01
43
Anton Vorontsov1c2a49f2010-03-04 20:06:06 +030044#endif /* _AHCI_PLATFORM_H */