Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0-or-later */
0002 /*
0003  * AHCI SATA platform driver
0004  *
0005  * Copyright 2004-2005  Red Hat, Inc.
0006  *   Jeff Garzik <jgarzik@pobox.com>
0007  * Copyright 2010  MontaVista Software, LLC.
0008  *   Anton Vorontsov <avorontsov@ru.mvista.com>
0009  */
0010 
0011 #ifndef _AHCI_PLATFORM_H
0012 #define _AHCI_PLATFORM_H
0013 
0014 #include <linux/compiler.h>
0015 
0016 struct device;
0017 struct ata_port_info;
0018 struct ahci_host_priv;
0019 struct platform_device;
0020 struct scsi_host_template;
0021 
0022 int ahci_platform_enable_phys(struct ahci_host_priv *hpriv);
0023 void ahci_platform_disable_phys(struct ahci_host_priv *hpriv);
0024 int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
0025 void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
0026 int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
0027 void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
0028 int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
0029 void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
0030 struct ahci_host_priv *ahci_platform_get_resources(
0031     struct platform_device *pdev, unsigned int flags);
0032 int ahci_platform_init_host(struct platform_device *pdev,
0033                 struct ahci_host_priv *hpriv,
0034                 const struct ata_port_info *pi_template,
0035                 struct scsi_host_template *sht);
0036 
0037 void ahci_platform_shutdown(struct platform_device *pdev);
0038 
0039 int ahci_platform_suspend_host(struct device *dev);
0040 int ahci_platform_resume_host(struct device *dev);
0041 int ahci_platform_suspend(struct device *dev);
0042 int ahci_platform_resume(struct device *dev);
0043 
0044 #define AHCI_PLATFORM_GET_RESETS    0x01
0045 
0046 #endif /* _AHCI_PLATFORM_H */