[oe-commits] org.oe.dev linux-omap2 git: check in WIP cpufreq patches for beagleboard

koen commit oe at amethyst.openembedded.net
Mon Sep 1 18:04:21 UTC 2008


linux-omap2 git: check in WIP cpufreq patches for beagleboard

Author: koen at openembedded.org
Branch: org.openembedded.dev
Revision: 3409bc1c06c4e7b69c7d0d59afa555dac069ccfa
ViewMTN: http://monotone.openembedded.org/revision/info/3409bc1c06c4e7b69c7d0d59afa555dac069ccfa
Files:
1
packages/linux/linux-omap2-git/beagleboard/01-beagle-cpufreq.diff
packages/linux/linux-omap2-git/beagleboard/01-omap3-cpufreq.eml
packages/linux/linux-omap2-git/beagleboard/01-omappm-srf.eml
packages/linux/linux-omap2-git/beagleboard/01-postrate-notifier.eml
packages/linux/linux-omap2-git/beagleboard/02-beagle_use_gptimer12
packages/linux/linux-omap2-git/beagleboard/02-omappm-mpu-latency-modeling.eml
packages/linux/linux-omap2-git/beagleboard/02-postrate-notifier.eml
packages/linux/linux-omap2-git/beagleboard/03-omappm-omap3srf.eml
packages/linux/linux-omap2-git/beagleboard/04-omappm-srf-noop.eml
packages/linux/linux-omap2-git/beagleboard/05-omappm-virtualclocks.eml
packages/linux/linux-omap2-git/beagleboard/06-omappm-opp-resource-modeling.eml
packages/linux/linux-omap2-git/beagleboard/07-omappm-srf-updates.eml
packages/linux/linux-omap2-git/beagleboard/08-omappm-voltagescaling.eml
packages/linux/linux-omap2-git/beagleboard/09-omappm-vdd2-scaling.eml
packages/linux/linux-omap2-git/beagleboard/10-omappm-off-mode.eml
packages/linux/linux-omap2-git/beagleboard/omap23-pm-noop.eml
packages/linux/linux-omap2-git/beagleboard/defconfig
packages/linux/linux-omap2_git.bb
Diffs:

#
# mt diff -r3585d6baf55c5ee551bb8a54e4744fc220e980b6 -r3409bc1c06c4e7b69c7d0d59afa555dac069ccfa
#
#
#
# add_file "packages/linux/linux-omap2-git/beagleboard/01-beagle-cpufreq.diff"
#  content [96ed3dd844aa8bf8495491744135a8ea8d600ec1]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/01-omap3-cpufreq.eml"
#  content [4076cd6689ad74f9f7812fb562e585fc34b64c76]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/01-omappm-srf.eml"
#  content [551869f212cb1ef8e14d624e603917c60d27aa80]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/01-postrate-notifier.eml"
#  content [068077c565b70340de9db55433f177b15313caf9]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/02-beagle_use_gptimer12"
#  content [34c3b789fd3e7e791ccc0790ece9bb9fda971621]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/02-omappm-mpu-latency-modeling.eml"
#  content [16dcf3f8fb5d2f64509180913f62de59de486181]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/02-postrate-notifier.eml"
#  content [09d70d797035e84eaa9e3d6ca281bdf6bce66eb0]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/03-omappm-omap3srf.eml"
#  content [c1d23c704fe8058c084b0b1784f6b8d1f92d3b2e]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/04-omappm-srf-noop.eml"
#  content [df724c76570a417f3194f63c9d1406349ad52edc]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/05-omappm-virtualclocks.eml"
#  content [ba8ac56567354e68383bfbb3cc88ea33d4c5ebf3]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/06-omappm-opp-resource-modeling.eml"
#  content [70036f26d3b13ca69a67266d7c87b6eb384a0067]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/07-omappm-srf-updates.eml"
#  content [9ede7f93bd9c7dac81cc0ae32ca6f645c333a046]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/08-omappm-voltagescaling.eml"
#  content [ecb5c37f37ddd6fc9fb1ac3e651e1adfa449745d]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/09-omappm-vdd2-scaling.eml"
#  content [1ea8fb2c6d6969072393aab4333c2932ae1d3220]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/10-omappm-off-mode.eml"
#  content [1e9ece815a14625b1311c698fe6fd05030719023]
# 
# add_file "packages/linux/linux-omap2-git/beagleboard/omap23-pm-noop.eml"
#  content [86ed0cbd5ad5672bc105b673314b0f35fd643a5e]
# 
# patch "packages/linux/linux-omap2-git/beagleboard/defconfig"
#  from [c954dd21d240f87d03dfc68e2df06ebb53d28017]
#    to [c7f5a60692f8f86b613a87dbcf44fb08339c2e0e]
# 
# patch "packages/linux/linux-omap2_git.bb"
#  from [b53445da272c442accbe496ee1c8615bc509aec8]
#    to [87915c4f021c2162daeb74e1fb307a622f4600c6]
#
============================================================
--- packages/linux/linux-omap2-git/beagleboard/01-beagle-cpufreq.diff	96ed3dd844aa8bf8495491744135a8ea8d600ec1
+++ packages/linux/linux-omap2-git/beagleboard/01-beagle-cpufreq.diff	96ed3dd844aa8bf8495491744135a8ea8d600ec1
@@ -0,0 +1,178 @@
+--- /tmp/board-omap3beagle.h	2008-08-11 15:40:17.000000000 +0200
++++ git/include/asm-arm/arch-omap/board-omap3beagle.h	2008-08-11 15:41:32.433198000 +0200
+@@ -29,5 +29,41 @@
+ #ifndef __ASM_ARCH_OMAP3_BEAGLE_H
+ #define __ASM_ARCH_OMAP3_BEAGLE_H
+ 
++/* MPU speeds */
++#define S600M   600000000
++#define S550M   550000000
++#define S500M   500000000
++#define S250M   250000000
++#define S125M   125000000
++
++/* IVA speeds */
++#define S430M   430000000
++#define S400M   400000000
++#define S360M   360000000
++#define S180M   180000000
++#define S90M    90000000
++
++/* L3 speeds */
++#define S83M    83000000
++#define S166M   166000000
++
++/* VDD1 OPPS */
++#define VDD1_OPP1       0x1
++#define VDD1_OPP2       0x2
++#define VDD1_OPP3       0x3
++#define VDD1_OPP4       0x4
++#define VDD1_OPP5       0x5
++
++/* VDD2 OPPS */
++#define VDD2_OPP1       0x1
++#define VDD2_OPP2       0x2
++#define VDD2_OPP3       0x3
++
++#define MIN_VDD1_OPP    VDD1_OPP1
++#define MAX_VDD1_OPP    VDD1_OPP5
++#define MIN_VDD2_OPP    VDD2_OPP1
++#define MAX_VDD2_OPP    VDD2_OPP3
++
++
+ #endif /* __ASM_ARCH_OMAP3_BEAGLE_H */
+ 
+--- /tmp/resource34xx.c	2008-08-11 16:11:28.000000000 +0200
++++ git/arch/arm/mach-omap2/resource34xx.c	2008-08-11 16:20:18.803198000 +0200
+@@ -173,7 +173,7 @@
+ 
+ int set_opp(struct shared_resource *resp, u32 target_level)
+ {
+-#ifdef CONFIG_MACH_OMAP_3430SDP
++#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE)
+ 	unsigned long mpu_freq, l3_freq, tput;
+ 	int ind;
+ 	struct bus_throughput_db *tput_db;
+@@ -248,7 +248,7 @@
+  */
+ void init_freq(struct shared_resource *resp)
+ {
+-#ifdef CONFIG_MACH_OMAP_3430SDP
++#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE)
+ 	char *linked_res_name;
+ 	resp->no_of_users = 0;
+ 
+@@ -269,7 +269,7 @@
+ 
+ int set_freq(struct shared_resource *resp, u32 target_level)
+ {
+-#ifdef CONFIG_MACH_OMAP_3430SDP
++#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE)
+ 	unsigned int vdd1_opp;
+ 
+ 	if (strcmp(resp->name, "mpu_freq") == 0)
+--- /tmp/clock34xx.c	2008-08-11 15:57:48.000000000 +0200
++++ git/arch/arm/mach-omap2/clock34xx.c	2008-08-11 16:22:43.093198000 +0200
+@@ -773,7 +773,7 @@
+ 	dpll2_clk = clk_get(NULL, "dpll2_ck");
+ 	dpll3_clk = clk_get(NULL, "dpll3_ck");
+ 
+-#ifdef CONFIG_MACH_OMAP_3430SDP
++#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE)
+ 	mpu_speed = dpll1_clk->rate;
+ 	prcm_vdd = vdd1_rate_table + MAX_VDD1_OPP;
+ 	for (; prcm_vdd->speed; prcm_vdd--) {
+@@ -836,7 +836,7 @@
+ 	return (prcm_config+1)->opp;
+ }
+ 
+-#ifdef CONFIG_MACH_OMAP_3430SDP
++#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE)
+ static void omap3_table_recalc(struct clk *clk)
+ {
+ 	if ((clk != &virt_vdd1_prcm_set) && (clk != &virt_vdd2_prcm_set))
+--- /tmp/board-omap3beagle.c	2008-08-11 15:54:04.000000000 +0200
++++ git/arch/arm/mach-omap2/board-omap3beagle.c	2008-08-11 16:25:11.333198000 +0200
+@@ -39,9 +39,62 @@
+ #include <asm/arch/gpmc.h>
+ #include <asm/arch/nand.h>
+ 
++#include <asm/arch/clock.h>
++
+ #define GPMC_CS0_BASE  0x60
+ #define GPMC_CS_SIZE   0x30
+ 
++struct vdd_prcm_config vdd1_rate_table[] = {
++       {0, 0, 0},
++       /*OPP1*/
++       {S125M, VDD1_OPP1, 0},
++       /*OPP2*/
++       {S250M, VDD1_OPP2, 0},
++       /*OPP3*/
++       {S500M, VDD1_OPP3, 0},
++       /*OPP4*/
++       {S550M, VDD1_OPP4, 0},
++       /*OPP5*/
++       {S600M, VDD1_OPP5, 0},
++};
++
++struct vdd_prcm_config vdd2_rate_table[] = {
++       {0, 0, 0},
++       /*OPP1*/
++       {0, VDD2_OPP1, 0},
++       /*OPP2*/
++       {S83M, VDD2_OPP2, 0},
++       /*OPP3*/
++       {S166M, VDD2_OPP3, 0},
++};
++
++struct vdd_prcm_config iva2_rate_table[] = {
++       {0, 0, 0},
++       /*OPP1*/
++       {S90M, VDD1_OPP1, 0},
++       /*OPP2*/
++       {S180M, VDD1_OPP2, 0},
++       /*OPP3*/
++       {S360M, VDD1_OPP3, 0},
++       /*OPP4*/
++       {S400M, VDD1_OPP4, 0},
++       /*OPP5*/
++       {S430M, VDD1_OPP5, 0},
++};
++
++u8 vdd1_volts[MAX_VDD1_OPP] = {
++        /* Vsel corresponding to 0.9V (OPP1), 1.00V (OPP2),
++         * 1.20V (OPP3), 1.27V (OPP4), 1.35 (OPP5)
++         */
++        0x18, 0x20, 0x30, 0x36, 0x3C
++};
++
++u8 vdd2_volts[MAX_VDD2_OPP] = {
++        /* Vsel corresponding to 0.9V (OPP1), 1.00V (OPP2), 1.15 (OPP3) */
++        0x18, 0x20, 0x2C
++};
++
++
+ static struct mtd_partition omap3beagle_nand_partitions[] = {
+ 	/* All the partition sizes are listed in terms of NAND block size */
+ 	{
+--- /tmp/cpu-omap.c	2008-08-11 15:43:01.000000000 +0200
++++ git/arch/arm/plat-omap/cpu-omap.c	2008-08-11 16:31:24.943198000 +0200
+@@ -47,7 +47,7 @@
+ 
+ static struct clk *mpu_clk;
+ 
+-#ifdef CONFIG_MACH_OMAP_3430SDP
++#if defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE)
+ extern struct vdd_prcm_config vdd1_rate_table[];
+ extern struct vdd_prcm_config vdd2_rate_table[];
+ extern struct vdd_prcm_config iva2_rate_table[];
+@@ -127,7 +127,7 @@
+ 	ret = clk_set_rate(mpu_clk, freqs.new * 1000);
+ 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+ #elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)\
+-	&& defined(CONFIG_MACH_OMAP_3430SDP)
++	&& (defined(CONFIG_MACH_OMAP_3430SDP) || defined(CONFIG_MACH_OMAP3_BEAGLE))
+ 	{
+ 		int ind;
+ 		for (ind = 1; ind <= MAX_VDD1_OPP; ind++) {
============================================================
--- packages/linux/linux-omap2-git/beagleboard/01-omap3-cpufreq.eml	4076cd6689ad74f9f7812fb562e585fc34b64c76
+++ packages/linux/linux-omap2-git/beagleboard/01-omap3-cpufreq.eml	4076cd6689ad74f9f7812fb562e585fc34b64c76
@@ -0,0 +1,319 @@
+CPUFreq driver for OMAP3
+
+Signed-off-by: Rajendra Nayak <rnayak at ti.com>
+---
+ arch/arm/configs/omap_3430sdp_defconfig |   19 +++++++
+ arch/arm/mach-omap2/clock34xx.c         |   42 ++++++++++++++++-
+ arch/arm/mach-omap2/resource34xx.c      |    6 --
+ arch/arm/plat-omap/cpu-omap.c           |   78 ++++++++++++++++++++++++++++++--
+ drivers/cpufreq/cpufreq.c               |    2
+ 5 files changed, 136 insertions(+), 11 deletions(-)
+
+Index: linux-omap-2.6/arch/arm/mach-omap2/clock34xx.c
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/mach-omap2/clock34xx.c	2008-08-11
+17:21:57.000000000 +0530
++++ linux-omap-2.6/arch/arm/mach-omap2/clock34xx.c	2008-08-11
+17:36:53.000000000 +0530
+@@ -31,6 +31,7 @@
+ #include <asm/arch/sram.h>
+ #include <asm/div64.h>
+ #include <asm/bitops.h>
++#include <linux/cpufreq.h>
+
+ #include <asm/arch/sdrc.h>
+ #include "clock.h"
+@@ -637,6 +638,35 @@ static void omap3_clkoutx2_recalc(struct
+  */
+ #if defined(CONFIG_ARCH_OMAP3)
+
++#ifdef CONFIG_CPU_FREQ
++static struct cpufreq_frequency_table freq_table[MAX_VDD1_OPP+1];
++
++void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
++{
++	struct vdd_prcm_config *prcm;
++	int i = 0;
++
++	prcm = vdd1_rate_table + MAX_VDD1_OPP;
++	for (; prcm->speed; prcm--) {
++		freq_table[i].index = i;
++		freq_table[i].frequency = prcm->speed / 1000;
++		i++;
++	}
++
++	if (i == 0) {
++		printk(KERN_WARNING "%s: failed to initialize frequency \
++								table\n",
++								__func__);
++		return;
++	}
++
++	freq_table[i].index = i;
++	freq_table[i].frequency = CPUFREQ_TABLE_END;
++
++	*table = &freq_table[0];
++}
++#endif
++
+ static struct clk_functions omap2_clk_functions = {
+ 	.clk_enable		= omap2_clk_enable,
+ 	.clk_disable		= omap2_clk_disable,
+@@ -644,6 +674,9 @@ static struct clk_functions omap2_clk_fu
+ 	.clk_set_rate		= omap2_clk_set_rate,
+ 	.clk_set_parent		= omap2_clk_set_parent,
+ 	.clk_disable_unused	= omap2_clk_disable_unused,
++#ifdef CONFIG_CPU_FREQ
++	.clk_init_cpufreq_table = omap2_clk_init_cpufreq_table,
++#endif
+ };
+
+ /*
+@@ -793,12 +826,11 @@ inline unsigned int get_opp(struct vdd_p
+
+ 	if (prcm_config->speed <= freq)
+ 		return prcm_config->opp; /* Return the Highest OPP */
+-	for (; prcm_config->speed; prcm_config--) {
++	for (; prcm_config->speed; prcm_config--)
+ 		if (prcm_config->speed < freq)
+ 			return (prcm_config+1)->opp;
+ 		else if (prcm_config->speed == freq)
+ 			return prcm_config->opp;
+-	}
+ 	/* Return the least OPP */
+ 	return (prcm_config+1)->opp;
+ }
+@@ -878,6 +910,10 @@ static int omap3_select_table_rate(struc
+ 		clk_set_rate(dpll1_clk, prcm_vdd->speed);
+ 		clk_set_rate(dpll2_clk, iva2_rate_table[index].speed);
+ 		curr_vdd1_prcm_set = prcm_vdd;
++		omap2_clksel_recalc(&mpu_ck);
++		propagate_rate(&mpu_ck);
++		omap2_clksel_recalc(&iva2_ck);
++		propagate_rate(&iva2_ck);
+ #ifndef CONFIG_CPU_FREQ
+ 		/*Update loops_per_jiffy if processor speed is being changed*/
+ 		loops_per_jiffy = compute_lpj(loops_per_jiffy,
+@@ -886,6 +922,8 @@ static int omap3_select_table_rate(struc
+ 	} else {
+ 		clk_set_rate(dpll3_clk, prcm_vdd->speed);
+ 		curr_vdd2_prcm_set = prcm_vdd;
++		omap2_clksel_recalc(&core_ck);
++		propagate_rate(&core_ck);
+ 	}
+ 	return 0;
+ }
+Index: linux-omap-2.6/arch/arm/mach-omap2/resource34xx.c
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/mach-omap2/resource34xx.c	2008-08-11
+17:36:52.000000000 +0530
++++ linux-omap-2.6/arch/arm/mach-omap2/resource34xx.c	2008-08-11
+17:36:53.000000000 +0530
+@@ -278,11 +278,7 @@ int set_freq(struct shared_resource *res
+ 	else if (strcmp(resp->name, "dsp_freq") == 0)
+ 		vdd1_opp = get_opp(iva2_rate_table + MAX_VDD1_OPP,
+ 							target_level);
+-
+-	if (vdd1_opp == MIN_VDD1_OPP)
+-		resource_release("vdd1_opp", &dummy_srf_dev);
+-	else
+-		resource_request("vdd1_opp", &dummy_srf_dev, vdd1_opp);
++	resource_request("vdd1_opp", &dummy_srf_dev, vdd1_opp);
+
+ 	resp->curr_level = target_level;
+ #endif
+Index: linux-omap-2.6/arch/arm/plat-omap/cpu-omap.c
+===================================================================
+--- linux-omap-2.6.orig/arch/arm/plat-omap/cpu-omap.c	2008-08-11
+17:21:57.000000000 +0530
++++ linux-omap-2.6/arch/arm/plat-omap/cpu-omap.c	2008-08-11 17:36:53.000000000
++0530
+@@ -8,6 +8,10 @@
+  *
+  *  Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
+  *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Updated to support OMAP3
++ * Rajendra Nayak <rnayak at ti.com>
++ *
+  * This program is free software; you can redistribute it and/or modify
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+@@ -25,6 +29,9 @@
+ #include <asm/io.h>
+ #include <asm/system.h>
+ #include <asm/arch/clock.h>
++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
++#include <asm/arch/omap-pm.h>
++#endif
+
+ #define VERY_HI_RATE	900000000
+
+@@ -32,12 +39,34 @@ static struct cpufreq_frequency_table *f
+
+ #ifdef CONFIG_ARCH_OMAP1
+ #define MPU_CLK		"mpu"
++#elif CONFIG_ARCH_OMAP3
++#define MPU_CLK		"virt_vdd1_prcm_set"
+ #else
+ #define MPU_CLK		"virt_prcm_set"
+ #endif
+
+ static struct clk *mpu_clk;
+
++#ifdef CONFIG_MACH_OMAP_3430SDP
++extern struct vdd_prcm_config vdd1_rate_table[];
++extern struct vdd_prcm_config vdd2_rate_table[];
++extern struct vdd_prcm_config iva2_rate_table[];
++#endif
++
++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
++int cpufreq_pre_func(struct notifier_block *n, unsigned long event, void *ptr);
++int cpufreq_post_func(struct notifier_block *n, unsigned long event, void *ptr);
++static struct notifier_block cpufreq_pre = {
++	cpufreq_pre_func,
++	NULL,
++};
++
++static struct notifier_block cpufreq_post = {
++	cpufreq_post_func,
++	NULL,
++};
++#endif
++
+ /* TODO: Add support for SDRAM timing changes */
+
+ int omap_verify_speed(struct cpufreq_policy *policy)
+@@ -89,7 +118,7 @@ static int omap_target(struct cpufreq_po
+
+ 	if (freqs.old == freqs.new)
+ 		return ret;
+-
++#ifdef CONFIG_ARCH_OMAP1
+ 	cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+ #ifdef CONFIG_CPU_FREQ_DEBUG
+ 	printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
+@@ -97,10 +126,50 @@ static int omap_target(struct cpufreq_po
+ #endif
+ 	ret = clk_set_rate(mpu_clk, freqs.new * 1000);
+ 	cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
+-
++#elif defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)\
++	&& defined(CONFIG_MACH_OMAP_3430SDP)
++	{
++		int ind;
++		for (ind = 1; ind <= MAX_VDD1_OPP; ind++) {
++			if (vdd1_rate_table[ind].speed/1000 >= freqs.new) {
++				omap_pm_cpu_set_freq
++					(vdd1_rate_table[ind].speed);
++				break;
++			}
++		}
++	}
++#endif
+ 	return ret;
+ }
+
++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
++static struct cpufreq_freqs freqs_notify;
++int cpufreq_pre_func(struct notifier_block *n, unsigned long event, void *ptr)
++{
++	struct clk_notifier_data *cnd;
++
++	cnd = (struct clk_notifier_data *)ptr;
++	freqs_notify.old = cnd->old_rate/1000;
++	freqs_notify.new = cnd->new_rate/1000;
++	/* HACK: The clk_notify_post_rate_chg currently
++	 * returns a zero for old_rate at bootup
++	 */
++	if (freqs_notify.old == 0)
++		freqs_notify.old = 500000;
++	cpufreq_notify_transition(&freqs_notify, CPUFREQ_PRECHANGE);
++	return 0;
++}
++
++int cpufreq_post_func(struct notifier_block *n, unsigned long event, void *ptr)
++{
++	struct clk_notifier_data *cnd;
++
++	cnd = (struct clk_notifier_data *)ptr;
++	cpufreq_notify_transition(&freqs_notify, CPUFREQ_POSTCHANGE);
++	return 0;
++}
++#endif
++
+ static int __init omap_cpu_init(struct cpufreq_policy *policy)
+ {
+ 	int result = 0;
+@@ -128,7 +197,10 @@ static int __init omap_cpu_init(struct c
+
+ 	/* FIXME: what's the%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list