Forcing the re-make of defconfig causes a ton of stuff to get
rebuilt during dirty builds. So don't do it.
Change-Id: I945fc8bfe3f2a52c3a8069fa016fc6f948f1b30f
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1529110
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Ignore commit history for softlink
arch/arm64/boot/dts/vendor
So that there won't be extra sync failure
once kernel gets update.
Change-Id: I2c0cdd5fd5763d742e22bc577994331396feae19
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1524582
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
There are quite some use cases where we need live serial logs to
analyze issues on close phones without physical debugGing UART
port exposed. Having the capability of re-directing serial logs
over USB is helpful for both general development and return analysis
scenarios where we have to avoid HW changes as much as possible.
The 2 new configs will add the capability of re-directing serial logs
to USB CDC ACM interface, though it is up to init's decision as for
whether to activate the capability based on bootloader's input.
Change-Id: Ic7b7846671292a7bb8b13051b2c233bd26b24ae9
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1510439
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
The new match() callback for earlycon is to tell whether earlycon and
the "real" console are the same device.
Change-Id: I8b54d5d9f1d737650d0890fc9f596080c8b1aaf2
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1472629
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1474156
Reviewed-on: https://gerrit.mot.com/1509729
Reviewed-by: Wang Wang <wangwang1@mt.com>
Without this change, the boot console has strong assumption of the state of
the "real" console, so when PM kicks in during early boot stage, resources
(like clocks, GPIOs, etc) for the boot console may be turned off if the "real"
console sharing these resources is not enabled, which will lead to malfuntion
of boot console.
Change-Id: I19a58d76c99e0fb7bff0d9dc06a2b0f9066063e2
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1472630
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Qing Chang <qing@motorola.com>
Submit-Approved: Jira Key
Signed-off-by: Qing Chang <a21550@motorola.com>
Reviewed-on: https://gerrit.mot.com/1474157
Reviewed-on: https://gerrit.mot.com/1509725
Reviewed-by: Wang Wang <wangwang1@mt.com>
Enable the usbnet framework and drivers to support
USB net.
Change-Id: I4bc66d8c34de6d20cc01044d9efbe97bdf71999c
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1511644
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
If the probing of UDC controller failed
udc_name shall be NULL to avoid double unregistration
and the panic
It could happen in some corner case
Change-Id: I2e6e4168a505b86d8f1b57db53be91acc608ee97
Signed-off-by: a17671 <a17671@motorola.com>
Reviewed-on: https://gerrit.mot.com/1438349
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1457371
Reviewed-by: Yeqing Wang <wangyq13@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
(cherry picked from commit 9fc2515cb3fe8ffdf26f04c0a58a57552e50b6f3)
Reviewed-on: https://gerrit.mot.com/1459030
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1463803
Reviewed-on: https://gerrit.mot.com/1511643
Reviewed-by: Wang Wang <wangwang1@mt.com>
Force all logs to print.
The USB DWC3 is very important and tracking dmesg
is much easier when everything is ON.
Port-of: https://gerrit.mot.com/1307019
Change-Id: Iebde3d9feadde8a3e92acb10baeb97c5ba7e07cf
Signed-off-by: Kenny Kessler <kenny.kessler@motorola.com>
Reviewed-on: https://gerrit.mot.com/1332192
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1391225
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449174
Reviewed-on: https://gerrit.mot.com/1511642
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.com>
Some of PC USB3.0 port don't support bcdUSB 2.1 version.
But the phone bcdUSB will focus on bcdUSB 2.1.then USB gadget will
reset continually.Change bcdUSB to 2.0 to compat all PC USB port type.
07-02 08:05:34.853 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:35.182 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:35.415 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:35.647 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
07-02 08:05:44.171 0 0 D dwc3 a600000.dwc3: Notify OTG from dwc3_gadget_reset_interrupt
Change-Id: Icb46a95226caecc9778c6889a85654f97fa85012
Signed-off-by: liuyc20 <liuyc20@mt.com>
Reviewed-on: https://gerrit.mot.com/1383246
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1449152
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-on: https://gerrit.mot.com/1511641
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.com>
The gadget driver unregister/probe is not allowed to reentry
for the same udc.
As the conditions for gadget driver unregister/probe entry,
gadget secure and udc_name status should be synchronized.
Otherwise, in old implement code logic, there is still a chance
to fall into trouble of gadget driver unregister/probe reentry
for the same udc.
Change-Id: I6eb30a36eab84afd656f5bee9678e8d44933c6bc
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1287442
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1338870
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449122
Reviewed-on: https://gerrit.mot.com/1511640
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.com>
There will be gadget driver unregister twice in USB secure
when try to set the UDC to none from userspace, which will cause
kernel panic in 4.9 kernel version, as there is a feature
about pending gadget driver list being added in this version.
As a solution, make sure gadget driver unregister or probe only
once over secure mode entry or usb configure from userspace.
Kernel BUG at ffffff8093067140 [verbose debug info unavailable]
Internal error: Accessing user space memory outside uaccess.h
routines: 96000045 [#1] PREEMPT SMP
PC is at usb_gadget_unregister_driver+0x88/0xf0
LR is at usb_gadget_unregister_driver+0x30/0xf0
Change-Id: I77dfbd4162c7a4d96bbe297Montana4c99e876f5cf88
Signed-off-by: Yonghua Yan <yanyh2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1287125
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Yuecai Liu <liuyc20@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1338869
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449121
Reviewed-on: https://gerrit.mot.com/1511639
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.c
If the user passes in a negative file size in a int64,
this will compare to be smaller than buffer length,
and it will get truncated to form a read length that
is larger than the buffer length.
To fix, return -EINVAL if the count argument is negative,
so the loop will never happen.
Mot-CRs-fixed: (CR)
CVE-fixed: CVE-2017-13163
Bug: 37429972
Test: Test with PoC
Change-Id: I5Montanae38e6fbe2c17eb8c493f9eb81df6cfd780a4
Signed-off-by: Jerry Zhang <zhangjerry@google.com>
Signed-off-by: Amarendra Reddy <amarenr@motorola.com>
Reviewed-on: https://gerrit.mot.com/1090092
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1167331
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1262843
Reviewed-on: https://gerrit.mot.com/1338862
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1449108
Reviewed-on: https://gerrit.mot.com/1511638
Reviewed-by: Zonghua Liu <a17671@motorola.com>
os_desc support can be turned off via userspace. Kernel also
needs to correspondingly reset its state if userspace has changed
it. Otherwise this cause os descs to be advertised on drivers that
have no os desc support.
Change-Id: Ib8da2eb78a1640aac9abdb29840a33773603d1a8
Signed-off-by: Ravi Vembu <Raviv@motorola.com>
Moto-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/920122
SLTApproved: Slta Waiver <sltawvr@motorola.com>
SME-Granted: SME Approvals Granted
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Christopher Fries <cfries@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-on: https://gerrit.mot.com/1167316
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1257205
Reviewed-by: Xiaojun Ji <jixj@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1338832
Reviewed-on: https://gerrit.mot.com/1449034
Reviewed-on: https://gerrit.mot.com/1511634
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.com>
Handle OS descriptors and other Vendor defined requests only
when the MTP function is bound. Otherwise MTP responds for
setup requests from Windows Hosts when other gadget drivers are
active and the host ends up loading the wrong driver.
Change-Id: I324d42bd0fab743c7b40d2b119225a6d66781a52
Signed-off-by: Ravi Vembu <Raviv@motorola.com>
Moto-CRs-fixed: (CR)
Reviewed-on: https://gerrit.mot.com/946404
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-on: https://gerrit.mot.com/1167321
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Lu Chai <chailu1@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1262838
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Reviewed-on: https://gerrit.mot.com/1338858
Reviewed-on: https://gerrit.mot.com/1448946
Reviewed-on: https://gerrit.mot.com/1511632
Reviewed-by: Zonghua Liu <a17671@motorola.com>
Reviewed-by: Wang Wang <wangwang1@mt.com>
Moto diag driver built-in or DLKM requires DIAG_OVER_TTY
for both user and userdebug version.
Change-Id: I5f6bec18700f3fd8a5198266625837b8830fa10e
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1510729
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
Touch driver can call the api to set the touch state.
And panel driver can call the api to get the touch state.
And when the touch state is not 0,
we can not power down panel.
Change-Id: I3cb0dceeb7ff9b0f731c0ce2d9f2fea2e648d223
Signed-off-by: houdz1 <houdz1@motorola.com>
Reviewed-on: https://gerrit.mot.com/1499392
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jun Weng <wengjun1@motorola.com>
Reviewed-by: Huosheng Liao <liaohs@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509882
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
This is designed to allow other drivers to know about panel events. It
also enables drivers to inject synchronous operations into the panel
state flow, by blocking the panel state changes at various points.
An example of this would be if a driver would like to know when a panel
is on and do an operation before the video stream to that panel beGins.
Signed-off-by: Jared Suttles <jsuttles@motorola.com>
Reviewed-by: Shi-Yong Li <a22381@motorola.com>
Reviewed-by: Patrick Auchter <auchter@motorola.com>
Reviewed-by: Joseph Swantek <jswantek@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Change-Id: I94594c93e2b989ff93271f116e010baaf774c6de
Reviewed-on: https://gerrit.mot.com/1469162
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Konstantin Makariev <kmakariev@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1470251
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509864
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
For the Secure UI feature, the display feature, which allows host to
read-back its internal memory buffer, should be disable. The MIPI DSI
command 0x2E (read_memory_start) and 0x3E (read_memory_continue) will
be disable.
Port from: bde6847
Change-Id: Ifc2579051e8005de5e915aad1bccd883c681572f
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1444417
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509784
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Provide a small convenience wrapper that set the display 2bytes
brightness
Port from: 4a5c926
Change-Id: Iadfcb1d6cdf4866391f36ee970d79840e109fe9a
Signed-off-by: Bang Nguyen <bangnguyen@motorola.com>
Reviewed-on: https://gerrit.mot.com/1410287
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509783
Reviewed-by: Xiangpo Zhao <zhaoxp3@motorola.com>
Enable pstore config to save dmesg on panic and
watchdog
Change-Id: Ib593b780fcf10059c4e795491756646747528058
Signed-off-by: zhaoxp3 <zhaoxp3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1510456
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Wang Wang <wangwang1@mt.com>
Submit-Approved: Jira Key
tlmm:
Add a function to dump the active wakelocks
Change-Id: I05f4d477ff9e096efe8e0fcdb3a8d5d76c7028ac
Signed-off-by: haojl2 <haojl2@motorola.com>
Reviewed-on: https://gerrit.mot.com/1453711
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509728
Reviewed-by: Wang Wang <wangwang1@mt.com>
Add system node /sys/private/tlmm_before_sleep etc.
Used to check and change the gpio before suspend.
This won't save and change gpio's config only after a read of the node.
Use tlmm_tz to skip those gpios locked by TZ such as 111, 126.
Change-Id: I99810d8659ab8ea4a59029a9cea326f93becefd2
Signed-off-by: yangjq <yangjq@mt.com>
Reviewed-on: https://gerrit.mot.com/960741
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver <sltawvr@motorola.com>
Tested-by: Jira Key <jirakey@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Submit-Approved: Jira Key <jirakey@motorola.com>
Reviewed-on: https://gerrit.mot.com/1172239
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Guobin Zhang <zhanggb@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1340934
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Reviewed-on: https://gerrit.mot.com/1362061
Reviewed-on: https://gerrit.mot.com/1453714
Reviewed-on: https://gerrit.mot.com/1509727
Reviewed-by: Wang Wang <wangwang1@mt.com>
Cherry pick this commit from Defto print "PM: suspend" with
wall time when enter and exit suspend.
Change-Id: I92f252414c013b018b9a392eae1ee039aa0e89dc
Signed-off-by: Todd Poynor <toddpoynor@google.com>
Signed-off-by: yangjq <yangjq@mt.com>
Reviewed-on: https://gerrit.mot.com/1477734
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Jialei Hao <haojl2@motorola.com>
Reviewed-by: Jianqi Yang <yangj@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1509726
Reviewed-by: Wang Wang <wangwang1@mt.com>
From (CR)
This app manages secure state as set by bootloader. Reloading would
clear the state. This solution is limted by some alternate
way to force unloading our prov TA and then restarting it
outside bootloader.
Change-Id: Idcfc520f457ac081fd63e76a821d047ee9a78d09
Reviewed-on: https://gerrit.mot.com/1284363
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Reviewed-by: Joel Voss <jvoss@motorola.com>
Reviewed-by: Igor Kovalenko <igork@motorola.com>
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1349396
Reviewed-by: Zhenxin Xi <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1471673
Reviewed-by: Yang Xiao <xiaoy3@motorola.com>
Reviewed-on: https://gerrit.mot.com/1509724
add two debug interfaces:
1.when set cmdline "sys_restart_mode=warm", the kernel will reset with
WARM way.
2.when set cmdline "sys_restart_mode=panic", the kernel will enter into
ramdump when it normal reset.
Change-Id: Id70063bac7d0951622c6e074c2ba2ec024374022
Signed-off-by: xizx <xizx@motorola.com>
Reviewed-on: https://gerrit.mot.com/1117501
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1345290
Reviewed-on: https://gerrit.mot.com/1406867
Reviewed-on: https://gerrit.mot.com/1463612
Reviewed-on: https://gerrit.mot.com/1509723
Print system timestamp on Power key press and release events.
This would make debugGing easy
Ported from: https://gerrit.mot.com/#/c/1320467/
Change-Id: I2c810e4b59c2d3bd8a705d407a339d9efe6fad3d
Reviewed-on: https://gerrit.mot.com/1320467
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Ryan Lattrel <ryanl@motorola.com>
Reviewed-by: Ling Jin <lingjin@motorola.com>
Submit-Approved: Jira Key
Reviewed-on: https://gerrit.mot.com/1456668
Reviewed-on: https://gerrit.mot.com/1509721
Reviewed-by: Wang Wang <wangwang1@mt.com>