ahci_platform.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. /*
  2. * AHCI SATA platform driver
  3. *
  4. * Copyright 2004-2005 Red Hat, Inc.
  5. * Jeff Garzik <jgarzik@pobox.com>
  6. * Copyright 2010 MontaVista Software, LLC.
  7. * Anton Vorontsov <avorontsov@ru.mvista.com>
  8. *
  9. * This program is free software; you can redistribute it and/or modify
  10. * it under the terms of the GNU General Public License as published by
  11. * the Free Software Foundation; either version 2, or (at your option)
  12. * any later version.
  13. */
  14. #ifndef _AHCI_PLATFORM_H
  15. #define _AHCI_PLATFORM_H
  16. #include <linux/compiler.h>
  17. struct device;
  18. struct ata_port_info;
  19. struct ahci_host_priv;
  20. struct platform_device;
  21. /*
  22. * Note ahci_platform_data is deprecated, it is only kept around for use
  23. * by the old da850 and spear13xx ahci code.
  24. * New drivers should instead declare their own platform_driver struct, and
  25. * use ahci_platform* functions in their own probe, suspend and resume methods.
  26. */
  27. struct ahci_platform_data {
  28. int (*init)(struct device *dev, void __iomem *addr);
  29. void (*exit)(struct device *dev);
  30. int (*suspend)(struct device *dev);
  31. int (*resume)(struct device *dev);
  32. const struct ata_port_info *ata_port_info;
  33. unsigned int force_port_map;
  34. unsigned int mask_port_map;
  35. };
  36. int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
  37. void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
  38. int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
  39. void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
  40. struct ahci_host_priv *ahci_platform_get_resources(
  41. struct platform_device *pdev);
  42. int ahci_platform_init_host(struct platform_device *pdev,
  43. struct ahci_host_priv *hpriv,
  44. const struct ata_port_info *pi_template,
  45. unsigned int force_port_map,
  46. unsigned int mask_port_map);
  47. #endif /* _AHCI_PLATFORM_H */