old version maemo21
authortanner <tanner@mach.kyb.local>
Thu, 15 Apr 2010 09:54:49 +0000 (11:54 +0200)
committertanner <tanner@mach.kyb.local>
Thu, 15 Apr 2010 09:54:49 +0000 (11:54 +0200)
17 files changed:
kernel-maemo-2.6.28/debian/README.Debian
kernel-maemo-2.6.28/debian/changelog
kernel-maemo-2.6.28/debian/control
kernel-maemo-2.6.28/debian/kernel-modules-maemo.postinst [deleted file]
kernel-maemo-2.6.28/debian/kernel-modules-maemo.postinst.in [new file with mode: 0644]
kernel-maemo-2.6.28/debian/kernel-modules-maemo.postrm [deleted file]
kernel-maemo-2.6.28/debian/kernel-modules-maemo.postrm.in [new file with mode: 0644]
kernel-maemo-2.6.28/debian/patches/overclock-ideal.diff [new file with mode: 0644]
kernel-maemo-2.6.28/debian/patches/overclock-lv.diff [new file with mode: 0644]
kernel-maemo-2.6.28/debian/patches/overclock-ulv.diff [new file with mode: 0644]
kernel-maemo-2.6.28/debian/patches/overclock-xlv.diff [new file with mode: 0644]
kernel-maemo-2.6.28/debian/patches/overclock.diff
kernel-maemo-2.6.28/debian/patches/overclock_uvolt.diff [deleted file]
kernel-maemo-2.6.28/debian/patches/series
kernel-maemo-2.6.28/debian/rules
kernel-maemo-2.6.28/debian/rx51maemo_defconfig
kernel-maemo-2.6.28/debian/upstart [new file with mode: 0644]

index 9fe7189..845a859 100644 (file)
@@ -1,4 +1,51 @@
-kernel-source for Nokia RX-51
------------------------------
+Extended kernel-sources for Nokia N900
+--------------------------------------
+
+* Downloading the sources:
+
+ apt-get source kernel-maemo
+
+* Building the kernel packages:
+
+ DEB_BUILD_OPTIONS="parallel=2" dpkg-buildpackage -r"fakeroot -u" -uc -us -nc
+
+* Creating new kernel sources:
+
+ dpkg-buildpackage -sa -S
+
+* Modifying the kernel configuration:
+
+in the kernel top directory do:
+ cp debian/rx51maemo_defconfig .config
+ make menuconfig
+ cp .config debian/rx51maemo_defconfig
+ make mrproper
+and the rebuild it again
+
+* Creating new patches:
+
+This package uses quilt to maintain patches.
+
+ export QUILT_PATCHES=debian/patches
+
+then before modifying your kernel: 
+ quilt push -a
+
+starting a new patch:
+ quilt new mypatch.diff
+
+either:
+ quilt add file...  (files you plan to modify)
+and edit the files
+
+or:
+ quilt fold < patch.diff (if you have a patch)
+
+finally:
+ quilt refresh --no-timestamps --no-index
+to create or update your patch
+
+For more details read the quilt documentation.
+
+Thomas Tanner <maemo@tannerlab.com>
 
- -- Yauheni Kaliuta <yauheni.kaliuta@nokia.com>, Mon, 17 Mar 2008 18:01:06 +0200
index 617f754..a87224f 100644 (file)
@@ -1,3 +1,17 @@
+kernel-maemo (2.6.28-maemo21) fremantle; urgency=low
+
+   * support voltage customization via /sys/power/sr_vdd1_opps_vsel (patch by Matan)
+   * replace invalid 800MHz with 810MHz
+   * increase voltage for 1.1/1.15GHz
+   * enable powersave and conservative CPUfreq governors
+   * ignore missing modules dir in postrm
+   * update /lib/modules/current
+   * control: moved kernel Provides to kernel-flasher
+   * enable PPP_ASYNC for PPTP/MPPE
+   * README.Debian: kernel instructions
+
+ -- Thomas Tanner <maemo@tannerlab.com>  Mon, 12 Apr 2010 00:00:00 +0100
+
 kernel-maemo (2.6.28-maemo20) fremantle; urgency=low
 
   * added underclocking (125MHz) support, set default min. to 250MHz
index 47910d8..bc6d18c 100644 (file)
@@ -8,17 +8,16 @@ Build-Depends: debhelper (>= 4.0.0), quilt, sdk-fiasco-gen, libncurses5-dev
 Build-Depends-Indep: bzip2
 Standards-Version: 3.8.0
 
-Package: kernel-maemo
-Architecture: armel
-Description: Flashable Linux kernel
- This package provides a flashable kernel image.
- Use the kernel-flasher-maemo package to automatically flash it.
-
 Package: kernel-flasher-maemo
 Section: user/system
 Architecture: armel
 Pre-Depends: kernel-maemo (= ${binary:Version}), kernel-modules-maemo (= ${binary:Version}), softupd (>= 0.4.0)
 Recommends: usbip, iptables, mtd-utils, kexec-tools
+Provides: kernel-feature-netfilter, kernel-feature-ipv6, kernel-feature-ext4, kernel-feature-xfs, kernel-feature-reiserfs,
+  kernel-feature-ntfs-read, kernel-feature-udf, kernel-feature-cifs, kernel-feature-automounter,
+  kernel-feature-unionfs, kernel-feature-crypto, kernel-feature-dmloop, kernel-feature-utf8, kernel-feature-mousejoy,
+  kernel-feature-usbip, kernel-feature-ppp, kernel-feature-qos, kernel-feature-block2mtd, kernel-feature-kexec,
+  kernel-feature-overclock, kernel-feature-joikuspot, kernel-feature-slip, kernel-feature-battery, kernel-feature-pptp
 Description: Linux kernel updater for an enhanced Maemo 5 kernel 2.6.28.10
  This package will flash the kernel image upon installation. If you want to revert to the
  stock Nokia kernel, run "apt-get install --reinstall kernel kernel-flasher" as root
@@ -30,7 +29,7 @@ Description: Linux kernel updater for an enhanced Maemo 5 kernel 2.6.28.10
  builtin ext3 for booting from other media, ext4, XFS, reiserfs,
  NTFS read support, ISO9660, UDF, CIFS, automounter,
  UNIONFS, device mapper and dm-loop, cryptography, cryptoloop,
- EFI partitions, UTF8 codepages, mouse+joystick input, PPP,
+ EFI partitions, UTF8 codepages, mouse+joystick input, PPP, PPTP,
  serial support, USB/IP and generic USB device drivers, battery info,
  overclocking and kexec support.
  .
@@ -107,6 +106,12 @@ XB-Maemo-Icon-26:
  MDItMDZUMTk6Mjk6MjMrMDE6MDBL9SgPAAAAJXRFWHRtb2RpZnktZGF0ZQAy
  MDA5LTA5LTI3VDA5OjM1OjM0KzAyOjAwrPojkwAAAABJRU5ErkJggg==
 
+Package: kernel-maemo
+Architecture: armel
+Description: Flashable Linux kernel
+ This package provides a flashable kernel image.
+ Use the kernel-flasher-maemo package to automatically flash it.
+
 Package: kernel-headers-maemo
 Architecture: armel
 Depends: ${shlibs:Depends}
@@ -123,10 +128,5 @@ Description: Linux Kernel Headers for development
 Package: kernel-modules-maemo
 Architecture: armel
 Depends: module-init-tools (>= 3.3), kernel-maemo (= ${binary:Version})
-Provides: kernel-feature-netfilter, kernel-feature-ipv6, kernel-feature-ext4, kernel-feature-xfs, kernel-feature-reiserfs,
-  kernel-feature-ntfs-read, kernel-feature-udf, kernel-feature-cifs, kernel-feature-automounter,
-  kernel-feature-unionfs, kernel-feature-crypto, kernel-feature-dmloop, kernel-feature-utf8, kernel-feature-mousejoy,
-  kernel-feature-usbip, kernel-feature-ppp, kernel-feature-qos, kernel-feature-block2mtd, kernel-feature-kexec,
-  kernel-feature-overclock, kernel-feature-joikuspot, kernel-feature-slip, kernel-feature-battery
 Description: Linux kernel modules
  This package provides kernel modules for the enhanced Maemo 5 kernel 2.6.28.10
diff --git a/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postinst b/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postinst
deleted file mode 100644 (file)
index 9c48027..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/bin/sh
-
-set -e
-
-cd /lib/modules
-
-ls -1d * | grep -v current | while read i; do
-   /sbin/depmod $i || :
-done
-
-#DEBHELPER#
-
diff --git a/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postinst.in b/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postinst.in
new file mode 100644 (file)
index 0000000..fdbab1a
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+set -e
+
+cd /lib/modules
+
+ls -1d * | grep -v current | while read i; do
+   /sbin/depmod $i || :
+done
+rm -f /lib/modules/current
+ln -s /lib/modules/@KVER@ /lib/modules/current
+
+#DEBHELPER#
+
diff --git a/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postrm b/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postrm
deleted file mode 100644 (file)
index 2acfddc..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-#!/bin/sh
-
-set -e
-
-rm /lib/modules/2.6.28.10maemo-omap1/modules.*
-
-#DEBHELPER#
-
diff --git a/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postrm.in b/kernel-maemo-2.6.28/debian/kernel-modules-maemo.postrm.in
new file mode 100644 (file)
index 0000000..885e561
--- /dev/null
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+#set -e
+
+test -d /lib/modules/@KVER@ && rm -f /lib/modules/@KVER@/modules.*
+rm -f /lib/modules/current
+ln -s 2.6.28-omap1 /lib/modules/current
+
+#DEBHELPER#
+
diff --git a/kernel-maemo-2.6.28/debian/patches/overclock-ideal.diff b/kernel-maemo-2.6.28/debian/patches/overclock-ideal.diff
new file mode 100644 (file)
index 0000000..5a6df6f
--- /dev/null
@@ -0,0 +1,200 @@
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/omap3-opp.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/omap3-opp.h
+@@ -4,6 +4,15 @@
+ #include <mach/omap-pm.h>
+ /* MPU speeds */
++#define S1150M  1150000000
++#define S1100M  1100000000
++#define S1000M  1000000000
++#define S950M   950000000
++#define S900M   900000000
++#define S850M   850000000
++#define S810M   810000000
++#define S750M   750000000
++#define S700M   700000000
+ #define S600M   600000000
+ #define S550M   550000000
+ #define S500M   500000000
+@@ -11,6 +20,7 @@
+ #define S125M   125000000
+ /* DSP speeds */
++#define S520M   500000000
+ #define S430M   430000000
+ #define S400M   400000000
+ #define S360M   360000000
+@@ -23,16 +33,20 @@
+ static struct omap_opp omap3_mpu_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
+-      {0, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S250M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S500M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S550M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S600M, VDD1_OPP5, 0x3C},
++      {0, 1, 0x14},
++      {S500M, 2, 0x1E},
++      {S550M, 3, 0x21},
++      {S600M, 4, 0x26},
++      /*overclocking*/
++      {S700M, 5, 0x2D},
++      {S750M, 6, 0x2D},
++      {S810M, 7, 0x30},
++      {S850M, 8, 0x30},
++      {S900M, 9, 0x36},
++      {S950M, 10, 0x36},
++      {S1000M, 11, 0x3C},
++      {S1100M, 12, 0x43},
++      {S1150M, 13, 0x48},
+ };
+ static struct omap_opp omap3_l3_rate_table[] = {
+@@ -47,16 +61,22 @@
+ static struct omap_opp omap3_dsp_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
+-      {S90M, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S180M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S360M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S400M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S430M, VDD1_OPP5, 0x3C},
++      /*underclocking*/
++      {S90M, 1, 0x14},
++      /*default*/
++      {S360M, 2, 0x1E},
++      {S400M, 3, 0x21},
++      {S430M, 4, 0x26},
++      /*overclocking*/
++      {S430M, 5, 0x2D},
++      {S430M, 6, 0x2D},
++      {S430M, 7, 0x30},/*800MHz*/
++      {S520M, 8, 0x36},
++      {S520M, 9, 0x36},
++      {S520M, 10, 0x36},
++      {S520M, 11, 0x3C},
++      {S520M, 12, 0x3C},
++      {S520M, 13, 0x40},
+ };
+ #endif
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/include/mach/omap34xx.h
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/include/mach/omap34xx.h
+@@ -114,7 +114,7 @@
+ #define VDD2_OPP3     0x3
+ #define MIN_VDD1_OPP  VDD1_OPP1
+-#define MAX_VDD1_OPP  VDD1_OPP5
++#define MAX_VDD1_OPP  13
+ #define MIN_VDD2_OPP  VDD2_OPP1
+ #define MAX_VDD2_OPP  VDD2_OPP3
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.c
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.c
+@@ -513,20 +513,17 @@
+       sr->req_opp_no = target_opp_no;
+       if (sr->srid == SR1) {
+-              switch (target_opp_no) {
+-              case 5:
++              switch (min(target_opp_no,4)) {
++              case 4: /*>=600*/
+                       nvalue_reciprocal = sr->opp5_nvalue;
+                       break;
+-              case 4:
++              case 3: /*550*/
+                       nvalue_reciprocal = sr->opp4_nvalue;
+                       break;
+-              case 3:
++              case 2: /*500*/
+                       nvalue_reciprocal = sr->opp3_nvalue;
+                       break;
+-              case 2:
+-                      nvalue_reciprocal = sr->opp2_nvalue;
+-                      break;
+-              case 1:
++              case 1: /*idle*/
+                       nvalue_reciprocal = sr->opp1_nvalue;
+                       break;
+               default:
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/cpu-omap.c
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/cpu-omap.c
+@@ -148,10 +148,12 @@
+                                                       VERY_HI_RATE) / 1000;
+       }
+-      clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);
++      /*clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);*/
++      clk_set_rate(mpu_clk, 850000 * 1000); /*N900 hack: set default max to 850MHz */
+       policy->min = policy->cpuinfo.min_freq;
+-      policy->max = policy->cpuinfo.max_freq;
++      /*policy->max = policy->cpuinfo.max_freq;*/
++      policy->max = 850000; /*N900 hack: set default to 500-850MHz */
+       policy->cur = omap_getspeed(0);
+       policy->cpuinfo.transition_latency = 300 * 1000;
+--- kernel-maemo-2.6.28.orig/drivers/cpufreq/cpufreq.c
++++ kernel-maemo-2.6.28/drivers/cpufreq/cpufreq.c
+@@ -465,7 +465,7 @@
+ /**
+  * cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
+  */
+-#define store_one(file_name, object)                  \
++#define store_one(file_name, object,ignore)                   \
+ static ssize_t store_##file_name                                      \
+ (struct cpufreq_policy *policy, const char *buf, size_t count)                \
+ {                                                                     \
+@@ -479,15 +479,16 @@
+       ret = sscanf (buf, "%u", &new_policy.object);                   \
+       if (ret != 1)                                                   \
+               return -EINVAL;                                         \
+-                                                                      \
+-      ret = __cpufreq_set_policy(policy, &new_policy);                \
++      printk(KERN_DEBUG "cpufreq: request %u -> %u\n",policy->object,new_policy.object);      \
++      if (new_policy.object != ignore && new_policy.object >= 100000) \
++          ret = __cpufreq_set_policy(policy, &new_policy);            \
+       policy->user_policy.object = policy->object;                    \
+                                                                       \
+       return ret ? ret : count;                                       \
+ }
+-store_one(scaling_min_freq,min);
+-store_one(scaling_max_freq,max);
++store_one(scaling_min_freq,min,600000);
++store_one(scaling_max_freq,max,600000);
+ /**
+  * show_cpuinfo_cur_freq - current CPU frequency as detected by hardware
+--- kernel-maemo-2.6.28.orig/Makefile
++++ kernel-maemo-2.6.28/Makefile
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 28
+-EXTRAVERSION = .10maemo
++EXTRAVERSION = .10maemo-xlv
+ NAME = Erotic Pickled Herring
+ # *DOCUMENTATION*
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.h
+@@ -254,7 +254,7 @@
+ /* XXX: end remove/move */
+ /* SR_MAX_LOW_OPP: the highest of the "low OPPs", 1 and 2. */
+-#define SR_MAX_LOW_OPP                2
++#define SR_MAX_LOW_OPP                1
+ /* XXX: find more appropriate place for these once DVFS is in place */
+ extern u32 current_vdd1_opp;
diff --git a/kernel-maemo-2.6.28/debian/patches/overclock-lv.diff b/kernel-maemo-2.6.28/debian/patches/overclock-lv.diff
new file mode 100644 (file)
index 0000000..57b48a5
--- /dev/null
@@ -0,0 +1,196 @@
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/omap3-opp.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/omap3-opp.h
+@@ -4,11 +4,20 @@
+ #include <mach/omap-pm.h>
+ /* MPU speeds */
++#define S1200M  1200000000
++#define S1100M  1100000000
++#define S1000M  1000000000
++#define S950M   950000000
++#define S900M   900000000
++#define S850M   850000000
++#define S810M   810000000
++#define S750M   750000000
++#define S700M   700000000
+ #define S600M   600000000
+ #define S550M   550000000
+ #define S500M   500000000
+ #define S250M   250000000
+-#define S125M   125000000
++#define S125M   124999000
+ /* DSP speeds */
+ #define S430M   430000000
+@@ -23,16 +32,24 @@
+ static struct omap_opp omap3_mpu_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
+       {0, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S250M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S500M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S550M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S600M, VDD1_OPP5, 0x3C},
++      /*underclocking*/
++      {S125M, VDD1_OPP2, 0x1E},
++      /*default*/
++      {S250M, VDD1_OPP3, 0x26},
++      {S500M, VDD1_OPP4, 0x30},
++      {S550M, VDD1_OPP5, 0x30},
++      {S600M, 6, 0x36},
++      /*overclocking*/
++      {S700M, 7, 0x36},
++      {S750M, 8, 0x36},
++      {S810M, 9, 0x36},
++      {S850M, 10, 0x36},
++      {S900M, 11, 0x36},
++      {S950M, 12, 0x36},
++      {S1000M, 13, 0x3C},
++      {S1100M, 14, 0x3C},
++      {S1200M, 15, 0x40},
+ };
+ static struct omap_opp omap3_l3_rate_table[] = {
+@@ -47,16 +64,24 @@
+ static struct omap_opp omap3_dsp_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
++      /*underclocking*/
+       {S90M, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S180M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S360M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S400M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S430M, VDD1_OPP5, 0x3C},
++      /*default*/
++      {S90M, VDD1_OPP2, 0x1E},
++      {S180M, VDD1_OPP3, 0x26},
++      {S360M, VDD1_OPP4, 0x30},
++      {S400M, VDD1_OPP5, 0x36},
++      {S430M, 6, 0x36},
++      /*overclocking*/
++      {S430M, 7, 0x36},
++      {S430M, 8, 0x36},
++      {S430M, 9, 0x36},/*800MHz*/
++      {S500M, 10, 0x3C},
++      {S500M, 11, 0x3C},
++      {S500M, 12, 0x3C},
++      {S500M, 13, 0x3C},
++      {S500M, 14, 0x3C},
++      {S500M, 15, 0x3C},
+ };
+ #endif
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/include/mach/omap34xx.h
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/include/mach/omap34xx.h
+@@ -114,7 +114,8 @@
+ #define VDD2_OPP3     0x3
+ #define MIN_VDD1_OPP  VDD1_OPP1
+-#define MAX_VDD1_OPP  VDD1_OPP5
++/*#define MAX_VDD1_OPP        VDD1_OPP5*/
++#define MAX_VDD1_OPP  15
+ #define MIN_VDD2_OPP  VDD2_OPP1
+ #define MAX_VDD2_OPP  VDD2_OPP3
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.c
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.c
+@@ -513,7 +513,7 @@
+       sr->req_opp_no = target_opp_no;
+       if (sr->srid == SR1) {
+-              switch (target_opp_no) {
++              switch (min(target_opp_no-1,5)) {
+               case 5:
+                       nvalue_reciprocal = sr->opp5_nvalue;
+                       break;
+@@ -527,6 +527,7 @@
+                       nvalue_reciprocal = sr->opp2_nvalue;
+                       break;
+               case 1:
++              case 0:
+                       nvalue_reciprocal = sr->opp1_nvalue;
+                       break;
+               default:
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/cpu-omap.c
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/cpu-omap.c
+@@ -148,10 +148,13 @@
+                                                       VERY_HI_RATE) / 1000;
+       }
+-      clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);
++      /*clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);*/
++      clk_set_rate(mpu_clk, 600000 * 1000); /*N900 hack: set default max to 600MHz */
+-      policy->min = policy->cpuinfo.min_freq;
+-      policy->max = policy->cpuinfo.max_freq;
++      /*policy->min = policy->cpuinfo.min_freq;*/
++      /*policy->max = policy->cpuinfo.max_freq;*/
++      policy->min = 250000;
++      policy->max = 600000; /*N900 hack: set default to 250-600MHz */
+       policy->cur = omap_getspeed(0);
+       policy->cpuinfo.transition_latency = 300 * 1000;
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.h
+@@ -254,7 +254,7 @@
+ /* XXX: end remove/move */
+ /* SR_MAX_LOW_OPP: the highest of the "low OPPs", 1 and 2. */
+-#define SR_MAX_LOW_OPP                2
++#define SR_MAX_LOW_OPP                3
+ /* XXX: find more appropriate place for these once DVFS is in place */
+ extern u32 current_vdd1_opp;
+--- kernel-maemo-2.6.28.orig/drivers/cpufreq/cpufreq.c
++++ kernel-maemo-2.6.28/drivers/cpufreq/cpufreq.c
+@@ -465,7 +465,7 @@
+ /**
+  * cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
+  */
+-#define store_one(file_name, object)                  \
++#define store_one(file_name, object,ignore)                   \
+ static ssize_t store_##file_name                                      \
+ (struct cpufreq_policy *policy, const char *buf, size_t count)                \
+ {                                                                     \
+@@ -479,15 +479,16 @@
+       ret = sscanf (buf, "%u", &new_policy.object);                   \
+       if (ret != 1)                                                   \
+               return -EINVAL;                                         \
+-                                                                      \
+-      ret = __cpufreq_set_policy(policy, &new_policy);                \
++      printk(KERN_DEBUG "cpufreq: request %u -> %u\n",policy->object,new_policy.object);      \
++      if (new_policy.object != ignore && new_policy.object >= 100000) \
++          ret = __cpufreq_set_policy(policy, &new_policy);            \
+       policy->user_policy.object = policy->object;                    \
+                                                                       \
+       return ret ? ret : count;                                       \
+ }
+-store_one(scaling_min_freq,min);
+-store_one(scaling_max_freq,max);
++store_one(scaling_min_freq,min,600000);
++store_one(scaling_max_freq,max,600000);
+ /**
+  * show_cpuinfo_cur_freq - current CPU frequency as detected by hardware
+--- kernel-maemo-2.6.28.orig/Makefile
++++ kernel-maemo-2.6.28/Makefile
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 28
+-EXTRAVERSION = .10maemo
++EXTRAVERSION = .10maemo-lv
+ NAME = Erotic Pickled Herring
+ # *DOCUMENTATION*
diff --git a/kernel-maemo-2.6.28/debian/patches/overclock-ulv.diff b/kernel-maemo-2.6.28/debian/patches/overclock-ulv.diff
new file mode 100644 (file)
index 0000000..23d6c69
--- /dev/null
@@ -0,0 +1,197 @@
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/omap3-opp.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/omap3-opp.h
+@@ -4,11 +4,20 @@
+ #include <mach/omap-pm.h>
+ /* MPU speeds */
++#define S1200M  1200000000
++#define S1100M  1100000000
++#define S1000M  1000000000
++#define S950M   950000000
++#define S900M   900000000
++#define S850M   850000000
++#define S810M   810000000
++#define S750M   750000000
++#define S700M   700000000
+ #define S600M   600000000
+ #define S550M   550000000
+ #define S500M   500000000
+ #define S250M   250000000
+-#define S125M   125000000
++#define S125M   124999000
+ /* DSP speeds */
+ #define S430M   430000000
+@@ -23,16 +32,24 @@
+ static struct omap_opp omap3_mpu_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
+-      {0, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S250M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S500M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S550M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S600M, VDD1_OPP5, 0x3C},
++      {0, VDD1_OPP1, 0x19},
++      /*underclocking*/
++      {S125M, VDD1_OPP2, 0x19},
++      /*default*/
++      {S250M, VDD1_OPP3, 0x19},
++      {S500M, VDD1_OPP4, 0x21},
++      {S550M, VDD1_OPP5, 0x26},
++      {S600M, 6, 0x26},
++      /*overclocking*/
++      {S700M, 7, 0x2D},
++      {S750M, 8, 0x2D},
++      {S810M, 9, 0x30},
++      {S850M, 10, 0x30},
++      {S900M, 11, 0x36},
++      {S950M, 12, 0x36},
++      {S1000M, 13, 0x3C},
++      {S1100M, 14, 0x3C},
++      {S1200M, 15, 0x40},
+ };
+ static struct omap_opp omap3_l3_rate_table[] = {
+@@ -47,16 +64,24 @@
+ static struct omap_opp omap3_dsp_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
++      /*underclocking*/
+       {S90M, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S180M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S360M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S400M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S430M, VDD1_OPP5, 0x3C},
++      /*default*/
++      {S90M, VDD1_OPP2, 0x1E},
++      {S180M, VDD1_OPP3, 0x26},
++      {S360M, VDD1_OPP4, 0x30},
++      {S400M, VDD1_OPP5, 0x36},
++      {S430M, 6, 0x36},
++      /*overclocking*/
++      {S430M, 7, 0x36},
++      {S430M, 8, 0x36},
++      {S430M, 9, 0x36},/*800MHz*/
++      {S500M, 10, 0x3C},
++      {S500M, 11, 0x3C},
++      {S500M, 12, 0x3C},
++      {S500M, 13, 0x3C},
++      {S500M, 14, 0x3C},
++      {S500M, 15, 0x3C},
+ };
+ #endif
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/include/mach/omap34xx.h
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/include/mach/omap34xx.h
+@@ -114,7 +114,8 @@
+ #define VDD2_OPP3     0x3
+ #define MIN_VDD1_OPP  VDD1_OPP1
+-#define MAX_VDD1_OPP  VDD1_OPP5
++/*#define MAX_VDD1_OPP        VDD1_OPP5*/
++#define MAX_VDD1_OPP  15
+ #define MIN_VDD2_OPP  VDD2_OPP1
+ #define MAX_VDD2_OPP  VDD2_OPP3
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.c
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.c
+@@ -513,7 +513,7 @@
+       sr->req_opp_no = target_opp_no;
+       if (sr->srid == SR1) {
+-              switch (target_opp_no) {
++              switch (min(target_opp_no-1,5)) {
+               case 5:
+                       nvalue_reciprocal = sr->opp5_nvalue;
+                       break;
+@@ -527,6 +527,7 @@
+                       nvalue_reciprocal = sr->opp2_nvalue;
+                       break;
+               case 1:
++              case 0:
+                       nvalue_reciprocal = sr->opp1_nvalue;
+                       break;
+               default:
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/cpu-omap.c
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/cpu-omap.c
+@@ -148,10 +148,13 @@
+                                                       VERY_HI_RATE) / 1000;
+       }
+-      clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);
++      /*clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);*/
++      clk_set_rate(mpu_clk, 600000 * 1000); /*N900 hack: set default max to 600MHz */
+-      policy->min = policy->cpuinfo.min_freq;
+-      policy->max = policy->cpuinfo.max_freq;
++      /*policy->min = policy->cpuinfo.min_freq;*/
++      /*policy->max = policy->cpuinfo.max_freq;*/
++      policy->min = 250000;
++      policy->max = 600000; /*N900 hack: set default to 250-600MHz */
+       policy->cur = omap_getspeed(0);
+       policy->cpuinfo.transition_latency = 300 * 1000;
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.h
+@@ -254,7 +254,7 @@
+ /* XXX: end remove/move */
+ /* SR_MAX_LOW_OPP: the highest of the "low OPPs", 1 and 2. */
+-#define SR_MAX_LOW_OPP                2
++#define SR_MAX_LOW_OPP                3
+ /* XXX: find more appropriate place for these once DVFS is in place */
+ extern u32 current_vdd1_opp;
+--- kernel-maemo-2.6.28.orig/drivers/cpufreq/cpufreq.c
++++ kernel-maemo-2.6.28/drivers/cpufreq/cpufreq.c
+@@ -465,7 +465,7 @@
+ /**
+  * cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
+  */
+-#define store_one(file_name, object)                  \
++#define store_one(file_name, object,ignore)                   \
+ static ssize_t store_##file_name                                      \
+ (struct cpufreq_policy *policy, const char *buf, size_t count)                \
+ {                                                                     \
+@@ -479,15 +479,16 @@
+       ret = sscanf (buf, "%u", &new_policy.object);                   \
+       if (ret != 1)                                                   \
+               return -EINVAL;                                         \
+-                                                                      \
+-      ret = __cpufreq_set_policy(policy, &new_policy);                \
++      printk(KERN_DEBUG "cpufreq: request %u -> %u\n",policy->object,new_policy.object);      \
++      if (new_policy.object != ignore && new_policy.object >= 100000) \
++          ret = __cpufreq_set_policy(policy, &new_policy);            \
+       policy->user_policy.object = policy->object;                    \
+                                                                       \
+       return ret ? ret : count;                                       \
+ }
+-store_one(scaling_min_freq,min);
+-store_one(scaling_max_freq,max);
++store_one(scaling_min_freq,min,600000);
++store_one(scaling_max_freq,max,600000);
+ /**
+  * show_cpuinfo_cur_freq - current CPU frequency as detected by hardware
+--- kernel-maemo-2.6.28.orig/Makefile
++++ kernel-maemo-2.6.28/Makefile
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 28
+-EXTRAVERSION = .10maemo
++EXTRAVERSION = .10maemo-ulv
+ NAME = Erotic Pickled Herring
+ # *DOCUMENTATION*
diff --git a/kernel-maemo-2.6.28/debian/patches/overclock-xlv.diff b/kernel-maemo-2.6.28/debian/patches/overclock-xlv.diff
new file mode 100644 (file)
index 0000000..269da98
--- /dev/null
@@ -0,0 +1,196 @@
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/omap3-opp.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/omap3-opp.h
+@@ -4,11 +4,20 @@
+ #include <mach/omap-pm.h>
+ /* MPU speeds */
++#define S1150M  1150000000
++#define S1100M  1100000000
++#define S1000M  1000000000
++#define S950M   950000000
++#define S900M   900000000
++#define S850M   850000000
++#define S810M   810000000
++#define S750M   750000000
++#define S700M   700000000
+ #define S600M   600000000
+ #define S550M   550000000
+ #define S500M   500000000
+ #define S250M   250000000
+-#define S125M   125000000
++#define S125M   124999000
+ /* DSP speeds */
+ #define S430M   430000000
+@@ -23,16 +32,24 @@
+ static struct omap_opp omap3_mpu_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
+       {0, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S250M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S500M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S550M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S600M, VDD1_OPP5, 0x3C},
++      /*underclocking*/
++      {S125M, VDD1_OPP2, 0x14},
++      /*default*/
++      {S250M, VDD1_OPP3, 0x1E},
++      {S500M, VDD1_OPP4, 0x21},
++      {S550M, VDD1_OPP5, 0x26},
++      {S600M, 6, 0x26},
++      /*overclocking*/
++      {S700M, 7, 0x2D},
++      {S750M, 8, 0x2D},
++      {S810M, 9, 0x30},
++      {S850M, 10, 0x30},
++      {S900M, 11, 0x36},
++      {S950M, 12, 0x36},
++      {S1000M, 13, 0x3C},
++      {S1100M, 14, 0x43},
++      {S1150M, 15, 0x48},
+ };
+ static struct omap_opp omap3_l3_rate_table[] = {
+@@ -47,16 +64,24 @@
+ static struct omap_opp omap3_dsp_rate_table[] = {
+       {0, 0, 0},
+-      /*OPP1*/
++      /*underclocking*/
+       {S90M, VDD1_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S180M, VDD1_OPP2, 0x26},
+-      /*OPP3*/
+-      {S360M, VDD1_OPP3, 0x30},
+-      /*OPP4*/
+-      {S400M, VDD1_OPP4, 0x36},
+-      /*OPP5*/
+-      {S430M, VDD1_OPP5, 0x3C},
++      /*default*/
++      {S90M, VDD1_OPP2, 0x1E},
++      {S180M, VDD1_OPP3, 0x26},
++      {S360M, VDD1_OPP4, 0x30},
++      {S400M, VDD1_OPP5, 0x36},
++      {S430M, 6, 0x36},
++      /*overclocking*/
++      {S430M, 7, 0x36},
++      {S430M, 8, 0x36},
++      {S430M, 9, 0x36},/*800MHz*/
++      {S500M, 10, 0x3C},
++      {S500M, 11, 0x3C},
++      {S500M, 12, 0x3C},
++      {S500M, 13, 0x3C},
++      {S500M, 14, 0x43},
++      {S500M, 15, 0x48},
+ };
+ #endif
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/include/mach/omap34xx.h
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/include/mach/omap34xx.h
+@@ -114,7 +114,8 @@
+ #define VDD2_OPP3     0x3
+ #define MIN_VDD1_OPP  VDD1_OPP1
+-#define MAX_VDD1_OPP  VDD1_OPP5
++/*#define MAX_VDD1_OPP        VDD1_OPP5*/
++#define MAX_VDD1_OPP  15
+ #define MIN_VDD2_OPP  VDD2_OPP1
+ #define MAX_VDD2_OPP  VDD2_OPP3
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.c
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.c
+@@ -513,7 +513,7 @@
+       sr->req_opp_no = target_opp_no;
+       if (sr->srid == SR1) {
+-              switch (target_opp_no) {
++              switch (min(target_opp_no-1,5)) {
+               case 5:
+                       nvalue_reciprocal = sr->opp5_nvalue;
+                       break;
+@@ -527,6 +527,7 @@
+                       nvalue_reciprocal = sr->opp2_nvalue;
+                       break;
+               case 1:
++              case 0:
+                       nvalue_reciprocal = sr->opp1_nvalue;
+                       break;
+               default:
+--- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/cpu-omap.c
++++ kernel-maemo-2.6.28/arch/arm/plat-omap/cpu-omap.c
+@@ -148,10 +148,13 @@
+                                                       VERY_HI_RATE) / 1000;
+       }
+-      clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);
++      /*clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);*/
++      clk_set_rate(mpu_clk, 600000 * 1000); /*N900 hack: set default max to 600MHz */
+-      policy->min = policy->cpuinfo.min_freq;
+-      policy->max = policy->cpuinfo.max_freq;
++      /*policy->min = policy->cpuinfo.min_freq;*/
++      /*policy->max = policy->cpuinfo.max_freq;*/
++      policy->min = 250000;
++      policy->max = 600000; /*N900 hack: set default to 250-600MHz */
+       policy->cur = omap_getspeed(0);
+       policy->cpuinfo.transition_latency = 300 * 1000;
+--- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.h
++++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.h
+@@ -254,7 +254,7 @@
+ /* XXX: end remove/move */
+ /* SR_MAX_LOW_OPP: the highest of the "low OPPs", 1 and 2. */
+-#define SR_MAX_LOW_OPP                2
++#define SR_MAX_LOW_OPP                3
+ /* XXX: find more appropriate place for these once DVFS is in place */
+ extern u32 current_vdd1_opp;
+--- kernel-maemo-2.6.28.orig/drivers/cpufreq/cpufreq.c
++++ kernel-maemo-2.6.28/drivers/cpufreq/cpufreq.c
+@@ -465,7 +465,7 @@
+ /**
+  * cpufreq_per_cpu_attr_write() / store_##file_name() - sysfs write access
+  */
+-#define store_one(file_name, object)                  \
++#define store_one(file_name, object,ignore)                   \
+ static ssize_t store_##file_name                                      \
+ (struct cpufreq_policy *policy, const char *buf, size_t count)                \
+ {                                                                     \
+@@ -479,15 +479,16 @@
+       ret = sscanf (buf, "%u", &new_policy.object);                   \
+       if (ret != 1)                                                   \
+               return -EINVAL;                                         \
+-                                                                      \
+-      ret = __cpufreq_set_policy(policy, &new_policy);                \
++      printk(KERN_DEBUG "cpufreq: request %u -> %u\n",policy->object,new_policy.object);      \
++      if (new_policy.object != ignore && new_policy.object >= 100000) \
++          ret = __cpufreq_set_policy(policy, &new_policy);            \
+       policy->user_policy.object = policy->object;                    \
+                                                                       \
+       return ret ? ret : count;                                       \
+ }
+-store_one(scaling_min_freq,min);
+-store_one(scaling_max_freq,max);
++store_one(scaling_min_freq,min,0);
++store_one(scaling_max_freq,max,600000);
+ /**
+  * show_cpuinfo_cur_freq - current CPU frequency as detected by hardware
+--- kernel-maemo-2.6.28.orig/Makefile
++++ kernel-maemo-2.6.28/Makefile
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 28
+-EXTRAVERSION = .10maemo
++EXTRAVERSION = .10maemo-xlv
+ NAME = Erotic Pickled Herring
+ # *DOCUMENTATION*
index e0841d6..43d1d73 100644 (file)
@@ -1,16 +1,16 @@
 --- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/omap3-opp.h
 +++ kernel-maemo-2.6.28/arch/arm/mach-omap2/omap3-opp.h
-@@ -4,11 +4,20 @@
+@@ -4,13 +4,23 @@
  #include <mach/omap-pm.h>
  
  /* MPU speeds */
-+#define S1200M  1200000000
++#define S1150M  1150000000
 +#define S1100M  1100000000
 +#define S1000M  1000000000
 +#define S950M   950000000
 +#define S900M   900000000
 +#define S850M   850000000
-+#define S800M   800000000
++#define S810M   810000000
 +#define S750M   750000000
 +#define S700M   700000000
  #define S600M   600000000
 +#define S125M   124999000
  
  /* DSP speeds */
++#define S520M   500000000
  #define S430M   430000000
-@@ -23,16 +32,24 @@
+ #define S400M   400000000
+ #define S360M   360000000
+@@ -21,42 +31,8 @@
+ #define S83M    83000000
+ #define S166M   166000000
  
- static struct omap_opp omap3_mpu_rate_table[] = {
-       {0, 0, 0},
+-static struct omap_opp omap3_mpu_rate_table[] = {
+-      {0, 0, 0},
 -      /*OPP1*/
-       {0, VDD1_OPP1, 0x1E},
+-      {0, VDD1_OPP1, 0x1E},
 -      /*OPP2*/
 -      {S250M, VDD1_OPP2, 0x26},
 -      /*OPP3*/
 -      {S550M, VDD1_OPP4, 0x36},
 -      /*OPP5*/
 -      {S600M, VDD1_OPP5, 0x3C},
-+      /*underclocking*/
-+      {S125M, VDD1_OPP2, 0x1E},
-+      /*default*/
-+      {S250M, VDD1_OPP3, 0x26},
-+      {S500M, VDD1_OPP4, 0x30},
-+      {S550M, VDD1_OPP5, 0x36},
-+      {S600M, 6, 0x3C},
-+      /*overclocking*/
-+      {S700M, 7, 0x3C},
-+      {S750M, 8, 0x3C},
-+      {S800M, 9, 0x3C},
-+      {S850M, 10, 0x3C},
-+      {S900M, 11, 0x3C},
-+      {S950M, 12, 0x3C},
-+      {S1000M, 13, 0x3C},
-+      {S1100M, 14, 0x3C},
-+      {S1200M, 15, 0x3C},
- };
- static struct omap_opp omap3_l3_rate_table[] = {
-@@ -47,16 +64,24 @@
- static struct omap_opp omap3_dsp_rate_table[] = {
-       {0, 0, 0},
+-};
+-
+-static struct omap_opp omap3_l3_rate_table[] = {
+-      {0, 0, 0},
 -      /*OPP1*/
-+      /*underclocking*/
-       {S90M, VDD1_OPP1, 0x1E},
+-      {0, VDD2_OPP1, 0x1E},
+-      /*OPP2*/
+-      {S83M, VDD2_OPP2, 0x24},
+-      /*OPP3*/
+-      {S166M, VDD2_OPP3, 0x2C},
+-};
+-
+-static struct omap_opp omap3_dsp_rate_table[] = {
+-      {0, 0, 0},
+-      /*OPP1*/
+-      {S90M, VDD1_OPP1, 0x1E},
 -      /*OPP2*/
 -      {S180M, VDD1_OPP2, 0x26},
 -      /*OPP3*/
 -      {S400M, VDD1_OPP4, 0x36},
 -      /*OPP5*/
 -      {S430M, VDD1_OPP5, 0x3C},
-+      /*default*/
-+      {S90M, VDD1_OPP2, 0x1E},
-+      {S180M, VDD1_OPP3, 0x26},
-+      {S360M, VDD1_OPP4, 0x30},
-+      {S400M, VDD1_OPP5, 0x36},
-+      {S430M, 6, 0x3C},
-+      /*overclocking*/
-+      {S430M, 7, 0x3C},
-+      {S430M, 8, 0x3C},
-+      {S430M, 9, 0x3C},/*800MHz*/
-+      {S500M, 10, 0x3C},
-+      {S500M, 11, 0x3C},
-+      {S500M, 12, 0x3C},
-+      {S500M, 13, 0x3C},
-+      {S500M, 14, 0x3C},
-+      {S500M, 15, 0x3C},
- };
+-};
++extern struct omap_opp omap3_mpu_rate_table[];
++extern struct omap_opp omap3_dsp_rate_table[];
++extern struct omap_opp omap3_l3_rate_table[];
  
  #endif
 --- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/include/mach/omap34xx.h
  
 --- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.c
 +++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.c
-@@ -513,7 +513,7 @@
+@@ -37,6 +37,62 @@
+ #include "prm.h"
+ #include "smartreflex.h"
+ #include "prm-regbits-34xx.h"
++#include "omap3-opp.h"
++
++struct omap_opp omap3_mpu_rate_table[] = {
++      {0, 0, 0},
++      {0, 1, 0x1E},
++      /*underclocking*/
++      {S125M, 2, 0x1E},
++      /*default*/
++      {S250M, 3, 0x26},
++      {S500M, 4, 0x30},
++      {S550M, 5, 0x36},
++      {S600M, 6, 0x3C},
++      /*overclocking*/
++      {S700M, 7, 0x3C},
++      {S750M, 8, 0x3C},
++      {S810M, 9, 0x3C},
++      {S850M, 10, 0x3C},
++      {S900M, 11, 0x3C},
++      {S950M, 12, 0x3C},
++      {S1000M, 13, 0x3C},
++      {S1100M, 14, 0x43},
++      {S1150M, 15, 0x48},
++};
++
++struct omap_opp omap3_l3_rate_table[] = {
++      {0, 0, 0},
++      /*OPP1*/
++      {0, VDD2_OPP1, 0x1E},
++      /*OPP2*/
++      {S83M, VDD2_OPP2, 0x24},
++      /*OPP3*/
++      {S166M, VDD2_OPP3, 0x2C},
++};
++
++struct omap_opp omap3_dsp_rate_table[] = {
++      {0, 0, 0},
++      /*underclocking*/
++      {S90M,  1, 0x1E},
++      /*default*/
++      {S90M,  2, 0x1E},
++      {S180M, 3, 0x26},
++      {S360M, 4, 0x30},
++      {S400M, 5, 0x36},
++      {S430M, 6, 0x3C},
++      /*overclocking*/
++      {S430M, 7, 0x3C},
++      {S430M, 8, 0x3C},
++      {S430M, 9, 0x3C},/*800MHz*/
++      {S520M, 10, 0x3C},
++      {S520M, 11, 0x3C},
++      {S520M, 12, 0x3C},
++      {S520M, 13, 0x3C},
++      {S520M, 14, 0x3C},
++      {S520M, 15, 0x3C},
++};
++
+ /*
+  * VP_TRANXDONE_TIMEOUT: maximum microseconds to wait for the VP to
+@@ -513,7 +569,7 @@
        sr->req_opp_no = target_opp_no;
  
        if (sr->srid == SR1) {
                case 5:
                        nvalue_reciprocal = sr->opp5_nvalue;
                        break;
-@@ -527,6 +527,7 @@
+@@ -527,6 +583,7 @@
                        nvalue_reciprocal = sr->opp2_nvalue;
                        break;
                case 1:
                        nvalue_reciprocal = sr->opp1_nvalue;
                        break;
                default:
+@@ -564,6 +621,8 @@
+                       (ERRCONFIG_VPBOUNDINTEN | ERRCONFIG_VPBOUNDINTST));
+       if (sr->srid == SR1) {
++              /*printk(KERN_NOTICE "OPP%d setting voltage %d\n",
++                                                              target_opp_no,mpu_opps[target_opp_no].vsel);*/
+               errminlimit = (target_opp_no > SR_MAX_LOW_OPP) ?
+                       SR1_ERRMINLIMIT_HIGHOPP : SR1_ERRMINLIMIT_LOWOPP;
+@@ -866,6 +925,8 @@
+       current_opp_no = get_opp_no(current_opp);
+       if (vdd == PRCM_VDD1) {
++              /*printk(KERN_DEBUG "OPP%d bypass setting voltage %d\n",
++                                                              target_opp_no,target_vsel);*/
+               t2_smps_steps = abs(target_vsel - current_vsel);
+               errorgain = (target_opp_no > SR_MAX_LOW_OPP) ?
+                       PRM_VP1_CONFIG_ERRORGAIN_HIGHOPP :
+@@ -940,6 +1001,57 @@
+       return SR_PASS;
+ }
++static ssize_t omap_sr_vdd1_opps_vsel_show(struct kobject *kobj,
++                                      struct kobj_attribute *attr, char *buf)
++{
++      int i;
++      char *b=buf;
++      for(i=1;i<=MAX_VDD1_OPP;i++)
++              b+=sprintf(b, "%d ", mpu_opps[i].vsel);
++      b+=sprintf(b, "\n");
++      return b-buf;
++}
++
++static ssize_t omap_sr_vdd1_opps_vsel_store(struct kobject *kobj,
++                                      struct kobj_attribute *attr,
++                                      const char *buf, size_t n)
++{
++      unsigned short value[16];
++      int i;
++
++      if (sscanf(buf, "%hu %hu %hu %hu %hu %hu %hu %hu %hu %hu %hu %hu %hu %hu %hu %hu",
++                              &value[0], &value[1], &value[2], &value[3],
++                              &value[4], &value[5], &value[6], &value[7],
++                              &value[8], &value[9], &value[10], &value[11],
++                              &value[12], &value[13], &value[14], &value[15]
++                              ) != MAX_VDD1_OPP) {
++              printk(KERN_ERR "sr_vdd1_opps_vsel: Invalid value\n");
++              return -EINVAL;
++      }
++
++      mutex_lock(&dvfs_mutex);
++
++      for(i=1;i<=MAX_VDD1_OPP;i++) {
++              if(value[i-1]<0x49) {
++                      mpu_opps[i].vsel = value[i-1];
++              }
++      }
++
++      mutex_unlock(&dvfs_mutex);
++
++      return n;
++}
++
++static struct kobj_attribute sr_vdd1_opps_vsel = {
++      .attr = {
++      .name = __stringify(sr_vdd1_opps_vsel),
++      .mode = 0644,
++      },
++      .show = omap_sr_vdd1_opps_vsel_show,
++      .store = omap_sr_vdd1_opps_vsel_store,
++};
++
++
+ /* Sysfs interface to select SR VDD1 auto compensation */
+ static ssize_t omap_sr_vdd1_autocomp_show(struct kobject *kobj,
+                                       struct kobj_attribute *attr, char *buf)
+@@ -1075,6 +1187,10 @@
+       printk(KERN_INFO "SmartReflex driver initialized\n");
++      ret = sysfs_create_file(power_kobj, &sr_vdd1_opps_vsel.attr);
++      if (ret)
++              printk(KERN_ERR "sysfs_create_file failed: %d\n", ret);
++
+       ret = sysfs_create_file(power_kobj, &sr_vdd1_autocomp.attr);
+       if (ret)
+               printk(KERN_ERR "sysfs_create_file failed: %d\n", ret);
 --- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/cpu-omap.c
 +++ kernel-maemo-2.6.28/arch/arm/plat-omap/cpu-omap.c
 @@ -148,10 +148,13 @@
  
 -store_one(scaling_min_freq,min);
 -store_one(scaling_max_freq,max);
-+store_one(scaling_min_freq,min,600000);
++store_one(scaling_min_freq,min,0);
 +store_one(scaling_max_freq,max,600000);
  
  /**
diff --git a/kernel-maemo-2.6.28/debian/patches/overclock_uvolt.diff b/kernel-maemo-2.6.28/debian/patches/overclock_uvolt.diff
deleted file mode 100644 (file)
index 634aa3e..0000000
+++ /dev/null
@@ -1,145 +0,0 @@
---- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/omap3-opp.h
-+++ kernel-maemo-2.6.28/arch/arm/mach-omap2/omap3-opp.h
-@@ -4,6 +4,15 @@
- #include <mach/omap-pm.h>
- /* MPU speeds */
-+#define S1200M  1200000000
-+#define S1100M  1100000000
-+#define S1000M  1000000000
-+#define S950M   950000000
-+#define S900M   900000000
-+#define S850M   850000000
-+#define S800M   800000000
-+#define S750M   750000000
-+#define S700M   700000000
- #define S600M   600000000
- #define S550M   550000000
- #define S500M   500000000
-@@ -23,16 +32,23 @@
- static struct omap_opp omap3_mpu_rate_table[] = {
-       {0, 0, 0},
--      /*OPP1*/
-       {0, VDD1_OPP1, 0x1E},
--      /*OPP2*/
--      {S250M, VDD1_OPP2, 0x26},
--      /*OPP3*/
--      {S500M, VDD1_OPP3, 0x30},
--      /*OPP4*/
--      {S550M, VDD1_OPP4, 0x36},
--      /*OPP5*/
--      {S600M, VDD1_OPP5, 0x3C},
-+      /*underclocking*/
-+      {S125M, VDD1_OPP2, 0x1E},
-+      /*default*/
-+      {S250M, VDD1_OPP3, 0x26},
-+      {S500M, VDD1_OPP4, 0x30},
-+      {S550M, VDD1_OPP5, 0x30},
-+      {S600M, 6, 0x30},
-+      /*overclocking*/
-+      {S700M, 7, 0x36},
-+      {S750M, 8, 0x36},
-+      {S800M, 9, 0x36},
-+      {S850M, 10, 0x36},
-+      {S900M, 11, 0x36},
-+      {S950M, 12, 0x36},
-+      {S1000M, 13, 0x36},
-+      {S1100M, 14, 0x36},
- };
- static struct omap_opp omap3_l3_rate_table[] = {
-@@ -47,16 +63,23 @@
- static struct omap_opp omap3_dsp_rate_table[] = {
-       {0, 0, 0},
--      /*OPP1*/
-+      /*underclocking*/
-       {S90M, VDD1_OPP1, 0x1E},
--      /*OPP2*/
--      {S180M, VDD1_OPP2, 0x26},
--      /*OPP3*/
--      {S360M, VDD1_OPP3, 0x30},
--      /*OPP4*/
--      {S400M, VDD1_OPP4, 0x36},
--      /*OPP5*/
--      {S430M, VDD1_OPP5, 0x3C},
-+      /*default*/
-+      {S90M, VDD1_OPP2, 0x1E},
-+      {S180M, VDD1_OPP3, 0x26},
-+      {S360M, VDD1_OPP4, 0x30},
-+      {S400M, VDD1_OPP5, 0x36},
-+      {S430M, 6, 0x3C},
-+      /*overclocking*/
-+      {S430M, 7, 0x3C},
-+      {S430M, 8, 0x3C},
-+      {S430M, 9, 0x3C},/*800MHz*/
-+      {S500M, 10, 0x3C},
-+      {S500M, 11, 0x3C},
-+      {S500M, 12, 0x3C},
-+      {S500M, 13, 0x3C},
-+      {S500M, 14, 0x3C},
- };
- #endif
---- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/include/mach/omap34xx.h
-+++ kernel-maemo-2.6.28/arch/arm/plat-omap/include/mach/omap34xx.h
-@@ -114,7 +114,8 @@
- #define VDD2_OPP3     0x3
- #define MIN_VDD1_OPP  VDD1_OPP1
--#define MAX_VDD1_OPP  VDD1_OPP5
-+/*#define MAX_VDD1_OPP        VDD1_OPP5*/
-+#define MAX_VDD1_OPP  14
- #define MIN_VDD2_OPP  VDD2_OPP1
- #define MAX_VDD2_OPP  VDD2_OPP3
---- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.c
-+++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.c
-@@ -513,7 +513,7 @@
-       sr->req_opp_no = target_opp_no;
-       if (sr->srid == SR1) {
--              switch (target_opp_no) {
-+              switch (min(target_opp_no-1,5)) {
-               case 5:
-                       nvalue_reciprocal = sr->opp5_nvalue;
-                       break;
-@@ -527,6 +527,7 @@
-                       nvalue_reciprocal = sr->opp2_nvalue;
-                       break;
-               case 1:
-+              case 0:
-                       nvalue_reciprocal = sr->opp1_nvalue;
-                       break;
-               default:
---- kernel-maemo-2.6.28.orig/arch/arm/plat-omap/cpu-omap.c
-+++ kernel-maemo-2.6.28/arch/arm/plat-omap/cpu-omap.c
-@@ -148,10 +148,13 @@
-                                                       VERY_HI_RATE) / 1000;
-       }
--      clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);
-+      /*clk_set_rate(mpu_clk, policy->cpuinfo.max_freq * 1000);*/
-+      clk_set_rate(mpu_clk, 600000 * 1000); /*N900 hack: set default max to 600MHz */
--      policy->min = policy->cpuinfo.min_freq;
--      policy->max = policy->cpuinfo.max_freq;
-+      /*policy->min = policy->cpuinfo.min_freq;*/
-+      /*policy->max = policy->cpuinfo.max_freq;*/
-+      policy->min = 250000;
-+      policy->max = 600000; /*N900 hack: set default to 250-600MHz */
-       policy->cur = omap_getspeed(0);
-       policy->cpuinfo.transition_latency = 300 * 1000;
---- kernel-maemo-2.6.28.orig/arch/arm/mach-omap2/smartreflex.h
-+++ kernel-maemo-2.6.28/arch/arm/mach-omap2/smartreflex.h
-@@ -254,7 +254,7 @@
- /* XXX: end remove/move */
- /* SR_MAX_LOW_OPP: the highest of the "low OPPs", 1 and 2. */
--#define SR_MAX_LOW_OPP                2
-+#define SR_MAX_LOW_OPP                3
- /* XXX: find more appropriate place for these once DVFS is in place */
- extern u32 current_vdd1_opp;
index db0d40a..7991486 100644 (file)
@@ -12,5 +12,5 @@ ppp_async_matan.diff
 block2mtd-yoush.diff
 gentoo-fsfixes.diff
 kexec.diff
-overclock.diff
 bq_matan.diff
+overclock.diff
index ec04988..7fbb240 100644 (file)
@@ -32,7 +32,6 @@ INCLUDE_HEADERS_ARCH = asm-$(ARCH) config linux
 RM_SCRIPTS = bloat-o-meter show_delta
 DEBUG_MODULES = oprofile.ko
 MAKE += $(MAKEFLAGS)
-FIASCOURL = "http://repository.maemo.org/pool/fremantle/non-free/s/sdk-fiasco-gen/sdk-fiasco-gen_2.8.2.0.1+0m5_armel.deb"
 
 ifneq (,$(findstring parallel,$(DEB_BUILD_OPTIONS)))
     PARALLEL_JOBS := $(shell echo $(DEB_BUILD_OPTIONS) | \
@@ -85,7 +84,7 @@ clean:
        -rm -f scripts/basic/{docproc,fixdep,hash} scripts/kconfig/mconf scripts/kconfig/*.o scripts/kconfig/lxdialog/*.o
        rm -f modules/modversions.h modules/ksyms.ver debian/files conf.vars scripts/cramfs/cramfsck \
                scripts/cramfs/mkcramfs applied_patches debian/buildinfo stamp-* .config* \
-               debian/$(FLASHER_PACKAGE).postinst
+               debian/$(FLASHER_PACKAGE).postinst debian/$(MODULES_PACKAGE).postinst debian/$(MODULES_PACKAGE).postrm
        rm -rf debian/tmp-*
        rm -rf debian/build
        rm -f *-stamp
@@ -101,13 +100,11 @@ install-kernel:
        dh_installdirs
 
        install -d -m 755 $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot
-       #wget -Odebian/fiasco.deb $(FIASCOURL) && dpkg-deb -x debian/fiasco.deb debian/fiasco
-       #debian/fiasco/usr/bin/fiasco-gen -o $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco -g \
-       #               -k $(KSRC)/arch/arm/boot/zImage -v $(RELEASE)
        fiasco-gen -o $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco -g \
                        -k $(BUILDTMP)/arch/arm/boot/zImage -v $(RELEASE)
-       #rm -rf debian/fiasco debian/fiasco.deb
        chmod 644 $(CURDIR)/debian/$(KERNEL_PACKAGE)/boot/zImage-$(RELEASE).fiasco
+       #mkdir -p $(CURDIR)/debian/$(KERNEL_PACKAGE)/etc/event.d
+       #cp $(CURDIR)/debian/upstart $(CURDIR)/debian/$(KERNEL_PACKAGE)/etc/event.d/kernel-maemo
 
 install-modules:
        dh_testdir
@@ -213,6 +210,14 @@ endif
                -e 's,@KVER@,$(KVER),g' \
                < $(CURDIR)/debian/$(FLASHER_PACKAGE).postinst.in \
                > $(CURDIR)/debian/$(FLASHER_PACKAGE).postinst
+       sed \
+               -e 's,@KVER@,$(KVER),g' \
+               < $(CURDIR)/debian/$(MODULES_PACKAGE).postinst.in \
+               > $(CURDIR)/debian/$(MODULES_PACKAGE).postinst
+       sed \
+               -e 's,@KVER@,$(KVER),g' \
+               < $(CURDIR)/debian/$(MODULES_PACKAGE).postrm.in \
+               > $(CURDIR)/debian/$(MODULES_PACKAGE).postrm
        dh_testdir
        dh_testroot
        dh_installchangelogs -s
index 599a560..cef3a87 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux kernel version: 2.6.28.10maemo-omap1
-# Fri Apr  9 14:08:19 2010
+# Sun Apr 11 11:49:20 2010
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -339,10 +339,10 @@ CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
 # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
 # CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set
-# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
 CONFIG_CPU_IDLE_GOV_MENU=y
@@ -957,7 +957,7 @@ CONFIG_WL1251=m
 CONFIG_PPP=m
 # CONFIG_PPP_MULTILINK is not set
 CONFIG_PPP_FILTER=y
-# CONFIG_PPP_ASYNC is not set
+CONFIG_PPP_ASYNC=m
 # CONFIG_PPP_SYNC_TTY is not set
 CONFIG_PPP_DEFLATE=m
 CONFIG_PPP_BSDCOMP=m
diff --git a/kernel-maemo-2.6.28/debian/upstart b/kernel-maemo-2.6.28/debian/upstart
new file mode 100644 (file)
index 0000000..d184096
--- /dev/null
@@ -0,0 +1,11 @@
+start on started dsme
+stop on starting shutdown
+service
+console none
+script
+  echo 1 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/ignore_nice_load
+  #echo 75 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/up_threshold
+  #echo 150000 > /sys/devices/system/cpu/cpu0/cpufreq/ondemand/sampling_rate
+  modprobe bq27x00_battery
+end script
+