From patchwork Wed Jan 15 12:26:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3491691 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 54B97C02DC for ; Wed, 15 Jan 2014 12:27:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 508D620166 for ; Wed, 15 Jan 2014 12:27:37 +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 1EC3A20165 for ; Wed, 15 Jan 2014 12:27:36 +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 1W3PXz-0006li-Ub; Wed, 15 Jan 2014 12:26: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 1W3PXc-0005cl-9g; Wed, 15 Jan 2014 12:25:52 +0000 Received: from mail-pb0-x22a.google.com ([2607:f8b0:400e:c01::22a]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W3PXQ-0005Z5-Az for linux-arm-kernel@lists.infradead.org; Wed, 15 Jan 2014 12:25:40 +0000 Received: by mail-pb0-f42.google.com with SMTP id uo5so1067855pbc.15 for ; Wed, 15 Jan 2014 04:25:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=7Ft4eDo7PzgWR5HOg+YyFabIG+d6yWMEWaBAYk2fIh4=; b=ADHEzHhNPzyViX+1NEktiOrk8Es1jXf4dzRV/liK4nCzv19FBcYbdzbFrwThjX9uJ1 rSANf9GGw/b64T8/Bp9WIfWEISOl/yJR19dZLS8v3GHEQfwZTMMyc9qZ7KzAw4xHdjHX QzyMKnouJi9tUEMpSqxmyi3F8cB6f4p5eN9JzZFXmDUBQwDE9HHQruCtuphAqHBWzpA2 6sfaux5I+SyFTyfzL6weYjLBqTVmb//z5IPFczNRB5w8QSFSuVRCZ+/dthoPdx8kj+5i SoUlORilB2aLEx9A7TXMCo5CmtqxrW0Vie+XNYvKkX6CiZh/JF32l9Xf1FNdovlNGX84 2Obw== X-Received: by 10.66.145.199 with SMTP id sw7mr2233053pab.143.1389788718854; Wed, 15 Jan 2014 04:25:18 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id iq10sm7818985pbc.14.2014.01.15.04.25.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jan 2014 04:25:17 -0800 (PST) From: Magnus Damm To: linux-sh@vger.kernel.org Date: Wed, 15 Jan 2014 21:26:22 +0900 Message-Id: <20140115122622.9437.27236.sendpatchset@w520> In-Reply-To: <20140115122539.9437.63968.sendpatchset@w520> References: <20140115122539.9437.63968.sendpatchset@w520> Subject: [PATCH 04/04] ARM: shmobile: r8a7790 CCI configuration X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140115_072540_460251_B0DA1DA6 X-CRM114-Status: UNSURE ( 9.84 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.0 (--) Cc: horms@verge.net.au, Magnus Damm , linux-arm-kernel@lists.infradead.org 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.4 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 From: Gaku Inami Add the settings of CCI-400 for enabling ca15/ca7 snoop on r8a7790. Signed-off-by: Gaku Inami Signed-off-by: Magnus Damm --- arch/arm/mach-shmobile/smp-r8a7790.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) --- 0005/arch/arm/mach-shmobile/smp-r8a7790.c +++ work/arch/arm/mach-shmobile/smp-r8a7790.c 2014-01-15 15:40:56.000000000 +0900 @@ -28,6 +28,11 @@ #define CA15RESCNT 0x0040 #define CA7RESCNT 0x0044 #define MERAM 0xe8080000 +#define CCI_BASE 0xf0090000 +#define CCI_SLAVE3 0x4000 +#define CCI_SLAVE4 0x5000 +#define CCI_SNOOP 0x0000 +#define CCI_STATUS 0x000c static struct rcar_sysc_ch r8a7790_ca15_scu = { .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */ @@ -71,6 +76,16 @@ static void __init r8a7790_smp_prepare_c r8a7790_pm_init(); rcar_sysc_power_up(&r8a7790_ca15_scu); rcar_sysc_power_up(&r8a7790_ca7_scu); + + /* enable snoop and DVM */ + p = ioremap_nocache(CCI_BASE, 0x8000); + writel_relaxed(readl_relaxed(p + CCI_SLAVE3 + CCI_SNOOP) | 0x3, + p + CCI_SLAVE3 + CCI_SNOOP); /* ca15 */ + writel_relaxed(readl_relaxed(p + CCI_SLAVE4 + CCI_SNOOP) | 0x3, + p + CCI_SLAVE4 + CCI_SNOOP); /* ca7 */ + while (__raw_readl(p + CCI_STATUS)); + /* wait for pending bit low */ + iounmap(p); } struct smp_operations r8a7790_smp_ops __initdata = {