Because the call:
platform_set_drvdata(pdev, am_d);
in aoa_mmap_probe() is overwritten by the subsequent call:
platform_set_drvdata(pdev, amw_d);
therefore, the am_d handle needs to be saved separately. Also, previously allocated IRQ and
platform resources must be released.
And, fix the issue where repeated insmod operations couldn't be performed due to resource usage.
After successfully executing the command `insmod rk_aoa.ko` for the first time,
executing `rmmod rk_aoa` to uninstall the file and then executing `insmod rk_aoa.ko`
again will result in the following error:
----
[ 93.352370] platform 208b0000.aoa: can't request region for resource [mem 0x208b0000-0x208b0fff]
[ 93.352401] aoa-middleware aoa_middleware: probe rockchip aoa failed: -16
[ 93.352411] aoa-middleware: probe of aoa_middleware failed with error -16
----
Furthermore, the pdev functions for aoa_drv and lp_rkdma are manually probed via
aoa_middleware and cannot be automatically released via the devm mechanism.
Therefore, you must manually allocate resources in the probe function and release
them manually in the remove function.
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I454c970de620f1dc7007bf530e2e0650c81066e4
Some master device resume early but the iommu has not yet resume, which
will cause the iommu to be inaccessible.
So set LATE_SYSTEM_SLEEP_PM_OPS for iommu pm ops, which will resume early and suspend late.
Change-Id: I9424198900a56004098e8cf6c3194baa62eeda09
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
In kernel 6.1 and later versions, the property 'clk-trcm' has been updated:
rockchip,clk-trcm -> rockchip,trcm-sync-tx/rx-only
Not all products' DT have been updated to use the new property. Therefore,
still support for old property for now, and a prompt is logged to suggest
to adopt the new property.
The old property will be removed in a future version.
Log:
Deprecated property 'rockchip,clk-trcm', please use 'rockchip,trcm-sync-tx/rx-only' in DT
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I594ba932486440d6eefc65abb54516d530ad090b
Fake mode accesses memory using the DTE address as the final physical
address on page fault, ignoring reads and discard writes. This resolves
VOP mmu hang issues caused by page faults.
Change-Id: I6b37b79a425c0341e53e0c8a786767a4b7da304e
Signed-off-by: Simon Xue <xxm@rock-chips.com>
cif subdev-itf need to update sensor info in s_power, fix
mipi switch case info error issue.
Change-Id: I1ce93c31e4b3c1631dac4c86e30c65b6d4503624
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Wrong noioctl return value cause rkisp get cfg failed,
so fix it.
Change-Id: I70e310c35a565369ea760a06f45465f78a0c321b
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Fixes: 8633bf3947 ("misc: rockchip: pcie-rkep: Support continuous buffer")
Change-Id: I29bcf73f5af3d1e1a45fbb16da0b09cda9ff3f46
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
1.Add continuous buffer support:
alloc continuous buffer by ioctl PCIE_EP_CONTINUOUS_BUFFER_ALLOC
free continuous buffer by ioctl PCIE_EP_CONTINUOUS_BUFFER_FREE
mmap continuous buffer virtual addr by ioctl PCIE_EP_SET_MMAP_RESOURCE_CONTINUOUS_BUFFER
2.Change to record mmap resource index under each task file.
Change-Id: Ib820086dd67b3f0bd2f820232491860b8e170ae3
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
There're two ways to support read multiple blocks transmission:
- Current design: SET_BLOCK_COUNT(CMD23) + READ_MULTIPLE_BLOCK(CMD18)
- READ_MULTIPLE_BLOCK(CMD18) + STOP_TRANSMISSION(CMD12)
CMD23 only support 2^16 blocks, we should change to plan B for the
larger size transmission.
Change-Id: Id8f3d11dbff65b8bac4b74ef2024862b6722fc26
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
1.Call register/unregister in pair;
2.Only enable gpio_php when driver built in.
Change-Id: Ib7326a76333a5916842a8e3f15b7fa329b4dde77
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Always use the frame burst even if there is only one mapping.
Signed-off-by: Sugar Zhang <sugar.zhang@rock-chips.com>
Change-Id: I3774be5286d618dd61ed11e443ee657ea22cd8d8