Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp467304lqz; Sat, 30 Mar 2024 04:46:40 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVL4LdddigAaGXFyOAh+87BbeWf/Qvv6nXNkUxR+rFk+adn9WztvRc3TSXEK9t/4u7m99mBswo7Uvsk2mbCP3VeJFdgHOyCx2O3sehFsw== X-Google-Smtp-Source: AGHT+IEGMLS4zSlNcUle3zcTLTfL8mSDruawkedXpVPNy6gcOwI54rC1v11dCRBpmjMnsJ69DPEF X-Received: by 2002:a05:6e02:3210:b0:368:85c9:9cc2 with SMTP id cd16-20020a056e02321000b0036885c99cc2mr6212683ilb.12.1711799199778; Sat, 30 Mar 2024 04:46:39 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711799199; cv=pass; d=google.com; s=arc-20160816; b=rrh7u+fE1VdlDhhot+7cENUVehib0XxFbw6rB9l00AQ9RiNr40Q7hTFEP+pBpyDw3T iGkQ2zHdOVJpur5jOdqnmScYx5Zl83ifmfjTL+6p4zY3C3qzpR3j19m2OR2NE1BeKZOu ympvIzJ80nzHvLJp3v7L5KyUqC0vPBQYcKP2HSGsdHL4nbl9lxrenjmOc3mmgbVsMpJ0 na67A7mkmdTCgcfn0zY9CpE6y0+kmwK7eUrPM9QIM8VxRiX8847/k4dCxJbNlaYvf2sK GaX7gQTE2VNVEP5Xt6gYql+qkNV6JekCSbH9yOgpDdTHHXsAyRRpjw5wnLoySrb3nwWO An6Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :list-unsubscribe:list-subscribe:list-id:precedence:date:message-id :dkim-signature; bh=flb2sceZGeMo+7mqoXsVVwFaBDIsSMNyF6H27QzTvtk=; fh=kZHOkvVsicbdZOkXC0Y4wRRFz5pgd5rdFdJF0Guxsqc=; b=srGdBxGdQoaJKA7cgny2BA7sT/259EPbCXEGT7YelhjcOTuHwqe1S7BFoDaTK/OCfM tDBy6hKpH/9HnBI3PQkZlWmM9fLymllfwm4hOkS8qCPBPeQWi4xK//RoFjF4Pook9K+F ybb0Ke6RMn3nMb3UrU0ndkRcCGDedSz2Uf9Z9SIxeIfEKJcTVmxj1isPuOZPx6l1d1IE sk4CHrav826aSGcd0kdxz+mXiPRDGSt+8NhzsKjr8rRyj6hBjwFzzqmfBwpzkkOnStGx aD2ZloDMZn5c7iMorQhvMfzVehdjh9WRj1pI4kFbMUYMu3Oxov4+IAvvnNwwwe41kEAC 6aUA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n5h/uOFr"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-125710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i10-20020a639d0a000000b005d7afbb31b3si5354191pgd.352.2024.03.30.04.46.39 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Mar 2024 04:46:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-125710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="n5h/uOFr"; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-125710-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-125710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4C74D28339C for ; Sat, 30 Mar 2024 11:46:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 95B4E364AE; Sat, 30 Mar 2024 11:46:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="n5h/uOFr" Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 E42592C859 for ; Sat, 30 Mar 2024 11:46:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.46 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711799191; cv=none; b=S3XJO9rdW5AqdCGuW9Ke/mD7CAWM/cn4+6y5UBiPGsla/aBNAG5kDXq983zSlVPm9q7aChOdXPc8ceLU9Roc74Jku3NM7wyXLab+fv1ccoCIxluPkCxkn5IOamd9WXAIuNk5EYAFU5+dwMziA3Yvxy3+0m6lMpvhqa+iJkl0Sho= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711799191; c=relaxed/simple; bh=nDnJp8XF/zw1aA5vl1kh4mTSuUfliiJCeQP1o73zw88=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=H4IDpiPijCp3w/En/jamKU/nzwKoksxrlvhHfVzMOjh4wlhFza4R0rd2ut3GuAwjpMqAXlGzyoWrSftW45mKQURkWcGEzOBNlSC8P1YlKJqRC3hjKGA/zt34pcrnJOkFhiGeMs7Sz5gNxC26C74c+3xVYwCEQ4Z35/nS6CeQ17Q= 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=n5h/uOFr; arc=none smtp.client-ip=209.85.221.46 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 Received: by mail-wr1-f46.google.com with SMTP id ffacd0b85a97d-341730bfc46so1926793f8f.3 for ; Sat, 30 Mar 2024 04:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1711799188; x=1712403988; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=flb2sceZGeMo+7mqoXsVVwFaBDIsSMNyF6H27QzTvtk=; b=n5h/uOFrAq/kmUY4tR1ww11BeSZFHRsHihogxJZJkq8cofGPZFx+laxM165ihBKhfW ZlfhTYrI+KKiQIQxdx18hvpEh3HGo8BMhpFSoiSVHCFqgSVWafiBGsPLIiw1GwJ28q4V coATt/lGg5Y6leCvDfFRe0ruTXauTH81ZJr+5Xwv5AUrEgGCmn6EdKCQBtsifq0DMLPT I3cIxEofjAYnWEIBizjA3O5lfHNFg+/nJaqiPqeIwiQEd3SiiA3cWjkEi1Z6DdF0Bxud xkv6CKneRbaaLn6ytb7kSb738Wo7MkS7tfv+gMdgpXrBOQ3RrGXuVh5H7VQJBMtgxvHP FSlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1711799188; x=1712403988; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=flb2sceZGeMo+7mqoXsVVwFaBDIsSMNyF6H27QzTvtk=; b=nQ1luyl4d0NXNBmXBA5OEGqQh+9yeUkwZEDhK4S0PmYpo8inZk/yPahxZVPbY37c7v nkwRq36wa2WmTG7KIPpDQoe2jgd+gRu5OniUg0KuMFVbrhDOwpssiekxl5KdRFEuA4DJ ZNaxRdaFQd/mkrulABDRqVDWBYSl6Dm0HJ8vYCs2YUxuoaIdpJYMDjpNxSCDVntqlDTG 1+2psyQiGsksixdsCjUwChcTS/SOouj1QGg4ccl0H+6ZkbDiklk3mINdWClnQFCT9YF5 a4wVN0bPe/wOPNjMzz8zonIiZSGBBMsuAshHjoPK5Asowp5DYprJ4oPzyOJ1hBQsYF6/ rTvQ== X-Forwarded-Encrypted: i=1; AJvYcCVxxZJzYITfLA8NCdXNRGUqwQxmwp/uTKZ+Y48Q69A3iklcAhYWxCBqkQIjUDnm2W4qfGWzz55p5XXTT4drFTh2cfiMSsRwZbr6+KUv X-Gm-Message-State: AOJu0YxZpFEw1QYxshSAxP6qbGtf7/ZXaOE8uv26AOwUOn+6MXQ6h3No zHvqlTRAq1jmoaHiDjWn2eeDn6hnwORCeFObIMOu4+fi81hSj0tAg+SBVPzsM/Y= X-Received: by 2002:a05:6000:1743:b0:33e:4969:f05a with SMTP id m3-20020a056000174300b0033e4969f05amr2683763wrf.37.1711799188247; Sat, 30 Mar 2024 04:46:28 -0700 (PDT) Received: from [192.168.1.20] ([178.197.223.16]) by smtp.gmail.com with ESMTPSA id d8-20020adfef88000000b0033ed7181fd1sm6267909wro.62.2024.03.30.04.46.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 30 Mar 2024 04:46:27 -0700 (PDT) Message-ID: Date: Sat, 30 Mar 2024 12:46:26 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 2/5] soc: qcom: llcc: Add regmap for Broadcast_AND region To: Unnathi Chalicheemala , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@quicinc.com References: <20240329-llcc-broadcast-and-v4-0-107c76fd8ceb@quicinc.com> <20240329-llcc-broadcast-and-v4-2-107c76fd8ceb@quicinc.com> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzysztof.kozlowski@linaro.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeYJtjUH0ZX6ndJ33FJYf5V3yXqqjcZ30FgHzJCFUu JMp7PSyMPzpUXfU12yfcRYVEMQrmplNZssmYhiTeVicuOOypWugZKVLGNm0IweVCaZ/DJDIH gNbpvVwjcKYrx85m9cBVEBUGaQP6AT7qlVCkrf50v8bofSIyVa2xmubbAwwFA1oxoOusjPIE J3iadrwpFvsZjF5uHAKS+7wHLoW9hVzOnLbX6ajk5Hf8Pb1m+VH/E8bPBNNYKkfTtypTDUCj NYcd27tjnXfG+SDs/EXNUAIRefCyvaRG7oRYF3Ec+2RgQDRnmmjCjoQNbFrJvJkFHlPeHaeS BosGY+XWKydnmsfY7SSnjAzLUGAFhLd/XDVpb1Een2XucPpKvt9ORF+48gy12FA5GduRLhQU vK4tU7ojoem/G23PcowM1CwPurC8sAVsQb9KmwTGh7rVz3ks3w/zfGBy3+WmLg++C2Wct6nM Pd8/6CBVjEWqD06/RjI2AnjIq5fSEH/BI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oDm3wX47nr6jIsEB5ZftdybIzpMZ5V9v45lUwmdnMrSzZVgC4jRGXzsU EViBQt2CopXtHtYfPAO5nAkIvKSNp3jmGxZw4aTc5xoAZBLo0OV+Ezo71pg3AYvq0a3/oGRG KQ06ztUMRrj8eVtpImjsWCd0bDWRaaR4vqhCHvAG9iWXZu4qh3ipie2Y0oSJygcZT7H3UZxq fyYKiqEmRuqsvv6dcbblD8ZLkz1EVZL6djImH5zc5x8qpVxlA0A0i23v5QvN00m6G9NFF0Le D2GYIS41Kv4Isx2dEFh+/Q== In-Reply-To: <20240329-llcc-broadcast-and-v4-2-107c76fd8ceb@quicinc.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 29/03/2024 22:53, Unnathi Chalicheemala wrote: > Define new regmap structure for Broadcast_AND region and initialize > this regmap when HW block version is greater than 4.1, otherwise > initialize as a NULL pointer for backwards compatibility. > > + struct regmap *regmap; > u32 act_ctrl_reg; > u32 act_clear_reg; > u32 status_reg; > @@ -849,7 +850,8 @@ static int llcc_update_act_ctrl(u32 sid, > return ret; > > if (drv_data->version >= LLCC_VERSION_4_1_0_0) { > - ret = regmap_read_poll_timeout(drv_data->bcast_regmap, status_reg, > + regmap = drv_data->bcast_and_regmap ?: drv_data->bcast_regmap; > + ret = regmap_read_poll_timeout(regmap, status_reg, > slice_status, (slice_status & ACT_COMPLETE), > 0, LLCC_STATUS_READ_DELAY); > if (ret) > @@ -1284,6 +1286,16 @@ static int qcom_llcc_probe(struct platform_device *pdev) > > drv_data->version = version; > > + /* Applicable only when drv_data->version >= 4.1 */ > + drv_data->bcast_and_regmap = qcom_llcc_init_mmio(pdev, i + 1, "llcc_broadcast_and_base"); > + if (IS_ERR(drv_data->bcast_and_regmap)) { I am pretty sure this breaks all users. Can you please explain how do you maintain ABI and that IS_ERR() is applied only for version >= 4.1? Best regards, Krzysztof