[XPERIA X8 General] viper001:
Part 1. The Phantom Modules

The the early days of the X8 rooting scene. we had two ROM Devs/Porters that gave us an option of going the CM route through MiniCM or the HTC/Motorla route. Now qui-gon and obi... urmm, Racht and Ponanovn did a splendid job in porting these ROMS, especialy since it freed us from Eclair.

But the users wanted more... we wanted multi-touch, we wanted overclock, we wanted netfilters.... heck, lets just say for the price of the X8, we wanted an X10;).

Out of the SE deserted android scene, Dioxahn came out with back to back modules that enabled, empowered and brought balance to our X8.;) (too cheesy?:D)

But with the advent of X8 Kernel Building, where did these module go? we have to delete the modules from our lib/modules..,.. what happened?

Well, the code they had just went to where they're supposed to be.

It's a frustration that can heard in Dioxanhs words when people asks stuff like dual/multitouch on a synaptics X8 or overvoltage and the like when we can't understand his genius.

to be clear, first and foremost, the modules he made, hijacks and takes over the code built in kernel. Ex. the Kernel might need to know what speed the cpu should be, and there is a code for that, to simplify, as it ask for this code, the OC module intercepts this request and sends its own modified code as an alternative. confused? GOOD. :D

Overclock:

In ubuntu, go to Kernel >> FXP >> arch >> arm >> mach-msm

double click on acpuclock.c, you will not find the following code as is, since the FXP team disabled the OC from the Kernel. but do a search of :

static void acpuclk_set_div

and you should find a code similar to the OC code that follows but without the items in bold.

DO not modify anything yet. Unless you know what you're doing.

The code below is what enables overclock and is the same instructions inserted by the OC module, it is also the same as in the Google nexus, and alfasamsungs kernel.

static void acpuclk_set_div(const struct clkctl_acpu_speed *hunt_s) {

uint32_t reg_clkctl, reg_clksel, clk_div, src_sel, a11_div;

reg_clksel = readl(A11S_CLK_SEL_ADDR);

/* AHB_CLK_DIV */

clk_div = (reg_clksel >> 1) & 0x03;

/* CLK_SEL_SRC1NO */

src_sel = reg_clksel & 1;

// Perform overclocking if requested

a11_div=hunt_s->a11clk_src_div;

if(hunt_s->a11clk_khz>600000) {

a11_div=0;

writel(hunt_s->a11clk_khz/19200, MSM_CLK_CTL_BASE+0x33C);

udelay(50);

}

src_sel = reg_clksel & 1;

/*

* If the new clock divider is higher than the previous, then

* program the divider before switching the clock

*/

if (hunt_s->ahbclk_div > clk_div) {

reg_clksel &= ~(0x3 << 1);

reg_clksel |= (hunt_s->ahbclk_div << 1);

writel(reg_clksel, A11S_CLK_SEL_ADDR);

}

Over and under voltage:

Now, this is what im busy of at the moment. i'm trying to find the best PLL clock ratio for GPU to CPU stable speeds within the constraints of the voltage. the bold numbers are the voltage identifiers. since the MSM7227 has a range of 1.2 to 1.35 V operating voltage hence the values from 1 to 7. NO OVERVOLTAGE.

BTW,

the part is located in the same file acpuclock.c and is at the begining and is also required to set the maximum CPU clock. The values after the 600Mhz are the values i'm playing with since i think FXP has already "tuned" the stock speed perfectly. In alfasamsungs kernel, he didn't include the scales between 600 and 729. which is very logical. why overclock if you ain't going to max:D,

/* 7x27 normal with GSM capable modem - PLL0 and PLL1 swapped */

static struct clkctl_acpu_speed pll0_960_pll1_245_pll2_1200[] = {

{ 0, 19200, ACPU_PLL_TCXO, 0, 0, 19200, 0, 0, 30720 },

{ 0, 120000, ACPU_PLL_0, 4, 7, 60000, 1, 3, 61440 },

{ 1, 122880, ACPU_PLL_1, 1, 1, 61440, 1, 3, 61440 },

{ 0, 200000, ACPU_PLL_2, 2, 5, 66667, 2, 4, 61440 },

{ 1, 245760, ACPU_PLL_1, 1, 0, 122880, 1, 4, 61440 },

{ 1, 320000, ACPU_PLL_0, 4, 2, 160000, 1, 5, 160000 },

{ 0, 400000, ACPU_PLL_2, 2, 2, 133333, 2, 5, 160000 },

{ 1, 480000, ACPU_PLL_0, 4, 1, 160000, 2, 5, 160000 },

{ 1, 600000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 652800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 691200, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 710400, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 729600, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 748800, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 768000, ACPU_PLL_2, 2, 1, 200000, 2, 7, 160000 },

{ 1, 787200, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 },

{ 1, 806400, ACPU_PLL_2, 2, 2, 160000, 2, 7, 160000 },

// { 1, 825600, ACPU_PLL_0, 4, 0, 206400, 3, 7, 122880 },

// { 1, 844800, ACPU_PLL_0, 4, 0, 211200, 3, 7, 122880 },

// { 1, 864000, ACPU_PLL_0, 4, 0, 216000, 3, 7, 122880 },

{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0}, {0, 0, 0} }

};

One of the best things about this is that you can code and configure your "overclock" in acpuclock.c, set the default minmax speed to 122/600 in the defconfig during compile gaining a stock profile and go as high (or low) as you want in the ROM through the CM settings, SetCPU etc. You don't even have to "enable" overclock in the CMsettings.

At any rate, take a break and think about what our devs are doing before you noob them out. ok?

As a guide, i've included my acpuclock.c for your review and comparison to the original se Kernel.

Next. we'll tackle part 2. Touch Screen Wars.

or, they're on the same machine, they look the same... but, (gasps) they're not!!!