110 Commits

Author SHA1 Message Date
Suggest Chiang
27b94e3cd7 [ALPS05961305] vpu: add smccc control
Patch SMCC control in VPU kernel driver.

MTK-Commit-Id: f41e325ab3dd6fe5b6753198c27c4adc2f2bb922

Change-Id: I4670283f3a1e9400ff1db549c7b5de600d89bce9
Signed-off-by: Suggest Chiang <suggest.chiang@mediatek.com>
CR-Id: ALPS05961305
Feature: Vision Processing Unit
2021-08-13 00:01:00 +08:00
Ming-Fan Chen
52cbf9894f [ALPS05583112] cmdq: compare GPR with TPR in sleep
Compare GPR with TPR in cmdq_pkt_sleep():
jump_c (TPR > GPR) and (GPR > 0xFFFFFF00) skip wait TPR_TIMEOUT_EVENT

MTK-Commit-Id: 36a504eaf2c2a95822d0d5284c65c802d07153af

Change-Id: I7cb7034a59b9b4102c37d77f860e8a4f10bb2138
CR-Id: ALPS05583112
Feature: [Module]CMDQ Driver
Signed-off-by: Ming-Fan Chen <ming-fan.chen@mediatek.com>
(cherry picked from commit 9121131c3719b39e702df90f352d5dbeb05f4d6f)
(cherry picked from commit a134f5d74c4eae4cd6f526588667009a3c6bf44b)
(cherry picked from commit f8803f30cc05ebde347c77408a4aeec402c95559)
2021-04-28 00:03:36 +08:00
Eddie Hung
1da21b4921 [ALPS05612903] usb: update USB SMC ID
0x526 is reserved for APU power control, so chage USB
SMC ID to 0x527.

MTK-Commit-Id: 5580820fff4b8fbdc2fa12d4fca889bd8d777741

Change-Id: Iaa08302c598ab58b2e89c51a3ecdedfaa1165f19
Signed-off-by: Eddie Hung <eddie.hung@mediatek.com>
CR-Id: ALPS05612903
Feature: USB 3.0 Device
2021-04-01 11:41:32 +08:00
Eddie Hung
3c974a0779 [ALPS05612903] usb: add new USB SMC ID
Add a new SMC ID for usb to request power resource

MTK-Commit-Id: 7afc71c4b32f304fcd1e9d0b4b76c8b4609f68be

Change-Id: If8a437c94428df5a5c2f931df93de214a13d9dd2
Signed-off-by: Eddie Hung <eddie.hung@mediatek.com>
CR-Id: ALPS05612903
Feature: USB 3.0 Device
2021-03-18 23:41:39 +08:00
Hata Tang
c4cc420132 [ALPS05562585] bus_parity: driver porting
add sda driver to supporting bus_parity function

MTK-Commit-Id: bdc997c5f9166c11954be97c6c9c82d5535171b0

Change-Id: I049f1c52882f1f4df0dc83c66021b9510245fc0b
Signed-off-by: Hata Tang <hata.tang@mediatek.com>
CR-Id: ALPS05562585
Feature: BUS Tracer(tracer)
(cherry picked from commit 9e9d1358955a5a2432388f6b0778e755d6fb4a26)
2021-03-18 23:36:14 +08:00
Ming-Fan Chen
8082bf9e3b [ALPS05543104] cmdq: add dispatch module/core/thread in prefix
add dispatch [mdoule]<core>(thread) in prefix

MTK-Commit-Id: 9a430b3904d10b4dedf3ee6a6da6738a9ff279e7

Change-Id: I8814e2dba2c5d1d8958aab337842a5011da2a868
CR-Id: ALPS05543104
Feature: [Module]CMDQ Driver
Signed-off-by: Ming-Fan Chen <ming-fan.chen@mediatek.com>
2021-03-05 11:15:37 +08:00
Jeter Chen
83cbed0a7b [ALPS05404088] pmic_wrap:disable pwrap before WDT reset
[Detail]
If clock is stopped during pwrap is working,
pwrap salve side receives a incomplete command,
pwrap slave side will be abnormal.

[Solution]
Disable pmic wrap before system WDT reset.

MTK-Commit-Id: f50e879a76c32fa4e256b565c350323707982b55

Change-Id: I0554cda008d2daeae829572c212831776d939537
Signed-off-by: Jeter Chen <jeter.chen@mediatek.com>
CR-Id: ALPS05404088
Feature: [Module]PMIC
2021-01-29 02:24:10 +08:00
Ming-Fan Chen
c7d6ab4552 [ALPS05304706] cmdq: correct family chip config for mt6833
1. Correct family chip config for mt6833
2. Use CONFIG_MMPROFILE

MTK-Commit-Id: 20836314ef940976ecdfe62e02501d8022c2e4d1

Change-Id: Idc882d12f7d443660d254fe6b816dd33c15c21bc
CR-Id: ALPS05304706
Feature: [Module]CMDQ Driver
Signed-off-by: Ming-Fan Chen <ming-fan.chen@mediatek.com>
(cherry picked from Ic993e438d29d8395f68ce019185d678aa4ac4d0f)
2021-01-29 02:22:37 +08:00
mtk19784
43ad9c41fb [ALPS05304706] cmdq: update and support for mt6833
Update and support for mt6833

MTK-Commit-Id: 38a754a6ef1a438b29510007d743a6a03b2a41f5

Change-Id: Ic993e438d29d8395f68ce019185d678aa4ac4d0f
CR-Id: ALPS05304706
Feature: [Module]CMDQ Driver
Signed-off-by: mtk19784 <ycw.wu@mediatek.com>
(cherry picked from commit c1df1b1aa474cf41d1950e8a017b5c4cdf0f43b6)
2021-01-29 02:21:51 +08:00
Guangming Cao
0409ff3f62 [ALPS05284429] m4u: add arm smc call entry
add M4U arm smc call entry, entry num porting from legacy

MTK-Commit-Id: e28ee06de48725e860823811de06014584e08aa7

Change-Id: If5d2d252c23100f3ad5386059fb42c63f0395e8e
Signed-off-by: Guangming Cao <Guangming.Cao@mediatek.com>
CR-Id: ALPS05284429
Feature: [Module]ION/M4U
2021-01-29 02:20:05 +08:00
tai-hua.tseng
84bee5d478 [ALPS05264043] DPTX: modify SIP header for display port
[Detail]
modify SIP header for display port control related SMC call

MTK-Commit-Id: bb659aa05d2c14bb2c055dbc6d6c925c111754cb

Change-Id: Ie3dae424d2e323bb2f458bd87c83eaeb96c98b73
Signed-off-by: tai-hua.tseng <tai-hua.tseng@mediatek.com>
CR-Id: ALPS05264043
Feature: SlimPort Support
2021-01-29 02:19:35 +08:00
Cui Zhang
3819aeb69f [ALPS05242371] display: support legacy display
[Detail]
support legacy display for fpga early porting

MTK-Commit-Id: 24f6f0654b2be2f608c7d64a8bec40ca1d499730

Change-Id: Ic4f06d37f8ab940e291f6b79c47ba5c19c8bcdff
Signed-off-by: Cui Zhang <cui.zhang@mediatek.com>
CR-Id: ALPS05242371
Feature: Display Driver (DSI Interface)
(cherry picked from commit 48f52c18996cbdf566adee3ee51b48fe9f1ba211)
2021-01-29 02:18:49 +08:00
mtk81325
c0f9b425a7 [ALPS04896864] mmc:inline-crypto: sw-cqhci re-define
1. re-define sw-cqhci compatible with ICE framework
2. enable AES clock
3. restore AES HW setting when leave suspend
4. add ATF call define because we must access HW in ATF

MTK-Commit-Id: c37260302e6833afeb0a2eec8481a679f559af1b

Change-Id: I13f0dc01fc894d3b61835c756ccf6c128fab4c54
Signed-off-by: mtk81325 <peng.zhou@mediatek.com>
CR-Id: ALPS04896864
Feature: eMMC Boot Up
2021-01-29 02:18:25 +08:00
Dennis YC Hsieh
5010f4690e [ALPS05220829] mdp: implement readback reduce
1. Implement readback operation from meta op
2. Compose loop readback instruction.

MTK-Commit-Id: 06dc154b1f0a49946f7522f0e494f8d9ceefd44b

Change-Id: I28476666f586304a107e5ed7ee6937cdf9ee175d
CR-Id: ALPS05220829
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
Feature: [Module]MDP Driver
(cherry picked from commit c691de7e9c2ef9231a8897b52a51f9834d5c1b08)
(cherry picked from commit cca56ef4ddea74f2c6d349a59b1f10092668bac6)
2021-01-29 02:18:16 +08:00
Juju Sung
4a8204e259 [ALPS04999122] platform: add cmdq lost function
[Detail]
error:implicit declaration of function
CMDQ_REG_REVERT_ADDR
CMDQ_REG_SHIFT_ADDR
This patch add cmdq header support for mt6853

MTK-Commit-Id: 84a2e12738f0057c3996b0343967f7101cfc4d37

Change-Id: Ia546e1dd8cd9dad1e7f66a7060a8e6128d3cea01
Signed-off-by: Juju Sung <juju.sung@mediatek.com>
CR-Id: ALPS04999122
Feature: [Module]Kernel Maintenance
2021-01-29 02:16:35 +08:00
EastL
3247db3a8a [ALPS05114312] platform: fix mt6893 build error
[Detail]
1. add msdc platform folder
2. add keyboard platform folder
3. add vibrator platform folder
4. add mu3phy platform folder for FPGA USB
5. add include platform folder
6. add mach_mt6893 config
7. add FPGA_EARLY_PORTING config for build error
8. rm pmic in i2c project dts node for build error

MTK-Commit-Id: e61eab9131fb34322fc33f57a2d0c27dc021a944

Change-Id: Id4c1bfa35667b79f8c963e41816d273f3c6c5828
Signed-off-by: EastL <EastL.Lee@mediatek.com>
CR-Id: ALPS05114312
Feature: System Performance
2021-01-29 02:15:48 +08:00
Henry Chen
822498726b [ALPS04862705] soc: scpsys: Update to kernel-5.0RC1
Update to kernel-5.0RC1

MTK-Commit-Id: 2b20b151c1e0cbaab28bc5fc02a49cf8d9e6bb8a

Change-Id: Id96cb48aa3dc951c32a16543dbbb5353f570704f
Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
CR-Id: ALPS04862705
Feature: Power Management
(cherry picked from commit c9c207dcf2879457efe29624b2579d33006876d1)
2021-01-29 02:14:16 +08:00
Juju Sung
4badbb19e2 [ALPS05014853] memory: emi undefined symbol error
[Detail]
error: undefined symbol:
emimpu_read_protection
mtk_emimpu_init_region..
This patch merge lost from q to r.

MTK-Commit-Id: 0b2bd448fdfe8d54af8db3cd9abb01bbb20e5854

Change-Id: I51b409ca5a8478c51138810642614c717ba1745d
Signed-off-by: Juju Sung <juju.sung@mediatek.com>
CR-Id: ALPS05014853
Feature: [Module]Kernel Maintenance
2021-01-29 01:03:32 +08:00
Damon Chu
22bef5ea14 [ALPS05025054] cmdq: support mt6885 and mt6873
1. mailbox controller / helper use MT6885 arch
2. CMDQ user interface use MT6885 arch
3. CMDQ user utility implementation use MT6761 arch
4. Update timer related API
5. Add client assignment into pkt in cmdq_pkt_flush_async_ex_impl

MTK-Commit-Id: 824d60a2190d505a3b02f0bf0696891357ec994f

Change-Id: I7f980d4363cefd3a474035243e2caaff917b3f26
Feature:[Module]CMDQ Driver
CR-Id:ALPS05025054
Signed-off-by: Damon Chu <damon.chu@mediatek.com>
2021-01-29 01:02:41 +08:00
Juju Sung
1e89564092 [ALPS04284125] config: add support for mt6765
[Detail]
1.add mt6765/battery dts/dtsi
2.add platform kconfig
3.add mt6765 dws
4.add lowpower driver
5.add storage drivr
6.add lcm driver

MTK-Commit-Id: 0a780cc2f56d40a75d5ecc1e6ba7362adf1c070a

Change-Id: Icce410bc810d6a46bae5bfde1fbe1add79ee7aec
Signed-off-by: Juju Sung <juju.sung@mediatek.com>
CR-Id: ALPS04284125
Feature: [Module]Kernel Maintenance
2021-01-29 00:52:25 +08:00
Dennis YC Hsieh
33138334e8 [ALPS04313905] cmdq: add general pool for mdp
Add general dma pool for mdp case since mdp copy instruction
before assign thread and clients.

MTK-Commit-Id: fd5af3d451548dcc0081312145d1075471d4bb97

Change-Id: Icf855c333a93186dbc77b7a9e3e5fb507638faf7
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04313905
Feature: [Module]CMDQ Driver
2021-01-29 00:52:01 +08:00
Chih-Wei Chiou
820227bc6d [ALPS04706543] soc: mediatek: Add mediatek low power manager driver
Driver for MediaTek Low Power Manager

The driver provides the plafotm to enter deeper low power
mode when cpu power down if there is a sufficient time
before it wakeup.

MTK-Commit-Id: a727f6ac28ef595831786a61aa5f43f68e52b30c

Change-Id: I90177608bc2bd721817b7a4adf8f51e9d0132b63
Signed-off-by: Chih-Wei Chiou <chih-wei.chiou@mediatek.com>
CR-Id: ALPS04706543
Feature: Power Management
2021-01-29 00:48:32 +08:00
Jiaguang Zhang
f1759f6c6c [ALPS04682848] CMDQ: enable cmdq for mt8167
enable cmdq define for mt8167 IC

Test: build pass

MTK-Commit-Id: d41e732b2afef5f51507268c9fbce8167316219d

Change-Id: I3ae3498a8d3a72445f1980c858225d29a77be620
CR-Id: ALPS04682848
Feature: [Module]CMDQ Driver
Signed-off-by: Jiaguang Zhang <Jiaguang.Zhang@mediatek.com>
2021-01-29 00:45:32 +08:00
Qiqi Wang
9b32a106b9 [ALPS04667394] soc: mediatek: scpsys: add mt8167 mtcmos driver support
add mt8167 mtcmos driver support

MTK-Commit-Id: 6a747593622d75df6d97fbf233374a353f76e071

Change-Id: Ie03fa51ad5140c84e85ba666407a273613c72004
Signed-off-by: Qiqi Wang <qiqi.wang@mediatek.com>
CR-Id: ALPS04667394
Feature: Power Management
2021-01-29 00:45:09 +08:00
Dennis YC Hsieh
77a7f329c3 [ALPS04291711] cmdq: reduce poll interface
Remove cmdq base in sleep interface,
since it is not necessary and not easy to use.
Change cmdq base to subsys id in poll timeout interface for easy use.

MTK-Commit-Id: 5267ed8209dbfc610f1684dd97d05e802a5bc786

Change-Id: Ice2180eb600c6206280b021a354cc90bc50e9939
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04291711
Feature: [Module]CMDQ Driver
2021-01-29 00:42:43 +08:00
Dennis YC Hsieh
a750da13f0 [ALPS04291711] cmdq: enable driver in mt6885
Enable address shift and kernel config for mt6885.

MTK-Commit-Id: 027edd7a6d821b453556ec105c879b5b7cab2c85

Change-Id: Iac72e9ecc10684a624b9d8016dafd3fd9f70fd6f
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04291711
Feature: [Module]CMDQ Driver
2021-01-29 00:40:37 +08:00
Dennis YC Hsieh
fe2b188a0f [ALPS04313905] cmdq: correct poll timeout addr
Use phys address as 64bit pa for poll timeout interface, which support
both dram address and register.

MTK-Commit-Id: ed3931a8c092a2ffd1f35f26cd101ac415db4a9f

Change-Id: I14ab3f19200e81a8080b47c4e9a68751a4378489
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04313905
Feature: [Module]CMDQ Driver
2021-01-29 00:39:55 +08:00
Dennis YC Hsieh
a2d9603c90 [ALPS04313905] cmdq: change profile time to us
Change profile time to us level to profile more large range.

MTK-Commit-Id: de4ff9dd1ef8d47f052594501bca47d6386a9047

Change-Id: I182efcbd0507ab8de642c3638188b74f9a9d0b6e
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04313905
Feature: [Module]CMDQ Driver
2021-01-29 00:39:30 +08:00
Dennis YC Hsieh
b25c4b49e4 [ALPS04313905] cmdq: assign correct platform addr behavior
Use macro to define legacy platform to no shift address.
Do shift for mt6779, mt6785 and mt6789,
 which have capability of 35bit addressing.

MTK-Commit-Id: 02a672d4267c0f850ec402d8e55689a385dbec9a

Change-Id: I3a9bbf95e78583116707da3f1deb3b9762277772
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04313905
Feature: [Module]CMDQ Driver
2021-01-29 00:37:45 +08:00
Dennis YC Hsieh
f55a819ef5 [ALPS04313905] cmdq: migration cmdq driver
Migration timer perf debug flow.
Migration secure path metadata.
Migration secure path notify thread.

MTK-Commit-Id: 10d898d51394068316dfb2385f9735170d71a394

Change-Id: I2665a5d9ddddda43eb21a4e23cea5f42f3b348cc
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
CR-Id: ALPS04313905
Feature: [Module]CMDQ Driver
2021-01-29 00:37:41 +08:00
Juju Sung
aa09f74b62 [ALPS04239425] LowPower: upower_v2 porting
[Detail]
1.add upower_v2 build for MT6739
2.add m4u v2.0 driver
3.Fix accdet build break
4.Fix sched type mismatch issue

MTK-Commit-Id: f9cd1e97e2ba0b58f10f8f74c51a66f72fecc2f6

Change-Id: Ie32eaa1e777035ae07d09cff8015e739040a4c4a
CR-Id: ALPS04239425
Feature:[Module]Kernel Maintenance
Signed-off-by: Juju Sung <juju.sung@mediatek.com>
2021-01-28 20:27:51 +08:00
Bin l liu
af0ac8975e [ALPS04009915] cmdq: mt8168: fix cmdq build error.
fix cmdq build error.

MTK-Commit-Id: 938f48a580fc86177c6b47ffd763b08b1f35746b

Change-Id: I8d40373382146b450bcddb5688be96bb3a4911ff
Feature: [Module]CMDQ Driver
CR-Id: ALPS04009915
Signed-off-by: Bin l liu <binl.liu@mediatek.com>
(cherry-pick from 93f274eb479b68314802d5ca361517bd9f57edb7)
2021-01-28 18:36:02 +08:00
Brian Chen
bf4a084d69 [ALPS04067093] pmic_wrap: add wrapper driver for mt6771
1. add pmic wrap legacy driver
2. add pmic wrap upstream driver
3. use CONFIG_MTK_PMIC_WRAP_HAL as legacy driver option
4. use CONFIG_MTK_PMIC_WRAP as upstream driver option

MTK-Commit-Id: 4bb2a9b63578508a24e5adc34615769866c8a7b2

Change-Id: Idad6ee2ea65415331fda3e3116e2b181aeb91756
Signed-off-by: Brian Chen <brian-py.chen@mediatek.com>
CR-Id: ALPS04067093
Feature: Power Management
(cherry picked from commit 1da70d4c5eac047f51ce8a352bdaa2fdae303d34)
2021-01-28 17:54:08 +08:00
Dennis YC Hsieh
a992b31b14 [ALPS04064816] cmdq: Enable cmdq driver
Porting cmdq driver with following,
1. CMDQ v3 driver which calls mbox cmdq.
2. CMDQ mailbox helper and controller.
3. DTS node document.
4. Kernel config for v3 and mbox.
5. CMDQ dts bindings and dts node.

MTK-Commit-Id: 0a83452cf18c400c1c877d914f664695bc9a1bac

Change-Id: I4ef717943be8805ebf6d4e87efb7c83ba809545c
CR-Id: ALPS04064816
Feature: [Module]CMDQ Driver
Signed-off-by: Dennis YC Hsieh <dennis-yc.hsieh@mediatek.com>
(cherry picked from commit 0960e4ba3a5bc443701aee4f94a6deb4e8e7acd2)
2021-01-28 17:53:16 +08:00
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
Linus Torvalds
ae46654bcf Merge tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull ARM SoC driver updates from Olof Johansson:
 "This branch contains platform-related driver updates for ARM and ARM64.

  Among them:

   - Reset driver updates:
     + New API for dealing with arrays of resets
     + Make unimplemented {de,}assert return success on shared resets
     + MSDKv1 driver
     + Removal of obsolete Gemini reset driver
     + Misc updates for sunxi and Uniphier

   - SoC drivers:
     + Platform SoC driver registration on Tegra
     + Shuffle of Qualcomm drivers into a submenu
     + Allwinner A64 support for SRAM
     + Renesas R-Car R3 support
     + Power domains for Rockchip RK3366

   - Misc updates and smaller fixes for TEE and memory driver
     subsystems"

* tag 'armsoc-drivers' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (54 commits)
  firmware: arm_scpi: fix endianness of dev_id in struct dev_pstate_set
  soc/tegra: fuse: Add missing semi-colon
  soc/tegra: Restrict SoC device registration to Tegra
  drivers: soc: sunxi: add support for A64 and its SRAM C
  drivers: soc: sunxi: add support for remapping func value to reg value
  drivers: soc: sunxi: fix error processing on base address when claiming
  dt-bindings: add binding for Allwinner A64 SRAM controller and SRAM C
  bus: sunxi-rsb: Enable by default for ARM64
  soc/tegra: Register SoC device
  firmware: tegra: set drvdata earlier
  memory: Convert to using %pOF instead of full_name
  soc: Convert to using %pOF instead of full_name
  bus: Convert to using %pOF instead of full_name
  firmware: Convert to using %pOF instead of full_name
  soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
  soc: mediatek: add header files required for MT7622 SCPSYS dt-binding
  soc: mediatek: reduce code duplication of scpsys_probe across all SoCs
  dt-bindings: soc: update the binding document for SCPSYS on MediaTek MT7622 SoC
  reset: uniphier: add analog amplifiers reset control
  reset: uniphier: add video input subsystem reset control
  ...
2017-09-10 20:40:00 -07:00
Arnd Bergmann
2c08ab3f25 soc: ti/knav_dma: include dmaengine header
A header file cleanup apparently caused a build regression
with one driver using the knav infrastructure:

In file included from drivers/net/ethernet/ti/netcp_core.c:30:0:
include/linux/soc/ti/knav_dma.h:129:30: error: field 'direction' has incomplete type
  enum dma_transfer_direction direction;
                              ^~~~~~~~~
drivers/net/ethernet/ti/netcp_core.c: In function 'netcp_txpipe_open':
drivers/net/ethernet/ti/netcp_core.c:1349:21: error: 'DMA_MEM_TO_DEV' undeclared (first use in this function); did you mean 'DMA_MEMORY_MAP'?
  config.direction = DMA_MEM_TO_DEV;
                     ^~~~~~~~~~~~~~
                     DMA_MEMORY_MAP
drivers/net/ethernet/ti/netcp_core.c:1349:21: note: each undeclared identifier is reported only once for each function it appears in
drivers/net/ethernet/ti/netcp_core.c: In function 'netcp_setup_navigator_resources':
drivers/net/ethernet/ti/netcp_core.c:1659:22: error: 'DMA_DEV_TO_MEM' undeclared (first use in this function); did you mean 'DMA_DESC_HOST'?
  config.direction  = DMA_DEV_TO_MEM;

As the header is no longer included implicitly through netdevice.h,
we should include it in the header that references the enum.

Fixes: 0dd5759dbb ("net: remove dmaengine.h inclusion from netdevice.h")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-09-05 09:11:45 -07:00
Sean Wang
52510ee934 soc: mediatek: add SCPSYS power domain driver for MediaTek MT7622 SoC
Add SCPSYS power domain driver for MT7622 SoC having four power domains
which are respectively ETHSYS for Ethernet including embedded switch,
WBSYS for WIFI and Bluetooth, HIF0SYS for PCI-E and SATA, and HIF1SYS for
USB. Those functions could be selectively powered gated when the
corresponding function is no longer to use in order to reach more minimal
power dissipation.

Signed-off-by: Chen Zhong <chen.zhong@mediatek.com>
Signed-off-by: Sean Wang <sean.wang@mediatek.com>
Reviewed-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>
2017-08-14 17:28:40 +02:00
Arnd Bergmann
ffe3744a59 Merge tag 'actions-drivers-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions into next/drivers
Pull "Actions Semi SoC drivers for 4.13" from Andreas Färber:

This adds clock source and power domain drivers for S500/S900.

* tag 'actions-drivers-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/afaerber/linux-actions:
  soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating
  soc: actions: Add Owl SPS
  dt-bindings: power: Add Owl SPS power domains
  clocksource: owl: Add S900 support
  clocksource: Add Owl timer
2017-06-29 17:34:57 +02:00
Andreas Färber
6932ec60cc soc: actions: owl-sps: Factor out owl_sps_set_pg() for power-gating
Allow the SMP code to reuse PM domain code for CPU2/CPU3 wakeup.

Signed-off-by: Andreas Färber <afaerber@suse.de>
2017-06-23 17:43:27 +02:00
Olof Johansson
8c5c250670 Merge tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into next/drivers
Renesas ARM Based SoC Drivers Updates for v4.13

* Rework Kconfig and Makefile logic

* tag 'renesas-drivers-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: Rework Kconfig and Makefile logic

Signed-off-by: Olof Johansson <olof@lixom.net>
2017-06-18 22:45:08 -07:00
Geert Uytterhoeven
8be381a131 soc: renesas: Rework Kconfig and Makefile logic
The goals are to:
  - Allow precise control over and automatic selection of which
    (sub)drivers are used for which SoC,
  - Allow adding support for new SoCs easily,
  - Allow compile-testing of all (sub)drivers,
  - Keep driver selection logic in the subsystem-specific Kconfig,
    independent from the architecture-specific Kconfig (i.e. no "select"
    from arch/arm64/Kconfig.platforms), to avoid dependencies.

This is implemented by:
  - Introducing Kconfig symbols for all drivers and sub-drivers,
  - Introducing the Kconfig symbol SOC_RENESAS, which is enabled
    automatically when building for a Renesas ARM platform, and which
    enables all required drivers without interaction of the user, based
    on SoC-specific ARCH_* symbols,
  - Allowing the user to enable any Kconfig symbol manually if
    COMPILE_TEST is enabled,
  - Using the new Kconfig symbols instead of the ARCH_* symbols to
    control compilation in the Makefile,
  - Always entering drivers/soc/renesas/ during the build.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-06-12 11:31:07 +02:00
Arnd Bergmann
9dfe29d9d2 Merge tag 'renesas-fixes-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
Pull "Renesas ARM Based SoC Fixes for v4.12" from Simon Horman:

* Provide dummy rcar_rst_read_mode_pins() for compile-testing

* tag 'renesas-fixes-for-v4.12' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  soc: renesas: Provide dummy rcar_rst_read_mode_pins() for compile-testing
2017-05-10 15:33:45 +02:00
Linus Torvalds
8f28472a73 Merge tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB updates from Greg KH:
 "Here is the big USB patchset for 4.12-rc1.

  Lots of good stuff here, after many many many attempts, the kernel
  finally has a working typeC interface, many thanks to Heikki and
  Guenter and others who have taken the time to get this merged. It
  wasn't an easy path for them at all.

  There's also a staging driver that uses this new api, which is why
  it's coming in through this tree.

  Along with that, there's the usual huge number of changes for gadget
  drivers, xhci, and other stuff. Johan also finally refactored pretty
  much every driver that was looking at USB endpoints to do it in a
  common way, which will help prevent any "badly-formed" devices from
  causing problems in drivers. That too wasn't a simple task.

  All of these have been in linux-next for a while with no reported
  issues"

* tag 'usb-4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (263 commits)
  staging: typec: Fairchild FUSB302 Type-c chip driver
  staging: typec: Type-C Port Controller Interface driver (tcpci)
  staging: typec: USB Type-C Port Manager (tcpm)
  usb: host: xhci: remove #ifdef around PM functions
  usb: musb: don't mark of_dev_auxdata as initdata
  usb: misc: legousbtower: Fix buffers on stack
  USB: Revert "cdc-wdm: fix "out-of-sync" due to missing notifications"
  usb: Make sure usb/phy/of gets built-in
  USB: storage: e-mail update in drivers/usb/storage/unusual_devs.h
  usb: host: xhci: print correct command ring address
  usb: host: xhci: delete sp_dma_buffers for scratchpad
  usb: host: xhci: using correct specification chapter reference for DCBAAP
  xhci: switch to pci_alloc_irq_vectors
  usb: host: xhci-plat: set resume_quirk() for R-Car controllers
  usb: host: xhci-plat: add resume_quirk()
  usb: host: xhci-plat: enable clk in resume timing
  usb: host: plat: Enable xHCI plat runtime PM
  USB: serial: ftdi_sio: add device ID for Microsemi/Arrow SF2PLUS Dev Kit
  USB: serial: constify static arrays
  usb: fix some references for /proc/bus/usb
  ...
2017-05-04 18:03:51 -07:00
Geert Uytterhoeven
7b4ccb3c46 soc: renesas: Provide dummy rcar_rst_read_mode_pins() for compile-testing
If the R-Car RST driver is not included, compile-testing R-Car clock
drivers fails with a link error:

    undefined reference to `rcar_rst_read_mode_pins'

To fix this, provide a dummy version.  Use the exact same test logic as
in drivers/soc/renesas/Makefile, as there is no Kconfig symbol (yet) to
control compilation of the R-Car RST driver.

Fixes: 527c02f66d ("soc: renesas: Add R-Car RST driver")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
2017-04-28 10:07:36 +02:00
Krzysztof Kozlowski
7a66647b25 phy: exynos: Use one define for enable bit
There is no need for separate defines for Exynos4 and Exynos5 phy enable
bit and MIPI phy reset bits.  In both cases there are the same so
simplify it.

This reduces number of defines and allows removal of one header file.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-04-10 16:43:18 +05:30
Krzysztof Kozlowski
cf09ee5997 phy: exynos-mipi-video: Use consistent method to address phy registers
Exynos4 MIPI phy registers are defined with macro calculating the offset
for given phyN.  Use the same method for Exynos5420 to be consistent.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-04-10 16:43:05 +05:30
Krzysztof Kozlowski
424c984148 phy: exynos5: Remove duplicated defines of PHY register defines
Phy drivers access PMU region through regmap provided by exynos-pmu
driver.   However there is no need to duplicate defines for PMU
registers.  Instead just use whatever is defined in exynos-regs-pmu.h.

This reduces number of defines.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-04-10 16:42:58 +05:30
Krzysztof Kozlowski
5812f0106c phy: exynos4: Remove duplicated defines of PHY register defines
Phy drivers access PMU region through regmap provided by exynos-pmu
driver.   However there is no need to duplicate defines for PMU
registers.  Instead just use whatever is defined in exynos-regs-pmu.h.

Additionally MIPI PHY registers for Exynos5433 start from the same
address as Exynos4 and Exynos5250 so re-use existing defines.

This reduces number of defines and allows removal of one header file.

Suggested-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
2017-04-10 16:42:58 +05:30
Bjorn Andersson
395a48053a soc: qcom: smd: Remove standalone driver
Remove the standalone SMD implementation as we have transitioned the
client drivers to use the RPMSG based one.

Also remove all dependencies on QCOM_SMD from Kconfig files, in order to
keep them selectable in the absence of the removed symbol.

Acked-by: Andy Gross <andy.gross@linaro.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2017-03-28 17:58:07 -07:00