From patchwork Mon Jul 1 14:03:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pavel Machek X-Patchwork-Id: 2808021 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 B2402BF4A1 for ; Mon, 1 Jul 2013 14:05:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 143BB20108 for ; Mon, 1 Jul 2013 14:05:12 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 42BDE20171 for ; Mon, 1 Jul 2013 14:05:07 +0000 (UTC) Received: from merlin.infradead.org ([205.233.59.134]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Utei8-0004vq-MR; Mon, 01 Jul 2013 14:04:09 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Utehq-0006iW-CW; Mon, 01 Jul 2013 14:03:50 +0000 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Utehm-0006hF-Jt for linux-arm-kernel@lists.infradead.org; Mon, 01 Jul 2013 14:03:47 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 512) id 097DF81716; Mon, 1 Jul 2013 16:03:21 +0200 (CEST) Date: Mon, 1 Jul 2013 16:03:20 +0200 From: Pavel Machek To: Tony Lindgren Subject: [PATCH] N900: fix operation on emulator Message-ID: <20130701140315.GA15318@amd.pavel.ucw.cz> References: <20130613132624.GA3464@amd.pavel.ucw.cz> <20130613141001.GF8164@atomide.com> <20130613142809.GA3775@amd.pavel.ucw.cz> <20130613145724.GH8164@atomide.com> <20130613155240.GB3775@amd.pavel.ucw.cz> <20130613161418.GJ8164@atomide.com> <20130613230808.GA14876@amd.pavel.ucw.cz> <20130614055629.GM8164@atomide.com> <20130614212816.GA31768@atrey.karlin.mff.cuni.cz> <20130617111031.GQ20992@atomide.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20130617111031.GQ20992@atomide.com> User-Agent: Mutt/1.5.20 (2009-06-14) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20130701_100346_774224_6F569D0F X-CRM114-Status: GOOD ( 13.03 ) X-Spam-Score: -1.9 (-) Cc: linux-omap@vger.kernel.org, pali.rohar@gmail.com, kernel list , linux-arm-kernel , Aaro Koskinen 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: , 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.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, 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 Errata workarounds for N900 hardware actually break operation on emulator. Fix it. This approach was suggested by Pali Rohár (thanks!). (Also explain what "sleep_ind" led actually does). Signed-off-by: Pavel Machek diff --git a/arch/arm/mach-omap2/board-rx51.c b/arch/arm/mach-omap2/board-rx51.c index 74f83a5..81f7b9f 100644 --- a/arch/arm/mach-omap2/board-rx51.c +++ b/arch/arm/mach-omap2/board-rx51.c @@ -33,9 +33,12 @@ #include "pm.h" #include "sdram-nokia.h" #include "board-rx51-secure.h" +#include "soc.h" #define RX51_GPIO_SLEEP_IND 162 +/* This lights up left part of keyboard */ + static struct gpio_led gpio_leds[] = { { .name = "sleep_ind", @@ -107,9 +110,11 @@ static void __init rx51_init(void) rx51_camera_init(); #ifdef CONFIG_ARM_ERRATA_430973 - printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n"); - /* set IBE to 1 */ - rx51_secure_update_aux_cr(1 << 6, 0); + if (omap_type() == OMAP2_DEVICE_TYPE_SEC) { + printk(KERN_INFO "RX-51: Enabling ARM errata 430973 workaround.\n"); + /* set IBE to 1 */ + rx51_secure_update_aux_cr(1 << 6, 0); + } #endif /* Ensure SDRC pins are mux'd for self-refresh */