License cleanup: add SPDX GPL-2.0 license identifier to files with no license
Many source files in the tree are missing licensing information, which
makes it harder for compliance tools to determine the correct license.
By default all files without license information are under the default
license of the kernel, which is GPL version 2.
Update the files which contain no license information with the 'GPL-2.0'
SPDX license identifier. The SPDX identifier is a legally binding
shorthand, which can be used instead of the full boiler plate text.
This patch is based on work done by Thomas Gleixner and Kate Stewart and
Philippe Ombredanne.
How this work was done:
Patches were generated and checked against linux-4.14-rc6 for a subset of
the use cases:
- file had no licensing information it it.
- file was a */uapi/* one with no licensing information in it,
- file was a */uapi/* one with existing licensing information,
Further patches will be generated in subsequent months to fix up cases
where non-standard license headers were used, and references to license
had to be inferred by heuristics based on keywords.
The analysis to determine which SPDX License Identifier to be applied to
a file was done in a spreadsheet of side by side results from of the
output of two independent scanners (ScanCode & Windriver) producing SPDX
tag:value files created by Philippe Ombredanne. Philippe prepared the
base worksheet, and did an initial spot review of a few 1000 files.
The 4.13 kernel was the starting point of the analysis with 60,537 files
assessed. Kate Stewart did a file by file comparison of the scanner
results in the spreadsheet to determine which SPDX license identifier(s)
to be applied to the file. She confirmed any determination that was not
immediately clear with lawyers working with the Linux Foundation.
Criteria used to select files for SPDX license identifier tagging was:
- Files considered eligible had to be source code files.
- Make and config files were included as candidates if they contained >5
lines of source
- File already had some variant of a license header in it (even if <5
lines).
All documentation files were explicitly excluded.
The following heuristics were used to determine which SPDX license
identifiers to apply.
- when both scanners couldn't find any license traces, file was
considered to have no license information in it, and the top level
COPYING file license applied.
For non */uapi/* files that summary was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 11139
and resulted in the first patch in this series.
If that file was a */uapi/* path one, it was "GPL-2.0 WITH
Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was:
SPDX license identifier # files
---------------------------------------------------|-------
GPL-2.0 WITH Linux-syscall-note 930
and resulted in the second patch in this series.
- if a file had some form of licensing information in it, and was one
of the */uapi/* ones, it was denoted with the Linux-syscall-note if
any GPL family license was found in the file or had no licensing in
it (per prior point). Results summary:
SPDX license identifier # files
---------------------------------------------------|------
GPL-2.0 WITH Linux-syscall-note 270
GPL-2.0+ WITH Linux-syscall-note 169
((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21
((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17
LGPL-2.1+ WITH Linux-syscall-note 15
GPL-1.0+ WITH Linux-syscall-note 14
((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5
LGPL-2.0+ WITH Linux-syscall-note 4
LGPL-2.1 WITH Linux-syscall-note 3
((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3
((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1
and that resulted in the third patch in this series.
- when the two scanners agreed on the detected license(s), that became
the concluded license(s).
- when there was disagreement between the two scanners (one detected a
license but the other didn't, or they both detected different
licenses) a manual inspection of the file occurred.
- In most cases a manual inspection of the information in the file
resulted in a clear resolution of the license that should apply (and
which scanner probably needed to revisit its heuristics).
- When it was not immediately clear, the license identifier was
confirmed with lawyers working with the Linux Foundation.
- If there was any question as to the appropriate license identifier,
the file was flagged for further research and to be revisited later
in time.
In total, over 70 hours of logged manual review was done on the
spreadsheet to determine the SPDX license identifiers to apply to the
source files by Kate, Philippe, Thomas and, in some cases, confirmation
by lawyers working with the Linux Foundation.
Kate also obtained a third independent scan of the 4.13 code base from
FOSSology, and compared selected files where the other two scanners
disagreed against that SPDX file, to see if there was new insights. The
Windriver scanner is based on an older version of FOSSology in part, so
they are related.
Thomas did random spot checks in about 500 files from the spreadsheets
for the uapi headers and agreed with SPDX license identifier in the
files he inspected. For the non-uapi files Thomas did random spot checks
in about 15000 files.
In initial set of patches against 4.14-rc6, 3 files were found to have
copy/paste license identifier errors, and have been fixed to reflect the
correct identifier.
Additionally Philippe spent 10 hours this week doing a detailed manual
inspection and review of the 12,461 patched files from the initial patch
version early this week with:
- a full scancode scan run, collecting the matched texts, detected
license ids and scores
- reviewing anything where there was a license detected (about 500+
files) to ensure that the applied SPDX license was correct
- reviewing anything where there was no detection but the patch license
was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied
SPDX license was correct
This produced a worksheet with 20 files needing minor correction. This
worksheet was then exported into 3 different .csv files for the
different types of files to be modified.
These .csv files were then reviewed by Greg. Thomas wrote a script to
parse the csv files and add the proper SPDX tag to the file, in the
format that the file expected. This script was further refined by Greg
based on the output to detect more types of files automatically and to
distinguish between header and source .c files (which need different
comment types.) Finally Greg ran the script using the .csv files to
generate the patches.
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-01 21:07:57 +07:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0 */
|
2016-08-17 13:05:27 +07:00
|
|
|
#ifndef __ATMEL_ISC_REGS_H
|
|
|
|
#define __ATMEL_ISC_REGS_H
|
|
|
|
|
|
|
|
#include <linux/bitops.h>
|
|
|
|
|
|
|
|
/* ISC Control Enable Register 0 */
|
|
|
|
#define ISC_CTRLEN 0x00000000
|
|
|
|
|
|
|
|
/* ISC Control Disable Register 0 */
|
|
|
|
#define ISC_CTRLDIS 0x00000004
|
|
|
|
|
|
|
|
/* ISC Control Status Register 0 */
|
|
|
|
#define ISC_CTRLSR 0x00000008
|
|
|
|
|
|
|
|
#define ISC_CTRL_CAPTURE BIT(0)
|
|
|
|
#define ISC_CTRL_UPPRO BIT(1)
|
|
|
|
#define ISC_CTRL_HISREQ BIT(2)
|
|
|
|
#define ISC_CTRL_HISCLR BIT(3)
|
|
|
|
|
|
|
|
/* ISC Parallel Front End Configuration 0 Register */
|
|
|
|
#define ISC_PFE_CFG0 0x0000000c
|
|
|
|
|
|
|
|
#define ISC_PFE_CFG0_HPOL_LOW BIT(0)
|
|
|
|
#define ISC_PFE_CFG0_VPOL_LOW BIT(1)
|
|
|
|
#define ISC_PFE_CFG0_PPOL_LOW BIT(2)
|
|
|
|
|
|
|
|
#define ISC_PFE_CFG0_MODE_PROGRESSIVE (0x0 << 4)
|
|
|
|
#define ISC_PFE_CFG0_MODE_MASK GENMASK(6, 4)
|
|
|
|
|
|
|
|
#define ISC_PFE_CFG0_BPS_EIGHT (0x4 << 28)
|
|
|
|
#define ISC_PFG_CFG0_BPS_NINE (0x3 << 28)
|
|
|
|
#define ISC_PFG_CFG0_BPS_TEN (0x2 << 28)
|
|
|
|
#define ISC_PFG_CFG0_BPS_ELEVEN (0x1 << 28)
|
|
|
|
#define ISC_PFG_CFG0_BPS_TWELVE (0x0 << 28)
|
|
|
|
#define ISC_PFE_CFG0_BPS_MASK GENMASK(30, 28)
|
|
|
|
|
|
|
|
/* ISC Clock Enable Register */
|
|
|
|
#define ISC_CLKEN 0x00000018
|
|
|
|
|
|
|
|
/* ISC Clock Disable Register */
|
|
|
|
#define ISC_CLKDIS 0x0000001c
|
|
|
|
|
|
|
|
/* ISC Clock Status Register */
|
|
|
|
#define ISC_CLKSR 0x00000020
|
2017-10-10 09:46:37 +07:00
|
|
|
#define ISC_CLKSR_SIP BIT(31)
|
2016-08-17 13:05:27 +07:00
|
|
|
|
|
|
|
#define ISC_CLK(n) BIT(n)
|
|
|
|
|
|
|
|
/* ISC Clock Configuration Register */
|
|
|
|
#define ISC_CLKCFG 0x00000024
|
|
|
|
#define ISC_CLKCFG_DIV_SHIFT(n) ((n)*16)
|
|
|
|
#define ISC_CLKCFG_DIV_MASK(n) GENMASK(((n)*16 + 7), (n)*16)
|
|
|
|
#define ISC_CLKCFG_SEL_SHIFT(n) ((n)*16 + 8)
|
|
|
|
#define ISC_CLKCFG_SEL_MASK(n) GENMASK(((n)*17 + 8), ((n)*16 + 8))
|
|
|
|
|
|
|
|
/* ISC Interrupt Enable Register */
|
|
|
|
#define ISC_INTEN 0x00000028
|
|
|
|
|
|
|
|
/* ISC Interrupt Disable Register */
|
|
|
|
#define ISC_INTDIS 0x0000002c
|
|
|
|
|
|
|
|
/* ISC Interrupt Mask Register */
|
|
|
|
#define ISC_INTMASK 0x00000030
|
|
|
|
|
|
|
|
/* ISC Interrupt Status Register */
|
|
|
|
#define ISC_INTSR 0x00000034
|
|
|
|
|
|
|
|
#define ISC_INT_DDONE BIT(8)
|
2017-01-24 15:05:57 +07:00
|
|
|
#define ISC_INT_HISDONE BIT(12)
|
2016-08-17 13:05:27 +07:00
|
|
|
|
|
|
|
/* ISC White Balance Control Register */
|
|
|
|
#define ISC_WB_CTRL 0x00000058
|
|
|
|
|
|
|
|
/* ISC White Balance Configuration Register */
|
|
|
|
#define ISC_WB_CFG 0x0000005c
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* ISC White Balance Offset for R, GR Register */
|
|
|
|
#define ISC_WB_O_RGR 0x00000060
|
|
|
|
|
|
|
|
/* ISC White Balance Offset for B, GB Register */
|
|
|
|
#define ISC_WB_O_BGR 0x00000064
|
|
|
|
|
|
|
|
/* ISC White Balance Gain for R, GR Register */
|
|
|
|
#define ISC_WB_G_RGR 0x00000068
|
|
|
|
|
|
|
|
/* ISC White Balance Gain for B, GB Register */
|
|
|
|
#define ISC_WB_G_BGR 0x0000006c
|
|
|
|
|
2016-08-17 13:05:27 +07:00
|
|
|
/* ISC Color Filter Array Control Register */
|
|
|
|
#define ISC_CFA_CTRL 0x00000070
|
|
|
|
|
|
|
|
/* ISC Color Filter Array Configuration Register */
|
|
|
|
#define ISC_CFA_CFG 0x00000074
|
2017-01-24 15:05:57 +07:00
|
|
|
#define ISC_CFA_CFG_EITPOL BIT(4)
|
2016-08-17 13:05:27 +07:00
|
|
|
|
|
|
|
#define ISC_BAY_CFG_GRGR 0x0
|
|
|
|
#define ISC_BAY_CFG_RGRG 0x1
|
|
|
|
#define ISC_BAY_CFG_GBGB 0x2
|
|
|
|
#define ISC_BAY_CFG_BGBG 0x3
|
|
|
|
|
|
|
|
/* ISC Color Correction Control Register */
|
|
|
|
#define ISC_CC_CTRL 0x00000078
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* ISC Color Correction RR RG Register */
|
|
|
|
#define ISC_CC_RR_RG 0x0000007c
|
|
|
|
|
|
|
|
/* ISC Color Correction RB OR Register */
|
|
|
|
#define ISC_CC_RB_OR 0x00000080
|
|
|
|
|
|
|
|
/* ISC Color Correction GR GG Register */
|
|
|
|
#define ISC_CC_GR_GG 0x00000084
|
|
|
|
|
|
|
|
/* ISC Color Correction GB OG Register */
|
|
|
|
#define ISC_CC_GB_OG 0x00000088
|
|
|
|
|
|
|
|
/* ISC Color Correction BR BG Register */
|
|
|
|
#define ISC_CC_BR_BG 0x0000008c
|
|
|
|
|
|
|
|
/* ISC Color Correction BB OB Register */
|
|
|
|
#define ISC_CC_BB_OB 0x00000090
|
|
|
|
|
2016-08-17 13:05:27 +07:00
|
|
|
/* ISC Gamma Correction Control Register */
|
|
|
|
#define ISC_GAM_CTRL 0x00000094
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* ISC_Gamma Correction Blue Entry Register */
|
|
|
|
#define ISC_GAM_BENTRY 0x00000098
|
|
|
|
|
|
|
|
/* ISC_Gamma Correction Green Entry Register */
|
|
|
|
#define ISC_GAM_GENTRY 0x00000198
|
|
|
|
|
|
|
|
/* ISC_Gamma Correction Green Entry Register */
|
|
|
|
#define ISC_GAM_RENTRY 0x00000298
|
|
|
|
|
2016-08-17 13:05:27 +07:00
|
|
|
/* Color Space Conversion Control Register */
|
|
|
|
#define ISC_CSC_CTRL 0x00000398
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* Color Space Conversion YR YG Register */
|
|
|
|
#define ISC_CSC_YR_YG 0x0000039c
|
|
|
|
|
|
|
|
/* Color Space Conversion YB OY Register */
|
|
|
|
#define ISC_CSC_YB_OY 0x000003a0
|
|
|
|
|
|
|
|
/* Color Space Conversion CBR CBG Register */
|
|
|
|
#define ISC_CSC_CBR_CBG 0x000003a4
|
|
|
|
|
|
|
|
/* Color Space Conversion CBB OCB Register */
|
|
|
|
#define ISC_CSC_CBB_OCB 0x000003a8
|
|
|
|
|
|
|
|
/* Color Space Conversion CRR CRG Register */
|
|
|
|
#define ISC_CSC_CRR_CRG 0x000003ac
|
|
|
|
|
|
|
|
/* Color Space Conversion CRB OCR Register */
|
|
|
|
#define ISC_CSC_CRB_OCR 0x000003b0
|
|
|
|
|
2016-08-17 13:05:27 +07:00
|
|
|
/* Contrast And Brightness Control Register */
|
|
|
|
#define ISC_CBC_CTRL 0x000003b4
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* Contrast And Brightness Configuration Register */
|
|
|
|
#define ISC_CBC_CFG 0x000003b8
|
|
|
|
|
|
|
|
/* Brightness Register */
|
|
|
|
#define ISC_CBC_BRIGHT 0x000003bc
|
|
|
|
#define ISC_CBC_BRIGHT_MASK GENMASK(10, 0)
|
|
|
|
|
|
|
|
/* Contrast Register */
|
|
|
|
#define ISC_CBC_CONTRAST 0x000003c0
|
|
|
|
#define ISC_CBC_CONTRAST_MASK GENMASK(11, 0)
|
|
|
|
|
2016-08-17 13:05:27 +07:00
|
|
|
/* Subsampling 4:4:4 to 4:2:2 Control Register */
|
|
|
|
#define ISC_SUB422_CTRL 0x000003c4
|
|
|
|
|
|
|
|
/* Subsampling 4:2:2 to 4:2:0 Control Register */
|
|
|
|
#define ISC_SUB420_CTRL 0x000003cc
|
|
|
|
|
|
|
|
/* Rounding, Limiting and Packing Configuration Register */
|
|
|
|
#define ISC_RLP_CFG 0x000003d0
|
|
|
|
|
|
|
|
#define ISC_RLP_CFG_MODE_DAT8 0x0
|
|
|
|
#define ISC_RLP_CFG_MODE_DAT9 0x1
|
|
|
|
#define ISC_RLP_CFG_MODE_DAT10 0x2
|
|
|
|
#define ISC_RLP_CFG_MODE_DAT11 0x3
|
|
|
|
#define ISC_RLP_CFG_MODE_DAT12 0x4
|
|
|
|
#define ISC_RLP_CFG_MODE_DATY8 0x5
|
|
|
|
#define ISC_RLP_CFG_MODE_DATY10 0x6
|
|
|
|
#define ISC_RLP_CFG_MODE_ARGB444 0x7
|
|
|
|
#define ISC_RLP_CFG_MODE_ARGB555 0x8
|
|
|
|
#define ISC_RLP_CFG_MODE_RGB565 0x9
|
|
|
|
#define ISC_RLP_CFG_MODE_ARGB32 0xa
|
|
|
|
#define ISC_RLP_CFG_MODE_YYCC 0xb
|
|
|
|
#define ISC_RLP_CFG_MODE_YYCC_LIMITED 0xc
|
|
|
|
#define ISC_RLP_CFG_MODE_MASK GENMASK(3, 0)
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* Histogram Control Register */
|
|
|
|
#define ISC_HIS_CTRL 0x000003d4
|
|
|
|
|
|
|
|
#define ISC_HIS_CTRL_EN BIT(0)
|
|
|
|
#define ISC_HIS_CTRL_DIS 0x0
|
|
|
|
|
|
|
|
/* Histogram Configuration Register */
|
|
|
|
#define ISC_HIS_CFG 0x000003d8
|
|
|
|
|
|
|
|
#define ISC_HIS_CFG_MODE_GR 0x0
|
|
|
|
#define ISC_HIS_CFG_MODE_R 0x1
|
|
|
|
#define ISC_HIS_CFG_MODE_GB 0x2
|
|
|
|
#define ISC_HIS_CFG_MODE_B 0x3
|
|
|
|
#define ISC_HIS_CFG_MODE_Y 0x4
|
|
|
|
#define ISC_HIS_CFG_MODE_RAW 0x5
|
|
|
|
#define ISC_HIS_CFG_MODE_YCCIR656 0x6
|
|
|
|
|
|
|
|
#define ISC_HIS_CFG_BAYSEL_SHIFT 4
|
|
|
|
|
|
|
|
#define ISC_HIS_CFG_RAR BIT(8)
|
|
|
|
|
2016-08-17 13:05:27 +07:00
|
|
|
/* DMA Configuration Register */
|
|
|
|
#define ISC_DCFG 0x000003e0
|
|
|
|
#define ISC_DCFG_IMODE_PACKED8 0x0
|
|
|
|
#define ISC_DCFG_IMODE_PACKED16 0x1
|
|
|
|
#define ISC_DCFG_IMODE_PACKED32 0x2
|
|
|
|
#define ISC_DCFG_IMODE_YC422SP 0x3
|
|
|
|
#define ISC_DCFG_IMODE_YC422P 0x4
|
|
|
|
#define ISC_DCFG_IMODE_YC420SP 0x5
|
|
|
|
#define ISC_DCFG_IMODE_YC420P 0x6
|
|
|
|
#define ISC_DCFG_IMODE_MASK GENMASK(2, 0)
|
|
|
|
|
|
|
|
#define ISC_DCFG_YMBSIZE_SINGLE (0x0 << 4)
|
|
|
|
#define ISC_DCFG_YMBSIZE_BEATS4 (0x1 << 4)
|
|
|
|
#define ISC_DCFG_YMBSIZE_BEATS8 (0x2 << 4)
|
|
|
|
#define ISC_DCFG_YMBSIZE_BEATS16 (0x3 << 4)
|
|
|
|
#define ISC_DCFG_YMBSIZE_MASK GENMASK(5, 4)
|
|
|
|
|
|
|
|
#define ISC_DCFG_CMBSIZE_SINGLE (0x0 << 8)
|
|
|
|
#define ISC_DCFG_CMBSIZE_BEATS4 (0x1 << 8)
|
|
|
|
#define ISC_DCFG_CMBSIZE_BEATS8 (0x2 << 8)
|
|
|
|
#define ISC_DCFG_CMBSIZE_BEATS16 (0x3 << 8)
|
|
|
|
#define ISC_DCFG_CMBSIZE_MASK GENMASK(9, 8)
|
|
|
|
|
|
|
|
/* DMA Control Register */
|
|
|
|
#define ISC_DCTRL 0x000003e4
|
|
|
|
|
|
|
|
#define ISC_DCTRL_DVIEW_PACKED (0x0 << 1)
|
|
|
|
#define ISC_DCTRL_DVIEW_SEMIPLANAR (0x1 << 1)
|
|
|
|
#define ISC_DCTRL_DVIEW_PLANAR (0x2 << 1)
|
|
|
|
#define ISC_DCTRL_DVIEW_MASK GENMASK(2, 1)
|
|
|
|
|
|
|
|
#define ISC_DCTRL_IE_IS (0x0 << 4)
|
|
|
|
|
|
|
|
/* DMA Descriptor Address Register */
|
|
|
|
#define ISC_DNDA 0x000003e8
|
|
|
|
|
|
|
|
/* DMA Address 0 Register */
|
|
|
|
#define ISC_DAD0 0x000003ec
|
|
|
|
|
2017-01-24 15:05:57 +07:00
|
|
|
/* DMA Address 1 Register */
|
|
|
|
#define ISC_DAD1 0x000003f4
|
|
|
|
|
|
|
|
/* DMA Address 2 Register */
|
|
|
|
#define ISC_DAD2 0x000003fc
|
|
|
|
|
|
|
|
/* Histogram Entry */
|
|
|
|
#define ISC_HIS_ENTRY 0x00000410
|
2016-08-17 13:05:27 +07:00
|
|
|
|
|
|
|
#endif
|