From patchwork Tue Jun 28 05:43:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 12897722 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 EE85EC43334 for ; Tue, 28 Jun 2022 05:45:21 +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=ZCC+Lm7+IAD8kjmGhofibZDQzxX1my9Ou2ZayZbMECA=; b=Ua7D4BdzmzTIJf VGNnm0bzXTDzkiGLtRRdwCAchaW7Cq/DEEKtZKAgm/CdJTUPgVr1hRMX3PwK9lgIf6PgyV10jM7AF ezdAAyfYS0hes9dcQG0twMHEQ/B4bxZ3t6ZUv4SYWKK4f2iF20EtZ6Vw6AqBZul9KMXAR2XVQhcYD qf4hS1dEpnvMOFeu9u9NXpUfdZ199FYx7Qumvj7YmShM4Uh5muVFo834uXzkAXACXF2cPS6kXuaXr 1vZ1lZBrOQB63izuCNa9jqsaSW7iZfBYJlbhdLzGN6uq5WfqlUjlGa6WWVPhNdNn7D7Fde7vloX8e +s8hSo6eMe0dl7XjIkhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6419-004Pmz-Rg; Tue, 28 Jun 2022 05:44:08 +0000 Received: from mail-mw2nam12on2046.outbound.protection.outlook.com ([40.107.244.46] helo=NAM12-MW2-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6410-004PjX-CA for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 05:44:00 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=V26af0oFF+xCnnglS860lTa8xncycLAXFStlKUuENn4p5B7UsdoC2u6GLOiEJ1btYFmDBkYjVoOnvmz3Rj/1QBCPgzStyXSbDd3h8HSLVKVG1NUfmiLkUnUCGydOUBrhaqNtKIZtX+h48jFzzRkIex2hoHujUTd1+jHDdvFScPk8mFLeacg8pZx7kT01INnYf3p+VGsCFotiTRIqQXaKjPF5KmE3Y7HgNKjqT30HKcO9Wj9oFpG99qSpzRT3xr4qigNiMi9Kp8nv5DTjB3qQUpb1szVKNvXM7ehN7HGjhWCtGeo/1Ezjbf9K4Xk+E2OJOMe2//yC0YGaGoPPMb9rtg== ARC-Message-Signature: i=2; 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=hiI0c0+f2zcUW58+nFgKf/IqwrXqn5fzul1qqdQ9BPI=; b=H6OaL7fGdNTemy6WiYJ65w5g1h121kUiPmtMBOwRVzVkVp4ZnkYGm5D+kUIxmcFUybxQC0aMzsvf2gorc64YyKPDWRw8U9Oe79WfPR5YzzlGzHLCXbNypiLK63Wh8fJ+vm9F91QY2V+rwkH4aRfjW3XtvQy3a/W8/pLDtc0qXzqyzHhEqlE4KiIYZUVrMtq4q21z3NWnF9BOJxuqINynJNnM6rh7JkjWEgscz4StGFtfq/c9rfMRqHanHxDh/kPif2GEFqflSU2XZwZt400Fpf+A0GlfLKvVTCxeHVX38tB5fInwxsFhxEDeDLBPhnIf0eNNbP3m2j4bHN67evYb/w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.83.241.18) smtp.rcpttodomain=arndb.de smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=xilinx.com] dmarc=[1,1,header.from=xilinx.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=hiI0c0+f2zcUW58+nFgKf/IqwrXqn5fzul1qqdQ9BPI=; b=WjtILGstxc35dUTys3EacqOyzFAbG0fHpWOl+BbV0iXyL9PH29XKkkWOEoH/WYLIlzjEEGpmfLip++NqeaWobfwkyXouK2X6GSajTXKStoqgfT3xXn25x653TpRFD1U4rPz8rMxQbuQik0UW1Nua0cITeBHvUWQ1FCy7RPIHTqs= Received: from BN9P220CA0013.NAMP220.PROD.OUTLOOK.COM (2603:10b6:408:13e::18) by DM5PR02MB3846.namprd02.prod.outlook.com (2603:10b6:4:b1::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Tue, 28 Jun 2022 05:43:53 +0000 Received: from BN1NAM02FT048.eop-nam02.prod.protection.outlook.com (2603:10b6:408:13e:cafe::6a) by BN9P220CA0013.outlook.office365.com (2603:10b6:408:13e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:43:53 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.83.241.18) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 20.83.241.18 as permitted sender) receiver=protection.outlook.com; client-ip=20.83.241.18; helo=mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by BN1NAM02FT048.mail.protection.outlook.com (10.13.2.157) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:43:52 +0000 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (mail-dm6nam11lp2172.outbound.protection.outlook.com [104.47.57.172]) by mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id 150F042023; Tue, 28 Jun 2022 05:43:52 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=PlOhG9Race84oBohGigol8sIh0FiwDc63mQrQu9iOgcc/TBWQ5M9g/un8OEp8GK+s5ZAuetDz3teKN0KW9aW/EH8pR1yrZqAuucy9SEKsRXVlhYfV+pnvWfUHimBYr43eXMZGw0dhQ9ZDR90qIsSGNNglY9CFtsd0xr2bZ8vyXPs+F2Bq7NRY5ZXKnJGd4YMjXacZ/p3gQ18a35Jg3suFVLL5C8h7YExWJwYyijdgGyHEFXYwPiDtzs//dzrR4vNmh4lpxsdog1nWSJTmCP73dXUV6YKC0IdciHgRppEeXNQBdlWANu65OkN6wZZ+bGXcGNVZpMzdLl7Mi10Bkn6TQ== 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=hiI0c0+f2zcUW58+nFgKf/IqwrXqn5fzul1qqdQ9BPI=; b=ENB9W2bzGjHBGSa6L2H6TbmaJvu6xi1Oiu0Gx1vj9fjf9FJBBn13wfM2jXPrplzXbVd+Qyc1vZI/19LaiVcre7XupTHs/2TNIt3Qo5SbP6745N2YAwX0BA8K3cpJLFYUpv/CoxNl/XXiH4LsBIpH+jHPTRBja4X9yxsBF+yf6tV5pIL7hXIXAVr6Rgyp5ZnIJrsK18NTc83TdH1DNfNjQV42Xe8redBpz/4PnrOrfDY0hPglCKMq1A4n7EJY2Gmk6/mMDmLCOTld8//dfO0q871qjlqNgfP6D6u/8hnk1Ajk8WcpxngPLBcIHWiDma76s4vwnc3TkSC1a5shLQSvXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none Received: from SA9PR13CA0087.namprd13.prod.outlook.com (2603:10b6:806:23::32) by SN6PR02MB4975.namprd02.prod.outlook.com (2603:10b6:805:99::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Tue, 28 Jun 2022 05:43:49 +0000 Received: from SN1NAM02FT0045.eop-nam02.prod.protection.outlook.com (2603:10b6:806:23:cafe::38) by SA9PR13CA0087.outlook.office365.com (2603:10b6:806:23::32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.7 via Frontend Transport; Tue, 28 Jun 2022 05:43:49 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0045.mail.protection.outlook.com (10.97.5.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:43:49 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 27 Jun 2022 22:43:48 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 27 Jun 2022 22:43:48 -0700 Received: from [10.140.6.6] (port=51114 helo=xhdappanad40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o640p-0007Ut-Jq; Mon, 27 Jun 2022 22:43:48 -0700 From: Appana Durga Kedareswara rao To: , , , , , , , , , , CC: , Subject: [PATCH 1/4] dt-bindings: misc: tmr-manager: Add device-tree binding for TMR Manager Date: Tue, 28 Jun 2022 11:13:35 +0530 Message-ID: <20220628054338.1631516-2-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> References: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: e27eb48e-f3e5-4019-6b5e-08da58c92f35 X-MS-TrafficTypeDiagnostic: SN6PR02MB4975:EE_|BN1NAM02FT048:EE_|DM5PR02MB3846:EE_ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: St25eJ0ApQHa+4DVwhmt9P9nFpmhrEdse/Bfz58QlVX8mCiHDRfWK4Ui7KJthDbJXWfwEOFja+ZPfXV4nv34QiqGODPE3gwaO6UMSzmyV/Kx7RTrySFxhUUYhVzELjOQtp1tc4D3vswVtQC6F9J5yJlXMc7VcyhIN7wUMBGH184mD+S1GZPXxqDPc4NxzR15klDN2pFxpR9VWMtqXfwS/45+5ysNTd0wGDsT/sMiio/GbcpTQ6i/gkA7ljBnYSZmteCZL85NQIcDBegmsWFxzmA8jThk90aQiMl3YRnVrLf2ulTxMiwupw06rz37xo0cNr9bEX7akCeko6+YQ9oTnvcRlID4XM46syjGyOqaO9aWmpBa+8lw9J+SNm3z1JImjWEaMj+wIppmfAHAu+hzQrnrndtzsvrcqxOZKxXy6hlFwZluj/fZFdoBnmjvIV76mtYzqHUeruOnA9pP1xWGdeWRXVlpFATsBEKsW4Bzq3d3lAuyS7HNWe2LXuFzteKT+lnq9iHNOo6ewDmtAqJyEU1V8GfX2+YVug4YHkmr7rOtaKESR3h7ceeeoUvl6BBDW9LKC7SxpEG3oESn8W0fGHSJ4a4urMRrk/Pnn3ulBjkhh3aim3sNBVeW61mqF78Aqp2CRF1Aa7ufRhZABgifnEJcO7eA0ShPfFn1wL4T4mx9QnuItJFPyOLm15altCdkUgugSI1Xbm3uvjUaQqPB7xIxe5q/wIzpDu3O8DnxyTs67ylPa2xbtxpeTgYI6bxNEhAN4KVqcCZjxppLyDtZjIwg5ROAVFKZJoMfT54s7UvEWWEbMm7ZdJdu7E1hUIU1y8kSmYESuT7SQqMVXJSn3spTi44s1BIHT2uj7nM1Tn7HHgtc+KRkWmp7ZzbYN4Jn1+T+hl3+IK1hPW5z3TEXLiGgKlpwAdggyzYrqOrPkjg= X-Forefront-Antispam-Report-Untrusted: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230016)(4636009)(136003)(39860400002)(376002)(396003)(346002)(46966006)(36840700001)(40470700004)(103116003)(4326008)(7636003)(921005)(8676002)(426003)(26005)(83380400001)(47076005)(356005)(40480700001)(70586007)(70206006)(7696005)(82740400003)(186003)(8936002)(478600001)(40460700003)(336012)(36860700001)(6666004)(1076003)(54906003)(2906002)(966005)(316002)(36756003)(107886003)(9786002)(5660300002)(110136005)(41300700001)(82310400005)(2616005)(102446001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR02MB4975 X-MS-Exchange-Transport-CrossTenantHeadersStripped: BN1NAM02FT048.eop-nam02.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: e2a6ce12-d1b9-4b47-2b70-08da58c92d30 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SNr67rePmUgZYoSxgmm4rqd6j6Dhw1drkF6Mp3TMQjhVpVpszaHg910FF8m1axyG5qoYFAfsYhhv81lmLiGePCTvuSuBa1UZuf5gm3vvHxVzKE8keA/vGz83kK2PPggsBAaRaGIYQEsM4Ad1YWruKsGtN4Ra8oYsPq6gG5d2TltHxIrCeBxU71OEDg4pXB3LOY3RZkRkI6X6J/9SZgoIWeif6BHmm4okiEZvBtlkWp5JyfFSon2X4uNQk/j00cEgXxRRznxyxJO3MtqjNsZkXqSKssObbO1Z2SUzHpH+RkIaAstNI/Lxa9yqTIeGyamc1oKN4uLUZmaACqDB8FToHMStC+oxMgm3pGr3nbXlSkxYW9j1FsayuVz+Cmjx1YboBojJEoM88CpTwXCjd424PszMddaHGyHyMzqDInNnSbKxKTTO3JCfKKwwIRB6kuVYT/P/RkEo0VXpRayi2gnblXmfyqXQP14VxOkbJeyGSvBADNspxSQqjCetKEaJ8/3Obf6tossDScxBY1ZLIz8+HhPTfyAocj2o31/j7PG3iEXitVt07UOvXolvU1qnCEGc06x1GpFgkk4OtZQYEhiqyV4kJwba0K19UFDiR4YLhuS+HbGIe9PDyUAvHRvguAhHl1gswpb2DozcaHnJd/+Gx4LesZPSmZYjSOc6hZi18nTQxw9+EFa2qC1EYybEAHXbwg5UdvcWP5AaKxTtCwU9kX2LQbXLqbcgoj2lt7F1sUzKsD387T2i5g6E51gbO7aJwGRmgoBLheSo9QDON54+oayrAxxkjQWHdFUJxkXm69e8no+z6yEIcDO2FOfC+sFpc3mHb2NX0LHHeUHZ2t09rPAJmiJr8SxWOF3Xof/Axz7HqSyR2skma354FD+yMx7lacNEffewRUN6Q/wsY83WnC1aXmnYN5qdsww3OT451gh2SMOftd6Il07WqBhQcwL0SRSUeNcf46/qjkcnByV93w== X-Forefront-Antispam-Report: CIP:20.83.241.18;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(39860400002)(396003)(136003)(346002)(376002)(40470700004)(36840700001)(46966006)(36860700001)(921005)(41300700001)(8936002)(7696005)(103116003)(5660300002)(2906002)(82740400003)(6666004)(4326008)(83380400001)(70206006)(8676002)(9786002)(1076003)(26005)(966005)(40480700001)(107886003)(478600001)(54906003)(316002)(2616005)(40460700003)(36756003)(82310400005)(81166007)(186003)(336012)(110136005)(426003)(47076005)(102446001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 05:43:52.7703 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e27eb48e-f3e5-4019-6b5e-08da58c92f35 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[20.83.241.18];Helo=[mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-BN1NAM02FT048.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR02MB3846 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_224358_487164_AD3D42FB X-CRM114-Status: GOOD ( 13.62 ) 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 This commit adds documentation for Triple Modular Redundancy(TMR) Manager IP. The Triple Modular Redundancy(TMR) Manager is responsible for handling the TMR subsystem state, including fault detection and error recovery provides soft error detection, correction and recovery features. Signed-off-by: Appana Durga Kedareswara rao --- .../bindings/misc/xlnx,tmr-manager.yaml | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml diff --git a/Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml b/Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml new file mode 100644 index 000000000000..f6cb4d235981 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml @@ -0,0 +1,48 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/xlnx,tmr-manager.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx TMR Microblaze Device Tree Bindings + +maintainers: + - Appana Durga Kedareswara rao + +description: | + The Triple Modular Redundancy(TMR) Manager is responsible for handling the + TMR subsystem state, including fault detection and error recovery. The core + is triplicated in each of the sub-blocks in the TMR subsystem, and provides + majority voting of its internal state. + +properties: + compatible: + enum: + - xlnx,tmr-manager-1.0 + + reg: + maxItems: 1 + + xlnx,magic1: + minimum: 0 + maximum: 255 + description: + Magic number 1, When writing to the control register the first write data + byte (bits 7:0) must match this value in order to have any effect on the + nominal recovery function. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - reg + - xlnx,magic1 + +additionalProperties: false + +examples: + - | + tmr-manager@44a10000 { + compatible = "xlnx,tmr-manager-1.0"; + reg = <0x44a10000 0x10000>; + xlnx,magic1 = <0x46>; + }; From patchwork Tue Jun 28 05:43:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 12897723 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 C419DC433EF for ; Tue, 28 Jun 2022 05:45:39 +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=7kSqrqA1W9gLf85/NPpbgx4RkyWWQTI6RHsohEDFRfs=; b=uZy1BG5HI6enzy a3g+wDVagnsRiUHN13XyPvME+OV5ig4GCGCCPgonwYFngWaBGPE8ztNNxc5L5zonHIuCfhvdGJETp TFlm5VgNFkHM/0rtyv+Uqw4wvYuG7iaO7OolW8qWZo74SCzAAuls3t7XxECr9tZp4l2LrULqU3ya9 H8BJQasiu+MGN/GtV5z2htjGWv8t3guaS1Yb9/g7Vv+pqOZ0OZXb0kDBTSIR6Nj5dfYYsuDhRUDlw iKp/1UI+5vVJ3G8Sy7y13RPREpVvTbVknaiJbRpUaTWy9dUuHSNLrSoaAMwlcURgmXIRldTYBc2ay 80dq1DsH55pU7YZrkmhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o641K-004Ppf-3d; Tue, 28 Jun 2022 05:44:18 +0000 Received: from mail-dm6nam11on2052.outbound.protection.outlook.com ([40.107.223.52] helo=NAM11-DM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o6417-004PmC-0K for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 05:44:07 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=DL7ngWQKPOJX0753nyH1utQI77nDiBTKUa6ywymhUooPChio/bjjJgWDHRLcRTjvBLwROtwWxz3ZKaYJKKUGUdKRvdbWo1X7BwDOt+7LcYFz+HAnnnYpwHcy2ROnz+nnNPBGef+phIWBqQ/v4tNm5kGOVPvflFVqEIIaULJHgNanIn++UYEk1q+cxcXQYMK/f8v/NWGaCkb7wQMJq2zhS4ALkHnRAJHRua61zHzof9Wt2tZG91e3Hz7nRjr9JKqr7eAvVYiKMvZcd4TW82T52v0O42kvERMkxGvLfST5RbXCQD4UYYHFUiXf6+cbCBaiNxpGoXryerspAtU3J2n8Xg== ARC-Message-Signature: i=2; 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=K70VROl2VxnmbVDpT2J0WclUKHVSV6en0RHZXwHrZds=; b=lFStePWH7nC61benAGig5KUyhh4LOkDESmpmTeiv+MoPPtorEz4XQP1YoX/w0GgCbgV7uwMvmc+bW+L1cMF3KcfQOkR6oAP/SQFVQK7IPCjr41eB9E3etVltRtsK324AMlSnR8Vbr1LWbO3yIzT6g+O8KZl9XtSLiMYQTtPb71waTnqtOu6OSjrngvThuJo7nw0lt4ortUVal2FJ2DER+KEIVWLOCuLPzMPmPv0mXsXCPbjIpQUgXx/6Alfa7ixubvFsaEVHhXBGYCAgIJyYuQopGcVhJvnmV5dFyNEDAv31T6pedtvd+A9zrHkziPzeqpyahsJbnG3IGmNwpad8dg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.83.241.18) smtp.rcpttodomain=arndb.de smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=xilinx.com] dmarc=[1,1,header.from=xilinx.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=K70VROl2VxnmbVDpT2J0WclUKHVSV6en0RHZXwHrZds=; b=cUZME1HWHu6qaBxgfHIejYiT3K/P2YF1xbgTxUmhkd6amm2UqV6DCooHb+dfkMrkNi7soUp9hXoOPWcQDUOGqVRDQKOnovmPlFWXs63iuI2UyzaeVstddM72IK30nUtLXSzBhMRTZHmox12UbAsDDxhM3ppoym/m15eyefbb19s= Received: from DM6PR06CA0015.namprd06.prod.outlook.com (2603:10b6:5:120::28) by BN7PR02MB5140.namprd02.prod.outlook.com (2603:10b6:408:2a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Tue, 28 Jun 2022 05:43:58 +0000 Received: from DM3NAM02FT029.eop-nam02.prod.protection.outlook.com (2603:10b6:5:120:cafe::9d) by DM6PR06CA0015.outlook.office365.com (2603:10b6:5:120::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17 via Frontend Transport; Tue, 28 Jun 2022 05:43:58 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.83.241.18) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 20.83.241.18 as permitted sender) receiver=protection.outlook.com; client-ip=20.83.241.18; helo=mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by DM3NAM02FT029.mail.protection.outlook.com (10.13.4.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:43:58 +0000 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2168.outbound.protection.outlook.com [104.47.58.168]) by mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id E97A73F030; Tue, 28 Jun 2022 05:43:57 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=TED4UgMV0DDK2rM/Td8Fyk1prkaKRY/Wol4KSmnf/1oOSkPIe9JO9HqRNdo7j5foZNL1nbCcN911tyLn8kE8tpkJnWIdsKkZpkTxtLIE68slprVh8MHUr8xJKXXgMW/OzdPPbIzh33usTSMDxYhGv4gUiftl2EGJOmXlOydW3CYdb6YKkr5oPmAl7aOCLu/olKUifiNJz6B2ATLdBPTTGVSF0venxkLD58RZLjhtlOXHZpi0Xy1heE+ClmO049fg1P1AZkRRvtS8G4r+8oHLVluy8epF1RGWpBUyAEtqKuJomd4fKXxAkBpNRK2NSZkNodZ0RsuS+yoftoPM8e0bXw== 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=K70VROl2VxnmbVDpT2J0WclUKHVSV6en0RHZXwHrZds=; b=oLlcwHfqosr42qsAWW2HB3aTHXxJ4Gv1yZoayZ4C1+rfyXMLvqW0MQ2g2mveqh7Qwo10TXJsCnOOAEQ2Q4Y1vzi2FmlQ7xuNVmBOGJt48UHnohkDqGkwpYM9NCzYFkObMAybZsaknALroLsPG1MV7KcPYlWGeIoUp/7YZOgi92/Ihhl9aebKpM+P4ivBl/dcLJ+eCyeh5qdf7hwe132xUuULtd+vRmzMYvWfaU78Ca1ZjM47ARnJ6rL/IP6d0YlUwFKoU8AEUVFhPHo/INAtZiqtzLXxlIesEmP/JuPAiAato96dt0w16jlJzM/TKAuae7X/RxDr7JJYpCtFhVuv3Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none Received: from SA9PR13CA0085.namprd13.prod.outlook.com (2603:10b6:806:23::30) by CO1PR02MB8854.namprd02.prod.outlook.com (2603:10b6:303:163::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Tue, 28 Jun 2022 05:43:55 +0000 Received: from SN1NAM02FT0045.eop-nam02.prod.protection.outlook.com (2603:10b6:806:23:cafe::e5) by SA9PR13CA0085.outlook.office365.com (2603:10b6:806:23::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.8 via Frontend Transport; Tue, 28 Jun 2022 05:43:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received: from xsj-pvapexch02.xlnx.xilinx.com (149.199.62.198) by SN1NAM02FT0045.mail.protection.outlook.com (10.97.5.234) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:43:54 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 27 Jun 2022 22:43:51 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 27 Jun 2022 22:43:51 -0700 Received: from [10.140.6.6] (port=51114 helo=xhdappanad40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o640t-0007Ut-7L; Mon, 27 Jun 2022 22:43:51 -0700 From: Appana Durga Kedareswara rao To: , , , , , , , , , , CC: , Subject: [PATCH 2/4] drivers: misc: Add Support for TMR Manager Date: Tue, 28 Jun 2022 11:13:36 +0530 Message-ID: <20220628054338.1631516-3-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> References: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: c1c3a7dc-0a6f-4fa9-8496-08da58c9327e X-MS-TrafficTypeDiagnostic: CO1PR02MB8854:EE_|DM3NAM02FT029:EE_|BN7PR02MB5140:EE_ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: iR6dh7rE77k6YGgF01ngs5uatLUh3QOiayIEnD+6U50ogJChHOS9SxNoMNFnd/51BnD6O48+5QVt/tf778/YDvnlpN2KBSoLZjYH42y0YcSUAhsduYum4NTgynPdmaGYYic/DbLyoTitHvVRogPtir76u+1JC6Q2V3GnHdfFt/PhwaPpUdLrW4qan9nk9xBC/2PoP98waEaIun6LWhScwaA19wf9AtgfWZCtFTs004Wd5teqfA7jsEQD/8mlXyXii2u7Qwg6nJL1+rzQM9++yD6VIabifhOQvEHnZ0dS7AbEBLu5CIuS55+1fU+PUztlsfyzk1rZimRwB3uUEmnllYYFHmbpF6tHpLkVeTf4D0rUBD56XMpMVSWo/vOmW5WR+MQRapTDp7N3YD6p5lL4wysucOLZJgpLnPfdTIWwvbObrMIcQskASYleligOoUONwHAuo282meeUwW0Wr7ty0bxWAdDEfiHG98U+zML/SuDuoq+wjdXPkKjP3r61n6Sxn3OBuogra4h0pqZNiZf18bTYsIq1FfUVzbBcNeVAB/KYKSFL14qbITMv9oqqvxR93s/pnkC09uR6EQX819zvFSVY5+FwVNa6aysaBfeL/GHL2OlyKPdrPjesChNmnnUibmMY3giewepJAixhiaRRo4g+bBkMBEVls1Lf998OH3jTpEuMllVzPave901uFgDmd5nYcDTObiB8IbrfwgZxgtG1dzjKr6n5sabhr3J/vUV+y3BScmr0+d5wixgXsVe4o106asCIdfZgMHf5y8CMb4VXRUeJaCZB5tKdJ/QGSgKOWxLfASwsy1zDJlTJgow5K3IQMhS2tRh9NSAs9U7Fm8/+na1VRt49sviCcD+dvfWnPRmgfE3i2bX8mD9FZpqK X-Forefront-Antispam-Report-Untrusted: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch02.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230016)(4636009)(136003)(39860400002)(396003)(376002)(346002)(40470700004)(46966006)(36840700001)(36860700001)(356005)(107886003)(336012)(921005)(47076005)(2616005)(316002)(36756003)(478600001)(70206006)(2906002)(8676002)(70586007)(1076003)(54906003)(7696005)(110136005)(26005)(8936002)(4326008)(103116003)(30864003)(40460700003)(82740400003)(426003)(40480700001)(6666004)(186003)(82310400005)(7636003)(5660300002)(83380400001)(41300700001)(9786002)(966005)(102446001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO1PR02MB8854 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DM3NAM02FT029.eop-nam02.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: d598b79e-604c-4159-9610-08da58c93034 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hLRaL7Isq+dJ4zrkJ1LsjMXTxviW39fNqB23v9BLVPQ4LNv5nzZrbbJAPVzY7cT8IBOpI5FXgaLd+9EgEbr7HhXiC+XCwVoPTRiN90bBKArvt5+lXtGPJMdQGpORq/kTNubgGTdYrmwfjHCc5J5Cly3X4ggcUuJMtDcHh+RCHTzKA1ndExFgqWh8XF48DI5822zAPxOktCbTCtAAO/GkCrbkRiqSMQN3EGTDR0xL8YPjfNjtpIuSwVHJ2aePO7yke5KKMyCJONplF4FLrqIh481FlZUd3ap3/5FXpCX2mdxYv68Rw2ik9bKZ0BmCqlBMlRc3J7xIMU6yEEg+zclBHeKHWYWBBfBHLvJ18X4OiViuvOxOsxnyat1QzJTq4ykNiaMxxn5o0LEv4PfI9906frZcG0i0mbeVzXLF+ZRyEESYrYyOoOzDClaXBlQl4MjTpYFUZU3m2GYJ4nKTyoUGgY7NMKSF8dt8PX45Uk1tv8SDuJ795PtCYTqBSSfyjJi6CEVaMdxPi8zjgPD+m6ODKGCoBzQGi1TSn9lsIAyIVwi2/H6zK96J2Bu2pTo9OErguuQ/IQ+M1a9Xk1IQ3cEozZadvTgW0RWVKM/BndlZuTFZ9jFDEBhn7N6wI4wTDeX3wfrYbCeTvCoET8jIJUesUKJFH4GOtgjWi38QddCpze5FMlP5MjKyuTySV2RIwQLmSb9UHNAVwTZ0oyCTyJMi+5rRVhjGpsiE0KHBUgsW8xuktgAlMBdkud462fP2OkB7fGHw2+t2ANA5CzP23IvCOUAaI5++wi0o6U2G9SwKPcqW1JW6e2FJ3gPEqUPNGjklZ9z2JlKVdNrYKoAVXpSfn/0mHYljIhxDovWP4ricV3BWfvLwjCcciWPxmbSxpS3bjDSOzAFP2Uzqoe85858PmCeil1wCabgDhyOTJTwgAtE= X-Forefront-Antispam-Report: CIP:20.83.241.18;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(376002)(396003)(346002)(136003)(39860400002)(36840700001)(46966006)(40470700004)(83380400001)(82310400005)(110136005)(316002)(81166007)(54906003)(82740400003)(4326008)(26005)(2906002)(36756003)(2616005)(107886003)(9786002)(921005)(8676002)(8936002)(70206006)(478600001)(103116003)(40460700003)(6666004)(186003)(966005)(47076005)(7696005)(426003)(336012)(41300700001)(1076003)(5660300002)(40480700001)(36860700001)(30864003)(102446001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 05:43:58.4075 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c1c3a7dc-0a6f-4fa9-8496-08da58c9327e X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[20.83.241.18];Helo=[mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-DM3NAM02FT029.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR02MB5140 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_224405_177603_83A72EE7 X-CRM114-Status: GOOD ( 15.85 ) 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 The Triple Modular Redundancy(TMR) Manager is responsible for handling the TMR subsystem state, including fault detection and error recovery provides soft error detection, correction and recovery features. This commit adds support for fault detection feature via sysfs interface. Usage: To know the hardware status: cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/status To know the break handler count(Error count): cat /sys/devices/platform/amba_pl/44a10000.tmr_manager/errcnt Signed-off-by: Appana Durga Kedareswara rao --- .../testing/sysfs-driver-xilinx-tmr-manager | 18 ++ MAINTAINERS | 7 + drivers/misc/Kconfig | 10 + drivers/misc/Makefile | 1 + drivers/misc/xilinx_tmr_manager.c | 288 ++++++++++++++++++ 5 files changed, 324 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager create mode 100644 drivers/misc/xilinx_tmr_manager.c diff --git a/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager new file mode 100644 index 000000000000..c2f615126201 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager @@ -0,0 +1,18 @@ +What: /sys/devices/platform/amba_pl//status +Date: June 2022 +Contact: appana.durga.rao@xilinx.com +Description: This control file provides the status of the tmr manager + useful for getting the status of fault. + This file cannot be written. + +What: /sys/devices/platform/amba_pl//errcnt +Date: June 2022 +Contact: appana.durga.rao@xilinx.com +Description: This control file provides the fault detection count. + This file cannot be written. + +What: /sys/devices/platform/amba_pl//dis_block_break +Date: June 2022 +Contact: appana.durga.rao@xilinx.com +Description: This control file enables the break signal. + This file is write only. diff --git a/MAINTAINERS b/MAINTAINERS index 6cc825857722..3d29109788ed 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12962,6 +12962,13 @@ W: http://www.monstr.eu/fdt/ T: git git://git.monstr.eu/linux-2.6-microblaze.git F: arch/microblaze/ +MICROBLAZE TMR MANAGER +M: Appana Durga Kedareswara rao +S: Supported +F: Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager +F: Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml +F: drivers/misc/xilinx_tmr_manager.c + MICROCHIP AT91 DMA DRIVERS M: Ludovic Desroches M: Tudor Ambarus diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 41d2bb0ae23a..555ae2e33b91 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -483,6 +483,16 @@ config OPEN_DICE If unsure, say N. +config TMR_MANAGER + bool "Select TMR Manager" + depends on MICROBLAZE && MB_MANAGER + help + This option enables the driver developed for TMR Manager. The Triple + Modular Redundancy(TMR) manager provides support for fault detection + via sysfs interface. + + Say N here unless you know what you are doing. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 70e800e9127f..28b9803f909b 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -60,3 +60,4 @@ obj-$(CONFIG_XILINX_SDFEC) += xilinx_sdfec.o obj-$(CONFIG_HISI_HIKEY_USB) += hisi_hikey_usb.o obj-$(CONFIG_HI6421V600_IRQ) += hi6421v600-irq.o obj-$(CONFIG_OPEN_DICE) += open-dice.o +obj-$(CONFIG_TMR_MANAGER) += xilinx_tmr_manager.o diff --git a/drivers/misc/xilinx_tmr_manager.c b/drivers/misc/xilinx_tmr_manager.c new file mode 100644 index 000000000000..5a4562e4a9d4 --- /dev/null +++ b/drivers/misc/xilinx_tmr_manager.c @@ -0,0 +1,288 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Xilinx TMR Subsystem. + * + * Copyright (C) 2022 Xilinx, Inc. + * + * Description: + * This driver is developed for TMR Manager,The Triple Modular Redundancy(TMR) + * Manager is responsible for handling the TMR subsystem state, including + * fault detection and error recovery. The core is triplicated in each of + * the sub-blocks in the TMR subsystem, and provides majority voting of + * its internal state provides soft error detection, correction and + * recovery. Error detection feature is provided through sysfs + * entries which allow the user to observer the TMR microblaze + * status. + */ + +#include +#include +#include + +/* TMR Manager Register offsets */ +#define XTMR_MANAGER_CR_OFFSET 0x0 +#define XTMR_MANAGER_FFR_OFFSET 0x4 +#define XTMR_MANAGER_CMR0_OFFSET 0x8 +#define XTMR_MANAGER_CMR1_OFFSET 0xC +#define XTMR_MANAGER_BDIR_OFFSET 0x10 +#define XTMR_MANAGER_SEMIMR_OFFSET 0x1C + +/* Register Bitmasks/shifts */ +#define XTMR_MANAGER_CR_MAGIC1_MASK GENMASK(7, 0) +#define XTMR_MANAGER_CR_MAGIC2_MASK GENMASK(15, 8) +#define XTMR_MANAGER_CR_RIR_MASK BIT(16) +#define XTMR_MANAGER_FFR_LM12_MASK BIT(0) +#define XTMR_MANAGER_FFR_LM13_MASK BIT(1) +#define XTMR_MANAGER_FFR_LM23_MASK BIT(2) + +#define XTMR_MANAGER_CR_MAGIC2_SHIFT 4 +#define XTMR_MANAGER_CR_RIR_SHIFT 16 +#define XTMR_MANAGER_CR_BB_SHIFT 18 + +#define XTMR_MANAGER_MAGIC1_MAX_VAL 255 + +/** + * struct xtmr_manager_dev - Driver data for TMR Manager + * @regs: device physical base address + * @dev: pointer to device struct + * @cr_val: control register value + * @magic1: Magic 1 hardware configuration value + * @err_cnt: error statistics count + * @phys_baseaddr: Physical base address + */ +struct xtmr_manager_dev { + void __iomem *regs; + struct device *dev; + u32 cr_val; + u32 magic1; + u32 err_cnt; + uintptr_t phys_baseaddr; +}; + +/* IO accessors */ +static inline void xtmr_manager_write(struct xtmr_manager_dev *xtmr_manager, + u32 addr, u32 value) +{ + iowrite32(value, xtmr_manager->regs + addr); +} + +static inline u32 xtmr_manager_read(struct xtmr_manager_dev *xtmr_manager, + u32 addr) +{ + return ioread32(xtmr_manager->regs + addr); +} + +/** + * xtmr_manager_unblock_break - unblocks the break signal + * @xtmr_manager: Pointer to xtmr_manager_dev structure + */ +static void xtmr_manager_unblock_break(struct xtmr_manager_dev *xtmr_manager) +{ + xtmr_manager->cr_val &= ~(1 << XTMR_MANAGER_CR_BB_SHIFT); + xtmr_manager_write(xtmr_manager, XTMR_MANAGER_CR_OFFSET, + xtmr_manager->cr_val); +} + +/** + * xmb_manager_reset_handler - clears the ffr register contents + * @priv: Private pointer + */ +static void xmb_manager_reset_handler(void *priv) +{ + struct xtmr_manager_dev *xtmr_manager = (struct xtmr_manager_dev *)priv; + /* Clear the FFR Register contents as a part of recovery process. */ + xtmr_manager_write(xtmr_manager, XTMR_MANAGER_FFR_OFFSET, 0); +} + +/** + * xmb_manager_update_errcnt - update the error inject count + * @priv: Private pointer + */ +static void xmb_manager_update_errcnt(void *priv) +{ + struct xtmr_manager_dev *xtmr_manager = (struct xtmr_manager_dev *)priv; + + xtmr_manager->err_cnt++; +} + +static ssize_t errcnt_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct xtmr_manager_dev *xtmr_manager = dev_get_drvdata(dev); + + return sprintf(buf, "%x\n", xtmr_manager->err_cnt); +} +static DEVICE_ATTR_RO(errcnt); + +static ssize_t status_show(struct device *dev, struct device_attribute *attr, + char *buf) +{ + struct xtmr_manager_dev *xtmr_manager = dev_get_drvdata(dev); + size_t ffr; + int len = 0; + + ffr = xtmr_manager_read(xtmr_manager, XTMR_MANAGER_FFR_OFFSET); + if ((ffr & XTMR_MANAGER_FFR_LM12_MASK) == XTMR_MANAGER_FFR_LM12_MASK) { + len += sprintf(buf + len, + "Lockstep mismatch between processor 1 and 2\n"); + } + + if ((ffr & XTMR_MANAGER_FFR_LM13_MASK) == XTMR_MANAGER_FFR_LM13_MASK) { + len += sprintf(buf + len, + "Lockstep mismatch between processor 1 and 3\n"); + } + + if ((ffr & XTMR_MANAGER_FFR_LM23_MASK) == XTMR_MANAGER_FFR_LM23_MASK) { + len += sprintf(buf + len, + "Lockstep mismatch between processor 2 and 3\n"); + } + + return len; +} +static DEVICE_ATTR_RO(status); + +static ssize_t dis_block_break_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t size) +{ + struct xtmr_manager_dev *xtmr_manager = dev_get_drvdata(dev); + int ret; + long value; + + ret = kstrtoul(buf, 16, &value); + if (ret) + return ret; + + if (value > 1) + return -EINVAL; + + xtmr_manager_unblock_break(xtmr_manager); + return size; +} +static DEVICE_ATTR_WO(dis_block_break); + +static struct attribute *xtmr_manager_attrs[] = { + &dev_attr_dis_block_break.attr, + &dev_attr_status.attr, + &dev_attr_errcnt.attr, + NULL, +}; +ATTRIBUTE_GROUPS(xtmr_manager); + +static void xtmr_manager_init(struct xtmr_manager_dev *xtmr_manager) +{ + /* Clear the SEM interrupt mask register to disable the interrupt */ + xtmr_manager_write(xtmr_manager, XTMR_MANAGER_SEMIMR_OFFSET, 0); + + /* Allow recovery reset by default */ + xtmr_manager->cr_val = (1 << XTMR_MANAGER_CR_RIR_SHIFT) | + xtmr_manager->magic1; + xtmr_manager_write(xtmr_manager, XTMR_MANAGER_CR_OFFSET, + xtmr_manager->cr_val); + /* + * Configure Break Delay Initialization Register to zero so that + * break occurs immediately + */ + xtmr_manager_write(xtmr_manager, XTMR_MANAGER_BDIR_OFFSET, 0); + + /* + * To come out of break handler need to block the break signal + * in the tmr manager, update the xtmr_manager cr_val for the same + */ + xtmr_manager->cr_val |= (1 << XTMR_MANAGER_CR_BB_SHIFT); + + /* + * When the break vector gets asserted because of error injection, + * the break signal must be blocked before exiting from the + * break handler, Below api updates the TMR manager address and + * control register and error counter callback arguments, + * which will be used by the break handler to block the + * break and call the callback function. + */ + xmb_manager_register(xtmr_manager->phys_baseaddr, xtmr_manager->cr_val, + xmb_manager_update_errcnt, + xtmr_manager, xmb_manager_reset_handler); +} + +/** + * xtmr_manager_probe - Driver probe function + * @pdev: Pointer to the platform_device structure + * + * This is the driver probe routine. It does all the memory + * allocation and creates sysfs entries for the device. + * + * Return: 0 on success and failure value on error + */ +static int xtmr_manager_probe(struct platform_device *pdev) +{ + struct xtmr_manager_dev *xtmr_manager; + struct resource *res; + int err; + + xtmr_manager = devm_kzalloc(&pdev->dev, sizeof(*xtmr_manager), + GFP_KERNEL); + if (!xtmr_manager) + return -ENOMEM; + + xtmr_manager->dev = &pdev->dev; + + res = platform_get_resource(pdev, IORESOURCE_MEM, 0); + xtmr_manager->regs = devm_ioremap_resource(xtmr_manager->dev, res); + if (IS_ERR(xtmr_manager->regs)) + return PTR_ERR(xtmr_manager->regs); + + xtmr_manager->phys_baseaddr = res->start; + + err = of_property_read_u32(pdev->dev.of_node, "xlnx,magic1", + &xtmr_manager->magic1); + if (err < 0) { + dev_err(&pdev->dev, "unable to read xlnx,magic1 property"); + return err; + } else if (xtmr_manager->magic1 > XTMR_MANAGER_MAGIC1_MAX_VAL) { + dev_err(&pdev->dev, "invalid xlnx,magic1 property value"); + return err; + } + + /* Initialize TMR Manager */ + xtmr_manager_init(xtmr_manager); + + err = sysfs_create_groups(&xtmr_manager->dev->kobj, + xtmr_manager_groups); + if (err < 0) { + dev_err(&pdev->dev, "unable to create sysfs entries\n"); + return err; + } + + platform_set_drvdata(pdev, xtmr_manager); + + return 0; +} + +static int xtmr_manager_remove(struct platform_device *pdev) +{ + sysfs_remove_groups(&pdev->dev.kobj, xtmr_manager_groups); + + return 0; +} + +static const struct of_device_id xtmr_manager_of_match[] = { + { + .compatible = "xlnx,tmr-manager-1.0", + }, + { /* end of table */ } +}; +MODULE_DEVICE_TABLE(of, xtmr_manager_of_match); + +static struct platform_driver xtmr_manager_driver = { + .driver = { + .name = "xilinx-tmr_manager", + .of_match_table = xtmr_manager_of_match, + }, + .probe = xtmr_manager_probe, + .remove = xtmr_manager_remove, +}; +module_platform_driver(xtmr_manager_driver); + +MODULE_AUTHOR("Xilinx, Inc"); +MODULE_DESCRIPTION("Xilinx TMR Manager Driver"); +MODULE_LICENSE("GPL"); From patchwork Tue Jun 28 05:43:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 12897724 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 EE003C433EF for ; Tue, 28 Jun 2022 05:46:11 +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=JwWZh6RGWRNIQL3XqE19nyGtc06AyeG0uJQpLWyGsaw=; b=R/0iWn71j8Prj0 Id8OGwOjnaLyJ0ZS9PyCQk6sh5eD9l1g127wJL2ycyE44JlVVq9JkkZGATUAMl5dpWNGNkQtU6x+X WwhcBwKAXR8cgrtx78E36ra6kn0I5l0BdN6NxkWQUM3lyGpWHvj4uYfEukeAJavBoSo9khM/DW947 tpIueANHulNopyVZljMztA3ZpqGkn9GZke7Y53blT0w/sMe/GXkjRC7n117hh+uL0QnAY4XT+uJ8A dFos+V3rOLoQMW3VotqXhoezLxf6YfPEH4NOEg09lPHIkS5NEeEpVFaft3WBalLEJGaWPY9MTlIDU AAP4SbwBlQiuNCG8Nm8Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o641p-004Q1Z-27; Tue, 28 Jun 2022 05:44:51 +0000 Received: from mail-bn7nam10on2089.outbound.protection.outlook.com ([40.107.92.89] helo=NAM10-BN7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o641i-004Py8-45 for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 05:44:43 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=eOIuR1WNx12ubOqjddbhUWUC5c+6rHj5l6/WfRTCt/V/70rL7hc56J/CBBhuvbURyiRQzic2KWWMtXww5daOwooXTu78PpX1IdncE9RxJk6O6wKV9dYMDwp7U5OZCS3Jsqbgg3XX1vasuuIVvGfFLVO3IuIjPwH0vVAg+BqduSj/9tEhwV3Yh7w3/SyZDRxmu1V00tfNvo8ffKwQBhxsqEU/mtF3zvPh6E7SkyUptQXoUYE10iKZGvYkNraVGFE8DA6XNbhAv8HLM/4Uj7XRs4LMYXI7Bi9EThOD4sJxXJQkLpmuDLtSqw426MEW6Ui3FxqgvDl87LGOpOG1GIoDvA== ARC-Message-Signature: i=2; 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=x9BLM+typ11ubbiEQ216cyxzCory2RRLJk3GjCPcMTw=; b=SPuzWxUQBNKUnfQBhDNl2lqpP5MkH5mL3BL3Br87Zn4HTM8QA4TzXWMlq+aU7UroCyIkHU1+9X8JMioaTsqkCMnB9STTT8uCZ+NbSNh3XohZompr+uTEl/KcgGFZKD7XFLUjAM1SksYXh9DeGzwBfS4aXhte2TCqswidbKJbN3lZZCgQLvGw0PjHX+Wg42UARc3+Puq4Nyj2vbykdWcU345QQqueooKVMRgPIsd98eFJn6lrCAeXQ8E/AhA2k+Z/VxdlGg17zlKhgv4T14xCKT/D1ikJw+PmmBOJGkbmz/+r7v73mJkxFizkToTNb0WEnLUfgG9lM3RhIgPQHtRI6w== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.83.241.18) smtp.rcpttodomain=arndb.de smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=xilinx.com] dmarc=[1,1,header.from=xilinx.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=x9BLM+typ11ubbiEQ216cyxzCory2RRLJk3GjCPcMTw=; b=sSap7TyE1OLM9MJ+Oa8mgHpYCke9M+LJkC3xWzfXKZ0U7mYrez3r8ijPDG6zXWMFlabio7OYyW7BTo7JZ1+KPDyAQ6nJ+8FzTeBEUEldDP0q3FvunbPtTt88Ngedc/9Nx3hxpbmFigHxjvZmzXv4kZBVMpl67RznpwqSIB18xRE= Received: from SA9PR13CA0165.namprd13.prod.outlook.com (2603:10b6:806:28::20) by BY5PR02MB6721.namprd02.prod.outlook.com (2603:10b6:a03:208::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15; Tue, 28 Jun 2022 05:44:37 +0000 Received: from SN1NAM02FT0051.eop-nam02.prod.protection.outlook.com (2603:10b6:806:28:cafe::59) by SA9PR13CA0165.outlook.office365.com (2603:10b6:806:28::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5395.7 via Frontend Transport; Tue, 28 Jun 2022 05:44:37 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.83.241.18) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 20.83.241.18 as permitted sender) receiver=protection.outlook.com; client-ip=20.83.241.18; helo=mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by SN1NAM02FT0051.mail.protection.outlook.com (10.97.5.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:44:36 +0000 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12lp2169.outbound.protection.outlook.com [104.47.59.169]) by mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id 71EAF419D5; Tue, 28 Jun 2022 05:44:36 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eCVKMqfhOhvybfwMdGVosSRdL17GZBDZNJExMhFiBn1BtD/SqiNBIFB6cUb8oa0RkxPeRqCRI1pGoUhFJtEdkouATxApee8q4wqA6qLZRpg6eY5EtQ9KmdngjM5G1F5ckwbgw30r3JX36wKeVUKPG4HERKe38jAJKyDpeik7pdBaEprW8yFQYjtrkcv4VZmzK8c1T7TG7V2H0Qp/b/WWkx8Sp59J8k7TL4p6xnoP/VgHTsUVwyeIyZYJPFI5/zC7fy0IyoHZYMcX/3BdPiEusqwJcA66VsKSI1/5J2Us7yvj5PpBw1Vp7ATMDbPBXGOC0iSRWA6uG+Cwu+LmJkjtwQ== 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=x9BLM+typ11ubbiEQ216cyxzCory2RRLJk3GjCPcMTw=; b=QEWIEhrV9f2u3h4d30nmIHsPU8MxL4hl0g9AX2iODqK5XEx8pvSu6Yo2DFKFVGMcVzqxHi7bU7+EGA9g83woQmzbH977TvptxybBXrao/VulcRdgxkfgkRt5ZFf6qEnpUpVcf6SmfkIfawrbst0snmL1a4mbCm9EuMDKN7aKhKz1ONoWj7rb4H0AORIteSVWJozO2FonfCrg/kH7S94yCxewo3inTq6R2WhOI/HriIvqjXxJPkyi5d0pYXNZAjyMyUGTzs5UwE0dYeKfg5InBU8YWQbM/fu14sroFqUK/RmrdBi+gGUYcs+P/wAeDNVvYXjCoMIjsVBCedmVewRIiQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none Received: from DM6PR02CA0141.namprd02.prod.outlook.com (2603:10b6:5:332::8) by BL0PR02MB5572.namprd02.prod.outlook.com (2603:10b6:208:8a::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.18; Tue, 28 Jun 2022 05:44:34 +0000 Received: from DM3NAM02FT061.eop-nam02.prod.protection.outlook.com (2603:10b6:5:332:cafe::10) by DM6PR02CA0141.outlook.office365.com (2603:10b6:5:332::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:44:34 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT061.mail.protection.outlook.com (10.13.4.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:44:33 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 27 Jun 2022 22:43:55 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 27 Jun 2022 22:43:55 -0700 Received: from [10.140.6.6] (port=51114 helo=xhdappanad40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o640w-0007Ut-RA; Mon, 27 Jun 2022 22:43:55 -0700 From: Appana Durga Kedareswara rao To: , , , , , , , , , , CC: , Subject: [PATCH 3/4] dt-bindings: misc: tmr-inject: Add device-tree binding for TMR Inject Date: Tue, 28 Jun 2022 11:13:37 +0530 Message-ID: <20220628054338.1631516-4-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> References: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: cde90a15-a538-4d67-c321-08da58c94976 X-MS-TrafficTypeDiagnostic: BL0PR02MB5572:EE_|SN1NAM02FT0051:EE_|BY5PR02MB6721:EE_ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: YG/wZKkC0v+Qx0edHcwxgEsn8DMMXOY82u6ynkiaIW3aI7VMcAcuJ7aGFy65EHRCmkChoYMlQFMam/c1r5JRI69WGbnsJtjowr9jsuhLUMMBUmKtLge6v3ldFeCe1PDTQJ2rnJ33izYL0P67NJx0VFvRvb6NHXMh2JetBMuQab0EkDca3lGrf0AbXyR5w1QUJCY2ohXYVPp+CiJrO/EK0mlVNgRH9pOngAIMFshhMS+dkEKkg8sV2tyavg6ogYUVs9GpMnrfwpdZwfO1z1X8elzo02DXCj6drx93lxqmltFfgTtD0AEY7UnV6KgUR2VZFZYMzLxVLwX4ShMkiOCzfE42MWkUUXcMa58KOXKrA+PzubYIXSg/eUXSIAdRI1JSJaEhtGb2l06tj8xRCKTZ68hfB6Vju6h+jURB2xYRd50R7sMCTUwvpaGuD4pnU09p0l0pHtE0pEyG2wpUorPuX8YjhudAnSs4c3q/HNvqXgxFhRUTBvX3E0NoYp0vUH3gOM9OtTzREU8nEADVCx3lc27tWGxe2VAcAsdiUhEuhpnFq6Risy9pB1pH9utzAOyi+UhyvfEhE+OU9iTf+8b4NCl41bGOHZbXbP8gqHDmnhaQBKOepgBtBlObgPKV5ifZO3azEaTJw6Db4Q3Ww73YolKF9q/I7ztXh/9uFxxPmaTkcbHLaln8JEPB/bAGn9z1uhS8pPKyoLYxaULMWl5eBVbLjBEiZ8g6PsK+tXN47jpghUMTAvewcjVv4oLv8zemHbRvN40Mz/uZgxJZ62iDvGDlnMUxf5FanPiD9D162f7Gr/P80Gwa/icuNWAEghdARLS7WHCuMbe/RbwwMKJfrj7iP9fW7wgGQBAwt8IDR9Ke84keZy1Ri442j4gyMNejhsos/q1ducZHL3oepBYoCCHzKVv18eQdDy/YZbbxCbM= X-Forefront-Antispam-Report-Untrusted: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230016)(4636009)(346002)(376002)(396003)(39860400002)(136003)(40470700004)(36840700001)(46966006)(4326008)(2616005)(8936002)(316002)(41300700001)(921005)(9786002)(70206006)(7696005)(26005)(1076003)(70586007)(107886003)(8676002)(478600001)(356005)(966005)(36756003)(426003)(40480700001)(2906002)(82310400005)(83380400001)(6666004)(7636003)(82740400003)(103116003)(36860700001)(5660300002)(40460700003)(336012)(54906003)(110136005)(186003)(47076005)(102446001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL0PR02MB5572 X-MS-Exchange-Transport-CrossTenantHeadersStripped: SN1NAM02FT0051.eop-nam02.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 3aab8d67-0f15-4a0b-e817-08da58c94799 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: /OrzrRs+I0+JW6h99HTTLjJkoU8EXicJlSjDgYyDclOQoxYEVFJ3QFWty1omnuXsYbq6USva8+WZ5I63ovhTQLAO94yPwsBq+AWtLatEMStA8FCT+GZAm0lq3GeS6FBGay6SIUC28M48RmXCnwdttXUaxJnyk7hz+k92rLRDV2G/Kp8vGQUYICKjjnj+iE9tJCxMc9cjH06oziA+fzibNSA3lPaEIZPQqJmf6eXoVWg6rax1DhsBsAtctjO1D49e/IxHw9sWmxjuu/b7jlVzgPFsrZQmUy65NH3AzTnQ853Exn+SoiFj+3XcdIVJaZgvLbjXUQFtK/S9X2wOaH/FNkd9kByxph0Dr+LBD7cJjf4nRFPRr5taa6OAPr1IeNckQHjHpl0v3OHxn8hkmtBk+L6vEaPMCseviB1u23djOfUXhyK7/k6icA2pqLMJVCm8xn3UfMn9usHq1QNeSP2MJnFewoOtAAx9Dg7ocIVbY/VA/aYCqQIdiJlEfBT4Rm4Tgmmx7yOh7hdM2HNIpi0aiWHrs1PXRWJuI0cooBRLNqMpu3tAYOVWDamqR/f7VCuJOmQcYjBCTzKbZc+unpdS69S+XiD99s5+R2oMiWMPRnEYCli/ftUOJHGKS++VkE0b2eun7B32COy1n0A7eWLpiI0Ln48WwhjQl9uqTM/WbOTQhni30WoFqEmkPYRo4o7vMNgxb76asX0QcWhZ6eNnHypm1Fmv+wf4YKPx3rti2FVtODoWxiJv8768vYqgwOHpMopnNxVVZA2C+7dSvDmw1I2jbkLVb6xPg29t3yyvE3ncnIwQdCGas9986snh87ljC6YqIPihKEdW7u4Va4KBZhYUpbRQ3an33WxMSWjj1sPV7zoKzCG0FFx0dYHS2Fsf5HtyoIsqKPHjMJkh9yghDHCMbFTSpyh/hMIulZAaKuX6MiyKwzYvdE8XS7REoSVp4/aCIcdCLTj8Kp5Ck+Bhvw== X-Forefront-Antispam-Report: CIP:20.83.241.18;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(346002)(136003)(396003)(39860400002)(376002)(46966006)(40470700004)(36840700001)(8676002)(47076005)(107886003)(6666004)(40460700003)(4326008)(336012)(478600001)(186003)(36860700001)(70206006)(103116003)(316002)(1076003)(54906003)(2616005)(81166007)(83380400001)(110136005)(41300700001)(7696005)(36756003)(82740400003)(426003)(8936002)(26005)(921005)(5660300002)(40480700001)(9786002)(966005)(2906002)(82310400005)(102446001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 05:44:36.9287 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cde90a15-a538-4d67-c321-08da58c94976 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[20.83.241.18];Helo=[mailrelay000001.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SN1NAM02FT0051.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6721 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_224442_242177_B46E1F60 X-CRM114-Status: GOOD ( 12.27 ) 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 This commit adds documentation for Triple Modular Redundancy (TMR) Inject IP. Signed-off-by: Appana Durga Kedareswara rao --- .../bindings/misc/xlnx,tmr-inject.yaml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml diff --git a/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml new file mode 100644 index 000000000000..4daf9539000b --- /dev/null +++ b/Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml @@ -0,0 +1,47 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/misc/xlnx,tmr-inject.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Xilinx TMR Inject Device Tree Bindings + +maintainers: + - Appana Durga Kedareswara rao + +description: | + The Triple Modular Redundancy(TMR) Inject core provides functional fault + injection by changing selected MicroBlaze instructions, which provides the + possibility to verify that the TMR subsystem error detection and fault + recovery logic is working properly. + +properties: + compatible: + enum: + - xlnx,tmr-inject-1.0 + + reg: + maxItems: 1 + + xlnx,magic: + minimum: 0 + maximum: 255 + description: | + Magic number used when injecting faults. The fault inject write data least + significant byte (bits 7:0) must match this number to have any effect. + $ref: /schemas/types.yaml#/definitions/uint32 + +required: + - compatible + - reg + - xlnx,magic + +additionalProperties: false + +examples: + - | + tmr-inject@44a30000 { + compatible = "xlnx,tmr-inject-1.0"; + reg = <0x44a10000 0x10000>; + xlnx,magic = <0x46>; + }; From patchwork Tue Jun 28 05:43:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Appana Durga Kedareswara rao X-Patchwork-Id: 12897725 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 DEEB1C43334 for ; Tue, 28 Jun 2022 05:46:47 +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=I4jrUXV1bEEPKKxWqIJXyiNFR1p7WPN/Yr6fQgNkEG0=; b=EG0rI9s8ZozfnN KzORF/oUJSxz8u7DzTTfFKb3PLwB4G9YbRnoxSw55saWig9hOk5fZ65aNDvDt+DCXaGpTBF90y+Ho RXBotE1JEmhOjPtHB4p8NviViXjg84rQzgJqnsdI5Ud/AJMywSstEFiri3ZqrAX8guAFQI/jbXswz GLu2ORdvqqSlIAJdQfGoSRFzPDnJBkFygkSQrq2WgeLj6k4N/bFSrOLUSI1HQbHvLES1JisXjVBUM j1pHRkJw4C8K81d5mUk76ti4OsElwboog3Z/ZIaiSSfzmmDJMFHiiZthV1gowtF4gPbA7+/VJ4xCZ SbtsgKWXqbXJy6wh2ZsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1o642O-004QFr-4W; Tue, 28 Jun 2022 05:45:24 +0000 Received: from mail-bn8nam12on2080.outbound.protection.outlook.com ([40.107.237.80] helo=NAM12-BN8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1o641k-004PzP-83 for linux-arm-kernel@lists.infradead.org; Tue, 28 Jun 2022 05:44:51 +0000 ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=FybYvLvogtBzvtp7wuWUy7n5iIVzT0ahrPC4edN/D1ZgWQ0yNjp3TER3tOA7UWl6Un/ifm0tPSPsPcB4CLSdhqMLvw4ybbHbBFWaPzfn0sINtwjJJB+2qyD1KmoWOKC0WoY9CP4zzq5R5l3gLinCQItCco0/9WaHtBPl+FcqCjPpf2za0PtJ/3nEEHXkInHKxcPQh6NGR+p7KcPLS1JPTFih6fHFe7IqiOcbP650pGqBhbceAdodPMJ9pe704k0REknb5/iankboZFQT27qJ5JPZRlgjRZuEwDIh9OUtxyLuoNPWnZPETarySy7NsPjGbqRuMpj+Fd5Ivz4j1xWZaQ== ARC-Message-Signature: i=2; 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=G2jLdXMcTf1cTwkOzltrXEIYxyozG8BF1A8HEFo8JFU=; b=Avh8kDT/aUSQJLEKH48B0RyEm2B+VHjmK241sp/rQ7mgp6YRcgUlJ3IV51EUzqHgE1egqNHdNgKEKyR71Fg4i7HbINzdcXpfnzWKYbTpYGyq/L66iGKL1DGA2lpMv9iteQMLaqpchCMSVpHG7r7Y72lf9cPM6UTqrKT3JS1qRZsvdwllhGdrExjT/0QY7z9wU2imU4wyUW0wyKzp8CXy1nKo9BC/FZraqoosLl7CbtMf3Zzv7D/2KpSNmEe9Smq4l760m7DfbwgjNQn//8vHBZLDBI8A/UqA3mKW8HfW0SzyeGe/CftNDVmftLB7M3vRsApJxYKNELd82I6WCOsnGg== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 20.83.241.18) smtp.rcpttodomain=arndb.de smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=xilinx.com] dmarc=[1,1,header.from=xilinx.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=xilinx.onmicrosoft.com; s=selector2-xilinx-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=G2jLdXMcTf1cTwkOzltrXEIYxyozG8BF1A8HEFo8JFU=; b=AFRjIaoxXsn8vil7fzKUN38Vlvk6hpLVvuu3+uavhRuw4hAEnJwxSQMypaQQ04CLO7ZeSo9L3Omn5qLWMptXBaFPShq1drZTV0q7EP7MaLLnkVq9N4kkB+6hhi+LSDz4z+kEJD0PO3QWthc8EbmQeqAPn3qls9kZxk2KmkzVY4s= Received: from SA0PR11CA0014.namprd11.prod.outlook.com (2603:10b6:806:d3::19) by MN2PR02MB6208.namprd02.prod.outlook.com (2603:10b6:208:1bd::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.16; Tue, 28 Jun 2022 05:44:40 +0000 Received: from SN1NAM02FT0047.eop-nam02.prod.protection.outlook.com (2603:10b6:806:d3:cafe::2d) by SA0PR11CA0014.outlook.office365.com (2603:10b6:806:d3::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17 via Frontend Transport; Tue, 28 Jun 2022 05:44:40 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 20.83.241.18) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received-SPF: Pass (protection.outlook.com: domain of xilinx.com designates 20.83.241.18 as permitted sender) receiver=protection.outlook.com; client-ip=20.83.241.18; helo=mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net; pr=C Received: from mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (20.83.241.18) by SN1NAM02FT0047.mail.protection.outlook.com (10.97.5.120) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:44:39 +0000 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1anam02lp2047.outbound.protection.outlook.com [104.47.57.47]) by mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net (Postfix) with ESMTPS id 70D973F04A; Tue, 28 Jun 2022 05:44:39 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=YnzcftfHgf6HquxEirBqht64x/9KM2caAyq5h7AkNGS7DJBLwXOn9JhNiMEC3X+wLdwGrx72SHicTFtYo8f1BR6RJm3zpgSqD2/hpsgs2gNYAyR8J8sDV8SCeGwMnrpxQiCxio533eCA/A+z36B6Pvk9zko54XEqzdZ9rFwEc+8cM715BAVeZckfR7jNjq5I7qxTOJvs4IqMjJyI0PwupksYJVFXzPTY0ctR9njCOELg3f6u4/QdNOKJDXgSAp+JJc9L/WH2Rav4O0saTFmYrRndS78cSfrvE9zD+GTGFBO/JrLLu4ri6MjZgwtOe5mkgkMumGGmZJIOe4GrBL8tdA== 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=G2jLdXMcTf1cTwkOzltrXEIYxyozG8BF1A8HEFo8JFU=; b=HgWjVSjaK9Waz7EHAriW0yYSj49my+Datc6nRm0Hh3iQ+vuckogzsqqvcQvfJpCHteNqx7SjcnBpRuCwE+m/0In2GqAm0pf4wPsU6wLBs9vgd1oudQwBsGyKgsrdPKZRwMrtlURjpTMJT0g6HK0ZcJNOFzUh5M8b6mRuqxC1Qan8Aa6HdHtqo3fCQp6OROHLZS9XK/kw6S18bxVuVUJFJj7AG2eI8A/JC4E3tcOu46sZEhPCz38K98vEGjhbgQxCcg4TXXsf4ryFuxaUJfI5A247aohsIgLi8hJCfFpuzjQG+jaSh0wu0UcqUm287c0u40rmDQ/2C1SM3QqnziWh4w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 149.199.62.198) smtp.rcpttodomain=kernel.org smtp.mailfrom=xilinx.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=xilinx.com; dkim=none (message not signed); arc=none Received: from DM6PR02CA0151.namprd02.prod.outlook.com (2603:10b6:5:332::18) by DM8PR02MB7989.namprd02.prod.outlook.com (2603:10b6:8:12::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.17; Tue, 28 Jun 2022 05:44:35 +0000 Received: from DM3NAM02FT061.eop-nam02.prod.protection.outlook.com (2603:10b6:5:332:cafe::27) by DM6PR02CA0151.outlook.office365.com (2603:10b6:5:332::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:44:35 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 149.199.62.198) smtp.mailfrom=xilinx.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=xilinx.com; Received: from xsj-pvapexch01.xlnx.xilinx.com (149.199.62.198) by DM3NAM02FT061.mail.protection.outlook.com (10.13.4.230) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5373.15 via Frontend Transport; Tue, 28 Jun 2022 05:44:35 +0000 Received: from xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) by xsj-pvapexch01.xlnx.xilinx.com (172.19.86.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2176.14; Mon, 27 Jun 2022 22:43:59 -0700 Received: from smtp.xilinx.com (172.19.127.95) by xsj-pvapexch02.xlnx.xilinx.com (172.19.86.41) with Microsoft SMTP Server id 15.1.2176.14 via Frontend Transport; Mon, 27 Jun 2022 22:43:59 -0700 Received: from [10.140.6.6] (port=51114 helo=xhdappanad40.xilinx.com) by smtp.xilinx.com with esmtp (Exim 4.90) (envelope-from ) id 1o6410-0007Ut-Ei; Mon, 27 Jun 2022 22:43:58 -0700 From: Appana Durga Kedareswara rao To: , , , , , , , , , , CC: , Subject: [PATCH 4/4] drivers: misc: Add Support for TMR Inject IP Date: Tue, 28 Jun 2022 11:13:38 +0530 Message-ID: <20220628054338.1631516-5-appana.durga.rao@xilinx.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> References: <20220628054338.1631516-1-appana.durga.rao@xilinx.com> MIME-Version: 1.0 X-EOPAttributedMessage: 1 X-MS-Office365-Filtering-Correlation-Id: 059f37f4-887e-4015-6155-08da58c94b42 X-MS-TrafficTypeDiagnostic: DM8PR02MB7989:EE_|SN1NAM02FT0047:EE_|MN2PR02MB6208:EE_ X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; X-Microsoft-Antispam-Message-Info-Original: b39ZkRPtbrf13ULM21Vee2YQoAIriTnvdinDxfLwcdRxt1BcU0ZNfpkGQZaG9NWmoHwQB3kUZWwsjNLUzBX54tejMQ3XvEhJvmlCU5aImAoKfvvVxMSEHNhuD9NGWBOtEgOlO0ACX0NnzuzvHFggLP9TEUgTCHrt7iVCb8PsNT4lwA7HOC95mNANnFIqB4gksyyV2H8L0MNh1FjLWdR3DePrQlMtrifDE0RdBj6tzXhmxNKQRIIvZ1933luoLH2Rx69d1tEj56ZHjRzx17i55ezP4mfGrwlEbm4h0yEf33Ya+/Pxdyzqm7NlXnXZ7uvz33fRQrRIh+MBLcQYmOE/BO2LdPnKoIjQ8Qm1m12mM6ZTHk16TXHgvMitCrMnJH4LcRYFSrV7AQuXa2E1tBPlSEzSJcVbVe+9h9V1A5fvUrUskCQP5O8TrFft5LqxgoNTxmkyG/TABhd3C8MFzBKHlR1YJnuCjW/FsBACz7cTruv0+yxOHEQEvxuTsDKeXLnRVxWWVTyy/2/q0bjV1upIxsji6soPlX3MvJb3UBbmoUbM2QYG58p2DwoEDyvSecJOcSBcPT7bIkysdD7Pa9URTSIvfSBlgDXP0Mej1BtCZKHOYX8iKu2J8f1x8X59Z0BOWOx5QPcPUH04iqWZtrJicYojf17pN1t0bkkCJpB61lWazxQzDlfLA3JLKgzlUviTc5MDjgEVPCLLvHKHdaOXqsBGK/APSFV+olvgGwL0UvHCYCGwRN/7sErmJgKap9zMM8eSoMRBjDGCHv5WEN2VdQv452yX+JjTNeIFiEvBYzswdN+SNZ0e7Ae223l0kB5Eo2Al6uE8cNMyXUey6hILOTdGxBe006EoVK1/U49fTQg= X-Forefront-Antispam-Report-Untrusted: CIP:149.199.62.198;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:xsj-pvapexch01.xlnx.xilinx.com;PTR:unknown-62-198.xilinx.com;CAT:NONE;SFS:(13230016)(4636009)(376002)(396003)(136003)(39860400002)(346002)(40470700004)(46966006)(36840700001)(36860700001)(107886003)(2616005)(54906003)(41300700001)(316002)(83380400001)(110136005)(8936002)(336012)(6666004)(478600001)(186003)(47076005)(5660300002)(1076003)(40480700001)(103116003)(70206006)(40460700003)(8676002)(26005)(426003)(7696005)(4326008)(9786002)(70586007)(7636003)(2906002)(82310400005)(921005)(82740400003)(356005)(36756003)(102446001);DIR:OUT;SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM8PR02MB7989 X-MS-Exchange-Transport-CrossTenantHeadersStripped: SN1NAM02FT0047.eop-nam02.prod.protection.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: af634646-1f4d-4773-ec9a-08da58c94885 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Jwvo50XqW9rQS1K40v/9TfaSzC2k14VY011dD7H1LPaej0jManQakvOM/ikhhJ69jdhckIrMOWEWL0m21+JigN/0e9QHC42GS96mkTma2KpczOGJlEnuDbYrQLogEMq1SkX48EUg0yKjnqzeQEcYxbYBwc+hHETW+lTbqVSIN3hwqBOo8np9GcQITFgNLU2bi5SrCsgYU3sSLyohpNmdNDyajrjR3BsbWO6pGuyjsoJUa2p08HYjbrCx4xpwRMBQUwb4Kl15bDtWOYjx/VCBByi29gzhUL5tCQSHufkp0RX4lnkG5LUIAF304sVH5/3y0U4FKoWGJGtbFVsBh5dUaGUtGRzj0knFsHD4NZS9OhtjEljhVg93v4zirzU+jdNdZXcT5+LUR6lzgotvpQtpzaBRNi/wxMBQkLa1vA0Q+fPx2ziuMI4xm+w5F9tCxEqyKyqLzIGZ4N02MUfg73E+A2Z6E7IDhQkbOKUgnub2Zz4PVS1BHsT6tVzbOOUzE8/cPtKtcTEpBL1gkLQa2fI4GkQLM0ag1RCstBbzqpwGXrS+3s1LGxRo+n+G5ZIphD0hExt0LQ/MR2zucLdqXUWneJMFzS6KIjyN04dDchVIqKNDsBLK/j0kNDEd73CSCZrUoo/AtKuNGzTwS6OcuHgUt2HgLSljlCvEN1TpdR6aplfAQjUTP5t5qb47wWNu964yqw648+3vkfCTLd8uan7mRnRDTTXn2Zzf8uXNgXqb42N1yu7CeRZY12aiOwrfNPTSEkRaOoV1/ksueSfZ46dqMCo8q2/CZvyHPJ7xpCUdN2fAYbyQLrd2oP+3TWBtWuMGLro6Tq1ukq/Fe6i7xqBAsN+lWOnhKJCO27AtDn+LUeZSlu3zcd1jnFsdwbM0bKzm X-Forefront-Antispam-Report: CIP:20.83.241.18;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230016)(4636009)(346002)(376002)(39860400002)(396003)(136003)(46966006)(40470700004)(36840700001)(426003)(70206006)(40480700001)(103116003)(2616005)(54906003)(6666004)(336012)(107886003)(83380400001)(5660300002)(26005)(110136005)(7696005)(186003)(40460700003)(47076005)(921005)(1076003)(41300700001)(36756003)(8676002)(82310400005)(81166007)(4326008)(82740400003)(8936002)(2906002)(478600001)(36860700001)(9786002)(316002)(102446001)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: xilinx.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Jun 2022 05:44:39.9252 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 059f37f4-887e-4015-6155-08da58c94b42 X-MS-Exchange-CrossTenant-Id: 657af505-d5df-48d0-8300-c31994686c5c X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=657af505-d5df-48d0-8300-c31994686c5c;Ip=[20.83.241.18];Helo=[mailrelay000000.14r1f435wfvunndds3vy4cdalc.xx.internal.cloudapp.net] X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: TreatMessagesAsInternal-SN1NAM02FT0047.eop-nam02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN2PR02MB6208 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220627_224444_514942_66F41F42 X-CRM114-Status: GOOD ( 15.99 ) 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 The Triple Modular Redundancy(TMR) provides functional fault injection by changing selected MicroBlaze instructions, which provides the possibility to verify that the TMR subsystem error detection and fault recovery logic is working properly. This commit adds support for fault injection, provided sysfs entries which allow the user to inject a fault. Usage: echo 1 > /sys/devices/platform/amba_pl/44a30000.tmr_inject/inject_err Signed-off-by: Appana Durga Kedareswara rao --- .../testing/sysfs-driver-xilinx-tmr-inject | 12 ++ MAINTAINERS | 7 + drivers/misc/Kconfig | 10 + drivers/misc/Makefile | 1 + drivers/misc/xilinx_tmr_inject.c | 201 ++++++++++++++++++ 5 files changed, 231 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-driver-xilinx-tmr-inject create mode 100644 drivers/misc/xilinx_tmr_inject.c diff --git a/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-inject b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-inject new file mode 100644 index 000000000000..373a5964cee9 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-driver-xilinx-tmr-inject @@ -0,0 +1,12 @@ +What: /sys/devices/platform/amba_pl//inject_err +Date: June 2022 +Contact: appana.durga.rao@xilinx.com +Description: This control file allows to inject fault using tmr inject. + This file is write only. + +What: /sys/devices/platform/amba_pl//inject_cpuid +Date: June 2022 +Contact: appana.durga.rao@xilinx.com +Description: This control file allows to configure the CPU identifier + to enable fault injection. + This file is write only. diff --git a/MAINTAINERS b/MAINTAINERS index 3d29109788ed..1446c5aca9e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12969,6 +12969,13 @@ F: Documentation/ABI/testing/sysfs-driver-xilinx-tmr-manager F: Documentation/devicetree/bindings/misc/xlnx,tmr-manager.yaml F: drivers/misc/xilinx_tmr_manager.c +MICROBLAZE TMR INJECT +M: Appana Durga Kedareswara rao +S: Supported +F: Documentation/ABI/testing/sysfs-driver-xilinx-tmr-inject +F: Documentation/devicetree/bindings/misc/xlnx,tmr-inject.yaml +F: drivers/misc/xilinx_tmr_inject.c + MICROCHIP AT91 DMA DRIVERS M: Ludovic Desroches M: Tudor Ambarus diff --git a/drivers/misc/Kconfig b/drivers/misc/Kconfig index 555ae2e33b91..0989c36f3051 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -493,6 +493,16 @@ config TMR_MANAGER Say N here unless you know what you are doing. +config TMR_INJECT + bool "Select TMR Inject" + depends on TMR_MANAGER + help + This option enables the driver developed for TMR Inject. + The Triple Modular Redundancy(TMR) Inject provides + fault injection. + + Say N here unless you know what you are doing. + source "drivers/misc/c2port/Kconfig" source "drivers/misc/eeprom/Kconfig" source "drivers/misc/cb710/Kconfig" diff --git a/drivers/misc/Makefile b/drivers/misc/Makefile index 28b9803f909b..e9d0a709e207 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -61,3 +61,4 @@ obj-$(CONFIG_HISI_HIKEY_USB) += hisi_hikey_usb.o obj-$(CONFIG_HI6421V600_IRQ) += hi6421v600-irq.o obj-$(CONFIG_OPEN_DICE) += open-dice.o obj-$(CONFIG_TMR_MANAGER) += xilinx_tmr_manager.o +obj-$(CONFIG_TMR_INJECT) += xilinx_tmr_inject.o diff --git a/drivers/misc/xilinx_tmr_inject.c b/drivers/misc/xilinx_tmr_inject.c new file mode 100644 index 000000000000..e458d6d35ae1 --- /dev/null +++ b/drivers/misc/xilinx_tmr_inject.c @@ -0,0 +1,201 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for Xilinx TMR Inject IP. + * + * Copyright (C) 2022 Xilinx, Inc. + * + * Description: + * This driver is developed for TMR Inject IP,The Triple Modular Redundancy(TMR) + * Inject provides fault injection. + * Fault injection and detection features are provided through sysfs entries + * which allow the user to generate a fault. + */ + +#include +#include +#include + +/* TMR Inject Register offsets */ +#define XTMR_INJECT_CR_OFFSET 0x0 +#define XTMR_INJECT_AIR_OFFSET 0x4 +#define XTMR_INJECT_IIR_OFFSET 0xC +#define XTMR_INJECT_EAIR_OFFSET 0x10 +#define XTMR_INJECT_ERR_OFFSET 0x204 + +/* Register Bitmasks/shifts */ +#define XTMR_INJECT_CR_CPUID_SHIFT 8 +#define XTMR_INJECT_CR_IE_SHIFT 10 +#define XTMR_INJECT_IIR_ADDR_MASK GENMASK(31, 16) + +#define XTMR_INJECT_MAGIC_MAX_VAL 255 + +/** + * struct xtmr_inject_dev - Driver data for TMR Inject + * @regs: device physical base address + * @dev: pointer to device struct + * @cr_val: control register value + * @magic: Magic hardware configuration value + * @err_cnt: error statistics count + */ +struct xtmr_inject_dev { + void __iomem *regs; + struct device *dev; + u32 cr_val; + u32 magic; + u32 err_cnt; +}; + +/* IO accessors */ +static inline void xtmr_inject_write(struct xtmr_inject_dev *xtmr_inject, + u32 addr, u32 value) +{ + iowrite32(value, xtmr_inject->regs + addr); +} + +static inline u32 xtmr_inject_read(struct xtmr_inject_dev *xtmr_inject, + u32 addr) +{ + return ioread32(xtmr_inject->regs + addr); +} + +static ssize_t inject_err_store(struct device *dev, + struct device_attribute *attr, const char *buf, + size_t size) +{ + int ret; + long value; + + ret = kstrtoul(buf, 16, &value); + if (ret) + return ret; + + if (value > 1) + return -EINVAL; + + xmb_inject_err(); + + return size; +} +static DEVICE_ATTR_WO(inject_err); + +static ssize_t inject_cpuid_store(struct device *dev, + struct device_attribute *attr, + const char *buf, size_t size) +{ + struct xtmr_inject_dev *xtmr_inject = dev_get_drvdata(dev); + int ret; + long value; + + ret = kstrtoul(buf, 0, &value); + if (ret) + return ret; + + if (value > 3) + return -EINVAL; + + xtmr_inject->cr_val |= (value << XTMR_INJECT_CR_CPUID_SHIFT); + xtmr_inject_write(xtmr_inject, XTMR_INJECT_CR_OFFSET, + xtmr_inject->cr_val); + + return size; +} +static DEVICE_ATTR_WO(inject_cpuid); + +static struct attribute *xtmr_inject_attrs[] = { + &dev_attr_inject_err.attr, + &dev_attr_inject_cpuid.attr, + NULL, +}; +ATTRIBUTE_GROUPS(xtmr_inject); + +static void xtmr_inject_init(struct xtmr_inject_dev *xtmr_inject) +{ + /* Allow fault injection */ + xtmr_inject->cr_val = xtmr_inject->magic | + (1 << XTMR_INJECT_CR_IE_SHIFT) | + (1 << XTMR_INJECT_CR_CPUID_SHIFT); + xtmr_inject_write(xtmr_inject, XTMR_INJECT_CR_OFFSET, + xtmr_inject->cr_val); + /* Initialize the address inject and instruction inject registers */ + xtmr_inject_write(xtmr_inject, XTMR_INJECT_AIR_OFFSET, + XMB_INJECT_ERR_OFFSET); + xtmr_inject_write(xtmr_inject, XTMR_INJECT_IIR_OFFSET, + XMB_INJECT_ERR_OFFSET & XTMR_INJECT_IIR_ADDR_MASK); +} + +/** + * xtmr_inject_probe - Driver probe function + * @pdev: Pointer to the platform_device structure + * + * This is the driver probe routine. It does all the memory + * allocation and creates sysfs entries for the device. + * + * Return: 0 on success and failure value on error + */ +static int xtmr_inject_probe(struct platform_device *pdev) +{ + struct xtmr_inject_dev *xtmr_inject; + int err; + + xtmr_inject = devm_kzalloc(&pdev->dev, sizeof(*xtmr_inject), + GFP_KERNEL); + if (!xtmr_inject) + return -ENOMEM; + + xtmr_inject->dev = &pdev->dev; + + xtmr_inject->regs = devm_platform_ioremap_resource(pdev, 0); + if (IS_ERR(xtmr_inject->regs)) + return PTR_ERR(xtmr_inject->regs); + + err = of_property_read_u32(pdev->dev.of_node, "xlnx,magic", + &xtmr_inject->magic); + if (err < 0) { + dev_err(&pdev->dev, "unable to read xlnx,magic property"); + return err; + } else if (xtmr_inject->magic > XTMR_INJECT_MAGIC_MAX_VAL) { + dev_err(&pdev->dev, "invalid xlnx,magic property value"); + return err; + } + + /* Initialize TMR Inject */ + xtmr_inject_init(xtmr_inject); + + err = sysfs_create_groups(&xtmr_inject->dev->kobj, xtmr_inject_groups); + if (err < 0) { + dev_err(&pdev->dev, "unable to create sysfs entries\n"); + return err; + } + + platform_set_drvdata(pdev, xtmr_inject); + + return 0; +} + +static int xtmr_inject_remove(struct platform_device *pdev) +{ + sysfs_remove_groups(&pdev->dev.kobj, xtmr_inject_groups); + + return 0; +} + +static const struct of_device_id xtmr_inject_of_match[] = { + { + .compatible = "xlnx,tmr-inject-1.0", + }, + { /* end of table */ } +}; +MODULE_DEVICE_TABLE(of, xtmr_inject_of_match); + +static struct platform_driver xtmr_inject_driver = { + .driver = { + .name = "xilinx-tmr_inject", + .of_match_table = xtmr_inject_of_match, + }, + .probe = xtmr_inject_probe, + .remove = xtmr_inject_remove, +}; +module_platform_driver(xtmr_inject_driver); +MODULE_AUTHOR("Xilinx, Inc"); +MODULE_DESCRIPTION("Xilinx TMR Inject Driver"); +MODULE_LICENSE("GPL");