From patchwork Thu Dec 28 10:20:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13505819 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (mail-dm6nam04on2043.outbound.protection.outlook.com [40.107.102.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C0D4563D2 for ; Thu, 28 Dec 2023 10:21:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="xlvrFMzj" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=g+qVoh36I/EhjaXmt0bZU9MiiPP2nG0Yx1CTZxqFhCpzmCykY0zjU45EDnIpU1yNj9nX83Uggh0BCF4OVomnj+67tkrpda/4smaJegwSfhFjEhBRofwddbm00y1CCQUqG30TWOYUpB2aulAKCcx7NeOPNFAho0HkBCpaEAct8Nd1+HTe43i1KHFknjCHfPjo/dCfKtm/70GolA/ef7yfJ4JYA3XK3AyZNo28ouT7KaEtQHzJj94zKDhvACefj79NXeCCGAz6+SJclM0avK2izVq61fzDJ/IPz9aD+4SS/wxCePU0A/HcMv1fxeWIAQDzc0PMNO38XVp7v1xAlefftw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=bg469faW58btf+fa4OKizfoZ8Lo+DN7WcmIDX1EGJPg=; b=iQ6ktu27zDFG1EYbv7KBsl9ReOBW9AE6mY9MLrjgtkbeK3+h/uQiKbJMenk8Ks3HzXMcKd//k+Vx/GvGOX2eENn2dOFMPnViAU5zXs6rLSeok52Q85rqdQwPASiPwoVo7CqpzF40dUeXqe1GVQzYDl9kYgY+sJ3QMI2r1gUP/Ko+l3wd0BZ9OQT8FYExQjvYeelihbohuX7W+p7r26cBsI9Z/7kjDw2XtexMaGwOLlW4EGWbB71fCCfLDLcH+uKrbmQupTWTgYiez8vTsRFeEsdXbNiwvDLpBXbKzWHsruD298slYVs5nz9DAMIPbyX5J8+EPBguJ7iGoMZVih2gjg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=bg469faW58btf+fa4OKizfoZ8Lo+DN7WcmIDX1EGJPg=; b=xlvrFMzjNbQcgghdi3KZkZnaCMkrr4Lc7Mo+zMtxKAk1lvrHXnpC/Ifqw+DYMFG1HCvEvhUK3JSpjrv4EahEJCnZPD4LahfpZTnuINHWtJyd00CrkQbogRZALsbmN0EgpjFzC6Y62qY+czxophDhU1sVlS7VgAReuH5WDq/T+60= Received: from CY8P220CA0047.NAMP220.PROD.OUTLOOK.COM (2603:10b6:930:47::6) by CH0PR12MB8578.namprd12.prod.outlook.com (2603:10b6:610:18e::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20; Thu, 28 Dec 2023 10:21:27 +0000 Received: from CY4PEPF0000FCBE.namprd03.prod.outlook.com (2603:10b6:930:47:cafe::1f) by CY8P220CA0047.outlook.office365.com (2603:10b6:930:47::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 10:21:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCBE.mail.protection.outlook.com (10.167.242.100) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 10:21:27 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 28 Dec 2023 04:21:24 -0600 From: Shyam Sundar S K To: , , CC: , , , Shyam Sundar S K Subject: [PATCH v2 1/6] platform/x86/amd/pmc: Send OS_HINT command for AMDI000A platform Date: Thu, 28 Dec 2023 15:50:59 +0530 Message-ID: <20231228102104.1785383-2-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> References: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCBE:EE_|CH0PR12MB8578:EE_ X-MS-Office365-Filtering-Correlation-Id: d69c0c82-00ed-4660-cd91-08dc078ec041 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fnAOxYba9qfPbH5OwmFPHMCnIh02QywtqDVJngcgHCNV/Rgofr7m5aTXRomGvkzCARmogZeH1CDZ8qLFYkybcS6mYWi+2z6OHUwD1PrK6pVYI4hbnzKGIaXncAS5KgGFNUH4rKYpahZEiIYeVpZghOisJwPP/jXyY2fJpYnxQDpNSWBkMshEuwBtrnxOqFm21VKPRuIznFCKZf4dXTEXUU5qQu8gNsfwhZrbKja7Mq9BhWpM6Jw9uPGMXSvaIc2UZaxJynHMrh4b9RIyW6AtjddlJm8xY7ShKCB2ky2i2dt4IGsX4ps9HjM5Pk2jqQJAffqEfs2wfQu4nCCHrlKuHzCUCTn8fVGCO2hU/+P6nl+P5hjtMTW9+LCGL5gOdz04oFLyObJmykvSA8RA8RkTdQivnRFpm+f0CBjJ0USGEf2yE4q1k/L8mKFGa8n+hLLovDcCJQJqgEU5HuQ3GC2Fxk1Nw6X9+x5D8KXk8LeL8d4fftRLO1h0duuiExLBEuRdA/40Mitwma4EkiBFWPkPXSo0x/Zm+3RtoVVH1Mh9pUuESZ6/0f7vasmTZDiG7Biv/GKs1W/7roI1gA5KEocOBaaZMxQr6j9ATuUo3mtRRURt2Dmt0C+/j9Mg1kGX18icMLyiW5rf52y2Vina4e8/D0L6QMkCm0xhl9o/5WJcajOh08rIMbnJy2ZHjr7mg2xaP9tIYMrKk5gaqX0osoqtc9AJncjfUywwob8eseuqSksiIDFkQIBT8hvIfkpRYcbdcOtcQoto+94mXn/drvkOeQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(396003)(376002)(136003)(39860400002)(346002)(230922051799003)(82310400011)(186009)(451199024)(64100799003)(1800799012)(40470700004)(36840700001)(46966006)(70206006)(70586007)(36860700001)(4326008)(110136005)(54906003)(316002)(8936002)(8676002)(2616005)(26005)(16526019)(1076003)(426003)(336012)(478600001)(47076005)(6666004)(7696005)(4744005)(5660300002)(2906002)(41300700001)(36756003)(82740400003)(81166007)(356005)(86362001)(40480700001)(40460700003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 10:21:27.1118 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d69c0c82-00ed-4660-cd91-08dc078ec041 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCBE.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB8578 To initiate the HW deep state transistion the OS_HINT command has to be sent the PMFW. Add this support to the platforms that has AMDI000A support. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc/pmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index c3104714b480..bad95d3ce2a1 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -761,6 +761,7 @@ static int amd_pmc_get_os_hint(struct amd_pmc_dev *dev) case AMD_CPU_ID_YC: case AMD_CPU_ID_CB: case AMD_CPU_ID_PS: + case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: return MSG_OS_HINT_RN; } return -EINVAL; From patchwork Thu Dec 28 10:21:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13505820 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2055.outbound.protection.outlook.com [40.107.244.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id AD65E63D1 for ; Thu, 28 Dec 2023 10:21:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="czSXbNjz" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=B3BVdk4dqzNx6W2w8FNAP83fqJg7PwoTsMKqxSj/sJu0JMIFo1hFR5MN8iseDy7L53LcRivetTQ2mc22byTmDNqakmmZU49sgY94gJfqAOyq7iQxeaVbVUtboUK6pQeiOblRoAwIC28ns8W/34rQQsu5dkiYQG7kcpZPB1GbeZvHBSuYm1iiKlUiUVyOsW+ZT7JadbLgZo4kroOlSQAkiWosyk+Uu/b4BkwMvLh46ispvXhN3vX7HluKaXxphClpSlOcT6jLSy8zFFt6uhg18iY/z0TACnDK3FemV0cW6rrwx0SuT8jwQo9SmtT/md5UU7NRtsk+D2eymv60xu9b8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FvxlRNoNRCTlRqlfkRtcn8JqhXrEuK+reZslSZGEy/4=; b=D+31MBWA0prF7if5yCgElluxdagEZGh+fbOhbVJW6LA1VXnpV09reWKnbZxkCb2dqV3e87XWd4kJvhNehDVOOudLObf90zsllaZcxXTvn1cQTAEG5fAFoCxwPIiLmlKfeuV5e4bc/HWzrZtFuxJmBhaU9kF+Is4k9EYxRWj1KEbxCt+DiMdLz5c708iAWRPbBMHa9CljJghjevtxxqN+LAft1PiLM1ZJd/e/fgSoPZd0mZ0rkqL1++5TWuDMFpb91sCqnIxW7dQI+NTgjK6EXADv6TtVYy2lAwcMnkaMr4clhDGAR0AOJXYILC80hi+B+dfMCgu5f9+RuSH+IW98qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FvxlRNoNRCTlRqlfkRtcn8JqhXrEuK+reZslSZGEy/4=; b=czSXbNjzqE2UJU4JXkFWkfrdijKSzq5ufVX8QgYOVQxy9OhMcvPUG/QdCd/KMhZFbTwTIKSml7Y8Y4RKO/ZV1SogxehhD3tAw/DFgGPUsPv0UsJSv8ItrebRoLg3itfkw4ZCKQIAea8RBXhTh5aZ+qukHaKvPAdZc8qmGYifV+I= Received: from CYXPR03CA0048.namprd03.prod.outlook.com (2603:10b6:930:d2::6) by MN2PR12MB4536.namprd12.prod.outlook.com (2603:10b6:208:263::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.28; Thu, 28 Dec 2023 10:21:29 +0000 Received: from CY4PEPF0000FCC2.namprd03.prod.outlook.com (2603:10b6:930:d2:cafe::53) by CYXPR03CA0048.outlook.office365.com (2603:10b6:930:d2::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 10:21:29 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCC2.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 10:21:29 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 28 Dec 2023 04:21:26 -0600 From: Shyam Sundar S K To: , , CC: , , , Shyam Sundar S K Subject: [PATCH v2 2/6] platform/x86/amd/pmc: Add VPE information for AMDI000A platform Date: Thu, 28 Dec 2023 15:51:00 +0530 Message-ID: <20231228102104.1785383-3-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> References: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC2:EE_|MN2PR12MB4536:EE_ X-MS-Office365-Filtering-Correlation-Id: 941a2af9-d878-4642-d6fe-08dc078ec195 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 96/bAjSXoyw+Vc1VL/LVrvVdwBzyb70u7RktNVWyeRKrKJn4uiALGUJ0x+VxpeJs5+LWYT4EGrlPsyZPpT42soK88tw45tgmhEdhsq4xLiIJOGudTsvnnLyTlxIWRnVBJ/RlEiT0vwapdRSn3lA1Agpu84qBmef/n577Sh/7fwTowCX1PFuAkxHbKEv+ZUUWV+L3WI40FyjnJQtl4givi0daieO2q3MGdkc8kJHM2e9xbiSbCbEFQUduj+Cqls7caWgZZl6SFZeVPjzNb+Cw+l86flp99Yw0Smi19lSjN95ypnQ+HptoWwFPZ8HSWhNak7N0KEz8N3fRXsjEQRN7fAh9/xiA0TaL8SueRqGCgZwD9uyE1fnOvSMQ3kG97lRUCcDChwF3dA6Dyn48nE5kVRup7vQZ+K8hS8eQZwag35cXSV4jgjbuNsKLMsYS2nirzxPIFXsfuDevrYCi2bePVF2dOQqkowq+ByWGVM5ckrI6fkGiZHaZIlIUW9JGoh7+4fxPVJQ+SCkqheEJ5c2ETNakLtXFjF7ZgQ90XFRsWpFz7zZfKyA4MyKH2i88EmnQVOQqnhN1ettGfUcub3zXDP6WYBhmzwj43Ba2qPqGy7fObZyrteeyiRb5NeWIArpPHUCcopbRouwo3h/fsg4VXHnpScamkNc2s4oPjPMEOj8ff4qO9TTkPFEhj8rmFycXBl0PKB7vYzMQ6sOt3c/9RurrErVku4003hiIZnecBOXhNxkKsponTAKRY11irqP3MVEhnfzrFCJNZ9yyytTQyg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(346002)(39860400002)(136003)(396003)(376002)(230922051799003)(82310400011)(1800799012)(64100799003)(186009)(451199024)(40470700004)(46966006)(36840700001)(40460700003)(40480700001)(6666004)(2616005)(81166007)(478600001)(36860700001)(82740400003)(110136005)(86362001)(7696005)(70206006)(70586007)(41300700001)(316002)(54906003)(47076005)(36756003)(8936002)(8676002)(83380400001)(2906002)(4326008)(426003)(356005)(336012)(16526019)(1076003)(26005)(5660300002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 10:21:29.3403 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 941a2af9-d878-4642-d6fe-08dc078ec195 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR12MB4536 Latest AMD SoCs has VPE (Video Processing Engine) IP block and the statistics related to this IP can be obtained as a part of metrics table information that the PMFW propogates. Add this support for 1Ah family series. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc/pmc.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index bad95d3ce2a1..0511b7f3c2b7 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -155,6 +155,7 @@ static const struct amd_pmc_bit_map soc15_ip_blk[] = { {"JPEG", BIT(18)}, {"IPU", BIT(19)}, {"UMSCH", BIT(20)}, + {"VPE", BIT(21)}, {} }; @@ -365,6 +366,10 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev) dev->num_ips = 21; dev->s2d_msg_id = 0x85; break; + case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + dev->num_ips = 22; + dev->s2d_msg_id = 0xDE; + break; } } From patchwork Thu Dec 28 10:21:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13505821 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2044.outbound.protection.outlook.com [40.107.220.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D337963D1 for ; Thu, 28 Dec 2023 10:21:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="og49aV2Z" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XorCVJb4OMvuvDARkX5tSdGJ1VbQPPdBS/xuj++wDvmS9XCNiAAv8J4+6ySXhirIHr+QH/7q9PtmO4eeoQuEkvKsLRaslwBHmwsfu93TjlgqDHI78+79IbyV0XqeNvzMYO6gQSl/X2MUNTErAOJwS5cvVd6o/cKU4izhSUbiXJ+3alvjYXOfHj5CIKc7cwJ/3mcXFHXXitp2ACXVAdp87F2O/JKtFy4hceSDWzUd4yHL5pDAOguX5NSoQqOGNR6kRHWhu874gHUEPJ9Fd8REOmO4zFFwBXIWuFgSE3EmPKbEZjZ42sjJMJhNiYLgQ37gesDdLrMF9+fn/FX7D9bUnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9d7v3G+jNUwkQiFovFO/9PzwFlJKfJTETZg38eyFlNA=; b=MefZXrgsBdszL5P/XSMTyU/7qASTMvMH8YdASWTNO4wrdbSIo04VkgaeWT/3Z7BoVTQtf/M2D5UxYmBC47IcaIZCV6SCCPrGSvrbAtzVOVtq9YB6RtmnZakLVM0w0ei2HnZRi9JbpMHSZkDOI2JSP+MsgoWBsBnSCobGfXoDW/1yh5CAWepiWDSoZEK2e4ftdX9SN8/ZRYEz2X+iciZZQMGO+AT+YDCwX3vK4R2YqigD4l13SGhNgBPDHaCx5SorgU8zrx1DbrFG1j8z5rQcLFAXemHhO27uxl0V9uApUdMq2/bONHbyJVD602GbxnjtNbrtbn7xYv4EZvVpdT9G7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9d7v3G+jNUwkQiFovFO/9PzwFlJKfJTETZg38eyFlNA=; b=og49aV2ZAuRfZcedQJjJUiHzWjGYZLxxLVI9qjpzi+TS7YjiIqf2sDvOFXCN3RsR5HuitA+GRXQo5csRimwlw80DzHfEa75/RuCTYKAhFTfW2D9u16LjhxE9YCt6D2GetRLNdVSjRgMCHiziL1RxT2fyTDJr/pyNxqP/y1Z4XRU= Received: from CYXPR03CA0046.namprd03.prod.outlook.com (2603:10b6:930:d2::19) by LV8PR12MB9231.namprd12.prod.outlook.com (2603:10b6:408:192::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.21; Thu, 28 Dec 2023 10:21:31 +0000 Received: from CY4PEPF0000FCC2.namprd03.prod.outlook.com (2603:10b6:930:d2:cafe::30) by CYXPR03CA0046.outlook.office365.com (2603:10b6:930:d2::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 10:21:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCC2.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 10:21:31 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 28 Dec 2023 04:21:29 -0600 From: Shyam Sundar S K To: , , CC: , , , Shyam Sundar S K Subject: [PATCH v2 3/6] platform/x86/amd/pmc: call amd_pmc_get_ip_info() during driver probe Date: Thu, 28 Dec 2023 15:51:01 +0530 Message-ID: <20231228102104.1785383-4-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> References: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC2:EE_|LV8PR12MB9231:EE_ X-MS-Office365-Filtering-Correlation-Id: 261b103d-26b4-423b-3b9a-08dc078ec300 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zlUYMz0lMrUSd8XAMjBxG8V/WY/ExhqrUNj68nCaqMXmqYUVE4OvdQZvuxoIi9mLvqtsfYeOucVaTCSp4SayST5LsWqVBFa52SBEnoRfEV4w0rPU5Hm47nfsh5AvberTEJfMA1yOoznKCkKjYjRZL+5m7hubwcl+9oQRR6kGMH9EPPttiHcr9VQs8Z2thos8tqzym9xIJjZAICNicAxqf+R+KzHvbA79JCkorq2f3LdtfCDBH6N7FrQguDRrSKs/70S9Qm2w95qQBA41LX5uGbD3xczZaWmUC746nsara75XflvtXP50XSs2iAJmLxh3GLcXBo6pAJ12ZVFEULzmxHPtuRsMjvEvppubmiFTw7DiIMAzq1wii1YZRrAdJKOteaN589kCQ2xENApT3skJF0JXsPbmonD//rioNvKUBlO2ZKsbazynlVI4Lbr9S9vkNFYdywAx0vIwg1OiqyFoBIX1unLle4kKsNjnr7nljFP6OjKviKAwdWQ6yrpxNPM1ZykxKlEAKdpZCQksGSgb9Y0rMxbyTHT3cU1q4lUp9sPqSo0cULknD7FpLmiCbvHtuHb4hmVV6eapMQjPLxmi4SBHzSTVnYsn2Mh6zkuemUjKp6p/0oIw50rjjvLOx+tX1Taxle610XoTkIXHkLPxm4uLOu9K/EDQA4KX9iPeNwJSYX53/Tu35k9VQSpx8iJNWU+MeNUvXg6kump6z97G3JUrBw8hXnnDv/ZbBsdTbMPN4x2r/uDtBn0Uf65P9gtj6e25kdodYbQstcKwB3PTWQ== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(136003)(376002)(39860400002)(346002)(396003)(230922051799003)(82310400011)(1800799012)(186009)(64100799003)(451199024)(36840700001)(46966006)(40470700004)(36756003)(40480700001)(40460700003)(6666004)(7696005)(70586007)(70206006)(86362001)(16526019)(426003)(81166007)(356005)(82740400003)(2616005)(1076003)(26005)(41300700001)(83380400001)(47076005)(2906002)(5660300002)(4326008)(478600001)(36860700001)(336012)(54906003)(110136005)(316002)(8676002)(8936002)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 10:21:31.6996 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 261b103d-26b4-423b-3b9a-08dc078ec300 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC2.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: LV8PR12MB9231 In the current code, amd_pmc_get_ip_info() is being called from amd_pmc_s2d_init() and that code block gets enabled only when the STB is being enabled. But the information from amd_pmc_get_ip_info() will be required outside of STB usecase. Hence move this call into driver probe sequence. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc/pmc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index 0511b7f3c2b7..6d6e5b9e56d8 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -980,9 +980,6 @@ static int amd_pmc_s2d_init(struct amd_pmc_dev *dev) /* Spill to DRAM feature uses separate SMU message port */ dev->msg_port = 1; - /* Get num of IP blocks within the SoC */ - amd_pmc_get_ip_info(dev); - amd_pmc_send_cmd(dev, S2D_TELEMETRY_SIZE, &size, dev->s2d_msg_id, true); if (size != S2D_TELEMETRY_BYTES_MAX) return -EIO; @@ -1090,6 +1087,9 @@ static int amd_pmc_probe(struct platform_device *pdev) mutex_init(&dev->lock); + /* Get num of IP blocks within the SoC */ + amd_pmc_get_ip_info(dev); + if (enable_stb && amd_pmc_is_stb_supported(dev)) { err = amd_pmc_s2d_init(dev); if (err) From patchwork Thu Dec 28 10:21:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13505822 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2042.outbound.protection.outlook.com [40.107.220.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7B5C663D2 for ; Thu, 28 Dec 2023 10:21:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="nv5xSmrl" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fmbaTQ3ZX+QBKkJLrNamBZ+roWDqmrdNKdpSFh+DISmankKE4iXS7bL7CktgXaOhBNBd6H2VOpzw/1vZxUi8yjbm98620dvaPo/1rEt++hnEo7oPCy1VOaWtxdlaU617nZ1AyvUELSDBdx1teXV4x2IExl5n70E5DjeaXayZQnNLzopWHX9/+9VlOCx9x30p+5XSnUbqiqMVbUGbZG5DBOX90mEWZ1FPJcljboPNI3wRLhXCfjxqAzy1DIFDMrCDaUD2NWsjVMrEQMlbrFFEm93kxvBvN1y9DK2yl6Hpmxz8FKf9H7Ei1wvHe0n7veHvO67a9KKPQRp2dIxhKmjr0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ylHz6nQALhA1TPlP3OzzG7ZVVbCtZTtOg/3ZkGxs8pM=; b=ddNezupkOp/y6NgagLUxNdQk9homndmpsrD7f2ukl/lRFzsTboazqh3P5VH4WnpzO+gpGQuZSGnCatLQJR7bVQL3V5+xF8EaN3JrUoFGjva/5GXL/iqGfs5cgx/sR5qqyeGA1O1VIRjg5t5Ru0USzKXH83YxwafkMvTGZTo12IC9HOKNctpMRRdxCLZU7tgruLtPP2P8R6Ps22FJTjKHY+/wyMPA3oQFImPjKEbOpgTiEoswkgbZ80RcWnIvKhAZ/8kqvhpFKv3XM+X3hTnygii+4tR0gPzM/VNkNM42Ldqjxcl7AeoLRZpymnkJUz3M0PL2g0+R4KJEj/ZftlFjMQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ylHz6nQALhA1TPlP3OzzG7ZVVbCtZTtOg/3ZkGxs8pM=; b=nv5xSmrlUCs6Poo79PqpAZiJX8Xqp8PAgS4jeREiiIMaUJKlddAX2MHwQxop87JVrvnI8wwiyWkmKZ1TV86U0M1ILfNvCgoPMEF2+NEe3bVIt7EEYHb2eD/E8lEKNebAfe87JkzYGN/WkIf27bbIW35Yp7JlzFhzPymZyi+1bjc= Received: from CY5PR15CA0240.namprd15.prod.outlook.com (2603:10b6:930:66::12) by IA1PR12MB8468.namprd12.prod.outlook.com (2603:10b6:208:445::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Thu, 28 Dec 2023 10:21:34 +0000 Received: from CY4PEPF0000FCC4.namprd03.prod.outlook.com (2603:10b6:930:66:cafe::6b) by CY5PR15CA0240.outlook.office365.com (2603:10b6:930:66::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 10:21:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCC4.mail.protection.outlook.com (10.167.242.106) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 10:21:33 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 28 Dec 2023 04:21:31 -0600 From: Shyam Sundar S K To: , , CC: , , , Shyam Sundar S K Subject: [PATCH v2 4/6] platform/x86/amd/pmc: Add idlemask support for 1Ah family Date: Thu, 28 Dec 2023 15:51:02 +0530 Message-ID: <20231228102104.1785383-5-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> References: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC4:EE_|IA1PR12MB8468:EE_ X-MS-Office365-Filtering-Correlation-Id: 524c505d-f4f8-4d05-b51e-08dc078ec45c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VoQ5w7/dw0YyfU8Ke6hoLgg+ARVJeWm4l7f3WTW55xrfpXrl41CRg88K5C1yi2pV5/2JIOWoAfpLDaLo7WJYH5RExuEDdBi75r44exir1fQV0o5At0x5w2DADpTK5OptGXSuq2xVsZIvJWWWvurXjIQWT5sptqh83vnkcvg0Br5GjZrzBKYgrKqgqgG1N8nNWYX9a+r3T1ZxFBSpdVkQ9rlkls4erYMQiu3vaHVlJORuGYGWtNhNfi5oRSUFU8bEUEkPTDPnzkF+0EIlAH7KsGOyIEPen/DNbcmybw5bHh2inDNbIEmAyhCKWHR35Qcj7DGdwhJh6G3/CMOZCQTOQFCnkleG79MqDh6vVmGH/yyOV4kNAIbVJzPT3//k9+r2bpowMIwjBViTw19qn4owruNOg7RdDOCBp99ubaFioMVuLZuFVlJwDd1EBNsHG2N+qJijTIc4zZAkIcRX90uHO7qkBam6ZlpbtbSnzpBDiB1ecd3cs8w6lgDupC3Kol9/KUqxoenltauZDzIkneWFNwUmY47UPl+ZbddriUuYTfXxXFGMcWpHAJeXmYHXoFcFXA+PzprkW6l+ko+2x7PXonJrsv/KfNybGhc1mdcV+5KbpdWpXUd3TUMdppYQ7xEf2iaUkNs9qXpGHyEq6G0tuxWee0uNaYuC8iSlRfgHPuRwKKkxQSqpizZDTFmw6jMryWxL3ILP/5e7+x41knjCeVebqSKnK14eYhB4NVgCCiokEA/QeRQUSsUDWdBdGOKXGBUKGp0AbCVIzJM7pFpkcg== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(396003)(346002)(39860400002)(136003)(230922051799003)(451199024)(82310400011)(1800799012)(186009)(64100799003)(36840700001)(40470700004)(46966006)(5660300002)(36860700001)(2906002)(26005)(2616005)(16526019)(336012)(426003)(1076003)(478600001)(41300700001)(86362001)(36756003)(40480700001)(40460700003)(110136005)(81166007)(356005)(82740400003)(316002)(70586007)(47076005)(70206006)(54906003)(6666004)(7696005)(8936002)(4326008)(8676002)(83380400001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 10:21:33.9834 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 524c505d-f4f8-4d05-b51e-08dc078ec45c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC4.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8468 Idlemask is an indication of each IP block current state (i.e. whether it is running or idle) during s2idle transistion. The newer 1Ah family supports this feature, add it to the support list. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc/pmc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index 6d6e5b9e56d8..60c95ba5a831 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -38,6 +38,7 @@ /* PMC Scratch Registers */ #define AMD_PMC_SCRATCH_REG_CZN 0x94 #define AMD_PMC_SCRATCH_REG_YC 0xD14 +#define AMD_PMC_SCRATCH_REG_1AH 0xF14 /* STB Registers */ #define AMD_PMC_STB_PMI_0 0x03E30600 @@ -603,6 +604,9 @@ static int amd_pmc_idlemask_read(struct amd_pmc_dev *pdev, struct device *dev, case AMD_CPU_ID_PS: val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_YC); break; + case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: + val = amd_pmc_reg_read(pdev, AMD_PMC_SCRATCH_REG_1AH); + break; default: return -EINVAL; } From patchwork Thu Dec 28 10:21:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13505823 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (mail-bn8nam04on2072.outbound.protection.outlook.com [40.107.100.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26B5863D1 for ; Thu, 28 Dec 2023 10:21:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="cw8ac9pK" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K5Idvv2AW9yuvTm6fe7nlGLYVjU89HbgEIbSYk3Vg2kNHsBCNx1lM5O3aMZeQvu/PyB0OJ0KECdSK62VAnLq6Er1hyLZG/4Ok6PVFGeG7OUs/f2dFWxrCsCyco5RjfpjzTbf+vyTD1et6gK+meLslnbZbXWarI7eJOG7UpJQC0tcss3wnozUYtippFQkX0QGaaklrM/B50InrUwVHiTtHA/Fp0MMsQjxJ0YFmygmXx37AEn4gnh5ZyGCbMvmlEzEkM8JfrAHSeyKt+4u+Uq4PgDSfUvs9A25X2pMMoMmW+faaFJqB/2TDXopnzuLtMht5dgEGDI+XY9yg75d+8/YMg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KTTOYk8Dm+5wncqplbu3BFL47K3No0SRilcjHfUr+Ak=; b=cqraZP0bptXJrIPLzfbPVpPURFz4eiLmeeEzxwtf+6pkRXI3O/O0FTzyAuYVtg64hpbppkl+lhf2ccpJnS43lito+XrrDeeCuKLEGcbZENysbP59kDHVwblQa0wXsEMcdHYLskW8ERdH0aOlIhKSkVh2QyxgnPew5IxsxNp/cTPxnRtAwOMzo6lMWQKMb606bQEmfIol6JjvovdF5D/2CPIjOg6MTPo1op/OPCoI1tnLAhjAgQYyilCRPD6pjjcrFxN/8vwS+j6Jrz4V5fCxQ+p8GM8IQ8oZ8rv1uxoLVJsfnbdTz61Bgzx7eiBsVbdLiW+lDvJBh3/TCLU0O54VHA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KTTOYk8Dm+5wncqplbu3BFL47K3No0SRilcjHfUr+Ak=; b=cw8ac9pKtqJRXixUmy/veiKNoJLd/nxDSY7ekVaPSodWAn+PJEfIb5zLaQsa4pFyDM/aQV0IRB38mxgkuECWmoluvlEalKvlscPUgSyrwlW0kHLwpZzA0oM9JpBuIwEJNCx2WIw1Eo+vx4jvsuIgiDudfbTtWRnxqWFo9E5boV4= Received: from CY8PR11CA0022.namprd11.prod.outlook.com (2603:10b6:930:48::6) by SA1PR12MB6918.namprd12.prod.outlook.com (2603:10b6:806:24d::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Thu, 28 Dec 2023 10:21:36 +0000 Received: from CY4PEPF0000FCC5.namprd03.prod.outlook.com (2603:10b6:930:48:cafe::b7) by CY8PR11CA0022.outlook.office365.com (2603:10b6:930:48::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.20 via Frontend Transport; Thu, 28 Dec 2023 10:21:36 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCC5.mail.protection.outlook.com (10.167.242.107) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 10:21:36 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 28 Dec 2023 04:21:33 -0600 From: Shyam Sundar S K To: , , CC: , , , Shyam Sundar S K Subject: [PATCH v2 5/6] platform/x86/amd/pmc: Add 1Ah family series to STB support list Date: Thu, 28 Dec 2023 15:51:03 +0530 Message-ID: <20231228102104.1785383-6-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> References: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC5:EE_|SA1PR12MB6918:EE_ X-MS-Office365-Filtering-Correlation-Id: 0e19dc49-eeed-4cf9-3c8f-08dc078ec5be X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CkowkxxKZjEa9DRQ8YCsenujwEvYIaq/DIX/bullLZ9XhcrUCYWSwPkHx9OmiawoNX0fWAiDymgqFImKsQ0Q5EM1AyhQR1z+gBWzygQ11M8AMT7aIJuMIOu9eR/VNSPyq2K7oUFu6DvtjPKJ/LyuJYHz9eiMNOWTJxPLTMh3uVfko0+oTCQaSsFH+UatNC7N+nuU2TeWDwVXnlyv2xH9yo0S2gm8QOx+/s6PVaA8Qd521IGWLUZt2lSDisbYHjQSrP/9PxC4hD8yFI/VoaEne1XJxpCo2brQFJBOb+yuXktpnk6yUOTRRGGp5gEuE7SoKc5A8PK0ymYHXq/W+k9YuvtCzFZTj9jlSpe3x0WMRxFnmx31CbZkmnDL6oTMQPXiqsWJQYpBNb9jybPy2cWEifz5e/K8EqgZdQOecA214CnvN0X5zFtF3bX5IOrBhecuYCoDXI7Ui8VVIqk4uMXi3tVbIE5Tes2TkRYTMDjLj1mi/nwIbXcm7oZ+b1IYWbIWxLRDP6cKtm8MOb3RwoJel2H566qWJ5cAm/N2IRBHcziR8YYBG4ok75rkV0+/V7pW5m1LmTWki+TXZOQkxzvHM1y3S4bmAJDGvIwuWGfjdjH9Iv9Foc7zHOjNmhRk/fJ8xK4D+AbIX86XOxE/Ky+ulAVWqhBeJA9LW+8EvPUtTxAZEhzBWoaeO9neXUFyOHO8LMmQVm+IWy4DuTsPFhmH1KccBQfw4J5iJwA/TFbJbS1N9bnA2Y+VcTEU9UIK7p8loGsOlG9cALcjVDFDZRUHhw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(136003)(39860400002)(346002)(396003)(230922051799003)(186009)(451199024)(64100799003)(1800799012)(82310400011)(46966006)(40470700004)(36840700001)(356005)(82740400003)(47076005)(81166007)(316002)(110136005)(54906003)(70206006)(6666004)(7696005)(70586007)(8936002)(4326008)(8676002)(1076003)(478600001)(2616005)(26005)(16526019)(336012)(426003)(41300700001)(2906002)(36860700001)(4744005)(5660300002)(40480700001)(40460700003)(86362001)(36756003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 10:21:36.3159 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0e19dc49-eeed-4cf9-3c8f-08dc078ec5be X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC5.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6918 AMD newer platforms, (AMDI000A or family 1Ah series) also supports the STB functionality. Add this to amd_pmc_is_stb_supported(). Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc/pmc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index 60c95ba5a831..c8d86dd392ce 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -637,6 +637,7 @@ static bool amd_pmc_is_stb_supported(struct amd_pmc_dev *dev) case AMD_CPU_ID_YC: case AMD_CPU_ID_CB: case AMD_CPU_ID_PS: + case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: return true; default: return false; From patchwork Thu Dec 28 10:21:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shyam Sundar S K X-Patchwork-Id: 13505824 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2040.outbound.protection.outlook.com [40.107.236.40]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3771463D1 for ; Thu, 28 Dec 2023 10:21:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="IU296SNa" ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O6c0upKShAU7LtX2jFcsUbw1QwDU2Z0A4WrFcf0ik0zXgZ6vBwnAfjR/iO8qXJRgpk3YMV5NgTmpZxKImkt71UneDeb7FSMZ73JR0B0iCml3Xb+bShWaWJ46MBoPEa2qS26HgVECubGmjUGQ3XrncqbDcK6ctweRjOQP5snwV05b14qpdB0JleHHyGrYgodrFtO4fMqa9KWzdYz5vYurXqVHw9LmYg6vQ9fqDvAADqplfhcSL7DFZ4x9cYmtrIaOQ0os/jPe0jN6Ywz8yxK/3Ocy8u1lluOeQIshv6TfJNWBGSldFPxTI5jlO8sK8ZmRK3QGjX4z1A19ZntUWdKZjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=FkXhISlrfU/yD6o1HneCfy5VRWowgObVDV/UijCzq9M=; b=A0c49ngpTRBNj23OSr8AaGAR8iW55O68iqulEkG3d9H5sVDajTp/+/mvWaf1wQ9qx1pmJz6PiaU2+Q7o3oDeWYgSHr80aunBYk7z2gFSd8N2Sjg3XFet/QP0AdNWWnrkAKPNd+z6WNgfPu7mCND87isFN82rWWOzDehFxzcGS/hrHkZJM3dcPFrT6+I38U2XLwtcoY1wdWLXONJ29k8Iw3GA0iqh+jyV3GoUN3UegaksBXHPdt+SI9Akno8oriOtdBZkkRAnwODBTmCTpTgvYj9zDHSPLOeqRjD0luAW12ctiL5tAp0RxE4ERx4KIpVOEONusjLwtw91qF0RnL0m7A== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=redhat.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=FkXhISlrfU/yD6o1HneCfy5VRWowgObVDV/UijCzq9M=; b=IU296SNaUhcr+u/weXa9jZMFG1oiT1eIdXe8xRHNzctH+eePPGPMPgXX8/e83viBYaWizFgP5vYPHHLvf45M7NODVFFzDN96tBp6NVPTVKzf86k5hqu0hyf5jWX7C2aqenxcUNNXpWc/ksU7l30eV1ofCAdjFHg21tsd13k5y7c= Received: from DS7PR03CA0006.namprd03.prod.outlook.com (2603:10b6:5:3b8::11) by PH7PR12MB7818.namprd12.prod.outlook.com (2603:10b6:510:269::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Thu, 28 Dec 2023 10:21:39 +0000 Received: from CY4PEPF0000FCC3.namprd03.prod.outlook.com (2603:10b6:5:3b8:cafe::b3) by DS7PR03CA0006.outlook.office365.com (2603:10b6:5:3b8::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7135.18 via Frontend Transport; Thu, 28 Dec 2023 10:21:38 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CY4PEPF0000FCC3.mail.protection.outlook.com (10.167.242.105) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7135.14 via Frontend Transport; Thu, 28 Dec 2023 10:21:38 +0000 Received: from jatayu.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.34; Thu, 28 Dec 2023 04:21:36 -0600 From: Shyam Sundar S K To: , , CC: , , , Shyam Sundar S K Subject: [PATCH v2 6/6] platform/x86/amd/pmc: Modify SMU message port for latest AMD platform Date: Thu, 28 Dec 2023 15:51:04 +0530 Message-ID: <20231228102104.1785383-7-Shyam-sundar.S-k@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> References: <20231228102104.1785383-1-Shyam-sundar.S-k@amd.com> Precedence: bulk X-Mailing-List: platform-driver-x86@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000FCC3:EE_|PH7PR12MB7818:EE_ X-MS-Office365-Filtering-Correlation-Id: 3988ac1a-a375-4ff2-87e3-08dc078ec725 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wANpakUt4zBkfIS/HcYidyALThU3DuV+RTksSw8YHK4zYFbzivyqL4qaFDBakgDsa6aMRQfCgtmZxP5+RLRBSSgrcUxq+8dhOQ9+Y6GU8FCAZ3n3NagZDeQiAs0Iwr/r4YRQtKX7nNEXvy+MAv7LpPt2f651UquRmsIcuQ3yOqKwcrpZaGjxEeViGLxfTP/zV8Fx6Kk0aYBLU5VJqF5GMBt8DI/+BceBW6SHW9AIHXmawQq2MnYFq3JH6fzgchA3X/LsUGsQrmx0U2Pfdksh1G+xDdjTh1BcOl5HC/lpZt5LPbznVZPSXCRCe/bT+AYG8sR3jb61sbvJmh01ek7L7jDcBDnWBm2qCpBN8oz4cT8RTeKOLN2IOzDlQvO4O/Dz6imvlFrGivK2Kz4hkmEf5k1npdDdZ5H0N8WutK5mlwrKXL73djhrKPXyt1XPGbHgdekzP75lMB7JO4kcxmpR6qdr3yxFcxk3nEq51LYFhsJOslQxb2dpkO58FiJBYQAH1MuAP9pnCDgEzNqUU9/bv6/iu2whuwqTAipObfd5e4gYFyoAgjZmcgiU3RjXAEEe0ev+gauFcvm6wdWM0tXfkay7/K8Rl9wmgSIpe3B2O1ok+zdKfK9wiFDZtW++zwvhbi6cPFVjo3mpXe/yiwvJPsQKtbtm6TswQYgCYCgBhqGlNTERs1cxkfR76BEvZTx19Eh4zOz3noOuSKq0/QaJkZ7UYZEL40XSi0uTtM1N7AKnyPDSQp0JemDHl5ARfHbrHART6Q/4Fa+BFgXcmiI9RA== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(396003)(346002)(136003)(39860400002)(376002)(230922051799003)(451199024)(82310400011)(186009)(64100799003)(1800799012)(40470700004)(36840700001)(46966006)(110136005)(54906003)(70206006)(70586007)(7696005)(478600001)(6666004)(16526019)(36756003)(336012)(426003)(2616005)(83380400001)(26005)(1076003)(4326008)(86362001)(82740400003)(5660300002)(15650500001)(356005)(2906002)(81166007)(41300700001)(316002)(8676002)(8936002)(47076005)(40460700003)(36860700001)(40480700001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2023 10:21:38.6550 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3988ac1a-a375-4ff2-87e3-08dc078ec725 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000FCC3.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB7818 The latest platforms use a different SMU message port(0x938) from the one currently being used (0x538). Make code changes to adapt to this new information. Signed-off-by: Sanket Goswami Signed-off-by: Shyam Sundar S K --- drivers/platform/x86/amd/pmc/pmc.c | 8 +++++--- drivers/platform/x86/amd/pmc/pmc.h | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/platform/x86/amd/pmc/pmc.c b/drivers/platform/x86/amd/pmc/pmc.c index c8d86dd392ce..acac2a4194d4 100644 --- a/drivers/platform/x86/amd/pmc/pmc.c +++ b/drivers/platform/x86/amd/pmc/pmc.c @@ -31,7 +31,6 @@ #include "pmc.h" /* SMU communication registers */ -#define AMD_PMC_REGISTER_MESSAGE 0x538 #define AMD_PMC_REGISTER_RESPONSE 0x980 #define AMD_PMC_REGISTER_ARGUMENT 0x9BC @@ -362,14 +361,17 @@ static void amd_pmc_get_ip_info(struct amd_pmc_dev *dev) case AMD_CPU_ID_CB: dev->num_ips = 12; dev->s2d_msg_id = 0xBE; + dev->smu_msg = 0x538; break; case AMD_CPU_ID_PS: dev->num_ips = 21; dev->s2d_msg_id = 0x85; + dev->smu_msg = 0x538; break; case PCI_DEVICE_ID_AMD_1AH_M20H_ROOT: dev->num_ips = 22; dev->s2d_msg_id = 0xDE; + dev->smu_msg = 0x938; break; } } @@ -673,7 +675,7 @@ static void amd_pmc_dump_registers(struct amd_pmc_dev *dev) argument = AMD_S2D_REGISTER_ARGUMENT; response = AMD_S2D_REGISTER_RESPONSE; } else { - message = AMD_PMC_REGISTER_MESSAGE; + message = dev->smu_msg; argument = AMD_PMC_REGISTER_ARGUMENT; response = AMD_PMC_REGISTER_RESPONSE; } @@ -700,7 +702,7 @@ static int amd_pmc_send_cmd(struct amd_pmc_dev *dev, u32 arg, u32 *data, u8 msg, argument = AMD_S2D_REGISTER_ARGUMENT; response = AMD_S2D_REGISTER_RESPONSE; } else { - message = AMD_PMC_REGISTER_MESSAGE; + message = dev->smu_msg; argument = AMD_PMC_REGISTER_ARGUMENT; response = AMD_PMC_REGISTER_RESPONSE; } diff --git a/drivers/platform/x86/amd/pmc/pmc.h b/drivers/platform/x86/amd/pmc/pmc.h index c27bd6a5642f..e5b25d27ad78 100644 --- a/drivers/platform/x86/amd/pmc/pmc.h +++ b/drivers/platform/x86/amd/pmc/pmc.h @@ -26,6 +26,7 @@ struct amd_pmc_dev { u32 dram_size; u32 num_ips; u32 s2d_msg_id; + u32 smu_msg; /* SMU version information */ u8 smu_program; u8 major;