On Wed, 9 Nov 2022 15:18:52 +0100 luca.ceresoli@xxxxxxxxxxx wrote: > +static int tegra20_vi_enable(struct tegra_vi *vi, bool on) > +{ > + /* from arch/arm/mach-tegra/iomap.h */ > + const phys_addr_t TEGRA_APB_MISC_BASE = 0x70000000; > + const unsigned long reg_offset = 0x42c; > + void __iomem *apb_misc; > + u32 val; > + > + apb_misc = ioremap(TEGRA_APB_MISC_BASE, PAGE_SIZE); > + if (!apb_misc) > + apb_misc = ERR_PTR(-ENOENT); > + if (IS_ERR(apb_misc)) > + return dev_err_probe(vi->dev, PTR_ERR(apb_misc), "cannot access APB_MISC"); > + > + val = readl(apb_misc + reg_offset); > + writel(val | (!!on), apb_misc + reg_offset); Sorry, there is a mistake here, the bit should be set to 0 when on==false, but this code does not do that. This will be fixed in v2. -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com