mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-02 02:37:05 +08:00

* Revert "rockchip: add support for NanoPi R4S" This reverts commit 6edffa84190641f0acd8e1ae5e73ecd99897d877. * rockchip: move hwRNG driver to files * rockchip: drop hwRNG support for NanoPi R2S * rockchip: enable hwRNG on rk3399 by default * rockchip: enable hwRNG crypto engine in Kconfig * rockchip: sync upstream patch Co-authored-by: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com>
31 lines
535 B
Bash
31 lines
535 B
Bash
#!/bin/sh
|
|
|
|
[ "$ACTION" = add ] || exit
|
|
|
|
get_device_irq() {
|
|
local device="$1"
|
|
|
|
local line=$(grep -m 1 "${device}\$" /proc/interrupts)
|
|
echo $(echo ${line} | sed 's/:.*//')
|
|
}
|
|
|
|
set_interface_core() {
|
|
local core_mask="$1"
|
|
local interface="$2"
|
|
local device="$3"
|
|
|
|
[ -z "${device}" ] && device="$interface"
|
|
|
|
local irq=$(get_device_irq "$device")
|
|
|
|
echo "${core_mask}" > /proc/irq/${irq}/smp_affinity
|
|
}
|
|
|
|
case "$(board_name)" in
|
|
friendlyarm,nanopi-r2s)
|
|
set_interface_core 2 "eth0"
|
|
set_interface_core 4 "eth1" "xhci-hcd:usb3"
|
|
;;
|
|
esac
|
|
|