Rockchip and Odroid XU4 upstream fixes (#1855)
This commit is contained in:
parent
dafd7c7ebc
commit
1516616c2d
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm 5.4.23 Kernel Configuration
|
||||
# Linux/arm 5.4.27 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
@ -21,7 +21,6 @@ CONFIG_BUILDTIME_EXTABLE_SORT=y
|
||||
#
|
||||
CONFIG_INIT_ENV_ARG_LIMIT=32
|
||||
# CONFIG_COMPILE_TEST is not set
|
||||
# CONFIG_HEADER_TEST is not set
|
||||
CONFIG_LOCALVERSION=""
|
||||
# CONFIG_LOCALVERSION_AUTO is not set
|
||||
CONFIG_BUILD_SALT=""
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.4.24 Kernel Configuration
|
||||
# Linux/arm64 5.4.27 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
@ -2678,7 +2678,6 @@ CONFIG_WLCORE=m
|
||||
# CONFIG_WLCORE_SPI is not set
|
||||
CONFIG_WLCORE_SDIO=m
|
||||
CONFIG_WILINK_PLATFORM_DATA=y
|
||||
CONFIG_RTL8723DS=m
|
||||
CONFIG_RTL8822BU=m
|
||||
CONFIG_RTL8188EU=m
|
||||
CONFIG_RTL8821CU=m
|
||||
@ -4693,7 +4692,8 @@ CONFIG_SND_PCM_ELD=y
|
||||
CONFIG_SND_PCM_IEC958=y
|
||||
CONFIG_SND_DMAENGINE_PCM=y
|
||||
CONFIG_SND_HWDEP=m
|
||||
CONFIG_SND_RAWMIDI=m
|
||||
CONFIG_SND_SEQ_DEVICE=y
|
||||
CONFIG_SND_RAWMIDI=y
|
||||
CONFIG_SND_JACK=y
|
||||
CONFIG_SND_JACK_INPUT_DEV=y
|
||||
# CONFIG_SND_OSSEMUL is not set
|
||||
@ -4707,9 +4707,15 @@ CONFIG_SND_VERBOSE_PROCFS=y
|
||||
# CONFIG_SND_DEBUG is not set
|
||||
CONFIG_SND_VMASTER=y
|
||||
CONFIG_SND_SEQUENCER=y
|
||||
CONFIG_SND_SEQ_DUMMY=m
|
||||
CONFIG_SND_SEQ_MIDI_EVENT=y
|
||||
CONFIG_SND_SEQ_MIDI=y
|
||||
CONFIG_SND_SEQ_VIRMIDI=m
|
||||
CONFIG_SND_MPU401_UART=y
|
||||
CONFIG_SND_DRIVERS=y
|
||||
CONFIG_SND_DUMMY=y
|
||||
CONFIG_SND_ALOOP=y
|
||||
CONFIG_SND_VIRMIDI=m
|
||||
CONFIG_SND_MTPAV=y
|
||||
CONFIG_SND_SERIAL_U16550=y
|
||||
CONFIG_SND_MPU401=y
|
||||
@ -6702,7 +6708,7 @@ CONFIG_QUOTA=y
|
||||
# CONFIG_QUOTA_NETLINK_INTERFACE is not set
|
||||
CONFIG_PRINT_QUOTA_WARNING=y
|
||||
# CONFIG_QUOTA_DEBUG is not set
|
||||
CONFIG_QUOTA_TREE=y
|
||||
CONFIG_QUOTA_TREE=m
|
||||
CONFIG_QFMT_V1=m
|
||||
CONFIG_QFMT_V2=m
|
||||
CONFIG_QUOTACTL=y
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Automatically generated file; DO NOT EDIT.
|
||||
# Linux/arm64 5.5.2 Kernel Configuration
|
||||
# Linux/arm64 5.5.11 Kernel Configuration
|
||||
#
|
||||
|
||||
#
|
||||
@ -853,8 +853,6 @@ CONFIG_XFRM_IPCOMP=m
|
||||
CONFIG_NET_KEY=m
|
||||
CONFIG_NET_KEY_MIGRATE=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_WIREGUARD=m
|
||||
# CONFIG_WIREGUARD_DEBUG is not set
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_IP_FIB_TRIE_STATS=y
|
||||
@ -1470,20 +1468,30 @@ CONFIG_BT_LEDS=y
|
||||
#
|
||||
# Bluetooth device drivers
|
||||
#
|
||||
CONFIG_BT_BCM=m
|
||||
CONFIG_BT_QCA=m
|
||||
# CONFIG_BT_HCIBTUSB is not set
|
||||
# CONFIG_BT_HCIBTSDIO is not set
|
||||
CONFIG_BT_HCIUART=m
|
||||
CONFIG_BT_HCIUART_SERDEV=y
|
||||
CONFIG_BT_HCIUART_H4=y
|
||||
CONFIG_BT_HCIUART_NOKIA=m
|
||||
# CONFIG_BT_HCIUART_BCSP is not set
|
||||
# CONFIG_BT_HCIUART_ATH3K is not set
|
||||
# CONFIG_BT_HCIUART_LL is not set
|
||||
CONFIG_BT_HCIUART_3WIRE=y
|
||||
# CONFIG_BT_HCIUART_INTEL is not set
|
||||
CONFIG_BT_HCIUART_BCM=y
|
||||
CONFIG_BT_HCIUART_QCA=y
|
||||
# CONFIG_BT_HCIUART_AG6XX is not set
|
||||
CONFIG_BT_HCIUART_MRVL=y
|
||||
# CONFIG_BT_HCIBCM203X is not set
|
||||
# CONFIG_BT_HCIBPA10X is not set
|
||||
# CONFIG_BT_HCIBFUSB is not set
|
||||
# CONFIG_BT_HCIVHCI is not set
|
||||
# CONFIG_BT_MRVL is not set
|
||||
CONFIG_BT_MTKSDIO=m
|
||||
CONFIG_BT_MTKUART=m
|
||||
# end of Bluetooth device drivers
|
||||
|
||||
# CONFIG_AF_RXRPC is not set
|
||||
@ -1505,10 +1513,6 @@ CONFIG_CFG80211_DEFAULT_PS=y
|
||||
# CONFIG_CFG80211_DEBUGFS is not set
|
||||
CONFIG_CFG80211_CRDA_SUPPORT=y
|
||||
# CONFIG_CFG80211_WEXT is not set
|
||||
CONFIG_LIB80211=m
|
||||
CONFIG_LIB80211_CRYPT_WEP=m
|
||||
CONFIG_LIB80211_CRYPT_CCMP=m
|
||||
# CONFIG_LIB80211_DEBUG is not set
|
||||
CONFIG_MAC80211=m
|
||||
CONFIG_MAC80211_HAS_RC=y
|
||||
CONFIG_MAC80211_RC_MINSTREL=y
|
||||
@ -2338,7 +2342,9 @@ CONFIG_NET_VENDOR_QLOGIC=y
|
||||
# CONFIG_NETXEN_NIC is not set
|
||||
# CONFIG_QED is not set
|
||||
CONFIG_NET_VENDOR_QUALCOMM=y
|
||||
CONFIG_QCA7000=m
|
||||
# CONFIG_QCA7000_SPI is not set
|
||||
CONFIG_QCA7000_UART=m
|
||||
CONFIG_QCOM_EMAC=m
|
||||
# CONFIG_RMNET is not set
|
||||
CONFIG_NET_VENDOR_RDC=y
|
||||
@ -2626,6 +2632,7 @@ CONFIG_RT2X00_LIB_USB=m
|
||||
CONFIG_RT2X00_LIB=m
|
||||
CONFIG_RT2X00_LIB_FIRMWARE=y
|
||||
CONFIG_RT2X00_LIB_CRYPTO=y
|
||||
CONFIG_RT2X00_LIB_LEDS=y
|
||||
# CONFIG_RT2X00_DEBUG is not set
|
||||
CONFIG_WLAN_VENDOR_REALTEK=y
|
||||
# CONFIG_RTL8180 is not set
|
||||
@ -2662,10 +2669,11 @@ CONFIG_WLCORE=m
|
||||
# CONFIG_WLCORE_SPI is not set
|
||||
CONFIG_WLCORE_SDIO=m
|
||||
CONFIG_WILINK_PLATFORM_DATA=y
|
||||
# CONFIG_RTL8723DS is not set
|
||||
CONFIG_RTL8822BU=m
|
||||
CONFIG_RTL8188EU=m
|
||||
CONFIG_RTL8821CU=m
|
||||
CONFIG_RTL8812AU=m
|
||||
CONFIG_88XXAU=m
|
||||
CONFIG_WLAN_VENDOR_ZYDAS=y
|
||||
# CONFIG_USB_ZD1201 is not set
|
||||
# CONFIG_ZD1211RW is not set
|
||||
@ -2888,6 +2896,7 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
|
||||
# CONFIG_INPUT_DRV260X_HAPTICS is not set
|
||||
# CONFIG_INPUT_DRV2665_HAPTICS is not set
|
||||
# CONFIG_INPUT_DRV2667_HAPTICS is not set
|
||||
CONFIG_INPUT_RAVE_SP_PWRBUTTON=m
|
||||
# CONFIG_RMI4_CORE is not set
|
||||
|
||||
#
|
||||
@ -3534,6 +3543,7 @@ CONFIG_BD70528_WATCHDOG=m
|
||||
# CONFIG_GPIO_WATCHDOG is not set
|
||||
# CONFIG_XILINX_WATCHDOG is not set
|
||||
# CONFIG_ZIIRAVE_WATCHDOG is not set
|
||||
CONFIG_RAVE_SP_WATCHDOG=m
|
||||
# CONFIG_ARM_SP805_WATCHDOG is not set
|
||||
# CONFIG_ARM_SBSA_WATCHDOG is not set
|
||||
# CONFIG_CADENCE_WATCHDOG is not set
|
||||
@ -3665,6 +3675,7 @@ CONFIG_MFD_ROHM_BD70528=m
|
||||
# CONFIG_MFD_STPMIC1 is not set
|
||||
CONFIG_MFD_STMFX=m
|
||||
CONFIG_MFD_VEXPRESS_SYSREG=y
|
||||
CONFIG_RAVE_SP_CORE=m
|
||||
# end of Multifunction device drivers
|
||||
|
||||
CONFIG_REGULATOR=y
|
||||
@ -4648,6 +4659,7 @@ CONFIG_BACKLIGHT_LP855X=y
|
||||
# CONFIG_BACKLIGHT_LV5207LP is not set
|
||||
# CONFIG_BACKLIGHT_BD6107 is not set
|
||||
# CONFIG_BACKLIGHT_ARCXCNN is not set
|
||||
CONFIG_BACKLIGHT_RAVE_SP=m
|
||||
# end of Backlight & LCD device support
|
||||
|
||||
CONFIG_VIDEOMODE_HELPERS=y
|
||||
@ -4679,7 +4691,8 @@ CONFIG_SND_PCM_ELD=y
|
||||
CONFIG_SND_PCM_IEC958=y
|
||||
CONFIG_SND_DMAENGINE_PCM=y
|
||||
CONFIG_SND_HWDEP=m
|
||||
CONFIG_SND_RAWMIDI=m
|
||||
CONFIG_SND_SEQ_DEVICE=y
|
||||
CONFIG_SND_RAWMIDI=y
|
||||
CONFIG_SND_JACK=y
|
||||
CONFIG_SND_JACK_INPUT_DEV=y
|
||||
# CONFIG_SND_OSSEMUL is not set
|
||||
@ -4693,9 +4706,15 @@ CONFIG_SND_VERBOSE_PROCFS=y
|
||||
# CONFIG_SND_DEBUG is not set
|
||||
CONFIG_SND_VMASTER=y
|
||||
CONFIG_SND_SEQUENCER=y
|
||||
CONFIG_SND_SEQ_DUMMY=m
|
||||
CONFIG_SND_SEQ_MIDI_EVENT=y
|
||||
CONFIG_SND_SEQ_MIDI=y
|
||||
CONFIG_SND_SEQ_VIRMIDI=m
|
||||
CONFIG_SND_MPU401_UART=y
|
||||
CONFIG_SND_DRIVERS=y
|
||||
CONFIG_SND_DUMMY=y
|
||||
CONFIG_SND_ALOOP=y
|
||||
CONFIG_SND_VIRMIDI=m
|
||||
CONFIG_SND_MTPAV=y
|
||||
CONFIG_SND_SERIAL_U16550=y
|
||||
CONFIG_SND_MPU401=y
|
||||
@ -6206,6 +6225,7 @@ CONFIG_XILINX_XADC=m
|
||||
# CONFIG_BME680 is not set
|
||||
# CONFIG_CCS811 is not set
|
||||
# CONFIG_IAQCORE is not set
|
||||
CONFIG_PMS7003=m
|
||||
CONFIG_SENSIRION_SGP30=m
|
||||
CONFIG_SPS30=m
|
||||
# CONFIG_VZ89X is not set
|
||||
@ -6595,6 +6615,7 @@ CONFIG_NVMEM=y
|
||||
CONFIG_NVMEM_SYSFS=y
|
||||
CONFIG_ROCKCHIP_EFUSE=y
|
||||
CONFIG_ROCKCHIP_OTP=y
|
||||
CONFIG_RAVE_SP_EEPROM=m
|
||||
|
||||
#
|
||||
# HW tracing support
|
||||
|
||||
8611
patch/kernel/odroidxu4-current/03-patch-5.4.23-24.patch
Normal file
8611
patch/kernel/odroidxu4-current/03-patch-5.4.23-24.patch
Normal file
File diff suppressed because it is too large
Load Diff
6231
patch/kernel/odroidxu4-current/03-patch-5.4.24-25.patch
Normal file
6231
patch/kernel/odroidxu4-current/03-patch-5.4.24-25.patch
Normal file
File diff suppressed because it is too large
Load Diff
4156
patch/kernel/odroidxu4-current/03-patch-5.4.25-26.patch
Normal file
4156
patch/kernel/odroidxu4-current/03-patch-5.4.25-26.patch
Normal file
File diff suppressed because it is too large
Load Diff
1989
patch/kernel/odroidxu4-current/03-patch-5.4.26-27.patch
Normal file
1989
patch/kernel/odroidxu4-current/03-patch-5.4.26-27.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -51,11 +51,11 @@ index 07998b60d56cf..5579165a84634 100644
|
||||
%.dtb: include/config/kernel.release scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||
|
||||
-PHONY += dtbs dtbs_install dt_binding_check
|
||||
-PHONY += dtbs dtbs_install dtbs_check
|
||||
+%.dtbo:
|
||||
+ $(Q)$(MAKE) -C $(dtstree)/overlays $@
|
||||
+
|
||||
+PHONY += dtbs dtbs_install dt_binding_check dtbos
|
||||
+PHONY += dtbs dtbs_install dtbs_check dtbos
|
||||
+dtbos:
|
||||
+ $(Q)$(MAKE) -C $(dtstree)/overlays
|
||||
dtbs dtbs_check: include/config/kernel.release scripts_dtc
|
||||
|
||||
@ -0,0 +1,113 @@
|
||||
From 0a2aa023e6180b6d0416ed61310a57ce24d03dba Mon Sep 17 00:00:00 2001
|
||||
From: Heiher <r@hev.cc>
|
||||
Date: Fri, 20 Mar 2020 00:46:13 +0800
|
||||
Subject: [PATCH] arm64: rk3399: increase CPU frequency during early boot
|
||||
|
||||
This is a workaround to fix the following issues. The right way should
|
||||
be to increase frequency of CPU before boot linux kernel in bootloader.
|
||||
|
||||
[ 92.165850] watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [swapper/0:1]
|
||||
[ 92.166643] Modules linked in:
|
||||
[ 92.167463] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.5.10-ARCH #1
|
||||
[ 92.168025] Hardware name: FriendlyElec NanoPi M4 (DT)
|
||||
[ 92.168672] pstate: 20000005 (nzCv daif -PAN -UAO)
|
||||
[ 92.169504] pc : trace_event_eval_update+0xfc/0x348
|
||||
[ 92.170164] lr : trace_event_eval_update+0x144/0x348
|
||||
[ 92.170652] sp : ffff80001004bcf0
|
||||
[ 92.171112] x29: ffff80001004bcf0 x28: 0000000000000001
|
||||
[ 92.171834] x27: ffff8000118d2228 x26: ffff8000111710b0
|
||||
[ 92.172502] x25: ffff80001180db98 x24: 000000000000000e
|
||||
[ 92.173134] x23: ffff800011746428 x22: 00000000000000ec
|
||||
[ 92.173749] x21: 0000000000000264 x20: 0000000000000158
|
||||
[ 92.174352] x19: ffff8000118bc778 x18: 0000000000000001
|
||||
[ 92.174951] x17: 00000000ed34b782 x16: 00000000d54c3662
|
||||
[ 92.175549] x15: 2d20377b1910031c x14: ff00000000000000
|
||||
[ 92.176140] x13: 0000000000000000 x12: 0000000000000007
|
||||
[ 92.176731] x11: 0101010101010101 x10: 0000000000000005
|
||||
[ 92.177322] x9 : 0000000000000003 x8 : 0000000000000008
|
||||
[ 92.177922] x7 : 1c0310197b37202d x6 : 2d20377b1910031c
|
||||
[ 92.178506] x5 : 0000000000000000 x4 : 000000000000000e
|
||||
[ 92.179085] x3 : ffff8000118bbbee x2 : 0000000000000045
|
||||
[ 92.179671] x1 : 000000000000002c x0 : 0000000000000000
|
||||
[ 92.180263] Call trace:
|
||||
[ 92.180921] trace_event_eval_update+0xfc/0x348
|
||||
[ 92.181652] tracer_init_tracefs+0x160/0x1e8
|
||||
[ 92.182304] do_one_initcall+0x4c/0x218
|
||||
[ 92.182949] kernel_init_freeable+0x1d0/0x240
|
||||
[ 92.183652] kernel_init+0x18/0x104
|
||||
[ 92.184245] ret_from_fork+0x10/0x18
|
||||
|
||||
[ 133.872912] cpufreq: cpufreq_online: CPU4: Running at unlisted freq: 12000 KHz
|
||||
[ 133.891606] cpufreq: cpufreq_online: CPU4: Unlisted initial frequency changed to: 408000 KHz
|
||||
---
|
||||
arch/arm64/kernel/setup.c | 43 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
|
||||
index 56f6645617548..81f4538f231fe 100644
|
||||
--- a/arch/arm64/kernel/setup.c
|
||||
+++ b/arch/arm64/kernel/setup.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/fs.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of_fdt.h>
|
||||
@@ -373,6 +374,36 @@ static inline bool cpu_can_disable(unsigned int cpu)
|
||||
return false;
|
||||
}
|
||||
|
||||
+static unsigned long __init cpu_max_freq(unsigned int cpu)
|
||||
+{
|
||||
+ unsigned long max_freq = 0;
|
||||
+ struct device_node *cpu_node;
|
||||
+ struct device_node *op_node;
|
||||
+ struct device_node *np;
|
||||
+
|
||||
+ cpu_node = of_get_cpu_node(cpu, NULL);
|
||||
+ if (!cpu_node)
|
||||
+ return 0;
|
||||
+
|
||||
+ op_node = of_parse_phandle(cpu_node, "operating-points-v2", 0);
|
||||
+ of_node_put(cpu_node);
|
||||
+ if (!op_node)
|
||||
+ return 0;
|
||||
+
|
||||
+ for_each_available_child_of_node(op_node, np) {
|
||||
+ u64 freq;
|
||||
+
|
||||
+ if (of_property_read_u64(np, "opp-hz", &freq) < 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (freq > max_freq)
|
||||
+ max_freq = freq;
|
||||
+ }
|
||||
+ of_node_put(op_node);
|
||||
+
|
||||
+ return max_freq;
|
||||
+}
|
||||
+
|
||||
static int __init topology_init(void)
|
||||
{
|
||||
int i;
|
||||
@@ -386,6 +417,18 @@ static int __init topology_init(void)
|
||||
register_cpu(cpu, i);
|
||||
}
|
||||
|
||||
+ for_each_possible_cpu(i) {
|
||||
+ struct device *cpu_dev = get_cpu_device(i);
|
||||
+ unsigned long cpu_freq = cpu_max_freq(i);
|
||||
+ if (cpu_dev && cpu_freq) {
|
||||
+ struct clk *cpu_clk = clk_get(cpu_dev, NULL);
|
||||
+ if (!PTR_ERR_OR_ZERO(cpu_clk)) {
|
||||
+ clk_set_rate(cpu_clk, cpu_freq);
|
||||
+ clk_put(cpu_clk);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(topology_init);
|
||||
@ -0,0 +1,113 @@
|
||||
From 0a2aa023e6180b6d0416ed61310a57ce24d03dba Mon Sep 17 00:00:00 2001
|
||||
From: Heiher <r@hev.cc>
|
||||
Date: Fri, 20 Mar 2020 00:46:13 +0800
|
||||
Subject: [PATCH] arm64: rk3399: increase CPU frequency during early boot
|
||||
|
||||
This is a workaround to fix the following issues. The right way should
|
||||
be to increase frequency of CPU before boot linux kernel in bootloader.
|
||||
|
||||
[ 92.165850] watchdog: BUG: soft lockup - CPU#4 stuck for 22s! [swapper/0:1]
|
||||
[ 92.166643] Modules linked in:
|
||||
[ 92.167463] CPU: 4 PID: 1 Comm: swapper/0 Not tainted 5.5.10-ARCH #1
|
||||
[ 92.168025] Hardware name: FriendlyElec NanoPi M4 (DT)
|
||||
[ 92.168672] pstate: 20000005 (nzCv daif -PAN -UAO)
|
||||
[ 92.169504] pc : trace_event_eval_update+0xfc/0x348
|
||||
[ 92.170164] lr : trace_event_eval_update+0x144/0x348
|
||||
[ 92.170652] sp : ffff80001004bcf0
|
||||
[ 92.171112] x29: ffff80001004bcf0 x28: 0000000000000001
|
||||
[ 92.171834] x27: ffff8000118d2228 x26: ffff8000111710b0
|
||||
[ 92.172502] x25: ffff80001180db98 x24: 000000000000000e
|
||||
[ 92.173134] x23: ffff800011746428 x22: 00000000000000ec
|
||||
[ 92.173749] x21: 0000000000000264 x20: 0000000000000158
|
||||
[ 92.174352] x19: ffff8000118bc778 x18: 0000000000000001
|
||||
[ 92.174951] x17: 00000000ed34b782 x16: 00000000d54c3662
|
||||
[ 92.175549] x15: 2d20377b1910031c x14: ff00000000000000
|
||||
[ 92.176140] x13: 0000000000000000 x12: 0000000000000007
|
||||
[ 92.176731] x11: 0101010101010101 x10: 0000000000000005
|
||||
[ 92.177322] x9 : 0000000000000003 x8 : 0000000000000008
|
||||
[ 92.177922] x7 : 1c0310197b37202d x6 : 2d20377b1910031c
|
||||
[ 92.178506] x5 : 0000000000000000 x4 : 000000000000000e
|
||||
[ 92.179085] x3 : ffff8000118bbbee x2 : 0000000000000045
|
||||
[ 92.179671] x1 : 000000000000002c x0 : 0000000000000000
|
||||
[ 92.180263] Call trace:
|
||||
[ 92.180921] trace_event_eval_update+0xfc/0x348
|
||||
[ 92.181652] tracer_init_tracefs+0x160/0x1e8
|
||||
[ 92.182304] do_one_initcall+0x4c/0x218
|
||||
[ 92.182949] kernel_init_freeable+0x1d0/0x240
|
||||
[ 92.183652] kernel_init+0x18/0x104
|
||||
[ 92.184245] ret_from_fork+0x10/0x18
|
||||
|
||||
[ 133.872912] cpufreq: cpufreq_online: CPU4: Running at unlisted freq: 12000 KHz
|
||||
[ 133.891606] cpufreq: cpufreq_online: CPU4: Unlisted initial frequency changed to: 408000 KHz
|
||||
---
|
||||
arch/arm64/kernel/setup.c | 43 +++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 43 insertions(+)
|
||||
|
||||
diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
|
||||
index 56f6645617548..81f4538f231fe 100644
|
||||
--- a/arch/arm64/kernel/setup.c
|
||||
+++ b/arch/arm64/kernel/setup.c
|
||||
@@ -23,6 +23,7 @@
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/smp.h>
|
||||
#include <linux/fs.h>
|
||||
+#include <linux/clk.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/memblock.h>
|
||||
#include <linux/of_fdt.h>
|
||||
@@ -373,6 +374,36 @@ static inline bool cpu_can_disable(unsigned int cpu)
|
||||
return false;
|
||||
}
|
||||
|
||||
+static unsigned long __init cpu_max_freq(unsigned int cpu)
|
||||
+{
|
||||
+ unsigned long max_freq = 0;
|
||||
+ struct device_node *cpu_node;
|
||||
+ struct device_node *op_node;
|
||||
+ struct device_node *np;
|
||||
+
|
||||
+ cpu_node = of_get_cpu_node(cpu, NULL);
|
||||
+ if (!cpu_node)
|
||||
+ return 0;
|
||||
+
|
||||
+ op_node = of_parse_phandle(cpu_node, "operating-points-v2", 0);
|
||||
+ of_node_put(cpu_node);
|
||||
+ if (!op_node)
|
||||
+ return 0;
|
||||
+
|
||||
+ for_each_available_child_of_node(op_node, np) {
|
||||
+ u64 freq;
|
||||
+
|
||||
+ if (of_property_read_u64(np, "opp-hz", &freq) < 0)
|
||||
+ continue;
|
||||
+
|
||||
+ if (freq > max_freq)
|
||||
+ max_freq = freq;
|
||||
+ }
|
||||
+ of_node_put(op_node);
|
||||
+
|
||||
+ return max_freq;
|
||||
+}
|
||||
+
|
||||
static int __init topology_init(void)
|
||||
{
|
||||
int i;
|
||||
@@ -386,6 +417,18 @@ static int __init topology_init(void)
|
||||
register_cpu(cpu, i);
|
||||
}
|
||||
|
||||
+ for_each_possible_cpu(i) {
|
||||
+ struct device *cpu_dev = get_cpu_device(i);
|
||||
+ unsigned long cpu_freq = cpu_max_freq(i);
|
||||
+ if (cpu_dev && cpu_freq) {
|
||||
+ struct clk *cpu_clk = clk_get(cpu_dev, NULL);
|
||||
+ if (!PTR_ERR_OR_ZERO(cpu_clk)) {
|
||||
+ clk_set_rate(cpu_clk, cpu_freq);
|
||||
+ clk_put(cpu_clk);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
return 0;
|
||||
}
|
||||
subsys_initcall(topology_init);
|
||||
Loading…
Reference in New Issue
Block a user