From patchwork Mon Jan 18 08:57:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: KuoHsiang Chou X-Patchwork-Id: 12026791 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B7F89C433DB for ; Mon, 18 Jan 2021 08:58:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1DDE822228 for ; Mon, 18 Jan 2021 08:58:15 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1DDE822228 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=aspeedtech.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9351D89C52; Mon, 18 Jan 2021 08:58:14 +0000 (UTC) Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by gabe.freedesktop.org (Postfix) with ESMTPS id 92A2989C52 for ; Mon, 18 Jan 2021 08:58:12 +0000 (UTC) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 10I8qj7E044071; Mon, 18 Jan 2021 16:52:45 +0800 (GMT-8) (envelope-from kuohsiang_chou@aspeedtech.com) Received: from localhost.localdomain.com (192.168.2.206) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 18 Jan 2021 16:58:03 +0800 From: KuoHsiang Chou To: , , Subject: [PATCH] drm/ast: Update the sequence of Clearing Fast-reset Date: Mon, 18 Jan 2021 16:57:55 +0800 Message-ID: <20210118085755.107804-1-kuohsiang_chou@aspeedtech.com> X-Mailer: git-send-email 2.18.4 MIME-Version: 1.0 X-Originating-IP: [192.168.2.206] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 10I8qj7E044071 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, tommy_huang@aspeedtech.com, jenmin_yuan@aspeedtech.com, airlied@redhat.com, arc_sung@aspeedtech.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" [Bug][AST2500] If SCU00 is not unlocked, just enter its password again. It is unnecessary to clear AHB lock condition and restore WDT default setting again, before Fast-reset clearing. Signed-off-by: KuoHsiang Chou --- drivers/gpu/drm/ast/ast_post.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) -- 2.18.4 diff --git a/drivers/gpu/drm/ast/ast_post.c b/drivers/gpu/drm/ast/ast_post.c index 1f0007daa005..4f194c5fd2c2 100644 --- a/drivers/gpu/drm/ast/ast_post.c +++ b/drivers/gpu/drm/ast/ast_post.c @@ -2030,7 +2030,6 @@ void ast_patch_ahb_2500(struct ast_private *ast) { u32 data; -patch_ahb_lock: /* Clear bus lock condition */ ast_moutdwm(ast, 0x1e600000, 0xAEED1A03); ast_moutdwm(ast, 0x1e600084, 0x00010000); @@ -2044,11 +2043,9 @@ void ast_patch_ahb_2500(struct ast_private *ast) ast_moutdwm(ast, 0x1E78500c, 0x00000033); udelay(1000); } - ast_moutdwm(ast, 0x1e6e2000, 0x1688A8A8); do { + ast_moutdwm(ast, 0x1e6e2000, 0x1688A8A8); data = ast_mindwm(ast, 0x1e6e2000); - if (data == 0xffffffff) - goto patch_ahb_lock; } while (data != 1); ast_moutdwm(ast, 0x1e6e207c, 0x08000000); /* clear fast reset */ }