Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp771048lql; Mon, 11 Mar 2024 18:05:18 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXX17ZYGMXxzETX1KAmOp88uVqHD0udpYFQUVJvREm0zMAzR1a2+5H6Z12CuxjGBVvfEdnwACDTnpzJqU4YJeHISTvZGFf4MMDjqagI9w== X-Google-Smtp-Source: AGHT+IF0r6hagCCsmbkVhnvO+bcp8RWxU7z6dg3nRGVlsV3Sv4gj5wfJNpmppGULUGo/e1YyHfvj X-Received: by 2002:a05:620a:8103:b0:787:be95:a1e2 with SMTP id os3-20020a05620a810300b00787be95a1e2mr623309qkn.30.1710205518702; Mon, 11 Mar 2024 18:05:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710205518; cv=pass; d=google.com; s=arc-20160816; b=oattIyZ28MiXalSEBH1xA30zAg9UUQnHpKP/2XkiIv/cBh1G63OKn79TDaHDfL4J2b EcOa6KEYkxpx09oP4MPyLOBqrPJ+Eea19UEufHGyFJgNDOLny70hG3l33oDrxJDlX96h hRiHgjZOuGSXKOVlJw486faS/ZDVGWqWfeDdWqfZUv7ffzUqy+hmdPFV75pqdbno1MHy A+vFEjb8NOIYQihJYe1CUfkt/ClJyo9oocM7pHgNDDmAA3tK2LBuHrzdeEeNccBcaeGS PmejwppPub3G9Edo+OySeFGHQPYF9O2ZAKE1hDtAm+gbf3AbAYRrIMwP6XrgpVtOfMUI javQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=AWlUlgD54M+Av91gLdkhwyiioJ08F7sqNreLTDCTGKg=; fh=s+hXQ/jcqmNWCEBQhl+TQNJbXfVceNFrxP4+THcohRc=; b=sLvNflvYE0dGk3chMptCI49Q70R65uk3YLLHDG/E5OP8iAvLWcSAzJJK+Kcw/+eQDn 5lYe/oacTVTjFUAgAENKiINziX3mekhfH11yfr1SKiuVt4/HHEMYFimHZherMQwgiulM m2IEwmVCExiUFnVEXLVhGdST0KgTBfcX1dcApuUALqXFT4kjDCUapo34x8jEwVThSVt1 aCmMKnrGT2q7C2ZQ2B62iKvDDXafLSJGFwkIBnjArNljOXoQejBLkuQwbT+YRy4VWKWR AYZWKHeZDmg0eLxluWangA7ux8+/1waITibTyxVFx97DxjuG0chgmKUDTjauxNtynpiJ DRGA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fvOtp4xx; 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-99712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99712-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id b12-20020a05620a0ccc00b007883241f9f5si6305899qkj.383.2024.03.11.18.05.18 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 11 Mar 2024 18:05:18 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-99712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fvOtp4xx; 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-99712-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-99712-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 6D7CA1C218BF for ; Tue, 12 Mar 2024 01:05:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 078581842; Tue, 12 Mar 2024 01:05:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="fvOtp4xx" Received: from mail-lf1-f53.google.com (mail-lf1-f53.google.com [209.85.167.53]) (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 BC5497E2 for ; Tue, 12 Mar 2024 01:05:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710205511; cv=none; b=a84ADCOVVBg4fiEY/NRp2S2GyJ4UqVxKtfvE94Ok7p2nL0Wn1/UzdTN3cCp8bWjF2V2PIqQ9QUmqp/xsWNx5wjbT6xSloU+Ox9JB+hC/5zWWUb3LQr5H5rUR5SYP3INjEAoSmm8D/INNH8e30IVCXxJLhyglr99jfkSZAYxS+mA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710205511; c=relaxed/simple; bh=kiqq5+7qC6lpslO5kWCW11x3kemUPM6htnwZ29MLvMg=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=a/wk00XjtJOfvYDJbFsHHF/ZXIUYmoGfRVOnUxBmoryUubzC4kX8IQGL7Cdg1+N5RMdvxQKJQ0dEgzrrl4RXJllZ5DyT7ViPOwZpCPSFEn2v2N13O/E3hlqbXP3KLy2MyGG6xqBA4EFINRyK0ZxMRrmGN/RXS5I4THhqXaofEzo= 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=fvOtp4xx; arc=none smtp.client-ip=209.85.167.53 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-lf1-f53.google.com with SMTP id 2adb3069b0e04-512ed314881so4400960e87.2 for ; Mon, 11 Mar 2024 18:05:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1710205507; x=1710810307; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=AWlUlgD54M+Av91gLdkhwyiioJ08F7sqNreLTDCTGKg=; b=fvOtp4xx/6hZ9oR5/ceHPtTYHRKatuauXWtLgj3YTkqDyb77NPaP7CQTw7h6LFhKxK ItXKi4rzLICL0VqWhYv3p2UMnvFZS0G6U6HJuOhJuvu8Uje+JENhIfsxQfU3AsAvSrA6 1oCRgVokImXWRqxIGIZXV8LlBU0z7bHlUrJi5jLl8hJqFq3Mu5SB0s6AYdCO0nDqPyGU yIb4pPALLhnz4YQHEGlVSpiU48Doo+kxXRt/vnD0p4PGDv8OsG3mbmLRlj+FHkrVPfiW 4Z4GwOeWL03oBBp55HsxSxCfkdou5B8nbTzD0HnE4jjpXaDabmZb/5Ek7BG7sqdmJzKB Ud/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1710205507; x=1710810307; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=AWlUlgD54M+Av91gLdkhwyiioJ08F7sqNreLTDCTGKg=; b=qI3h0xK3S6o9OnHLJ5MN40ixIcDmpCtYmpBcYYQGcJg8WCvIAzYNpYY4lC+56BJuPn mntMsh1i2ssGEq8HAb3EEL+QxnfqzZ0YKZlOCuFt9M9S3zJQk4uBzFJAeUOMEwID9rhG RzAxEnB4vMNFEeSXoz+sap6fcCv5eOWUhr9sh6oncCvi1s2Q3bqCtfdLnYqpyPRFnLd7 o0k0js9L2gVW5+qzaTybSgt7d5zlAmzPFA1g1vSMg88Cl9gHHHk+KVQ6bx0cBsGDezBg Jfy2Bufhy1pp8a4hEBtJ3N5WDDIIbXu151y3XY8cFVXVKti9Cuvyg86EXoOubhXVADHR FxRw== X-Forwarded-Encrypted: i=1; AJvYcCXI7skBbb440/rpwgifIE3UbLqckS40ri9OM1oKJqP3MCeOerL/G2fWOcUeBZaHtP9fPq3i6vhmiic5dh5mZwWBomtOaMjEZXsED5Sa X-Gm-Message-State: AOJu0YzmAE4IBRO/2uM4gg6mztr/Sgyahxp62tmhBxqPX3P/umxzwSN9 MKAJx1mASYE1ekZB34LyVm7TQRDxRFP5jn1TFN8LGLOVFYTumxEO777F2p/KwCU= X-Received: by 2002:a05:6512:4896:b0:513:57fe:97b8 with SMTP id eq22-20020a056512489600b0051357fe97b8mr4992132lfb.26.1710205506953; Mon, 11 Mar 2024 18:05:06 -0700 (PDT) Received: from [172.30.205.61] (UNUSED.212-182-62-129.lubman.net.pl. [212.182.62.129]) by smtp.gmail.com with ESMTPSA id er26-20020a05651248da00b00513a1fe7767sm1040883lfb.209.2024.03.11.18.05.06 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 11 Mar 2024 18:05:06 -0700 (PDT) Message-ID: <61232fd6-2b76-4ab0-af64-2d49ae405610@linaro.org> Date: Tue, 12 Mar 2024 02:05:05 +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 v3 2/5] soc: qcom: llcc: Add regmap for Broadcast_AND region Content-Language: en-US To: Unnathi Chalicheemala , Bjorn Andersson , 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: From: Konrad Dybcio In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 2/23/24 00:07, 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. > > Switch from broadcast_OR to broadcast_AND region (when defined in DT) > for checking status bit 1 as Broadcast_OR region checks only for bit 0. > > Signed-off-by: Unnathi Chalicheemala > --- > drivers/soc/qcom/llcc-qcom.c | 15 ++++++++++++++- > include/linux/soc/qcom/llcc-qcom.h | 4 +++- > 2 files changed, 17 insertions(+), 2 deletions(-) > > diff --git a/drivers/soc/qcom/llcc-qcom.c b/drivers/soc/qcom/llcc-qcom.c > index 4ca88eaebf06..cfdc7d9d7773 100644 > --- a/drivers/soc/qcom/llcc-qcom.c > +++ b/drivers/soc/qcom/llcc-qcom.c > @@ -826,6 +826,7 @@ static int llcc_update_act_ctrl(u32 sid, > u32 status_reg; > u32 slice_status; > int ret; > + struct regmap *regmap; Reverse-Christmas-tree, please > > if (IS_ERR(drv_data)) > return PTR_ERR(drv_data); > @@ -849,7 +850,9 @@ 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 > + : drv_data->bcast_and_regmap; regmap = drv_data->bcast_and_regmap ?: drv_data->bcast_regmap Konrad