// SPDX-License-Identifier: GPL-2.0+/* * Driver for Renesas R-Car VIN * * Copyright (C) 2016 Renesas Electronics Corp. * Copyright (C) 2011-2013 Renesas Solutions Corp. * Copyright (C) 2013 Cogent Embedded, Inc., <source@cogentembedded.com> * Copyright (C) 2008 Magnus Damm * * Based on the soc-camera rcar_vin driver */#include<linux/delay.h>#include<linux/interrupt.h>#include<linux/pm_runtime.h>#include<media/videobuf2-dma-contig.h>#include"rcar-vin.h"/* ----------------------------------------------------------------------------- * HW Functions *//* Register offsets for R-Car VIN */#define VNMC_REG 0x00 /* Video n Main Control Register */#define VNMS_REG 0x04 /* Video n Module Status Register */#define VNFC_REG 0x08 /* Video n Frame Capture Register */#define VNSLPRC_REG 0x0C /* Video n Start Line Pre-Clip Register */#define VNELPRC_REG 0x10 /* Video n End Line Pre-Clip Register */#define VNSPPRC_REG 0x14 /* Video n Start Pixel Pre-Clip Register */#define VNEPPRC_REG 0x18 /* Video n End Pixel Pre-Clip Register */#define VNIS_REG 0x2C /* Video n Image Stride Register */#define VNMB_REG(m) (0x30 + ((m) << 2)) /* Video n Memory Base m Register */#define VNIE_REG 0x40 /* Video n Interrupt Enable Register */#define VNINTS_REG 0x44 /* Video n Interrupt Status Register */#define VNSI_REG 0x48 /* Video n Scanline Interrupt Register */#define VNMTC_REG 0x4C /* Video n Memory Transfer Control Register */#define VNDMR_REG 0x58 /* Video n Data Mode Register */#define VNDMR2_REG 0x5C /* Video n Data Mode Register 2 */#define VNUVAOF_REG 0x60 /* Video n UV Address Offset Register *//* Register offsets specific for Gen2 */#define VNSLPOC_REG 0x1C /* Video n Start Line Post-Clip Register */#define VNELPOC_REG 0x20 /* Video n End Line Post-Clip Register */#define VNSPPOC_REG 0x24 /* Video n Start Pixel Post-Clip Register */#define VNEPPOC_REG 0x28 /* Video n End Pixel Post-Clip R