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 22:07:57 +08:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
2016-06-30 03:05:23 +08:00
|
|
|
# Common objects
|
2017-06-03 06:30:06 +08:00
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_common.o
|
clk: sunxi-ng: Add interface to query or configure MMC timing modes.
Starting with the A83T SoC, Allwinner introduced a new timing mode for
its MMC clocks. The new mode changes how the MMC controller sample and
output clocks are delayed to match chip and board specifics. There are
two controls for this, one on the CCU side controlling how the clocks
behave, and one in the MMC controller controlling what inputs to take
and how to route them.
In the old mode, the MMC clock had 2 child clocks providing the output
and sample clocks, which could be delayed by a number of clock cycles
measured from the MMC clock's parent.
With the new mode, the 2 delay clocks are no longer active. Instead,
the delays and associated controls are moved into the MMC controller.
The output of the MMC clock is also halved.
The difference in how things are wired between the modes means that the
clock controls and the MMC controls must match. To achieve this in a
clear, explicit way, we introduce two functions for the MMC driver to
use: one queries the hardware for the current mode set, and the other
allows the MMC driver to request a mode.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2017-07-24 21:58:56 +08:00
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_mmc_timing.o
|
2017-06-03 06:30:06 +08:00
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_reset.o
|
2016-06-30 03:05:24 +08:00
|
|
|
|
|
|
|
# Base clock types
|
2017-06-03 06:30:06 +08:00
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_div.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_frac.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_gate.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_mux.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_mult.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_phase.o
|
2017-10-12 16:36:59 +08:00
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_sdm.o
|
2016-06-30 03:05:29 +08:00
|
|
|
|
|
|
|
# Multi-factor clocks
|
2017-06-03 06:30:06 +08:00
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_nk.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_nkm.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_nkmp.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_nm.o
|
|
|
|
lib-$(CONFIG_SUNXI_CCU) += ccu_mp.o
|
2016-06-30 03:05:34 +08:00
|
|
|
|
|
|
|
# SoC support
|
2016-07-06 14:31:34 +08:00
|
|
|
obj-$(CONFIG_SUN50I_A64_CCU) += ccu-sun50i-a64.o
|
2017-08-24 01:23:29 +08:00
|
|
|
obj-$(CONFIG_SUN4I_A10_CCU) += ccu-sun4i-a10.o
|
2016-10-04 16:09:58 +08:00
|
|
|
obj-$(CONFIG_SUN5I_CCU) += ccu-sun5i.o
|
2016-08-25 14:21:59 +08:00
|
|
|
obj-$(CONFIG_SUN6I_A31_CCU) += ccu-sun6i-a31.o
|
2016-08-31 22:55:00 +08:00
|
|
|
obj-$(CONFIG_SUN8I_A23_CCU) += ccu-sun8i-a23.o
|
2016-08-24 20:10:15 +08:00
|
|
|
obj-$(CONFIG_SUN8I_A33_CCU) += ccu-sun8i-a33.o
|
clk: sunxi-ng: Add driver for A83T CCU
The A83T clock control unit is a hybrid of some new style clock designs
from the A80, and old style layout from the other Allwinner SoCs.
Like the A80, the SoC does not have a low speed 32.768 kHz oscillator.
Unlike the A80, there is no clock input either. The only low speed clock
available is the internal oscillator which runs at around 16 MHz,
divided by 512, yielding a low speed clock around 31.250 kHz.
Also, the MMC2 module clock supports switching to a "new timing" mode.
This mode divides the clock output by half, and disables the CCU based
clock delays. The MMC controller must be configure to the same mode,
and then use its internal clock delays.
This driver does not support runtime switching of the timing modes.
Instead, the new timing mode is enforced at probe time. Consumers can
check which mode is active by trying to get the current phase delay
of the MMC2 phase clocks, which will return -ENOTSUPP if the new
timing mode is active.
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
2017-05-19 15:06:09 +08:00
|
|
|
obj-$(CONFIG_SUN8I_A83T_CCU) += ccu-sun8i-a83t.o
|
2016-06-30 03:05:34 +08:00
|
|
|
obj-$(CONFIG_SUN8I_H3_CCU) += ccu-sun8i-h3.o
|
2017-01-20 01:54:45 +08:00
|
|
|
obj-$(CONFIG_SUN8I_V3S_CCU) += ccu-sun8i-v3s.o
|
2017-05-15 00:30:34 +08:00
|
|
|
obj-$(CONFIG_SUN8I_DE2_CCU) += ccu-sun8i-de2.o
|
2017-04-04 17:50:57 +08:00
|
|
|
obj-$(CONFIG_SUN8I_R_CCU) += ccu-sun8i-r.o
|
2017-08-15 13:55:29 +08:00
|
|
|
obj-$(CONFIG_SUN8I_R40_CCU) += ccu-sun8i-r40.o
|
2017-01-28 20:22:34 +08:00
|
|
|
obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80.o
|
2017-01-28 20:22:36 +08:00
|
|
|
obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-de.o
|
2017-01-28 20:22:35 +08:00
|
|
|
obj-$(CONFIG_SUN9I_A80_CCU) += ccu-sun9i-a80-usb.o
|
2017-06-03 06:30:06 +08:00
|
|
|
|
|
|
|
# The lib-y file goals is supposed to work only in arch/*/lib or lib/. In our
|
|
|
|
# case, we want to use that goal, but even though lib.a will be properly
|
|
|
|
# generated, it will not be linked in, eventually resulting in a linker error
|
|
|
|
# for missing symbols.
|
|
|
|
#
|
|
|
|
# We can work around that by explicitly adding lib.a to the obj-y goal. This is
|
|
|
|
# an undocumented behaviour, but works well for now.
|
|
|
|
obj-$(CONFIG_SUNXI_CCU) += lib.a
|