From: Stijn Tintel Date: Sun, 14 May 2017 01:40:11 +0000 (+0200) Subject: brcm2708: enable cpufreq X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=c454fab0f2a82a24631366ed3c95fd8b42c244f9;p=librecmc%2Flibrecmc.git brcm2708: enable cpufreq With cpufreq disabled, the CPU stays locked at the frequency set by the bootloader. This severely degrades performance as the bootloader sets the CPU at the lowest frequency by default. Enable cpufreq for all subtargets and use the ondemand governor. Tested bcm2708 on RPi0W. Tested bcm2709 and bcm2710 on RPi3. Reported-by: Bryan Mayland Signed-off-by: Stijn Tintel --- diff --git a/target/linux/brcm2708/bcm2708/config-4.9 b/target/linux/brcm2708/bcm2708/config-4.9 index 96d8735b4d..7eb5a72bc9 100644 --- a/target/linux/brcm2708/bcm2708/config-4.9 +++ b/target/linux/brcm2708/bcm2708/config-4.9 @@ -1,6 +1,5 @@ # CONFIG_AIO is not set CONFIG_ALIGNMENT_TRAP=y -# CONFIG_AMBA_PL08X is not set CONFIG_ARCH_BCM=y CONFIG_ARCH_BCM2835=y CONFIG_ARCH_CLOCKSOURCE_DATA=y @@ -26,6 +25,7 @@ CONFIG_ARCH_WANT_GENERAL_HUGETLB=y CONFIG_ARCH_WANT_IPC_PARSE_VERSION=y CONFIG_ARM=y CONFIG_ARM_AMBA=y +CONFIG_ARM_BCM2835_CPUFREQ=y CONFIG_ARM_CPU_SUSPEND=y CONFIG_ARM_ERRATA_411920=y CONFIG_ARM_HAS_SG_CHAIN=y @@ -79,6 +79,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y CONFIG_COMMON_CLK=y CONFIG_CONFIGFS_FS=y CONFIG_CONSOLE_TRANSLATIONS=y +# CONFIG_CPUFREQ_DT is not set CONFIG_CPU_32v6=y CONFIG_CPU_32v6K=y CONFIG_CPU_ABRT_EV6=y @@ -88,6 +89,17 @@ CONFIG_CPU_CACHE_VIPT=y CONFIG_CPU_COPY_V6=y CONFIG_CPU_CP15=y CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y # CONFIG_CPU_ICACHE_DISABLE is not set CONFIG_CPU_IDLE=y @@ -95,6 +107,7 @@ CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_PABRT_V6=y CONFIG_CPU_PM=y +# CONFIG_CPU_THERMAL is not set CONFIG_CPU_TLB_V6=y CONFIG_CPU_V6K=y CONFIG_CRC16=y @@ -290,7 +303,6 @@ CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y -# CONFIG_PL330_DMA is not set CONFIG_PM=y CONFIG_PM_CLK=y # CONFIG_PM_DEBUG is not set diff --git a/target/linux/brcm2708/bcm2709/config-4.9 b/target/linux/brcm2708/bcm2709/config-4.9 index 0d5f326a06..9ee233817c 100644 --- a/target/linux/brcm2708/bcm2709/config-4.9 +++ b/target/linux/brcm2708/bcm2709/config-4.9 @@ -1,6 +1,5 @@ # CONFIG_AIO is not set CONFIG_ALIGNMENT_TRAP=y -# CONFIG_AMBA_PL08X is not set CONFIG_ARCH_BCM=y CONFIG_ARCH_BCM2835=y CONFIG_ARCH_CLOCKSOURCE_DATA=y @@ -30,6 +29,7 @@ CONFIG_ARM=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_ARM_BCM2835_CPUFREQ=y CONFIG_ARM_CPU_SUSPEND=y CONFIG_ARM_HAS_SG_CHAIN=y CONFIG_ARM_L1_CACHE_SHIFT=6 @@ -86,6 +86,7 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y CONFIG_COMMON_CLK=y CONFIG_CONFIGFS_FS=y CONFIG_CONSOLE_TRANSLATIONS=y +# CONFIG_CPUFREQ_DT is not set CONFIG_CPU_32v6K=y CONFIG_CPU_32v7=y CONFIG_CPU_ABRT_EV7=y @@ -95,6 +96,17 @@ CONFIG_CPU_CACHE_VIPT=y CONFIG_CPU_COPY_V6=y CONFIG_CPU_CP15=y CONFIG_CPU_CP15_MMU=y +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y CONFIG_CPU_HAS_ASID=y # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set # CONFIG_CPU_ICACHE_DISABLE is not set @@ -104,6 +116,7 @@ CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_PABRT_V7=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y +# CONFIG_CPU_THERMAL is not set CONFIG_CPU_TLB_V7=y CONFIG_CPU_V7=y CONFIG_CRC16=y @@ -314,7 +327,6 @@ CONFIG_PERF_USE_VMALLOC=y CONFIG_PGTABLE_LEVELS=2 CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y -# CONFIG_PL330_DMA is not set CONFIG_PM=y CONFIG_PM_CLK=y # CONFIG_PM_DEBUG is not set diff --git a/target/linux/brcm2708/bcm2710/config-4.9 b/target/linux/brcm2708/bcm2710/config-4.9 index b7ce5797e1..f672c400ec 100644 --- a/target/linux/brcm2708/bcm2710/config-4.9 +++ b/target/linux/brcm2708/bcm2710/config-4.9 @@ -1,6 +1,5 @@ CONFIG_64BIT=y # CONFIG_AIO is not set -# CONFIG_AMBA_PL08X is not set CONFIG_ARCH_BCM2835=y CONFIG_ARCH_CLOCKSOURCE_DATA=y CONFIG_ARCH_DMA_ADDR_T_64BIT=y @@ -56,6 +55,7 @@ CONFIG_ARM64_VHE=y CONFIG_ARM_AMBA=y CONFIG_ARM_ARCH_TIMER=y CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y +CONFIG_ARM_BCM2835_CPUFREQ=y CONFIG_ARM_GIC=y CONFIG_ARM_GIC_V3=y CONFIG_ARM_PSCI_FW=y @@ -108,13 +108,26 @@ CONFIG_COMMON_CLK_XGENE=y # CONFIG_COMPAT is not set CONFIG_CONFIGFS_FS=y CONFIG_CONSOLE_TRANSLATIONS=y +# CONFIG_CPUFREQ_DT is not set # CONFIG_CPU_BIG_ENDIAN is not set +CONFIG_CPU_FREQ=y +CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_GOV_ATTR_SET=y +CONFIG_CPU_FREQ_GOV_COMMON=y +CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y +CONFIG_CPU_FREQ_GOV_ONDEMAND=y +CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +CONFIG_CPU_FREQ_GOV_POWERSAVE=y +CONFIG_CPU_FREQ_GOV_USERSPACE=y +CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_HOTPLUG_STATE_CONTROL is not set CONFIG_CPU_IDLE=y CONFIG_CPU_IDLE_GOV_LADDER=y CONFIG_CPU_IDLE_GOV_MENU=y CONFIG_CPU_PM=y CONFIG_CPU_RMAP=y +# CONFIG_CPU_THERMAL is not set CONFIG_CRC16=y CONFIG_CRYPTO_AEAD=y CONFIG_CRYPTO_AEAD2=y @@ -295,7 +308,6 @@ CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MODULES_USE_ELF_RELA=y # CONFIG_MTD is not set CONFIG_MUTEX_SPIN_ON_OWNER=y -# CONFIG_MV_XOR_V2 is not set CONFIG_NEED_DMA_MAP_STATE=y CONFIG_NEED_SG_DMA_LENGTH=y CONFIG_NET_FLOW_LIMIT=y @@ -331,7 +343,6 @@ CONFIG_PHYS_ADDR_T_64BIT=y # CONFIG_PHY_XGENE is not set CONFIG_PINCTRL=y CONFIG_PINCTRL_BCM2835=y -# CONFIG_PL330_DMA is not set CONFIG_PM=y CONFIG_PM_CLK=y # CONFIG_PM_DEBUG is not set @@ -390,7 +401,6 @@ CONFIG_SRCU=y CONFIG_SUSPEND=y CONFIG_SUSPEND_FREEZER=y CONFIG_SWIOTLB=y -# CONFIG_SYSCON_REBOOT_MODE is not set CONFIG_SYSCTL_EXCEPTION_TRACE=y CONFIG_SYS_SUPPORTS_HUGETLBFS=y # CONFIG_TEXTSEARCH is not set