From patchwork Wed Jul 12 12:20:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 13310309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D718EEB64DA for ; Wed, 12 Jul 2023 12:21:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=DCzny2r97Ckrhhny76SFVW5sfuxnQxaehhzgpTDEvZI=; b=PuSaLdyFV04Dqw pHlHdqNkWgWoestDaOz4sQx4N4uSJQfSuNbFyO0nxv+3I4LS7Kv7X+ZE4xAO2QrgD0Mp6/x/YyQrl +xFXHxba43Ff34lapvs+pUw9EAon6VoZVeyCUlQC6Dc5Hz55wgbrdCg6HqydRW9Okkt5qIgjNAZTI C79TMIZvnXzODn0DTHyJj4XcTBTkcaAWRbSWDwlYiNB+UPgNtMQO7EcHM6wZIDV8ut+s2h78FLeCA YzM2S+BTP9qKLY0Wp5u8IM3UutGRTPUvtgc+moH3Dz30DuI5cLh/9zS3xJbdtFpwjtvqBDPVLmHZh mER6pS6ZHrTa0ZZAqY7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJYqV-00HWAV-0H; Wed, 12 Jul 2023 12:21:27 +0000 Received: from mail-bn1nam02on20623.outbound.protection.outlook.com ([2a01:111:f400:7eb2::623] helo=NAM02-BN1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJYqP-00HW82-1N for linux-arm-kernel@lists.infradead.org; Wed, 12 Jul 2023 12:21:22 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZqU/eawJ68AzAxDOB3QhK4Tv/zvFkPBwv+XHnKr0lRp0929tdPXQZUDqPpTk3GS9gjmv583ryRiKhOT8HddeOrWGbVJuyLNEyejTYxMD2L1tkzEw8eDPw0DVrIQghWDJL5W6IIxaTFZ/p/qLbXrg/evqNpeMMdtomCEY7jS8T08Vf1f+O7qUkojIbOtssHuBV2Df/PuNKFdeV21ksE9VAv/oU6sEIHlbi637R+NP89DgNIapC2b03PXMYImtnAziZ17X10hmAPuLXKwwy11wQEsYwmS9SBBDn7kkHs+MPfuJ2iyncSugtLIY0YGwvj0DnuZ9CkQ34O5wUHS6P3IAGw== 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=fZK2viYlOMz7DiVwGEDNqFdhwqtbL/TD7wUyGaTS2gA=; b=ZEuwWq+XwNbnFDC5kc3afRG5SIISaAk9TFtXb9QM0cnUfAtqXVJBLmUpAfQBt4Ys46HWTaUoIjRWK8xHSJXVkpkILpWBDmIAyp7DHs+BV58fLGW7X3OcRlxpSVxlqfxSwBf+XhRpfTEQ5kSegYjsKHmuh5DJ+oIglSuKdot1ANBZAmUlb2V2eLMvGYrBGm/0XZh1C01GepPv4OLnkdN088vmSwGDeD1gvY3tDP7GpPZunXypJrwur1mpLrTpqti5nXBjEaQPO78vKg4Jxowqi3jZml2eiOSWp4dvNIDN9rCLBV8Xc7poAo7p2rB2ZglzIdL/p/lhkmgDewmVyIN2qw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org 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 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=fZK2viYlOMz7DiVwGEDNqFdhwqtbL/TD7wUyGaTS2gA=; b=rZgcC+PUVFgZ/kGmIZ4skd5oWoDtxncU8jmkqscItm10kBE4Ja2xC6OMMhKqdFyvUUkxF9YcqRi52fDs5KQXeBgfo+wQ1hM2aMSTComOZGu9jvq3OQI8qN39O5o/pcVArP0y0z2tQc7kB/A1t9QX0zOoTT7s5GpvwdG2GG86kE0= Received: from BN9PR03CA0510.namprd03.prod.outlook.com (2603:10b6:408:130::35) by SA0PR12MB7478.namprd12.prod.outlook.com (2603:10b6:806:24b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.26; Wed, 12 Jul 2023 12:21:15 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:130:cafe::f9) by BN9PR03CA0510.outlook.office365.com (2603:10b6:408:130::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22 via Frontend Transport; Wed, 12 Jul 2023 12:21:15 +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 BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.22 via Frontend Transport; Wed, 12 Jul 2023 12:21:15 +0000 Received: from localhost (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.23; Wed, 12 Jul 2023 07:20:53 -0500 From: Michal Simek To: , , , CC: Conor Dooley , Appana Durga Kedareswara rao , Conor Dooley , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Krzysztof Kozlowski , Marc Kleine-Budde , Naga Sureshkumar Relli , Paolo Abeni , Rob Herring , Wolfgang Grandegger , , , , Subject: [PATCH v2 1/2] dt-bindings: can: xilinx_can: Add reset description Date: Wed, 12 Jul 2023 14:20:45 +0200 Message-ID: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=890; i=michal.simek@amd.com; h=from:subject:message-id; bh=VhYAd1TqpHiv1k38ZgdGS3bzP4ZxBzUrP3KJHJ1fWHk=; b=owGbwMvMwCR4yjP1tKYXjyLjabUkhpR1s+ZoC19rPaGjeWXN1LcOHnqcDHM2nk28YHVVYP3bA n1j+/D2jlgWBkEmBlkxRRZpmytn9lbOmCJ88bAczBxWJpAhDFycAjARz1aGecYXp/dInq7ru/39 SufF3+r6P59HrWOYX9zyqph9USmPZd3iFa6bKkv//Z92CwA= X-Developer-Key: i=michal.simek@amd.com; a=openpgp; fpr=67350C9BF5CCEE9B5364356A377C7F21FE3D1F91 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT021:EE_|SA0PR12MB7478:EE_ X-MS-Office365-Filtering-Correlation-Id: 8b8fb459-e16a-486d-a737-08db82d27ce8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +184hJj2nrI7IoUIw+mYei3v17AGmFZ9f+Y1NqVaNxUOtlsP9Ng2yqkB6sUX1qQPWTWHO2sXt+p2sb1mvNO0Z3B2LnNER0O7RjE1TnTCPa4RqMA3pPRcHBEUvCGyR19owKImL9ZxzbLsflLaQIwEwLirz9waahKtkBrMcDOBC6dWr+lNwIpnlMjsypIYqJzjJeEppFWtay/7eArQq9pcpiMvCZ9/VW8VQj1kPhoQI5dX9ysKbj8rhXsHSChnVPhlb2uk5+6xXH4evefnVIYN2K2rphhK5N7z9SHlcA1cTHxHs1QTF3QR5MVMvTQixxF5m/w+W6kJlSgwkL3SnADaywiZroUl0sU8TB74HjhGjqyZEui0heDtTTT7bAGQhfCqwtoyklsq8gmO55gYwO7wzjMecFZlMP/ytQSfOR6rwYOQe4eNnc2gDEQvstY00KTMQHq3X8WxFudHT5q4BvY9zYyjCLjX5i0mByaRs7mlKbv0k71oehm+fvCXM6IOl8GZDcNmgQeedzUrsMf9E3Hx3Cu2YxEFHwER3TErMLD5L0+3b9sr1nXUEcenqq846B3aAc0Padwd1FIpM+o4jh6sv2g/vR8SFPMQXUyYlo3w81s0R2IaHqpRKbbLbTqJyrbeIMbxyoGtkOa8nl8khrNfeSdwdWbIrNu+eZf5cd0nkCHL2TE8CiDCjyJRWVAHScAS0J8cWWkTYWF28edWXK6aY24MokgfNdd+q/fiGyKLuE4qwUrsWVGwLRSj58xGXbmG1LoqENoE7VNCtobEz2hksXJnBDTr4dtmEit0CjExKwY= 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:(13230028)(4636009)(136003)(376002)(346002)(396003)(39860400002)(451199021)(36840700001)(40470700004)(46966006)(26005)(82740400003)(356005)(81166007)(336012)(16526019)(2616005)(83380400001)(47076005)(40480700001)(186003)(426003)(40460700003)(36860700001)(7416002)(2906002)(4744005)(44832011)(5660300002)(8676002)(8936002)(36756003)(70206006)(6666004)(478600001)(4326008)(70586007)(54906003)(110136005)(316002)(86362001)(41300700001)(82310400005)(2101003)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 12:21:15.2953 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8b8fb459-e16a-486d-a737-08db82d27ce8 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: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB7478 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230712_052121_834760_3371B5D0 X-CRM114-Status: GOOD ( 11.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org IP core has input for reset signal which can be connected that's why describe optional reset property. Signed-off-by: Michal Simek Acked-by: Conor Dooley --- Changes in v2: - Add Conor's ACK Documentation/devicetree/bindings/net/can/xilinx,can.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/can/xilinx,can.yaml b/Documentation/devicetree/bindings/net/can/xilinx,can.yaml index 897d2cbda45b..64d57c343e6f 100644 --- a/Documentation/devicetree/bindings/net/can/xilinx,can.yaml +++ b/Documentation/devicetree/bindings/net/can/xilinx,can.yaml @@ -46,6 +46,9 @@ properties: $ref: /schemas/types.yaml#/definitions/uint32 description: CAN Tx mailbox buffer count (CAN FD) + resets: + maxItems: 1 + required: - compatible - reg From patchwork Wed Jul 12 12:20:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 13310310 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 511FBEB64D9 for ; Wed, 12 Jul 2023 12:21:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=qRslN3ahL391TH/ZrjMB5CT/AyWbh3s/jJH03KjFO8E=; b=Ol8Kn+ByVIH3AC Y+i0YDaRCJtcu7PV9VRt8sTUnyoOVKq3t5k4JcSjqd7hxmZfLgrAcl2pzHwC0CtCQEj7O1lstCxIC oLL7CI/rjNnNZdc86pu69fBEZTW54rtlY9jkbH4+1TOgUkA3t+lviaIwKuH32H8tJ7vcHmnRN9JkD h0DJ50IhWiklXoDGvihBvf4mOgNMapG0Oswdu8VO9HRZppWX4Vkht0LmWSyWeshyvGAhkt1dyqJQh QgxBCyHkEpeddHndxVyOTFhJZLxWFB/og7dj+bigq1EMpp/ZDdXOsdRnENJnHKEgp1iOMhFLV17Ur 1j2PXpHEDjmOXZcdyrGg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qJYqV-00HWB0-23; Wed, 12 Jul 2023 12:21:27 +0000 Received: from mail-co1nam11on20626.outbound.protection.outlook.com ([2a01:111:f400:7eab::626] helo=NAM11-CO1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qJYqQ-00HW8K-2f for linux-arm-kernel@lists.infradead.org; Wed, 12 Jul 2023 12:21:24 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=h2RvdASv7me2uF4K2GYEcW2fTmZqhaNVWMYj1OwjJDYRS/Eh/f/NKV5b9T6NoEoH62R2ep7JfWkCNjXbZhV86GPHCHIu6+fVJ776YRN1ihy/stQ6KY0otmPqF/0qWxWF+p8blR4WW1BLsSU3xOImuabldgxQRlpqY5eZwNXqOANLo8yVWoM7yzV3OEREH3mik4BfwuHPXsHdK8Weh5hK23ROKkW/cFtUWBJfuQHU0Vc5M+M+pNK+Ku64NJewpGrgt3tOuWyJVx5mGkbX+yUHNdpjeprVWtAJSujEEP5Hm1hAXZqDqJyI+rf8jGB8OrP88CxWRqlUbl5nsl92rLab2w== 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=qSRPxJPPzUh8j2dtkBxrWA1T6LN0Fqp3ZmASMfuZjUY=; b=J2W/2gLpzxDWUV2tn/ePAU0DeNWl81Hre1eEMSD7bytyRpNwmWAlfYYPzEpYRtVF1XN0GZ0NW8oDsG72N+DhLx+QCX5Ti0Pd/olsJW7ipLvueUJhMdDrhoZ6TeInrV5tOrhlIxTv2C2ejL8m827EQAuSkWIr9o6CKmFK4M7Xb84WbvVQ9mEEF7N4t8h40L0FNuNr2Qphd1RHLilxnBzYVwibXhTtEzPKwso4UTamleNKtXj2PzlUJuFkpMc+w/s0Yvps2cS/EUrWgCnrPmoRcAUIuc2Snkqz5TTYxqxmMtKMlSdPpUSxvtX1tSyLY26D8LJDNJhA3G630DN3G+YmQw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=vger.kernel.org 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 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=qSRPxJPPzUh8j2dtkBxrWA1T6LN0Fqp3ZmASMfuZjUY=; b=Cal/C92YPqqdke5ZFH2Q3pBNgLaWHJuj2bdvBTHpjTzoj0nueaOlE1FqdnIzJi0RLzrBtSL4NTZzqF+W8BTmNGD7bDP5ge15zX1P2sSU6osdIkpERCvB/mDUG7eNd3X0DtrRzh9kayf0zzx0NdoUokoYbDuF3UgQyjLWouWiGfc= Received: from BN9PR03CA0504.namprd03.prod.outlook.com (2603:10b6:408:130::29) by CH0PR12MB5156.namprd12.prod.outlook.com (2603:10b6:610:bb::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.20; Wed, 12 Jul 2023 12:21:16 +0000 Received: from BN8NAM11FT021.eop-nam11.prod.protection.outlook.com (2603:10b6:408:130:cafe::61) by BN9PR03CA0504.outlook.office365.com (2603:10b6:408:130::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6588.22 via Frontend Transport; Wed, 12 Jul 2023 12:21:16 +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 BN8NAM11FT021.mail.protection.outlook.com (10.13.177.114) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.6588.22 via Frontend Transport; Wed, 12 Jul 2023 12:21:15 +0000 Received: from localhost (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.23; Wed, 12 Jul 2023 07:20:56 -0500 From: Michal Simek To: , , , CC: Srinivas Neeli , Appana Durga Kedareswara rao , "David S. Miller" , "Eric Dumazet" , Jakub Kicinski , "Marc Kleine-Budde" , Naga Sureshkumar Relli , Paolo Abeni , "Philipp Zabel" , Wolfgang Grandegger , , , Subject: [PATCH v2 2/2] can: xilinx_can: Add support for controller reset Date: Wed, 12 Jul 2023 14:20:46 +0200 Message-ID: X-Mailer: git-send-email 2.36.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=3587; i=michal.simek@amd.com; h=from:subject:message-id; bh=zjASbYlHTwyXN6GaTTSSuNwXIgN88Y29PGWBuEMwemk=; b=owGbwMvMwCR4yjP1tKYXjyLjabUkhpR1s+Z8Pb2wK39he5xC5ZTCPfwKkSdZdm0+sKAs9tfcZ 1dz9WoOd8SyMAgyMciKKbJI21w5s7dyxhThi4flYOawMoEMYeDiFICJ8M1jmF9QzOZl3RtrPTvS fSHPnSLOQHXzrwzzHQ6y3mC7HC4sr/33w/lo385Io6abAA== X-Developer-Key: i=michal.simek@amd.com; a=openpgp; fpr=67350C9BF5CCEE9B5364356A377C7F21FE3D1F91 X-Originating-IP: [10.180.168.240] X-ClientProxiedBy: SATLEXMB03.amd.com (10.181.40.144) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BN8NAM11FT021:EE_|CH0PR12MB5156:EE_ X-MS-Office365-Filtering-Correlation-Id: fa9d4992-12b3-43e2-3c7f-08db82d27d62 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: CZ/K3zwwJe3USGdCSGRF94WTx/Sgui/l76wnlnMxEB2TxGk4xXz+chWfgbmX5A/3X77+m4ZDian+eEOGf35DmEdGHGoI9OoTJmY6n3iYmMwCjvIdkbLOyWYTwQz2y3Ly2/zaZQIqnrMV23QdvWpL1I1o5HL0feBYZU4orCH2S8sOe3iWBaYt52fleTKFxQh2ejjREBz0Z/YC5hucOHJzr9mhdywLTz2uvpx/ip9vV+cBCttc5+q2AfOfWsDxwcAGAPSd/V+MEDmGMbfY1Jq/Mo0YTLM76CwNoEi0hmlYU3TsKnHpVCYOu150sRA7wd+Nd4fpQQNH+mBoOUlLBBPiWoWHXsItzfTCg325oe7B+hALjDeWkhTyo+3DNiJ44K3R4CDjLoxnj1qbmG+4ptekpQHCa0Q1vqWF/+FR3htBWBhF3SEsOda1eSNBK5PcIrudV4giblLZpWu7cXSifhQefma7QjlHWJ8Z7dk162EHRec4i/4Syf4ibCfY9r1zafqa8WyC11XuuV4xr8wDFjxfTVllVn23YNLHinzDH/jB2MEwXIJlxPZ7soJYE+/gkIemfOuZWfHrxHDw87d7uiJfVLcbFpJ0ZW0Rjyflk4oIxPn9/+/bUfZD2F03K72f2f9kd9BbT9RqX9cjPbbJWVMfNRoorOz0AOH5RcXMNEV8R5PoAB3xm0IS8HbHJ09gdZ1ELot1VyQxyzTlznZZOTEaxQ8JQk/A9SWUQdI1xv+dmuFKFetZBFlDfEwoS6g8h0OuFDCpY0D1b4gGCzBn0yPsHftQUdS3dzlCpZxPkdjqcpw= 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:(13230028)(4636009)(39860400002)(346002)(396003)(136003)(376002)(451199021)(36840700001)(46966006)(40470700004)(41300700001)(8936002)(36756003)(82310400005)(8676002)(5660300002)(36860700001)(26005)(7416002)(44832011)(316002)(70586007)(70206006)(47076005)(4326008)(2906002)(83380400001)(81166007)(54906003)(16526019)(82740400003)(356005)(426003)(336012)(186003)(2616005)(110136005)(478600001)(86362001)(6666004)(40460700003)(40480700001)(36900700001)(2101003);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2023 12:21:15.6703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fa9d4992-12b3-43e2-3c7f-08db82d27d62 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: BN8NAM11FT021.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR12MB5156 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230712_052122_864717_75568D2F X-CRM114-Status: GOOD ( 20.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Srinivas Neeli Add support for an optional reset for the CAN controller using the reset driver. If the CAN node contains the "resets" property, then this logic will perform CAN controller reset. Signed-off-by: Srinivas Neeli Signed-off-by: Michal Simek --- Changes in v2: - Fix use-after-free in xcan_remove reported by Marc. drivers/net/can/xilinx_can.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/drivers/net/can/xilinx_can.c b/drivers/net/can/xilinx_can.c index 4d3283db3a13..abe58f103043 100644 --- a/drivers/net/can/xilinx_can.c +++ b/drivers/net/can/xilinx_can.c @@ -30,6 +30,7 @@ #include #include #include +#include #define DRIVER_NAME "xilinx_can" @@ -200,6 +201,7 @@ struct xcan_devtype_data { * @can_clk: Pointer to struct clk * @devtype: Device type specific constants * @transceiver: Optional pointer to associated CAN transceiver + * @rstc: Pointer to reset control */ struct xcan_priv { struct can_priv can; @@ -218,6 +220,7 @@ struct xcan_priv { struct clk *can_clk; struct xcan_devtype_data devtype; struct phy *transceiver; + struct reset_control *rstc; }; /* CAN Bittiming constants as per Xilinx CAN specs */ @@ -1799,6 +1802,16 @@ static int xcan_probe(struct platform_device *pdev) priv->can.do_get_berr_counter = xcan_get_berr_counter; priv->can.ctrlmode_supported = CAN_CTRLMODE_LOOPBACK | CAN_CTRLMODE_BERR_REPORTING; + priv->rstc = devm_reset_control_get_optional_exclusive(&pdev->dev, NULL); + if (IS_ERR(priv->rstc)) { + dev_err(&pdev->dev, "Cannot get CAN reset.\n"); + ret = PTR_ERR(priv->rstc); + goto err_free; + } + + ret = reset_control_reset(priv->rstc); + if (ret) + goto err_free; if (devtype->cantype == XAXI_CANFD) { priv->can.data_bittiming_const = @@ -1827,7 +1840,7 @@ static int xcan_probe(struct platform_device *pdev) /* Get IRQ for the device */ ret = platform_get_irq(pdev, 0); if (ret < 0) - goto err_free; + goto err_reset; ndev->irq = ret; @@ -1843,21 +1856,21 @@ static int xcan_probe(struct platform_device *pdev) if (IS_ERR(priv->can_clk)) { ret = dev_err_probe(&pdev->dev, PTR_ERR(priv->can_clk), "device clock not found\n"); - goto err_free; + goto err_reset; } priv->bus_clk = devm_clk_get(&pdev->dev, devtype->bus_clk_name); if (IS_ERR(priv->bus_clk)) { ret = dev_err_probe(&pdev->dev, PTR_ERR(priv->bus_clk), "bus clock not found\n"); - goto err_free; + goto err_reset; } transceiver = devm_phy_optional_get(&pdev->dev, NULL); if (IS_ERR(transceiver)) { ret = PTR_ERR(transceiver); dev_err_probe(&pdev->dev, ret, "failed to get phy\n"); - goto err_free; + goto err_reset; } priv->transceiver = transceiver; @@ -1904,6 +1917,8 @@ static int xcan_probe(struct platform_device *pdev) err_disableclks: pm_runtime_put(priv->dev); pm_runtime_disable(&pdev->dev); +err_reset: + reset_control_assert(priv->rstc); err_free: free_candev(ndev); err: @@ -1920,9 +1935,11 @@ static int xcan_probe(struct platform_device *pdev) static void xcan_remove(struct platform_device *pdev) { struct net_device *ndev = platform_get_drvdata(pdev); + struct xcan_priv *priv = netdev_priv(ndev); unregister_candev(ndev); pm_runtime_disable(&pdev->dev); + reset_control_assert(priv->rstc); free_candev(ndev); }