Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp2553943iob; Fri, 6 May 2022 05:38:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy8vI2QsF5L3azexqynGLvnxqMMs9X3sG2NQmEZjA7ybLw76eQZMjM8oQbYVgMVILWI/BNs X-Received: by 2002:a65:6d16:0:b0:3c1:b056:5f5a with SMTP id bf22-20020a656d16000000b003c1b0565f5amr2556281pgb.469.1651840733307; Fri, 06 May 2022 05:38:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651840733; cv=none; d=google.com; s=arc-20160816; b=Aqoeb/KmhEhHgsLbcTU7TyW2iyaY5Oah1l6gzY4g/OYoDjB5cHda/Qjfj1eJmEWefl +92tJPAa8EO3awMiEQCVp9VZ31iXGcPOSk0TOG2MGBZ6ULBcdm6z3zIpT/IiKR7XJQ0f n/W9k4l8VqPk77ppkUTVCvi4strk7tLSjoFxFA592kbxwpFZirlqPmrGvxkErqSk3GIQ WwSpSSqLlw1e8do5eMwGmQNpMhJ5tWpcto/q+RbKXg660bNtKHanUgv5Nne5ig73GI7e nkvOU2alJSIqwwIUhQG4CDSdj1K/Y6JuZ+4gk7KIVALzmk2TZA1s1NixMRZbx6Th0qRa c8kA== 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=iWfv/1rsLHKhPSmnqImllOrYPtTJ0805C5at6HHzkG0=; b=EzKn+htCPaQeGN94USUzNeOBAQqMexJoChRJHmaNIY2E/Tlx8BX38avjYjmuH+v5wD Is+8zFKSXZS92Kwa+QVlOmk5ualizGWMcwZOvn9OMJly3AhUX3R7Xl9tGRC6zL6ObEFO GH1usF+RwmvDTvIF55RDgphoIt1SRGt1gxUHBVcW3MaX0fBm79GhW1qHgds7B+ozQCOB wCTZJ24QcHXjrfHdDiznbYbAq6uTmdFK3DV8/8hC4t9Gmq3CYaHM00VGXOqe8xFGiHPH GEt0JIW1Gd1iyFt2v2nKvXwXsIv8/v+X2kmUIEiJIPkjAd5ctcSK3G66xg6N71q8FlO7 VzXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y3KQX+Pk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u125-20020a637983000000b003c17c1b8bedsi4676113pgc.343.2022.05.06.05.38.37; Fri, 06 May 2022 05:38:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=y3KQX+Pk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S1354928AbiEDRFb (ORCPT + 99 others); Wed, 4 May 2022 13:05:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354836AbiEDQ7N (ORCPT ); Wed, 4 May 2022 12:59:13 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4BCB4833F; Wed, 4 May 2022 09:51:04 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 202E16179D; Wed, 4 May 2022 16:51:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70104C385AA; Wed, 4 May 2022 16:51:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1651683063; bh=hNhfB4e2sNzIplw0oD6sriKi2qhMVvrnPGvyqCDnNgg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=y3KQX+PkmPoEjLMMhDNYK5UHzmwd3qzooeTTZ3Wm5Kjd42DqUkoaS1I6MIOkmK2lf 4zxHZrS+Y3YRXt96cOmzREIKhfiOLblZ5IyvZnvDhG12RAJGici3HmVbbcMqt+Qs2l DTtsRCnPbuyR3c3RUO8pLJgx2PXb1/U0jiq87zOk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Kevin Hilman , Tony Lindgren , Sasha Levin Subject: [PATCH 5.10 048/129] bus: ti-sysc: Make omap3 gpt12 quirk handling SoC specific Date: Wed, 4 May 2022 18:44:00 +0200 Message-Id: <20220504153024.927099612@linuxfoundation.org> X-Mailer: git-send-email 2.36.0 In-Reply-To: <20220504153021.299025455@linuxfoundation.org> References: <20220504153021.299025455@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Tony Lindgren [ Upstream commit a12315d6d27093392b6c634e1d35a59f1d1f7a59 ] On beagleboard revisions A to B4 we need to use gpt12 as the system timer. However, the quirk handling added for gpt12 caused a regression for system suspend for am335x as the PM coprocessor needs the timers idled for suspend. Let's make the gpt12 quirk specific to omap34xx, other SoCs don't need it. Beagleboard revisions C and later no longer need to use the gpt12 related quirk. Then at some point, if we decide to drop support for the old beagleboard revisions A to B4, we can also drop the gpt12 related quirks completely. Fixes: 3ff340e24c9d ("bus: ti-sysc: Fix gpt12 system timer issue with reserved status") Reported-by: Kevin Hilman Suggested-by: Kevin Hilman Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 18f0650c5d40..ac559c262033 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -3130,13 +3130,27 @@ static int sysc_check_disabled_devices(struct sysc *ddata) */ static int sysc_check_active_timer(struct sysc *ddata) { + int error; + if (ddata->cap->type != TI_SYSC_OMAP2_TIMER && ddata->cap->type != TI_SYSC_OMAP4_TIMER) return 0; + /* + * Quirk for omap3 beagleboard revision A to B4 to use gpt12. + * Revision C and later are fixed with commit 23885389dbbb ("ARM: + * dts: Fix timer regression for beagleboard revision c"). This all + * can be dropped if we stop supporting old beagleboard revisions + * A to B4 at some point. + */ + if (sysc_soc->soc == SOC_3430) + error = -ENXIO; + else + error = -EBUSY; + if ((ddata->cfg.quirks & SYSC_QUIRK_NO_RESET_ON_INIT) && (ddata->cfg.quirks & SYSC_QUIRK_NO_IDLE)) - return -ENXIO; + return error; return 0; } -- 2.35.1