linux.git
5 years agoMLK-20235 mmc: sdhci-of-esdhc: fix coverity uncheck return value issue.
Haibo Chen [Mon, 19 Nov 2018 08:31:49 +0000 (16:31 +0800)]
MLK-20235 mmc: sdhci-of-esdhc: fix coverity uncheck return value issue.

CID 4058489: Unchecked return value (CHECKED_RETURN)
2. check_return: Calling dma_set_mask_and_coherent without checking
return value.

Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit 9df9165707c34b8c4efe0e89f97e93cca7a222a0)

5 years agoMLK-20388-2: mtd: fsl-quadspi: use ioremap_wc to handle qspi unaligned access
Han Xu [Thu, 15 Nov 2018 21:12:13 +0000 (15:12 -0600)]
MLK-20388-2: mtd: fsl-quadspi: use ioremap_wc to handle qspi unaligned access

Use ioremap_wc to handle unaligned qspi AHB read. Remove the previous
SW alignment handle for neat code.

Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit 07c7e72b0ed05beaf2c07d8e098e18c1e48ec634)

5 years agoMLK-20388-1: mtd: fsl-flexspi: use ioremap_wc to handle fspi unaligned access
Han Xu [Thu, 15 Nov 2018 21:09:00 +0000 (15:09 -0600)]
MLK-20388-1: mtd: fsl-flexspi: use ioremap_wc to handle fspi unaligned access

Use ioremap_wc to handle unaligned flexspi AHB read. Remove the previous
SW alignment handle for neat code.

Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Arulpandiyan Vadivel <arulpandiyan_vadivel@mentor.com>
Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit c180c525fd7b834ea0e07be4ca79fb8986a214cf)

5 years agoRevert "PCI: imx6: Fix link training status detection in link up check"
Arulpandiyan Vadivel [Wed, 24 Apr 2019 13:39:51 +0000 (19:09 +0530)]
Revert "PCI: imx6: Fix link training status detection in link up check"

This reverts commit 2a031cab71cd9909fa659c96b6221d1fe33ad87f.

Signed-off-by: Shrikant Bobade <Shrikant_Bobade@mentor.com>
(cherry picked from commit 91d66f481121b2eab56f5d829a0002f6bb47953e)

6 years agoMLK-21589 VPU Decoder: implement insert decode header of
Shijie Qin [Sun, 28 Apr 2019 10:44:59 +0000 (18:44 +0800)]
MLK-21589 VPU Decoder: implement insert decode header of
    RV format for Amphion decoder

    Insert sequence header, frame header and slice header for
    input buffer of RV format.
    Include rv8, rv9 and rv10, the header of rv9 and rv10 are
    the same.
    Extract an independent punction for copy buffer to ring
    stream buffer.

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
6 years agoMLK-19341 brcmfmac: bcmsdh: add shutdown handler to avoid kernel panic on reboot
Fugang Duan [Tue, 30 Apr 2019 05:56:16 +0000 (13:56 +0800)]
MLK-19341 brcmfmac: bcmsdh: add shutdown handler to avoid kernel panic on reboot

When running wlan interface up/down stress test in background then run
reboot command, there have kernel panic as below message.
This issue is fixed by doing cleanup in shutdown handler.

Unable to handle kernel paging request at virtual address 7f0e9040
pgd = 86c20000
[7f0e9040] *pgd=86ecd811, *pte=00000000, *ppte=00000000
Internal error: Oops: 7 [#1] PREEMPT SMP ARM
task: 8603c000 task.stack: 86040000
PC is at device_shutdown+0x198/0x204
LR is at _raw_spin_unlock_irq+0x28/0x54
pc : [<804ee520>]    lr : [<809a70dc>]    psr: 20030013
sp : 86041e60  ip : 00000000  fp : 80c5b7e4
r10: 80cb0b24  r9 : 80f7e020  r8 : 86b0b844
r7 : 80fdce84  r6 : 86b0b810  r5 : 80f34ef0  r4 : 86b0b81c
r3 : 7f0e9018  r2 : ffffffff  r1 : 00000002  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c53c7d  Table: 86c2006a  DAC: 00000051
Process systemd-shutdow (pid: 1, stack limit = 0x86040210)
Stack: (0x86041e60 to 0x86042000)
1e60: 00000000 00000000 80f0f704 aef99500 fee1dead 80107c44 86040000 00000000
1e80: 7eee5fd4 8014bb74 00000000 8014bdcc 00000000 00000000 00000000 8020464c
1ea0: 87336540 00000000 00000000 00000000 861b24e0 87336548 00000024 00000002
1ec0: 00000000 00000005 0000001e 80205c34 00000000 00000000 1c4a66cc 87336540
1ee0: 00000000 86041f08 86041f80 00000000 00000000 80205d5c 86041f04 86041f08
1f00: 00000000 00000000 00000001 00000000 00000024 86041f20 00000005 7eee521c
1f20: 7eee5350 00000004 7eee5f1c 00000010 7eee5364 00000005 7eee53f4 0000000a
1f40: 76ece6fc 00000001 86005b00 00000005 fffffffe fffffffe 86d1a000 fffff000
1f60: 80107c44 87336540 87336540 00000000 7eee5318 80205df0 00000000 00000004
1f80: 00000000 00000000 00000000 7eee53f4 7eee5318 00000000 00000000 00000000
1fa0: 00000058 80107a60 00000000 00000000 fee1dead 28121969 01234567 aef99500
1fc0: 00000000 00000000 00000000 00000058 00000000 ffffffff 00000000 7eee5fd4
1fe0: 004a0e18 7eee5c44 0048afa4 76d0b5e0 60030010 fee1dead 00000000 00000000
[<804ee520>] (device_shutdown) from [<8014bb74>] (kernel_restart+0xc/0x50)
[<8014bb74>] (kernel_restart) from [<8014bdcc>] (SyS_reboot+0xc8/0x1ac)
[<8014bdcc>] (SyS_reboot) from [<80107a60>] (ret_fast_syscall+0x0/0x54)
Code: eaffffb5 e5943040 e3530000 0afffff3 (e5933028)
---[ end trace cb8c3d96d6f26a91 ]---

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21611 brcmfmac: change message level for reading optional iovar data
Fugang Duan [Tue, 30 Apr 2019 02:15:36 +0000 (10:15 +0800)]
MLK-21611 brcmfmac: change message level for reading optional iovar data

Not all firmware set channel/ulp_sdioctrl, so change the error message
to debug level for reading chanspec/ulp_sdioctrl iovar data.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21071 brcmfmac: add PCIe shutdown handler to avoid system warning on reboot
Fugang Duan [Tue, 30 Apr 2019 01:41:07 +0000 (09:41 +0800)]
MLK-21071 brcmfmac: add PCIe shutdown handler to avoid system warning on reboot

If reboot command is issued when PCIe WLAN device is in connected
state, system kernel dump while booting as below log. This issue
is fixed by doing cleanup and disable PCIe interrupt in shutdown handler.

[    6.405135] irq 304: nobody cared (try booting with the "irqpoll" option)
[    6.425581] Call trace:
[    6.428034] [<ffff000008089c48>] dump_backtrace+0x0/0x3c8
[    6.433433] [<ffff00000808a024>] show_stack+0x14/0x20
[    6.438485] [<ffff000008d8bec0>] dump_stack+0x9c/0xbc
[    6.443538] [<ffff00000811e7e4>] __report_bad_irq+0x34/0xf0
[    6.449110] [<ffff00000811ec84>] note_interrupt+0x2ec/0x338
[    6.454682] [<ffff00000811bc2c>] handle_irq_event_percpu+0x44/0x58
[    6.460861] [<ffff00000811bc88>] handle_irq_event+0x48/0x78
[    6.466433] [<ffff00000811fa88>] handle_fasteoi_irq+0xa8/0x180
[    6.472265] [<ffff00000811ac1c>] generic_handle_irq+0x24/0x38
[    6.478009] [<ffff00000811b29c>] __handle_domain_irq+0x5c/0xb8
[    6.483841] [<ffff000008081960>] gic_handle_irq+0x78/0x174
[    6.489325] Exception stack(0xffff0000094f3d80 to 0xffff0000094f3ec0)
[    6.495765] 3d80: 0000000000000000 ffff000009502580 0000000000000709 ffff000008ac5b28
[    6.503593] 3da0: 0000000002222221 00ffffffffffffff 0000000008cd6205 00000000000000c0
[    6.511421] 3dc0: 00000032b5503510 ffff000008082000 0000000000001000 0000000000000000
[    6.519249] 3de0: 0000000034d5d91d 00008000b4a78000 ffff000009502580 0000000000000000
[    6.527077] 3e00: 0000000000000000 0000000000000000 0000000000000000 000000016cb15db1
[    6.534905] 3e20: 0000000000000001 ffff8000b900ce00 ffff8000b925e000 0000000000000001
[    6.542733] 3e40: 000000016c9c1569 ffff8000b925e000 ffff000009502580 0000000000000400
[    6.550561] 3e60: 00000000417b0018 ffff0000094f3ec0 ffff000008a308a8 ffff0000094f3ec0
[    6.558389] 3e80: ffff000008a307f4 0000000040000045 ffff8000b925e060 0000000000000001
[    6.566217] 3ea0: ffffffffffffffff ffff8000b925e000 ffff0000094f3ec0 ffff000008a307f4
[    6.574045] [<ffff000008083230>] el1_irq+0xb0/0x124
[    6.578925] [<ffff000008a307f4>] cpuidle_enter_state+0x134/0x228
[    6.584930] [<ffff000008a30920>] cpuidle_enter+0x18/0x20
[    6.590242] [<ffff00000810c75c>] call_cpuidle+0x1c/0x40
[    6.595465] [<ffff00000810c9ac>] do_idle+0x1a4/0x1e0
[    6.600428] [<ffff00000810cb84>] cpu_startup_entry+0x24/0x28
[    6.606088] [<ffff000008d9e798>] rest_init+0xd0/0xe0
[    6.611056] [<ffff0000093b0b70>] start_kernel+0x398/0x3ac

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21597 can: flexcan: fix deadlock when can't call flexcan_noirq_resume()
Joakim Zhang [Mon, 29 Apr 2019 05:11:36 +0000 (13:11 +0800)]
MLK-21597 can: flexcan: fix deadlock when can't call flexcan_noirq_resume()

There is a limitation about wakeup event mechanisim in driver:

Other devices may suspend failed after system calling flexcan_suspend()
and before calling flexcan_noirq_suspend(), the result is that
flexcan_noirq_resume() will not be called. This will leave flexcan in
stop mode, and with the current driver it can't recover from this even
with a soft reboot, it requires a hard reboot.

This patch is intends to fix the scenario.

Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21511 can: flexcan: clear fd related bit when "fd off"
Joakim Zhang [Sat, 20 Apr 2019 09:26:32 +0000 (17:26 +0800)]
MLK-21511 can: flexcan: clear fd related bit when "fd off"

Fd mode related bit in register will keep asserted when setting "fd off"
in userspace after once setting "fd on" before. Clear fd related bit
when "fd off" is more reasonble. Also clean the cbt and fdcbt register
bit before setting.

Acked-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21510 can: flexcan: allocate skb in mailbox_read
Joakim Zhang [Sat, 20 Apr 2019 07:56:00 +0000 (15:56 +0800)]
MLK-21510 can: flexcan: allocate skb in mailbox_read

We allocate skb according to "fd on" or "fd off" before, this may not
reasonable. Such as, transfer normal frame when fd mode is on. Allcoating
skb based on "EDL" bit from mailbox ctrl field is more reasonable.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21600-2: ASoC: fsl_ssi: fix no sound issue with mono
Shengjiu Wang [Mon, 29 Apr 2019 06:29:08 +0000 (14:29 +0800)]
MLK-21600-2: ASoC: fsl_ssi: fix no sound issue with mono

Revert "MLK-14447: ASoC: fsl_ssi: Fix Capture and Playback with i2s mode"

This reverts commit 2076769ecbf8f30db7f69915eaed9498232f4ef0.

This patch is not needed and it removed setting of SSI_STCR_TXBIT0
that cause no sound issue with mono, so revert it.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-21600-1: ASoC: fsl_ssi: Revert fixed compilation errors
Shengjiu Wang [Mon, 29 Apr 2019 06:28:36 +0000 (14:28 +0800)]
MLK-21600-1: ASoC: fsl_ssi: Revert fixed compilation errors

Revert "ASoC-fsl_ssi: fixed compilation errors"

This reverts commit 918a3a34707202cdf2c36286dfe2546ebbc29aa0.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-21604 rpmsg: imx: fix the multi-core pingpong mess issue
Richard Zhu [Mon, 29 Apr 2019 07:48:24 +0000 (15:48 +0800)]
MLK-21604 rpmsg: imx: fix the multi-core pingpong mess issue

Do not use one global variable.
Pingpong maybe excuted on multiple rpmsg channels.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21509-4 drm/imx: dpu: crc: Add user-configurable CRC region(ROI) support
Liu Ying [Sat, 13 Apr 2019 07:59:39 +0000 (15:59 +0800)]
MLK-21509-4 drm/imx: dpu: crc: Add user-configurable CRC region(ROI) support

This patch adds user-configurable CRC region support.
The users may choose a region of interest(ROI) as the CRC source
(i.e., the CRC evaluation window) via the debugfs control node.
The ROI cannot exceed the display region as indicated by
drm_crtc_state->adjusted_mode.  The users may write a string in
the fashion of "roi:x1,y1,x2,y2" to the node to specify the ROI
within the display region.  The inclusive position at (x1, y1)
indicates the upper left of the region, while the exclusive
position at (x2, y2) indicates the lower right of the region.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21509-3 drm/imx: dpu: kms: Add auto control mode debugfs CRC support
Liu Ying [Thu, 11 Apr 2019 11:45:11 +0000 (19:45 +0800)]
MLK-21509-3 drm/imx: dpu: kms: Add auto control mode debugfs CRC support

This patch adds auto control mode debugfs CRC support based on
DPU Signature units.  The evaluation window is the same to the
display region as indicated by drm_crtc_state->adjusted_mode.
The CRC data count is three when single DPU display stream is used,
while six when the pixel combiner(dual DPU display streams) is used.
Each data shows the CRC value for the 8 most significant bits of
red/green/blue channel of the entire evaluation window, which reflects
how DPU Signature unit reports CRC values.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21509-2 gpu: imx: dpu: disengcfg: Add signature select support
Liu Ying [Fri, 12 Apr 2019 07:31:28 +0000 (15:31 +0800)]
MLK-21509-2 gpu: imx: dpu: disengcfg: Add signature select support

This patch adds helper disengcfg_sig_select() support so that
users may select different taps(FrameGen, GammaCor, Matrix or
Dither) to do signature computation.  Also, select FrameGen as
the default tap in _dpu_dec_init() and call it in dpu_dec_init().

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21509-1 gpu: imx: dpu: common: Add signature unit support
Liu Ying [Mon, 8 Apr 2019 08:11:53 +0000 (16:11 +0800)]
MLK-21509-1 gpu: imx: dpu: common: Add signature unit support

This patch adds signature unit support in the dpu common driver.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21599 ARM64: Kconfig:FORCE_MAX_ZONEORDER default 14 if imx8
Jason Liu [Mon, 29 Apr 2019 06:05:44 +0000 (14:05 +0800)]
MLK-21599 ARM64: Kconfig:FORCE_MAX_ZONEORDER default 14 if imx8

This patch change MAX_ZONEORDER default to 14 on i.MX8 platforms
due to GPU/DISPLAY large continuous physical memory requires it

This also aligned with previous imx releases on imx6/7/8

Signed-off-by: Jason Liu <jason.hui.liu@nxp.com>
6 years agoMLK-15041: PXP-V3: enable stroe engine block mode and fill function
Guoniu.Zhou [Mon, 5 Jun 2017 02:05:20 +0000 (10:05 +0800)]
MLK-15041: PXP-V3: enable stroe engine block mode and fill function

1. When pxp do rotation, fetch and store engine need block mode.
2. When use pxp store engine fill function, not only need config
store engine, but also need config fetch engine, otherwise, it
will not work.

Signed-off-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
(cherry picked from commit 9424d5834a7a3466ad574896a187ab1b82c9c35f)

6 years agoMLK-21583 ARM: dts: imx7d-sdb: remove the property "wakeup-source"
Fugang Duan [Fri, 26 Apr 2019 09:30:58 +0000 (17:30 +0800)]
MLK-21583 ARM: dts: imx7d-sdb: remove the property "wakeup-source"

Current brcmfmac driver use oob-irq as wakeup source,
if oob-irq is enabled in dts file, then driver enable
the wowlan feature as system wakeup source.
Currently, sdio in-band wakeup feature is not supported,
so remove the property "wakeup-source".

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21582 ARM: dts: imx6: enable Murata 1MW M.2 card for imx6 legacy platforms
Fugang Duan [Thu, 28 Feb 2019 07:58:28 +0000 (15:58 +0800)]
MLK-21582 ARM: dts: imx6: enable Murata 1MW M.2 card for imx6 legacy platforms

Enable Murata 1MW M.2 card for i.MX6 legacy platforms. Plug in
Murata 1MW M.2 into SD slot by using Murata uSD-to-M.2 Adapter.

Below i.MX6 legacy platforms will be supported:
- i.MX6Q/QP/DL SDB, SD2 slot
- i.MX6SX SDB, SD2 slot
- i.MX6SLL EVK, SD3 slot
- i.MX6UL/ULL/ULZ EVK, SD1 slot

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21580 brcmfmac: add BRCMF_FEAT_WOWL check when set wowlan parameters
Fugang Duan [Thu, 25 Apr 2019 05:42:37 +0000 (13:42 +0800)]
MLK-21580 brcmfmac: add BRCMF_FEAT_WOWL check when set wowlan parameters

Only set wowlan parameters when the interface's BRCMF_FEAT_WOWL
flag is set.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21579 brcmfmac: bcmsdh: move the func->num check early in .brcmf_ops_sdio_suspend()
Fugang Duan [Wed, 24 Apr 2019 08:22:03 +0000 (16:22 +0800)]
MLK-21579 brcmfmac: bcmsdh: move the func->num check early in .brcmf_ops_sdio_suspend()

Move the func->num check early in .brcmf_ops_sdio_suspend() to
save suspend time.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21590 epdc: fix potential out of array boundary access
Robby Cai [Sun, 28 Apr 2019 08:28:47 +0000 (16:28 +0800)]
MLK-21590 epdc: fix potential out of array boundary access

The function mxc_epdc_fb_init_hw() could be called more than once when load
the firmware due to some reason. If this case happens, then for following codes,
the array fb_data->fw_str pointed to will be accessed out of bound. It probably
causes kernel crash, or makes fb_data->fw_str get a wrong value, then the driver
may be stuck during the process of loading the firmware.

        if (fb_data->cur_mode) {
                strcat(fb_data->fw_str, "imx/epdc/epdc_");
                strcat(fb_data->fw_str, fb_data->cur_mode->vmode->name);
                strcat(fb_data->fw_str, ".fw");
        }

This patch fixed that by using strcpy instread.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-20223 video: epdc: Increase the time available for LUT cleanup
Bogdan Chircu [Tue, 27 Nov 2018 21:13:19 +0000 (13:13 -0800)]
MLK-20223 video: epdc: Increase the time available for LUT cleanup

The problem is that the kthread from submit workqueue aquires the queue_mutex
and blocks the kthread from interrupt workqueue. But the kthread from interrupt
workqueue is the one that should update the used_luts variable (on which the
kthread from submit workqueue keeps polling), but it doesn't have a chance to
do it (because it is blocked by mutex), even if the LUT complete interrupts are
triggered. So the fix is, after the polling to release the mutex so that the
kthread from interrupt workqueue can process the LUT complete interrupts and
update the used_luts variable accordingly.

Signed-off-by: Bogdan Chircu <bogdan-petru.chircu-mare@nxp.com>
Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit bcaea8983ca3864bc5df5dc90b49ffe2d0fadf29)

6 years agoMLK-20231-2 video: epdc: restore QoS setting after resume
Robby Cai [Wed, 26 Dec 2018 13:55:46 +0000 (21:55 +0800)]
MLK-20231-2 video: epdc: restore QoS setting after resume

After suspend, the qos setting is lost. This patch restores it after resume.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 92a7e53664802a729b647516d9e578fa5897aa63)

6 years agoMLK-20231-1 ARM: dts: imx7d-sdb: add qos node
Robby Cai [Wed, 26 Dec 2018 13:53:34 +0000 (21:53 +0800)]
MLK-20231-1 ARM: dts: imx7d-sdb: add qos node

Add QoS node, which is needed to be set for EPDC.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit fa685e574276be9765e730f522ea99887133cc42)

6 years agoMLK-21574: VPU: implement crop through SELECTION api
ming_qian [Fri, 26 Apr 2019 08:54:38 +0000 (16:54 +0800)]
MLK-21574: VPU: implement crop through SELECTION api

implement g_selection and s_selection
g_crop will call g_selection and
s_crop will call s_selection

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21585 Revert patch to re-add support for capturemode in s_parm
Robby Cai [Fri, 26 Apr 2019 09:03:33 +0000 (17:03 +0800)]
MLK-21585 Revert patch to re-add support for capturemode in s_parm

This reverts commit 8a7c5594c02022ca5fa7fb603e11b3e1feb76ed5.

capturemode is needed for legacy support, added it back.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoTEE-349 RPC Busfreq High
Cedric Neveux [Mon, 17 Dec 2018 10:33:10 +0000 (11:33 +0100)]
TEE-349 RPC Busfreq High

   Call request/release busfreq HIGH each time a SMC
   is called.
   This ensure that OPTEE is running in HIGH frequency mode
   until no more SMC running

Signed-off-by: Cedric Neveux <cedric.neveux@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 41604a3382306b78f1038524a1018647f3cf3f52)

6 years agoRevert "tee: add kernel internal client interface **not for mainline**"
Silvano di Ninno [Fri, 26 Apr 2019 07:21:06 +0000 (09:21 +0200)]
Revert "tee: add kernel internal client interface **not for mainline**"

This reverts commit 7da862fdfe2cff02361098e2dbabc93c4e92b8a1.

6 years agoRevert "tee: new ioctl to a register tee_shm from a dmabuf file descriptor"
Silvano di Ninno [Fri, 26 Apr 2019 07:20:52 +0000 (09:20 +0200)]
Revert "tee: new ioctl to a register tee_shm from a dmabuf file descriptor"

This reverts commit cf2ea7c7b563842ce6dfa3fc8c8fafdbdc5ef7c8.

6 years agoMLK-21553 drm/bridge: it6263: Do hotplug detect quickly in unforced case
Liu Ying [Thu, 25 Apr 2019 07:18:03 +0000 (15:18 +0800)]
MLK-21553 drm/bridge: it6263: Do hotplug detect quickly in unforced case

We should avoid expensive, destructive operations during automated hotplug
probing, otherwise, it could cause flickering on other running displays.
So, let's check the parameter 'force' of ->detect() and do the appropriate
detection accordingly.

Reported-by: Luo Danwei <danwei.luo@nxp.com>
Tested-by: Luo Danwei <danwei.luo@nxp.com>
Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21484-4: ASoC: fsl_sai: ensure clk not in use prior set_mclk_rate
Viorel Suman [Thu, 25 Apr 2019 12:03:56 +0000 (15:03 +0300)]
MLK-21484-4: ASoC: fsl_sai: ensure clk not in use prior set_mclk_rate

On recent kernels clks which are marked with CLK_SET_RATE_GATE are
"protected" against further changes at clk_prepare time, including clk
set_parent and set_rate. See commit 9461f7b33d11 ("clk: fix
CLK_SET_RATE_GATE with clock rate protection"). The current fsl_sai
implementation ensures the clock is not in use prior set_parent,
extend this for set_rate also by moving if (sai->mclk_streams == 0)
outside fsl_sai_set_mclk_rate(). Aside of this avoid changing rate and
parent for BUS clk.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
6 years agoRevert "MLK-21484-3: ASoC: fsl_sai: ensure clk is unprepared before reparent"
Viorel Suman [Wed, 24 Apr 2019 11:03:02 +0000 (14:03 +0300)]
Revert "MLK-21484-3: ASoC: fsl_sai: ensure clk is unprepared before reparent"

SAI interface is able to hande both TX and RX simultaneously.
In case a rate change is required by a RX stream started while TX
is running - stopping and starting root clock will introduce a pop noise.

This reverts commit e146b5f34492cd046187b92eb4ae37f238557eb9.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
6 years agoMLK-20898: mxc-jpeg: Jpeg encoder stuck after a number of frames
Mirela Rabulea [Tue, 23 Apr 2019 16:29:48 +0000 (19:29 +0300)]
MLK-20898: mxc-jpeg: Jpeg encoder stuck after a number of frames

Split mxc_jpeg_go_enc in two: mxc_jpeg_enc_mode_conf and
mxc_jpeg_enc_mode_go. This allows to separate the setting of
CONFIG & GO bits in the CAST IP MODE register, thus it's more
clear when the encoder will enter config state, and when
it will enter encode state. The mxc_jpeg_enc_mode_conf is
called at the beginning of the frame processing, while
mxc_jpeg_enc_mode_go is called after configuration phase
is finished for the respective frame (FRMDONE interrupt
received for it). All of this, to avoid unexpected CAST IP
internal state machine evolution for multiple frames, when
both CONFIG & GO are set, even if their corresponding
auto-clear bits are set.

Rename mxc_jpeg_go_dec to mxc_jpeg_dec_mode_go for consistency.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Laurentiu Palcu <laurentiu.palcu@nxp.com>
6 years agoMLK-21552-2: VPU Decoder: fix timestamp way be incorrect after abort
ming_qian [Thu, 25 Apr 2019 07:51:10 +0000 (15:51 +0800)]
MLK-21552-2: VPU Decoder: fix timestamp way be incorrect after abort

set tsm_sync_flag to true when start decode

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21552: VPU Decoder: fix timestamp way be incorrect after abort
ming_qian [Thu, 25 Apr 2019 07:10:39 +0000 (15:10 +0800)]
MLK-21552: VPU Decoder: fix timestamp way be incorrect after abort

when abort done is received,
the tsm_sync_flag should be set to true.
but the receive ts may be in another thread.
If there is no any lock to pretect,
some input timestamp may be received before do resync.
and after do resync, the timestamp may be incorrect.

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years ago[i.MX845/VPU]:MLK-21235-2: multi instance encode process fail to resume encoding...
Zhou Peng [Thu, 25 Apr 2019 03:45:02 +0000 (11:45 +0800)]
[i.MX845/VPU]:MLK-21235-2: multi instance encode process fail to resume encoding during suspend..

Modify 32bits ioctl function
Check return value for both WaitEncReady() and EncRefreshRegs()

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 7cdc939c6d6df8b24dd3727de680c633562a213c)

6 years agoMLK-21523-2: VPU Decoder: add timestamp threshold
ming_qian [Thu, 25 Apr 2019 02:17:01 +0000 (10:17 +0800)]
MLK-21523-2: VPU Decoder: add timestamp threshold

the timestamp of output stream may be not monotone increasing
there are may be reoder.
driver should use the max timestamp that received
to calculate the timestamp delta.

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21514: mtd: spi-nor: add prep/unprep for spi_nor_resume()
Han Xu [Wed, 24 Apr 2019 20:30:14 +0000 (15:30 -0500)]
MLK-21514: mtd: spi-nor: add prep/unprep for spi_nor_resume()

prep/unprep functions were not added in new spi_nor_resume function.

Signed-off-by: Han Xu <han.xu@nxp.com>
6 years agoMLK-21543 media: mxc v4l2 capture: Fix v4l2_buffer offset = 0 via QUERYBUF
Robby Cai [Wed, 24 Apr 2019 07:09:53 +0000 (15:09 +0800)]
MLK-21543 media: mxc v4l2 capture: Fix v4l2_buffer offset = 0 via QUERYBUF

The commit 04f4e9e44fd4d2f2379e46e48f26101acb88dfdc fixed compilation warning
for memset, which just reveals the bug: in VIDIOC_QUERYBUF code section,
it judges buf->memory against V4L2_MEMORY_MMAP twice, but buf->memory is just
reset to 0 by memset after first judgement thus the second one comes wrong.
Consequently, it will provide an offset of 0 to usespace, obviously it's wrong.

This patch fixed it.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-21087-7:[i.MX8QXP/VPU]: Integrate timestamp manager into driver
ming_qian [Wed, 24 Apr 2019 07:38:17 +0000 (15:38 +0800)]
MLK-21087-7:[i.MX8QXP/VPU]: Integrate timestamp manager into driver

when flag V4L2_NXP_BUF_FLAG_TIMESTAMP_INVALID is set,
don't skip the timestamp,
it may cause the consumed length incorrect
send TSM_TIMESTAMP_NONE to tsm in this case

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21523: VPU Decoder: add timestamp threshold
ming_qian [Wed, 24 Apr 2019 05:51:39 +0000 (13:51 +0800)]
MLK-21523: VPU Decoder: add timestamp threshold

add timestamp threshold
add bitstream low threshold
add bitstream high threshold
use the timestamp threshold or bitstream high threshold
to control the speed of input.
To avoid hang, you can set bitstream low threshold to a proper value.
When fifo low event is received, driver will copy data to stream buffer.

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21525 drm/imx: dpu: kms: Disallow primary plane on-the-fly disablement
Liu Ying [Tue, 23 Apr 2019 11:25:24 +0000 (19:25 +0800)]
MLK-21525 drm/imx: dpu: kms: Disallow primary plane on-the-fly disablement

The below commit introduced in v4.16 reveals the fact that the DPU KMS
driver doesn't support primary plane on-the-fly disablement.  This may
cause display issue when we restart weston with 4kp60 display for i.MX8QM.
To support this, we need considerable driver change, but doesn't make
too much sense, because disabling primary plane on an active CRTC doesn't
often happen for real graphics update.  In order not to run into this problem,
we can explicitly disallow this use case in ->atomic_check().  This rejection
makes us fall back to disable CRTC when removing the primary plane's
framebuffer according to the below commit's rationale, which is the original
behavior of atomic_remove_fb().

commit 846c7dfc1193 ("drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2.")

Signed-off-by: Liu Ying <victor.liu@nxp.com>
6 years agoMLK-21524: VPU Decoder: tsm ignore invalid timestamp in some case
ming_qian [Tue, 23 Apr 2019 09:24:36 +0000 (17:24 +0800)]
MLK-21524: VPU Decoder: tsm ignore invalid timestamp in some case

If one frame is split into several buffers.
The timestamp of the first buffer is valid, others are invalid.
TSManagerGetLastTimeStamp() will try to get the last timestamp of frame.
it may get a invalid timestamp. and this will output some wrong timestamp.
so ignore these invalid timestamp

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21522: VPU Decoder: fix the api of tsm is not thread safe
ming_qian [Tue, 23 Apr 2019 07:42:07 +0000 (15:42 +0800)]
MLK-21522: VPU Decoder: fix the api of tsm is not thread safe

the api of tsm is not thread safe.
but in driver context, it's multithread.
add a lock to protect the api

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years ago[i.MX845/VPU]:MLK-21235: multi instance encode process fail to resume encoding during...
Zhou Peng [Tue, 23 Apr 2019 05:32:35 +0000 (13:32 +0800)]
[i.MX845/VPU]:MLK-21235: multi instance encode process fail to resume encoding during suspend resume test.100%

Add mirror registers to store HW registers before power off
Replace 'wait_event_interruptible' with 'wait_event_timeout' to avoid interrupted

Signed-off-by: Zhou Peng <eagle.zhou@nxp.com>
(cherry picked from commit 789a419a5d4c0fed3eb0cbe83999bf8a65a980b4)

6 years agoMLK-21521 VPU Decoder: add new v4l2_s_contrl for contrl decode frame disable reorder
Shijie Qin [Tue, 23 Apr 2019 07:21:14 +0000 (15:21 +0800)]
MLK-21521 VPU Decoder: add new v4l2_s_contrl for contrl decode frame disable reorder

    #define V4L2_CID_USER_FRAME_DIS_REORDER (V4L2_CID_USER_BASE + 0x1300)

    cfg.ops = &vpu_custom_ctrl_ops;
    cfg.id = V4L2_CID_USER_FRAME_DIS_REORDER;
    cfg.name = "frame disable reoder ctrl";
    cfg.min = 0;
    cfg.max = 1;
    cfg.step = 1;
    cfg.def = 0;
    cfg.type = V4L2_CTRL_TYPE_BOOLEAN;

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
6 years agoMLK-21520-3 spi: lpspi: remove fsl_lpspi->chipselect
Clark Wang [Tue, 23 Apr 2019 07:43:29 +0000 (15:43 +0800)]
MLK-21520-3 spi: lpspi: remove fsl_lpspi->chipselect

Replace fsl_lpspi->chipselect by controller->cs_gpios. Clean up the
code.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21520-2 spi: lpspi: add multi SS support in PIO mode
Clark Wang [Tue, 23 Apr 2019 07:16:35 +0000 (15:16 +0800)]
MLK-21520-2 spi: lpspi: add multi SS support in PIO mode

Add "fsl,spi-num-chipselects" check to support multi SS function in PIO
mode.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21520-1 spi: lpspi: add NULL check when probe device
Clark Wang [Tue, 23 Apr 2019 07:11:58 +0000 (15:11 +0800)]
MLK-21520-1 spi: lpspi: add NULL check when probe device

Add a NULL check for device node and lpspi_platform_info when lpspi
device probe.

Signed-off-by: Clark Wang <xiaoning.wang@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21503 rpmsg: imx: refine imx rpmsg codes
Richard Zhu [Fri, 19 Apr 2019 09:01:50 +0000 (17:01 +0800)]
MLK-21503 rpmsg: imx: refine imx rpmsg codes

No functions changes.
- Use the dynamic allocation, and remove the pre-defined static
  structure.
- Remove the vdev layer notify block codes.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-21247 rpmsg: imx: do not check the remote ready flag in suspend mode
Richard Zhu [Mon, 25 Mar 2019 09:22:00 +0000 (17:22 +0800)]
MLK-21247 rpmsg: imx: do not check the remote ready flag in suspend mode

Since, the partition reset irq would be triggered anytime.
Do not read the status of the MU if master side is in suspend mode.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
(cherry picked from commit 117dbcb1ce258587f8d162c0b3219f32d6de6fbc)

6 years agoMLK-21244 rpmsg: imx: move pm ops to noirq phrase
Anson Huang [Sat, 23 Mar 2019 03:56:47 +0000 (11:56 +0800)]
MLK-21244 rpmsg: imx: move pm ops to noirq phrase

Some rpmsg user may require rpmsg resume before the user start
handle its irq, e.g the typec controller use a GPIO as irq and
use rpmsg to get event status, so move imx rpmsg power management
ops to noirq phrase.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Tested-by: Clark Wang <xiaoning.wang@nxp.com>
Signed-off-by: Anson Huang <anson.huang@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
6 years agoMLK-21087-6:[i.MX8QXP/VPU]: Integrate timestamp manager into driver
ming_qian [Mon, 22 Apr 2019 09:28:29 +0000 (17:28 +0800)]
MLK-21087-6:[i.MX8QXP/VPU]: Integrate timestamp manager into driver

Some frames are not for display,
so the timestamp of these frames should be skipped.

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21458: mxc-jpeg: Implement V4L2_ENC_CMD_STOP
Mirela Rabulea [Thu, 18 Apr 2019 17:02:24 +0000 (20:02 +0300)]
MLK-21458: mxc-jpeg: Implement V4L2_ENC_CMD_STOP

Implementation is similar with V4L2_DEC_CMD_STOP, but cannot unify them,
due to different structures.
Also added the other V4L2_*_CMD_* commands to the switch,
but as "not implemented" for now.

Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
6 years agoMLK-21507 VPU Decoder: kernel panic if seek when video playing
Shijie Qin [Sat, 20 Apr 2019 07:17:57 +0000 (15:17 +0800)]
MLK-21507 VPU Decoder: kernel panic if seek when video playing

    The same buffer prepend to the list twice at
    'VID_API_EVENT_REL_FRAME_BUFF'event and vpu_buf_queue()
    cause list form a dead cycle.
    Add an verification before prepend to list at vpu_buf_queue().

Unable to handle kernel paging request at virtual address dead000000000100
[<ffff000008bce7f4>] wait_right_buffer+0x60/0xac
[<ffff000008bd28f0>] vpu_api_event_handler+0xc64/0x1990
[<ffff000008bd3704>] vpu_msg_instance_work+0xe8/0x12c
[<ffff0000080f8518>] process_one_work+0x140/0x3f8
[<ffff0000080f8908>] worker_thread+0x138/0x3e4
[<ffff0000080fed70>] kthread+0x104/0x130
[<ffff000008085064>] ret_from_fork+0x10/0x18

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
6 years agoMLK-21437-2 VPU Decoder: add new v4l2_s_ctrl for adjust vpu_frm_depth
Shijie Qin [Thu, 18 Apr 2019 06:29:49 +0000 (14:29 +0800)]
MLK-21437-2 VPU Decoder: add new v4l2_s_ctrl for adjust vpu_frm_depth
    the default value should be vpu_frm_depth when init

Signed-off-by: Shijie Qin <shijie.qin@nxp.com>
6 years agoMLK-21087-5:[i.MX8QXP/VPU]: Integrate timestamp manager into driver
ming_qian [Fri, 19 Apr 2019 05:31:52 +0000 (13:31 +0800)]
MLK-21087-5:[i.MX8QXP/VPU]: Integrate timestamp manager into driver

For some format, scode is need to insert before or after frame data.
It may cause that the input frame length is not match with
the consumed frame length.

The scode can be calculated as part of input frame.

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21087-4:[i.MX8QXP/VPU]: Integrate timestamp manager into driver
ming_qian [Thu, 18 Apr 2019 09:00:54 +0000 (17:00 +0800)]
MLK-21087-4:[i.MX8QXP/VPU]: Integrate timestamp manager into driver

set tsm_use_consumed_length default to 1

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21442: VPU Decoder: could not handle timestamp with start offset
ming_qian [Thu, 18 Apr 2019 06:38:43 +0000 (14:38 +0800)]
MLK-21442: VPU Decoder: could not handle timestamp with start offset

add some nxp buf flags: CODECCONFIG and TIMESTAMP_INVALID
if TIMESTAMP_INVALID is enabled, drop the timestamp.

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21087-3:[i.MX8QXP/VPU]: Integrate timestamp manager into driver
ming_qian [Thu, 18 Apr 2019 02:16:20 +0000 (10:16 +0800)]
MLK-21087-3:[i.MX8QXP/VPU]: Integrate timestamp manager into driver

Lower the level of the log indicating invalid frame rate

Signed-off-by: ming_qian <ming.qian@nxp.com>
6 years agoMLK-21484-3: ASoC: fsl_sai: ensure clk is unprepared before reparent
Viorel Suman [Thu, 18 Apr 2019 12:28:04 +0000 (15:28 +0300)]
MLK-21484-3: ASoC: fsl_sai: ensure clk is unprepared before reparent

On recent kernels clks which are marked with CLK_SET_RATE_GATE are
"protected" against further changes at clk_prepare time, including clk
reparent. Wrap clk set_parent and set_rate operations with
disable_unprepare and prepare_enable.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
6 years agoMLK-21484-2: ASoC: fsl_spdif: ensure clk is unprepared before reparent
Viorel Suman [Thu, 18 Apr 2019 12:25:44 +0000 (15:25 +0300)]
MLK-21484-2: ASoC: fsl_spdif: ensure clk is unprepared before reparent

On recent kernels clks which are marked with CLK_SET_RATE_GATE are
"protected" against further changes at clk_prepare time, including clk
reparent. Wrap clk set_parent and set_rate operations with
disable_unprepare and prepare_enable.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
6 years agoMLK-21484-1: ASoC: fsl_micfil: unprepare the clk before reparent
Viorel Suman [Thu, 18 Apr 2019 12:14:17 +0000 (15:14 +0300)]
MLK-21484-1: ASoC: fsl_micfil: unprepare the clk before reparent

On recent kernels clks which are marked with CLK_SET_RATE_GATE are
"protected" against further changes at clk_prepare time, including clk
reparent. Fix this by moving clk_disable_unprepare before clk_set_parent.

Signed-off-by: Viorel Suman <viorel.suman@nxp.com>
6 years agoMLK-21506-2: mtd: nand: raw: gpmi-nand: use runtime pm not en/disable clock
Han Xu [Fri, 19 Apr 2019 20:00:56 +0000 (15:00 -0500)]
MLK-21506-2: mtd: nand: raw: gpmi-nand: use runtime pm not en/disable clock

use the run-time pm rather than en/disable clock in chip select function.

Signed-off-by: Han Xu <han.xu@nxp.com>
6 years agoMLK-21506-1: mtd: nand: raw: gpmi-nand: enable the macros for MX8
Han Xu [Fri, 19 Apr 2019 14:51:06 +0000 (09:51 -0500)]
MLK-21506-1: mtd: nand: raw: gpmi-nand: enable the macros for MX8

enable the macros for mx8 platforms

Signed-off-by: Han Xu <han.xu@nxp.com>
6 years agoMLK-20917-2: mtd: flexspi: Improve the i.MX8MM fspi performance
Han Xu [Fri, 19 Apr 2019 18:39:55 +0000 (13:39 -0500)]
MLK-20917-2: mtd: flexspi: Improve the i.MX8MM fspi performance

- Implemented the SFDP lut to get the correct chip information
- Changed the default read mode from normal read to Quad DDR
- Enabled the AHB prefetch after chip probed
- Limited the highest clock rate for iMX8MM

Signed-off-by: Han Xu <han.xu@nxp.com>
6 years agoMLK-18396-2: mtd: fsl-flexspi: enable FSPI on i.MX8MM
Han Xu [Fri, 19 Apr 2019 16:53:24 +0000 (11:53 -0500)]
MLK-18396-2: mtd: fsl-flexspi: enable FSPI on i.MX8MM

Enable FlexSPI driver on i.MX8MM EVK.

Signed-off-by: Han Xu <han.xu@nxp.com>
6 years agoMLK-21496 usb: typec: tcpm: remove qos request when unregister port
Peter Chen [Fri, 19 Apr 2019 08:34:37 +0000 (16:34 +0800)]
MLK-21496 usb: typec: tcpm: remove qos request when unregister port

As the counter part of pm_qos_add_request(), we should do
pm_qos_remove_request() and release high bus when unregister tcpm
port, otherwise we will have below crash if tcpm register again.

[    4.229417] tcpm_register_port(5021): trace
[    4.233631] pm_qos_update_target(280): c=ffff000009685998
node=ffff80083a084fb0
[    4.240960] pm_qos_update_target(301): trace
[    4.245228] pm_qos_update_target(303): trace
[    4.249512] Unable to handle kernel NULL pointer dereference at
virtual address 0000000000000000
[    4.258302] Mem abort info:
[    4.261089]   ESR = 0x96000044
[    4.264142]   Exception class = DABT (current EL), IL = 32 bits
[    4.270063]   SET = 0, FnV = 0
[    4.273115]   EA = 0, S1PTW = 0
[    4.276258] Data abort info:
[    4.279135]   ISV = 0, ISS = 0x00000044
[    4.282973]   CM = 0, WnR = 1
[    4.285938] [0000000000000000] user address but active_mm is swapper
[    4.292300] Internal error: Oops: 96000044 [#1] PREEMPT SMP
[    4.297876] Modules linked in:
[    4.300934] Process kworker/0:2 (pid: 860, stack limit =
0x(____ptrval____))
[    4.307992] CPU: 0 PID: 860 Comm: kworker/0:2 Not tainted
4.19.35-04375-gedbbcdc07bf1-dirty #3
[    4.316604] Hardware name: Freescale i.MX8QXP MEK (DT)
[    4.321761] Workqueue: events deferred_probe_work_func
[    4.326901] pstate: 80000085 (Nzcv daIf -PAN -UAO)
[    4.331700] pc : plist_add+0x98/0xd8
[    4.335279] lr : pm_qos_update_target+0x310/0x330
[    4.339982] sp : ffff00000d603a00
[    4.343290] x29: ffff00000d603a00 x28: 0000000000000000
[    4.348607] x27: ffff00000936b538 x26: 0000000000000000
[    4.353924] x25: ffff000008f425b0 x24: 0000000000000000
[    4.359241] x23: ffff0000098d0000 x22: 0000000000000000
[    4.364557] x21: 000000003af84fa8 x20: ffff80083a084fb0
[    4.369874] x19: ffff000009685998 x18: ffffffffffffffff
[    4.375191] x17: 0000000000000000 x16: 0000000000000000
[    4.380508] x15: ffff0000096686c8 x14: ffff0000898d0fef
[    4.385824] x13: ffff0000098d0ffd x12: ffff000009685000
[    4.391141] x11: 0000000005f5e0ff x10: ffff000009668940
[    4.396458] x9 : ffff000008681658 x8 : ffff80083a084fb8
[    4.401775] x7 : ffff80083a084fc8 x6 : ffff80083af84fc8
[    4.407091] x5 : 0000000000000000 x4 : 0000000000000000
[    4.412408] x3 : ffff80083af84fb0 x2 : 0000000000000000
[    4.417725] x1 : ffff80083af84fb8 x0 : ffff80083a084fb0
[    4.423044] Call trace:
[    4.425497]  plist_add+0x98/0xd8
[    4.428728]  pm_qos_add_request+0x88/0x170
[    4.432831]  tcpm_register_port+0x5ec/0x898
[    4.437017]  tcpci_register_port+0x154/0x1e0
[    4.441291]  tcpci_probe+0xa8/0x218
[    4.444784]  i2c_device_probe+0x2e4/0x2f8
[    4.448796]  really_probe+0x248/0x3b8
[    4.452461]  driver_probe_device+0x12c/0x148
[    4.456735]  __device_attach_driver+0xac/0x160
[    4.461184]  bus_for_each_drv+0x68/0xd0
[    4.465022]  __device_attach+0xd8/0x160
[    4.468864]  device_initial_probe+0x10/0x18
[    4.473049]  bus_probe_device+0x94/0xa0
[    4.476890]  deferred_probe_work_func+0x84/0xd8
[    4.481427]  process_one_work+0x1ec/0x460
[    4.485438]  worker_thread+0x224/0x448
[    4.489194]  kthread+0x12c/0x130
[    4.492427]  ret_from_fork+0x10/0x18
[    4.496006] Code: f9400822 91002021 f9000428 a9008801 (f9000048)
[    4.502103] ---[ end trace 910526b6d64dab64 ]---
[    4.506754] note: kworker/0:2[860] exited with preempt_count 1

Reported-by: Leonard Crestez <leonard.crestez@nxp.com>
Suggested-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
6 years agoMLK-21504 arm: dts: imx6qdl: fix mipi csi compatible string typo
Robby Cai [Fri, 19 Apr 2019 09:26:01 +0000 (17:26 +0800)]
MLK-21504 arm: dts: imx6qdl: fix mipi csi compatible string typo

should be "fsl,imx6q-mipi-csi2" rather than "fsl,imx6-mipi-csi2"

Signed-off-by: Robby Cai <robby.cai@nxp.com>
Reviewed-by: Guoniu.Zhou <guoniu.zhou@nxp.com>
6 years agoMLK-21501 ARM: dts: imx7d-sdb: remove cd-post property to enable wlan
Fugang Duan [Fri, 19 Apr 2019 09:02:57 +0000 (17:02 +0800)]
MLK-21501 ARM: dts: imx7d-sdb: remove cd-post property to enable wlan

brcmfmac driver designe doesn't support the "cd-post", so remove
it to support cyw4339, and here also remove the dummy property
"wifi-host" for brcmfmac.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21502 brcmfmac: fix the load issue for bcm4339
Fugang Duan [Fri, 19 Apr 2019 08:56:08 +0000 (16:56 +0800)]
MLK-21502 brcmfmac: fix the load issue for bcm4339

Current brcmfmac driver cannot load cyw4339 module and always report
bus timeout as below log.

brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2
brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2
brcmfmac: brcmf_c_process_clm_blob: no clm_blob available (err=-11), device may have limited channels available
brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
brcmfmac: brcmf_bus_started: failed: -110
brcmfmac: brcmf_attach: dongle is not responding: err=-110
brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
brcmfmac: brcmf_bus_started: failed: -110
brcmfmac: brcmf_attach: dongle is not responding: err=-110
brcmfmac: brcmf_sdio_firmware_callback: brcmf_attach failed
brcmfmac: brcmf_sdio_bus_rxctl: resumed on timeout
brcmfmac: brcmf_c_preinit_dcmds: Retreiving version information failed, -110
brcmfmac: brcmf_bus_started: failed: -110
Unable to handle kernel NULL pointer dereference at virtual address 00000004
pgd = 50d469b0
[00000004] *pgd=00000000
Internal error: Oops: 817 [#1] PREEMPT SMP ARM
Modules linked in: mxc_vadc mxc_dcic mx6s_capture ov5640_camera_v2 brcmfmac brcmutil
CPU: 0 PID: 91 Comm: kworker/0:3 Not tainted 4.19.35-04384-g50ca4a9 #1147
Hardware name: Freescale i.MX6 SoloX (Device Tree)
Workqueue: events request_firmware_work_func
PC is at brcmf_attach+0x234/0x3d8 [brcmfmac]
LR is at __slab_free+0x1a4/0x308
pc : [<7f022500>]    lr : [<8020d7a8>]    psr: 20010013
sp : a8679e78  ip : a8679de8  fp : 00000000
r10: 00000000  r9 : a8ef0c00  r8 : a9ffa1a0
r7 : a868b808  r6 : a9ff8460  r5 : ffffff92  r4 : a9ff81a0
r3 : 00000000  r2 : 588fd8f8  r1 : 00000000  r0 : 00000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
Control: 10c53c7d  Table: a901c04a  DAC: 00000051
Process kworker/0:3 (pid: 91, stack limit = 0xbe6d797a)
Stack: (0xa8679e78 to 0xa867a000)
9e60:                                                       7f03540c 00000000
9e80: a97cecc0 00000008 00000001 a8ecf800 81004d08 a8ecfc00 a868b808 7f0328b8
9ea0: 00000002 00000008 00000001 7f02adfc 00000840 00010000 00000840 bc3ef180
9ec0: a92abcc0 00000000 00000000 588fd8f8 ab731d80 a92ab454 a8398340 00000014
9ee0: 81004d08 00000000 a92ab440 a9461140 ab731d80 7f023620 a9eec980 588fd8f8
9f00: a9461480 81004d08 ab731d80 ab734f00 00000000 a9461484 00000000 8054c058
9f20: 00000000 00000003 a9461140 588fd8f8 ab731d80 a9461480 a865a280 80146690
9f40: 81003d00 ab731d98 a865a280 a865a294 ab731d80 81003d00 ab731d98 a8678000
9f60: 00000008 8014697c 00000000 a8643e00 a8643dc0 00000000 a865a280 80146950
9f80: a8643e1c a8075ebc 00000000 8014bfc8 a8643dc0 8014bea4 00000000 00000000
9fa0: 00000000 00000000 00000000 801010e8 00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000 00000000 00000000
[<7f022500>] (brcmf_attach [brcmfmac]) from [<7f02adfc>] (brcmf_sdio_firmware_callback+0x4c4/0x74c [brcmfmac])
[<7f02adfc>] (brcmf_sdio_firmware_callback [brcmfmac]) from [<7f023620>] (brcmf_fw_request_done+0x188/0x214 [brcmfmac])
[<7f023620>] (brcmf_fw_request_done [brcmfmac]) from [<8054c058>] (request_firmware_work_func+0x4c/0x88)
[<8054c058>] (request_firmware_work_func) from [<80146690>] (process_one_work+0x138/0x3f8)
[<80146690>] (process_one_work) from [<8014697c>] (worker_thread+0x2c/0x554)
[<8014697c>] (worker_thread) from [<8014bfc8>] (kthread+0x124/0x154)
[<8014bfc8>] (kthread) from [<801010e8>] (ret_from_fork+0x14/0x2c)
Exception stack(0xa8679fb0 to 0xa8679ff8)
9fa0:                                     00000000 00000000 00000000 00000000
9fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000
9fe0: 00000000 00000000 00000000 00000000 00000013 00000000
Code: e3530000 0a000011 e59432cc e3a00000 (e5839004)
---[ end trace 8b8e3996f6f715bf ]---

cyw4339 doesn't support ulp_sdioctrl iovar and ulp mode, the current logic make
sdio bus down/up, and trigger firmware load twice. So remove the ulp status
check for cyw4339.

Reviewed-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
6 years agoMLK-21495 can: flexcan: replace ARCH_MXC_ARM64 with HAVE_IMX_SC
Joakim Zhang [Thu, 18 Apr 2019 10:59:55 +0000 (18:59 +0800)]
MLK-21495 can: flexcan: replace ARCH_MXC_ARM64 with HAVE_IMX_SC

Upstream rejected ARCH_MXC_ARM64 in favor of defining ARCH_MXC for
arm64.

Update the CAN driver to check for CONFIG_HAVE_IMX_SC around
SCFW-dependent code.

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMLK-21494 can: flexcan: add branch for "fd-non-iso on"
Joakim Zhang [Thu, 18 Apr 2019 10:26:33 +0000 (18:26 +0800)]
MLK-21494 can: flexcan: add branch for "fd-non-iso on"

CAN driver will keep ISOFD state after setting "fd on" or "fd on
fd-non-iso off", you can't switch to NONISOFD mode, this patch intends
to add branch for "fd-non-iso on".

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
6 years agoMGS-4715 [#imx-1413] disable gpu probe options log
Xianzhong [Fri, 19 Apr 2019 16:40:11 +0000 (00:40 +0800)]
MGS-4715 [#imx-1413] disable gpu probe options log

do not show galcore parameters in default setting

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
6 years agoMGS-4716 [#imx-1412] redirect cma limit request with dma32
Xianzhong [Thu, 18 Apr 2019 15:38:43 +0000 (23:38 +0800)]
MGS-4716 [#imx-1412] redirect cma limit request with dma32

L4.19 kernel support CONFIG_ZONE_DMA32 feature, which is
better to allocate 4G memory than CMA limit feature.

Signed-off-by: Xianzhong <xianzhong.li@nxp.com>
6 years agoMLK-21489 drm/imx: dpu: kms: Return properly in case we fail to get plane state to...
Liu Ying [Thu, 18 Apr 2019 08:34:05 +0000 (16:34 +0800)]
MLK-21489 drm/imx: dpu: kms: Return properly in case we fail to get plane state to check

We should return properly in case we fail to get plane state to check.
For example, a race condition on the plane state would happen when one
thread does page flip and another thread updates CRTC properties on
that CRTC simultaneously.  '-EDEADLK' should be returned when the
condition occurs.

Signed-off-by: Liu Ying <victor.liu@nxp.com>
(cherry picked from commit 2ab36051b74c49f66bb12d8d8086e6e6b3dc069b)

6 years agoMLK-21380 video: fbdev: mxsfb: fix resume timing for overlay fb
Fancy Fang [Fri, 12 Apr 2019 07:42:50 +0000 (15:42 +0800)]
MLK-21380 video: fbdev: mxsfb: fix resume timing for overlay fb

The overlay fb can only be enabled when the LCDIF is not in
running, otherwise overlay display may look like image shift.
So during the system resume procedure, the overlay fb should
be resumed before mxsfb unblank.

Signed-off-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit f39662a3a38a2da082d55a006e634766cc85e347)

6 years agoMLK-21500 rpmsg: imx: CONFIG_ARCH_MXC_ARM64 should be replaced
Richard Zhu [Fri, 19 Apr 2019 06:12:55 +0000 (14:12 +0800)]
MLK-21500 rpmsg: imx: CONFIG_ARCH_MXC_ARM64 should be replaced

Since CONFIG_ARCH_MXC_ARM64 does not exist on imx_4.19.y, this should
be replaced by CONFIG_HAVE_IMX_SC.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
6 years agoMLK-18355-2: hdp: Resolve hdp sink/source HDMI CAR headfile conflict
Sandor Yu [Fri, 18 May 2018 07:15:27 +0000 (15:15 +0800)]
MLK-18355-2: hdp: Resolve hdp sink/source HDMI CAR headfile conflict

Add head file sink_car.h.
Rename HDMI CAR bit definition.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20209 hdmi rx: fixed unsigned compare against less than zero
Oliver Brown [Fri, 22 Mar 2019 18:44:37 +0000 (13:44 -0500)]
MLK-20209 hdmi rx: fixed unsigned compare against less than zero

Fixed CID 3411368, Unsigned compared against 0. Removed comparison with
no effect.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
6 years agoMLK-20451-3: hdmi rx: Add hdmi rx cec running status
Sandor Yu [Fri, 23 Nov 2018 07:01:08 +0000 (15:01 +0800)]
MLK-20451-3: hdmi rx: Add hdmi rx cec running status

Add hdmi rx cec running status.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20451-2: hdmi rx: Fix incorrect type of function return variable
Sandor Yu [Fri, 23 Nov 2018 06:40:16 +0000 (14:40 +0800)]
MLK-20451-2: hdmi rx: Fix incorrect type of function return variable

Fix incorrect function return variable type.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20451-1: hdmt rx: use dev_xxx instead of pr_xxx
Sandor Yu [Fri, 2 Nov 2018 08:03:55 +0000 (16:03 +0800)]
MLK-20451-1: hdmt rx: use dev_xxx instead of pr_xxx

Print hdmi rx video mode info.
use dev_xxx instead of pr_xxx in mxc-hdmi-hw.c.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-20391: v4l2: hdmi rx: Add hdmi cable plugin status check
Sandor Yu [Fri, 16 Nov 2018 08:26:44 +0000 (16:26 +0800)]
MLK-20391: v4l2: hdmi rx: Add hdmi cable plugin status check

Added hdmi cable plugin status check in v4l2 api function.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19990-3: hdmi rx: Fix hdmi rx reset bit error
Sandor Yu [Fri, 19 Oct 2018 09:07:14 +0000 (17:07 +0800)]
MLK-19990-3: hdmi rx: Fix hdmi rx reset bit error

Fix hdmi rx reset bit error.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19990-2: hdmi rx: Remove ddc clock setting function
Sandor Yu [Fri, 19 Oct 2018 07:42:03 +0000 (15:42 +0800)]
MLK-19990-2: hdmi rx: Remove ddc clock setting function

HDMI RX DDC clock is configurated in HDMI RX FW(V1.0.52).
Remove code in driver.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19990-1: hdmi rx: enable low power mode for cable plugout
Sandor Yu [Fri, 19 Oct 2018 07:22:31 +0000 (15:22 +0800)]
MLK-19990-1: hdmi rx: enable low power mode for cable plugout

-HDMI RX controller enter low power mode when cable plug out.
-Replace CDN_API_HDMIRX_ReadEvent with
CDN_API_General_GetHpdState_blocking, hdmi rx could enter low power
mode.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19610: hdmi rx: Enable hdmi rx edid function
Sandor Yu [Tue, 18 Sep 2018 07:00:52 +0000 (15:00 +0800)]
MLK-19610: hdmi rx: Enable hdmi rx edid function

Update edid block0&1 for imx8qm hdmi rx.
Remove unsupported video modes.
Added edid clock setting.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-19583-1: hdmi rx: Add HPD support
Sandor Yu [Fri, 14 Sep 2018 05:26:15 +0000 (13:26 +0800)]
MLK-19583-1: hdmi rx: Add HPD support

Add HPD support.
Add s_param function that may needed by user application.
Add mutex protect for hdp register access.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>
6 years agoMLK-18578: hdmi_rx: wait longer time for audio info frame
Shengjiu Wang [Fri, 8 Jun 2018 10:36:03 +0000 (18:36 +0800)]
MLK-18578: hdmi_rx: wait longer time for audio info frame

The wait time is short that cause recording failed sometimes

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18578: hdmi_rx: fix issue that ARC can't work in 4k.
Shengjiu Wang [Fri, 8 Jun 2018 09:59:53 +0000 (17:59 +0800)]
MLK-18578: hdmi_rx: fix issue that ARC can't work in 4k.

After changing the deemphasis to 0dB in TX_DIG_CTRL_REG_1
the issue that ARC can't work with 4k resolution is fixed

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
Reviewed-by: Sandor.yu <sandor.yu@nxp.com>
6 years agoMLK-18397-1: hdmi_rx: turn on aux_ana for rx arc
Shengjiu Wang [Fri, 25 May 2018 02:37:51 +0000 (10:37 +0800)]
MLK-18397-1: hdmi_rx: turn on aux_ana for rx arc

turn on aux_ana for rx arc

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18368-6: hdmi_rx: avoid blocking in audio config
Shengjiu Wang [Tue, 22 May 2018 07:43:41 +0000 (15:43 +0800)]
MLK-18368-6: hdmi_rx: avoid blocking in audio config

add delay count in audio auto config to avoid blocking
change the justify to right

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18368-5: hdmi_rx: add hdmi rx audio clock
Shengjiu Wang [Tue, 22 May 2018 07:31:49 +0000 (15:31 +0800)]
MLK-18368-5: hdmi_rx: add hdmi rx audio clock

add clock for hdmi audio rx

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18368-4: hdmi_rx: add generic hdmi audio rx driver
Shengjiu Wang [Tue, 22 May 2018 07:32:51 +0000 (15:32 +0800)]
MLK-18368-4: hdmi_rx: add generic hdmi audio rx driver

Register generic hdmi audio rx driver.

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
6 years agoMLK-18366: hdmi_rx: return error when HDMI PHY failed initialized
Sandor Yu [Tue, 22 May 2018 03:28:38 +0000 (11:28 +0800)]
MLK-18366: hdmi_rx: return error when HDMI PHY failed initialized

return error state when HDMI PHY failed initialized.

Signed-off-by: Sandor Yu <Sandor.yu@nxp.com>