Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2554683rdb; Mon, 4 Dec 2023 00:09:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IEKPZwHOs1REEeDWAgciiSatp4jswTO5mGhumQ+iywTSW26i3vXYIoVvcCwLHig5cdz7e6z X-Received: by 2002:a05:6a21:3614:b0:18f:97c:5ba5 with SMTP id yg20-20020a056a21361400b0018f097c5ba5mr757713pzb.115.1701677382694; Mon, 04 Dec 2023 00:09:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701677382; cv=none; d=google.com; s=arc-20160816; b=mBcPgUzGYfgvaMh9Zwaa6QDLXXvVgrlIBX4/X/pSxJ+CbNPcrSbtgby5f4cjd4dO+y jXwY+gO2nTAO56BhsbEHY1CyA0V5zymqyQ/9cQa0pMSzbG+lst2A3NXVGQfr4ba1+4MX reK+qAs8azYnjdLuTntrsIf/bLE6zYRpabBVfccAB8PbdkG8lqbqPaRRp7xWlc7z1ZBK 2Z9CMw5lkyRBULFf+G35uNzJDYAADCTad1alz+bIZl6XaLYL7HVs4HAu/kBxk9Z4dSIM dSfSDSfJrXTc3LlhpYEqGodOdPKDGQCTzFF3qO2cs8u9TiplvoCTvb33cw+2pD+EBhGN dBeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=Wiy+LUCBzT+OAPPS86l5sz8LjFR9IrCTQrSyLJ2IgJk=; fh=x8PKhdWc58HpP8sCylBimYU5c4YpNSRMuF6x3KCqAEs=; b=dzg9f5G2CN052T5tfyv7xPaVoAXo2eW83xGtQ9emdqmBeUs08K/bhpU3MkKWn+R6KC DfOPcU9c4OF+ibK216baIQiDyzrlpFJ251CvCX2pMO1P/Sic6UopETDvkTCCEHvo91yF 7boXK67vXAeLmx1ZgnlJJeV48ElYelvcYi3hdBAN9UwuhNnlt3iM0WtojH+E0hHmz2bG IdvBEdtGC4xOillQIpMPEUaejzNebCjtB/Oj2dBWI6Yp3g9wQfVWkoHUj2XHCW4psSXG CJzlIH7JN2SdHWVyCVAin4FkTe+HMQEt1ZRuNfeGvrpXWLk0x2Ykh0g5zBbPWQsYSRiL sZLw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-wireless+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id oc17-20020a17090b1c1100b00286ad92ab6fsi1347217pjb.185.2023.12.04.00.09.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 00:09:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-wireless+bounces-353-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; spf=pass (google.com: domain of linux-wireless+bounces-353-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-wireless+bounces-353-linux.lists.archive=gmail.com@vger.kernel.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id DB530B20A12 for ; Mon, 4 Dec 2023 08:09:33 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A9DB4E569; Mon, 4 Dec 2023 08:09:19 +0000 (UTC) X-Original-To: linux-wireless@vger.kernel.org Received: from rtits2.realtek.com.tw (rtits2.realtek.com [211.75.126.72]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C40F1D6 for ; Mon, 4 Dec 2023 00:09:15 -0800 (PST) X-SpamFilter-By: ArmorX SpamTrap 5.78 with qID 3B4892erC1945248, This message is accepted by code: ctloc85258 Received: from mail.realtek.com (rtexh36506.realtek.com.tw[172.21.6.27]) by rtits2.realtek.com.tw (8.15.2/2.95/5.92) with ESMTPS id 3B4892erC1945248 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 4 Dec 2023 16:09:03 +0800 Received: from RTEXMBS04.realtek.com.tw (172.21.6.97) by RTEXH36506.realtek.com.tw (172.21.6.27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.17; Mon, 4 Dec 2023 16:09:03 +0800 Received: from [127.0.1.1] (172.21.69.94) by RTEXMBS04.realtek.com.tw (172.21.6.97) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.7; Mon, 4 Dec 2023 16:09:02 +0800 From: Ping-Ke Shih To: CC: , , Subject: [PATCH 2/5] wifi: rtw89: fw: extend program counter dump for Wi-Fi 7 chip Date: Mon, 4 Dec 2023 16:07:48 +0800 Message-ID: <20231204080751.15354-3-pkshih@realtek.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231204080751.15354-1-pkshih@realtek.com> References: <20231204080751.15354-1-pkshih@realtek.com> Precedence: bulk X-Mailing-List: linux-wireless@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: RTEXMBS02.realtek.com.tw (172.21.6.95) To RTEXMBS04.realtek.com.tw (172.21.6.97) X-KSE-ServerInfo: RTEXMBS04.realtek.com.tw, 9 X-KSE-AntiSpam-Interceptor-Info: fallback X-KSE-Antivirus-Interceptor-Info: fallback X-KSE-AntiSpam-Interceptor-Info: fallback From: Zong-Zhe Yang Extend FW program counter dump for Wi-Fi 7 chip. They poll different addresses. Signed-off-by: Zong-Zhe Yang Signed-off-by: Ping-Ke Shih --- drivers/net/wireless/realtek/rtw89/fw.c | 10 +++++++++- drivers/net/wireless/realtek/rtw89/reg.h | 2 ++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/net/wireless/realtek/rtw89/fw.c b/drivers/net/wireless/realtek/rtw89/fw.c index 0b9c3c76b273..81034b6ce4b0 100644 --- a/drivers/net/wireless/realtek/rtw89/fw.c +++ b/drivers/net/wireless/realtek/rtw89/fw.c @@ -957,16 +957,24 @@ static int rtw89_fw_download_main(struct rtw89_dev *rtwdev, static void rtw89_fw_prog_cnt_dump(struct rtw89_dev *rtwdev) { + enum rtw89_chip_gen chip_gen = rtwdev->chip->chip_gen; + u32 addr = R_AX_DBG_PORT_SEL; u32 val32; u16 index; + if (chip_gen == RTW89_CHIP_BE) { + addr = R_BE_WLCPU_PORT_PC; + goto dump; + } + rtw89_write32(rtwdev, R_AX_DBG_CTRL, FIELD_PREP(B_AX_DBG_SEL0, FW_PROG_CNTR_DBG_SEL) | FIELD_PREP(B_AX_DBG_SEL1, FW_PROG_CNTR_DBG_SEL)); rtw89_write32_mask(rtwdev, R_AX_SYS_STATUS1, B_AX_SEL_0XC0_MASK, MAC_DBG_SEL); +dump: for (index = 0; index < 15; index++) { - val32 = rtw89_read32(rtwdev, R_AX_DBG_PORT_SEL); + val32 = rtw89_read32(rtwdev, addr); rtw89_err(rtwdev, "[ERR]fw PC = 0x%x\n", val32); fsleep(10); } diff --git a/drivers/net/wireless/realtek/rtw89/reg.h b/drivers/net/wireless/realtek/rtw89/reg.h index 1bd91c62678d..690fa835c054 100644 --- a/drivers/net/wireless/realtek/rtw89/reg.h +++ b/drivers/net/wireless/realtek/rtw89/reg.h @@ -4023,6 +4023,8 @@ #define B_BE_USB_HCISYS_PWR_STE_MASK GENMASK(3, 2) #define B_BE_PCIE_HCISYS_PWR_STE_MASK GENMASK(1, 0) +#define R_BE_WLCPU_PORT_PC 0x03FC + #define R_BE_DCPU_PLATFORM_ENABLE 0x0888 #define B_BE_DCPU_SYM_DPLT_MEM_MUX_EN BIT(10) #define B_BE_DCPU_WARM_EN BIT(9) -- 2.25.1