Make sure scmi_clk_cpu is ready when initialize cpufreq driver.
Change-Id: I8c0d0f59480127b4c98d9bdeb8be6080a1fc3dfd
Signed-off-by: Liang Chen <cl@rock-chips.com>
dma_fd buffer has been mapped by cryptodev and does not need to
be mapped again.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ic28bebe3b169dfc4cb1fde4457122277f32294bf
CRYPTO V1/V2 do not support multi-threading, so it is necessary
to add a hold mechanism in Cryptodev to prevent abnormal consequences
caused by multi-threading calls.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ifd5ff6b102c81c8ac44c16f9689d5219c7fa5a56
type will return an exit status of false when the name is not found.
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ia5f719550c5e6eab3373f6d45c63f5f77d29b688
Quickly plug and unplug the Type-C device with DP function test, there
is a low probability of unplugging the Type-C dongle, DP work cannot
acquire the mutex(port->lock), and it will always be stuck in the
tcpm_unregister_altmodes() function during the rest port process, causing
the Type-C device to be inserted again to fail to be detected or the reboot
system to be stuck. The exception process is as follows:
(1) Thread#1: unplug the Type-C device to trigger cc status changes interrupt, in the
tcpm_pd_event_handler() function, first acquire the mutex(port->lock),
then start state_machine work, and finally release the mutex(port->lock);
tcpm_cc_change()
-->tcpm_pd_event_handler()
-->mutex_lock(&port->lock) /* step 1 */
-->_tcpm_cc_change(port, cc1, cc2) /* step 2 */
-->tcpm_set_state(port, SRC_UNATTACHED, 0)
-->kthread_queue_work(port->wq, &port->state_machine) /* step 3 */
--> mutex_unlock(&port->lock) /* step 4 */
(2) Thread#2: before the execution of "step 2" is completed, DP work calls
the callback function registered by the tcpm framework to initiate a VDM
Message, such as Enter Mode Message, in the tcpm_altmode_enter() acquires
the mutex(port->lock) fails and goes to sleep;
dp_altmode_work()
--> typec_altmode_enter(dp->alt)
--> tcpm_altmode_enter()
--> mutex_lock(&port->lock) /* dp work enter sleep */
(3) After step 4, tcpm_altmode_enter() did not acquire for the mutex(port->lock),
but was preempted by the state_machine work to enter the reset port process.
In the reset port process, call the tcpm_unregister_altmodes() function to
release altmode and cancel dp work. Because tcpm_altmode_enter() did not
acquire the mutex(port->lock), causing it to be stuck in cancel dp work.
tcpm_state_machine_work()
-->mutex_lock(&port->lock)
-->tcpm_reset_port(port)
-->tcpm_unregister_altmodes(port)
......
--> dp_altmode_remove()
--> cancel_work_sync(&dp->work) /* always stuck in cancel dp work */
......
Therefore, after adding a new mutex to wait for the tcpm_pd_event_handler() function
to complete the processing, if the port is in the disconnect state, there is no need
to acquire the mutex(port->lock) in the tcpm_altmode_enter() function.
Change-Id: I364a035568ddc35ef7242b42f6d6d0ee3f5586fd
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
1. disable crypto interrupt when crypto is idle
2. ahash init/update/final use hardware crypto
3. reset crypto cc before cipher/hash hardware init
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Id2c85c36c9f2fbe34af553b3ba12239e3cd281b4
1. add sha224/sha384 support.
2. XTS mode was removed due to panic on some platforms(RV1126 kernel 4.19).
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I339cb21c6abefa684f9d36e8faaa04d6ab43d3b1
1. On RV1126/RV1109, AES-192 dma-fd should not use hardware crypto.
2. Fixed a bug with CTR rk_iv_copyback in chain mode.
3. Modify cryptodev log information to reduce runtime logging.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: Ib197e0df4f0ff0c7f4cd20832f25be1b21e8cbf3
The userspace transmits private data through request.signal,
vcnt event return it to userspace through vbl.userdata
Change-Id: I8295a3d4fd91430b3b9fac6c5b6b526e1f266f24
Signed-off-by: Ai ShaoXiang <aisx@rock-chips.com>
Support RK630 ethernet PHY currently, this is a RMII PHY.
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I444f9c5abd1dc5fe8067b79ddee93a801d7a28b9
Because of the difference in pointer size between 32/64 bit systems.
Update driver version to 1.2.4
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: If557cdeb69f1f811eed6cf44419cbb73679dada0
When calling RGA2 with a physically contiguous dma_buf it will be called
with the physical address.
Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: Iadb2d638b426c9be64a403b42513f8c7b58fb866
When the CIOCGSESSION command creates an unsupported algorithm or mode,
errno is set to -ENOEN.
Add SM3/HMAC_SM3 support.
Move CMAC/CBCMAC from cipher to hmac.
Signed-off-by: Lin Jinhan <troy.lin@rock-chips.com>
Change-Id: I4f5f274ffe47d2b81584c192991670ddb2e3def5
We need to overwrite the default register value to put the PHY into
low power mode in idle state.
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
Change-Id: I4c788ce04880d6e25d4454e5594882d511b0bc97
Some system control registers need to be clocked, so the registers can
be accessed. Add an optional clock and attach it to regmap.
Change-Id: If23c2fc31b5d32b496b964a1c628b8be2bc2bc68
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Wyon Bi <bivvy.bi@rock-chips.com>
(cherry picked from commit a00406b71c)