Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1223298rwi; Thu, 3 Nov 2022 02:41:14 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6XUcukYT6XrTIeeGI+H2qgcaaa/QlXHuM8kZm2q6jCwqM8t2NW8AyMGyiDGisjLsIg6/55 X-Received: by 2002:a17:906:6a26:b0:7ad:975c:9785 with SMTP id qw38-20020a1709066a2600b007ad975c9785mr30247598ejc.25.1667468474025; Thu, 03 Nov 2022 02:41:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1667468474; cv=pass; d=google.com; s=arc-20160816; b=RKIKm86V++Y4FEZGDoeGmW5tVWpN54LEoJARfRxRKCKPXV3vLv4uHrNKOAtDpWzkD7 B/NUhzOJv35MHd6USFSAwnL0vBwgsS7QG7wCjYUzu3bDF+Rtn/L/gxyH+Lw3vHFhEZfg /+qTuGaCimqLB8s4spIHVpeneOsw94ghJczGE6WiuHlfkFcNFS/9LkcFnLDzi+mH6vYO 50TLYEy6kqBqLN30lL4gVWixUgvatojdjgLeHCpI0I3Ng29L1fFtI6XaYvsXOBYchFOF lJ1/+n7EXjrx9FO1zsRd+KwXc/6bFL+P/9fmvdfJASNb8jaCrmdkY3/tyZGWlnleRYbd qZXg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=g2OhAGFBdzIH8VoLtRojpAe6IU8trDb5pJh9MxplWN8=; b=TupjT4sFr6Gf84/ks4VM6+aWGJpvkq5sxxBIs9Bo6i+toy4sgPT+KeiW9FtL36U6/v 8zBxLSmZR7LrUvlK1DY2LX4hWcrSG7tyEByYA1a1NpEedoOQB1d4K93y3BqPairJoDvE xKKRtN+NWwCgXcrFiSUI0mNIqWR9xmpL2ILuL8lwmFDZ/ltOublno3fnnyZEqAG7Wy3P CDPgPNrLLRgfI/FAqaT52PqR5hR34azJevraEoYCMqtr7PVW5c3YQU9uCw7fG17MsaTc waX2lOkl4Yh9REzqrSaixDjCaJn8uVe2CTV07xcK7l66+27qKt3KBNurrL1NZHpjKJdx AYtw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ReOTzKFH; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs38-20020a1709073ea600b00788166eaab6si693845ejc.745.2022.11.03.02.40.49; Thu, 03 Nov 2022 02:41:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=ReOTzKFH; arc=pass (i=1 spf=pass spfdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231561AbiKCJR3 (ORCPT + 97 others); Thu, 3 Nov 2022 05:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35084 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231258AbiKCJQq (ORCPT ); Thu, 3 Nov 2022 05:16:46 -0400 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2060a.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e88::60a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D41B2DF46; Thu, 3 Nov 2022 02:16:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BwleYPoYBw8dr4GLPqvIAScN36T3ZnG+zuk7Tapq1Qe7HgorY55UXb1c7WUf11pB+PQInvVxuIWMAmoD3pcVIq6gqaZyaqLO3u0BOte1H3ovsktYarFg9E2GnigM4+UmCLah496tJ0LT64r5kPpItcJbYpczX3mF/SEKomZoTzf5HC0uGz0GbiYWbBnxkMha3sgYAmzMfpvjLCdeVX3U9F11BywmNVNwBf/sNNUyI8hLxKPTi3U1WvLH/O5hgIK9f8jC3jsD1aDQf1x1Y2L1IezCLO2YywBzH9jGytbL0n/kgnaE1/u3kbG2GboYTvnjwfQOJSZExmMNWLABKN7jFg== 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=g2OhAGFBdzIH8VoLtRojpAe6IU8trDb5pJh9MxplWN8=; b=hU2Gg3jED4VDTe/Vltpsl9gTM7yt5nl/5cH8XES7XCOscVzXFNx6a6ebNG7AQP3t/KgiGb/+58MROrEfBYhnIBYDnUM/kdLcyH4AFHJlFAY1zCTbpEVHqR/p92/XL9deiW4sBgnLM2q2hmJrOFgPwsFFtE1KKl4gBEQKu+uL8KkygcQxJaHkVq9/9vCpaGBTrnvmbnAS7tRpMISp13togosMIMJl2XbUTDW0AKmyevr4XjN92f4rbPkd8Aai2Zv15H4L3NghjKaG7OPRerucAEjlFg6nGBPmikggdSGMCx4KusuPbhsqEpRO9QscnCscL2INTHs11dQFnkU//FvlGg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=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=g2OhAGFBdzIH8VoLtRojpAe6IU8trDb5pJh9MxplWN8=; b=ReOTzKFHUXuNTXKlIv5tR6aG9vvflx0xHk7t88bgYx7Kpa0wS5gY4yaklQPDejG9/zSZEKcr5EiJ0HUGkuyhpTBz7s4/xVvA85nQXe8rV4CFz6Eb8kOFLZRemdv4lRNLkbNuzT3z2GwymGJelG9JFtB/3uvp/uIFOdB3ypozzPc= Received: from BN8PR07CA0030.namprd07.prod.outlook.com (2603:10b6:408:ac::43) by PH0PR12MB7093.namprd12.prod.outlook.com (2603:10b6:510:21d::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Thu, 3 Nov 2022 09:16:05 +0000 Received: from BN8NAM11FT108.eop-nam11.prod.protection.outlook.com (2603:10b6:408:ac:cafe::4f) by BN8PR07CA0030.outlook.office365.com (2603:10b6:408:ac::43) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22 via Frontend Transport; Thu, 3 Nov 2022 09:16:05 +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 BN8NAM11FT108.mail.protection.outlook.com (10.13.176.155) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5791.20 via Frontend Transport; Thu, 3 Nov 2022 09:16:05 +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.2375.31; Thu, 3 Nov 2022 04:16:02 -0500 From: Appana Durga Kedareswara rao To: , , , , , , , , , , CC: , , kernel test robot Subject: [PATCH v6 4/4] drivers: misc: Add Support for TMR Inject IP Date: Thu, 3 Nov 2022 14:45:00 +0530 Message-ID: <20221103091500.3022212-5-appana.durga.kedareswara.rao@amd.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221103091500.3022212-1-appana.durga.kedareswara.rao@amd.com> References: <20221103091500.3022212-1-appana.durga.kedareswara.rao@amd.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain 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: BN8NAM11FT108:EE_|PH0PR12MB7093:EE_ X-MS-Office365-Filtering-Correlation-Id: a00ac219-b17c-4d14-96fd-08dabd7c092e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: fHtE3f/xAhJCOKi3HxYJmnGTEEoGNGYhV7WwWdPPSmosNAJ0SQn2q0HrgUOBSmQaDmRr4O1q+CG8abuYv3NnIZ+A/oI96rJIfm9U8VWsT1uwj1yIg60xDcVBxcuRqm5V/suerdc4Umn1H+Xcn8jBCTlha7nzVv7cmkQc55bp8dUvH0XHC8XWkx/dQ3+SSrY6p0QdAI93vJPdQTRFJ+iPblL39nFkqa9gwlt8eApGdzrnXzuUrLRUFNrLM3HNJEwesAUTa+zyyPX6fiJ0XsREPDG1VgqwePed1r8s4eCi0JvvKQIzcZiIuGvUkYM9TegkjMGMgdp3R4Ku+2PrlIpW3S2LZVESHAwWWV1xjsVfBqjbcwa6OCXErQT8rwp5cpxVjVSXB8qGbwnXeKTmS5GVkG61SCVlIFx+xsHg1wylisUZBJCNpu4TjuoXuNrih3iCQ55tNfOgimQONRf8tI0zthbXDF/SDf/JwSC1PrsVvfRg4CVvVsHXaRZWX7SicDI8gpQYBVa5lWVcqB2IK/TpjrrZASd94ZOAV3QQbijhYJqZjc8EM4CaozjK0ES+MTay43p4rAhWl9ptNTxVfevAU2+s/y3xddbL1FPpGaJjo+uYRtYL3pUXRJPpN1bxIDKrQDv9CK66DfiXutpC3yFiI30Wc5jrwg+Jmn/OjANvHJPpmn14JUMl1s3cWHtZCkWKl5e534kGR3GwhWHVNR+L88+J5/UR0hN+0CRc/653iXNlcGnwlgjp+A95bWpLH2Y9APRoUiy2VyDnc1m9UEI0VSxzYBHsnPFWeXu+QIBwII3LmaxebIjjazY0pSEvrS5x 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:(13230022)(4636009)(39860400002)(136003)(376002)(346002)(396003)(451199015)(36840700001)(46966006)(40470700004)(82740400003)(36756003)(478600001)(82310400005)(36860700001)(2906002)(40460700003)(4326008)(70206006)(70586007)(356005)(5660300002)(86362001)(8936002)(41300700001)(54906003)(316002)(110136005)(40480700001)(81166007)(921005)(103116003)(8676002)(83380400001)(186003)(336012)(16526019)(426003)(2616005)(1076003)(26005)(47076005)(36900700001);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Nov 2022 09:16:05.3520 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: a00ac219-b17c-4d14-96fd-08dabd7c092e 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: BN8NAM11FT108.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH0PR12MB7093 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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. Usage: echo 1 > /sys/kernel/debug/xtmr_inject/inject_fault/inject_fault Signed-off-by: Appana Durga Kedareswara rao Reported-by: kernel test robot --- Changes for v6: --> Fixed -Wmissing-prototypes warning reported by kernel test robot. Changes for v5: --> None. Changes for v4: --> Update depends on with FAULT_INJECTION_DEBUG_FS instead of FAULT_INJECTION. Changes for v3: --> Updated the driver to use fault-injection api as suggested by Greg. --> Updated the Kconfig to compile the driver as a module. Changes for v2: --> Fixed Month in the sysfs description. --> Fixed line over 80 char in driver. --> Replaced kstrtol with kstrtoul as suggested by Michal. --> Added error check for xlnx,magic value. MAINTAINERS | 6 ++ drivers/misc/Kconfig | 10 ++ drivers/misc/Makefile | 1 + drivers/misc/xilinx_tmr_inject.c | 171 +++++++++++++++++++++++++++++++ 4 files changed, 188 insertions(+) create mode 100644 drivers/misc/xilinx_tmr_inject.c diff --git a/MAINTAINERS b/MAINTAINERS index 58e165c44019..c8c5f18ee001 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13425,6 +13425,12 @@ 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/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 a61445008f9e..35a5d333fc37 100644 --- a/drivers/misc/Kconfig +++ b/drivers/misc/Kconfig @@ -506,6 +506,16 @@ config TMR_MANAGER Say N here unless you know what you are doing. +config TMR_INJECT + tristate "Select TMR Inject" + depends on TMR_MANAGER && FAULT_INJECTION_DEBUG_FS + 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 b93b782a52f4..b2d8dd39f4d5 100644 --- a/drivers/misc/Makefile +++ b/drivers/misc/Makefile @@ -63,3 +63,4 @@ obj-$(CONFIG_OPEN_DICE) += open-dice.o obj-$(CONFIG_GP_PCI1XXXX) += mchp_pci1xxxx/ obj-$(CONFIG_VCPU_STALL_DETECTOR) += vcpu_stall_detector.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..d1564519a283 --- /dev/null +++ b/drivers/misc/xilinx_tmr_inject.c @@ -0,0 +1,171 @@ +// 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. + */ + +#include +#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 + * @magic: Magic hardware configuration value + */ +struct xtmr_inject_dev { + void __iomem *regs; + u32 magic; +}; + +static DECLARE_FAULT_ATTR(inject_fault); +static char *inject_request; +module_param(inject_request, charp, 0); +MODULE_PARM_DESC(inject_request, "default fault injection attributes"); +static struct dentry *dbgfs_root; + +/* 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 int xtmr_inject_set(void *data, u64 val) +{ + if (val != 1) + return -EINVAL; + + xmb_inject_err(); + return 0; +} +DEFINE_DEBUGFS_ATTRIBUTE(xtmr_inject_fops, NULL, xtmr_inject_set, "%llu\n"); + +static void xtmr_init_debugfs(struct xtmr_inject_dev *xtmr_inject) +{ + struct dentry *dir; + + dbgfs_root = debugfs_create_dir("xtmr_inject", NULL); + dir = fault_create_debugfs_attr("inject_fault", dbgfs_root, + &inject_fault); + debugfs_create_file("inject_fault", 0200, dir, NULL, + &xtmr_inject_fops); +} + +static void xtmr_inject_init(struct xtmr_inject_dev *xtmr_inject) +{ + u32 cr_val; + + if (inject_request) + setup_fault_attr(&inject_fault, inject_request); + /* Allow fault injection */ + 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, + 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 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->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; + } + + if (xtmr_inject->magic > XTMR_INJECT_MAGIC_MAX_VAL) { + dev_err(&pdev->dev, "invalid xlnx,magic property value"); + return -EINVAL; + } + + /* Initialize TMR Inject */ + xtmr_inject_init(xtmr_inject); + + xtmr_init_debugfs(xtmr_inject); + + platform_set_drvdata(pdev, xtmr_inject); + + return 0; +} + +static int xtmr_inject_remove(struct platform_device *pdev) +{ + debugfs_remove_recursive(dbgfs_root); + dbgfs_root = NULL; + 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"); -- 2.25.1