Lines Matching +full:tmr +full:- +full:manager

1 // SPDX-License-Identifier: GPL-2.0
3 * Driver for Xilinx TMR Manager IP.
8 * This driver is developed for TMR Manager,The Triple Modular Redundancy(TMR)
9 * Manager is responsible for handling the TMR subsystem state, including
11 * the sub-blocks in the TMR subsystem, and provides majority voting of
21 /* TMR Manager Register offsets */
44 * struct xtmr_manager_dev - Driver data for TMR Manager
63 iowrite32(value, xtmr_manager->regs + addr); in xtmr_manager_write()
69 return ioread32(xtmr_manager->regs + addr); in xtmr_manager_read()
80 xtmr_manager->err_cnt++; in xmb_manager_update_errcnt()
88 return sysfs_emit(buf, "%x\n", xtmr_manager->err_cnt); in errcnt_show()
105 xtmr_manager->cr_val &= ~(1 << XTMR_MANAGER_CR_BB_SHIFT); in dis_block_break_store()
107 xtmr_manager->cr_val); in dis_block_break_store()
125 xtmr_manager->cr_val = (1 << XTMR_MANAGER_CR_RIR_SHIFT) | in xtmr_manager_init()
126 xtmr_manager->magic1; in xtmr_manager_init()
128 xtmr_manager->cr_val); in xtmr_manager_init()
137 * in the tmr manager, update the xtmr_manager cr_val for the same in xtmr_manager_init()
139 xtmr_manager->cr_val |= (1 << XTMR_MANAGER_CR_BB_SHIFT); in xtmr_manager_init()
144 * break handler, Below api updates the TMR manager address and in xtmr_manager_init()
149 xmb_manager_register(xtmr_manager->phys_baseaddr, xtmr_manager->cr_val, in xtmr_manager_init()
155 * xtmr_manager_probe - Driver probe function
169 xtmr_manager = devm_kzalloc(&pdev->dev, sizeof(*xtmr_manager), in xtmr_manager_probe()
172 return -ENOMEM; in xtmr_manager_probe()
174 xtmr_manager->regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res); in xtmr_manager_probe()
175 if (IS_ERR(xtmr_manager->regs)) in xtmr_manager_probe()
176 return PTR_ERR(xtmr_manager->regs); in xtmr_manager_probe()
178 xtmr_manager->phys_baseaddr = res->start; in xtmr_manager_probe()
180 err = of_property_read_u32(pdev->dev.of_node, "xlnx,magic1", in xtmr_manager_probe()
181 &xtmr_manager->magic1); in xtmr_manager_probe()
183 dev_err(&pdev->dev, "unable to read xlnx,magic1 property"); in xtmr_manager_probe()
187 if (xtmr_manager->magic1 > XTMR_MANAGER_MAGIC1_MAX_VAL) { in xtmr_manager_probe()
188 dev_err(&pdev->dev, "invalid xlnx,magic1 property value"); in xtmr_manager_probe()
189 return -EINVAL; in xtmr_manager_probe()
192 /* Initialize TMR Manager */ in xtmr_manager_probe()
202 .compatible = "xlnx,tmr-manager-1.0",
210 .name = "xilinx-tmr_manager",
219 MODULE_DESCRIPTION("Xilinx TMR Manager Driver");