Thomas Gleixner | 8d7c56d | 2019-05-20 19:08:10 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-or-later */ |
Anton Vorontsov | 1c2a49f | 2010-03-04 20:06:06 +0300 | [diff] [blame] | 2 | /* |
| 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 Vorontsov | 1c2a49f | 2010-03-04 20:06:06 +0300 | [diff] [blame] | 9 | */ |
| 10 | |
| 11 | #ifndef _AHCI_PLATFORM_H |
| 12 | #define _AHCI_PLATFORM_H |
| 13 | |
Jassi Brar | 0835480 | 2010-06-25 18:21:19 +0900 | [diff] [blame] | 14 | #include <linux/compiler.h> |
| 15 | |
Anton Vorontsov | 1c2a49f | 2010-03-04 20:06:06 +0300 | [diff] [blame] | 16 | struct device; |
| 17 | struct ata_port_info; |
Hans de Goede | 156c588 | 2014-02-22 16:53:31 +0100 | [diff] [blame] | 18 | struct ahci_host_priv; |
Hans de Goede | 23b07d4 | 2014-02-22 16:53:34 +0100 | [diff] [blame] | 19 | struct platform_device; |
Akinobu Mita | 018d5ef | 2015-01-29 08:30:29 +0900 | [diff] [blame] | 20 | struct scsi_host_template; |
Anton Vorontsov | 1c2a49f | 2010-03-04 20:06:06 +0300 | [diff] [blame] | 21 | |
Hans de Goede | 156c588 | 2014-02-22 16:53:31 +0100 | [diff] [blame] | 22 | int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); |
| 23 | void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); |
Gregory CLEMENT | c7d7dde | 2015-01-15 15:09:37 +0100 | [diff] [blame] | 24 | int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv); |
| 25 | void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv); |
Hans de Goede | 96a01ba | 2014-02-22 16:53:33 +0100 | [diff] [blame] | 26 | int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); |
| 27 | void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); |
Hans de Goede | 23b07d4 | 2014-02-22 16:53:34 +0100 | [diff] [blame] | 28 | struct ahci_host_priv *ahci_platform_get_resources( |
Kunihiko Hayashi | 16af2d6 | 2018-08-22 21:13:01 +0900 | [diff] [blame] | 29 | struct platform_device *pdev, unsigned int flags); |
Hans de Goede | 23b07d4 | 2014-02-22 16:53:34 +0100 | [diff] [blame] | 30 | int ahci_platform_init_host(struct platform_device *pdev, |
| 31 | struct ahci_host_priv *hpriv, |
Akinobu Mita | 018d5ef | 2015-01-29 08:30:29 +0900 | [diff] [blame] | 32 | const struct ata_port_info *pi_template, |
| 33 | struct scsi_host_template *sht); |
Hans de Goede | 156c588 | 2014-02-22 16:53:31 +0100 | [diff] [blame] | 34 | |
Nate Watterson | 8eede5b | 2017-07-20 15:26:24 -0400 | [diff] [blame] | 35 | void ahci_platform_shutdown(struct platform_device *pdev); |
| 36 | |
Hans de Goede | 648cb6f | 2014-02-22 16:53:35 +0100 | [diff] [blame] | 37 | int ahci_platform_suspend_host(struct device *dev); |
| 38 | int ahci_platform_resume_host(struct device *dev); |
| 39 | int ahci_platform_suspend(struct device *dev); |
| 40 | int ahci_platform_resume(struct device *dev); |
| 41 | |
Kunihiko Hayashi | 9d2ab99 | 2018-08-22 21:13:02 +0900 | [diff] [blame] | 42 | #define AHCI_PLATFORM_GET_RESETS 0x01 |
| 43 | |
Anton Vorontsov | 1c2a49f | 2010-03-04 20:06:06 +0300 | [diff] [blame] | 44 | #endif /* _AHCI_PLATFORM_H */ |