From patchwork Mon Jan 20 16:44:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans de Goede X-Patchwork-Id: 3513661 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8D4CBC02DC for ; Mon, 20 Jan 2014 16:47:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9335F20142 for ; Mon, 20 Jan 2014 16:47:22 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B7AF0200BE for ; Mon, 20 Jan 2014 16:47:17 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5HzV-0002Ua-Us; Mon, 20 Jan 2014 16:46:26 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5HzK-0005eO-8J; Mon, 20 Jan 2014 16:46:14 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W5Hyk-0005X0-N0 for linux-arm-kernel@lists.infradead.org; Mon, 20 Jan 2014 16:45:41 +0000 Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s0KGjDYT030776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 20 Jan 2014 11:45:13 -0500 Received: from shalem.localdomain.com (vpn1-5-170.ams2.redhat.com [10.36.5.170]) by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s0KGj4ei011144; Mon, 20 Jan 2014 11:45:10 -0500 From: Hans de Goede To: Tejun Heo Subject: [PATCH RFC v4 02/10] libahci: Move ahci_host_priv declaration to include/linux/ahci.h Date: Mon, 20 Jan 2014 17:44:55 +0100 Message-Id: <1390236303-22538-3-git-send-email-hdegoede@redhat.com> In-Reply-To: <1390236303-22538-1-git-send-email-hdegoede@redhat.com> References: <1390236303-22538-1-git-send-email-hdegoede@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140120_114538_976401_FB03B980 X-CRM114-Status: GOOD ( 16.23 ) X-Spam-Score: -7.5 (-------) Cc: devicetree , Hans de Goede , linux-ide@vger.kernel.org, Oliver Schinagl , Richard Zhu , linux-sunxi@googlegroups.com, Maxime Ripard , linux-arm-kernel@lists.infradead.org, Roger Quadros X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 +#include #include /* 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 + * Please ALWAYS copy linux-ide@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 + +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