Currently on an rk3288 SoC when trying to use the watchdog the SoC will
instantly reset. This is due to the watchdog countdown counter being set
to its initial value of 0x0. Reset the watchdog counter before start in
order to correctly start the countdown timer from the right position.
Change-Id: I127b1b83ff6d459a45139847092ddbfa56c60bcd
Signed-off-by: Jack Mitchell <ml@embed.me.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/20200107155155.278521-1-ml@embed.me.uk
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit e7046df873)
1.more undefined references to `__memzero' follow
2.fix to MTD return value
Change-Id: I1adf89873db1e85568deaf2941867b8d45252eff
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
Allow rfkill-bt.c and rfkill-wlan.c build as module.
Add CONFIG_RFKILL_RK which default y.
Change-Id: I1d399641587124d2291b5b49e5538e7e490a843a
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
net/rfkill/rfkill-wlan.c use mmc_pwrseq_power_off()
Change-Id: I761788f58418604c43f367b48dfe4bb2ff971d48
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
FMWAIT configured with a wrong value to cause timing error.
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: Ib09b79b5702bdff3010a578a50fc0d97854c03f1
Although stereo transmission, actually only 1ch data,
just to adapt the controller of only support stereo and above.
Change-Id: I0f2d6d1b43954080a980d4e4b8ea8f3ca8207d7b
Signed-off-by: Binyuan Lan <lby@rock-chips.com>
f2fs_inode_info.flags is unsigned long variable, it has 32 bits
in 32bit architecture, since we introduced FI_MMAP_FILE flag
when we support data compression, we may access memory cross
the border of .flags field, corrupting .i_sem field, result in
below deadlock.
To fix this issue, let's expand .flags as an array to grab enough
space to store new flags.
Call Trace:
__schedule+0x8d0/0x13fc
? mark_held_locks+0xac/0x100
schedule+0xcc/0x260
rwsem_down_write_slowpath+0x3ab/0x65d
down_write+0xc7/0xe0
f2fs_drop_nlink+0x3d/0x600 [f2fs]
f2fs_delete_inline_entry+0x300/0x440 [f2fs]
f2fs_delete_entry+0x3a1/0x7f0 [f2fs]
f2fs_unlink+0x500/0x790 [f2fs]
vfs_unlink+0x211/0x490
do_unlinkat+0x483/0x520
sys_unlink+0x4a/0x70
do_fast_syscall_32+0x12b/0x683
entry_SYSENTER_32+0xaa/0x102
Change-Id: I2777d32fd64e55514549fe82be397fdd671beaf6
Fixes: 4c8ff7095b ("f2fs: support data compression")
Tested-by: Ondrej Jirman <megous@megous.com>
Signed-off-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 7de5ad45b809b5043fb12c3e280ceffe9a6a13d4
git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs dev)
latest commit in master:
d64c7a0803 ("r8152: check disconnect status after long sleep")
Change-Id: Id67ff7cd238342b8b8bef7c39c63cd397d81ee30
Signed-off-by: Wu Liangqing <wlq@rock-chips.com>
new version rkvdec has extra clock and reset for cabac module.
Change-Id: I24c82ad57e382d3f2b8fcde11c149f9cf50ffb15
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Delivery message to upper only when mailbox client is existed.
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
Change-Id: I2fbfc3ecd110fe26d0ffed5ee90d1e4877450ef9
px30 grf switch method:
a) ensure clk on
b) ensure power on
c) disable all iommu
d) switch grf
e) enable current iommu
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I1015ea9df6d8745f0a4922a1f684082660fac314
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
This patch fix the bug that if the property maximum-speed of dwc3 is
configured to high-speed in DTS, gadget connection will be slow.
Before gadget connection, it is necessary to write register DCFG to set
maximum speed, if you don't, dwc3 will generate Erratic Error Event many
times and results to slow connection. Actually, maximum speed will be
set when Android layer call udc_bind_to_driver but it will fail when
dwc3 runtime-suspended. For Rockchip SoCs, dwc3 will be suspended as long
as USB cable is unplugged, so we add udc_set_speed before dwc3 runtime
resume.
Change-Id: I261c2cf9a36179a8d600f223fc8fd4757c7f622d
Signed-off-by: Jianing Ren <jianing.ren@rock-chips.com>
When I test the uvc gadget function, I find that the uvc
gadget can only transfer the first frame image and then
stop unexpectedly.
Without this patch, the isochronous endpoints doesn't wait
for a XferNotReady event to start the next frame image, and
fail to transfer data. In this case, we will get an endpoint
event DWC3_DEPEVT_XFERINPROGRESS and the event status is
DEPEVT_STATUS_MISSED_ISOC, and the original code try to
issue an EndTransfer command if the started_list is empty.
However, the started_list is never empty, so it doesn't issue
an EndTransfer command and not XferNotReady event happens.
To fix this problem, this patch firstly checks if the event
status is DEPEVT_STATUS_MISSED_ISOC and then unmap the isoc
request and move the request to the pending list. Then it
issue an EndTransfer command if the started_list is empty.
After the EndTransfer is completed, we will get a XferNotReady
event and it can start the isoc requests again.
Change-Id: Ieac3ca9a177bc7599b29ae30bee243e47b3ba7c9
Signed-off-by: William Wu <william.wu@rock-chips.com>
use fast standby mode && mipi clk non-continue mode
to fix take photo stresstest issue
Signed-off-by: Wang Panzhenzhuan <randy.wang@rock-chips.com>
Change-Id: Idf9ff7e509d77cb78764ba5f97f14ff402172363
We had a 100us delay to synchronize the END_TRANSFER command completion
before giving back requests to the function drivers. Now, the controller
driver can handle cancelled TRBs with the requests' cancelled_list and
it can also wait until the END_TRANSFER completion before starting new
transfers. Synchronization can simply base on the controller's command
completion interrupt. The 100us delay is no longer needed. Remove this
arbitrary delay.
Change-Id: Ie6d1a46e8975b7d8b80c4523d71c58a5bffd9413
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit cf2f8b63f7)
If the END_TRANSFER command hasn't completed yet, then don't send the
START_TRANSFER command. The controller may not be able to start if
that's the case. Some controller revisions depend on this. See
commit 76a638f8ac ("usb: dwc3: gadget: wait for End Transfer to
complete"). Let's only send START_TRANSFER command after the
END_TRANSFER command had completed.
Change-Id: Id6d0be76c48ab556bc3e5a9a75014de0ae671ed4
Fixes: 3aec99154d ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit da10bcdd6f)
While the END_TRANSFER command is sent but not completed, any request
dequeue during this time will cause the driver to issue the END_TRANSFER
command. The driver needs to submit the command only once to stop the
controller from processing further. The controller may take more time to
process the same command multiple times unnecessarily. Let's add a flag
DWC3_EP_END_TRANSFER_PENDING to check for this condition.
Change-Id: Ibd378cfb4320dfa962b76fa50b5f002d7eac1d8b
Fixes: 3aec99154d ("usb: dwc3: gadget: remove DWC3_EP_END_TRANSFER_PENDING")
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit c58d8bfc77)
Normally the END_TRANSFER command completion handler will clear the
DWC3_EP_TRANSFER_STARTED flag. However, if the command was sent without
interrupt on completion, then the flag will not be cleared. Make sure to
clear the flag in this case.
Change-Id: I34ece5ee5e01f0cf9b1061e99f902cfc19a5dfed
Cc: stable@vger.kernel.org
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: William Wu <william.wu@rock-chips.com>
(cherry picked from commit d3abda5a98)
Only support panels which all parameters from device tree.
Save boot time about 2ms on rk3126-bnd-d708 board.
Change-Id: Ie075ff5c84c1807029873555f58bd13d41350abf
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
When CONFIG_CRYPTO_MANAGER_DISABLE_TESTS=y, it is no need to create
kthread cryptomgr_test, which almost do nothing but crypto_alg_tested().
Just call crypto_alg_tested() in cryptomgr_schedule_test() directly.
Save boot time about 7ms on rk3126-bnd-d708 board.
Change-Id: If465f8419dba4ea955df157b3405f3267a96c7d6
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
This is extremely useful in diagnosing remote crashes, and is based heavily
on original work by <md@google.com>.
Signed-off-by: San Mehat <san@google.com>
Cc: Michael Davidson <md@google.com>
[ARM] process: Use uber-safe probe_kernel_address() to read mem when dumping.
This prevents the dump from taking pagefaults / external aborts.
Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I7586677c4ea0e064b5a38c7972102db3b5771500
Probe devices asynchronously instead of the driver. This results in us
seeing the same behavior if the device is registered before the driver or
after. This way we can avoid serializing the initialization should the
driver not be loaded until after the devices have already been added.
The motivation behind this is that if we have a set of devices that
take a significant amount of time to load we can greatly reduce the time to
load by processing them in parallel instead of one at a time. In addition,
each device can exist on a different node so placing a single thread on one
CPU to initialize all of the devices for a given driver can result in poor
performance on a system with multiple nodes.
This approach can reduce the time needed to scan SCSI LUNs significantly.
The only way to realize that speedup is by enabling more concurrency which
is what is achieved with this patch.
To achieve this it was necessary to add a new member "async_driver" to the
device_private structure to store the driver pointer while we wait on the
deferred probe call.
Change-Id: I08edadd321d483facd62ed913d17bd79813e66d9
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ef0ff68351)
Try to consolidate all of the locking and unlocking of both the parent and
device when attaching or removing a driver from a given device.
To do that I first consolidated the lock pattern into two functions
__device_driver_lock and __device_driver_unlock. After doing that I then
created functions specific to attaching and detaching the driver while
acquiring these locks. By doing this I was able to reduce the number of
spots where we touch need_parent_lock from 12 down to 4.
This patch should produce no functional changes, it is meant to be a code
clean-up/consolidation only.
Change-Id: Ifbaf68e43b10a84ba90fce65f6cbe8fb79acbc62
Reviewed-by: Luis Chamberlain <mcgrof@kernel.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit ed88747c6c)
Asynchronous driver probing can help much on kernel fastboot, and
this option can provide a flexible way to optimize and quickly verify
async driver probe.
Also it will help in below cases:
* Some driver actually covers several families of HWs, some of which
could use async probing while others don't. So we can't simply
turn on the PROBE_PREFER_ASYNCHRONOUS flag in driver, but use this
cmdline option, like igb driver async patch discussed at
https://www.spinics.net/lists/netdev/msg545986.html
* For SOC (System on Chip) with multiple spi or i2c controllers, most
of the slave spi/i2c devices will be assigned with fixed controller
number, while async probing may make those controllers get different
index for each boot, which prevents those controller drivers to be
async probed. For platforms not using these spi/i2c slave devices,
they can use this cmdline option to benefit from the async probing.
Change-Id: I98d4d57ead7e40b075f1d43ebea559c5497cf341
Suggested-by: Alexander Duyck <alexander.h.duyck@linux.intel.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Feng Tang <feng.tang@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 1ea61b68d0)
This reverts commit 32948d8b86.
See commit a8b1fa6c47 ("Revert "PM / devfreq: Modify the device name as devfreq(X) for sysfs"")
Conflicts:
drivers/devfreq/devfreq.c
Change-Id: If4fec73bb1cf38afffd4699dfe25b8c32ea7472f
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
V4L2 is disabled by default, enable common features.
23 Added functions:
void vb2_buffer_done(vb2_buffer*, vb2_buffer_state)
int vb2_dqbuf(vb2_queue*, v4l2_buffer*, bool)
int vb2_fop_mmap(file*, vm_area_struct*)
__poll_t vb2_fop_poll(file*, poll_table*)
ssize_t vb2_fop_read(file*, char*, size_t, loff_t*)
int vb2_fop_release(file*)
int vb2_ioctl_create_bufs(file*, void*, v4l2_create_buffers*)
int vb2_ioctl_dqbuf(file*, void*, v4l2_buffer*)
int vb2_ioctl_expbuf(file*, void*, v4l2_exportbuffer*)
int vb2_ioctl_qbuf(file*, void*, v4l2_buffer*)
int vb2_ioctl_querybuf(file*, void*, v4l2_buffer*)
int vb2_ioctl_reqbufs(file*, void*, v4l2_requestbuffers*)
int vb2_ioctl_streamoff(file*, void*, v4l2_buf_type)
int vb2_ioctl_streamon(file*, void*, v4l2_buf_type)
void vb2_ops_wait_finish(vb2_queue*)
void vb2_ops_wait_prepare(vb2_queue*)
void* vb2_plane_vaddr(vb2_buffer*, unsigned int)
int vb2_qbuf(vb2_queue*, v4l2_buffer*)
int vb2_queue_init(vb2_queue*)
void vb2_queue_release(vb2_queue*)
int vb2_reqbufs(vb2_queue*, v4l2_requestbuffers*)
int vb2_streamoff(vb2_queue*, v4l2_buf_type)
int vb2_streamon(vb2_queue*, v4l2_buf_type)
Signed-off-by: Mark Salyzyn <salyzyn@google.com>
Bug: 151246806
Test: abi check, confirm the various vb2_* functions are now available
Change-Id: I6e20c12c645fd45801b24f922c66508b667ea371
Some special applications of video may require:
rockchip_pmu_pd_on(dev)---> force power on pd
rockchip_pmu_pd_off(dev)---> force power down pd
rockchip_pmu_pd_is_on(dev)---> pd status
Change-Id: I264d76559aef0b0540130bf29a4635a3f5380a7c
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
The initialization frequency of cci was adjusted from 300M to 600M.
Change-Id: I36ea20ec84c97f893894687ce4eb7bd021d372a0
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Provide a securable way to open a file for filling
Test: incfs_test passes
Bug: 138149732
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: Ib4b6fd839ad30ce08e31121d19e2c0d7066d302f