Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SmartassV2 governor #47

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2,415 changes: 2,415 additions & 0 deletions arch/arm/configs/a10-cm9_defconfig

Large diffs are not rendered by default.

2,144 changes: 2,144 additions & 0 deletions arch/arm/configs/zatab_defconfig

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions arch/arm/mach-sun4i/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ config SW_DEBUG_UART
Choose the UART on which kernel low-level debug messages should be
output.

source "arch/arm/mach-sun4i/wifi/Kconfig"

endif
1 change: 1 addition & 0 deletions arch/arm/mach-sun4i/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
obj-y += clock/
obj-y += dma/
obj-y += wifi/
obj-y += core.o devices.o sys_config.o
obj-$(CONFIG_PM) += pm/
obj-$(CONFIG_CPU_FREQ) += cpu-freq/
4 changes: 4 additions & 0 deletions arch/arm/mach-sun4i/wifi/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config SUN4I_RTL8192CU
tristate "Enable RTL8192CU chip"
depends on RTL8192CU
default n
1 change: 1 addition & 0 deletions arch/arm/mach-sun4i/wifi/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
obj-$(CONFIG_SUN4I_RTL8192CU) += sun4i-rtl8192cu.o
40 changes: 40 additions & 0 deletions arch/arm/mach-sun4i/wifi/sun4i-rtl8192cu.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <mach/sys_config.h>

extern int sw_usb_disable_hcd(__u32 usbc_no);
extern int sw_usb_enable_hcd(__u32 usbc_no);
static int usb_wifi_host = 2;

static int __init sun4i_enable_rtl8192cu_wifi(void)
{
int ret = 0;

ret = script_parser_fetch("usb_wifi_para", "usb_wifi_usbc_num", (int *)&usb_wifi_host, 64);
if(ret != 0) {
printk(KERN_ERR "script_parser_fetch usb_wifi_usbc_num failed\n");
ret = -ENOMEM;
return ret;
}

printk(KERN_INFO "sw_usb_enable_hcd: usbc_num = %d\n", usb_wifi_host);

sw_usb_enable_hcd(usb_wifi_host);

return ret;
}

static void __exit sun4i_disable_rtl8192cu_wifi(void)
{
printk(KERN_INFO "sw_usb_disable_hcd: usbc_num = %d\n", usb_wifi_host);
sw_usb_disable_hcd(usb_wifi_host);
}


module_init(sun4i_enable_rtl8192cu_wifi);
module_exit(sun4i_disable_rtl8192cu_wifi);

MODULE_DESCRIPTION("Enable RTL8192CU on SUN4I");
MODULE_LICENSE("GPL");

13 changes: 13 additions & 0 deletions drivers/cpufreq/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,12 @@ config CPU_FREQ_DEFAULT_GOV_FANTASY
loading your cpufreq low-level hardware driver, using the
'fantasy' governor for latency-sensitive workloads.

config CPU_FREQ_DEFAULT_GOV_SMARTASS2
bool "smartass2"
select CPU_FREQ_GOV_SMARTASS2
help
Use the CPUFreq governor 'smartassV2' as default.

endchoice

config CPU_FREQ_GOV_PERFORMANCE
Expand Down Expand Up @@ -233,6 +239,13 @@ config CPU_FREQ_GOV_FANTASY

If in doubt, say N.

config CPU_FREQ_GOV_SMARTASS2
tristate "'smartassV2' cpufreq governor"
depends on CPU_FREQ
help
'smartassV2' - a "smart" governor
If in doubt, say N.

config CPU_FREQ_USR_EVNT_NOTIFY
bool "CPU frequency user event notify"
help
Expand Down
1 change: 1 addition & 0 deletions drivers/cpufreq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND) += cpufreq_ondemand.o
obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE) += cpufreq_conservative.o
obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) += cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_FANTASY) += cpufreq_fantasy.o
obj-$(CONFIG_CPU_FREQ_GOV_SMARTASS2) += cpufreq_smartass2.o
# CPUfreq cross-arch helpers
obj-$(CONFIG_CPU_FREQ_TABLE) += freq_table.o

Expand Down