From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CAC45C54E66 for ; Wed, 13 Mar 2024 14:33:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=VTOeCkI7z+ZPeQzEuaN4M38BD4lCiMYFi+TOOEbqSe8=; b=UqtJhPLRPahtjr Z2PlvHfdPha48Hc1FPbRnICCb4tMyYIx1WmkWdbO5/OXyScfFra7aJEbMy3Pq8a1Vld3qXs2SgA2S RRAwa7sKmKYyZMb8fCC1r8njbneuvD6NKA80L334cSmagP1jWg1JZXliXFCk9zZFiSfmuWA0dDpfg LZ6o55srQRyg8JIUZsD/6QUBkzRQTD0WhiIw+n+LGHQ+MhzPWzjvGgmgyzWRWAnXXfDNB9B8zBEqa oU1CooCUwcHCd7a02392lZpbfDhK28AN61RiPYChDeHy+uHcJmVjAIx5pkhOOM5mu6fMjfZstt5me XOSUVuxRg7sHoGFbfRbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkPfQ-0000000AQxj-2rsG; Wed, 13 Mar 2024 14:33:16 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rkPfL-0000000AQvE-4140 for linux-arm-kernel@lists.infradead.org; Wed, 13 Mar 2024 14:33:14 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2d41f33eb05so65923251fa.0 for ; Wed, 13 Mar 2024 07:33:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1710340390; x=1710945190; darn=lists.infradead.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from:from:to:cc :subject:date:message-id:reply-to; bh=frZJGewZzeJ3uIeDRmngnvwGZFXy0aAqB4wzRWvuYFc=; b=cR7l25oAUD+jDT2J0uLlu25NN6KQdsuCMmDHdpWnaIklK009P0xWSPimsq9D8GfmTt 82r4YgUmCnqOVjqK6uRDT4/OFi+mQqamSkejxI31kM1uM1zs9gTAGxvxQqfM6u+63dns RThxA/vSUbXDdzUyuguvpR3S9/6rouX7Jvl7528wd5smTGEGN+ZayaCXyWE1+3o9M7yk C6P6rqtd+42vo8Sb281iNV8RGWXW2Dmp7nF0zBPoD2Wg67vLO3ta0FNeqZxvH1lI5w2Q v8dldhtYSxoywxZmNMukMGYVS8GYtIOiPSI1vzgQLTl9UIsPU/lPJ9RJB9psSlwIogSH IOnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710340390; x=1710945190; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:date:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=frZJGewZzeJ3uIeDRmngnvwGZFXy0aAqB4wzRWvuYFc=; b=doHhLCcOyiogDQlnxckczQBd1Gos5b9LobOvpIeHC0Dny7nMuyjBi41QK6AZK6lsI0 tmLsX1COKcwEl7gznSf8o8+AkAeUbHA/Gix9jMeBozOyPYj8blib3UXhiOKlW3r2L7sA kCkehmYYMDnTN8WOxF4bm+dabY+xig0hr5oQmMZWYo8wpO+e/SrwsZGC9mqYbevi86k7 18fQLtTFjcNojj26woKgACEUhlOhC4ZpkRghnIquQeI1Z3iXRcvkczDc8uAJpeF4pcKy mEizZlDVo59YbSJJKm5p3KZDD7hXpwonHXdUnEujMsoKQXYM5XLVFuCiP/KbS7uSPFEN fs/g== X-Forwarded-Encrypted: i=1; AJvYcCV5MKfwKkH5Q4o3zJH6HQBYGqWbEDzvynmaZCqj+8qLuecXPa1RIruOKZis9FNr6S7B2H1biZPc6Z43/pdB4vlBxtVC9U3Ut3KgLKlLfeVbIz6h17E= X-Gm-Message-State: AOJu0Yw2FHrM+oDjapeskIsehOxnpUDo2HRWyCD4bpPVU7i5sSImDg9I jppQUBxRbEkzp/78wNzRXhCaEiHVh5ZiFFcgQpyynD2Xbi1HAzXXjRNNZd/MLWU= X-Google-Smtp-Source: AGHT+IGc4/OG230i0WuTH+DEgo3X/n2bWgA2QDnELN/LQ+c+BqGPSX+yI/RIu0rb7SkOm+km48FmGA== X-Received: by 2002:a2e:8e89:0:b0:2d2:d449:6425 with SMTP id z9-20020a2e8e89000000b002d2d4496425mr8400526ljk.35.1710340389826; Wed, 13 Mar 2024 07:33:09 -0700 (PDT) Received: from localhost (host-82-56-173-172.retail.telecomitalia.it. [82.56.173.172]) by smtp.gmail.com with ESMTPSA id lb13-20020a170906adcd00b00a46203a86basm3476615ejb.27.2024.03.13.07.33.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 07:33:09 -0700 (PDT) From: Andrea della Porta X-Google-Original-From: Andrea della Porta Date: Wed, 13 Mar 2024 15:33:08 +0100 To: Dave Stevenson Cc: Andrea della Porta , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Saenz Julienne , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v2 00/15] dmaengine: bcm2835: add BCM2711 40-bit DMA support Message-ID: Mail-Followup-To: Dave Stevenson , Andrea della Porta , Vinod Koul , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Florian Fainelli , Ray Jui , Scott Branden , Broadcom internal kernel review list , Saenz Julienne , dmaengine@vger.kernel.org, devicetree@vger.kernel.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240313_073312_078900_58DB655A X-CRM114-Status: GOOD ( 47.74 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 17:16 Tue 12 Mar , Dave Stevenson wrote: > Hi Andrea > > On Tue, 12 Mar 2024 at 09:12, Andrea della Porta wrote: > > > > * Spam * > > The BCM2711 has 4 DMA channels with a 40-bit address range, allowing them > > to access the full 4GB of memory on a Pi 4. > > This patchset aims to update the dma engine for BCM* chipset with respect > > to current advancements in downstream vendor tree. In particular, it > > supports the BCM2711 DMA engine in terms of extended DMA addressing to 40 bit. > > > > Changes with respect to the first version (see [1]) of this patchset: > > > > * dropped support of the new BCM2712. It will be the focus of a subsequent > > patch. > > > > * merged patchset from Stefan Wahren [2] to support newer chipset with a > > platform agnostic design, while also retaining the new features added > > from downstream [1], as follows: > > > > - patches from 1 to 5 are preparatory, adding some features and bugfix > > common to all chipsets. > > - patches from 6 to 12 add hw abstraction > > - patches 13 to 15 eventually add 40 bit and BCM2711 support > > > > * fixed a couple of bugs from [2] relative to address shifting on 40 bit > > support specific code > > > > * added the relevant entries in the dts and DT binding that was missing > > in the first patch > > > > * used FIELD_PREP() wherever appropriate as advised in [3] > > > > * of_match_node() has been replaced by the more generic device_get_match_data(), > > as per [4] > > > > * fixed several errors and warnings from checkpatch > > > > > > Please note that there is still a pending discussion around here [5]: > > this patch still use the current approach (used in both downstream > > code and in Stefan's redesigned patchset) of getting the address as it is > > (dma_addr_t) and just add the relevant offset when needed (on 40 bit > > channel, see .addr_offset in struct bcm2835_dma_cfg). This is not > > optimal but still deemed as less hacky than using DMA internals (see > > [6]). As soon as there will be guidelines for [5] or dma_map_resource() > > will take care of dma_ranges, a subsequent patch will adjust accordingly. > > > > Since there is an ongoing effort from Dave Stevenson to upstream a > > patchset with similar goals, I'm adding him to the email loop in order > > seek for collaboration. > > Please hold fire on these patches until we resolve the dma-ranges question. > If the dma-ranges are defined correctly, then the cb_offset is not > required as the mapping deals with it. > > At present we have a mess with the 32bit DMA controllers, and need to > clean it up whilst still having old DT files work. Fixing it up also > requires fixing the DMA users (primarily MMC, SPI, and vc4 HDMI > audio), so will need some care over patch ordering to avoid > regressions. > If at all possible then I would like to avoid the same mess on the 40 > bit controllers too. > I agree with you: I've just sent the entire patchset again for consistency since I had an unlucky issue with the internal imap server that results in the patchset to be splitted and to be *not* received by all intended recipients. I saw that you were one of those so I apologize for the inconvenience. I'll wait for any guidelines regarding dmap_map_resource() and how to proceed about that. Many thanks, Andrea > Thanks > Dave > > FWIW my work in progress branch is currently > https://github.com/6by9/linux/tree/mainline_2712_rp1_dma_vc4_rc5, > which includes my fixed up set of Stefan's patches, as well as all the > other patches that need working on for Pi5 support upstream. > > > Many thanks, > > > > Andrea > > > > Links: > > [1] https://lore.kernel.org/linux-arm-kernel/cover.1706948717.git.andrea.porta@suse.com/ > > [2] https://lore.kernel.org/linux-arm-kernel/13ec386b-2305-27da-9765-8fa3ad71146c@i2se.com/T/ > > [3] https://lore.kernel.org/linux-arm-kernel/YguMW8n1q0ZV5tKH@matsya/ > > [4] https://lore.kernel.org/linux-arm-kernel/1e71c153-e482-409c-b229-9b9c0662b67e@arm.com/ > > [5] https://lore.kernel.org/all/CAPY8ntByJYzSv0kTAc1kY0Dp=vwrzcA0oWiPpyg7x7_BQwGSnA@mail.gmail.com/ > > [6] https://lkml.org/lkml/2024/2/5/1161 > > > > Andrea della Porta (11): > > dmaengine: bcm2835: Fix several spellos > > dmaengine: bcm2835: Support common dma-channel-mask > > dmaengine: bcm2835: move CB info generation into separate function > > dmaengine: bcm2835: move CB final extra info generation into function > > dmaengine: bcm2835: make address increment platform independent > > dmaengine: bcm2385: drop info parameters > > dmaengine: bcm2835: pass dma_chan to generic functions > > dmaengine: bcm2835: introduce multi platform support > > dt-bindings: dma: Added bcm2711-dma > > dmaengine: bcm2835: Add BCM2711 40-bit DMA support > > ARM: dts: bcm2711: add bcm2711-dma node > > > > Dom Cobley (2): > > dmaengine: bcm2835: Support dma flags for multi-beat burst > > dmaengine: bcm2835: Fixes for dma_abort > > > > Phil Elwell (2): > > dmaengine: bcm2835: Add support for per-channel flags > > dmaengine: bcm2835: Add NO_WAIT_RESP, DMA_WIDE_SOURCE and > > DMA_WIDE_DEST flag > > > > .../bindings/dma/brcm,bcm2835-dma.yaml | 4 +- > > arch/arm/boot/dts/broadcom/bcm2711.dtsi | 16 + > > drivers/dma/bcm2835-dma.c | 1084 +++++++++++++---- > > 3 files changed, 892 insertions(+), 212 deletions(-) > > > > -- > > 2.35.3 > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel