[G1 Android Development] farmatito:
Yes I can confirm. Nonetheless, attached one more patch to

try to clean up the acpuclk-arm11.c mess and a kernel with

debug code turned on.

--- kernel-2635-original/arch/arm/mach-msm/acpuclock-arm11.c 2011-01-03 14:23:15.000000000 +0100
+++ kernel-2635/arch/arm/mach-msm/acpuclock-arm11.c 2011-01-16 18:37:49.000000000 +0100
@@ -31,6 +31,8 @@
#include <mach/board.h>
#include <mach/msm_iomap.h>

+#include <mach/clk.h>
+
#include "proc_comm.h"
#include "acpuclock.h"

@@ -49,11 +51,11 @@
#define ACPU_PLL_2 2
#define ACPU_PLL_3 3

-#define PERF_SWITCH_DEBUG 0
-#define PERF_SWITCH_STEP_DEBUG 0
+#define PERF_SWITCH_DEBUG 1
+#define PERF_SWITCH_STEP_DEBUG 1

-static int force_turbo = 0;
-module_param_named(force_turbo, force_turbo, int, S_IRUGO | S_IWUSR | S_IWGRP);
+//static int force_turbo = 0;
+//module_param_named(force_turbo, force_turbo, int, S_IRUGO | S_IWUSR | S_IWGRP);

struct clock_state
{
@@ -66,11 +68,11 @@
unsigned long wait_for_irq_khz;
};

-#if force_turbo
- printk(KERN_DEBUG "FORCING TURBO MODE\n");
- writel(PLL_960_MHZ, MSM_CLK_CTL_BASE+0x320);
- udelay(50);
-#endif
+//#if force_turbo
+// printk(KERN_DEBUG "FORCING TURBO MODE\n");
+// writel(PLL_960_MHZ, MSM_CLK_CTL_BASE+0x320);
+// udelay(50);
+//#endif

static struct clk *ebi1_clk;
static struct clock_state drv_state = { 0 };
@@ -106,7 +108,7 @@
short pll2_lval;
};

-static unsigned long max_axi_rate;
+//static unsigned long max_axi_rate;

/*
* ACPU speed table. Complete table is shown but certain speeds are commented
@@ -292,9 +294,10 @@
a11_div=hunt_s->a11clk_src_div;

if (hunt_s->a11clk_khz > 528000 && hunt_s->pll2_lval > 0) {
- a11_div=0;
- writel(hunt_s->a11clk_khz/19200, MSM_CLK_CTL_BASE+0x33C);
- udelay(50);
+ a11_div=0;
+ //writel(hunt_s->a11clk_khz/19200, MSM_CLK_CTL_BASE+0x33C);
+ writel(hunt_s->pll2_lval, MSM_CLK_CTL_BASE + 0x33C);
+ udelay(50);
}

@@ -483,9 +486,17 @@

/* Change the AXI bus frequency if we can. */
if (strt_s->axiclk_khz != tgt_s->axiclk_khz) {
- rc = clk_set_rate(ebi1_clk, tgt_s->axiclk_khz);
+ /* rc = clk_set_rate(ebi1_clk, tgt_s->axiclk_khz * 1000); */
+ /* Rate is minimum clock rate in Hz */
+ rc = clk_set_min_rate(ebi1_clk, tgt_s->axiclk_khz * 1000);
if (rc < 0)
pr_err("Setting AXI min rate failed!\n");
+#if PERF_SWITCH_DEBUG
+ else
+ printk(KERN_DEBUG "%s: AXI min rate changed %u => %u\n",
+ __FUNCTION__, strt_s->axiclk_khz, tgt_s->axiclk_khz);
+#endif
+
}

/* Drop VDD level if we can. */
@@ -505,7 +516,7 @@

static void __init acpuclk_init(void)
{
- struct clkctl_acpu_speed *speed, *max_s;
+ struct clkctl_acpu_speed *speed /*, *max_s */;
uint32_t div, sel;
int rc;

@@ -537,23 +548,28 @@

drv_state.current_speed = speed;

- rc = clk_set_rate(ebi1_clk, speed->axiclk_khz * 1000);
+ //rc = clk_set_rate(ebi1_clk, speed->axiclk_khz * 1000)
+ /* Rate is minimum clock rate in Hz */
+ rc = clk_set_min_rate(ebi1_clk, speed->axiclk_khz * 1000);
if (rc < 0)
pr_err("Setting AXI min rate failed!\n");
+#if PERF_SWITCH_DEBUG
+ else
+ printk(KERN_DEBUG "%s: AXI min rate set %u\n", __FUNCTION__, speed->axiclk_khz);
+#endif
+ //for (speed = acpu_freq_tbl; speed->a11clk_khz != 0; speed++);

- for (speed = acpu_freq_tbl; speed->a11clk_khz != 0; speed++);
-
- max_s = speed - 1;
- max_axi_rate = max_s->axiclk_khz * 1000;
+ //max_s = speed - 1;
+ //max_axi_rate = max_s->axiclk_khz * 1000;

printk(KERN_INFO "ACPU running at %d KHz\n", speed->a11clk_khz);
}

-unsigned long acpuclk_get_max_axi_rate(void)
-{
- return max_axi_rate;
-}
-EXPORT_SYMBOL(acpuclk_get_max_axi_rate);
+//unsigned long acpuclk_get_max_axi_rate(void)
+//{
+// return max_axi_rate;
+//}
+//EXPORT_SYMBOL(acpuclk_get_max_axi_rate);

unsigned long acpuclk_get_rate(void)
{

Enjoy.

USE AT YOUR OWN RISK.