From patchwork Thu Jun 26 13:42:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gregory CLEMENT X-Patchwork-Id: 4427811 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 26C5E9F319 for ; Thu, 26 Jun 2014 13:45:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9AB8F20351 for ; Thu, 26 Jun 2014 13:45:43 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (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 0FF2F20306 for ; Thu, 26 Jun 2014 13:45:40 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X09xZ-000887-1l; Thu, 26 Jun 2014 13:43:29 +0000 Received: from top.free-electrons.com ([176.31.233.9] helo=mail.free-electrons.com) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1X09xT-0007yO-4o for linux-arm-kernel@lists.infradead.org; Thu, 26 Jun 2014 13:43:26 +0000 Received: by mail.free-electrons.com (Postfix, from userid 106) id 7B8809CF; Thu, 26 Jun 2014 15:43:00 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from localhost (tra42-5-83-152-246-54.fbx.proxad.net [83.152.246.54]) by mail.free-electrons.com (Postfix) with ESMTPSA id 189E280C; Thu, 26 Jun 2014 15:43:00 +0200 (CEST) From: Gregory CLEMENT To: Jason Cooper , Andrew Lunn , Sebastian Hesselbarth , Gregory CLEMENT Subject: [PATCH] ARM: mvebu: Enable SCU Speculative linefills to L2 for Armada 375/38x Date: Thu, 26 Jun 2014 15:42:58 +0200 Message-Id: <1403790178-23902-1-git-send-email-gregory.clement@free-electrons.com> X-Mailer: git-send-email 1.8.1.2 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140626_064323_334080_61D919CB X-CRM114-Status: GOOD ( 11.00 ) X-Spam-Score: 1.0 (+) Cc: Thomas Petazzoni , Lior Amsalem , Tawfik Bayouk , Nadav Haklai , Ezequiel Garcia , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 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-Virus-Scanned: ClamAV using ClamSMTP From: Nadav Haklai When set, coherent linefill requests are sent speculatively to the L2C-310 in parallel with the tag look-up. If the tag look-up misses, the confirmed linefill is sent to the L2C-310 and gets RDATA earlier because the data request was already initiated by the speculative request. This feature may improve overall system performance. [Gregory: use a define for the SCU Speculative linefills enable bit, modify the title of the patch] Signed-off-by: Nadav Haklai Signed-off-by: Gregory CLEMENT --- arch/arm/mach-mvebu/board-v7.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm/mach-mvebu/board-v7.c b/arch/arm/mach-mvebu/board-v7.c index 8bb742fdf5ca..c9b02651e895 100644 --- a/arch/arm/mach-mvebu/board-v7.c +++ b/arch/arm/mach-mvebu/board-v7.c @@ -33,6 +33,10 @@ #include "coherency.h" #include "mvebu-soc-id.h" +#define SCU_CTRL 0x00 +#define SCU_SPEC_LINEFILL_EN BIT(3) + + /* * Enables the SCU when available. Obviously, this is only useful on * Cortex-A based SOCs, not on PJ4B based ones. @@ -44,7 +48,15 @@ static void __init mvebu_scu_enable(void) struct device_node *np = of_find_compatible_node(NULL, NULL, "arm,cortex-a9-scu"); if (np) { + u32 scu_ctrl; scu_base = of_iomap(np, 0); + /* already enabled? */ + scu_ctrl = __raw_readl(scu_base + SCU_CTRL); + if (!(scu_ctrl & 1)) { + /* Enable SCU Speculative linefills to L2 */ + scu_ctrl |= SCU_SPEC_LINEFILL_EN; + __raw_writel(scu_ctrl, scu_base + SCU_CTRL); + } scu_enable(scu_base); of_node_put(np); }