2019-05-20 17:08:10 +00:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later */
|
2010-03-04 17:06:06 +00:00
|
|
|
/*
|
|
|
|
* 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>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _AHCI_PLATFORM_H
|
|
|
|
#define _AHCI_PLATFORM_H
|
|
|
|
|
2010-06-25 09:21:19 +00:00
|
|
|
#include <linux/compiler.h>
|
|
|
|
|
2022-09-09 19:36:16 +00:00
|
|
|
struct clk;
|
2010-03-04 17:06:06 +00:00
|
|
|
struct device;
|
|
|
|
struct ata_port_info;
|
2014-02-22 15:53:31 +00:00
|
|
|
struct ahci_host_priv;
|
2014-02-22 15:53:34 +00:00
|
|
|
struct platform_device;
|
2015-01-28 23:30:29 +00:00
|
|
|
struct scsi_host_template;
|
2010-03-04 17:06:06 +00:00
|
|
|
|
2019-12-10 18:53:44 +00:00
|
|
|
int ahci_platform_enable_phys(struct ahci_host_priv *hpriv);
|
|
|
|
void ahci_platform_disable_phys(struct ahci_host_priv *hpriv);
|
2022-09-09 19:36:16 +00:00
|
|
|
struct clk *ahci_platform_find_clk(struct ahci_host_priv *hpriv,
|
|
|
|
const char *con_id);
|
2014-02-22 15:53:31 +00:00
|
|
|
int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
|
|
|
|
void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
|
2022-09-09 19:36:08 +00:00
|
|
|
int ahci_platform_deassert_rsts(struct ahci_host_priv *hpriv);
|
|
|
|
int ahci_platform_assert_rsts(struct ahci_host_priv *hpriv);
|
2015-01-15 14:09:37 +00:00
|
|
|
int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv);
|
|
|
|
void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv);
|
2014-02-22 15:53:33 +00:00
|
|
|
int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
|
|
|
|
void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
|
2014-02-22 15:53:34 +00:00
|
|
|
struct ahci_host_priv *ahci_platform_get_resources(
|
2018-08-22 12:13:01 +00:00
|
|
|
struct platform_device *pdev, unsigned int flags);
|
2014-02-22 15:53:34 +00:00
|
|
|
int ahci_platform_init_host(struct platform_device *pdev,
|
|
|
|
struct ahci_host_priv *hpriv,
|
2015-01-28 23:30:29 +00:00
|
|
|
const struct ata_port_info *pi_template,
|
2023-03-22 19:53:59 +00:00
|
|
|
const struct scsi_host_template *sht);
|
2014-02-22 15:53:31 +00:00
|
|
|
|
2017-07-20 19:26:24 +00:00
|
|
|
void ahci_platform_shutdown(struct platform_device *pdev);
|
|
|
|
|
2014-02-22 15:53:35 +00:00
|
|
|
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);
|
|
|
|
|
2022-09-09 19:36:08 +00:00
|
|
|
#define AHCI_PLATFORM_GET_RESETS BIT(0)
|
|
|
|
#define AHCI_PLATFORM_RST_TRIGGER BIT(1)
|
2018-08-22 12:13:02 +00:00
|
|
|
|
2010-03-04 17:06:06 +00:00
|
|
|
#endif /* _AHCI_PLATFORM_H */
|