From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ej1-f43.google.com (mail-ej1-f43.google.com [209.85.218.43]) (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 17A22205AD2 for ; Fri, 10 Jan 2025 12:07:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736510833; cv=none; b=JHHW/yfF0RHuka977O7+25NaJVNJ+J4SatFSlWDKiNA5+J4mPPS4xIPJaZuAB4oqLL1q1CGgAnYN6ZOQT0BgA6wSrD7r6v/OSqjgiW+Q1h1oNehbjDXcHcy84eil99uhSqxfG/pwB4fwH8CVc39+qWF64xnVVUc+ZC6fiQTHX5c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736510833; c=relaxed/simple; bh=yrgOy+7BOGVQagwFi5dUb3kJXjLDgLIWtJiBFKqHLoU=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=pxbTbg3jEWM+bmh0BgHFYMndf1Dw2urqAoppdLAQA4EEP9w7h8U96aHowwbqpWgmtTKHkuQo6821PLumdnKo/QgvhetpisIsWjHXBfRAGpTo9Hyta1pbbDs+bt9ZIqgOS1lRI4+kZHEJD5qwPsFe76KnpJClRqQTV2WH1gWvTII= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=MtKfUqZB; arc=none smtp.client-ip=209.85.218.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="MtKfUqZB" Received: by mail-ej1-f43.google.com with SMTP id a640c23a62f3a-a9e44654ae3so305417066b.1 for ; Fri, 10 Jan 2025 04:07:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736510830; x=1737115630; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9y/gN2odMZFeh47vw+gl1N9CPMYPBQ6DwSsWYHyj4fQ=; b=MtKfUqZBBKCcpkJuy/uIdhZvXISYnKuJdEl+wN2wMR+4jWlzn/7AUWxJ5SA4/4c15p S6IWCKzRg2wUmsfCFlgHRkUUlhW7n9+q9eI9hLZLSUFZD57MdNOxnX6mq3p/BmaoOtpZ lghW7uvevW/maBMpI2uIknTgFtE+qRGZsJlOZEgrwjwjLzfxPhqwTHWkGuSWh9bu2+kg kQ7AW9U2Y33GXKOEcNiloevmQokIWGJkFNy9CYfwvNN9As+7qPY38XsmU0f2nqkLHEkY c4I6ukoZUmjjLzyidWxSfpLkLRbhXnTb+IAimprUyHrqaIwg1uLH8PY/gX6lbFmCHK13 12uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736510830; x=1737115630; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9y/gN2odMZFeh47vw+gl1N9CPMYPBQ6DwSsWYHyj4fQ=; b=QfTOQi9PdsrWzrkBmoIKN34vgwszHpRoe1nGITvLQFvYsNsRu6ruq16udplg3aPOZU tZoIiBeMOg8aXe3ksJ4NUI85T1yTid3IK580nGo3A6QSgJ3Mv+Dv3YKoJXdbC1xyU2Tp rCKr2Ia1V9ixpT5Elb8HxLInA+ogHh18EyL4IwGaJksqfYCF8id2c3Y332D4hULKRXO2 d06AzeweRh5rfHnmsm+nF8n8K4FmkCQzB80/qbUr1ppYl99/WSniuHS8Yf6x6k2TLkjp Iywobp/VBjc+2zQiC/DIJhmV0M1NEI2v/Tkwl59xa668GJS2bWKLGC9GUDJn+gF1lbo9 Z0/g== X-Forwarded-Encrypted: i=1; AJvYcCXrGlb+iuG2KnnBBRVcKwR2FRlOXjQESs2sRmIXRMs3SMFxXPtTydye+e3jKzaDbxodu8BHHPIdD/hYHLw=@vger.kernel.org X-Gm-Message-State: AOJu0YxiRRbXRVLuVt8y+PPGfzQTxFkzJWWwDhKSvj1XCfrCagy7tf3D x0UAFxLu7IUT0DcEWecMHQ1kyMYMd5FWkqCWIGSYPlNGQ9Vo7hWPtJBcoURHDLk= X-Gm-Gg: ASbGnctIbc0svCwcUEoB0quxjkNefDJSAlMHRUFdu37OR3mwKB/geZdVaRAdc1oYajN jKjb/Y1+I07xUYrf2n2KHm5knv1qtnrNAfzNraDs5EfzlBoKapjF9b0xcRPyK5EDM4S8vve7Gz5 lwVIMb//jTwGKUJbYfzViVZYubYxiSKdbigRZzMCzQSrPTfB8o3UFMMksKY6K74PIEmjMAGUD4y 4v3RuDN5k2tRbfviJGEDCiyMRyRWl5XtaVO5gclgwQ1aXyiByAhn3Q1ia9FcQL6Ck6x X-Google-Smtp-Source: AGHT+IEbs39UX4JebOJPJTtnwI7S/6zwVpYwwRvnr+tFJXOQhZ4ztObQQovV/KgKXag9rMzBNPxGFQ== X-Received: by 2002:a17:907:3f95:b0:aa6:9b02:7fd0 with SMTP id a640c23a62f3a-ab2aad3f4a6mr1000372666b.0.1736510830008; Fri, 10 Jan 2025 04:07:10 -0800 (PST) Received: from linaro.org ([2a02:2454:ff21:ef30:d2b5:f46c:e0e4:a1af]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c90d9b19sm159072266b.73.2025.01.10.04.07.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 04:07:09 -0800 (PST) Date: Fri, 10 Jan 2025 13:07:05 +0100 From: Stephan Gerhold To: Md Sadre Alam Cc: vkoul@kernel.org, robin.murphy@arm.com, u.kleine-koenig@baylibre.com, martin.petersen@oracle.com, fenghua.yu@intel.com, av2082000@gmail.com, linux-arm-msm@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, quic_mmanikan@quicinc.com, quic_srichara@quicinc.com, quic_varada@quicinc.com Subject: Re: [PATCH v4] dmaengine: qcom: bam_dma: Avoid writing unavailable register Message-ID: References: <20241220094203.3510335-1-quic_mdalam@quicinc.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, Jan 10, 2025 at 05:29:29PM +0530, Md Sadre Alam wrote: > On 1/10/2025 3:59 PM, Stephan Gerhold wrote: > > On Fri, Dec 20, 2024 at 03:12:03PM +0530, Md Sadre Alam wrote: > > > Avoid writing unavailable register in BAM-Lite mode. > > > BAM_DESC_CNT_TRSHLD register is unavailable in BAM-Lite > > > mode. Its only available in BAM-NDP mode. So only write > > > this register for clients who is using BAM-NDP. > > > > > > Signed-off-by: Md Sadre Alam > > > > What are we actually fixing here? Which platform is affected? Is there a > > crash, reset, or incorrect behavior? > On SDX75, QPIC use BAM-Lite and as per HW description this > BAM_DESC_CNT_TRSHLD register is not available, and writing to this > SDX75 was hanging. > > > > We have had this code for years without reported issues, with both > > BAM-NDP and BAM-Lite instances. The register documentation on APQ8016E > > documents the BAM_DESC_CNT_TRSHLD register even for the BAM-Lite > > instance. There is a comment that it doesn't apply to BAM-Lite, but I > > would expect the written value just ends up being ignored in that case. > With older xPU it was being ignored but with new xPU its hanging. HW > team suggested don't write this register for BAM-Lite mode since its not > available. > > OK, thanks for the explanation. > > Also, there is not just BAM-NDP and BAM-Lite, but also plain "BAM". What > > about that one? Should we write to BAM_DESC_CNT_TRSHLD? > Apart from BAM-Lite this register available in all the BAM Please check again if we need to check for additional revision numbers for the non-NDP BAM types then. Or alternatively, change the check to write the register on if (!BAM-Lite) instead of if (BAM-NDP). That might be easier. Thanks, Stephan