mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-26 19:55:21 +07:00
b24413180f
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>
133 lines
4.1 KiB
C
133 lines
4.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
/* DMA controller registers */
|
|
#define REG8_1(a0) ((const u16[8]) { a0, a0 + 1, a0 + 2, a0 + 3, \
|
|
a0 + 4, a0 + 5, a0 + 6, a0 + 7})
|
|
#define REG8_2(a0) ((const u16[8]) { a0, a0 + 2, a0 + 4, a0 + 6, \
|
|
a0 + 8, a0 + 0xa, a0 + 0xc, a0 + 0xe})
|
|
#define REG8_8(a0) ((const u16[8]) { a0, a0 + 8, a0 + 0x10, a0 + 0x18, \
|
|
a0 + 0x20, a0 + 0x28, a0 + 0x30, \
|
|
a0 + 0x38})
|
|
#define INT_STATUS 0x00
|
|
#define PB_STATUS 0x01
|
|
#define DMA_CMD 0x02
|
|
#define VIDEO_FIFO_STATUS 0x03
|
|
#define VIDEO_CHANNEL_ID 0x04
|
|
#define VIDEO_PARSER_STATUS 0x05
|
|
#define SYS_SOFT_RST 0x06
|
|
#define DMA_PAGE_TABLE0_ADDR ((const u16[8]) { 0x08, 0xd0, 0xd2, 0xd4, \
|
|
0xd6, 0xd8, 0xda, 0xdc })
|
|
#define DMA_PAGE_TABLE1_ADDR ((const u16[8]) { 0x09, 0xd1, 0xd3, 0xd5, \
|
|
0xd7, 0xd9, 0xdb, 0xdd })
|
|
#define DMA_CHANNEL_ENABLE 0x0a
|
|
#define DMA_CONFIG 0x0b
|
|
#define DMA_TIMER_INTERVAL 0x0c
|
|
#define DMA_CHANNEL_TIMEOUT 0x0d
|
|
#define VDMA_CHANNEL_CONFIG REG8_1(0x10)
|
|
#define ADMA_P_ADDR REG8_2(0x18)
|
|
#define ADMA_B_ADDR REG8_2(0x19)
|
|
#define DMA10_P_ADDR 0x28
|
|
#define DMA10_B_ADDR 0x29
|
|
#define VIDEO_CONTROL1 0x2a
|
|
#define VIDEO_CONTROL2 0x2b
|
|
#define AUDIO_CONTROL1 0x2c
|
|
#define AUDIO_CONTROL2 0x2d
|
|
#define PHASE_REF 0x2e
|
|
#define GPIO_REG 0x2f
|
|
#define INTL_HBAR_CTRL REG8_1(0x30)
|
|
#define AUDIO_CONTROL3 0x38
|
|
#define VIDEO_FIELD_CTRL REG8_1(0x39)
|
|
#define HSCALER_CTRL REG8_1(0x42)
|
|
#define VIDEO_SIZE REG8_1(0x4A)
|
|
#define VIDEO_SIZE_F2 REG8_1(0x52)
|
|
#define MD_CONF REG8_1(0x60)
|
|
#define MD_INIT REG8_1(0x68)
|
|
#define MD_MAP0 REG8_1(0x70)
|
|
#define VDMA_P_ADDR REG8_8(0x80) /* not used in DMA SG mode */
|
|
#define VDMA_WHP REG8_8(0x81)
|
|
#define VDMA_B_ADDR REG8_8(0x82)
|
|
#define VDMA_F2_P_ADDR REG8_8(0x84)
|
|
#define VDMA_F2_WHP REG8_8(0x85)
|
|
#define VDMA_F2_B_ADDR REG8_8(0x86)
|
|
#define EP_REG_ADDR 0xfe
|
|
#define EP_REG_DATA 0xff
|
|
|
|
/* Video decoder registers */
|
|
#define VDREG8(a0) ((const u16[8]) { \
|
|
a0 + 0x000, a0 + 0x010, a0 + 0x020, a0 + 0x030, \
|
|
a0 + 0x100, a0 + 0x110, a0 + 0x120, a0 + 0x130})
|
|
#define VIDSTAT VDREG8(0x100)
|
|
#define BRIGHT VDREG8(0x101)
|
|
#define CONTRAST VDREG8(0x102)
|
|
#define SHARPNESS VDREG8(0x103)
|
|
#define SAT_U VDREG8(0x104)
|
|
#define SAT_V VDREG8(0x105)
|
|
#define HUE VDREG8(0x106)
|
|
#define CROP_HI VDREG8(0x107)
|
|
#define VDELAY_LO VDREG8(0x108)
|
|
#define VACTIVE_LO VDREG8(0x109)
|
|
#define HDELAY_LO VDREG8(0x10a)
|
|
#define HACTIVE_LO VDREG8(0x10b)
|
|
#define MVSN VDREG8(0x10c)
|
|
#define STATUS2 VDREG8(0x10d)
|
|
#define SDT VDREG8(0x10e)
|
|
#define SDT_EN VDREG8(0x10f)
|
|
|
|
#define VSCALE_LO VDREG8(0x144)
|
|
#define SCALE_HI VDREG8(0x145)
|
|
#define HSCALE_LO VDREG8(0x146)
|
|
#define F2CROP_HI VDREG8(0x147)
|
|
#define F2VDELAY_LO VDREG8(0x148)
|
|
#define F2VACTIVE_LO VDREG8(0x149)
|
|
#define F2HDELAY_LO VDREG8(0x14a)
|
|
#define F2HACTIVE_LO VDREG8(0x14b)
|
|
#define F2VSCALE_LO VDREG8(0x14c)
|
|
#define F2SCALE_HI VDREG8(0x14d)
|
|
#define F2HSCALE_LO VDREG8(0x14e)
|
|
#define F2CNT VDREG8(0x14f)
|
|
|
|
#define VDREG2(a0) ((const u16[2]) { a0, a0 + 0x100 })
|
|
#define SRST VDREG2(0x180)
|
|
#define ACNTL VDREG2(0x181)
|
|
#define ACNTL2 VDREG2(0x182)
|
|
#define CNTRL1 VDREG2(0x183)
|
|
#define CKHY VDREG2(0x184)
|
|
#define SHCOR VDREG2(0x185)
|
|
#define CORING VDREG2(0x186)
|
|
#define CLMPG VDREG2(0x187)
|
|
#define IAGC VDREG2(0x188)
|
|
#define VCTRL1 VDREG2(0x18f)
|
|
#define MISC1 VDREG2(0x194)
|
|
#define LOOP VDREG2(0x195)
|
|
#define MISC2 VDREG2(0x196)
|
|
|
|
#define CLMD VDREG2(0x197)
|
|
#define ANPWRDOWN VDREG2(0x1ce)
|
|
#define AIGAIN ((const u16[8]) { 0x1d0, 0x1d1, 0x1d2, 0x1d3, \
|
|
0x2d0, 0x2d1, 0x2d2, 0x2d3 })
|
|
|
|
#define SYS_MODE_DMA_SHIFT 13
|
|
#define AUDIO_DMA_SIZE_SHIFT 19
|
|
#define AUDIO_DMA_SIZE_MIN SZ_512
|
|
#define AUDIO_DMA_SIZE_MAX SZ_4K
|
|
#define AUDIO_DMA_SIZE_MASK (SZ_8K - 1)
|
|
|
|
#define DMA_CMD_ENABLE BIT(31)
|
|
#define INT_STATUS_DMA_TOUT BIT(17)
|
|
#define TW686X_VIDSTAT_HLOCK BIT(6)
|
|
#define TW686X_VIDSTAT_VDLOSS BIT(7)
|
|
|
|
#define TW686X_STD_NTSC_M 0
|
|
#define TW686X_STD_PAL 1
|
|
#define TW686X_STD_SECAM 2
|
|
#define TW686X_STD_NTSC_443 3
|
|
#define TW686X_STD_PAL_M 4
|
|
#define TW686X_STD_PAL_CN 5
|
|
#define TW686X_STD_PAL_60 6
|
|
|
|
#define TW686X_FIELD_MODE 0x3
|
|
#define TW686X_FRAME_MODE 0x2
|
|
/* 0x1 is reserved */
|
|
#define TW686X_SG_MODE 0x0
|
|
|
|
#define TW686X_FIFO_ERROR(x) (x & ~(0xff))
|