| Electronic Components Datasheet Search |
|
UM0851 Datasheet(PDF) 231 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM0851 Datasheet(HTML) 231 Page - STMicroelectronics |
|
231 / 245 page ![]() UM0851 Power management section Doc ID 16604 Rev 2 231/245 10.3.3 CPU freq framework API The architecture specific CPUfreq driver registers into the CPUfreq core via the following structure. struct cpufreq_driver { struct module*owner; char name[CPUFREQ_NAME_LEN]; u8 flags; int (*init)(struct cpufreq_policy *policy); int (*verify)(struct cpufreq_policy *policy); int (*setpolicy)(struct cpufreq_policy *policy); int (*target)(struct cpufreq_policy *policy, unsigned int target_freq, unsigned int relation); /* should be defined, if possible */ unsigned int(*get)(unsigned int cpu); /* optional */ unsigned int (*getavg)(unsigned int cpu); int (*exit)(struct cpufreq_policy *policy); int (*suspend)(struct cpufreq_policy *policy, pm_message_t pmsg); int (*resume)(struct cpufreq_policy *policy); struct freq_attr **attr; }; Above defined structure provide few call back functions that have to be added in the SPEAr architecture code to provide the transitions into the new frequency for the CPU as requested by the CPUfreq framework. ● init (Per-CPU Initialization): Whenever a new CPU is registered with the device model, or after the CPUfreq driver registers itself, the per-CPU initialization function cpufreq_driver. init is called. The driver provides in the "Policy" related information to the CPUfreq core. This includes the CPU operating/min/max frequency, and information related to the governor that the core should use for switching the frequency. The policy related information is captured in the following data structure by the kernel: struct cpufreq_policy { cpumask_t cpus; /* CPUs requiring sw coordination */ cpumask_t related_cpus; /* CPUs with any coordination */ unsigned int shared_type; /* ANY or ALL affected CPUs should set cpufreq */ unsigned int cpu; /* cpu nr of registered CPU */ struct cpufreq_cpuinfo cpuinfo;/* see above */ unsigned int min; /* in kHz */ unsigned int max; /* in kHz */ unsigned int cur; /* in kHz, only needed if cpufreq governors are used */ unsigned int policy; /* see above */ struct cpufreq_governor *governor; struct work_struct update; /* if update_policy() needs to be called, but you're in IRQ context */ struct cpufreq_real_policy user_policy; struct kobject kobj; struct completion kobj_unregister; ● Verify: When the user decides that a new policy (consisting of "policy, governor, min, max") shall be set, this policy must be validated so that incompatible values can be corrected. ● Target: The target call has three arguments: struct cpufreq_policy *policy, unsigned int target_frequency, unsigned int relation. The CPUfreq driver sets the new frequency when called here. Apart from the change in frequency the driver must also notify into |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |