Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2193092iof; Tue, 7 Jun 2022 22:46:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7wsNzkrGLwczt2VAQKgbgjjnQ4w+xlPght4rF8eOYb5fi1sFeZD0iq0ENZTBqqtSHNenp X-Received: by 2002:a17:902:700b:b0:167:736e:cfb1 with SMTP id y11-20020a170902700b00b00167736ecfb1mr16352882plk.36.1654667183550; Tue, 07 Jun 2022 22:46:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667183; cv=none; d=google.com; s=arc-20160816; b=GHrHuS7YH7hLJfKGj5n7EPOTV4OydYQmAa4Oe+VjRV4xYfDOktwtRnrghKlgsQK5BH tE0bvKfb1mapA+odAmCZSOb9dfWjq8ZZK2XtcdI8xxyPoHnDgcmTR2WA00bRA7EI6LB4 65dz7VD5vTPc2WVw729st9cau2tVVO23nJ8UfdWAJ0aN6WlQLBzbElzeUX3TAkxYFde3 wPiMWjKQIfqbqq+plurULxC+qMVex0ITFv9ahow0Re59lYuot2q5QNMAMjqeWwCJv6l8 BsmPbWGgU05rHv9ccjCq8t/GGJVz0tE+nzzyeYz6AKwvuP4k/W2tSzlRZzV4Otg/jnIl yLIg== 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=irfLvEGQ7mIxflkiMB7aX6FdcZHX4V/S7d8SJ/Bjv+g=; b=nxKbl/h4KSw3ydgkSeCkblUDDav7vjGC94bKERXUPY9xn0ao+U/yodcm/kHJXcY7V9 ixuN/zPesZ+TJlww7fvxoErDlV9P0/NxdYyhZV7rBwMJJY1F3cCtjWf31cIhH7m3oDXH 9WPyDC6BxazPDq4Errtqf57reFFMTsqsHF8OPcRnF4A24hnnZFipE/1tv2NRGP4EC5k1 qyuJd6SC4vph9JAmerYRJA0S24gIHTa/8V6aC/PimPsknyUZuTsog7+D4xsrJpGWx0/M VMhr6RTm1fUBjrojp5mIPEFNR5k4/dggCvOr1IUkD9i0r5lnkDz2IeZZvCYC6bNGMBie M6vQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M03/mwnp"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id h184-20020a636cc1000000b003fcb1ba3c4fsi27815042pgc.313.2022.06.07.22.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:46:23 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="M03/mwnp"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6F9BC49AC1D; Tue, 7 Jun 2022 22:11:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385169AbiFHAZS (ORCPT + 99 others); Tue, 7 Jun 2022 20:25:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38174 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383688AbiFGWGJ (ORCPT ); Tue, 7 Jun 2022 18:06:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F27F92514AB; Tue, 7 Jun 2022 12:17:01 -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 ams.source.kernel.org (Postfix) with ESMTPS id ADE5AB823CB; Tue, 7 Jun 2022 19:17:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 21CE8C385A2; Tue, 7 Jun 2022 19:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629419; bh=7KN8uRaeQcpVN+0rNVaoPmKdTmXoHugOhRncylZCzQw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M03/mwnpywfsZ5McoSzzvshfVhg4oIxlK+2mBfHsWQ+oU6zUDBuH0j272DnpVZTKZ 9tSHNPPanlyGMb4BKj2/ZZbv+7S4OlTHqdMfkqqWsMLqnMRVCJYQ1DfbwTCWzlLbsB 0eqtRfg87hSZ4btSrNBXJjVZ6twlZz6yogJT7WeU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Amelie Delaunay , Vinod Koul , Sasha Levin Subject: [PATCH 5.18 685/879] dmaengine: stm32-mdma: remove GISR1 register Date: Tue, 7 Jun 2022 19:03:23 +0200 Message-Id: <20220607165022.729061658@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: Amelie Delaunay [ Upstream commit 9d6a2d92e450926c483e45eaf426080a19219f4e ] GISR1 was described in a not up-to-date documentation when the stm32-mdma driver has been developed. This register has not been added in reference manual of STM32 SoC with MDMA, which have only 32 MDMA channels. So remove it from stm32-mdma driver. Fixes: a4ffb13c8946 ("dmaengine: Add STM32 MDMA driver") Signed-off-by: Amelie Delaunay Link: https://lore.kernel.org/r/20220504155322.121431-2-amelie.delaunay@foss.st.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/stm32-mdma.c | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c index 6f57ff0e7b37..1e6bc22ddae9 100644 --- a/drivers/dma/stm32-mdma.c +++ b/drivers/dma/stm32-mdma.c @@ -34,7 +34,6 @@ #include "virt-dma.h" #define STM32_MDMA_GISR0 0x0000 /* MDMA Int Status Reg 1 */ -#define STM32_MDMA_GISR1 0x0004 /* MDMA Int Status Reg 2 */ /* MDMA Channel x interrupt/status register */ #define STM32_MDMA_CISR(x) (0x40 + 0x40 * (x)) /* x = 0..62 */ @@ -168,7 +167,7 @@ #define STM32_MDMA_MAX_BUF_LEN 128 #define STM32_MDMA_MAX_BLOCK_LEN 65536 -#define STM32_MDMA_MAX_CHANNELS 63 +#define STM32_MDMA_MAX_CHANNELS 32 #define STM32_MDMA_MAX_REQUESTS 256 #define STM32_MDMA_MAX_BURST 128 #define STM32_MDMA_VERY_HIGH_PRIORITY 0x3 @@ -1322,21 +1321,11 @@ static irqreturn_t stm32_mdma_irq_handler(int irq, void *devid) /* Find out which channel generates the interrupt */ status = readl_relaxed(dmadev->base + STM32_MDMA_GISR0); - if (status) { - id = __ffs(status); - } else { - status = readl_relaxed(dmadev->base + STM32_MDMA_GISR1); - if (!status) { - dev_dbg(mdma2dev(dmadev), "spurious it\n"); - return IRQ_NONE; - } - id = __ffs(status); - /* - * As GISR0 provides status for channel id from 0 to 31, - * so GISR1 provides status for channel id from 32 to 62 - */ - id += 32; + if (!status) { + dev_dbg(mdma2dev(dmadev), "spurious it\n"); + return IRQ_NONE; } + id = __ffs(status); chan = &dmadev->chan[id]; if (!chan) { -- 2.35.1