Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp2987622rdb; Tue, 12 Sep 2023 20:20:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEjx3ke98egu3FWkZKCLoOVr60rpv9svoDUGJXd83Tcmu3CkXSx9llBJd+FPUh1h4JdWCT5 X-Received: by 2002:a05:6a00:2d0c:b0:68f:ec50:e6b2 with SMTP id fa12-20020a056a002d0c00b0068fec50e6b2mr1770665pfb.6.1694575213783; Tue, 12 Sep 2023 20:20:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694575213; cv=none; d=google.com; s=arc-20160816; b=dhyIvPkLU6frwgfZslEXaHXDPqI53dSLd1M2IPG4tZD8Cl92o2Suy/ARMENOSPt9sc LH97/gOSH9PmUlxdQBhEhAHsqre/ZMm+C1cXPfDV5AESZzEU0J7hqW/5hcns/C3iP2Pa 6WAeHZ0DimOrmH/2QQB2uruhCj7e06aL2tVXUiog6uPEIkPCWaf1lebnveknLmmhIKKm iE/VNuTjAA7SPE7s9F/40xcKxLW57yquXCU73ZqhV3j7t2sN6ZpjztPswCqKcxLlT/cN 81oL5UMfto+TQsrMQ0W8ZQIeBlOatMN/P2De2KbDBweha+gDAWhXMdv04wBOMYbXUnu+ tb4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Np5g+nPC/OgAdpJjL1AdzmbieZypqO30zEAuyJiyklQ=; fh=BsCAHsNtWIbD8zqEmrC4mP0yqH2A/0t3ZboNjYt++fE=; b=yzyBdCZXnH8NDbT5/uxm2nk5pqTT0DC0/h/7TtC0y92MO3viliA17I3fCRbZPrbl2k a9bYT5exU9V0e92w6LH9eHYRB4jHtEYzCqxtHXd6LRmG64IeIRDMDauTr1YuYIxybyjP cQb+oAxQxtsZMGZbmGLSUuTP/ojs7qxmeUwTc5G993410kFKJ2ko0b/ibZ+Q2pw6JQtN ZkDMaCVJcGrg6p76CeU80+iQJ7ELP3Tq70G2NQPml01VQJVFgdMygwQokFc01TFfsj2P JtpY16twiRFHO6gZb9zMrcR7qgYAn9t/ZsRLMz5GMfcDP9hUjGjZo9VSTKRRJ9pB7cjd IfQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id m1-20020a656a01000000b00573fffaed37si9915940pgu.476.2023.09.12.20.20.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 20:20:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id C78AE8227938; Tue, 12 Sep 2023 20:19:18 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235685AbjIMDTA convert rfc822-to-8bit (ORCPT + 99 others); Tue, 12 Sep 2023 23:19:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234151AbjIMDS7 (ORCPT ); Tue, 12 Sep 2023 23:18:59 -0400 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B25761724; Tue, 12 Sep 2023 20:18:54 -0700 (PDT) Received: from EXMBX165.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX165", Issuer "EXMBX165" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id 0EF318159; Wed, 13 Sep 2023 11:18:53 +0800 (CST) Received: from EXMBX066.cuchost.com (172.16.7.66) by EXMBX165.cuchost.com (172.16.6.75) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 13 Sep 2023 11:18:52 +0800 Received: from localhost.localdomain (202.188.176.82) by EXMBX066.cuchost.com (172.16.6.66) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Wed, 13 Sep 2023 11:18:50 +0800 From: Joshua Yeong To: , CC: , , , , Joshua Yeong Subject: [PATCH v2 1/1] i3c: master: cdns: Fix reading status register Date: Wed, 13 Sep 2023 11:17:45 +0800 Message-ID: <20230913031743.11439-2-joshua.yeong@starfivetech.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230913031743.11439-1-joshua.yeong@starfivetech.com> References: <20230913031743.11439-1-joshua.yeong@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [202.188.176.82] X-ClientProxiedBy: EXCAS062.cuchost.com (172.16.6.22) To EXMBX066.cuchost.com (172.16.6.66) X-YovoleRuleAgent: yovoleflag Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Tue, 12 Sep 2023 20:19:18 -0700 (PDT) X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email IBIR_DEPTH and CMDR_DEPTH should read from status0 instead of status1. Cc: stable@vger.kernel.org Fixes: 603f2bee2c54 ("i3c: master: Add driver for Cadence IP") Signed-off-by: Joshua Yeong --- drivers/i3c/master/i3c-master-cdns.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/i3c/master/i3c-master-cdns.c b/drivers/i3c/master/i3c-master-cdns.c index 49551db71bc9..8f1fda3c7ac5 100644 --- a/drivers/i3c/master/i3c-master-cdns.c +++ b/drivers/i3c/master/i3c-master-cdns.c @@ -191,7 +191,7 @@ #define SLV_STATUS1_HJ_DIS BIT(18) #define SLV_STATUS1_MR_DIS BIT(17) #define SLV_STATUS1_PROT_ERR BIT(16) -#define SLV_STATUS1_DA(x) (((s) & GENMASK(15, 9)) >> 9) +#define SLV_STATUS1_DA(s) (((s) & GENMASK(15, 9)) >> 9) #define SLV_STATUS1_HAS_DA BIT(8) #define SLV_STATUS1_DDR_RX_FULL BIT(7) #define SLV_STATUS1_DDR_TX_FULL BIT(6) @@ -1623,13 +1623,13 @@ static int cdns_i3c_master_probe(struct platform_device *pdev) /* Device ID0 is reserved to describe this master. */ master->maxdevs = CONF_STATUS0_DEVS_NUM(val); master->free_rr_slots = GENMASK(master->maxdevs, 1); + master->caps.ibirfifodepth = CONF_STATUS0_IBIR_DEPTH(val); + master->caps.cmdrfifodepth = CONF_STATUS0_CMDR_DEPTH(val); val = readl(master->regs + CONF_STATUS1); master->caps.cmdfifodepth = CONF_STATUS1_CMD_DEPTH(val); master->caps.rxfifodepth = CONF_STATUS1_RX_DEPTH(val); master->caps.txfifodepth = CONF_STATUS1_TX_DEPTH(val); - master->caps.ibirfifodepth = CONF_STATUS0_IBIR_DEPTH(val); - master->caps.cmdrfifodepth = CONF_STATUS0_CMDR_DEPTH(val); spin_lock_init(&master->ibi.lock); master->ibi.num_slots = CONF_STATUS1_IBI_HW_RES(val); -- 2.25.1