Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp7693074imu; Tue, 22 Jan 2019 09:59:42 -0800 (PST) X-Google-Smtp-Source: ALg8bN5hSbuSYtf6hFhSq510GXvRbVBY8wW9uWlkRxCLQtfMpeG4u26ZVbpOI64U28E3yT1igHQO X-Received: by 2002:a63:dd55:: with SMTP id g21mr32267488pgj.86.1548179982126; Tue, 22 Jan 2019 09:59:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548179982; cv=none; d=google.com; s=arc-20160816; b=GPu0TLLy3lIqpz7x4/tT4Z1ChGyMNymdIlQy5oXBdpsKUtVpPQPdQfnLkwcQ+WsPrC Sors7pM8Z294Ql8Hl3GQUUjsmwIPIDCD7xNgycdZSjctjSkjWFhUI7YoEdwnU7IIGiHH Nslf7KxxbEC8KmndbwX6IOkkG0IoAkBnz2FT9rndB9a35EeXT//16PgBvO0RTo3C7VQW N34mQkc+p1ZuKZO12rWE6LOmlSsvD8qqXpw9syRts+SP2FVgRzQpJ3PPOnndD6Hfbh28 8cfG2hwevIdUcjyOJ8H7jJHJGNi2PmBPPDdEwinO/76uzAGYMNp+IJV1G3hFsNZ6UHdT rCUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=k7XYpU9R7D7lRPSLZGZNSTziv48X0vFROchyMfse9o4=; b=hIVpReB1F0576zt/0mnOEUghsc0kUFYvTtQ/+2gJ1ADpoPWfY20EuVVQIsxN53U49F 3SLBUyIX+H6V6u9jio63igQn9aNYexD70qsILiJ52cDt1JDq+ost97Qge2ao0OBXy5b+ xI0jPzrWJv8cYnuN+GgQzzkWpM7BLHkvSH2HCQunMpjyhSuFYTm//+m0AgUlVR8Kjjvk Nuft01rntbqiJIpenAKyT10vjUMTreQhGS/6DT9Kd4ZaD6UM4U80LhrMNmoRYPtXujOp cBMngEmZ+wVz80Eoo0BIetsQpkXhJAZ7iEG67OTOHjygLKQJWkPlxlCCuAPj50e/al+w 8WMw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f15si14977074plr.144.2019.01.22.09.59.26; Tue, 22 Jan 2019 09:59:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726779AbfAVR5l (ORCPT + 99 others); Tue, 22 Jan 2019 12:57:41 -0500 Received: from muru.com ([72.249.23.125]:34712 "EHLO muru.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725950AbfAVR5b (ORCPT ); Tue, 22 Jan 2019 12:57:31 -0500 Received: from hillo.muru.com (localhost [127.0.0.1]) by muru.com (Postfix) with ESMTP id EDE56814C; Tue, 22 Jan 2019 17:57:37 +0000 (UTC) From: Tony Lindgren To: linux-kernel@vger.kernel.org Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Andy Shevchenko , Bartosz Golaszewski , Daniel Lezcano , "H . Nikolaus Schaller" , Keerthy , Ladislav Michl , Pavel Machek , Sebastian Reichel , Tero Kristo , Thierry Reding , Thomas Gleixner Subject: [PATCH 2/3] bus: ti-sysc: Fix timer handling with drop pm_runtime_irq_safe() Date: Tue, 22 Jan 2019 09:57:16 -0800 Message-Id: <20190122175717.13428-3-tony@atomide.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190122175717.13428-1-tony@atomide.com> References: <20190122175717.13428-1-tony@atomide.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") started producing a warning for pwm-omap-dmtimer: WARNING: CPU: 0 PID: 77 at drivers/bus/omap_l3_noc.c:147 l3_interrupt_handler+0x2f8/0x388 44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4PER2 (Idle): Data Access in Supervisor mode during Functional access ... __pm_runtime_idle omap_dm_timer_disable pwm_omap_dmtimer_start pwm_omap_dmtimer_enable pwm_apply_state pwm_vibrator_start pwm_vibrator_play_work This is because the timer that pwm-omap-dmtimer is using is now being probed with ti-sysc interconnect target module instead of omap_device and the ti-sysc quirk for SYSC_QUIRK_LEGACY_IDLE is not fully compatible with what omap_device has been doing. We could fix this by reverting the timer changes and have the timer probe again with omap_device. Or we could add more quirk handling to ti-sysc driver. But as these options don't work nicely as longer term solutions, let's just make timers probe with ti-sysc without any quirks. To do this, all we need to do is remove quirks for timers for ti-sysc, and drop the bogus pm_runtime_irq_safe() flag for timer-ti-dm. We should not use pm_runtime_irq_safe() anyways for drivers as it will take a permanent use count on the parent device blocking the parent devices from idling and has been forcing ti-sysc driver to use a quirk flag. Note that we will move the timer data to DEBUG section later on in clean-up patches. Fixes: 84badc5ec5fc ("ARM: dts: omap4: Move l4 child devices to probe them with ti-sysc") Cc: Andy Shevchenko Cc: Bartosz Golaszewski Cc: Daniel Lezcano Cc: H. Nikolaus Schaller Cc: Keerthy Cc: Ladislav Michl Cc: Pavel Machek Cc: Sebastian Reichel Cc: Tero Kristo Cc: Thierry Reding Cc: Thomas Gleixner Reported-by: H. Nikolaus Schaller Signed-off-by: Tony Lindgren --- drivers/bus/ti-sysc.c | 4 ++-- drivers/clocksource/timer-ti-dm.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -879,10 +879,10 @@ static const struct sysc_revision_quirk sysc_revision_quirks[] = { SYSC_QUIRK("smartreflex", 0, -1, 0x38, -1, 0x00000000, 0xffffffff, SYSC_QUIRK_LEGACY_IDLE), SYSC_QUIRK("timer", 0, 0, 0x10, 0x14, 0x00000015, 0xffffffff, - SYSC_QUIRK_LEGACY_IDLE), + 0), /* Some timers on omap4 and later */ SYSC_QUIRK("timer", 0, 0, 0x10, -1, 0x4fff1301, 0xffffffff, - SYSC_QUIRK_LEGACY_IDLE), + 0), SYSC_QUIRK("uart", 0, 0x50, 0x54, 0x58, 0x00000052, 0xffffffff, SYSC_QUIRK_LEGACY_IDLE), /* Uarts on omap4 and later */ diff --git a/drivers/clocksource/timer-ti-dm.c b/drivers/clocksource/timer-ti-dm.c --- a/drivers/clocksource/timer-ti-dm.c +++ b/drivers/clocksource/timer-ti-dm.c @@ -868,7 +868,6 @@ static int omap_dm_timer_probe(struct platform_device *pdev) timer->pdev = pdev; pm_runtime_enable(dev); - pm_runtime_irq_safe(dev); if (!timer->reserved) { ret = pm_runtime_get_sync(dev); -- 2.20.1