18d7c56d0SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 21c2a49f6SAnton Vorontsov /* 31c2a49f6SAnton Vorontsov * AHCI SATA platform driver 41c2a49f6SAnton Vorontsov * 51c2a49f6SAnton Vorontsov * Copyright 2004-2005 Red Hat, Inc. 61c2a49f6SAnton Vorontsov * Jeff Garzik <[email protected]> 71c2a49f6SAnton Vorontsov * Copyright 2010 MontaVista Software, LLC. 81c2a49f6SAnton Vorontsov * Anton Vorontsov <[email protected]> 91c2a49f6SAnton Vorontsov */ 101c2a49f6SAnton Vorontsov 111c2a49f6SAnton Vorontsov #ifndef _AHCI_PLATFORM_H 121c2a49f6SAnton Vorontsov #define _AHCI_PLATFORM_H 131c2a49f6SAnton Vorontsov 1408354809SJassi Brar #include <linux/compiler.h> 1508354809SJassi Brar 166ce73f3aSSerge Semin struct clk; 171c2a49f6SAnton Vorontsov struct device; 181c2a49f6SAnton Vorontsov struct ata_port_info; 19156c5887SHans de Goede struct ahci_host_priv; 2023b07d4cSHans de Goede struct platform_device; 21018d5ef2SAkinobu Mita struct scsi_host_template; 221c2a49f6SAnton Vorontsov 2384b032dbSFlorian Fainelli int ahci_platform_enable_phys(struct ahci_host_priv *hpriv); 2484b032dbSFlorian Fainelli void ahci_platform_disable_phys(struct ahci_host_priv *hpriv); 256ce73f3aSSerge Semin struct clk *ahci_platform_find_clk(struct ahci_host_priv *hpriv, 266ce73f3aSSerge Semin const char *con_id); 27156c5887SHans de Goede int ahci_platform_enable_clks(struct ahci_host_priv *hpriv); 28156c5887SHans de Goede void ahci_platform_disable_clks(struct ahci_host_priv *hpriv); 29f67f12ffSSerge Semin int ahci_platform_deassert_rsts(struct ahci_host_priv *hpriv); 30f67f12ffSSerge Semin int ahci_platform_assert_rsts(struct ahci_host_priv *hpriv); 31c7d7ddeeSGregory CLEMENT int ahci_platform_enable_regulators(struct ahci_host_priv *hpriv); 32c7d7ddeeSGregory CLEMENT void ahci_platform_disable_regulators(struct ahci_host_priv *hpriv); 3396a01ba5SHans de Goede int ahci_platform_enable_resources(struct ahci_host_priv *hpriv); 3496a01ba5SHans de Goede void ahci_platform_disable_resources(struct ahci_host_priv *hpriv); 3523b07d4cSHans de Goede struct ahci_host_priv *ahci_platform_get_resources( 3616af2d65SKunihiko Hayashi struct platform_device *pdev, unsigned int flags); 3723b07d4cSHans de Goede int ahci_platform_init_host(struct platform_device *pdev, 3823b07d4cSHans de Goede struct ahci_host_priv *hpriv, 39018d5ef2SAkinobu Mita const struct ata_port_info *pi_template, 40*25df73d9SBart Van Assche const struct scsi_host_template *sht); 41156c5887SHans de Goede 428eede5bcSNate Watterson void ahci_platform_shutdown(struct platform_device *pdev); 438eede5bcSNate Watterson 44648cb6fdSHans de Goede int ahci_platform_suspend_host(struct device *dev); 45648cb6fdSHans de Goede int ahci_platform_resume_host(struct device *dev); 46648cb6fdSHans de Goede int ahci_platform_suspend(struct device *dev); 47648cb6fdSHans de Goede int ahci_platform_resume(struct device *dev); 48648cb6fdSHans de Goede 49f67f12ffSSerge Semin #define AHCI_PLATFORM_GET_RESETS BIT(0) 50f67f12ffSSerge Semin #define AHCI_PLATFORM_RST_TRIGGER BIT(1) 519d2ab995SKunihiko Hayashi 521c2a49f6SAnton Vorontsov #endif /* _AHCI_PLATFORM_H */ 53