From patchwork Sat Nov 9 07:00:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Loc Ho X-Patchwork-Id: 3161981 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 56EADC045B for ; Sat, 9 Nov 2013 07:01:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 65DA0200E5 for ; Sat, 9 Nov 2013 07:01:42 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 50C742011C for ; Sat, 9 Nov 2013 07:01:40 +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 1Vf2Xl-00079D-Mt; Sat, 09 Nov 2013 07:01:17 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vf2Xg-00059N-8D; Sat, 09 Nov 2013 07:01:12 +0000 Received: from exprod5og109.obsmtp.com ([64.18.0.188]) by merlin.infradead.org with smtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Vf2Xa-00057A-VU for linux-arm-kernel@lists.infradead.org; Sat, 09 Nov 2013 07:01:08 +0000 Received: from mail-pa0-f51.google.com ([209.85.220.51]) (using TLSv1) by exprod5ob109.postini.com ([64.18.4.12]) with SMTP ID DSNKUn3dnL3j/MhsJYxcktF2bsYRVvS7Bo8I@postini.com; Fri, 08 Nov 2013 23:01:06 PST Received: by mail-pa0-f51.google.com with SMTP id ld10so3198282pab.38 for ; Fri, 08 Nov 2013 23:00:44 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=aIAQwBXc/Jux/Ggb8YeKuLsz5nobaZrmB8yxUKh1cok=; b=ircfl1uWm9/2iQCK8bcse7QViQmRDFYITRgvAFVE9WyD7B+v9/yZHVFUK17KUsjRqw Lb3m3OIBaCdSpDslStJ+vC+wRLkiCLPGxXpoxAlyX60jaeZPOJrKj7O2OEIrPDZ0W/DP NustuHeFCW8+Qc76LxIByQKFheB0/I1K8iMwpnu0VyzWaNZIaboXq7fc1pdcd3C5p1IU n/NaKMQ+Rx/sBvutsjBrnzs4lG/YQh62fEih8CFmIATJV6cKxzA71jzpY9AK16+ZOQc5 5SyhTvWcgYEv2ecjhA9SMz1WohJGB7ZHELEQ1ovKuXigaC7YP6rxajox1mCB7tDvAyoq 6wJg== X-Gm-Message-State: ALoCoQnyTHTYMD5vmH/wP1W2+W3shDENiqxq1HqVlpLsaOnt8ZlfBXenmWWblY7xvXgwFb6W4a3+Xngz1l2hqCkgfymLAKO71I5J44ydYJ7QcUYZHy1t2nyW+Q3uHBcuTmI0YWMVg4LVdMtPX/WYWYu0VCC+GOInvsEVMxrFli420YekyEihVH+oJpJ6CYvUhFcBFml4ztzP X-Received: by 10.66.149.73 with SMTP id ty9mr19526092pab.36.1383980444592; Fri, 08 Nov 2013 23:00:44 -0800 (PST) X-Received: by 10.66.149.73 with SMTP id ty9mr19526081pab.36.1383980444524; Fri, 08 Nov 2013 23:00:44 -0800 (PST) Received: from localhost ([198.137.200.11]) by mx.google.com with ESMTPSA id ye1sm19429392pab.19.2013.11.08.23.00.43 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 08 Nov 2013 23:00:43 -0800 (PST) From: Loc Ho To: olof@lixom.net, tj@kernel.org, linux-scsi@vger.kernel.org Subject: [PATCH v2 1/5] ata: Export AHCI library functions required by APM X-Gene SATA driver Date: Sat, 9 Nov 2013 00:00:27 -0700 Message-Id: <1383980431-6572-2-git-send-email-lho@apm.com> X-Mailer: git-send-email 1.5.5 In-Reply-To: <1383980431-6572-1-git-send-email-lho@apm.com> References: <1383980431-6572-1-git-send-email-lho@apm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131109_020107_264359_552E7163 X-CRM114-Status: GOOD ( 10.60 ) X-Spam-Score: -4.2 (----) Cc: jcm@redhat.com, Suman Tripathi , Loc Ho , linux-arm-kernel@lists.infradead.org, Tuan Phan 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.2 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 ata: Export required functions by APM X-Gene SATA driver to avoid duplicate code. Signed-off-by: Loc Ho Signed-off-by: Tuan Phan Signed-off-by: Suman Tripathi --- drivers/ata/ahci.h | 6 ++++++ drivers/ata/libahci.c | 13 ++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/drivers/ata/ahci.h b/drivers/ata/ahci.h index 1145637..cf881e0 100644 --- a/drivers/ata/ahci.h +++ b/drivers/ata/ahci.h @@ -368,6 +368,12 @@ irqreturn_t ahci_hw_interrupt(int irq, void *dev_instance); irqreturn_t ahci_thread_fn(int irq, void *dev_instance); void ahci_print_info(struct ata_host *host, const char *scc_s); int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis); +void ahci_sw_activity(struct ata_link *link); +int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); +void ahci_error_intr(struct ata_port *ap, u32 irq_stat); +int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, + struct ata_taskfile *tf, int is_cmd, u16 flags, + unsigned long timeout_msec); static inline void __iomem *__ahci_port_base(struct ata_host *host, unsigned int port_no) diff --git a/drivers/ata/libahci.c b/drivers/ata/libahci.c index aaac4fb..de7e074 100644 --- a/drivers/ata/libahci.c +++ b/drivers/ata/libahci.c @@ -68,7 +68,6 @@ static ssize_t ahci_transmit_led_message(struct ata_port *ap, u32 state, static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val); -static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val); static unsigned int ahci_qc_issue(struct ata_queued_cmd *qc); static bool ahci_qc_fill_rtf(struct ata_queued_cmd *qc); static int ahci_port_start(struct ata_port *ap); @@ -553,7 +552,7 @@ static int ahci_scr_read(struct ata_link *link, unsigned int sc_reg, u32 *val) return -EINVAL; } -static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) +int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) { void __iomem *port_mmio = ahci_port_base(link->ap); int offset = ahci_scr_offset(link->ap, sc_reg); @@ -564,6 +563,7 @@ static int ahci_scr_write(struct ata_link *link, unsigned int sc_reg, u32 val) } return -EINVAL; } +EXPORT_SYMBOL_GPL(ahci_scr_write); void ahci_start_engine(struct ata_port *ap) { @@ -869,7 +869,7 @@ int ahci_reset_controller(struct ata_host *host) } EXPORT_SYMBOL_GPL(ahci_reset_controller); -static void ahci_sw_activity(struct ata_link *link) +void ahci_sw_activity(struct ata_link *link) { struct ata_port *ap = link->ap; struct ahci_port_priv *pp = ap->private_data; @@ -882,6 +882,7 @@ static void ahci_sw_activity(struct ata_link *link) if (!timer_pending(&emp->timer)) mod_timer(&emp->timer, jiffies + msecs_to_jiffies(10)); } +EXPORT_SYMBOL_GPL(ahci_sw_activity); static void ahci_sw_activity_blink(unsigned long arg) { @@ -1239,7 +1240,7 @@ int ahci_kick_engine(struct ata_port *ap) } EXPORT_SYMBOL_GPL(ahci_kick_engine); -static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, +int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, struct ata_taskfile *tf, int is_cmd, u16 flags, unsigned long timeout_msec) { @@ -1268,6 +1269,7 @@ static int ahci_exec_polled_cmd(struct ata_port *ap, int pmp, return 0; } +EXPORT_SYMBOL_GPL(ahci_exec_polled_cmd); int ahci_do_softreset(struct ata_link *link, unsigned int *class, int pmp, unsigned long deadline, @@ -1552,7 +1554,7 @@ static void ahci_fbs_dec_intr(struct ata_port *ap) dev_err(ap->host->dev, "failed to clear device error\n"); } -static void ahci_error_intr(struct ata_port *ap, u32 irq_stat) +void ahci_error_intr(struct ata_port *ap, u32 irq_stat) { struct ahci_host_priv *hpriv = ap->host->private_data; struct ahci_port_priv *pp = ap->private_data; @@ -1662,6 +1664,7 @@ static void ahci_error_intr(struct ata_port *ap, u32 irq_stat) } else ata_port_abort(ap); } +EXPORT_SYMBOL_GPL(ahci_error_intr); static void ahci_handle_port_interrupt(struct ata_port *ap, void __iomem *port_mmio, u32 status)