Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3771011pxt; Tue, 10 Aug 2021 10:56:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzAG3KQ8UZGBXbC0IsVvkJl2JqYiJEJmeKyZXasWODbe1IYc7nNLVuJIQKcJ3RmQ4mOSrUa X-Received: by 2002:a05:6602:48c:: with SMTP id y12mr214430iov.14.1628618213745; Tue, 10 Aug 2021 10:56:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628618213; cv=none; d=google.com; s=arc-20160816; b=gepAZu43Tk2O7nGvMhcVlwEoeYcToqf3LyaD1qdVpYsJtRskdOvdNvi6rzOn6ul/RB mzSkX4mEESdevHmPCc9S1xQn2fU/UJTqrYvMCoZR6OpJowF23cNXTosaGL/eVK9lcY7h DO01ca91PjA2nr1F8aSa/M4IYLfWO3sb2xKBwgoMBF+JVDRfhc2IFQK8G53TDMCuW/cX q+vxRJqNAL1/WYXYVhQ5gb0orFQ+DaIiAn75M892bCVEold/rGMFZsmEe0lZz8kIf98Y rHcBfWDX6Nc1J4usi6gJ4n8hkcvB63CVRHg/Y6YcJKc3WGEcAk4jg5GSaJTjIWNSiv9z uf+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=dpEjcVOFkQ+rFuGX7ts+6PwS6m3s3GqljHMs7aweZdA=; b=tCL9rAVdwiMpX01kVIKF8R4nXv7HqGu6Z3YJxFqI9VVeyNQT6+X+ENQxZoBM1m+4qH 8p5UHtuiiY/jWTRjwGX/Tj+5ZD+ZuZKUYwd73nGxm5FG2aOh+pjkCaG9pX5GSvxCNhuR mDT7vSCyTsAgEFQpYEhEWlqicbxj770wJwkCorNxmo42/lV39jwxm52qpi/c2fH8Hy8f RS5x/jVirKFEH9Z5/B8OXuAOPANDFyDdTOIVbBADY4T7pf0PgHSPoo0b1MoWhQ5QUTQF OpWUdxi5MelxAaWOcDGKhj1qbqv4XdJ3gAbfBs3XAT+7KOjMiaHhqQl00PRlNNcsyjEC DXBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UxU94BHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h14si9730945ile.129.2021.08.10.10.56.39; Tue, 10 Aug 2021 10:56:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=UxU94BHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236602AbhHJRyL (ORCPT + 99 others); Tue, 10 Aug 2021 13:54:11 -0400 Received: from mail.kernel.org ([198.145.29.99]:43224 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237314AbhHJRuW (ORCPT ); Tue, 10 Aug 2021 13:50:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C41E661102; Tue, 10 Aug 2021 17:42:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1628617360; bh=t9agUHMW1JmVb1vHEqFze5voBLUIKw26fzmU3qQwKCY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=UxU94BHAVC7oJ/jFO2GFgqIKtdh1QoYKt8JmUckvlzy4MsZc+SYhzZqVuRbwpxD75 RHL39N+eA7x7yyx+fzyiBkJu5L+E3Js2ecaZnlpDQDjjkiCla8SBuvP3ZMWWAM6Pij UiiL1h7qSal75GUqvu3KW5fZFGfFxlasdMM1EoD4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Jarkko Nikula , Tony Lindgren , Sasha Levin Subject: [PATCH 5.13 003/175] bus: ti-sysc: Fix gpt12 system timer issue with reserved status Date: Tue, 10 Aug 2021 19:28:31 +0200 Message-Id: <20210810173001.053486118@linuxfoundation.org> X-Mailer: git-send-email 2.32.0 In-Reply-To: <20210810173000.928681411@linuxfoundation.org> References: <20210810173000.928681411@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit 3ff340e24c9dd5cff9fc07d67914c5adf67f80d6 ] Jarkko Nikula reported that Beagleboard revision c2 stopped booting. Jarkko bisected the issue down to commit 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4"). Let's fix the issue by tagging system timers as reserved rather than ignoring them. And let's not probe any interconnect target module child devices for reserved modules. This allows PM runtime to keep track of clocks and clockdomains for the interconnect target module, and prevent the system timer from idling as we already have SYSC_QUIRK_NO_IDLE and SYSC_QUIRK_NO_IDLE_ON_INIT flags set for system timers. Fixes: 6cfcd5563b4f ("clocksource/drivers/timer-ti-dm: Fix suspend and resume for am3 and am4") Reported-by: Jarkko Nikula Tested-by: Jarkko Nikula Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 38cb116ed433..188cdb0a394e 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -100,6 +100,7 @@ static const char * const clock_names[SYSC_MAX_CLOCKS] = { * @cookie: data used by legacy platform callbacks * @name: name if available * @revision: interconnect target module revision + * @reserved: target module is reserved and already in use * @enabled: sysc runtime enabled status * @needs_resume: runtime resume needed on resume from suspend * @child_needs_resume: runtime resume needed for child on resume from suspend @@ -130,6 +131,7 @@ struct sysc { struct ti_sysc_cookie cookie; const char *name; u32 revision; + unsigned int reserved:1; unsigned int enabled:1; unsigned int needs_resume:1; unsigned int child_needs_resume:1; @@ -3093,8 +3095,8 @@ static int sysc_probe(struct platform_device *pdev) return error; error = sysc_check_active_timer(ddata); - if (error) - return error; + if (error == -EBUSY) + ddata->reserved = true; error = sysc_get_clocks(ddata); if (error) @@ -3130,11 +3132,15 @@ static int sysc_probe(struct platform_device *pdev) sysc_show_registers(ddata); ddata->dev->type = &sysc_device_type; - error = of_platform_populate(ddata->dev->of_node, sysc_match_table, - pdata ? pdata->auxdata : NULL, - ddata->dev); - if (error) - goto err; + + if (!ddata->reserved) { + error = of_platform_populate(ddata->dev->of_node, + sysc_match_table, + pdata ? pdata->auxdata : NULL, + ddata->dev); + if (error) + goto err; + } INIT_DELAYED_WORK(&ddata->idle_work, ti_sysc_idle); -- 2.30.2