From patchwork Thu Feb 1 16:13:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 19796 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2719:b0:106:209c:c626 with SMTP id hl25csp266411dyb; Thu, 1 Feb 2024 08:15:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IEwCCPIQOexWTbRXldXxdoIaJs9p7UOpAjBhkeq1hUGJTet86PRVuIbwDEjn/Dp1JSiOv58 X-Received: by 2002:a17:90a:bf12:b0:296:1804:1d21 with SMTP id c18-20020a17090abf1200b0029618041d21mr2146081pjs.15.1706804145547; Thu, 01 Feb 2024 08:15:45 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVb8T9wSLirPR1qYAkJ7q59/1yRM+mqgxfzNCROIr5t7ITkvTzHNSdkMgOHKj9K0DYKTzaezmnOVxBW5r2ll5zt+NFmww== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id t2-20020a17090b018200b0029053d49842si35465pjs.15.2024.02.01.08.15.45 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Feb 2024 08:15:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-48487-ouuuleilei=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=@nxp.com header.s=selector2 header.b=V3NPFSZI; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-48487-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-48487-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 3C16F29D30B for ; Thu, 1 Feb 2024 16:15:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73FBA15CD48; Thu, 1 Feb 2024 16:13:53 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="V3NPFSZI" Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2088.outbound.protection.outlook.com [40.107.104.88]) (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 0D65E779E2; Thu, 1 Feb 2024 16:13:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.88 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804029; cv=fail; b=nx+VmDCYtNkp4StdXFDF61XCrbzY5u+ju2hnz5/7ypFCqckB2zjAJ90bEmx5iiRQg8XCdylc65vK4lrN+TSHG3lg1rxzL4zfXtmlwmMugHdocf6fFShI4akxr+cqdxTR0Q5Xmdgtj5FZYGLXFJuGjJabpk/w/GROUmUs4N8p1To= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706804029; c=relaxed/simple; bh=l26KsReRhgM2C7kbGDUQzugdouvzriphT23lNWx0xPI=; h=From:Subject:Date:Message-Id:Content-Type:To:Cc:MIME-Version; b=FNAPC5TqeszrDJ96tWepYgZ3BV63DsAfSuwBJUKvMbpl6stlquXVc9kT/lRBnKLKf44SCImV9z07zIaK/4w+FT+wZcA13M52VkR8vd8WWdtdBISILU3J50KIB185ZANyjdRvPNC27uG1IISi5RW75xU9nqZXD1mkJmAilIJs5Ms= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b=V3NPFSZI; arc=fail smtp.client-ip=40.107.104.88 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=CSD+eekJYQAdU2xpd9Kvcpgev9Kmku3aNsCHqtK6jaNt+pmTLn4nYouAcRJLwsmCVvSaSqOPb5J/TOrcPVaTXeHGVmPfiW8S0tyCY3K6//kM2Ab7PhiOIckdzDj9tdO2z1lWEK79yMSy68Qsyu94gNz1Y+fCaynHdpGK5CmDK/5KIoulttpiVXi1XhQ72nLbGT4G+stvhfn/aFOpwQnt/0Y7ndfPoMHrVA7Y8/HM7QSy8Z6o/JmWYmi73VKCYzaueuB3ZdCv9Q95p000VUKBxgdrFPG1VDPXGZ0nr35S/eW0ppsVsoX40bQt9NO7jASZwDlQoZs/AifcXdP/0kj1Iw== 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=tekF0dzNY3P4bRczl6CIJryxj96n+dq2Y/qjnOHeBqM=; b=hEKSPXX+V6spxBAAtTxsSoJwRBFIJ1ZZKzqf0j3D1LV7RwewMFDAkOxsOl+wB9DGnYpKv9G79PP3yLF79t8Rm/UVa2FC8a4j7vfzeQWq0jxqN0dQVqjWwQ5PqOZBC3xfEC4iBVLstBtthODeVMAKf5WSkHzlPa3BpSb5BKzGFOU6H6JHPuu5vlaKESrAPOGKfiEPpi/wtKClICHvLDRmmW3MRLAgvJtr+xJz4H04tmiPohL/VYsQXhm3DMhpiQNCAbTptJabpXq6xzoLaydnSk6u2Q7uKy3ItWQlL3Jz7vroXOKc1ekKbekJusYlw2ygRWXL+Yg3loZongG7eL+Tww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=tekF0dzNY3P4bRczl6CIJryxj96n+dq2Y/qjnOHeBqM=; b=V3NPFSZI8XAdThDTFJz5GkLwqnrh8N9058guccXSz1ohEeGZbpykIP/KERzhj9nrdYqRON2S5CB74NkXJbje12oqp4tfJQD98c3ZxYFRhxAihTLlwl76X8cKNmECgx1C9tixQGSXarbC2bPOowcCRbAz/mwe53t2bdFGM5hujL0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by AS8PR04MB9110.eurprd04.prod.outlook.com (2603:10a6:20b:449::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.26; Thu, 1 Feb 2024 16:13:44 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::c8b4:5648:8948:e85c]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::c8b4:5648:8948:e85c%3]) with mapi id 15.20.7228.029; Thu, 1 Feb 2024 16:13:44 +0000 From: Frank Li Subject: [PATCH v2 0/6] PCI: dwc: Add common pme_turn_off message by using outbound iATU Date: Thu, 01 Feb 2024 11:13:24 -0500 Message-Id: <20240201-pme_msg-v2-0-6767052fe6a4@nxp.com> X-B4-Tracking: v=1; b=H4sIACTDu2UC/2XMywrCMBCF4VcpszaSRKvRle8hRWpmbGeRC4mES sm7G7t1+R8O3wqZElOGa7dCosKZg2+hdx3YefQTCcbWoKU+SnWQIjp6uDwJRI1GEV2MOUF7x0Q vXjbpPrSeOb9D+mxwUb/13yhKSIG9fsoRsbdne/NL3NvgYKi1fgEuLbwOnAAAAA== To: Bjorn Helgaas , Jingoo Han , Gustavo Pimentel , Manivannan Sadhasivam , Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy=C5=84?= =?utf-8?q?ski?= , Rob Herring , Krzysztof Kozlowski , Conor Dooley , imx@lists.linux.dev Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Frank Li , Yoshihiro Shimoda , Serge Semin X-Mailer: b4 0.13-dev-c87ef X-Developer-Signature: v=1; a=ed25519-sha256; t=1706804020; l=2913; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=l26KsReRhgM2C7kbGDUQzugdouvzriphT23lNWx0xPI=; b=ohoHABmi4M2ZpD5Bx77/xDFSKdFNecTnzxlNYQ6yVBEgZHXv1TQ9fsWml0Yfvk/bK0U5VWbE6 3cLMtKuP6l4CTLWiH/hKJtsJuvQHRA70HLS/b/vPDcft170OD17MAw1 X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: BYAPR05CA0065.namprd05.prod.outlook.com (2603:10b6:a03:74::42) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|AS8PR04MB9110:EE_ X-MS-Office365-Filtering-Correlation-Id: 5f6156ca-e81c-43e0-a21b-08dc2340c34e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 5gUR0BrnfJB13vHeUZF8EGmNdiLZJisjZiwQ2mDRvTcW4VRTpMd8IoNd7Xk5O5Hc3dxWgV5SQK67JY0lbtr1G++n6ZXFhJFAFeBQtRBq4Xm011vkditnhBHf8dZdX1yoHEyD4LUbm/UPocXMJB/GKrIuC38ztx5DMSmlLMEJ4lQTV69zAc6hu6JCCc9G/d3qZkZ4d25p/U5S4ADci09hDfVIRbQLpUm4YyePHruIG4wpFTgPeXi42t3WKJ9iAt3kiKZQ/IJRrCZxx9eQ3ueA3IbVFgh5d40JTI34vKyU0OtsK9ht9h35NA0aWn+vU9crhy381uzeidBBc8Ao/wO7w4t/AwpL6DtyqzvATfRCAK164z+UVQj96J9w/x1O+kcBW3QXwBnd9UlN1K3EMSL3DzrRt3xC9Ntdh8+Uup6nyPuLp/HrIBhtdnz/Gvi1sh8DuUAaxD0ZAboTcZkqvOfnR5qCHL0yjP0GL/Uxjodx8zJ/V2Act6IrwT0WZV55GbD7F6agdD6Mk6ywE7oRNy4LfA2vXKl6s9c+7Q28MLwEPh0DnaXVhbp4tAjIuiIwgO53g62jsYc0TI5e2oOb0DP2pJ45h14glheupI8uEm1Vb27Za/gy4f7FT9XQEFpmIW67 X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(39860400002)(376002)(136003)(396003)(366004)(230922051799003)(451199024)(1800799012)(64100799003)(186009)(15650500001)(2906002)(7416002)(5660300002)(41300700001)(6486002)(36756003)(966005)(86362001)(38100700002)(478600001)(38350700005)(52116002)(83380400001)(6512007)(2616005)(6506007)(26005)(6666004)(8676002)(8936002)(4326008)(921011)(316002)(66556008)(66476007)(110136005)(66946007)(54906003);DIR:OUT;SFP:1101; X-MS-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IVRw3uYDWQh5DGl9DX?= =?utf-8?q?xph2U8/AZJJ3J2iUf6xKbhm8eTTFRapPXYxD3RfEOy2obbinj8Z+0JAnYDdZFaPg/?= =?utf-8?q?7k1nBDnPl2Vk8BAifwG4H+l4gXkmnU8E7olELeo0VSXxhFD/XREvGINs+Ov3Ww4s3?= =?utf-8?q?0EWHMHINPCqQ30lA7TTozsTds1vElz4ajRjUDFTzAj96aaO71tMv0Xae5FUp0FRgV?= =?utf-8?q?mNKnhqj/sJJ7eePpZ0L5OxuAAVTDGxTx7SGfv6SFIL2gVgwPYBF4jhEVpRZ/F8Jma?= =?utf-8?q?6yA3MsUNuQZHeKSP9SlyaCfNmkI7VPuLwM7IF6xEEV+jgdyWEqt8nlPrLwie34WHq?= =?utf-8?q?yikrWQZqbFHyKo0ZYdbgfnmV9NTbTVWqNqbxk/X4qWy/aS1AlQBjv6FrhRJuRVl9r?= =?utf-8?q?zYSVZJd/vb88n96J7O8VC7PXEtVRaqhCQWczydHsK2Bs2Vk4Un0HQa+mPDWQQ1rKT?= =?utf-8?q?sImzCPq1Pojlp1AZNAxW5TCqCCE/To/DKkOM+E9eX3wMuMS1Hows32tHJITdtGCnR?= =?utf-8?q?UlZHfTYdpbjZCIG3JuUaVicGicizQVYEHFC8K2Ao+hqPfkeLeiQ0PBGlbk4rkmR4T?= =?utf-8?q?LNmJzr/RWM7TiIngTNuCh3KNltYpZfO5LUqiX+XD5wd+EVRK4AxG2nVZYOO+7B6Ee?= =?utf-8?q?PHhLhAA/ufHwcYEELY3JsSk63n4yRoVzF03169ES/4ydwk7gVrnS5kw0=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5f6156ca-e81c-43e0-a21b-08dc2340c34e X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2024 16:13:44.2763 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 5BdipdeTyCQIBwxIaOA5EGm/DNtf7i1kL5m+g8027jg4NuzpMYVWvYV2+pKlmJCp1UmxZv/PogASqIC4C9/4KQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB9110 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789713863408593390 X-GMAIL-MSGID: 1789713863408593390 Involve an new and common mathod to send pme_turn_off() message. Previously pme_turn_off() implement by platform related special register to trigge it. But Yoshihiro give good idea by using iATU to send out message. Previously Yoshihiro provide patches to raise INTx message by dummy write to outbound iATU. Use similar mathod to send out pme_turn_off message. Previous two patches is picked from Yoshihiro' big patch serialise. PCI: dwc: Change arguments of dw_pcie_prog_outbound_atu() PCI: Add INTx Mechanism Messages macros PCI: Add PME_TURN_OFF message macro dt-bindings: PCI: dwc: Add 'msg" register region, Add "msg" region to use to map PCI msg. PCI: dwc: Add common pme_turn_off message method Using common pme_turn_off() message if platform have not define their. Signed-off-by: Frank Li --- Changes in v2: - Add my sign off at PCI: dwc: Add outbound MSG TLPs support - Add Bjorn review tag at Add INTx Mechanism Messages macros - using PME_Turn_Off match PCIe spec - ref to pcie spec v6.1 - using section number. - Link to v1: https://lore.kernel.org/r/20240130-pme_msg-v1-0-d52b0add5c7c@nxp.com --- Frank Li (3): PCI: Add PME_TURN_OFF message macro dt-bindings: PCI: dwc: Add 'msg" register region PCI: dwc: Add common send PME_Turn_Off message method Yoshihiro Shimoda (3): PCI: Add INTx Mechanism Messages macros PCI: dwc: Consolidate args of dw_pcie_prog_outbound_atu() into a structure PCI: dwc: Add outbound MSG TLPs support .../devicetree/bindings/pci/snps,dw-pcie.yaml | 4 + drivers/pci/controller/dwc/pcie-designware-ep.c | 21 +++-- drivers/pci/controller/dwc/pcie-designware-host.c | 103 +++++++++++++++++---- drivers/pci/controller/dwc/pcie-designware.c | 62 ++++++------- drivers/pci/controller/dwc/pcie-designware.h | 22 ++++- drivers/pci/pci.h | 20 ++++ 6 files changed, 168 insertions(+), 64 deletions(-) --- base-commit: e08fc59eee9991afa467d406d684d46d543299a9 change-id: 20240130-pme_msg-dd2d81ee9886 Best regards,