29 Oct, 2018

40 commits

  • Generic GCM is likely to end up using a hardware accelerator to do
    part of the job. Allocating hash, iv and result in a contiguous memory
    area increases the risk of dma mapping multiple ranges on the same
    cacheline. Also having dma and cpu written data on the same cacheline
    will cause coherence issues.

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • The kernel implementation of crc32 (crc32_generic.c)
    accepts a key to set a seed. It is incompatible with the
    kernel implementation of the crypto template hmac which
    does not support keyed algorithms.

    So it is not possible to load the algorithm hmac(crc32)
    so remove it from tcrypt.

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • The crypto template lrw(crypto/lrw.c) and xts(crypto/xts.c) require
    an ecb(aes) algo as base which ivsize must be zero as ecb(aes)
    doesn't need an IV.

    The patch 84f5e22194 "MA-9807: Fix ecb(aes) use without an IV"
    add support in caamalg for ecb(aes) without iv.

    The ecb(aes) implementation of the CAAM declare an ivsize which is
    against specification. So remove it to be usable with cryto templates.

    Signed-off-by: Franck LENORMAND

    Franck LENORMAND
     
  • passthrough crypto to domu

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Passthrough VPU to DomU

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Add phandle and linux,phandle for gic node.
    When booting Domu with device tree, xen tool will create gic node
    with phandle PHANDLE_GIC(65000), so in domu dts, we need to code
    that in gic node, make sure it is same as what xen tool use.
    Otherwise, wrong gic phandle might be used.

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Passthrough pcie to DomU to support pcie wifi.
    Add the needed GPIOs in dom0 dts.
    Add SMMU hook for pciea.
    Modify the reserved-memory for pcie usage.
    passthrough pcie related LPCG to make sure domu not panic when access
    LPCG.

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Enable the gpio controller, but remove the power-domain property.
    Currently we are using mmio trap in XEN to handle GPIO.
    For Dom0, it has the highest priviledge to read/write any gpio registers
    and the interrupts are also forwarded to Dom0.

    For DomU, a new property as following is added to doma node in dom0 dts.
    gpios = , ;
    xen will parse it and restrict domu read/write behavior.

    xen,shared means mmio trap is used.

    Signed-off-by: Peng Fan

    Peng Fan
     
  • Support multi-vdev on one rpmsg channel on 8QM DomU.
    sync with commit f7f11791135f3f5("MLK-19558-2 ARM64: dts: enable multi-vdev on one rpmsg channel")

    Signed-off-by: Peng Fan

    Peng Fan
     
  • In ov5640_probe(), if any error is encountered (like no camera
    attached), the function returns an error but the sensor structure is not
    freed, leading to a memory leak:

    unreferenced object 0xffff8000b9eafe00 (size 512):
    comm "swapper/0", pid 1, jiffies 4294892836 (age 62894.028s)
    hex dump (first 32 bytes):
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
    backtrace:
    [] kmem_cache_alloc+0x1a4/0x208
    [] ov5640_probe+0x30/0x8a8
    [] i2c_device_probe+0x364/0x378
    [] driver_probe_device+0x300/0x458
    [] __driver_attach+0xcc/0x118
    [] bus_for_each_dev+0x4c/0x98
    [] driver_attach+0x20/0x28
    [] bus_add_driver+0x1f8/0x298
    [] driver_register+0x60/0xf8
    [] i2c_register_driver+0x44/0xc8
    [] ov5640_i2c_driver_init+0x18/0x20
    [] do_one_initcall+0x38/0x128
    [] kernel_init_freeable+0x188/0x22c
    [] kernel_init+0x10/0x108
    [] ret_from_fork+0x10/0x18
    [] 0xffffffffffffffff

    This patch replaces kmalloc with devm_kzalloc() and will also get rid of
    memset() in the process.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • Micfil modules have 4 IRQs:
    - 44: Dgital Microphone interface voice activity detector event interrupt
    - 45: Digital Microphone interface voice activity detector error
    interrupt
    - 109: Digital Microphone interface interrupt
    - 110: Digital Microphone interface error interrupt

    This patch adds different functions to treat each IRQ listed before.

    Signed-off-by: Cosmin-Gabriel Samoila
    Reviewed-by: Shengjiu Wang

    Cosmin-Gabriel Samoila
     
  • Correct hwvad initialization procedure bugs:
    - VADCHSEL was set to N instead of ((1 << N) - 1)
    - IE set before ERIE
    - voice detected interrupt line was used wrong

    Signed-off-by: Cosmin-Gabriel Samoila
    Signed-off-by: Shengjiu Wang

    Shengjiu Wang
     
  • and add some error handler in probe

    Remove vpu_set_power function in suspend/resume for vpu decoder,
    add some error handler in probe as encoder did

    Signed-off-by: Huang Chaofan

    Huang Chaofan
     
  • Configure wowl parameters only if firmware support wowl.

    Tested-by: Fugang Duan
    Signed-off-by: Lo-Hsiang Lo
    Signed-off-by: Fugang Duan

    Lo-Hsiang Lo
     
  • In WLAN, priority among various access categories of traffic is
    always set by the AP using WMM parameters and this may not always
    follow the standard 802.1d priority.
    In this change, priority is adjusted based on the AP WMM params
    received as part of the Assoc Response and the same is later used
    to map the priority of all incoming traffic.

    This change should fix the following 802.11n certification tests:
    * 5.2.31 ACM Bit Conformance test
    * 5.2.32 AC Parameter Modification test

    Signed-off-by: Saravanan Shanmugham
    Signed-off-by: Fugang Duan

    Saravanan Shanmugham
     
  • Use sr_eng_en bit to check 4373 sr support.

    Signed-off-by: Chi-Hsien Lin
    Signed-off-by: Fugang Duan

    Chi-Hsien Lin
     
  • The driver sends an action frame down and waits for a completion signal
    triggered by the received BRCMF_E_ACTION_FRAME_OFF_CHAN_COMPLETE event
    to continue the process. However, the action frame could be transmitted
    either on the current channel or on an off channel. For the on-channel
    case, only BRCMF_E_ACTION_FRAME_COMPLETE event will be received when
    the frame is transmitted, which make the driver always wait a full
    timeout duration. This patch has the completion signal be triggered by
    receiving the BRCMF_E_ACTION_FRAME_COMPLETE event for the on-channel
    case.

    Signed-off-by: Chung-Hsien Hsu
    Signed-off-by: Fugang Duan

    Chung-Hsien Hsu
     
  • Finding a common channel to send an action frame out is required for
    some action types. Since a loop with several scan retry is used to find
    the channel, a short wait time could be considered for each attempt.
    This patch reduces the wait time from 1500 to 450 msec for each action
    frame scan.

    Signed-off-by: Chung-Hsien Hsu
    Signed-off-by: Fugang Duan

    Chung-Hsien Hsu
     
  • Will enable FMAC to push more packets to bus tx queue and help
    improve throughput when fws queuing is enabled. This change is
    required to tune the throughput for passing WMM CERT tests.

    Signed-off-by: Madhan Mohan R
    Signed-off-by: Fugang Duan

    Madhan Mohan R
     
  • Transaction between AOS and SDIOD is not protected, and if cmd 52
    received in AOS and in the middle of response state changed from AOS to
    SDIOD, response is corrupted and it causes to SDIO Host controller to
    hang.

    Signed-off-by: Lo-Hsiang Lo
    Signed-off-by: Fugang Duan

    Double Lo
     
  • P2p spec mentioned that the p2p device address should be the globally
    administered address with locally administered bit set. Therefore,
    follow this guideline by default.

    When the primary interface is set to a locally administered address, the
    locally administered bit cannot be set again. Generate a random locally
    administered address for this case.

    Signed-off-by: Chi-Hsien Lin
    Signed-off-by: Fugang Duan

    Chi-Hsien Lin
     
  • Send P2P Presence Response from the p2p interface address instead
    of the p2p device address.

    Signed-off-by: Madhan Mohan R
    Signed-off-by: Fugang Duan

    Madhan Mohan R
     
  • brcmfmac is a FullMAC driver and it implements/uses cfg80211 interface
    for stations management. At the same time it doesn't receive or pass up
    management frames.

    This flag indicates that authenticator doesn't have to subscribe to or
    handle management frames. Some authenticators (e.g. hostapd) were
    working with brcmfmac thanks to some extra assumptions. This commit
    clears up the situation.

    Signed-off-by: Rafal Milecki
    Acked-by: Arend van Spriel
    Signed-off-by: Kalle Valo
    Signed-off-by: Fugang Duan

    Rafa艂 Mi艂ecki
     
  • Transaction between AOS and SDIOD is not protected, and if cmd 52
    received in AOS and in the middle of response state changed from AOS to
    SDIOD, response is corrupted and it causes to SDIO Host controller to
    hang.

    Signed-off-by: Wright Feng
    Signed-off-by: Fugang Duan

    Wright Feng
     
  • The variable "wq_flags" is not used anymore. Remove it.

    Signed-off-by: Wright Feng
    Signed-off-by: Fugang Duan

    Wright Feng
     
  • The firmware does not respond ARP request and causes ping failed with
    following steps.

    1. Bring up inteface
    ifconfig wlan0 up or start wpa_supplicant
    2. Set the IP address
    ifconfig wlan0 192.168.100.10
    3. Bring down interface or
    ifconfig wlan0 down or kill wpa_supplicant
    4. Bring up inteface again and set the same IP address
    5. Connect to AP(192.168.100.1) and ping to AP will be failed.

    FMAC clears arp_hostip when bringing down the interface, but not set it
    back if setting the same IP address. We are able to see the IP address
    in interface info(inconfig wlan0) but the ping still cannot work because
    the firmware ARP offload does not respond the ARP request.
    Because of that, we remove "arp_hostip_clear" from function
    "brcmf_netdev_stop"

    Signed-off-by: Wright Feng
    Signed-off-by: Fugang Duan

    Wright Feng
     
  • Add 4-way handshake offload detection for FT with EAP authentication.

    Signed-off-by: Chung-Hsien Hsu
    Signed-off-by: Fugang Duan

    Chung-Hsien Hsu
     
  • The credit numbers are static and tunable per chip in firmware side.
    However the credit number may be changed that is based on packet pool
    length and will send BRCMF_E_FIFO_CREDIT_MAP event to ask host driver
    updating the credit numbers during interface up.
    The purpose of this patch is making host driver has ability of updating
    the credit numbers when receiving the BRCMF_E_FIFO_CREDIT_MAP event.

    Signed-off-by: Wright Feng
    Signed-off-by: Fugang Duan

    Wright Feng
     
  • With setting sdio_wq_highpri=1 in module parameters, tasks submitted to
    SDIO workqueue will put at the head of the queue and run immediately.
    This parameter is for getting higher TX/RX throughput with SDIO bus.

    Signed-off-by: Wright Feng
    Signed-off-by: Fugang Duan

    Wright Feng
     
  • will use WQ_HIGHPRI instead.

    Signed-off-by: Wright Feng
    Signed-off-by: Fugang Duan

    Wright Feng
     
  • Firmware inform the driver about tx status by normal tx status signal
    or compressed tx status signal. This patch adds support to handle the
    compressed tx status signal.

    Signed-off-by: Chung-Hsien Hsu
    Signed-off-by: Fugang Duan

    Chung-Hsien Hsu
     
  • CYW89342 is a 2x2 MIMO,802.11a/b/g/n/ac,SDIO 3.0 and PCIe 3.0 for WLAN.
    It is an automotive wireless chip.

    Signed-off-by: Saint Chuang
    Signed-off-by: Fugang Duan

    Saint Chuang
     
  • For imx8mq-evk board, B4 board change touch/mipi-hdmi connected i2c bus from i2c1 to i2c3.
    So this patch make the touch and mipi-hdmi work for both B4 and B3 board.

    Signed-off-by: Haibo Chen

    Haibo Chen
     
  • retry logic cause high cpu load for multiple instances,
    should use simple mutex to sync dpu blitter directly.

    Signed-off-by: Xianzhong

    Xianzhong
     
  • video playback cause system hang with Wayland g2d compositor,
    this also can be reproduced with Android G2D HWComposer.

    the problem is second prg not handled between GPU and video.
    need re-enable dprc & prg pipes when modifier changed.

    Signed-off-by: Xianzhong

    Xianzhong
     
  • For i.MX8QM/i.MX8QXP, one power domain could have several devices
    inside, such as cs42888 and wm8960 both belong to pd_mclk_out0
    power domain, when these two devices probed, imx8_attach_dev() will
    be called and these two devices' clocks will be add to pd_mclk_out0's
    clock list, then if the second device probe failed and imx8_detach_dev()
    will be called, the original code will go through the whole pd_mclk_out0
    power domian's clock list and delete all the clock nodes, when the
    clock node are NOT belonging to this device, below kernel warning will
    show out by devm_kfree() function:

    [ 4.998488] [] devm_kfree+0x2c/0x38
    [ 5.003543] [] imx8_detach_dev+0xb4/0x14c
    [ 5.009121] [] genpd_remove_device+0x70/0xe8
    [ 5.014959] [] genpd_dev_pm_detach+0x3c/0xc8
    [ 5.020797] [] dev_pm_domain_detach+0x20/0x28
    [ 5.026722] [] i2c_device_probe+0x1d4/0x35c
    [ 5.032472] [] driver_probe_device+0x220/0x2d4
    [ 5.038484] [] __driver_attach+0xa4/0xa8
    [ 5.043978] [] bus_for_each_dev+0x58/0x98
    [ 5.049552] [] driver_attach+0x20/0x28
    [ 5.054869] [] bus_add_driver+0x1c0/0x224
    [ 5.060446] [] driver_register+0x68/0x108
    [ 5.066024] [] i2c_register_driver+0x44/0x84
    [ 5.071862] [] wm8960_i2c_driver_init+0x18/0x20
    [ 5.077961] [] do_one_initcall+0x38/0x124
    [ 5.083538] [] kernel_init_freeable+0x18c/0x228
    [ 5.089638] [] kernel_init+0x10/0x100
    [ 5.094869] [] ret_from_fork+0x10/0x18

    The correct operation is to just delete those clock nodes belonged
    to the device being detached, to avoid this case, we can add a device
    point which can be assigned to device during attach_dev phase, then
    in detach_dev phase, check the device pointer to make sure ONLY delete
    those clock nodes belonged to its own and keep other clock nodes in the
    same power domain there.

    Reported-by: Chen Guoyin
    Signed-off-by: Anson Huang
    Reviewed-by: Bai Ping

    Anson Huang
     
  • Right now, an error is returned in the atomic_check callback if a plane
    is not visible. However, this can lead to warnings when removing
    framebuffers after connector is removed. That's because display's width
    and height becomes 0 and, technically, the plane becomes invisible. Any
    attempt to remove a plane will also perform an atomic_commit() on the
    remaining, still active, planes. Since they are invisible, the following
    warning will be shown:

    [ 161.623590] atomic remove_fb failed with -22
    [ 161.628099] ------------[ cut here ]------------
    [ 161.632727] WARNING: CPU: 0 PID: 95 at /usr/src/kernel/drivers/gpu/drm/drm_framebuffer.c:924 drm_framebuffer_remove+0x3b8/0x3e0
    [ 161.644200] Modules linked in: 8021q garp stp mrp qca6174(O) crc32_ce crct10dif_ce galcore(O) ipv6
    [ 161.653175] CPU: 0 PID: 95 Comm: kworker/0:1 Tainted: G O 4.14.62-imx_4.14.y+gef7acf9 #1
    [ 161.662391] Hardware name: Freescale i.MX8MQ EVK (DT)
    [ 161.667443] Workqueue: events drm_mode_rmfb_work_fn
    [ 161.672319] task: ffff8000b8973600 task.stack: ffff000009ee0000
    [ 161.678237] PC is at drm_framebuffer_remove+0x3b8/0x3e0
    [ 161.683460] LR is at drm_framebuffer_remove+0x3b8/0x3e0
    [ 161.688683] pc : [] lr : [] pstate: 40000145
    [ 161.696075] sp : ffff000009ee3d10
    [ 161.699388] x29: ffff000009ee3d10 x28: 0000000000000000
    [ 161.704701] x27: 0000000000000000 x26: ffff8000b8fda000
    [ 161.710013] x25: ffff0000080e8c60 x24: ffff00001999bc90
    [ 161.715324] x23: 00000000ffffffea x22: ffff8000bdf63580
    [ 161.720636] x21: ffff8000b45d6280 x20: ffff8000b5fd2800
    [ 161.725947] x19: ffff00001999bc90 x18: 0000000000000010
    [ 161.731258] x17: 0000ffff9d121910 x16: ffff000008231398
    [ 161.736570] x15: ffffffffffffffff x14: ffff0000895c144f
    [ 161.741881] x13: ffff0000095c145d x12: ffff000009429df8
    [ 161.747193] x11: ffff000008616e40 x10: ffff000009ee3a20
    [ 161.752504] x9 : 0000000000000006 x8 : 6961662062665f65
    [ 161.757816] x7 : 766f6d6572206369 x6 : 00000000000002ba
    [ 161.763127] x5 : 0000000000000000 x4 : 0000000000000000
    [ 161.768438] x3 : 0000000000000000 x2 : ffff8000bdf5fef0
    [ 161.773749] x1 : ffff8000b8973600 x0 : 0000000000000020
    [ 161.779061] Call trace:
    [ 161.781507] Exception stack(0xffff000009ee3bd0 to 0xffff000009ee3d10)
    [ 161.787946] 3bc0: 0000000000000020 ffff8000b8973600
    [ 161.795774] 3be0: ffff8000bdf5fef0 0000000000000000 0000000000000000 0000000000000000
    [ 161.803601] 3c00: 00000000000002ba 766f6d6572206369 6961662062665f65 0000000000000006
    [ 161.811430] 3c20: ffff000009ee3a20 ffff000008616e40 ffff000009429df8 ffff0000095c145d
    [ 161.819258] 3c40: ffff0000895c144f ffffffffffffffff ffff000008231398 0000ffff9d121910
    [ 161.827086] 3c60: 0000000000000010 ffff00001999bc90 ffff8000b5fd2800 ffff8000b45d6280
    [ 161.834914] 3c80: ffff8000bdf63580 00000000ffffffea ffff00001999bc90 ffff0000080e8c60
    [ 161.842743] 3ca0: ffff8000b8fda000 0000000000000000 0000000000000000 ffff000009ee3d10
    [ 161.850571] 3cc0: ffff00000867f5d0 ffff000009ee3d10 ffff00000867f5d0 0000000040000145
    [ 161.858399] 3ce0: 0000000000000000 ffff8000b8973600 ffffffffffffffff ffff00000867cfb4
    [ 161.866226] 3d00: ffff000009ee3d10 ffff00000867f5d0
    [ 161.871103] [] drm_framebuffer_remove+0x3b8/0x3e0
    [ 161.877369] [] drm_mode_rmfb_work_fn+0x40/0x58
    [ 161.883375] [] process_one_work+0x1d4/0x348
    [ 161.889120] [] worker_thread+0x244/0x470
    [ 161.894606] [] kthread+0x12c/0x130
    [ 161.899571] [] ret_from_fork+0x10/0x18
    [ 161.904880] ---[ end trace 489a96a125920066 ]---

    To avoid this, we simply return 0 in the atomic_check() callback and do
    not perform any update on the plane in the atomic_update().
    Since the plane is invisible, it's perfectly fine.

    Signed-off-by: Laurentiu Palcu

    Laurentiu Palcu
     
  • When an abnormal condition causes the wptr/rptr pointer to be abnormal, cancel update stream address and report the error.

    Signed-off-by: Shijie Qin

    Shijie Qin
     
  • Signed-off-by: ming_qian

    ming_qian
     
  • 1.remove vpu_set_power
    2.split vpu_probe into several functions

    Signed-off-by: ming_qian

    ming_qian