lkml.org 
[lkml]   [2022]   [Nov]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 23/23] staging: media: tegra-video: add tegra20 variant
On Wed,  9 Nov 2022 15:18:52 +0100
luca.ceresoli@bootlin.com 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

\
 
 \ /
  Last update: 2022-11-09 17:26    [W:0.161 / U:0.888 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site