From patchwork Mon Oct 5 23:28:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Suman Anna X-Patchwork-Id: 54513 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f197.google.com (mail-lb0-f197.google.com [209.85.217.197]) by patches.linaro.org (Postfix) with ESMTPS id 2859722B0F for ; Mon, 5 Oct 2015 23:29:18 +0000 (UTC) Received: by lbcao8 with SMTP id ao8sf41745166lbc.1 for ; Mon, 05 Oct 2015 16:29:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=/ijwo+HesAQj1rAuaIRHOOoeHvGV6gYpZxI6a0rBYuc=; b=ZOQrOyLIiilJHHLeb+kNOlBApS+WHhVHvalPRiDZdtDlLZlpIGtF1tjo5z4VDlnV7+ 2f8aIM98KeCSDB8dse3hc/axwkvgGKt8RrKDIGgrbyNXrKgjvnt/DPEJNay2QX1PjCNG WpXOHT+usS0zHjMH/OL4/2esQne/PFOq9jmHxwcSdMHMTtrh+tTZzJZYAx2gINTtb1xB KkXZPLEQ36y6/mP3tHtrAOtRH5Hb8BO/6Xz0XSKGDP83CUd7r5i/BNqOSEcD0GfK8L2U LkU/aQZNHLSdASdDl9j2FBAjY6TvUDvj5lrYFSvv5khT6kx4ZojqZj0jeEI/2vWkIEou rxZA== X-Gm-Message-State: ALoCoQkO1NaTAaycBC0fHTvtmUrRWZIZJQZK0a2PhhlFhzclcZOjvTS83WWUC/wVcps6wgcctIHS X-Received: by 10.112.147.7 with SMTP id tg7mr5834296lbb.16.1444087757086; Mon, 05 Oct 2015 16:29:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.43.133 with SMTP id r127ls482028lfr.74.gmail; Mon, 05 Oct 2015 16:29:16 -0700 (PDT) X-Received: by 10.112.55.99 with SMTP id r3mr12993406lbp.64.1444087756953; Mon, 05 Oct 2015 16:29:16 -0700 (PDT) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com. [209.85.217.182]) by mx.google.com with ESMTPS id j33si18705984lfi.37.2015.10.05.16.29.16 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2015 16:29:16 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) client-ip=209.85.217.182; Received: by lbwr8 with SMTP id r8so66591192lbw.2 for ; Mon, 05 Oct 2015 16:29:16 -0700 (PDT) X-Received: by 10.112.135.9 with SMTP id po9mr13216190lbb.56.1444087756841; Mon, 05 Oct 2015 16:29:16 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.59.35 with SMTP id w3csp1523702lbq; Mon, 5 Oct 2015 16:29:15 -0700 (PDT) X-Received: by 10.67.6.67 with SMTP id cs3mr35231199pad.129.1444087744215; Mon, 05 Oct 2015 16:29:04 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ge9si43880700pbc.39.2015.10.05.16.29.03; Mon, 05 Oct 2015 16:29:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-omap-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751426AbbJEX3B (ORCPT + 5 others); Mon, 5 Oct 2015 19:29:01 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:40905 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751238AbbJEX2y (ORCPT ); Mon, 5 Oct 2015 19:28:54 -0400 Received: from dlelxv90.itg.ti.com ([172.17.2.17]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t95NSQi1014728; Mon, 5 Oct 2015 18:28:26 -0500 Received: from DFLE73.ent.ti.com (dfle73.ent.ti.com [128.247.5.110]) by dlelxv90.itg.ti.com (8.14.3/8.13.8) with ESMTP id t95NSQj7028125; Mon, 5 Oct 2015 18:28:26 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DFLE73.ent.ti.com (128.247.5.110) with Microsoft SMTP Server id 14.3.224.2; Mon, 5 Oct 2015 18:28:26 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t95NSP9j009884; Mon, 5 Oct 2015 18:28:25 -0500 Received: from localhost (irmo.am.dhcp.ti.com [128.247.9.166]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id t95NSP908799; Mon, 5 Oct 2015 18:28:25 -0500 (CDT) From: Suman Anna To: Tony Lindgren CC: Paul Walmsley , , , , Suman Anna Subject: [PATCH v2 2/4] ARM: OMAP2+: timer: Remove secure timer for DRA7xx HS devices Date: Mon, 5 Oct 2015 18:28:22 -0500 Message-ID: <1444087704-1429-3-git-send-email-s-anna@ti.com> X-Mailer: git-send-email 2.6.0 In-Reply-To: <1444087704-1429-1-git-send-email-s-anna@ti.com> References: <1444087704-1429-1-git-send-email-s-anna@ti.com> MIME-Version: 1.0 Sender: linux-omap-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: s-anna@ti.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.182 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Timer 12 on DRA7 SoCs is reserved for secure usage on high-secure (HS) devices. The timer cannot be used by the kernel on HS devices, but is available on regular general purpose (GP) devices. This is similar to the behavior on OMAP3 devices, so extend the logic used in commit ad24bde8f102 ("ARM: OMAP3: Dynamically disable secure timer nodes for secure devices") to remove the secure timer on DRA7xx SoCs at run-time based on the SoC device type. Signed-off-by: Suman Anna --- arch/arm/mach-omap2/timer.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index a55655127ef2..1e346aa0a687 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -193,8 +193,8 @@ static struct device_node * __init omap_get_timer_dt(const struct of_device_id * /** * omap_dmtimer_init - initialisation function when device tree is used * - * For secure OMAP3 devices, timers with device type "timer-secure" cannot - * be used by the kernel as they are reserved. Therefore, to prevent the + * For secure OMAP3/DRA7xx devices, timers with device type "timer-secure" + * cannot be used by the kernel as they are reserved. Therefore, to prevent the * kernel registering these devices remove them dynamically from the device * tree on boot. */ @@ -202,7 +202,7 @@ static void __init omap_dmtimer_init(void) { struct device_node *np; - if (!cpu_is_omap34xx()) + if (!cpu_is_omap34xx() && !soc_is_dra7xx()) return; /* If we are a secure device, remove any secure timer nodes */