ahci_platform.h 1.7 KB
Newer Older
A
Anton Vorontsov 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
/*
 * 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>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2, or (at your option)
 * any later version.
 */

#ifndef _AHCI_PLATFORM_H
#define _AHCI_PLATFORM_H

18 19
#include <linux/compiler.h>

A
Anton Vorontsov 已提交
20 21
struct device;
struct ata_port_info;
22
struct ahci_host_priv;
23
struct platform_device;
A
Anton Vorontsov 已提交
24

25 26 27 28 29 30
/*
 * Note ahci_platform_data is deprecated, it is only kept around for use
 * by the old da850 and spear13xx ahci code.
 * New drivers should instead declare their own platform_driver struct, and
 * use ahci_platform* functions in their own probe, suspend and resume methods.
 */
A
Anton Vorontsov 已提交
31
struct ahci_platform_data {
32
	int (*init)(struct device *dev, void __iomem *addr);
A
Anton Vorontsov 已提交
33
	void (*exit)(struct device *dev);
34 35
	int (*suspend)(struct device *dev);
	int (*resume)(struct device *dev);
A
Anton Vorontsov 已提交
36 37 38 39 40
	const struct ata_port_info *ata_port_info;
	unsigned int force_port_map;
	unsigned int mask_port_map;
};

41 42
int ahci_platform_enable_clks(struct ahci_host_priv *hpriv);
void ahci_platform_disable_clks(struct ahci_host_priv *hpriv);
43 44
int ahci_platform_enable_resources(struct ahci_host_priv *hpriv);
void ahci_platform_disable_resources(struct ahci_host_priv *hpriv);
45 46 47 48 49 50 51
struct ahci_host_priv *ahci_platform_get_resources(
	struct platform_device *pdev);
int ahci_platform_init_host(struct platform_device *pdev,
			    struct ahci_host_priv *hpriv,
			    const struct ata_port_info *pi_template,
			    unsigned int force_port_map,
			    unsigned int mask_port_map);
52

A
Anton Vorontsov 已提交
53
#endif /* _AHCI_PLATFORM_H */