From patchwork Tue May 17 15:15:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Geert Uytterhoeven X-Patchwork-Id: 9113731 X-Patchwork-Delegate: horms@verge.net.au Return-Path: X-Original-To: patchwork-linux-renesas-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CC069BF29F for ; Tue, 17 May 2016 15:15:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D69D3201BB for ; Tue, 17 May 2016 15:15:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D7C94201C0 for ; Tue, 17 May 2016 15:15:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754111AbcEQPPg (ORCPT ); Tue, 17 May 2016 11:15:36 -0400 Received: from andre.telenet-ops.be ([195.130.132.53]:47394 "EHLO andre.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753303AbcEQPPg (ORCPT ); Tue, 17 May 2016 11:15:36 -0400 Received: from ayla.of.borg ([84.195.107.21]) by andre.telenet-ops.be with bizsmtp id vTFZ1s00a0TjorY01TFZsS; Tue, 17 May 2016 17:15:34 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.82) (envelope-from ) id 1b2gib-0001wd-Ua; Tue, 17 May 2016 17:15:33 +0200 Received: from geert by ramsan with local (Exim 4.82) (envelope-from ) id 1b2gie-0006EN-KP; Tue, 17 May 2016 17:15:36 +0200 From: Geert Uytterhoeven To: Simon Horman , Magnus Damm Cc: linux-renesas-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Geert Uytterhoeven Subject: [PATCH] ARM: shmobile: rcar-gen2: Use ICRAM1 for jump stub on all SoCs Date: Tue, 17 May 2016 17:15:33 +0200 Message-Id: <1463498133-23918-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 1.9.1 Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 Currently the different SoCs in the R-Car Gen2 family use different types of on-chip RAM for the jump stub: - R-Car H2 uses Media RAM, - R-Car M2-W uses another type of optional On-chip RAM, as it doesn't have Media RAM, - R-Car M2-N uses Inter Connect RAM in Magnus Damm's "ARM: shmobile: r8a7793 boot address update". As all R-Car Gen2 SoCs have 4 KiB of Inter Connect RAM, consolidate the code by always using that. Signed-off-by: Geert Uytterhoeven --- Tested on r8a7790/lager and r8a7791/koelsch. --- arch/arm/mach-shmobile/pm-rcar-gen2.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/arch/arm/mach-shmobile/pm-rcar-gen2.c b/arch/arm/mach-shmobile/pm-rcar-gen2.c index 691ac166a277c03f..61361dac6068210a 100644 --- a/arch/arm/mach-shmobile/pm-rcar-gen2.c +++ b/arch/arm/mach-shmobile/pm-rcar-gen2.c @@ -26,8 +26,7 @@ #define CA7RESCNT 0x0044 /* On-chip RAM */ -#define MERAM 0xe8080000 -#define RAM 0xe6300000 +#define ICRAM1 0xe63c0000 /* Inter Connect RAM1 (4 KiB) */ /* SYSC */ #define SYSCIER 0x0c @@ -58,7 +57,7 @@ void __init rcar_gen2_pm_init(void) struct device_node *np, *cpus; bool has_a7 = false; bool has_a15 = false; - phys_addr_t boot_vector_addr = 0; + phys_addr_t boot_vector_addr = ICRAM1; u32 syscier = 0; if (once++) @@ -75,14 +74,10 @@ void __init rcar_gen2_pm_init(void) has_a7 = true; } - if (of_machine_is_compatible("renesas,r8a7790")) { - boot_vector_addr = MERAM; + if (of_machine_is_compatible("renesas,r8a7790")) syscier = 0x013111ef; - - } else if (of_machine_is_compatible("renesas,r8a7791")) { - boot_vector_addr = RAM; + else if (of_machine_is_compatible("renesas,r8a7791")) syscier = 0x00111003; - } /* RAM for jump stub, because BAR requires 256KB aligned address */ p = ioremap_nocache(boot_vector_addr, shmobile_boot_size);