[PATCH v6 02/18] libahci: Move ahci_host_priv declaration to include/linux/ahci.h
From: Hans de Goede <hidden>
Date: 2014-02-19 12:01:44
Also in:
linux-devicetree, linux-ide
Subsystem:
libata subsystem (serial and parallel ata drivers), the rest · Maintainers:
Damien Le Moal, Niklas Cassel, Linus Torvalds
With the ahci-platform.c changes later in this patch-set, some arch/arm/mach-foo/*.c sata drivers need access to ahci_host_priv, so move its declaration outside of drivers/ata. Signed-off-by: Hans de Goede <redacted> --- drivers/ata/ahci.h | 20 +------------------- include/linux/ahci.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 19 deletions(-) create mode 100644 include/linux/ahci.h
diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h
index 2c04211..0f80129 100644
--- a/drivers/ata/ahci.h
+++ b/drivers/ata/ahci.h@@ -35,7 +35,7 @@ #ifndef _AHCI_H #define _AHCI_H -#include <linux/clk.h> +#include <linux/ahci.h> #include <linux/libata.h> /* Enclosure Management Control */
@@ -309,24 +309,6 @@ struct ahci_port_priv { char *irq_desc; /* desc in /proc/interrupts */ }; -struct ahci_host_priv { - void __iomem * mmio; /* bus-independent mem map */ - unsigned int flags; /* AHCI_HFLAG_* */ - u32 cap; /* cap to use */ - u32 cap2; /* cap2 to use */ - u32 port_map; /* port map to use */ - u32 saved_cap; /* saved initial cap */ - u32 saved_cap2; /* saved initial cap2 */ - u32 saved_port_map; /* saved initial port_map */ - u32 em_loc; /* enclosure management location */ - u32 em_buf_sz; /* EM buffer size in byte */ - u32 em_msg_type; /* EM message type */ - struct clk *clk; /* Only for platforms supporting clk */ - void *plat_data; /* Other platform data */ - /* Optional ahci_start_engine override */ - void (*start_engine)(struct ata_port *ap); -}; - extern int ahci_ignore_sss; extern struct device_attribute *ahci_shost_attrs[];
diff --git a/include/linux/ahci.h b/include/linux/ahci.h
new file mode 100644
index 0000000..3499d44
--- /dev/null
+++ b/include/linux/ahci.h@@ -0,0 +1,46 @@ +/* + * ahci.h - Common AHCI SATA definitions and declarations + * + * Maintained by: Tejun Heo <tj@kernel.org> + * Please ALWAYS copy linux-ide at vger.kernel.org + * on emails. + * + * Copyright 2004-2005 Red Hat, Inc. + * + * 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. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __LINUX_AHCI_H__ +#define __LINUX_AHCI_H__ + +#include <linux/clk.h> + +struct ata_port; + +struct ahci_host_priv { + void __iomem *mmio; /* bus-independent mem map */ + unsigned int flags; /* AHCI_HFLAG_* */ + u32 cap; /* cap to use */ + u32 cap2; /* cap2 to use */ + u32 port_map; /* port map to use */ + u32 saved_cap; /* saved initial cap */ + u32 saved_cap2; /* saved initial cap2 */ + u32 saved_port_map; /* saved initial port_map */ + u32 em_loc; /* enclosure management location */ + u32 em_buf_sz; /* EM buffer size in byte */ + u32 em_msg_type; /* EM message type */ + struct clk *clk; /* Optional */ + void *plat_data; /* Other platform data */ + /* Optional ahci_start_engine override */ + void (*start_engine)(struct ata_port *ap); +}; + +#endif
--
1.8.5.3