linux_dsm_epyc7002/arch/arm/boot/dts/pxa3xx.dtsi
Greg Kroah-Hartman b24413180f 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-02 11:10:55 +01:00

257 lines
6.7 KiB
Plaintext

// SPDX-License-Identifier: GPL-2.0
/* The pxa3xx skeleton simply augments the 2xx version */
#include "pxa2xx.dtsi"
#define MFP_PIN_PXA300(gpio) \
((gpio <= 2) ? (0x00b4 + 4 * gpio) : \
(gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \
(gpio <= 98) ? (0x0400 + 4 * (gpio - 27)) : \
(gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
0)
#define MFP_PIN_PXA310(gpio) \
((gpio <= 2) ? (0x00b4 + 4 * gpio) : \
(gpio <= 26) ? (0x027c + 4 * (gpio - 3)) : \
(gpio <= 29) ? (0x0400 + 4 * (gpio - 27)) : \
(gpio <= 98) ? (0x0418 + 4 * (gpio - 30)) : \
(gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
(gpio <= 262) ? 0 : \
(gpio <= 268) ? (0x052c + 4 * (gpio - 263)) : \
0)
#define MFP_PIN_PXA320(gpio) \
((gpio <= 4) ? (0x0124 + 4 * gpio) : \
(gpio <= 9) ? (0x028c + 4 * (gpio - 5)) : \
(gpio <= 10) ? (0x0458 + 4 * (gpio - 10)) : \
(gpio <= 26) ? (0x02a0 + 4 * (gpio - 11)) : \
(gpio <= 48) ? (0x0400 + 4 * (gpio - 27)) : \
(gpio <= 62) ? (0x045c + 4 * (gpio - 49)) : \
(gpio <= 73) ? (0x04b4 + 4 * (gpio - 63)) : \
(gpio <= 98) ? (0x04f0 + 4 * (gpio - 74)) : \
(gpio <= 127) ? (0x0600 + 4 * (gpio - 99)) : \
0)
/*
* MFP Alternate functions for pins having a gpio.
* Example of use: pinctrl-single,pins = < MFP_PIN_PXA310(21) MFP_AF1 >
*/
#define MFP_AF0 (0 << 0)
#define MFP_AF1 (1 << 0)
#define MFP_AF2 (2 << 0)
#define MFP_AF3 (3 << 0)
#define MFP_AF4 (4 << 0)
#define MFP_AF5 (5 << 0)
#define MFP_AF6 (6 << 0)
/*
* MFP drive strength functions for pins.
* Example of use: pinctrl-single,drive-strength = MFP_DS03X;
*/
#define MFP_DSMSK (0x7 << 10)
#define MFP_DS01X < (0x0 << 10) MFP_DSMSK >
#define MFP_DS02X < (0x1 << 10) MFP_DSMSK >
#define MFP_DS03X < (0x2 << 10) MFP_DSMSK >
#define MFP_DS04X < (0x3 << 10) MFP_DSMSK >
#define MFP_DS06X < (0x4 << 10) MFP_DSMSK >
#define MFP_DS08X < (0x5 << 10) MFP_DSMSK >
#define MFP_DS10X < (0x6 << 10) MFP_DSMSK >
#define MFP_DS13X < (0x7 << 10) MFP_DSMSK >
/*
* MFP low power mode for pins.
* Example of use:
* pinctrl-single,low-power-mode = MFP_LPM(MFP_LPM_PULL_LOW|MFP_LPM_EDGE_FALL);
*
* Table that determines the low power modes outputs, with actual settings
* used in parentheses for don't-care values. Except for the float output,
* the configured driven and pulled levels match, so if there is a need for
* non-LPM pulled output, the same configuration could probably be used.
*
* Output value sleep_oe_n sleep_data pullup_en pulldown_en pull_sel
* (bit 7) (bit 8) (bit 14) (bit 13) (bit 15)
*
* Input 0 X(0) X(0) X(0) 0
* Drive 0 0 0 0 X(1) 0
* Drive 1 0 1 X(1) 0 0
* Pull hi (1) 1 X(1) 1 0 0
* Pull lo (0) 1 X(0) 0 1 0
* Z (float) 1 X(0) 0 0 0
*/
#define MFP_LPM(x) < (x) MFP_LPM_MSK >
#define MFP_LPM_MSK 0xe1f0
#define MFP_LPM_INPUT 0x0000
#define MFP_LPM_DRIVE_LOW 0x2000
#define MFP_LPM_DRIVE_HIGH 0x4100
#define MFP_LPM_PULL_LOW 0x2080
#define MFP_LPM_PULL_HIGH 0x4180
#define MFP_LPM_FLOAT 0x0080
#define MFP_LPM_EDGE_NONE 0x0000
#define MFP_LPM_EDGE_RISE 0x0010
#define MFP_LPM_EDGE_FALL 0x0020
#define MFP_LPM_EDGE_BOTH 0x0030
/ {
model = "Marvell PXA3xx familiy SoC";
compatible = "marvell,pxa3xx";
pxabus {
pdma: dma-controller@40000000 {
compatible = "marvell,pdma-1.0";
reg = <0x40000000 0x10000>;
interrupts = <25>;
#dma-channels = <32>;
#dma-cells = <2>;
#dma-requests = <100>;
status = "okay";
};
pwri2c: i2c@40f500c0 {
compatible = "mrvl,pwri2c";
reg = <0x40f500c0 0x30>;
interrupts = <6>;
clocks = <&clks CLK_PWRI2C>;
#address-cells = <0x1>;
#size-cells = <0>;
status = "disabled";
};
nand0: nand@43100000 {
compatible = "marvell,pxa3xx-nand";
reg = <0x43100000 90>;
interrupts = <45>;
clocks = <&clks CLK_NAND>;
dmas = <&pdma 97 3>;
dma-names = "data";
#address-cells = <1>;
#size-cells = <1>;
status = "disabled";
};
pxairq: interrupt-controller@40d00000 {
marvell,intc-priority;
marvell,intc-nr-irqs = <56>;
};
pinctrl: pinctrl@40e10000 {
compatible = "pinconf-single";
reg = <0x40e10000 0xffff>;
#address-cells = <1>;
#size-cells = <0>;
#pinctrl-cells = <1>;
pinctrl-single,register-width = <32>;
pinctrl-single,function-mask = <0x7>;
};
gpio: gpio@40e00000 {
compatible = "intel,pxa3xx-gpio";
reg = <0x40e00000 0x10000>;
clocks = <&clks CLK_GPIO>;
interrupt-names = "gpio0", "gpio1", "gpio_mux";
interrupts = <8 9 10>;
gpio-controller;
#gpio-cells = <0x2>;
interrupt-controller;
#interrupt-cells = <0x2>;
};
mmc0: mmc@41100000 {
compatible = "marvell,pxa-mmc";
reg = <0x41100000 0x1000>;
interrupts = <23>;
clocks = <&clks CLK_MMC>;
dmas = <&pdma 21 3
&pdma 22 3>;
dma-names = "rx", "tx";
status = "disabled";
};
mmc1: mmc@42000000 {
compatible = "marvell,pxa-mmc";
reg = <0x42000000 0x1000>;
interrupts = <41>;
clocks = <&clks CLK_MMC1>;
dmas = <&pdma 93 3
&pdma 94 3>;
dma-names = "rx", "tx";
status = "disabled";
};
mmc2: mmc@42500000 {
compatible = "marvell,pxa-mmc";
reg = <0x42500000 0x1000>;
interrupts = <55>;
clocks = <&clks CLK_MMC2>;
dmas = <&pdma 46 3
&pdma 47 3>;
dma-names = "rx", "tx";
status = "disabled";
};
pxa3xx_ohci: usb@4c000000 {
compatible = "marvell,pxa-ohci";
reg = <0x4c000000 0x10000>;
interrupts = <3>;
clocks = <&clks CLK_USBH>;
status = "disabled";
};
pwm0: pwm@40b00000 {
compatible = "marvell,pxa270-pwm";
reg = <0x40b00000 0x10>;
#pwm-cells = <1>;
clocks = <&clks CLK_PWM0>;
status = "disabled";
};
pwm1: pwm@40b00010 {
compatible = "marvell,pxa270-pwm";
reg = <0x40b00010 0x10>;
#pwm-cells = <1>;
clocks = <&clks CLK_PWM1>;
status = "disabled";
};
pwm2: pwm@40c00000 {
compatible = "marvell,pxa270-pwm";
reg = <0x40c00000 0x10>;
#pwm-cells = <1>;
clocks = <&clks CLK_PWM0>;
status = "disabled";
};
pwm3: pwm@40c00010 {
compatible = "marvell,pxa270-pwm";
reg = <0x40c00010 0x10>;
#pwm-cells = <1>;
clocks = <&clks CLK_PWM1>;
status = "disabled";
};
};
clocks {
/*
* The muxing of external clocks/internal dividers for osc* clock
* sources has been hidden under the carpet by now.
*/
#address-cells = <1>;
#size-cells = <1>;
ranges;
clks: pxa3xx_clks@41300004 {
compatible = "marvell,pxa300-clocks";
#clock-cells = <1>;
status = "okay";
};
};
timer@40a00000 {
compatible = "marvell,pxa-timer";
reg = <0x40a00000 0x20>;
interrupts = <26>;
clocks = <&clks CLK_OSTIMER>;
status = "okay";
};
};