From patchwork Tue Oct 6 00:45:32 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Felipe Balbi X-Patchwork-Id: 54514 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by patches.linaro.org (Postfix) with ESMTPS id 5C6C822F05 for ; Tue, 6 Oct 2015 00:46:08 +0000 (UTC) Received: by wicuu12 with SMTP id uu12sf35225263wic.2 for ; Mon, 05 Oct 2015 17:46:07 -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 :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=DmeCoCA440PKk+O9sg3UOoz98lwNHfrTUiQwIUhJY9Q=; b=WgKdWbDbW6XeYlL0FNzZSeFlWnpLmoDVUjbUXFlmgY4stUebPOhgv8HdjAfxa7YbGf 9QQre4CO+1mUcgdK7fbNBLCo+f5kSty/HX1zr7hE6gw9Nw6OELnivQkX710/nHlQFBET C+hN35ZjFrUmoceNUGQXx26S4vd7oSbGsU7GLePOuB3b6aYKlHoFf7AaU59L2rMQLdKp fhIdpXYH8vwDXpol755qzq9hQMgjKLoruHeU6d5PnCsmLSHT1HwhzajyAzsTlyB8I5Xc hQJ7on4CDPuDlcn9OmFd6s0jyFnwW31r25q6V0bK/iHHFT+1z88VuUSuLMO5bjOPctbf iMJQ== X-Gm-Message-State: ALoCoQnA2ujbEoMDmBy5uWN6j4B0SqLUNPB11JL1cUr8qlGsnP/cXCofhucpfv8jwcwiPvE8x0N8 X-Received: by 10.195.12.234 with SMTP id et10mr5804155wjd.2.1444092367696; Mon, 05 Oct 2015 17:46:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.25.40.133 with SMTP id o127ls455164lfo.38.gmail; Mon, 05 Oct 2015 17:46:07 -0700 (PDT) X-Received: by 10.112.205.69 with SMTP id le5mr13293971lbc.89.1444092367401; Mon, 05 Oct 2015 17:46:07 -0700 (PDT) Received: from mail-lb0-f178.google.com (mail-lb0-f178.google.com. [209.85.217.178]) by mx.google.com with ESMTPS id o17si18907348lfo.78.2015.10.05.17.46.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2015 17:46:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.178 as permitted sender) client-ip=209.85.217.178; Received: by lbbwt4 with SMTP id wt4so29675900lbb.1 for ; Mon, 05 Oct 2015 17:46:07 -0700 (PDT) X-Received: by 10.25.28.73 with SMTP id c70mr6894073lfc.76.1444092366949; Mon, 05 Oct 2015 17:46:06 -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 w3csp1546934lbq; Mon, 5 Oct 2015 17:46:06 -0700 (PDT) X-Received: by 10.68.104.66 with SMTP id gc2mr42398054pbb.21.1444092365820; Mon, 05 Oct 2015 17:46:05 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v12si42992370pbs.27.2015.10.05.17.46.05; Mon, 05 Oct 2015 17:46:05 -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 S1750998AbbJFAqF (ORCPT + 5 others); Mon, 5 Oct 2015 20:46:05 -0400 Received: from devils.ext.ti.com ([198.47.26.153]:43747 "EHLO devils.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750780AbbJFAqE (ORCPT ); Mon, 5 Oct 2015 20:46:04 -0400 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id t960jYuh025699; Mon, 5 Oct 2015 19:45:34 -0500 Received: from DLEE71.ent.ti.com (dlee71.ent.ti.com [157.170.170.114]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id t960jX8L016514; Mon, 5 Oct 2015 19:45:33 -0500 Received: from dlep32.itg.ti.com (157.170.170.100) by DLEE71.ent.ti.com (157.170.170.114) with Microsoft SMTP Server id 14.3.224.2; Mon, 5 Oct 2015 19:45:33 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep32.itg.ti.com (8.14.3/8.13.8) with ESMTP id t960jXRO017860; Mon, 5 Oct 2015 19:45:33 -0500 From: Felipe Balbi To: Tony Lindgren CC: Linux OMAP Mailing List , Linux ARM Kernel Mailing List , Arnd Bergmann , Suman Anna , Felipe Balbi Subject: [PATCH v2] arm: omap2: timer: don't disable our timers Date: Mon, 5 Oct 2015 19:45:32 -0500 Message-ID: <1444092332-9011-1-git-send-email-balbi@ti.com> X-Mailer: git-send-email 2.5.3 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: balbi@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.178 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: , We actually want these devices to be created because we will be moving timers to drivers/clocksource and this will prevent them from probing. The only situation where we want secure timers to be actually disabled is when we *know* we're running on non-GP (read: HS or EMU) chips, because the secure timer will NOT be available for the public world. This patch is just moving the call to of_add_property to its rightful place. Signed-off-by: Felipe Balbi --- Okay, seems like this is a saner approach. changes since v1: - don't completely remove the status disabled trick, just limit it to non-GP chips arch/arm/mach-omap2/timer.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/arm/mach-omap2/timer.c b/arch/arm/mach-omap2/timer.c index 0ff676273b4b..0bd3ee4552de 100644 --- a/arch/arm/mach-omap2/timer.c +++ b/arch/arm/mach-omap2/timer.c @@ -161,9 +161,7 @@ static const struct of_device_id omap_timer_match[] __initconst = { * * Helper function to get a timer during early boot using device-tree for use * as kernel system timer. Optionally, the property argument can be used to - * select a timer with a specific property. Once a timer is found then mark - * the timer node in device-tree as disabled, to prevent the kernel from - * registering this timer as a platform device and so no one else can use it. + * select a timer with a specific property. */ static struct device_node * __init omap_get_timer_dt(const struct of_device_id *match, const char *property) @@ -182,8 +180,6 @@ static struct device_node * __init omap_get_timer_dt(const struct of_device_id * of_get_property(np, "ti,timer-pwm", NULL) || of_get_property(np, "ti,timer-secure", NULL))) continue; - - of_add_property(np, &device_disabled); return np; } @@ -208,7 +204,10 @@ static void __init omap_dmtimer_init(void) /* If we are a secure device, remove any secure timer nodes */ if ((omap_type() != OMAP2_DEVICE_TYPE_GP)) { np = omap_get_timer_dt(omap_timer_match, "ti,timer-secure"); - of_node_put(np); + if (np) { + of_add_property(np, &device_disabled); + of_node_put(np); + } } }