From patchwork Mon Mar 7 04:29:30 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Kushwaha X-Patchwork-Id: 85681 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id A773AB708B for ; Mon, 7 Mar 2011 15:29:06 +1100 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754166Ab1CGE27 (ORCPT ); Sun, 6 Mar 2011 23:28:59 -0500 Received: from va3ehsobe003.messaging.microsoft.com ([216.32.180.13]:3324 "EHLO VA3EHSOBE003.bigfish.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753555Ab1CGE27 (ORCPT ); Sun, 6 Mar 2011 23:28:59 -0500 Received: from mail33-va3-R.bigfish.com (10.7.14.245) by VA3EHSOBE003.bigfish.com (10.7.40.23) with Microsoft SMTP Server id 14.1.225.8; Mon, 7 Mar 2011 04:28:56 +0000 Received: from mail33-va3 (localhost.localdomain [127.0.0.1]) by mail33-va3-R.bigfish.com (Postfix) with ESMTP id C462716700D0; Mon, 7 Mar 2011 04:28:56 +0000 (UTC) X-SpamScore: -3 X-BigFish: VS-3(zzbb2cKzz1202hzz8275bh8275dhz2dh2a8h668h63h) X-Spam-TCS-SCL: 2:0 X-Forefront-Antispam-Report: KIP:(null); UIP:(null); IPVD:NLI; H:de01egw02.freescale.net; RD:de01egw02.freescale.net; EFVD:NLI Received: from mail33-va3 (localhost.localdomain [127.0.0.1]) by mail33-va3 (MessageSwitch) id 1299472136581166_4038; Mon, 7 Mar 2011 04:28:56 +0000 (UTC) Received: from VA3EHSMHS017.bigfish.com (unknown [10.7.14.249]) by mail33-va3.bigfish.com (Postfix) with ESMTP id 80335F2804F; Mon, 7 Mar 2011 04:28:56 +0000 (UTC) Received: from de01egw02.freescale.net (192.88.165.103) by VA3EHSMHS017.bigfish.com (10.7.99.27) with Microsoft SMTP Server (TLS) id 14.1.225.8; Mon, 7 Mar 2011 04:28:55 +0000 Received: from az33smr01.freescale.net (az33smr01.freescale.net [10.64.34.199]) by de01egw02.freescale.net (8.14.3/8.14.3) with ESMTP id p274SrcJ000482; Sun, 6 Mar 2011 21:28:54 -0700 (MST) Received: from localhost.localdomain ([10.232.14.58]) by az33smr01.freescale.net (8.13.1/8.13.0) with ESMTP id p274SlkU015774; Sun, 6 Mar 2011 22:28:48 -0600 (CST) From: Prabhakar Kushwaha To: CC: , , , Prabhakar Kushwaha Subject: [PATCH] driver/FSL SATA: Update RX_WATER_MARK for TRANSCFG Date: Mon, 7 Mar 2011 09:59:30 +0530 Message-ID: <1299472170-3580-1-git-send-email-prabhakar@freescale.com> X-Mailer: git-send-email 1.7.3 MIME-Version: 1.0 X-OriginatorOrg: freescale.com Sender: linux-ide-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org RX_WATER_MARK sets the number of locations in Rx FIFO that can be used before the transport layer instructs the link layer to transmit HOLDS. Note that it can take some time for the HOLDs to get to the other end, and that in the interim there must be enough room in the FIFO to absorb all data that could arrive. Update the new recommended value to 16. Signed-off-by: Prabhakar Kushwaha --- git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git (branch master) This patch is already gone through review of linuxppc-dev mail list. Making CC linuxppc-dev@lists.ozlabs.org drivers/ata/sata_fsl.c | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/drivers/ata/sata_fsl.c b/drivers/ata/sata_fsl.c index 895771c..29d2f29 100644 --- a/drivers/ata/sata_fsl.c +++ b/drivers/ata/sata_fsl.c @@ -186,6 +186,11 @@ enum { COMMANDSTAT = 0x20, }; +/* TRANSCFG (transport-layer) configuration control */ +enum { + TRANSCFG_RX_WATER_MARK = (1 << 4), +}; + /* PHY (link-layer) configuration control */ enum { PHY_BIST_ENABLE = 0x01, @@ -1305,6 +1310,7 @@ static int sata_fsl_probe(struct platform_device *ofdev, struct sata_fsl_host_priv *host_priv = NULL; int irq; struct ata_host *host; + u32 temp; struct ata_port_info pi = sata_fsl_port_info[0]; const struct ata_port_info *ppi[] = { &pi, NULL }; @@ -1319,6 +1325,12 @@ static int sata_fsl_probe(struct platform_device *ofdev, ssr_base = hcr_base + 0x100; csr_base = hcr_base + 0x140; + if (!of_device_is_compatible(ofdev->dev.of_node, "fsl,mpc8315-sata")) { + temp = ioread32(csr_base + TRANSCFG); + temp = temp & 0xffffffe0; + iowrite32(temp | TRANSCFG_RX_WATER_MARK, csr_base + TRANSCFG); + } + DPRINTK("@reset i/o = 0x%x\n", ioread32(csr_base + TRANSCFG)); DPRINTK("sizeof(cmd_desc) = %d\n", sizeof(struct command_desc)); DPRINTK("sizeof(#define cmd_desc) = %d\n", SATA_FSL_CMD_DESC_SIZE);