Received: by 2002:a05:7412:8598:b0:f9:33c2:5753 with SMTP id n24csp289960rdh; Mon, 18 Dec 2023 21:22:04 -0800 (PST) X-Google-Smtp-Source: AGHT+IGWGbZrEd2wx2eo56wHF7z86eWB6c61D8kSYXflBjPnWEn2PXECZfqpf4ciPoWx1nspBLHf X-Received: by 2002:a05:6359:2d81:b0:170:7d81:a325 with SMTP id rn1-20020a0563592d8100b001707d81a325mr10023324rwb.43.1702963324602; Mon, 18 Dec 2023 21:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702963324; cv=none; d=google.com; s=arc-20160816; b=gNhuKb4GFKiGPPEEEl6Ty/2z6T3Z4eK38sWQLR/63UDIGjCCEB1eFXpL2D3nv8S6Dd OitJolJaEpS/ZEyBEYH/3lgX+HUFCusHDEOsDm1HW8qwGbtSJERHHWQvw6Bp0bbt4DOt CA2H7LBxVnmr53CTU2H8HV7zHBUwQTu5cWcYz3nTCLnvqPunWiKvCdaw1/bbqi+vlrLq ik2CERvMuSQlYTkst38N5HPkrDwMeJzJSnWDF8E3hTNxS8mPv3bHaGStnLbrd3JUb16+ n04zj8IQlqEJqTcYIoGkPKv+s0g2PTypPWScn8QofW2KzhIifWwY2L4smJ0KzfV1/YCd Y1QQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:list-unsubscribe:list-subscribe :list-id:precedence:dkim-signature; bh=iXTjzEkw8OFrAh4CNOzzIVMOXEqR1EzYUmovt7erKHQ=; fh=j6DTZt/gdV12KcGLdK3RzsHzQIEBUYWRFQCm3FF+TU8=; b=n33hBbKQSvCAcIQ6wQabOvTdbQxLrvC6ySlh0XbjkewSvi58h4TYW/xPf17hmpr2FC ywjCCZcM/Osn6EtDkK4ebdqu2rSDQUP0G+1Gc0cwJN0qHFZpdBjUVPNVmwiL3gibMHGa WUw1BvzsioKZtu3Pbc6q1Vq0qUJbNm2r5jQ6cq0sJVmF8/PQqxHBMLBPcbzZF9MrQJdz /Q53jshRDnbr9JVRZGduIwUsgFWJJlPKJOddS+hN/6UBx2wlKI1wW2GrqMFyHAQj16fx 4bvFvXuoC3W/Dt+j1OxEX0s4/xJwQfjZzryIyyMllz36/cyuR3Up1cCJFbkjlrd1qVeK KPig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MgRza+71; spf=pass (google.com: domain of linux-kernel+bounces-4712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4712-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id q14-20020a17090a430e00b0028b4a1b2168si584391pjg.148.2023.12.18.21.22.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 21:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=MgRza+71; spf=pass (google.com: domain of linux-kernel+bounces-4712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4712-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id BBA25B237C7 for ; Tue, 19 Dec 2023 05:22:00 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC3C6C2C1; Tue, 19 Dec 2023 05:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="MgRza+71" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6A0D3C135; Tue, 19 Dec 2023 05:21:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-oi1-f196.google.com with SMTP id 5614622812f47-3bb53e20a43so1118644b6e.1; Mon, 18 Dec 2023 21:21:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702963289; x=1703568089; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=iXTjzEkw8OFrAh4CNOzzIVMOXEqR1EzYUmovt7erKHQ=; b=MgRza+71i2NeRIu/XOvCGjjz9jjfDDfOch4D7r2+u0/GoL1A/sq3hyJoqN2jxy0fDK CJSkATY/BoIBhQrLp7u88U0FljSyGkFGTHgWdeI4mUqJAzWUEuhMx6dgUFOJgidzKf3C sENU86tZPgeKDFnGAC6NAbLlUATwpm0vd9A+ABi4oJo46zbPeA8HG3vQhxmkqy797+a4 IKPiP0K6I82RaF8EmQIaRr2PlSSCcH7AKPSoWrOzTfebZvusVLVDqtnokRXDno4WlNUl cWiO4HDxYpXBKUA6LiUJ15l/icdiq9exvTg3iQIy1k/6DBT2Q/6rxGVYRYFRW8dL6BYT Y53Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702963289; x=1703568089; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=iXTjzEkw8OFrAh4CNOzzIVMOXEqR1EzYUmovt7erKHQ=; b=ObdD+uGSfY17zJm9wz+HBaNez+Nt3x/mzzN2s6LUepARmmDGpMfqHc5TwUsLqPuEO0 njC1u9KbVW3zJaZWH02aJrCN9NkH1rTRtEDT/ZMRVft2EKUQGZSyM1e8X3AopokLaOL4 WwADa0zfwprJs3yOBV3EPeTcgmpgxGD1DQUuDC1uXH0+LajExfWbamh4/KvMmOXp4h+1 usmF5055s9GFi6Uf3McFlDZiuhTShhKIGVmyKNaMID4epw6U6S9SC0rD/JKnztoICPjk VmnKzFihCgeDrt6Jq2uJaONSWVr65uqUabNjt/dEOAPm0h5uwgEtP/fwYYJGMK1u97+m cE/Q== X-Gm-Message-State: AOJu0YwsVUXlhdWf1i6Ugiwub3Jq/GU/JuQFnUR2iaYEwLTw7B5d8J3g 8ivJk7JkbI35mn4boB24ZoNqduKp8wwizFUbmLM= X-Received: by 2002:a05:6808:3021:b0:3b8:5e9a:b2bd with SMTP id ay33-20020a056808302100b003b85e9ab2bdmr22236711oib.15.1702963289456; Mon, 18 Dec 2023 21:21:29 -0800 (PST) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 References: <20231102121623.31924-1-kaiwei.liu@unisoc.com> In-Reply-To: From: liu kaiwei Date: Tue, 19 Dec 2023 13:21:18 +0800 Message-ID: Subject: Re: [PATCH 1/2] dmaengine: sprd: delete enable opreation in probe To: Vinod Koul Cc: Kaiwei Liu , Orson Zhai , Baolin Wang , Chunyan Zhang , dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Wenming Wu Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, Dec 11, 2023 at 7:41=E2=80=AFPM Vinod Koul wrote= : > > On 06-12-23, 17:32, liu kaiwei wrote: > > On Fri, Nov 24, 2023 at 9:11=E2=80=AFPM Vinod Koul w= rote: > > > > > > On 02-11-23, 20:16, Kaiwei Liu wrote: > > > > From: "kaiwei.liu" > > > > > > Typo is subject line > > > > > > > > > > > In the probe of dma, it will allocate device memory and do some > > > > initalization settings. All operations are only at the software > > > > level and don't need the DMA hardware power on. It doesn't need > > > > to resume the device and set the device active as well. here > > > > delete unnecessary operation. > > > > > > Don't you need to read or write to the device? Without enable that wo= nt > > > work right? > > > > > > > Yes, it doesn't need to read or write to the device in the probe of DMA= . > > We will enable the DMA when allocating the DMA channel. > > So you will probe even if device is not present! I think it makes sense > to access device registers in probe! There is another reason why we delete enable/disable and not to access device in probe. The current driver is applicable to two DMA devices in different power domain. For some scenes, one of the domain is power off and when you probe, enable the dma with the domain power off may cause crash. For example, one case is for audio co-processor and DMA serves for it, DMA's power domain is off during initialization since audio is not used at that time, so we cannot read/write DMA's register for this kind of cases= . @Baolin Wang Hi baolin=EF=BC=8Cwhat's your opinion? > -- > ~Vinod