From patchwork Thu Jul 23 00:48:01 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Reichel X-Patchwork-Id: 6848741 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id D5F8BC05AD for ; Thu, 23 Jul 2015 00:51:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id F2EE720712 for ; Thu, 23 Jul 2015 00:51:29 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 123D6206E8 for ; Thu, 23 Jul 2015 00:51:29 +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 1ZI4gy-0000xo-Ud; Thu, 23 Jul 2015 00:48:56 +0000 Received: from ring0.de ([5.45.105.125]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZI4gn-0000ui-VT for linux-arm-kernel@lists.infradead.org; Thu, 23 Jul 2015 00:48:46 +0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 From: Sebastian Reichel To: Tony Lindgren , Russell King Subject: [PATCH 1/3] ARM: OMAP2+: N900: always enable IBE bit Date: Thu, 23 Jul 2015 02:48:01 +0200 Message-Id: <1437612483-30160-2-git-send-email-sre@kernel.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1437612483-30160-1-git-send-email-sre@kernel.org> References: <1437612483-30160-1-git-send-email-sre@kernel.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150722_174846_166924_B5BF72F1 X-CRM114-Status: GOOD ( 10.85 ) X-Spam-Score: -3.1 (---) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Sebastian Reichel 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 The kernel's workaround for Errata 430973 consists of a BTAC/BTB flush at context switch. This requires the IBE bit being set, which should normally be done by the bootloader. Since the Nokia N900's bootloader is not easily replaceable, a pdata quirk enables the IBE bit for the Nokia N900. Until e748994f5cc5, the flush at context switch required CONFIG_ARM_ERRATA_430973, so the same check has been used for setting the IBE bit. Since all sold N900s are assumed to be affected, the guard can be removed now, so that the IBE bit is always set. Signed-off-by: Sebastian Reichel Acked-by: Tony Lindgren --- arch/arm/mach-omap2/board-rx51.c | 2 -- arch/arm/mach-omap2/pdata-quirks.c | 11 ++--------- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 2d1e5a6..3df01cc 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@ -108,11 +108,9 @@ static void __init rx51_init(void) rx51_peripherals_init(); if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { -#ifdef CONFIG_ARM_ERRATA_430973 pr_info("RX-51: Enabling ARM errata 430973 workaround\n"); /* set IBE to 1 */ rx51_secure_update_aux_cr(BIT(6), 0); -#endif } /* Ensure SDRC pins are mux'd for self-refresh */ diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 821171c..0aa438d 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -249,18 +249,11 @@ static void __init nokia_n900_legacy_init(void) hsmmc2_internal_input_clk(); if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { - if (IS_ENABLED(CONFIG_ARM_ERRATA_430973)) { - pr_info("RX-51: Enabling ARM errata 430973 workaround\n"); - /* set IBE to 1 */ - rx51_secure_update_aux_cr(BIT(6), 0); - } else { - pr_warn("RX-51: Not enabling ARM errata 430973 workaround\n"); - pr_warn("Thumb binaries may crash randomly without this workaround\n"); - } + pr_info("RX-51: Enabling ARM errata 430973 workaround\n"); + rx51_secure_update_aux_cr(BIT(6), 0); /* set IBE to 1 */ pr_info("RX-51: Registring OMAP3 HWRNG device\n"); platform_device_register(&omap3_rom_rng_device); - } }