Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp405246pxu; Tue, 1 Dec 2020 14:25:59 -0800 (PST) X-Google-Smtp-Source: ABdhPJyB7/yL+9wlzhQYihg7PwXq0Siq/h0BtioD5cPGsbUnQ9d1Ls9XkwUUYkZWLiDqS7uH7UmH X-Received: by 2002:a17:906:3513:: with SMTP id r19mr3893783eja.445.1606861559664; Tue, 01 Dec 2020 14:25:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1606861559; cv=none; d=google.com; s=arc-20160816; b=Ry+pfPPkJwnGcLLxLU1xw8fqBlYY0RtVBxQtboMDcEH9nupqCiLBoFNAfzBl8kEuKt SjDxJBW2DNO5Iv1ZsWjEF2Ade6rMbVZ/LFEgTN5ve1ZUPzjXSNIxxcl0hYY3ThpwiKtw paN7jXyNQLx0Nxkxb04mjiwcQ7jQdpByrTjpbG6kLEdV58ZLgMlvRVeYuiJw3oHXQ0Iz YVuDHpNm/tX/ffXozCWr4Lba7OkaNosK3WVN8vZni79ZKfo7YFn9kEp1p//UFeLQGCL3 lVawgn+nr4vM+5wNNa9EiJsJ/G3J84/VWfvgnZSOBFSbRj0oQlcTEhzxlc9g/ja19OW0 vbgQ== 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=o59hHQcpzvFxbPb+4FZl/Eb8a/bRWTp2USHvl0mGF+I=; b=jMgxmH5qxwwxhBfiCdR03O5VCY+PvMwFMVX2SRYCaebJ7/XE79R6VNTzN1Ze+bYUo1 4gQbYic2nnddf3jNm7gwXKroqhRXH9jZUZK8B7psyGO2+jWX3orSx08qrvw74wtMIo/h QUlgrEuxhHSg6sTwNGdD5Om17bRpZBFGnQZ9tl4Zt7HLpuKlM20lk1iX7SxkCYALj0vr 4wHnKO1040SaqEg4XKd9e3as+k5sKe4P5/3LXxZ1bcgQ6kd70/u+4ClRXgOv83Ehhu5g nu6CVo8JP2j3BKwwCBS/LvCq6+w+jDqnCQuEjixrQK/Eqjkmzg9xZLg5p/vIAVwfL++7 jLwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=ZW6XffHr; 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 ck15si786060ejb.659.2020.12.01.14.25.37; Tue, 01 Dec 2020 14:25:59 -0800 (PST) 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=ZW6XffHr; 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 S2389743AbgLAJKk (ORCPT + 99 others); Tue, 1 Dec 2020 04:10:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:47718 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389725AbgLAJKf (ORCPT ); Tue, 1 Dec 2020 04:10:35 -0500 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8BF9F206D8; Tue, 1 Dec 2020 09:10:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1606813820; bh=0ClhIdJhCWwDi+qydXSoja2ZLD5laYbrdfwjbDwa4TI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZW6XffHr9O1qRFCFNDBNARrdDNiahhXF/ZGW43/yER6tx2NSFqjSmEFLyllPAwGFo jEfycHujOMGROFSZwe0bG4pkjHWLq6YmrK6wf9ufIjKu0lFAaT7AgvvZ9gB9qPq5S5 uV0dNuHhXuYm1qtF90gVr2Gv4Co9rDlzu07AIEtM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Grygorii Strashko , Tony Lindgren , Sasha Levin Subject: [PATCH 5.9 070/152] bus: ti-sysc: Fix bogus resetdone warning on enable for cpsw Date: Tue, 1 Dec 2020 09:53:05 +0100 Message-Id: <20201201084721.107677622@linuxfoundation.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201084711.707195422@linuxfoundation.org> References: <20201201084711.707195422@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 e7ae08d398e094e1305dee823435b1f996d39106 ] Bail out early from sysc_wait_softreset() just like we do in sysc_reset() if there's no sysstatus srst_shift to fix a bogus resetdone warning on enable as suggested by Grygorii Strashko . We do not currently handle resets for modules that need writing to the sysstatus register. If we at some point add that, we also need to add SYSS_QUIRK_RESETDONE_INVERTED flag for cpsw as the sysstatus bit is low when reset is done as described in the am335x TRM "Table 14-202 SOFT_RESET Register Field Descriptions" Fixes: d46f9fbec719 ("bus: ti-sysc: Use optional clocks on for enable and wait for softreset bit") Suggested-by: Grygorii Strashko Acked-by: Grygorii Strashko Signed-off-by: Tony Lindgren Signed-off-by: Sasha Levin --- drivers/bus/ti-sysc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/bus/ti-sysc.c b/drivers/bus/ti-sysc.c index 88a751c11677b..16132e6e91f8d 100644 --- a/drivers/bus/ti-sysc.c +++ b/drivers/bus/ti-sysc.c @@ -227,6 +227,9 @@ static int sysc_wait_softreset(struct sysc *ddata) u32 sysc_mask, syss_done, rstval; int syss_offset, error = 0; + if (ddata->cap->regbits->srst_shift < 0) + return 0; + syss_offset = ddata->offsets[SYSC_SYSSTATUS]; sysc_mask = BIT(ddata->cap->regbits->srst_shift); -- 2.27.0