linux-omap 2.6.39: add cpufreq support and tweak beagleboard expansionboard patches
authorKoen Kooi <koen@dominion.thruhere.net>
Sat, 21 May 2011 18:31:36 +0000 (20:31 +0200)
committerKoen Kooi <koen@dominion.thruhere.net>
Mon, 23 May 2011 07:34:57 +0000 (09:34 +0200)
make it the default for beagleboard

Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
62 files changed:
conf/machine/beagleboard.conf
recipes-kernel/linux/linux-omap-2.6.39/beagle/0029-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch [moved from recipes-kernel/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch with 98% similarity]
recipes-kernel/linux/linux-omap-2.6.39/beagle/0030-OMAP3-beagle-add-support-for-expansionboards.patch [moved from recipes-kernel/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch with 89% similarity]
recipes-kernel/linux/linux-omap-2.6.39/beagle/0031-OMAP3-beagle-add-MADC-support.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/beagleboard/defconfig
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0054-OMAP2-cpufreq-free-up-table-on-exit.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0055-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0056-OMAP2-cpufreq-minor-comment-cleanup.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0057-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0058-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0059-OMAP2-cpufreq-fix-freq_table-leak.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0052-cpufreq-helpers-for-walking-the-frequency-table.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0053-cpufreq-introduce-hotplug-governor.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0044-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0045-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0046-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0047-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0048-cpufreq-fixup-after-new-OPP-layer-merged.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0049-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0050-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0051-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0032-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0033-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0034-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0035-OMAP3-smartreflex-request-the-memory-region.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0036-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0037-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0038-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0039-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0040-OMAP3-SR-make-notify-independent-of-class.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0041-OMAP3-SR-disable-interrupt-by-default.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0042-OMAP3-SR-enable-disable-SR-only-on-need.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0043-OMAP3-SR-fix-cosmetic-indentation.patch [new file with mode: 0644]
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0001-OMAP-DSS2-DSI-fix-use_sys_clk-highfreq.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0002-OMAP-DSS2-DSI-fix-dsi_dump_clocks.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0003-OMAP2PLUS-DSS2-Fix-Return-correct-lcd-clock-source-f.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0004-OMAP-DSS-DSI-Fix-DSI-PLL-power-bug.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0005-OMAP-DSS2-fix-panel-Kconfig-dependencies.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0006-OMAP-DSS2-add-bootarg-for-selecting-svideo-or-compos.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0007-video-add-timings-for-hd720.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0008-drivers-net-smsc911x-return-ENODEV-if-device-is-not-.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0009-drivers-input-touchscreen-ads7846-return-ENODEV-if-d.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0010-Revert-omap2_mcspi-Flush-posted-writes.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0011-Revert-omap_hsmmc-improve-interrupt-synchronisation.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0012-Don-t-turn-SDIO-cards-off-to-save-power.-Doing-so-wi.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0013-Enable-the-use-of-SDIO-card-interrupts.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0014-soc-codecs-Enable-audio-capture-by-default-for-twl40.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0015-soc-codecs-twl4030-Turn-on-mic-bias-by-default.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0016-RTC-add-support-for-backup-battery-recharge.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0017-ARM-OMAP2-mmc-twl4030-move-clock-input-selection-pri.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0018-Add-power-off-support-for-the-TWL4030-companion.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0019-ARM-OMAP-Add-twl4030-madc-support-to-Overo.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0020-Enabling-Hwmon-driver-for-twl4030-madc.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0021-mfd-twl-core-enable-madc-clock.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0022-ARM-OMAP-automatically-set-musb-mode-in-platform-dat.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0023-omap-mmc-Adjust-dto-to-eliminate-timeout-errors.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0024-omap-Fix-mtd-subpage-read-alignment.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0025-mtd-nand-omap2-Force-all-buffer-reads-to-u32-alignme.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0026-omap-nand-fix-subpage-ecc-issue-with-prefetch.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0027-OMAP-Overo-Add-support-for-spidev.patch
recipes-kernel/linux/linux-omap-2.6.39/sakoman/0028-unionfs-Add-support-for-unionfs-2.5.9.patch
recipes-kernel/linux/linux-omap_2.6.39.bb

index ce480193f8e6b35b06886a0a17d72c0e6eedc3fe..353d340e57ade831899025319ef79ae178909dd6 100644 (file)
@@ -15,7 +15,7 @@ GUI_MACHINE_CLASS = "bigscreen"
 
 require conf/machine/include/omap3.inc
 
-PREFERRED_PROVIDER_virtual/kernel = "linux-omap-psp"
+PREFERRED_PROVIDER_virtual/kernel = "linux-omap"
 
 IMAGE_FSTYPES += "tar.bz2 ubi"
 EXTRA_IMAGECMD_jffs2 = "-lnp "
similarity index 98%
rename from recipes-kernel/linux/linux-omap-2.6.39/beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch
rename to recipes-kernel/linux/linux-omap-2.6.39/beagle/0029-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch
index c7b6230b564c0c1c6767545d62a152ba8dd03b7b..e2baa0ddae41b3d787f60b76542b76a9ab35ea4e 100644 (file)
@@ -1,7 +1,7 @@
 From 6597e99e0b74076530e34608e2d9a7b86a694b8e Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Fri, 20 May 2011 12:48:37 +0200
-Subject: [PATCH 1/2] OMAP3: beagle: add support for beagleboard xM revision C
+Subject: [PATCH 29/59] OMAP3: beagle: add support for beagleboard xM revision C
 
 The USB enable GPIO has been inverted and the USER button moved.
 
similarity index 89%
rename from recipes-kernel/linux/linux-omap-2.6.39/beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch
rename to recipes-kernel/linux/linux-omap-2.6.39/beagle/0030-OMAP3-beagle-add-support-for-expansionboards.patch
index 68f318b8daa71fa2e200ea7b610a17076cb5734e..3dff19cfa3e8c62a9a7706aa106e640535923688 100644 (file)
@@ -1,15 +1,15 @@
-From 70b4b60b198137ca8aebd577142ea3bb6c273a55 Mon Sep 17 00:00:00 2001
+From d44d47891068bff220ef5c064ec406f8ed385758 Mon Sep 17 00:00:00 2001
 From: Koen Kooi <koen@dominion.thruhere.net>
 Date: Fri, 20 May 2011 13:06:24 +0200
-Subject: [PATCH 2/2] OMAP3: beagle: add support for expansionboards
+Subject: [PATCH 30/59] OMAP3: beagle: add support for expansionboards
 
 Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
 ---
- arch/arm/mach-omap2/board-omap3beagle.c |  267 ++++++++++++++++++++++++++++++-
- 1 files changed, 264 insertions(+), 3 deletions(-)
+ arch/arm/mach-omap2/board-omap3beagle.c |  272 ++++++++++++++++++++++++++++++-
+ 1 files changed, 269 insertions(+), 3 deletions(-)
 
 diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index 1eb1e8e..40e54f2 100644
+index 1eb1e8e..70ed6f3 100644
 --- a/arch/arm/mach-omap2/board-omap3beagle.c
 +++ b/arch/arm/mach-omap2/board-omap3beagle.c
 @@ -21,6 +21,7 @@
@@ -20,7 +20,7 @@ index 1eb1e8e..40e54f2 100644
  #include <linux/input.h>
  #include <linux/gpio_keys.h>
  #include <linux/opp.h>
-@@ -153,6 +154,162 @@ fail0:
+@@ -153,6 +154,167 @@ fail0:
        return;
  }
  
@@ -59,19 +59,24 @@ index 1eb1e8e..40e54f2 100644
 +              .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_POWER_OFF_CARD,
 +              .gpio_wp        = -EINVAL,
 +              .gpio_cd        = -EINVAL,
++              .ocr_mask       = MMC_VDD_165_195,
 +              .nonremovable   = true,
 +      },
 +      {}      /* Terminator */
 + };
 +
-+static struct regulator_consumer_supply beagle_vmmc2_supply = {
-+      .supply         = "vmmc",
-+      .dev_name       = "mmci-omap-hs.1",
-+};
++static struct regulator_consumer_supply beagle_vmmc2_supply = 
++      REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1");
 +
 +static struct regulator_init_data beagle_vmmc2 = {
 +      .constraints = {
-+              .valid_ops_mask = REGULATOR_CHANGE_STATUS,
++              .min_uV                 = 1850000,
++              .max_uV                 = 1850000,
++              .apply_uV               = true,
++              .valid_modes_mask       = REGULATOR_MODE_NORMAL
++                                      | REGULATOR_MODE_STANDBY,
++              .valid_ops_mask         = REGULATOR_CHANGE_MODE
++                                      | REGULATOR_CHANGE_STATUS,
 +      },
 +      .num_consumer_supplies = 1,
 +      .consumer_supplies = &beagle_vmmc2_supply,
@@ -183,7 +188,7 @@ index 1eb1e8e..40e54f2 100644
  static struct mtd_partition omap3beagle_nand_partitions[] = {
        /* All the partition sizes are listed in terms of NAND block size */
        {
-@@ -271,6 +428,12 @@ static struct omap2_hsmmc_info mmc[] = {
+@@ -271,6 +433,12 @@ static struct omap2_hsmmc_info mmc[] = {
                .caps           = MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA,
                .gpio_wp        = 29,
        },
@@ -196,7 +201,7 @@ index 1eb1e8e..40e54f2 100644
        {}      /* Terminator */
  };
  
-@@ -300,11 +463,25 @@ static int beagle_twl_gpio_setup(struct device *dev,
+@@ -300,11 +468,25 @@ static int beagle_twl_gpio_setup(struct device *dev,
        }
        /* gpio + 0 is "mmc0_cd" (input/IRQ) */
        mmc[0].gpio_cd = gpio + 0;
@@ -222,7 +227,7 @@ index 1eb1e8e..40e54f2 100644
  
        /* REVISIT: need ehci-omap hooks for external VBUS
         * power switch and overcurrent detect
-@@ -464,7 +641,7 @@ static struct twl4030_platform_data beagle_twldata = {
+@@ -464,7 +646,7 @@ static struct twl4030_platform_data beagle_twldata = {
        .vpll2          = &beagle_vpll2,
  };
  
@@ -231,7 +236,7 @@ index 1eb1e8e..40e54f2 100644
        {
                I2C_BOARD_INFO("twl4030", 0x48),
                .flags = I2C_CLIENT_WAKE,
-@@ -479,10 +656,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
+@@ -479,10 +661,24 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
         },
  };
  
@@ -258,7 +263,7 @@ index 1eb1e8e..40e54f2 100644
        /* Bus 3 is attached to the DVI port where devices like the pico DLP
         * projector don't work reliably with 400kHz */
        omap_register_i2c_bus(3, 100, beagle_i2c_eeprom, ARRAY_SIZE(beagle_i2c_eeprom));
-@@ -625,6 +816,15 @@ static struct omap_musb_board_data musb_board_data = {
+@@ -625,6 +821,15 @@ static struct omap_musb_board_data musb_board_data = {
        .power                  = 100,
  };
  
@@ -274,7 +279,7 @@ index 1eb1e8e..40e54f2 100644
  static void __init beagle_opp_init(void)
  {
        int r = 0;
-@@ -691,6 +891,65 @@ static void __init omap3_beagle_init(void)
+@@ -691,6 +896,65 @@ static void __init omap3_beagle_init(void)
        /* REVISIT leave DVI powered down until it's needed ... */
        gpio_direction_output(170, true);
  
@@ -340,7 +345,7 @@ index 1eb1e8e..40e54f2 100644
        usb_musb_init(&musb_board_data);
        usbhs_init(&usbhs_bdata);
        omap3beagle_flash_init();
-@@ -703,6 +962,8 @@ static void __init omap3_beagle_init(void)
+@@ -703,6 +967,8 @@ static void __init omap3_beagle_init(void)
        beagle_opp_init();
  }
  
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/beagle/0031-OMAP3-beagle-add-MADC-support.patch b/recipes-kernel/linux/linux-omap-2.6.39/beagle/0031-OMAP3-beagle-add-MADC-support.patch
new file mode 100644 (file)
index 0000000..9ec063d
--- /dev/null
@@ -0,0 +1,36 @@
+From 507e5855dc5a3d8247e5d5c41db4db18af41c641 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Sat, 21 May 2011 16:18:30 +0200
+Subject: [PATCH 31/59] OMAP3: beagle: add MADC support
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c |    5 +++++
+ 1 files changed, 5 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index 70ed6f3..aa7849a 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -632,6 +632,10 @@ static struct twl4030_codec_data beagle_codec_data = {
+       .audio = &beagle_audio_data,
+ };
++static struct twl4030_madc_platform_data beagle_madc_data = {
++      .irq_line       = 1,
++};
++
+ static struct twl4030_platform_data beagle_twldata = {
+       .irq_base       = TWL4030_IRQ_BASE,
+       .irq_end        = TWL4030_IRQ_END,
+@@ -640,6 +644,7 @@ static struct twl4030_platform_data beagle_twldata = {
+       .usb            = &beagle_usb_data,
+       .gpio           = &beagle_gpio_data,
+       .codec          = &beagle_codec_data,
++      .madc           = &beagle_madc_data,
+       .vmmc1          = &beagle_vmmc1,
+       .vsim           = &beagle_vsim,
+       .vdac           = &beagle_vdac,
+-- 
+1.6.6.1
+
index 9e81a05708c4cc10a985dabfad1bd38bcb4885a9..e2207e5f35fdc0fd222752d340770915a2ba5041 100644 (file)
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
 # Linux/arm 2.6.39 Kernel Configuration
-# Fri May 20 13:11:13 2011
+# Sat May 21 19:52:37 2011
 #
 CONFIG_ARM=y
 CONFIG_HAVE_PWM=y
@@ -49,7 +49,8 @@ CONFIG_KERNEL_GZIP=y
 CONFIG_SWAP=y
 CONFIG_SYSVIPC=y
 CONFIG_SYSVIPC_SYSCTL=y
-# CONFIG_POSIX_MQUEUE is not set
+CONFIG_POSIX_MQUEUE=y
+CONFIG_POSIX_MQUEUE_SYSCTL=y
 CONFIG_BSD_PROCESS_ACCT=y
 # CONFIG_BSD_PROCESS_ACCT_V3 is not set
 CONFIG_FHANDLE=y
@@ -71,13 +72,9 @@ CONFIG_GENERIC_IRQ_SHOW=y
 #
 # RCU Subsystem
 #
-CONFIG_TREE_PREEMPT_RCU=y
-# CONFIG_TINY_RCU is not set
-# CONFIG_TINY_PREEMPT_RCU is not set
-CONFIG_PREEMPT_RCU=y
+CONFIG_TINY_RCU=y
+# CONFIG_PREEMPT_RCU is not set
 # CONFIG_RCU_TRACE is not set
-CONFIG_RCU_FANOUT=32
-# CONFIG_RCU_FANOUT_EXACT is not set
 # CONFIG_TREE_RCU_TRACE is not set
 CONFIG_IKCONFIG=y
 CONFIG_IKCONFIG_PROC=y
@@ -98,8 +95,14 @@ CONFIG_CGROUP_PERF=y
 CONFIG_CGROUP_SCHED=y
 CONFIG_FAIR_GROUP_SCHED=y
 CONFIG_RT_GROUP_SCHED=y
-# CONFIG_BLK_CGROUP is not set
-# CONFIG_NAMESPACES is not set
+CONFIG_BLK_CGROUP=y
+# CONFIG_DEBUG_BLK_CGROUP is not set
+CONFIG_NAMESPACES=y
+CONFIG_UTS_NS=y
+CONFIG_IPC_NS=y
+CONFIG_USER_NS=y
+CONFIG_PID_NS=y
+CONFIG_NET_NS=y
 CONFIG_SCHED_AUTOGROUP=y
 CONFIG_MM_OWNER=y
 # CONFIG_SYSFS_DEPRECATED is not set
@@ -107,8 +110,8 @@ CONFIG_MM_OWNER=y
 CONFIG_BLK_DEV_INITRD=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_RD_GZIP=y
-# CONFIG_RD_BZIP2 is not set
-# CONFIG_RD_LZMA is not set
+CONFIG_RD_BZIP2=y
+CONFIG_RD_LZMA=y
 CONFIG_RD_XZ=y
 CONFIG_RD_LZO=y
 CONFIG_CC_OPTIMIZE_FOR_SIZE=y
@@ -175,7 +178,8 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 CONFIG_BLOCK=y
 CONFIG_LBDAF=y
 CONFIG_BLK_DEV_BSG=y
-# CONFIG_BLK_DEV_INTEGRITY is not set
+CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_THROTTLING=y
 
 #
 # IO Schedulers
@@ -183,6 +187,7 @@ CONFIG_BLK_DEV_BSG=y
 CONFIG_IOSCHED_NOOP=y
 CONFIG_IOSCHED_DEADLINE=y
 CONFIG_IOSCHED_CFQ=y
+CONFIG_CFQ_GROUP_IOSCHED=y
 # CONFIG_DEFAULT_DEADLINE is not set
 CONFIG_DEFAULT_CFQ=y
 # CONFIG_DEFAULT_NOOP is not set
@@ -193,27 +198,27 @@ CONFIG_DEFAULT_IOSCHED="cfq"
 # CONFIG_INLINE_SPIN_LOCK_BH is not set
 # CONFIG_INLINE_SPIN_LOCK_IRQ is not set
 # CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
-# CONFIG_INLINE_SPIN_UNLOCK is not set
+CONFIG_INLINE_SPIN_UNLOCK=y
 # CONFIG_INLINE_SPIN_UNLOCK_BH is not set
-# CONFIG_INLINE_SPIN_UNLOCK_IRQ is not set
+CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
 # CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
 # CONFIG_INLINE_READ_TRYLOCK is not set
 # CONFIG_INLINE_READ_LOCK is not set
 # CONFIG_INLINE_READ_LOCK_BH is not set
 # CONFIG_INLINE_READ_LOCK_IRQ is not set
 # CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
-# CONFIG_INLINE_READ_UNLOCK is not set
+CONFIG_INLINE_READ_UNLOCK=y
 # CONFIG_INLINE_READ_UNLOCK_BH is not set
-# CONFIG_INLINE_READ_UNLOCK_IRQ is not set
+CONFIG_INLINE_READ_UNLOCK_IRQ=y
 # CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
 # CONFIG_INLINE_WRITE_TRYLOCK is not set
 # CONFIG_INLINE_WRITE_LOCK is not set
 # CONFIG_INLINE_WRITE_LOCK_BH is not set
 # CONFIG_INLINE_WRITE_LOCK_IRQ is not set
 # CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
-# CONFIG_INLINE_WRITE_UNLOCK is not set
+CONFIG_INLINE_WRITE_UNLOCK=y
 # CONFIG_INLINE_WRITE_UNLOCK_BH is not set
-# CONFIG_INLINE_WRITE_UNLOCK_IRQ is not set
+CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
 # CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
 # CONFIG_MUTEX_SPIN_ON_OWNER is not set
 CONFIG_FREEZER=y
@@ -404,8 +409,8 @@ CONFIG_VMSPLIT_3G=y
 # CONFIG_VMSPLIT_1G is not set
 CONFIG_PAGE_OFFSET=0xC0000000
 # CONFIG_PREEMPT_NONE is not set
-# CONFIG_PREEMPT_VOLUNTARY is not set
-CONFIG_PREEMPT=y
+CONFIG_PREEMPT_VOLUNTARY=y
+# CONFIG_PREEMPT is not set
 CONFIG_HZ=128
 # CONFIG_THUMB2_KERNEL is not set
 CONFIG_AEABI=y
@@ -448,7 +453,7 @@ CONFIG_CMDLINE=" debug "
 CONFIG_KEXEC=y
 CONFIG_ATAGS_PROC=y
 # CONFIG_CRASH_DUMP is not set
-# CONFIG_AUTO_ZRELADDR is not set
+CONFIG_AUTO_ZRELADDR=y
 
 #
 # CPU Power Management
@@ -458,11 +463,12 @@ CONFIG_CPU_FREQ_TABLE=y
 CONFIG_CPU_FREQ_DEBUG=y
 CONFIG_CPU_FREQ_STAT=y
 CONFIG_CPU_FREQ_STAT_DETAILS=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
 # CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
-CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
 # CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
+# CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG is not set
 CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
 CONFIG_CPU_FREQ_GOV_POWERSAVE=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
@@ -972,7 +978,7 @@ CONFIG_KS959_DONGLE=m
 CONFIG_USB_IRDA=m
 CONFIG_SIGMATEL_FIR=m
 CONFIG_MCS_FIR=m
-CONFIG_BT=m
+CONFIG_BT=y
 CONFIG_BT_L2CAP=y
 CONFIG_BT_SCO=y
 CONFIG_BT_RFCOMM=m
@@ -985,9 +991,9 @@ CONFIG_BT_HIDP=m
 #
 # Bluetooth device drivers
 #
-CONFIG_BT_HCIBTUSB=m
+CONFIG_BT_HCIBTUSB=y
 CONFIG_BT_HCIBTSDIO=m
-CONFIG_BT_HCIUART=m
+CONFIG_BT_HCIUART=y
 CONFIG_BT_HCIUART_H4=y
 CONFIG_BT_HCIUART_BCSP=y
 CONFIG_BT_HCIUART_ATH3K=y
@@ -996,7 +1002,8 @@ CONFIG_BT_HCIBCM203X=m
 CONFIG_BT_HCIBPA10X=m
 CONFIG_BT_HCIBFUSB=m
 # CONFIG_BT_HCIVHCI is not set
-# CONFIG_BT_MRVL is not set
+CONFIG_BT_MRVL=m
+# CONFIG_BT_MRVL_SDIO is not set
 CONFIG_BT_ATH3K=m
 CONFIG_BT_WILINK=m
 CONFIG_AF_RXRPC=m
@@ -1035,7 +1042,7 @@ CONFIG_MAC80211_LEDS=y
 # CONFIG_MAC80211_DEBUG_MENU is not set
 CONFIG_WIMAX=m
 CONFIG_WIMAX_DEBUG_LEVEL=8
-CONFIG_RFKILL=m
+CONFIG_RFKILL=y
 CONFIG_RFKILL_LEDS=y
 CONFIG_RFKILL_INPUT=y
 CONFIG_NET_9P=m
@@ -2033,16 +2040,16 @@ CONFIG_VIDEO_ADV7180=m
 # CONFIG_VIDEO_BT856 is not set
 # CONFIG_VIDEO_BT866 is not set
 # CONFIG_VIDEO_KS0127 is not set
-# CONFIG_VIDEO_OV7670 is not set
+CONFIG_VIDEO_OV7670=m
 CONFIG_VIDEO_MT9V011=m
 # CONFIG_VIDEO_TCM825X is not set
 # CONFIG_VIDEO_SAA7110 is not set
 CONFIG_VIDEO_SAA711X=m
 # CONFIG_VIDEO_SAA717X is not set
 # CONFIG_VIDEO_SAA7191 is not set
-# CONFIG_VIDEO_TVP514X is not set
-# CONFIG_VIDEO_TVP5150 is not set
-# CONFIG_VIDEO_TVP7002 is not set
+CONFIG_VIDEO_TVP514X=m
+CONFIG_VIDEO_TVP5150=m
+CONFIG_VIDEO_TVP7002=m
 # CONFIG_VIDEO_VPX3220 is not set
 
 #
@@ -2072,8 +2079,9 @@ CONFIG_VIDEO_CX2341X=m
 # CONFIG_VIDEO_UPD64031A is not set
 # CONFIG_VIDEO_UPD64083 is not set
 CONFIG_VIDEO_VIVI=m
+CONFIG_VIDEO_VPSS_SYSTEM=m
 CONFIG_VIDEO_VPFE_CAPTURE=y
-# CONFIG_VIDEO_DM6446_CCDC is not set
+CONFIG_VIDEO_DM6446_CCDC=m
 CONFIG_VIDEO_OMAP2_VOUT=y
 # CONFIG_VIDEO_CPIA2 is not set
 CONFIG_VIDEO_TIMBERDALE=m
@@ -2958,15 +2966,19 @@ CONFIG_CLKDEV_LOOKUP=y
 # File systems
 #
 CONFIG_EXT2_FS=y
-# CONFIG_EXT2_FS_XATTR is not set
+CONFIG_EXT2_FS_XATTR=y
+CONFIG_EXT2_FS_POSIX_ACL=y
+CONFIG_EXT2_FS_SECURITY=y
 # CONFIG_EXT2_FS_XIP is not set
 CONFIG_EXT3_FS=y
 # CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
-# CONFIG_EXT3_FS_XATTR is not set
+CONFIG_EXT3_FS_XATTR=y
+CONFIG_EXT3_FS_POSIX_ACL=y
+# CONFIG_EXT3_FS_SECURITY is not set
 CONFIG_EXT4_FS=y
 CONFIG_EXT4_FS_XATTR=y
-# CONFIG_EXT4_FS_POSIX_ACL is not set
-# CONFIG_EXT4_FS_SECURITY is not set
+CONFIG_EXT4_FS_POSIX_ACL=y
+CONFIG_EXT4_FS_SECURITY=y
 # CONFIG_EXT4_DEBUG is not set
 CONFIG_JBD=y
 # CONFIG_JBD_DEBUG is not set
@@ -2980,17 +2992,17 @@ CONFIG_REISERFS_FS_XATTR=y
 # CONFIG_REISERFS_FS_POSIX_ACL is not set
 # CONFIG_REISERFS_FS_SECURITY is not set
 CONFIG_JFS_FS=m
-# CONFIG_JFS_POSIX_ACL is not set
+CONFIG_JFS_POSIX_ACL=y
 # CONFIG_JFS_SECURITY is not set
 # CONFIG_JFS_DEBUG is not set
-# CONFIG_JFS_STATISTICS is not set
+CONFIG_JFS_STATISTICS=y
 CONFIG_XFS_FS=m
-# CONFIG_XFS_QUOTA is not set
-# CONFIG_XFS_POSIX_ACL is not set
-# CONFIG_XFS_RT is not set
+CONFIG_XFS_QUOTA=y
+CONFIG_XFS_POSIX_ACL=y
+CONFIG_XFS_RT=y
 # CONFIG_XFS_DEBUG is not set
 CONFIG_GFS2_FS=m
-# CONFIG_GFS2_FS_LOCKING_DLM is not set
+CONFIG_GFS2_FS_LOCKING_DLM=y
 CONFIG_OCFS2_FS=m
 CONFIG_OCFS2_FS_O2CB=m
 CONFIG_OCFS2_FS_USERSPACE_CLUSTER=m
@@ -2998,8 +3010,8 @@ CONFIG_OCFS2_FS_STATS=y
 CONFIG_OCFS2_DEBUG_MASKLOG=y
 # CONFIG_OCFS2_DEBUG_FS is not set
 CONFIG_BTRFS_FS=m
-# CONFIG_BTRFS_FS_POSIX_ACL is not set
-# CONFIG_NILFS2_FS is not set
+CONFIG_BTRFS_FS_POSIX_ACL=y
+CONFIG_NILFS2_FS=m
 CONFIG_FS_POSIX_ACL=y
 CONFIG_EXPORTFS=y
 CONFIG_FILE_LOCKING=y
@@ -3015,15 +3027,22 @@ CONFIG_QUOTA_TREE=y
 # CONFIG_QFMT_V1 is not set
 CONFIG_QFMT_V2=y
 CONFIG_QUOTACTL=y
-CONFIG_AUTOFS4_FS=m
+CONFIG_AUTOFS4_FS=y
 CONFIG_FUSE_FS=m
-# CONFIG_CUSE is not set
+CONFIG_CUSE=m
 CONFIG_GENERIC_ACL=y
 
 #
 # Caches
 #
-# CONFIG_FSCACHE is not set
+CONFIG_FSCACHE=m
+CONFIG_FSCACHE_STATS=y
+CONFIG_FSCACHE_HISTOGRAM=y
+# CONFIG_FSCACHE_DEBUG is not set
+# CONFIG_FSCACHE_OBJECT_LIST is not set
+CONFIG_CACHEFILES=m
+# CONFIG_CACHEFILES_DEBUG is not set
+CONFIG_CACHEFILES_HISTOGRAM=y
 
 #
 # CD-ROM/DVD Filesystems
@@ -3044,7 +3063,7 @@ CONFIG_FAT_DEFAULT_CODEPAGE=437
 CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1"
 CONFIG_NTFS_FS=m
 # CONFIG_NTFS_DEBUG is not set
-CONFIG_NTFS_RW=y
+# CONFIG_NTFS_RW is not set
 
 #
 # Pseudo filesystems
@@ -3120,9 +3139,10 @@ CONFIG_UFS_FS=m
 CONFIG_NETWORK_FILESYSTEMS=y
 CONFIG_NFS_FS=y
 CONFIG_NFS_V3=y
-# CONFIG_NFS_V3_ACL is not set
+CONFIG_NFS_V3_ACL=y
 CONFIG_NFS_V4=y
-# CONFIG_NFS_V4_1 is not set
+CONFIG_NFS_V4_1=y
+CONFIG_PNFS_FILE_LAYOUT=y
 CONFIG_ROOT_NFS=y
 # CONFIG_NFS_USE_LEGACY_DNS is not set
 CONFIG_NFS_USE_KERNEL_DNS=y
@@ -3135,7 +3155,7 @@ CONFIG_NFSD_V3_ACL=y
 CONFIG_NFSD_V4=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-CONFIG_NFS_ACL_SUPPORT=m
+CONFIG_NFS_ACL_SUPPORT=y
 CONFIG_NFS_COMMON=y
 CONFIG_SUNRPC=y
 CONFIG_SUNRPC_GSS=y
@@ -3146,9 +3166,12 @@ CONFIG_CIFS_STATS=y
 CONFIG_CIFS_STATS2=y
 # CONFIG_CIFS_WEAK_PW_HASH is not set
 # CONFIG_CIFS_UPCALL is not set
-# CONFIG_CIFS_XATTR is not set
+CONFIG_CIFS_XATTR=y
+CONFIG_CIFS_POSIX=y
 # CONFIG_CIFS_DEBUG2 is not set
-# CONFIG_CIFS_DFS_UPCALL is not set
+CONFIG_CIFS_DFS_UPCALL=y
+CONFIG_CIFS_FSCACHE=y
+CONFIG_CIFS_ACL=y
 CONFIG_CIFS_EXPERIMENTAL=y
 CONFIG_NCP_FS=m
 # CONFIG_NCPFS_PACKET_SIGNING is not set
@@ -3162,8 +3185,10 @@ CONFIG_NCP_FS=m
 CONFIG_CODA_FS=m
 CONFIG_AFS_FS=m
 # CONFIG_AFS_DEBUG is not set
+# CONFIG_AFS_FSCACHE is not set
 CONFIG_9P_FS=m
-# CONFIG_9P_FS_POSIX_ACL is not set
+CONFIG_9P_FSCACHE=y
+CONFIG_9P_FS_POSIX_ACL=y
 
 #
 # Partition Types
@@ -3257,7 +3282,6 @@ CONFIG_TIMER_STATS=y
 # CONFIG_DEBUG_OBJECTS is not set
 # CONFIG_DEBUG_SLAB is not set
 # CONFIG_DEBUG_KMEMLEAK is not set
-CONFIG_DEBUG_PREEMPT=y
 # CONFIG_DEBUG_RT_MUTEXES is not set
 # CONFIG_RT_MUTEX_TESTER is not set
 # CONFIG_DEBUG_SPINLOCK is not set
@@ -3281,7 +3305,6 @@ CONFIG_DEBUG_MUTEXES=y
 # CONFIG_DEBUG_CREDENTIALS is not set
 # CONFIG_BOOT_PRINTK_DELAY is not set
 # CONFIG_RCU_TORTURE_TEST is not set
-# CONFIG_RCU_CPU_STALL_DETECTOR is not set
 # CONFIG_BACKTRACE_SELF_TEST is not set
 # CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
 # CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
@@ -3301,7 +3324,6 @@ CONFIG_TRACING_SUPPORT=y
 CONFIG_FTRACE=y
 # CONFIG_FUNCTION_TRACER is not set
 # CONFIG_IRQSOFF_TRACER is not set
-# CONFIG_PREEMPT_TRACER is not set
 # CONFIG_SCHED_TRACER is not set
 # CONFIG_ENABLE_DEFAULT_TRACERS is not set
 CONFIG_BRANCH_PROFILE_NONE=y
@@ -3476,6 +3498,8 @@ CONFIG_XZ_DEC_SPARC=y
 CONFIG_XZ_DEC_BCJ=y
 CONFIG_XZ_DEC_TEST=m
 CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_LZMA=y
 CONFIG_DECOMPRESS_XZ=y
 CONFIG_DECOMPRESS_LZO=y
 CONFIG_TEXTSEARCH=y
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0054-OMAP2-cpufreq-free-up-table-on-exit.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0054-OMAP2-cpufreq-free-up-table-on-exit.patch
new file mode 100644 (file)
index 0000000..13f74b8
--- /dev/null
@@ -0,0 +1,38 @@
+From 282243e365a651ca50d48d0a75a6f81163bc166e Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Thu, 12 May 2011 07:59:52 -0500
+Subject: [PATCH 54/59] OMAP2+: cpufreq: free up table on exit
+
+freq_table allocated by opp_init_cpufreq_table in omap_cpu_init
+needs to be freed in omap_cpu_exit.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |    3 +++
+ 1 files changed, 3 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index d53ce23..e38ebb8 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -26,6 +26,7 @@
+ #include <linux/clk.h>
+ #include <linux/io.h>
+ #include <linux/opp.h>
++#include <linux/slab.h>
+ #include <linux/cpu.h>
+ #include <asm/system.h>
+@@ -216,6 +217,8 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+ static int omap_cpu_exit(struct cpufreq_policy *policy)
+ {
+       clk_exit_cpufreq_table(&freq_table);
++      kfree(freq_table);
++      freq_table = NULL;
+       clk_put(mpu_clk);
+       return 0;
+ }
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0055-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0055-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch
new file mode 100644 (file)
index 0000000..331027a
--- /dev/null
@@ -0,0 +1,44 @@
+From 01bf169f5ffd47e37b702da4176f57e852441e08 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Thu, 12 May 2011 08:14:41 -0500
+Subject: [PATCH 55/59] OMAP2+: cpufreq: handle invalid cpufreq table
+
+Handle the case when cpufreq_frequency_table_cpuinfo fails. freq_table
+that we passed failed the internal test of cpufreq generic driver,
+so we should'nt be using the freq_table as such. Instead, warn and
+fallback to clock functions for validation and operation.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |   12 ++++++++++--
+ 1 files changed, 10 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index e38ebb8..6e3666a 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -182,10 +182,18 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+       if (freq_table) {
+               result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+-              if (!result)
++              if (!result) {
+                       cpufreq_frequency_table_get_attr(freq_table,
+                                                       policy->cpu);
+-      } else {
++              } else {
++                      WARN(true, "%s: fallback to clk_round(freq_table=%d)\n",
++                                      __func__, result);
++                      kfree(freq_table);
++                      freq_table = NULL;
++              }
++      }
++
++      if (!freq_table) {
+               policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
+               policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
+                                                       VERY_HI_RATE) / 1000;
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0056-OMAP2-cpufreq-minor-comment-cleanup.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0056-OMAP2-cpufreq-minor-comment-cleanup.patch
new file mode 100644 (file)
index 0000000..32ed628
--- /dev/null
@@ -0,0 +1,33 @@
+From a06384a5a4f2b5062b3dafea2d71726d59a49579 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Thu, 12 May 2011 16:27:45 -0700
+Subject: [PATCH 56/59] OMAP2+: cpufreq: minor comment cleanup
+
+this should probably get squashed in..
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index 6e3666a..45f1e9e 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -84,8 +84,10 @@ static int omap_target(struct cpufreq_policy *policy,
+       if (is_smp() && (num_online_cpus() < NR_CPUS))
+               return ret;
+-      /* Ensure desired rate is within allowed range.  Some govenors
+-       * (ondemand) will just pass target_freq=0 to get the minimum. */
++      /*
++       * Ensure desired rate is within allowed range.  Some govenors
++       * (ondemand) will just pass target_freq=0 to get the minimum.
++       */
+       if (target_freq < policy->min)
+               target_freq = policy->min;
+       if (target_freq > policy->max)
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0057-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0057-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch
new file mode 100644 (file)
index 0000000..4fd2141
--- /dev/null
@@ -0,0 +1,48 @@
+From 52731e770e5a2dfbeacb9d9a595f865c3b4f7186 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Fri, 13 May 2011 05:34:35 -0700
+Subject: [PATCH 57/59] OMAP2: cpufreq: use clk_init_cpufreq_table if OPPs not available
+
+OMAP2 does not use OPP tables at the moment for DVFS. Currently,
+we depend on opp table initialization to give us the freq_table,
+which makes sense for OMAP3+. for OMAP2, we should be using
+clk_init_cpufreq_table - so if the opp based frequency table
+initilization fails, fall back to clk_init_cpufreq_table to give
+us the table.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |    9 ++++++++-
+ 1 files changed, 8 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index 45f1e9e..854f4b3 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -180,7 +180,13 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+               pr_warning("%s: unable to get the mpu device\n", __func__);
+               return -EINVAL;
+       }
+-      opp_init_cpufreq_table(mpu_dev, &freq_table);
++
++      /*
++       * if we dont get cpufreq table using opp, use traditional omap2 lookup
++       * as a fallback
++       */
++      if (opp_init_cpufreq_table(mpu_dev, &freq_table))
++              clk_init_cpufreq_table(&freq_table);
+       if (freq_table) {
+               result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+@@ -188,6 +194,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+                       cpufreq_frequency_table_get_attr(freq_table,
+                                                       policy->cpu);
+               } else {
++                      clk_exit_cpufreq_table(&freq_table);
+                       WARN(true, "%s: fallback to clk_round(freq_table=%d)\n",
+                                       __func__, result);
+                       kfree(freq_table);
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0058-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0058-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch
new file mode 100644 (file)
index 0000000..5577625
--- /dev/null
@@ -0,0 +1,78 @@
+From 754ac343ca86dd2879f597a6ec21c16463aee5b3 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Fri, 13 May 2011 05:43:49 -0700
+Subject: [PATCH 58/59] OMAP2+: cpufreq: use cpufreq_frequency_table_target
+
+Use cpufreq_frequency_table_target for finding the proper target
+instead of seeing if the frequency requested is divisible alone.
+if we have a frequency table, we should restrict ourselves to
+selecting the "approved" frequencies alone and only in the case
+where the frequency table is not available should we attempt at
+closest roundable clock frequency.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |   38 ++++++++++++++++++++++--------
+ 1 files changed, 28 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index 854f4b3..d0b4f97 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -77,24 +77,42 @@ static int omap_target(struct cpufreq_policy *policy,
+                      unsigned int target_freq,
+                      unsigned int relation)
+ {
+-      int i, ret = 0;
++      unsigned int i;
++      int ret = 0;
+       struct cpufreq_freqs freqs;
+       /* Changes not allowed until all CPUs are online */
+       if (is_smp() && (num_online_cpus() < NR_CPUS))
+               return ret;
+-      /*
+-       * Ensure desired rate is within allowed range.  Some govenors
+-       * (ondemand) will just pass target_freq=0 to get the minimum.
+-       */
+-      if (target_freq < policy->min)
+-              target_freq = policy->min;
+-      if (target_freq > policy->max)
+-              target_freq = policy->max;
++      if (freq_table) {
++              ret = cpufreq_frequency_table_target(policy, freq_table,
++                              target_freq, relation, &i);
++              if (ret) {
++                      pr_debug("%s: cpu%d: no freq match for %d(ret=%d)\n",
++                              __func__, policy->cpu, target_freq, ret);
++                      return ret;
++              }
++              freqs.new = freq_table[i].frequency;
++      } else {
++              /*
++               * Ensure desired rate is within allowed range. Some govenors
++               * (ondemand) will just pass target_freq=0 to get the minimum.
++               */
++              if (target_freq < policy->min)
++                      target_freq = policy->min;
++              if (target_freq > policy->max)
++                      target_freq = policy->max;
++
++              freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
++      }
++      if (!freqs.new) {
++              pr_err("%s: cpu%d: no match for freq %d\n", __func__,
++                      policy->cpu, target_freq);
++              return -EINVAL;
++      }
+       freqs.old = omap_getspeed(policy->cpu);
+-      freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
+       freqs.cpu = policy->cpu;
+       if (freqs.old == freqs.new)
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0059-OMAP2-cpufreq-fix-freq_table-leak.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0059-OMAP2-cpufreq-fix-freq_table-leak.patch
new file mode 100644 (file)
index 0000000..2c9eba9
--- /dev/null
@@ -0,0 +1,100 @@
+From cdc549d4ac9225025303a9a8395eb9aa8a73b355 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Wed, 18 May 2011 01:48:23 -0500
+Subject: [PATCH 59/59] OMAP2+: cpufreq: fix freq_table leak
+
+Since we have two cpus the cpuinit call for cpu1 causes
+freq_table of cpu0 to be overwritten. instead, we maintain
+a counter to keep track of cpus who use the cpufreq table
+allocate it once(one freq table for all CPUs) and free them
+once the last user is done with it.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |   33 ++++++++++++++++++++++++------
+ 1 files changed, 26 insertions(+), 7 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index d0b4f97..fc3d0fb 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -42,6 +42,9 @@
+ #define VERY_HI_RATE  900000000
+ static struct cpufreq_frequency_table *freq_table;
++static int freq_table_users;
++static DEFINE_MUTEX(freq_table_lock);
++
+ static struct clk *mpu_clk;
+ static int omap_verify_speed(struct cpufreq_policy *policy)
+@@ -172,6 +175,18 @@ skip_lpj:
+       return ret;
+ }
++static void freq_table_free(void)
++{
++      if (!freq_table_users)
++              return;
++      freq_table_users--;
++      if (freq_table_users)
++              return;
++      clk_exit_cpufreq_table(&freq_table);
++      kfree(freq_table);
++      freq_table = NULL;
++}
++
+ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+ {
+       int result = 0;
+@@ -199,14 +214,18 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+               return -EINVAL;
+       }
++      mutex_lock(&freq_table_lock);
+       /*
+        * if we dont get cpufreq table using opp, use traditional omap2 lookup
+        * as a fallback
+        */
+-      if (opp_init_cpufreq_table(mpu_dev, &freq_table))
+-              clk_init_cpufreq_table(&freq_table);
++      if (!freq_table) {
++              if (opp_init_cpufreq_table(mpu_dev, &freq_table))
++                      clk_init_cpufreq_table(&freq_table);
++      }
+       if (freq_table) {
++              freq_table_users++;
+               result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+               if (!result) {
+                       cpufreq_frequency_table_get_attr(freq_table,
+@@ -215,10 +234,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+                       clk_exit_cpufreq_table(&freq_table);
+                       WARN(true, "%s: fallback to clk_round(freq_table=%d)\n",
+                                       __func__, result);
+-                      kfree(freq_table);
+-                      freq_table = NULL;
++                      freq_table_free();
+               }
+       }
++      mutex_unlock(&freq_table_lock);
+       if (!freq_table) {
+               policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
+@@ -251,9 +270,9 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+ static int omap_cpu_exit(struct cpufreq_policy *policy)
+ {
+-      clk_exit_cpufreq_table(&freq_table);
+-      kfree(freq_table);
+-      freq_table = NULL;
++      mutex_lock(&freq_table_lock);
++      freq_table_free();
++      mutex_unlock(&freq_table_lock);
+       clk_put(mpu_clk);
+       return 0;
+ }
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0052-cpufreq-helpers-for-walking-the-frequency-table.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0052-cpufreq-helpers-for-walking-the-frequency-table.patch
new file mode 100644 (file)
index 0000000..e8945f7
--- /dev/null
@@ -0,0 +1,134 @@
+From 130c4f82c269aa0d4110d3e94c3737a14812314d Mon Sep 17 00:00:00 2001
+From: Mike Turquette <mturquette@ti.com>
+Date: Tue, 17 May 2011 09:35:54 -0500
+Subject: [PATCH 52/59] cpufreq: helpers for walking the frequency table
+
+Two new functions for getting the next higher and next lower frequencies
+in the cpufreq table, based upon a frequency supplied in kHz.
+
+This is useful for cpufreq governors that do not target frequencies
+based upon a percentage or a pre-determined value, but instead access
+the cpufreq table directly.
+
+Signed-off-by: Mike Turquette <mturquette@ti.com>
+Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ drivers/cpufreq/freq_table.c |   73 ++++++++++++++++++++++++++++++++++++++++++
+ include/linux/cpufreq.h      |    9 +++++
+ 2 files changed, 82 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/cpufreq/freq_table.c b/drivers/cpufreq/freq_table.c
+index 0543221..11a307b 100644
+--- a/drivers/cpufreq/freq_table.c
++++ b/drivers/cpufreq/freq_table.c
+@@ -13,6 +13,7 @@
+ #include <linux/module.h>
+ #include <linux/init.h>
+ #include <linux/cpufreq.h>
++#include <linux/err.h>
+ #define dprintk(msg...) \
+       cpufreq_debug_printk(CPUFREQ_DEBUG_CORE, "freq-table", msg)
+@@ -174,6 +175,78 @@ int cpufreq_frequency_table_target(struct cpufreq_policy *policy,
+ }
+ EXPORT_SYMBOL_GPL(cpufreq_frequency_table_target);
++int cpufreq_frequency_table_next_lowest(struct cpufreq_policy *policy,
++              struct cpufreq_frequency_table *table, int *index)
++{
++      unsigned int cur_freq;
++      unsigned int next_lowest_freq;
++      int optimal_index = -1;
++      int i = 0;
++
++      if (!policy || IS_ERR(policy) || !table || IS_ERR(table) ||
++                      !index || IS_ERR(index))
++              return -ENOMEM;
++
++      cur_freq = policy->cur;
++      next_lowest_freq = policy->min;
++
++      /* we're at the lowest frequency in the table already, bail out */
++      if (cur_freq == policy->min)
++              return -EINVAL;
++
++      /* walk the list, find closest freq to cur_freq that is below it */
++      while(table[i].frequency != CPUFREQ_TABLE_END) {
++              if (table[i].frequency < cur_freq &&
++                              table[i].frequency >= next_lowest_freq) {
++                      next_lowest_freq = table[i].frequency;
++                      optimal_index = table[i].index;
++              }
++
++              i++;
++      }
++
++      *index = optimal_index;
++
++      return 0;
++}
++EXPORT_SYMBOL_GPL(cpufreq_frequency_table_next_lowest);
++
++int cpufreq_frequency_table_next_highest(struct cpufreq_policy *policy,
++              struct cpufreq_frequency_table *table, int *index)
++{
++      unsigned int cur_freq;
++      unsigned int next_higher_freq;
++      int optimal_index = -1;
++      int i = 0;
++
++      if (!policy || IS_ERR(policy) || !table || IS_ERR(table) ||
++                      !index || IS_ERR(index))
++              return -ENOMEM;
++
++      cur_freq = policy->cur;
++      next_higher_freq = policy->max;
++
++      /* we're at the highest frequency in the table already, bail out */
++      if (cur_freq == policy->max)
++              return -EINVAL;
++
++      /* walk the list, find closest freq to cur_freq that is above it */
++      while(table[i].frequency != CPUFREQ_TABLE_END) {
++              if (table[i].frequency > cur_freq &&
++                              table[i].frequency <= next_higher_freq) {
++                      next_higher_freq = table[i].frequency;
++                      optimal_index = table[i].index;
++              }
++
++              i++;
++      }
++
++      *index = optimal_index;
++
++      return 0;
++}
++EXPORT_SYMBOL_GPL(cpufreq_frequency_table_next_highest);
++
+ static DEFINE_PER_CPU(struct cpufreq_frequency_table *, cpufreq_show_table);
+ /**
+  * show_available_freqs - show available frequencies for the specified CPU
+diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
+index 9343dd3..a38fca8 100644
+--- a/include/linux/cpufreq.h
++++ b/include/linux/cpufreq.h
+@@ -396,6 +396,15 @@ void cpufreq_frequency_table_get_attr(struct cpufreq_frequency_table *table,
+ void cpufreq_frequency_table_put_attr(unsigned int cpu);
++/* the following are for use in governors, or anywhere else */
++extern int cpufreq_frequency_table_next_lowest(struct cpufreq_policy *policy,
++                                      struct cpufreq_frequency_table *table,
++                                      int *index);
++
++extern int cpufreq_frequency_table_next_highest(struct cpufreq_policy *policy,
++                                      struct cpufreq_frequency_table *table,
++                                      int *index);
++
+ /*********************************************************************
+  *                     UNIFIED DEBUG HELPERS                         *
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0053-cpufreq-introduce-hotplug-governor.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0053-cpufreq-introduce-hotplug-governor.patch
new file mode 100644 (file)
index 0000000..6e9bf2f
--- /dev/null
@@ -0,0 +1,879 @@
+From e524139aca0c528627bad699d06ddcbc9f3fb374 Mon Sep 17 00:00:00 2001
+From: Mike Turquette <mturquette@ti.com>
+Date: Tue, 17 May 2011 09:43:09 -0500
+Subject: [PATCH 53/59] cpufreq: introduce hotplug governor
+
+The "hotplug" governor scales CPU frequency based on load, similar to
+"ondemand".  It scales up to the highest frequency when "up_threshold"
+is crossed and scales down one frequency at a time when "down_threshold"
+is crossed.  Unlike those governors, target frequencies are determined
+by directly accessing the CPUfreq frequency table, instead of taking
+some percentage of maximum available frequency.
+
+The key difference in the "hotplug" governor is that it will disable
+auxillary CPUs when the system is very idle, and enable them again once
+the system becomes busy.  This is achieved by averaging load over
+multiple sampling periods; if CPUs were online or offlined based on a
+single sampling period then thrashing will occur.
+
+Sysfs entries exist for "hotplug_in_sampling_periods" and for
+"hotplug_out_sampling_periods" which determine how many consecutive
+periods get averaged to determine if auxillery CPUs should be onlined or
+offlined.  Defaults are 5 periods and 20 periods respectively.
+Otherwise the standard sysfs entries you might find for "ondemand" and
+"conservative" governors are there.
+
+To use this governor it is assumed that your CPUfreq driver has
+populated the CPUfreq table, CONFIG_NO_HZ is enabled and
+CONFIG_HOTPLUG_CPU is enabled.
+
+Changes in V2:
+       Corrected default sampling periods
+       Optimized load history array resizing
+       Maintain load history when resizing array
+       Add locking to dbs_check_cpu
+       Switch from enable_nonboot_cpus to cpu_up
+       Switch from disable_nonboot_cpus to down_cpu
+       Fix some printks
+       Coding style around for-loops
+
+Signed-off-by: Mike Turquette <mturquette@ti.com>
+Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ Documentation/cpu-freq/governors.txt |   28 ++
+ drivers/cpufreq/Kconfig              |   33 ++
+ drivers/cpufreq/Makefile             |    1 +
+ drivers/cpufreq/cpufreq_hotplug.c    |  705 ++++++++++++++++++++++++++++++++++
+ include/linux/cpufreq.h              |    3 +
+ 5 files changed, 770 insertions(+), 0 deletions(-)
+ create mode 100644 drivers/cpufreq/cpufreq_hotplug.c
+
+diff --git a/Documentation/cpu-freq/governors.txt b/Documentation/cpu-freq/governors.txt
+index e74d0a2..c2e3d3d 100644
+--- a/Documentation/cpu-freq/governors.txt
++++ b/Documentation/cpu-freq/governors.txt
+@@ -193,6 +193,34 @@ governor but for the opposite direction.  For example when set to its
+ default value of '20' it means that if the CPU usage needs to be below
+ 20% between samples to have the frequency decreased.
++
++2.6 Hotplug
++-----------
++
++The CPUfreq governor "hotplug" operates similary to "ondemand" and
++"conservative".  It's decisions are based primarily on CPU load.  Like
++"ondemand" the "hotplug" governor will ramp up to the highest frequency
++once the run-time tunable "up_threshold" parameter is crossed.  Like
++"conservative", the "hotplug" governor exports a "down_threshold"
++parameter that is also tunable at run-time.  When the "down_threshold"
++is crossed the CPU transitions to the next lowest frequency in the
++CPUfreq frequency table instead of decrementing the frequency based on a
++percentage of maximum load.
++
++The main reason "hotplug" governor exists is for architectures requiring
++that only the master CPU be online in order to hit low-power states
++(C-states).  OMAP4 is one such example of this.  The "hotplug" governor
++is also helpful in reducing thermal output in devices with tight thermal
++constraints.
++
++Auxillary CPUs are onlined/offline based on CPU load, but the decision
++to do so is made after averaging several sampling windows.  This is to
++reduce CPU hotplug "thrashing", which can be caused by normal system
++entropy and leads to lots of spurious plug-in and plug-out transitions.
++The number of sampling periods averaged together is tunable via the
++"hotplug_in_sampling_periods" and "hotplug_out_sampling_periods"
++run-time tunable parameters.
++
+ 3. The Governor Interface in the CPUfreq Core
+ =============================================
+diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
+index ca8ee80..c716a0e 100644
+--- a/drivers/cpufreq/Kconfig
++++ b/drivers/cpufreq/Kconfig
+@@ -110,6 +110,19 @@ config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
+         Be aware that not all cpufreq drivers support the conservative
+         governor. If unsure have a look at the help section of the
+         driver. Fallback governor will be the performance governor.
++
++config CPU_FREQ_DEFAULT_GOV_HOTPLUG
++      bool "hotplug"
++      select CPU_FREQ_GOV_HOTPLUG
++      select CPU_FREQ_GOV_PERFORMANCE
++      help
++        Use the CPUFreq governor 'hotplug' as default. This allows you
++        to get a full dynamic frequency capable system with CPU
++        hotplug support by simply loading your cpufreq low-level
++        hardware driver.  Be aware that not all cpufreq drivers
++        support the hotplug governor. If unsure have a look at
++        the help section of the driver. Fallback governor will be the
++        performance governor.
+ endchoice
+ config CPU_FREQ_GOV_PERFORMANCE
+@@ -190,4 +203,24 @@ config CPU_FREQ_GOV_CONSERVATIVE
+         If in doubt, say N.
++config CPU_FREQ_GOV_HOTPLUG
++      tristate "'hotplug' cpufreq governor"
++      depends on CPU_FREQ && NO_HZ && HOTPLUG_CPU
++      help
++        'hotplug' - this driver mimics the frequency scaling behavior
++        in 'ondemand', but with several key differences.  First is
++        that frequency transitions use the CPUFreq table directly,
++        instead of incrementing in a percentage of the maximum
++        available frequency.  Second 'hotplug' will offline auxillary
++        CPUs when the system is idle, and online those CPUs once the
++        system becomes busy again.  This last feature is needed for
++        architectures which transition to low power states when only
++        the "master" CPU is online, or for thermally constrained
++        devices.
++
++        If you don't have one of these architectures or devices, use
++        'ondemand' instead.
++
++        If in doubt, say N.
++
+ endif # CPU_FREQ
+diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
+index 71fc3b4..05d564c 100644
+--- a/drivers/cpufreq/Makefile
++++ b/drivers/cpufreq/Makefile
+@@ -9,6 +9,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_POWERSAVE)   += cpufreq_powersave.o
+ obj-$(CONFIG_CPU_FREQ_GOV_USERSPACE)  += cpufreq_userspace.o
+ obj-$(CONFIG_CPU_FREQ_GOV_ONDEMAND)   += cpufreq_ondemand.o
+ obj-$(CONFIG_CPU_FREQ_GOV_CONSERVATIVE)       += cpufreq_conservative.o
++obj-$(CONFIG_CPU_FREQ_GOV_HOTPLUG)    += cpufreq_hotplug.o
+ # CPUfreq cross-arch helpers
+ obj-$(CONFIG_CPU_FREQ_TABLE)          += freq_table.o
+diff --git a/drivers/cpufreq/cpufreq_hotplug.c b/drivers/cpufreq/cpufreq_hotplug.c
+new file mode 100644
+index 0000000..85aa6d2
+--- /dev/null
++++ b/drivers/cpufreq/cpufreq_hotplug.c
+@@ -0,0 +1,705 @@
++/*
++ * CPUFreq hotplug governor
++ *
++ * Copyright (C) 2010 Texas Instruments, Inc.
++ *   Mike Turquette <mturquette@ti.com>
++ *   Santosh Shilimkar <santosh.shilimkar@ti.com>
++ *
++ * Based on ondemand governor
++ * Copyright (C)  2001 Russell King
++ *           (C)  2003 Venkatesh Pallipadi <venkatesh.pallipadi@intel.com>,
++ *                     Jun Nakajima <jun.nakajima@intel.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.
++ */
++
++#include <linux/kernel.h>
++#include <linux/module.h>
++#include <linux/init.h>
++#include <linux/cpufreq.h>
++#include <linux/cpu.h>
++#include <linux/jiffies.h>
++#include <linux/kernel_stat.h>
++#include <linux/mutex.h>
++#include <linux/hrtimer.h>
++#include <linux/tick.h>
++#include <linux/ktime.h>
++#include <linux/sched.h>
++#include <linux/err.h>
++#include <linux/slab.h>
++
++/* greater than 80% avg load across online CPUs increases frequency */
++#define DEFAULT_UP_FREQ_MIN_LOAD                      (80)
++
++/* less than 20% avg load across online CPUs decreases frequency */
++#define DEFAULT_DOWN_FREQ_MAX_LOAD                    (20)
++
++/* default sampling period (uSec) is bogus; 10x ondemand's default for x86 */
++#define DEFAULT_SAMPLING_PERIOD                               (100000)
++
++/* default number of sampling periods to average before hotplug-in decision */
++#define DEFAULT_HOTPLUG_IN_SAMPLING_PERIODS           (5)
++
++/* default number of sampling periods to average before hotplug-out decision */
++#define DEFAULT_HOTPLUG_OUT_SAMPLING_PERIODS          (20)
++
++static void do_dbs_timer(struct work_struct *work);
++static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
++              unsigned int event);
++
++#ifndef CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG
++static
++#endif
++struct cpufreq_governor cpufreq_gov_hotplug = {
++       .name                   = "hotplug",
++       .governor               = cpufreq_governor_dbs,
++       .owner                  = THIS_MODULE,
++};
++
++struct cpu_dbs_info_s {
++      cputime64_t prev_cpu_idle;
++      cputime64_t prev_cpu_wall;
++      cputime64_t prev_cpu_nice;
++      struct cpufreq_policy *cur_policy;
++      struct delayed_work work;
++      struct cpufreq_frequency_table *freq_table;
++      int cpu;
++      /*
++       * percpu mutex that serializes governor limit change with
++       * do_dbs_timer invocation. We do not want do_dbs_timer to run
++       * when user is changing the governor or limits.
++       */
++      struct mutex timer_mutex;
++};
++static DEFINE_PER_CPU(struct cpu_dbs_info_s, hp_cpu_dbs_info);
++
++static unsigned int dbs_enable;       /* number of CPUs using this policy */
++
++/*
++ * dbs_mutex protects data in dbs_tuners_ins from concurrent changes on
++ * different CPUs. It protects dbs_enable in governor start/stop.
++ */
++static DEFINE_MUTEX(dbs_mutex);
++
++static struct workqueue_struct        *khotplug_wq;
++
++static struct dbs_tuners {
++      unsigned int sampling_rate;
++      unsigned int up_threshold;
++      unsigned int down_threshold;
++      unsigned int hotplug_in_sampling_periods;
++      unsigned int hotplug_out_sampling_periods;
++      unsigned int hotplug_load_index;
++      unsigned int *hotplug_load_history;
++      unsigned int ignore_nice;
++      unsigned int io_is_busy;
++} dbs_tuners_ins = {
++      .sampling_rate =                DEFAULT_SAMPLING_PERIOD,
++      .up_threshold =                 DEFAULT_UP_FREQ_MIN_LOAD,
++      .down_threshold =               DEFAULT_DOWN_FREQ_MAX_LOAD,
++      .hotplug_in_sampling_periods =  DEFAULT_HOTPLUG_IN_SAMPLING_PERIODS,
++      .hotplug_out_sampling_periods = DEFAULT_HOTPLUG_OUT_SAMPLING_PERIODS,
++      .hotplug_load_index =           0,
++      .ignore_nice =                  0,
++      .io_is_busy =                   0,
++};
++
++/*
++ * A corner case exists when switching io_is_busy at run-time: comparing idle
++ * times from a non-io_is_busy period to an io_is_busy period (or vice-versa)
++ * will misrepresent the actual change in system idleness.  We ignore this
++ * corner case: enabling io_is_busy might cause freq increase and disabling
++ * might cause freq decrease, which probably matches the original intent.
++ */
++static inline cputime64_t get_cpu_idle_time(unsigned int cpu, cputime64_t *wall)
++{
++        u64 idle_time;
++        u64 iowait_time;
++
++        /* cpufreq-hotplug always assumes CONFIG_NO_HZ */
++        idle_time = get_cpu_idle_time_us(cpu, wall);
++
++      /* add time spent doing I/O to idle time */
++        if (dbs_tuners_ins.io_is_busy) {
++                iowait_time = get_cpu_iowait_time_us(cpu, wall);
++                /* cpufreq-hotplug always assumes CONFIG_NO_HZ */
++                if (iowait_time != -1ULL && idle_time >= iowait_time)
++                        idle_time -= iowait_time;
++        }
++
++        return idle_time;
++}
++
++/************************** sysfs interface ************************/
++
++/* XXX look at global sysfs macros in cpufreq.h, can those be used here? */
++
++/* cpufreq_hotplug Governor Tunables */
++#define show_one(file_name, object)                                   \
++static ssize_t show_##file_name                                               \
++(struct kobject *kobj, struct attribute *attr, char *buf)             \
++{                                                                     \
++      return sprintf(buf, "%u\n", dbs_tuners_ins.object);             \
++}
++show_one(sampling_rate, sampling_rate);
++show_one(up_threshold, up_threshold);
++show_one(down_threshold, down_threshold);
++show_one(hotplug_in_sampling_periods, hotplug_in_sampling_periods);
++show_one(hotplug_out_sampling_periods, hotplug_out_sampling_periods);
++show_one(ignore_nice_load, ignore_nice);
++show_one(io_is_busy, io_is_busy);
++
++static ssize_t store_sampling_rate(struct kobject *a, struct attribute *b,
++                                 const char *buf, size_t count)
++{
++      unsigned int input;
++      int ret;
++      ret = sscanf(buf, "%u", &input);
++      if (ret != 1)
++              return -EINVAL;
++
++      mutex_lock(&dbs_mutex);
++      dbs_tuners_ins.sampling_rate = input;
++      mutex_unlock(&dbs_mutex);
++
++      return count;
++}
++
++static ssize_t store_up_threshold(struct kobject *a, struct attribute *b,
++                                const char *buf, size_t count)
++{
++      unsigned int input;
++      int ret;
++      ret = sscanf(buf, "%u", &input);
++
++      if (ret != 1 || input <= dbs_tuners_ins.down_threshold) {
++              return -EINVAL;
++      }
++
++      mutex_lock(&dbs_mutex);
++      dbs_tuners_ins.up_threshold = input;
++      mutex_unlock(&dbs_mutex);
++
++      return count;
++}
++
++static ssize_t store_down_threshold(struct kobject *a, struct attribute *b,
++                                const char *buf, size_t count)
++{
++      unsigned int input;
++      int ret;
++      ret = sscanf(buf, "%u", &input);
++
++      if (ret != 1 || input >= dbs_tuners_ins.up_threshold) {
++              return -EINVAL;
++      }
++
++      mutex_lock(&dbs_mutex);
++      dbs_tuners_ins.down_threshold = input;
++      mutex_unlock(&dbs_mutex);
++
++      return count;
++}
++
++static ssize_t store_hotplug_in_sampling_periods(struct kobject *a,
++              struct attribute *b, const char *buf, size_t count)
++{
++      unsigned int input;
++      unsigned int *temp;
++      unsigned int max_windows;
++      int ret;
++      ret = sscanf(buf, "%u", &input);
++
++      if (ret != 1)
++              return -EINVAL;
++
++      /* already using this value, bail out */
++      if (input == dbs_tuners_ins.hotplug_in_sampling_periods)
++              return count;
++
++      mutex_lock(&dbs_mutex);
++      ret = count;
++      max_windows = max(dbs_tuners_ins.hotplug_in_sampling_periods,
++                      dbs_tuners_ins.hotplug_out_sampling_periods);
++
++      /* no need to resize array */
++      if (input <= max_windows) {
++              dbs_tuners_ins.hotplug_in_sampling_periods = input;
++              goto out;
++      }
++
++      /* resize array */
++      temp = kmalloc((sizeof(unsigned int) * input), GFP_KERNEL);
++
++      if (!temp || IS_ERR(temp)) {
++              ret = -ENOMEM;
++              goto out;
++      }
++
++      memcpy(temp, dbs_tuners_ins.hotplug_load_history,
++                      (max_windows * sizeof(unsigned int)));
++      kfree(dbs_tuners_ins.hotplug_load_history);
++
++      /* replace old buffer, old number of sampling periods & old index */
++      dbs_tuners_ins.hotplug_load_history = temp;
++      dbs_tuners_ins.hotplug_in_sampling_periods = input;
++      dbs_tuners_ins.hotplug_load_index = max_windows;
++out:
++      mutex_unlock(&dbs_mutex);
++
++      return ret;
++}
++
++static ssize_t store_hotplug_out_sampling_periods(struct kobject *a,
++              struct attribute *b, const char *buf, size_t count)
++{
++      unsigned int input;
++      unsigned int *temp;
++      unsigned int max_windows;
++      int ret;
++      ret = sscanf(buf, "%u", &input);
++
++      if (ret != 1)
++              return -EINVAL;
++
++      /* already using this value, bail out */
++      if (input == dbs_tuners_ins.hotplug_out_sampling_periods)
++              return count;
++
++      mutex_lock(&dbs_mutex);
++      ret = count;
++      max_windows = max(dbs_tuners_ins.hotplug_in_sampling_periods,
++                      dbs_tuners_ins.hotplug_out_sampling_periods);
++
++      /* no need to resize array */
++      if (input <= max_windows) {
++              dbs_tuners_ins.hotplug_out_sampling_periods = input;
++              goto out;
++      }
++
++      /* resize array */
++      temp = kmalloc((sizeof(unsigned int) * input), GFP_KERNEL);
++
++      if (!temp || IS_ERR(temp)) {
++              ret = -ENOMEM;
++              goto out;
++      }
++
++      memcpy(temp, dbs_tuners_ins.hotplug_load_history,
++                      (max_windows * sizeof(unsigned int)));
++      kfree(dbs_tuners_ins.hotplug_load_history);
++
++      /* replace old buffer, old number of sampling periods & old index */
++      dbs_tuners_ins.hotplug_load_history = temp;
++      dbs_tuners_ins.hotplug_out_sampling_periods = input;
++      dbs_tuners_ins.hotplug_load_index = max_windows;
++out:
++      mutex_unlock(&dbs_mutex);
++
++      return ret;
++}
++
++static ssize_t store_ignore_nice_load(struct kobject *a, struct attribute *b,
++                                    const char *buf, size_t count)
++{
++      unsigned int input;
++      int ret;
++
++      unsigned int j;
++
++      ret = sscanf(buf, "%u", &input);
++      if (ret != 1)
++              return -EINVAL;
++
++      if (input > 1)
++              input = 1;
++
++      mutex_lock(&dbs_mutex);
++      if (input == dbs_tuners_ins.ignore_nice) { /* nothing to do */
++              mutex_unlock(&dbs_mutex);
++              return count;
++      }
++      dbs_tuners_ins.ignore_nice = input;
++
++      /* we need to re-evaluate prev_cpu_idle */
++      for_each_online_cpu(j) {
++              struct cpu_dbs_info_s *dbs_info;
++              dbs_info = &per_cpu(hp_cpu_dbs_info, j);
++              dbs_info->prev_cpu_idle = get_cpu_idle_time(j,
++                                              &dbs_info->prev_cpu_wall);
++              if (dbs_tuners_ins.ignore_nice)
++                      dbs_info->prev_cpu_nice = kstat_cpu(j).cpustat.nice;
++
++      }
++      mutex_unlock(&dbs_mutex);
++
++      return count;
++}
++
++static ssize_t store_io_is_busy(struct kobject *a, struct attribute *b,
++                                 const char *buf, size_t count)
++{
++      unsigned int input;
++      int ret;
++
++      ret = sscanf(buf, "%u", &input);
++      if (ret != 1)
++              return -EINVAL;
++
++      mutex_lock(&dbs_mutex);
++      dbs_tuners_ins.io_is_busy = !!input;
++      mutex_unlock(&dbs_mutex);
++
++      return count;
++}
++
++define_one_global_rw(sampling_rate);
++define_one_global_rw(up_threshold);
++define_one_global_rw(down_threshold);
++define_one_global_rw(hotplug_in_sampling_periods);
++define_one_global_rw(hotplug_out_sampling_periods);
++define_one_global_rw(ignore_nice_load);
++define_one_global_rw(io_is_busy);
++
++static struct attribute *dbs_attributes[] = {
++      &sampling_rate.attr,
++      &up_threshold.attr,
++      &down_threshold.attr,
++      &hotplug_in_sampling_periods.attr,
++      &hotplug_out_sampling_periods.attr,
++      &ignore_nice_load.attr,
++      &io_is_busy.attr,
++      NULL
++};
++
++static struct attribute_group dbs_attr_group = {
++      .attrs = dbs_attributes,
++      .name = "hotplug",
++};
++
++/************************** sysfs end ************************/
++
++static void dbs_check_cpu(struct cpu_dbs_info_s *this_dbs_info)
++{
++      /* combined load of all enabled CPUs */
++      unsigned int total_load = 0;
++      /* single largest CPU load */
++      unsigned int max_load = 0;
++      /* average load across all enabled CPUs */
++      unsigned int avg_load = 0;
++      /* average load across multiple sampling periods for hotplug events */
++      unsigned int hotplug_in_avg_load = 0;
++      unsigned int hotplug_out_avg_load = 0;
++      /* number of sampling periods averaged for hotplug decisions */
++      unsigned int periods;
++
++      struct cpufreq_policy *policy;
++      unsigned int index = 0;
++      unsigned int i, j;
++
++      policy = this_dbs_info->cur_policy;
++
++      /*
++       * cpu load accounting
++       * get highest load, total load and average load across all CPUs
++       */
++      for_each_cpu(j, policy->cpus) {
++              unsigned int load;
++              unsigned int idle_time, wall_time;
++              cputime64_t cur_wall_time, cur_idle_time;
++              struct cpu_dbs_info_s *j_dbs_info;
++
++              j_dbs_info = &per_cpu(hp_cpu_dbs_info, j);
++
++              /* update both cur_idle_time and cur_wall_time */
++              cur_idle_time = get_cpu_idle_time(j, &cur_wall_time);
++
++              /* how much wall time has passed since last iteration? */
++              wall_time = (unsigned int) cputime64_sub(cur_wall_time,
++                              j_dbs_info->prev_cpu_wall);
++              j_dbs_info->prev_cpu_wall = cur_wall_time;
++
++              /* how much idle time has passed since last iteration? */
++              idle_time = (unsigned int) cputime64_sub(cur_idle_time,
++                              j_dbs_info->prev_cpu_idle);
++              j_dbs_info->prev_cpu_idle = cur_idle_time;
++
++              if (unlikely(!wall_time || wall_time < idle_time))
++                      continue;
++
++              /* load is the percentage of time not spent in idle */
++              load = 100 * (wall_time - idle_time) / wall_time;
++
++              /* keep track of combined load across all CPUs */
++              total_load += load;
++
++              /* keep track of highest single load across all CPUs */
++              if (load > max_load)
++                      max_load = load;
++      }
++
++      /* calculate the average load across all related CPUs */
++      avg_load = total_load / num_online_cpus();
++
++
++      /*
++       * hotplug load accounting
++       * average load over multiple sampling periods
++       */
++
++      /* how many sampling periods do we use for hotplug decisions? */
++      periods = max(dbs_tuners_ins.hotplug_in_sampling_periods,
++                      dbs_tuners_ins.hotplug_out_sampling_periods);
++
++      /* store avg_load in the circular buffer */
++      dbs_tuners_ins.hotplug_load_history[dbs_tuners_ins.hotplug_load_index]
++              = avg_load;
++
++      /* compute average load across in & out sampling periods */
++      for (i = 0, j = dbs_tuners_ins.hotplug_load_index;
++                      i < periods; i++, j--) {
++              if (i < dbs_tuners_ins.hotplug_in_sampling_periods)
++                      hotplug_in_avg_load +=
++                              dbs_tuners_ins.hotplug_load_history[j];
++              if (i < dbs_tuners_ins.hotplug_out_sampling_periods)
++                      hotplug_out_avg_load +=
++                              dbs_tuners_ins.hotplug_load_history[j];
++
++              if (j == 0)
++                      j = periods;
++      }
++
++      hotplug_in_avg_load = hotplug_in_avg_load /
++              dbs_tuners_ins.hotplug_in_sampling_periods;
++
++      hotplug_out_avg_load = hotplug_out_avg_load /
++              dbs_tuners_ins.hotplug_out_sampling_periods;
++
++      /* return to first element if we're at the circular buffer's end */
++      if (++dbs_tuners_ins.hotplug_load_index == periods)
++              dbs_tuners_ins.hotplug_load_index = 0;
++
++      /* check for frequency increase */
++      if (avg_load > dbs_tuners_ins.up_threshold) {
++              /* should we enable auxillary CPUs? */
++              if (num_online_cpus() < 2 && hotplug_in_avg_load >
++                              dbs_tuners_ins.up_threshold) {
++                      /* hotplug with cpufreq is nasty
++                       * a call to cpufreq_governor_dbs may cause a lockup.
++                       * wq is not running here so its safe.
++                       */
++                      mutex_unlock(&this_dbs_info->timer_mutex);
++                      cpu_up(1);
++                      mutex_lock(&this_dbs_info->timer_mutex);
++                      goto out;
++              }
++
++              /* increase to highest frequency supported */
++              if (policy->cur < policy->max)
++                      __cpufreq_driver_target(policy, policy->max,
++                                      CPUFREQ_RELATION_H);
++
++              goto out;
++      }
++
++      /* check for frequency decrease */
++      if (avg_load < dbs_tuners_ins.down_threshold) {
++              /* are we at the minimum frequency already? */
++              if (policy->cur == policy->min) {
++                      /* should we disable auxillary CPUs? */
++                      if (num_online_cpus() > 1 && hotplug_out_avg_load <
++                                      dbs_tuners_ins.down_threshold) {
++                              mutex_unlock(&this_dbs_info->timer_mutex);
++                              cpu_down(1);
++                              mutex_lock(&this_dbs_info->timer_mutex);
++                      }
++                      goto out;
++              }
++
++              /* bump down to the next lowest frequency in the table */
++              if (cpufreq_frequency_table_next_lowest(policy,
++                                      this_dbs_info->freq_table, &index)) {
++                      pr_err("%s: failed to get next lowest frequency\n",
++                                      __func__);
++                      goto out;
++              }
++
++              __cpufreq_driver_target(policy,
++                              this_dbs_info->freq_table[index].frequency,
++                              CPUFREQ_RELATION_L);
++      }
++out:
++      return;
++}
++
++static void do_dbs_timer(struct work_struct *work)
++{
++      struct cpu_dbs_info_s *dbs_info =
++              container_of(work, struct cpu_dbs_info_s, work.work);
++      unsigned int cpu = dbs_info->cpu;
++
++      /* We want all related CPUs to do sampling nearly on same jiffy */
++      int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
++
++      mutex_lock(&dbs_info->timer_mutex);
++      dbs_check_cpu(dbs_info);
++      queue_delayed_work_on(cpu, khotplug_wq, &dbs_info->work, delay);
++      mutex_unlock(&dbs_info->timer_mutex);
++}
++
++static inline void dbs_timer_init(struct cpu_dbs_info_s *dbs_info)
++{
++      /* We want all related CPUs to do sampling nearly on same jiffy */
++      int delay = usecs_to_jiffies(dbs_tuners_ins.sampling_rate);
++      delay -= jiffies % delay;
++
++      INIT_DELAYED_WORK_DEFERRABLE(&dbs_info->work, do_dbs_timer);
++      queue_delayed_work_on(dbs_info->cpu, khotplug_wq, &dbs_info->work,
++              delay);
++}
++
++static inline void dbs_timer_exit(struct cpu_dbs_info_s *dbs_info)
++{
++      cancel_delayed_work_sync(&dbs_info->work);
++}
++
++static int cpufreq_governor_dbs(struct cpufreq_policy *policy,
++                                 unsigned int event)
++{
++      unsigned int cpu = policy->cpu;
++      struct cpu_dbs_info_s *this_dbs_info;
++      unsigned int i, j, max_periods;
++      int rc;
++
++      this_dbs_info = &per_cpu(hp_cpu_dbs_info, cpu);
++
++      switch (event) {
++      case CPUFREQ_GOV_START:
++              if ((!cpu_online(cpu)) || (!policy->cur))
++                      return -EINVAL;
++
++              mutex_lock(&dbs_mutex);
++              dbs_enable++;
++              for_each_cpu(j, policy->cpus) {
++                      struct cpu_dbs_info_s *j_dbs_info;
++                      j_dbs_info = &per_cpu(hp_cpu_dbs_info, j);
++                      j_dbs_info->cur_policy = policy;
++
++                      j_dbs_info->prev_cpu_idle = get_cpu_idle_time(j,
++                                              &j_dbs_info->prev_cpu_wall);
++                      if (dbs_tuners_ins.ignore_nice) {
++                              j_dbs_info->prev_cpu_nice =
++                                              kstat_cpu(j).cpustat.nice;
++                      }
++
++                      max_periods = max(DEFAULT_HOTPLUG_IN_SAMPLING_PERIODS,
++                                      DEFAULT_HOTPLUG_OUT_SAMPLING_PERIODS);
++                      dbs_tuners_ins.hotplug_load_history = kmalloc(
++                                      (sizeof(unsigned int) * max_periods),
++                                      GFP_KERNEL);
++                      if (!dbs_tuners_ins.hotplug_load_history) {
++                              WARN_ON(1);
++                              return -ENOMEM;
++                      }
++                      for (i = 0; i < max_periods; i++)
++                              dbs_tuners_ins.hotplug_load_history[i] = 50;
++              }
++              this_dbs_info->cpu = cpu;
++              this_dbs_info->freq_table = cpufreq_frequency_get_table(cpu);
++              /*
++               * Start the timerschedule work, when this governor
++               * is used for first time
++               */
++              if (dbs_enable == 1) {
++                      rc = sysfs_create_group(cpufreq_global_kobject,
++                                              &dbs_attr_group);
++                      if (rc) {
++                              mutex_unlock(&dbs_mutex);
++                              return rc;
++                      }
++              }
++              mutex_unlock(&dbs_mutex);
++
++              mutex_init(&this_dbs_info->timer_mutex);
++              dbs_timer_init(this_dbs_info);
++              break;
++
++      case CPUFREQ_GOV_STOP:
++              dbs_timer_exit(this_dbs_info);
++
++              mutex_lock(&dbs_mutex);
++              mutex_destroy(&this_dbs_info->timer_mutex);
++              dbs_enable--;
++              mutex_unlock(&dbs_mutex);
++              if (!dbs_enable)
++                      sysfs_remove_group(cpufreq_global_kobject,
++                                         &dbs_attr_group);
++              kfree(dbs_tuners_ins.hotplug_load_history);
++              /*
++               * XXX BIG CAVEAT: Stopping the governor with CPU1 offline
++               * will result in it remaining offline until the user onlines
++               * it again.  It is up to the user to do this (for now).
++               */
++              break;
++
++      case CPUFREQ_GOV_LIMITS:
++              mutex_lock(&this_dbs_info->timer_mutex);
++              if (policy->max < this_dbs_info->cur_policy->cur)
++                      __cpufreq_driver_target(this_dbs_info->cur_policy,
++                              policy->max, CPUFREQ_RELATION_H);
++              else if (policy->min > this_dbs_info->cur_policy->cur)
++                      __cpufreq_driver_target(this_dbs_info->cur_policy,
++                              policy->min, CPUFREQ_RELATION_L);
++              mutex_unlock(&this_dbs_info->timer_mutex);
++              break;
++      }
++      return 0;
++}
++
++static int __init cpufreq_gov_dbs_init(void)
++{
++      int err;
++      cputime64_t wall;
++      u64 idle_time;
++      int cpu = get_cpu();
++
++      idle_time = get_cpu_idle_time_us(cpu, &wall);
++      put_cpu();
++      if (idle_time != -1ULL) {
++              dbs_tuners_ins.up_threshold = DEFAULT_UP_FREQ_MIN_LOAD;
++      } else {
++              pr_err("cpufreq-hotplug: %s: assumes CONFIG_NO_HZ\n",
++                              __func__);
++              return -EINVAL;
++      }
++
++      khotplug_wq = create_workqueue("khotplug");
++      if (!khotplug_wq) {
++              pr_err("Creation of khotplug failed\n");
++              return -EFAULT;
++      }
++      err = cpufreq_register_governor(&cpufreq_gov_hotplug);
++      if (err)
++              destroy_workqueue(khotplug_wq);
++
++      return err;
++}
++
++static void __exit cpufreq_gov_dbs_exit(void)
++{
++      cpufreq_unregister_governor(&cpufreq_gov_hotplug);
++      destroy_workqueue(khotplug_wq);
++}
++
++MODULE_AUTHOR("Mike Turquette <mturquette@ti.com>");
++MODULE_DESCRIPTION("'cpufreq_hotplug' - cpufreq governor for dynamic frequency scaling and CPU hotplugging");
++MODULE_LICENSE("GPL");
++
++#ifdef CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG
++fs_initcall(cpufreq_gov_dbs_init);
++#else
++module_init(cpufreq_gov_dbs_init);
++#endif
++module_exit(cpufreq_gov_dbs_exit);
+diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
+index a38fca8..6cbc3df 100644
+--- a/include/linux/cpufreq.h
++++ b/include/linux/cpufreq.h
+@@ -355,6 +355,9 @@ extern struct cpufreq_governor cpufreq_gov_ondemand;
+ #elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE)
+ extern struct cpufreq_governor cpufreq_gov_conservative;
+ #define CPUFREQ_DEFAULT_GOVERNOR      (&cpufreq_gov_conservative)
++#elif defined(CONFIG_CPU_FREQ_DEFAULT_GOV_HOTPLUG)
++extern struct cpufreq_governor cpufreq_gov_hotplug;
++#define CPUFREQ_DEFAULT_GOVERNOR      (&cpufreq_gov_hotplug)
+ #endif
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0044-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0044-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch
new file mode 100644 (file)
index 0000000..a8da257
--- /dev/null
@@ -0,0 +1,27 @@
+From 48ec8ab4a64104f7ecc9dabb9e23e2c3d0d1feee Mon Sep 17 00:00:00 2001
+From: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
+Date: Wed, 11 Aug 2010 17:02:43 -0700
+Subject: [PATCH 44/59] OMAP: CPUfreq: ensure driver initializes after cpufreq framework and governors
+
+Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+---
+ arch/arm/plat-omap/cpu-omap.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index da4f68d..cd09d4b 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -160,7 +160,7 @@ static int __init omap_cpufreq_init(void)
+       return cpufreq_register_driver(&omap_driver);
+ }
+-arch_initcall(omap_cpufreq_init);
++late_initcall(omap_cpufreq_init);
+ /*
+  * if ever we want to remove this, upon cleanup call:
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0045-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0045-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch
new file mode 100644 (file)
index 0000000..132aeec
--- /dev/null
@@ -0,0 +1,31 @@
+From 56cee7bf023af728c952f692f4c24822392882a1 Mon Sep 17 00:00:00 2001
+From: Kevin Hilman <khilman@deeprootsystems.com>
+Date: Wed, 11 Aug 2010 17:05:38 -0700
+Subject: [PATCH 45/59] OMAP: CPUfreq: ensure policy is fully initialized
+
+Ensure policy min/max/cur values are initialized when OMAP
+CPUfreq driver starts.
+
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+---
+ arch/arm/plat-omap/cpu-omap.c |    4 ++++
+ 1 files changed, 4 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index cd09d4b..1b36664 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -126,6 +126,10 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+                                                       VERY_HI_RATE) / 1000;
+       }
++      policy->min = policy->cpuinfo.min_freq;
++      policy->max = policy->cpuinfo.max_freq;
++      policy->cur = omap_getspeed(0);
++
+       /* FIXME: what's the actual transition time? */
+       policy->cpuinfo.transition_latency = 300 * 1000;
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0046-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0046-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch
new file mode 100644 (file)
index 0000000..371ad29
--- /dev/null
@@ -0,0 +1,263 @@
+From a5072bdf333b8fb1080aac5d2b986553ea8de0f9 Mon Sep 17 00:00:00 2001
+From: Rajendra Nayak <rnayak@ti.com>
+Date: Mon, 10 Nov 2008 17:00:25 +0530
+Subject: [PATCH 46/59] OMAP3 PM: CPUFreq driver for OMAP3
+
+CPUFreq driver for OMAP3
+
+With additional fixes and cleanups from Tero Kristo:
+- Fix rate calculation bug in omap3_select_table_rate
+- Refreshed DVFS VDD1 control against latest clock fw
+
+Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+OMAP3: PM: CPUFreq: Fix omap_getspeed.
+
+Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
+
+Make sure omap cpufreq driver initializes after cpufreq framework and governors
+
+Signed-off-by: Peter 'p2' De Schrijver <peter.de-schrijver@nokia.com>
+
+merge: CPUFreq: remove obsolete funcs
+
+OMAP3 clock: Update cpufreq driver
+
+This patch removes all refrences to virtual clock
+nodes in CPUFreq driver.
+
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+Signed-off-by: Tero Kristo <tero.kristo@nokia.com>
+Signed-off-by: Jean Pihet <jpihet@mvista.com>
+
+PM: Prevent direct cpufreq scaling during initialization
+
+It is seen that the OMAP specific cpufreq initialization code tries to
+scale the MPU frequency to the highest possible without taking care of
+the voltage level. On power on reset the power IC does not provide the
+necessary voltage for the highest available MPU frequency (that would
+satisfy all Si families). This potentially is an window of opportunity
+for things to go wrong.
+
+Signed-off-by: Romit Dasgupta <romit@ti.com>
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+
+OMAP3: PM: enable 600MHz (overdrive) OPP
+
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+
+omap3: introduce cpufreq
+
+OMAP OPP layer functions now have dependencies of CONFIG_CPU_FREQ only.
+
+With this patch, omap opp layer now has its compilation flags
+bound to CONFIG_CPU_FREQ. Also its code has been removed from pm34xx.c.
+
+A new file has been created to contain cpu freq code related to
+OMAP3: cpufreq34xx.c
+
+OMAP34xx and OMAP36xx family OPPs are made available
+
+Signed-off-by: Eduardo Valentin <eduardo.valentin@nokia.com>
+Signed-off-by: Paul Walmsley <paul@pwsan.com>
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Vishwanath BS <vishwanath.bs@ti.com>
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+Signed-off-by: Romit Dasgupta <romit@ti.com>
+Signed-off-by: Rajendra Nayak <rnayak@ti.com>
+
+omap3: cpufreq: allow default opp table init
+
+For board files which choose to override the defaults, the existing
+mechanism will work, for boards that would like to work with defaults,
+allow init_common_hw to call init_opp_table to initialize if not
+already initialized. this will allow all omap boards which have opp
+tables predefined for a silicon to use the same.
+
+Originally reported for overo:
+http://marc.info/?t=127265269400004&r=1&w=2
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Reported-by: Peter Tseng <tsenpet09@gmail.com>
+Cc: Cliff Brake <cliff.brake@gmail.com>
+Cc: Kevin Hilman <khilman@deeprootsystems.com>
+
+OMAP2: update OPP data to be device based
+
+Cc: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+
+OMAP3: CPUfreq: update to device-based OPP API
+
+Update usage of OPP API to use new device-based API.  This requires
+getting the 'struct device' for the MPU and using that with the OPP
+API.
+
+Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
+
+omap3: opp: make independent of cpufreq
+
+Make opp3xx data which is registered with the opp layer
+dependent purely on CONFIG_PM as opp layer and pm.c users
+are CONFIG_PM dependent not cpufreq dependent.
+so we rename the data definition to opp3xxx_data.c (inline with what
+we have for omap2), also move the build definition to be under
+the existing CONFIG_PM build instead of CPUFREQ.
+
+Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
+Cc: Kevin Hilman <khilman@deeprootsystems.com>
+Cc: Paul Walmsley <paul@pwsan.com>
+Cc: Rajendra Nayak <rnayak@ti.com>
+Cc: Sanjeev Premi <premi@ti.com>
+Cc: Thara Gopinath <thara@ti.com>
+Cc: Tony Lindgren <tony@atomide.com>
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+---
+ arch/arm/mach-omap2/clock.h     |   14 +++++++++++++-
+ arch/arm/mach-omap2/clock34xx.c |    2 ++
+ arch/arm/plat-omap/cpu-omap.c   |   34 +++++++++++++++++++++++++++++++---
+ 3 files changed, 46 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/clock.h b/arch/arm/mach-omap2/clock.h
+index e10ff2b..0a07e50 100644
+--- a/arch/arm/mach-omap2/clock.h
++++ b/arch/arm/mach-omap2/clock.h
+@@ -141,7 +141,9 @@ extern const struct clksel_rate gpt_sys_rates[];
+ extern const struct clksel_rate gfx_l3_rates[];
+ extern const struct clksel_rate dsp_ick_rates[];
+-#if defined(CONFIG_ARCH_OMAP2) && defined(CONFIG_CPU_FREQ)
++#ifdef CONFIG_CPU_FREQ
++
++#ifdef CONFIG_ARCH_OMAP2
+ extern void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
+ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
+ #else
+@@ -149,6 +151,16 @@ extern void omap2_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table)
+ #define omap2_clk_exit_cpufreq_table  0
+ #endif
++#ifdef CONFIG_ARCH_OMAP3
++extern void omap3_clk_init_cpufreq_table(struct cpufreq_frequency_table **table);
++extern void omap3_clk_exit_cpufreq_table(struct cpufreq_frequency_table **table);
++#else
++#define omap3_clk_init_cpufreq_table  0
++#define omap3_clk_exit_cpufreq_table  0
++#endif
++
++#endif /* CONFIG_CPU_FREQ */
++
+ extern const struct clkops clkops_omap2_iclk_dflt_wait;
+ extern const struct clkops clkops_omap2_iclk_dflt;
+ extern const struct clkops clkops_omap2_iclk_idle_only;
+diff --git a/arch/arm/mach-omap2/clock34xx.c b/arch/arm/mach-omap2/clock34xx.c
+index 1fc96b9..119e135 100644
+--- a/arch/arm/mach-omap2/clock34xx.c
++++ b/arch/arm/mach-omap2/clock34xx.c
+@@ -20,6 +20,8 @@
+ #include <linux/kernel.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
++#include <linux/err.h>
++#include <linux/cpufreq.h>
+ #include <plat/clock.h>
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index 1b36664..f0f9430 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -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@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.
+@@ -26,12 +30,19 @@
+ #include <plat/clock.h>
+ #include <asm/system.h>
++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
++#include <plat/omap-pm.h>
++#include <plat/opp.h>
++#endif
++
+ #define VERY_HI_RATE  900000000
+ static struct cpufreq_frequency_table *freq_table;
+ #ifdef CONFIG_ARCH_OMAP1
+ #define MPU_CLK               "mpu"
++#elif CONFIG_ARCH_OMAP3
++#define MPU_CLK               "arm_fck"
+ #else
+ #define MPU_CLK               "virt_prcm_set"
+ #endif
+@@ -73,7 +84,13 @@ static int omap_target(struct cpufreq_policy *policy,
+                      unsigned int target_freq,
+                      unsigned int relation)
+ {
++#ifdef CONFIG_ARCH_OMAP1
+       struct cpufreq_freqs freqs;
++#endif
++#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
++      unsigned long freq;
++      struct device *mpu_dev = omap2_get_mpuss_device();
++#endif
+       int ret = 0;
+       /* Ensure desired rate is within allowed range.  Some govenors
+@@ -83,13 +100,13 @@ static int omap_target(struct cpufreq_policy *policy,
+       if (target_freq > policy->max)
+               target_freq = policy->max;
++#ifdef CONFIG_ARCH_OMAP1
+       freqs.old = omap_getspeed(0);
+       freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
+       freqs.cpu = 0;
+       if (freqs.old == freqs.new)
+               return ret;
+-
+       cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+ #ifdef CONFIG_CPU_FREQ_DEBUG
+       printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
+@@ -97,7 +114,11 @@ static int omap_target(struct cpufreq_policy *policy,
+ #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)
++      freq = target_freq * 1000;
++      if (opp_find_freq_ceil(mpu_dev, &freq))
++              omap_pm_cpu_set_freq(freq);
++#endif
+       return ret;
+ }
+@@ -114,7 +135,14 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+       policy->cur = policy->min = policy->max = omap_getspeed(0);
+-      clk_init_cpufreq_table(&freq_table);
++      if (!cpu_is_omap34xx()) {
++              clk_init_cpufreq_table(&freq_table);
++      } else {
++              struct device *mpu_dev = omap2_get_mpuss_device();
++
++              opp_init_cpufreq_table(mpu_dev, &freq_table);
++      }
++
+       if (freq_table) {
+               result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+               if (!result)
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0047-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0047-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch
new file mode 100644 (file)
index 0000000..5d7b02a
--- /dev/null
@@ -0,0 +1,32 @@
+From 4b4c71142858947f540b337873caf5c1436b4d73 Mon Sep 17 00:00:00 2001
+From: Silesh C V <silesh@ti.com>
+Date: Wed, 29 Sep 2010 14:52:54 +0530
+Subject: [PATCH 47/59] OMAP: PM: CPUFREQ: Fix conditional compilation
+
+Fix conditional compilation. A conditional expresiion
+should follow "#elif", in this case #elif clause should
+check whether CONFIG_ARCH_OMAP3 is defined or not
+(ie. defined(CONFIG_ARCH_OMAP3)) rather than checking for
+the value of the macro.
+
+Signed-off-by: Silesh C V <silesh@ti.com>
+---
+ arch/arm/plat-omap/cpu-omap.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index f0f9430..c3ac065 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -41,7 +41,7 @@ static struct cpufreq_frequency_table *freq_table;
+ #ifdef CONFIG_ARCH_OMAP1
+ #define MPU_CLK               "mpu"
+-#elif CONFIG_ARCH_OMAP3
++#elif defined(CONFIG_ARCH_OMAP3)
+ #define MPU_CLK               "arm_fck"
+ #else
+ #define MPU_CLK               "virt_prcm_set"
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0048-cpufreq-fixup-after-new-OPP-layer-merged.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0048-cpufreq-fixup-after-new-OPP-layer-merged.patch
new file mode 100644 (file)
index 0000000..4bbaeed
--- /dev/null
@@ -0,0 +1,33 @@
+From 6dac35adbd97f167ddbf26fd1bcea66d1e8a6c6f Mon Sep 17 00:00:00 2001
+From: Kevin Hilman <khilman@deeprootsystems.com>
+Date: Tue, 16 Nov 2010 11:48:41 -0800
+Subject: [PATCH 48/59] cpufreq: fixup after new OPP layer merged
+
+---
+ arch/arm/plat-omap/cpu-omap.c |    3 ++-
+ 1 files changed, 2 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+index c3ac065..9cd2709 100644
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ b/arch/arm/plat-omap/cpu-omap.c
+@@ -25,6 +25,7 @@
+ #include <linux/err.h>
+ #include <linux/clk.h>
+ #include <linux/io.h>
++#include <linux/opp.h>
+ #include <mach/hardware.h>
+ #include <plat/clock.h>
+@@ -32,7 +33,7 @@
+ #if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
+ #include <plat/omap-pm.h>
+-#include <plat/opp.h>
++#include <plat/common.h>
+ #endif
+ #define VERY_HI_RATE  900000000
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0049-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0049-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch
new file mode 100644 (file)
index 0000000..9fedb6c
--- /dev/null
@@ -0,0 +1,669 @@
+From 989bfeaacfc9eb39762aefbfb5f25ecbd05892cc Mon Sep 17 00:00:00 2001
+From: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Date: Mon, 14 Mar 2011 17:08:48 +0530
+Subject: [PATCH 49/59] OMAP: cpufreq: Split OMAP1 and OMAP2PLUS CPUfreq drivers.
+
+This patch is an attempt to cleanup the #ifdeferry in the
+omap CPUfreq drivers.
+
+The split betwenn OMAP1 and OMAP2PLUS is logical because
+       - OMAP1 doesn't support opp layer.
+       - OMAP1 build is seperate from omap2plus.
+
+Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Cc: Kevin Hilman <khilman@ti.com>
+Cc: Vishwanath BS <vishwanath.bs@ti.com>
+---
+ arch/arm/mach-omap1/Makefile            |    3 +
+ arch/arm/mach-omap1/omap1-cpufreq.c     |  176 ++++++++++++++++++++++++++
+ arch/arm/mach-omap2/Makefile            |    3 +
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |  201 ++++++++++++++++++++++++++++++
+ arch/arm/plat-omap/Makefile             |    1 -
+ arch/arm/plat-omap/cpu-omap.c           |  204 -------------------------------
+ 6 files changed, 383 insertions(+), 205 deletions(-)
+ create mode 100644 arch/arm/mach-omap1/omap1-cpufreq.c
+ create mode 100644 arch/arm/mach-omap2/omap2plus-cpufreq.c
+ delete mode 100644 arch/arm/plat-omap/cpu-omap.c
+
+diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
+index af98117..e5082b0 100644
+--- a/arch/arm/mach-omap1/Makefile
++++ b/arch/arm/mach-omap1/Makefile
+@@ -10,6 +10,9 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
+ obj-$(CONFIG_OMAP_32K_TIMER)  += timer32k.o
++# CPUFREQ driver
++obj-$(CONFIG_CPU_FREQ) += omap1-cpufreq.o
++
+ # Power Management
+ obj-$(CONFIG_PM) += pm.o sleep.o pm_bus.o
+diff --git a/arch/arm/mach-omap1/omap1-cpufreq.c b/arch/arm/mach-omap1/omap1-cpufreq.c
+new file mode 100644
+index 0000000..682cdc8
+--- /dev/null
++++ b/arch/arm/mach-omap1/omap1-cpufreq.c
+@@ -0,0 +1,176 @@
++/*
++ *  OMAP1 cpufreq driver
++ *
++ *  CPU frequency scaling for OMAP
++ *
++ *  Copyright (C) 2005 Nokia Corporation
++ *  Written by Tony Lindgren <tony@atomide.com>
++ *
++ *  Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
++ *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Updated to support OMAP3
++ * Rajendra Nayak <rnayak@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.
++ */
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/cpufreq.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/err.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/opp.h>
++
++#include <asm/system.h>
++
++#include <plat/clock.h>
++#include <plat/omap-pm.h>
++
++#include <mach/hardware.h>
++
++#define VERY_HI_RATE  900000000
++
++static struct cpufreq_frequency_table *freq_table;
++static struct clk *mpu_clk;
++
++static int omap_verify_speed(struct cpufreq_policy *policy)
++{
++      if (freq_table)
++              return cpufreq_frequency_table_verify(policy, freq_table);
++
++      if (policy->cpu)
++              return -EINVAL;
++
++      cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
++                                   policy->cpuinfo.max_freq);
++
++      policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
++      policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
++      cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
++                                   policy->cpuinfo.max_freq);
++      return 0;
++}
++
++static unsigned int omap_getspeed(unsigned int cpu)
++{
++      unsigned long rate;
++
++      if (cpu)
++              return 0;
++
++      rate = clk_get_rate(mpu_clk) / 1000;
++      return rate;
++}
++
++static int omap_target(struct cpufreq_policy *policy,
++                     unsigned int target_freq,
++                     unsigned int relation)
++{
++      struct cpufreq_freqs freqs;
++      int ret = 0;
++
++      /* Ensure desired rate is within allowed range.  Some govenors
++       * (ondemand) will just pass target_freq=0 to get the minimum. */
++      if (target_freq < policy->min)
++              target_freq = policy->min;
++      if (target_freq > policy->max)
++              target_freq = policy->max;
++
++      freqs.old = omap_getspeed(0);
++      freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
++      freqs.cpu = 0;
++
++      if (freqs.old == freqs.new)
++              return ret;
++
++      cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++
++#ifdef CONFIG_CPU_FREQ_DEBUG
++      pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
++#endif
++      ret = clk_set_rate(mpu_clk, freqs.new * 1000);
++
++      cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++
++      return ret;
++}
++
++static int __init omap_cpu_init(struct cpufreq_policy *policy)
++{
++      int result = 0;
++
++      mpu_clk = clk_get(NULL, "mpu");
++      if (IS_ERR(mpu_clk))
++              return PTR_ERR(mpu_clk);
++
++      if (policy->cpu != 0)
++              return -EINVAL;
++
++      policy->cur = policy->min = policy->max = omap_getspeed(0);
++
++      clk_init_cpufreq_table(&freq_table);
++
++      if (freq_table) {
++              result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
++              if (!result)
++                      cpufreq_frequency_table_get_attr(freq_table,
++                                                      policy->cpu);
++      } else {
++              policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
++              policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
++                                                      VERY_HI_RATE) / 1000;
++      }
++
++      policy->min = policy->cpuinfo.min_freq;
++      policy->max = policy->cpuinfo.max_freq;
++      policy->cur = omap_getspeed(0);
++
++      /* FIXME: what's the actual transition time? */
++      policy->cpuinfo.transition_latency = 300 * 1000;
++
++      return 0;
++}
++
++static int omap_cpu_exit(struct cpufreq_policy *policy)
++{
++      clk_exit_cpufreq_table(&freq_table);
++      clk_put(mpu_clk);
++      return 0;
++}
++
++static struct freq_attr *omap_cpufreq_attr[] = {
++      &cpufreq_freq_attr_scaling_available_freqs,
++      NULL,
++};
++
++static struct cpufreq_driver omap_driver = {
++      .flags          = CPUFREQ_STICKY,
++      .verify         = omap_verify_speed,
++      .target         = omap_target,
++      .get            = omap_getspeed,
++      .init           = omap_cpu_init,
++      .exit           = omap_cpu_exit,
++      .name           = "omap1",
++      .attr           = omap_cpufreq_attr,
++};
++
++static int __init omap_cpufreq_init(void)
++{
++      return cpufreq_register_driver(&omap_driver);
++}
++
++static void __exit omap_cpufreq_exit(void)
++{
++      cpufreq_unregister_driver(&omap_driver);
++}
++
++MODULE_DESCRIPTION("cpufreq driver for OMAP1 SOCs");
++MODULE_LICENSE("GPL");
++module_init(omap_cpufreq_init);
++module_exit(omap_cpufreq_exit);
+diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
+index 512b152..42924f3 100644
+--- a/arch/arm/mach-omap2/Makefile
++++ b/arch/arm/mach-omap2/Makefile
+@@ -56,6 +56,9 @@ obj-$(CONFIG_ARCH_OMAP3)             += opp3xxx_data.o
+ obj-$(CONFIG_ARCH_OMAP4)              += opp4xxx_data.o
+ endif
++# CPUFREQ driver
++obj-$(CONFIG_CPU_FREQ)                        += omap2plus-cpufreq.o
++
+ # Power Management
+ ifeq ($(CONFIG_PM),y)
+ obj-$(CONFIG_ARCH_OMAP2)              += pm24xx.o
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+new file mode 100644
+index 0000000..14f84cc
+--- /dev/null
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -0,0 +1,201 @@
++/*
++ *  OMAP2PLUS cpufreq driver
++ *
++ *  CPU frequency scaling for OMAP
++ *
++ *  Copyright (C) 2005 Nokia Corporation
++ *  Written by Tony Lindgren <tony@atomide.com>
++ *
++ *  Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
++ *
++ * Copyright (C) 2007-2008 Texas Instruments, Inc.
++ * Updated to support OMAP3
++ * Rajendra Nayak <rnayak@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.
++ */
++#include <linux/types.h>
++#include <linux/kernel.h>
++#include <linux/sched.h>
++#include <linux/cpufreq.h>
++#include <linux/delay.h>
++#include <linux/init.h>
++#include <linux/err.h>
++#include <linux/clk.h>
++#include <linux/io.h>
++#include <linux/opp.h>
++
++#include <asm/system.h>
++#include <asm/smp_plat.h>
++
++#include <plat/clock.h>
++#include <plat/omap-pm.h>
++#include <plat/common.h>
++
++#include <mach/hardware.h>
++
++#define VERY_HI_RATE  900000000
++
++static struct cpufreq_frequency_table *freq_table;
++static struct clk *mpu_clk;
++
++static int omap_verify_speed(struct cpufreq_policy *policy)
++{
++      if (freq_table)
++              return cpufreq_frequency_table_verify(policy, freq_table);
++
++      if (policy->cpu)
++              return -EINVAL;
++
++      cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
++                                   policy->cpuinfo.max_freq);
++
++      policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
++      policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
++      cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
++                                   policy->cpuinfo.max_freq);
++      return 0;
++}
++
++static unsigned int omap_getspeed(unsigned int cpu)
++{
++      unsigned long rate;
++
++      if (cpu)
++              return 0;
++
++      rate = clk_get_rate(mpu_clk) / 1000;
++      return rate;
++}
++
++static int omap_target(struct cpufreq_policy *policy,
++                     unsigned int target_freq,
++                     unsigned int relation)
++{
++      int ret = 0;
++      struct cpufreq_freqs freqs;
++
++      /* Ensure desired rate is within allowed range.  Some govenors
++       * (ondemand) will just pass target_freq=0 to get the minimum. */
++      if (target_freq < policy->min)
++              target_freq = policy->min;
++      if (target_freq > policy->max)
++              target_freq = policy->max;
++
++      freqs.old = omap_getspeed(0);
++      freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
++      freqs.cpu = 0;
++
++      if (freqs.old == freqs.new)
++              return ret;
++
++      cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++
++#ifdef CONFIG_CPU_FREQ_DEBUG
++      pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
++#endif
++
++      ret = clk_set_rate(mpu_clk, freqs.new * 1000);
++
++      /*
++       * Generic CPUFREQ driver jiffy update is under !SMP. So jiffies
++       * won't get updated when UP machine cpufreq build with
++       * CONFIG_SMP enabled. Below code is added only to manage that
++       * scenario
++       */
++      if (!is_smp())
++              loops_per_jiffy =
++                       cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new);
++
++      cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++
++      return ret;
++}
++
++static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
++{
++      int result = 0;
++      struct device *mpu_dev;
++
++      if (cpu_is_omap24xx())
++              mpu_clk = clk_get(NULL, "virt_prcm_set");
++      else if (cpu_is_omap34xx())
++              mpu_clk = clk_get(NULL, "dpll1_ck");
++      else if (cpu_is_omap34xx())
++              mpu_clk = clk_get(NULL, "dpll_mpu_ck");
++
++      if (IS_ERR(mpu_clk))
++              return PTR_ERR(mpu_clk);
++
++      if (policy->cpu != 0)
++              return -EINVAL;
++
++      policy->cur = policy->min = policy->max = omap_getspeed(0);
++
++      mpu_dev = omap2_get_mpuss_device();
++      if (!mpu_dev) {
++              pr_warning("%s: unable to get the mpu device\n", __func__);
++              return -EINVAL;
++      }
++      opp_init_cpufreq_table(mpu_dev, &freq_table);
++
++      if (freq_table) {
++              result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
++              if (!result)
++                      cpufreq_frequency_table_get_attr(freq_table,
++                                                      policy->cpu);
++      } else {
++              policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
++              policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
++                                                      VERY_HI_RATE) / 1000;
++      }
++
++      policy->min = policy->cpuinfo.min_freq;
++      policy->max = policy->cpuinfo.max_freq;
++      policy->cur = omap_getspeed(0);
++
++      /* FIXME: what's the actual transition time? */
++      policy->cpuinfo.transition_latency = 300 * 1000;
++
++      return 0;
++}
++
++static int omap_cpu_exit(struct cpufreq_policy *policy)
++{
++      clk_exit_cpufreq_table(&freq_table);
++      clk_put(mpu_clk);
++      return 0;
++}
++
++static struct freq_attr *omap_cpufreq_attr[] = {
++      &cpufreq_freq_attr_scaling_available_freqs,
++      NULL,
++};
++
++static struct cpufreq_driver omap_driver = {
++      .flags          = CPUFREQ_STICKY,
++      .verify         = omap_verify_speed,
++      .target         = omap_target,
++      .get            = omap_getspeed,
++      .init           = omap_cpu_init,
++      .exit           = omap_cpu_exit,
++      .name           = "omap2plus",
++      .attr           = omap_cpufreq_attr,
++};
++
++static int __init omap_cpufreq_init(void)
++{
++      return cpufreq_register_driver(&omap_driver);
++}
++
++static void __exit omap_cpufreq_exit(void)
++{
++      cpufreq_unregister_driver(&omap_driver);
++}
++
++MODULE_DESCRIPTION("cpufreq driver for OMAP2PLUS SOCs");
++MODULE_LICENSE("GPL");
++module_init(omap_cpufreq_init);
++module_exit(omap_cpufreq_exit);
+diff --git a/arch/arm/plat-omap/Makefile b/arch/arm/plat-omap/Makefile
+index a4a1285..ec7862e 100644
+--- a/arch/arm/plat-omap/Makefile
++++ b/arch/arm/plat-omap/Makefile
+@@ -21,7 +21,6 @@ obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
+ obj-$(CONFIG_OMAP_IOMMU) += iommu.o iovmm.o
+ obj-$(CONFIG_OMAP_IOMMU_DEBUG) += iommu-debug.o
+-obj-$(CONFIG_CPU_FREQ) += cpu-omap.o
+ obj-$(CONFIG_OMAP_DM_TIMER) += dmtimer.o
+ obj-$(CONFIG_OMAP_DEBUG_DEVICES) += debug-devices.o
+ obj-$(CONFIG_OMAP_DEBUG_LEDS) += debug-leds.o
+diff --git a/arch/arm/plat-omap/cpu-omap.c b/arch/arm/plat-omap/cpu-omap.c
+deleted file mode 100644
+index 9cd2709..0000000
+--- a/arch/arm/plat-omap/cpu-omap.c
++++ /dev/null
+@@ -1,204 +0,0 @@
+-/*
+- *  linux/arch/arm/plat-omap/cpu-omap.c
+- *
+- *  CPU frequency scaling for OMAP
+- *
+- *  Copyright (C) 2005 Nokia Corporation
+- *  Written by Tony Lindgren <tony@atomide.com>
+- *
+- *  Based on cpu-sa1110.c, Copyright (C) 2001 Russell King
+- *
+- * Copyright (C) 2007-2008 Texas Instruments, Inc.
+- * Updated to support OMAP3
+- * Rajendra Nayak <rnayak@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.
+- */
+-#include <linux/types.h>
+-#include <linux/kernel.h>
+-#include <linux/sched.h>
+-#include <linux/cpufreq.h>
+-#include <linux/delay.h>
+-#include <linux/init.h>
+-#include <linux/err.h>
+-#include <linux/clk.h>
+-#include <linux/io.h>
+-#include <linux/opp.h>
+-
+-#include <mach/hardware.h>
+-#include <plat/clock.h>
+-#include <asm/system.h>
+-
+-#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
+-#include <plat/omap-pm.h>
+-#include <plat/common.h>
+-#endif
+-
+-#define VERY_HI_RATE  900000000
+-
+-static struct cpufreq_frequency_table *freq_table;
+-
+-#ifdef CONFIG_ARCH_OMAP1
+-#define MPU_CLK               "mpu"
+-#elif defined(CONFIG_ARCH_OMAP3)
+-#define MPU_CLK               "arm_fck"
+-#else
+-#define MPU_CLK               "virt_prcm_set"
+-#endif
+-
+-static struct clk *mpu_clk;
+-
+-/* TODO: Add support for SDRAM timing changes */
+-
+-static int omap_verify_speed(struct cpufreq_policy *policy)
+-{
+-      if (freq_table)
+-              return cpufreq_frequency_table_verify(policy, freq_table);
+-
+-      if (policy->cpu)
+-              return -EINVAL;
+-
+-      cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
+-                                   policy->cpuinfo.max_freq);
+-
+-      policy->min = clk_round_rate(mpu_clk, policy->min * 1000) / 1000;
+-      policy->max = clk_round_rate(mpu_clk, policy->max * 1000) / 1000;
+-      cpufreq_verify_within_limits(policy, policy->cpuinfo.min_freq,
+-                                   policy->cpuinfo.max_freq);
+-      return 0;
+-}
+-
+-static unsigned int omap_getspeed(unsigned int cpu)
+-{
+-      unsigned long rate;
+-
+-      if (cpu)
+-              return 0;
+-
+-      rate = clk_get_rate(mpu_clk) / 1000;
+-      return rate;
+-}
+-
+-static int omap_target(struct cpufreq_policy *policy,
+-                     unsigned int target_freq,
+-                     unsigned int relation)
+-{
+-#ifdef CONFIG_ARCH_OMAP1
+-      struct cpufreq_freqs freqs;
+-#endif
+-#if defined(CONFIG_ARCH_OMAP3) && !defined(CONFIG_OMAP_PM_NONE)
+-      unsigned long freq;
+-      struct device *mpu_dev = omap2_get_mpuss_device();
+-#endif
+-      int ret = 0;
+-
+-      /* Ensure desired rate is within allowed range.  Some govenors
+-       * (ondemand) will just pass target_freq=0 to get the minimum. */
+-      if (target_freq < policy->min)
+-              target_freq = policy->min;
+-      if (target_freq > policy->max)
+-              target_freq = policy->max;
+-
+-#ifdef CONFIG_ARCH_OMAP1
+-      freqs.old = omap_getspeed(0);
+-      freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
+-      freqs.cpu = 0;
+-
+-      if (freqs.old == freqs.new)
+-              return ret;
+-      cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
+-#ifdef CONFIG_CPU_FREQ_DEBUG
+-      printk(KERN_DEBUG "cpufreq-omap: transition: %u --> %u\n",
+-             freqs.old, freqs.new);
+-#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)
+-      freq = target_freq * 1000;
+-      if (opp_find_freq_ceil(mpu_dev, &freq))
+-              omap_pm_cpu_set_freq(freq);
+-#endif
+-      return ret;
+-}
+-
+-static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+-{
+-      int result = 0;
+-
+-      mpu_clk = clk_get(NULL, MPU_CLK);
+-      if (IS_ERR(mpu_clk))
+-              return PTR_ERR(mpu_clk);
+-
+-      if (policy->cpu != 0)
+-              return -EINVAL;
+-
+-      policy->cur = policy->min = policy->max = omap_getspeed(0);
+-
+-      if (!cpu_is_omap34xx()) {
+-              clk_init_cpufreq_table(&freq_table);
+-      } else {
+-              struct device *mpu_dev = omap2_get_mpuss_device();
+-
+-              opp_init_cpufreq_table(mpu_dev, &freq_table);
+-      }
+-
+-      if (freq_table) {
+-              result = cpufreq_frequency_table_cpuinfo(policy, freq_table);
+-              if (!result)
+-                      cpufreq_frequency_table_get_attr(freq_table,
+-                                                      policy->cpu);
+-      } else {
+-              policy->cpuinfo.min_freq = clk_round_rate(mpu_clk, 0) / 1000;
+-              policy->cpuinfo.max_freq = clk_round_rate(mpu_clk,
+-                                                      VERY_HI_RATE) / 1000;
+-      }
+-
+-      policy->min = policy->cpuinfo.min_freq;
+-      policy->max = policy->cpuinfo.max_freq;
+-      policy->cur = omap_getspeed(0);
+-
+-      /* FIXME: what's the actual transition time? */
+-      policy->cpuinfo.transition_latency = 300 * 1000;
+-
+-      return 0;
+-}
+-
+-static int omap_cpu_exit(struct cpufreq_policy *policy)
+-{
+-      clk_exit_cpufreq_table(&freq_table);
+-      clk_put(mpu_clk);
+-      return 0;
+-}
+-
+-static struct freq_attr *omap_cpufreq_attr[] = {
+-      &cpufreq_freq_attr_scaling_available_freqs,
+-      NULL,
+-};
+-
+-static struct cpufreq_driver omap_driver = {
+-      .flags          = CPUFREQ_STICKY,
+-      .verify         = omap_verify_speed,
+-      .target         = omap_target,
+-      .get            = omap_getspeed,
+-      .init           = omap_cpu_init,
+-      .exit           = omap_cpu_exit,
+-      .name           = "omap",
+-      .attr           = omap_cpufreq_attr,
+-};
+-
+-static int __init omap_cpufreq_init(void)
+-{
+-      return cpufreq_register_driver(&omap_driver);
+-}
+-
+-late_initcall(omap_cpufreq_init);
+-
+-/*
+- * if ever we want to remove this, upon cleanup call:
+- *
+- * cpufreq_unregister_driver()
+- * cpufreq_frequency_table_put_attr()
+- */
+-
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0050-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0050-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch
new file mode 100644 (file)
index 0000000..c9e4289
--- /dev/null
@@ -0,0 +1,170 @@
+From d1774fef215a30d5a5db713170f74cc8da82933f Mon Sep 17 00:00:00 2001
+From: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Date: Mon, 14 Mar 2011 17:08:49 +0530
+Subject: [PATCH 50/59] OMAP2PLUS: cpufreq: Add SMP support to cater OMAP4430
+
+On OMAP SMP configuartion, both processors share the voltage
+and clock. So both CPUs needs to be scaled together and hence
+needs software co-ordination.
+
+Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com>
+Cc: Kevin Hilman <khilman@ti.com>
+cc: Vishwanath BS <vishwanath.bs@ti.com>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |   73 ++++++++++++++++++++++++++-----
+ 1 files changed, 62 insertions(+), 11 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index 14f84cc..8d472f6 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -26,9 +26,11 @@
+ #include <linux/clk.h>
+ #include <linux/io.h>
+ #include <linux/opp.h>
++#include <linux/cpu.h>
+ #include <asm/system.h>
+ #include <asm/smp_plat.h>
++#include <asm/cpu.h>
+ #include <plat/clock.h>
+ #include <plat/omap-pm.h>
+@@ -63,7 +65,7 @@ static unsigned int omap_getspeed(unsigned int cpu)
+ {
+       unsigned long rate;
+-      if (cpu)
++      if (cpu >= NR_CPUS)
+               return 0;
+       rate = clk_get_rate(mpu_clk) / 1000;
+@@ -74,9 +76,13 @@ static int omap_target(struct cpufreq_policy *policy,
+                      unsigned int target_freq,
+                      unsigned int relation)
+ {
+-      int ret = 0;
++      int i, ret = 0;
+       struct cpufreq_freqs freqs;
++      /* Changes not allowed until all CPUs are online */
++      if (is_smp() && (num_online_cpus() < NR_CPUS))
++              return ret;
++
+       /* Ensure desired rate is within allowed range.  Some govenors
+        * (ondemand) will just pass target_freq=0 to get the minimum. */
+       if (target_freq < policy->min)
+@@ -84,15 +90,25 @@ static int omap_target(struct cpufreq_policy *policy,
+       if (target_freq > policy->max)
+               target_freq = policy->max;
+-      freqs.old = omap_getspeed(0);
++      freqs.old = omap_getspeed(policy->cpu);
+       freqs.new = clk_round_rate(mpu_clk, target_freq * 1000) / 1000;
+-      freqs.cpu = 0;
++      freqs.cpu = policy->cpu;
+       if (freqs.old == freqs.new)
+               return ret;
+-      cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++      if (!is_smp()) {
++              cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++              goto set_freq;
++      }
++
++      /* notifiers */
++      for_each_cpu(i, policy->cpus) {
++              freqs.cpu = i;
++              cpufreq_notify_transition(&freqs, CPUFREQ_PRECHANGE);
++      }
++set_freq:
+ #ifdef CONFIG_CPU_FREQ_DEBUG
+       pr_info("cpufreq-omap: transition: %u --> %u\n", freqs.old, freqs.new);
+ #endif
+@@ -105,12 +121,33 @@ static int omap_target(struct cpufreq_policy *policy,
+        * CONFIG_SMP enabled. Below code is added only to manage that
+        * scenario
+        */
+-      if (!is_smp())
++      freqs.new = omap_getspeed(policy->cpu);
++      if (!is_smp()) {
+               loops_per_jiffy =
+                        cpufreq_scale(loops_per_jiffy, freqs.old, freqs.new);
++              cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++              goto skip_lpj;
++      }
+-      cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++#ifdef CONFIG_SMP
++      /*
++       * Note that loops_per_jiffy is not updated on SMP systems in
++       * cpufreq driver. So, update the per-CPU loops_per_jiffy value
++       * on frequency transition. We need to update all dependent CPUs.
++       */
++      for_each_cpu(i, policy->cpus)
++              per_cpu(cpu_data, i).loops_per_jiffy =
++                      cpufreq_scale(per_cpu(cpu_data, i).loops_per_jiffy,
++                                      freqs.old, freqs.new);
++#endif
++      /* notifiers */
++      for_each_cpu(i, policy->cpus) {
++              freqs.cpu = i;
++              cpufreq_notify_transition(&freqs, CPUFREQ_POSTCHANGE);
++      }
++
++skip_lpj:
+       return ret;
+ }
+@@ -118,6 +155,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+ {
+       int result = 0;
+       struct device *mpu_dev;
++      static cpumask_var_t cpumask;
+       if (cpu_is_omap24xx())
+               mpu_clk = clk_get(NULL, "virt_prcm_set");
+@@ -129,12 +167,12 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+       if (IS_ERR(mpu_clk))
+               return PTR_ERR(mpu_clk);
+-      if (policy->cpu != 0)
++      if (policy->cpu >= NR_CPUS)
+               return -EINVAL;
+-      policy->cur = policy->min = policy->max = omap_getspeed(0);
+-
++      policy->cur = policy->min = policy->max = omap_getspeed(policy->cpu);
+       mpu_dev = omap2_get_mpuss_device();
++
+       if (!mpu_dev) {
+               pr_warning("%s: unable to get the mpu device\n", __func__);
+               return -EINVAL;
+@@ -154,7 +192,20 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+       policy->min = policy->cpuinfo.min_freq;
+       policy->max = policy->cpuinfo.max_freq;
+-      policy->cur = omap_getspeed(0);
++      policy->cur = omap_getspeed(policy->cpu);
++
++      /*
++       * On OMAP SMP configuartion, both processors share the voltage
++       * and clock. So both CPUs needs to be scaled together and hence
++       * needs software co-ordination. Use cpufreq affected_cpus
++       * interface to handle this scenario. Additional is_smp() check
++       * is to keep SMP_ON_UP build working.
++       */
++      if (is_smp()) {
++              policy->shared_type = CPUFREQ_SHARED_TYPE_ANY;
++              cpumask_or(cpumask, cpumask_of(policy->cpu), cpumask);
++              cpumask_copy(policy->cpus, cpumask);
++      }
+       /* FIXME: what's the actual transition time? */
+       policy->cpuinfo.transition_latency = 300 * 1000;
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0051-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0051-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch
new file mode 100644 (file)
index 0000000..3685af9
--- /dev/null
@@ -0,0 +1,29 @@
+From b25a843135dc8ba5053befd1d39ac2286a3d9fa4 Mon Sep 17 00:00:00 2001
+From: Jarkko Nikula <jhnikula@gmail.com>
+Date: Thu, 14 Apr 2011 16:21:58 +0300
+Subject: [PATCH 51/59] OMAP2PLUS: cpufreq: Fix typo when attempting to set mpu_clk for OMAP4
+
+Fix this typo as there is no dpll_mpu_ck for OMAP3 and code flow is clearly
+trying to set mpu_clk for OMAP4 for which this dpll_mpu_ck is available.
+
+Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
+---
+ arch/arm/mach-omap2/omap2plus-cpufreq.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/omap2plus-cpufreq.c b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+index 8d472f6..d53ce23 100644
+--- a/arch/arm/mach-omap2/omap2plus-cpufreq.c
++++ b/arch/arm/mach-omap2/omap2plus-cpufreq.c
+@@ -161,7 +161,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
+               mpu_clk = clk_get(NULL, "virt_prcm_set");
+       else if (cpu_is_omap34xx())
+               mpu_clk = clk_get(NULL, "dpll1_ck");
+-      else if (cpu_is_omap34xx())
++      else if (cpu_is_omap44xx())
+               mpu_clk = clk_get(NULL, "dpll_mpu_ck");
+       if (IS_ERR(mpu_clk))
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0032-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0032-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch
new file mode 100644 (file)
index 0000000..b654194
--- /dev/null
@@ -0,0 +1,30 @@
+From bbd4463bb8bfcbe9968a37caa368803b153718f3 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Sat, 12 Feb 2011 17:27:14 +0530
+Subject: [PATCH 32/59] OMAP3+: voltage: remove spurious pr_notice for debugfs
+
+cat of debugfs entry for vp_volt provides voltage. The additional pr_notice
+is just spam on console and provides no additional information.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/voltage.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/voltage.c b/arch/arm/mach-omap2/voltage.c
+index 0c1552d..9ef3789 100644
+--- a/arch/arm/mach-omap2/voltage.c
++++ b/arch/arm/mach-omap2/voltage.c
+@@ -148,7 +148,6 @@ static int vp_volt_debug_get(void *data, u64 *val)
+       }
+       vsel = vdd->read_reg(prm_mod_offs, vdd->vp_data->voltage);
+-      pr_notice("curr_vsel = %x\n", vsel);
+       if (!vdd->pmic_info->vsel_to_uv) {
+               pr_warning("PMIC function to convert vsel to voltage"
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0033-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0033-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch
new file mode 100644 (file)
index 0000000..e93fa40
--- /dev/null
@@ -0,0 +1,41 @@
+From 111ad0be33804ba5a6173a0dda14ebe524271b4f Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Sun, 13 Mar 2011 09:07:23 +0530
+Subject: [PATCH 33/59] OMAP4: PM: remove redundant #ifdef CONFIG_PM
+
+pm44xx.c is built only when CONFIG_PM is setup,
+remove redundant CONFIG_PM check.
+
+This also fixes:
+https://bugzilla.kernel.org/show_bug.cgi?id=25022
+
+Reported-by: Martin Etti <ettl.martin@gmx.de>
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/pm44xx.c |    2 --
+ 1 files changed, 0 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/pm44xx.c b/arch/arm/mach-omap2/pm44xx.c
+index 76cfff2..59a870b 100644
+--- a/arch/arm/mach-omap2/pm44xx.c
++++ b/arch/arm/mach-omap2/pm44xx.c
+@@ -105,13 +105,11 @@ static int __init omap4_pm_init(void)
+       pr_err("Power Management for TI OMAP4.\n");
+-#ifdef CONFIG_PM
+       ret = pwrdm_for_each(pwrdms_setup, NULL);
+       if (ret) {
+               pr_err("Failed to setup powerdomains\n");
+               goto err2;
+       }
+-#endif
+ #ifdef CONFIG_SUSPEND
+       suspend_set_ops(&omap_pm_ops);
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0034-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0034-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch
new file mode 100644 (file)
index 0000000..a487d25
--- /dev/null
@@ -0,0 +1,30 @@
+From ef07d331b0b76889b19fa3de7b0300dc0bbc5366 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Thu, 24 Mar 2011 18:35:31 +0200
+Subject: [PATCH 34/59] OMAP3+: smartreflex: fix sr_late_init() error path in probe
+
+sr_late_init() will take care of freeing the resources.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index 13e24f9..dbc4b6f 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -883,7 +883,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+               ret = sr_late_init(sr_info);
+               if (ret) {
+                       pr_warning("%s: Error in SR late init\n", __func__);
+-                      goto err_release_region;
++                      return ret;
+               }
+       }
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0035-OMAP3-smartreflex-request-the-memory-region.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0035-OMAP3-smartreflex-request-the-memory-region.patch
new file mode 100644 (file)
index 0000000..6ba603c
--- /dev/null
@@ -0,0 +1,36 @@
+From 2b5e2efb76a51a07721352afeeaddb249267042e Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Thu, 24 Mar 2011 18:35:32 +0200
+Subject: [PATCH 35/59] OMAP3+: smartreflex: request the memory region
+
+We are releasing the memory region, but never actually request it.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |    8 ++++++++
+ 1 files changed, 8 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index dbc4b6f..703143a 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -847,6 +847,14 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+               goto err_free_devinfo;
+       }
++      mem = request_mem_region(mem->start, resource_size(mem),
++                                      dev_name(&pdev->dev));
++      if (!mem) {
++              dev_err(&pdev->dev, "%s: no mem region\n", __func__);
++              ret = -EBUSY;
++              goto err_free_devinfo;
++      }
++
+       irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
+       pm_runtime_enable(&pdev->dev);
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0036-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0036-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch
new file mode 100644 (file)
index 0000000..28ee84f
--- /dev/null
@@ -0,0 +1,66 @@
+From 1108cddc9f227ba5ded64c1c8141ce9147a4902d Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Thu, 24 Mar 2011 18:35:33 +0200
+Subject: [PATCH 36/59] OMAP3+: smartreflex: fix ioremap leak on probe error
+
+Add missing iounmap() to error paths.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |   10 ++++++----
+ 1 files changed, 6 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index 703143a..156807e 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -904,7 +904,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+       vdd_dbg_dir = omap_voltage_get_dbgdir(sr_info->voltdm);
+       if (!vdd_dbg_dir) {
+               ret = -EINVAL;
+-              goto err_release_region;
++              goto err_iounmap;
+       }
+       sr_info->dbg_dir = debugfs_create_dir("smartreflex", vdd_dbg_dir);
+@@ -912,7 +912,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+               dev_err(&pdev->dev, "%s: Unable to create debugfs directory\n",
+                       __func__);
+               ret = PTR_ERR(sr_info->dbg_dir);
+-              goto err_release_region;
++              goto err_iounmap;
+       }
+       (void) debugfs_create_file("autocomp", S_IRUGO | S_IWUSR,
+@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+               dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
+                       "for n-values\n", __func__);
+               ret = PTR_ERR(nvalue_dir);
+-              goto err_release_region;
++              goto err_iounmap;
+       }
+       omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
+@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+                       "entries for n-values\n",
+                       __func__, sr_info->voltdm->name);
+               ret = -ENODATA;
+-              goto err_release_region;
++              goto err_iounmap;
+       }
+       for (i = 0; i < sr_info->nvalue_count; i++) {
+@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+       return ret;
++err_iounmap:
++      iounmap(sr_info->base);
+ err_release_region:
+       release_mem_region(mem->start, resource_size(mem));
+ err_free_devinfo:
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0037-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0037-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch
new file mode 100644 (file)
index 0000000..b90d545
--- /dev/null
@@ -0,0 +1,29 @@
+From 75fb23b53cbbd38aac84143ead8a33432dcfecdc Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Thu, 24 Mar 2011 18:35:34 +0200
+Subject: [PATCH 37/59] OMAP3+: smartreflex: delete instance from sr_list on probe error
+
+If the probe fails, the node should be deleted from sr_list.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index 156807e..f0a488a 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -954,6 +954,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+       return ret;
+ err_iounmap:
++      list_del(&sr_info->node);
+       iounmap(sr_info->base);
+ err_release_region:
+       release_mem_region(mem->start, resource_size(mem));
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0038-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0038-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch
new file mode 100644 (file)
index 0000000..1090a56
--- /dev/null
@@ -0,0 +1,48 @@
+From c919cf5aaa6a54e8ad944c550e2292830d17c526 Mon Sep 17 00:00:00 2001
+From: Aaro Koskinen <aaro.koskinen@nokia.com>
+Date: Thu, 24 Mar 2011 18:35:35 +0200
+Subject: [PATCH 38/59] OMAP3+: smartreflex: delete debugfs entries on probe error
+
+Delete created debugfs entries if probe fails.
+
+Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index f0a488a..fb7dc52 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -929,7 +929,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+               dev_err(&pdev->dev, "%s: Unable to create debugfs directory"
+                       "for n-values\n", __func__);
+               ret = PTR_ERR(nvalue_dir);
+-              goto err_iounmap;
++              goto err_debugfs;
+       }
+       omap_voltage_get_volttable(sr_info->voltdm, &volt_data);
+@@ -939,7 +939,7 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+                       "entries for n-values\n",
+                       __func__, sr_info->voltdm->name);
+               ret = -ENODATA;
+-              goto err_iounmap;
++              goto err_debugfs;
+       }
+       for (i = 0; i < sr_info->nvalue_count; i++) {
+@@ -953,6 +953,8 @@ static int __init omap_sr_probe(struct platform_device *pdev)
+       return ret;
++err_debugfs:
++      debugfs_remove_recursive(sr_info->dbg_dir);
+ err_iounmap:
+       list_del(&sr_info->node);
+       iounmap(sr_info->base);
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0039-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0039-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch
new file mode 100644 (file)
index 0000000..ef04883
--- /dev/null
@@ -0,0 +1,57 @@
+From be5b001b92e2c49f2f16d082e8ac33d371990ad4 Mon Sep 17 00:00:00 2001
+From: Jean Pihet <j-pihet@ti.com>
+Date: Fri, 29 Apr 2011 11:26:22 +0200
+Subject: [PATCH 39/59] OMAP3 cpuidle: remove useless SDP specific timings
+
+The cpuidle states settings can be overriden by some board-
+specific settings, by calling omap3_pm_init_cpuidle.
+Remove the 3430SDP specific states settings registration
+since the figures are identical to the default ones (in cpuidle34xx.c).
+
+Signed-off-by: Jean Pihet <j-pihet@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/board-3430sdp.c |   19 -------------------
+ 1 files changed, 0 insertions(+), 19 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
+index 9afd087..7ffad7b 100644
+--- a/arch/arm/mach-omap2/board-3430sdp.c
++++ b/arch/arm/mach-omap2/board-3430sdp.c
+@@ -59,24 +59,6 @@
+ #define TWL4030_MSECURE_GPIO 22
+-/* FIXME: These values need to be updated based on more profiling on 3430sdp*/
+-static struct cpuidle_params omap3_cpuidle_params_table[] = {
+-      /* C1 */
+-      {1, 2, 2, 5},
+-      /* C2 */
+-      {1, 10, 10, 30},
+-      /* C3 */
+-      {1, 50, 50, 300},
+-      /* C4 */
+-      {1, 1500, 1800, 4000},
+-      /* C5 */
+-      {1, 2500, 7500, 12000},
+-      /* C6 */
+-      {1, 3000, 8500, 15000},
+-      /* C7 */
+-      {1, 10000, 30000, 300000},
+-};
+-
+ static uint32_t board_keymap[] = {
+       KEY(0, 0, KEY_LEFT),
+       KEY(0, 1, KEY_RIGHT),
+@@ -883,7 +865,6 @@ static void __init omap_3430sdp_init(void)
+       omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
+       omap_board_config = sdp3430_config;
+       omap_board_config_size = ARRAY_SIZE(sdp3430_config);
+-      omap3_pm_init_cpuidle(omap3_cpuidle_params_table);
+       omap3430_i2c_init();
+       omap_display_init(&sdp3430_dss_data);
+       if (omap_rev() > OMAP3430_REV_ES1_0)
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0040-OMAP3-SR-make-notify-independent-of-class.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0040-OMAP3-SR-make-notify-independent-of-class.patch
new file mode 100644 (file)
index 0000000..652c5fd
--- /dev/null
@@ -0,0 +1,48 @@
+From 4e63fe929ae78610afd830f7fded2e9f7b65ec21 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Mon, 14 Feb 2011 12:16:36 +0530
+Subject: [PATCH 40/59] OMAP3+: SR: make notify independent of class
+
+Interrupt notification mechanism of SmartReflex can be used by the
+choice of implementation of the class driver. For example, Class 2 and
+Class 1.5 of SmartReflex can both use the interrupt notification to
+identify the transition of voltage or other events.
+
+Hence, the actual class does not matter for notifier. Let the class
+driver's handling decide how it should be used. SmartReflex driver
+should provide just the primitives.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |    6 ++----
+ 1 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index fb7dc52..3ee7261 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -143,7 +143,7 @@ static irqreturn_t sr_interrupt(int irq, void *data)
+               sr_write_reg(sr_info, IRQSTATUS, status);
+       }
+-      if (sr_class->class_type == SR_CLASS2 && sr_class->notify)
++      if (sr_class->notify)
+               sr_class->notify(sr_info->voltdm, status);
+       return IRQ_HANDLED;
+@@ -258,9 +258,7 @@ static int sr_late_init(struct omap_sr *sr_info)
+       struct resource *mem;
+       int ret = 0;
+-      if (sr_class->class_type == SR_CLASS2 &&
+-              sr_class->notify_flags && sr_info->irq) {
+-
++      if (sr_class->notify && sr_class->notify_flags && sr_info->irq) {
+               name = kasprintf(GFP_KERNEL, "sr_%s", sr_info->voltdm->name);
+               if (name == NULL) {
+                       ret = -ENOMEM;
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0041-OMAP3-SR-disable-interrupt-by-default.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0041-OMAP3-SR-disable-interrupt-by-default.patch
new file mode 100644 (file)
index 0000000..109804a
--- /dev/null
@@ -0,0 +1,37 @@
+From bec14dd673e09459c45ef5b0408e68b92eebc404 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Mon, 14 Feb 2011 12:41:10 +0530
+Subject: [PATCH 41/59] OMAP3+: SR: disable interrupt by default
+
+We will enable and disable interrupt on a need basis in the class
+driver. We need to keep the IRQ disabled by default else the
+forceupdate or vcbypass events could trigger events that we don't
+need/expect to handle.
+
+This is a preparation for SmartReflex AVS class drivers such as
+class 2 and class 1.5 which would need to use interrupts. Existing
+SmartReflex AVS class 3 driver does not require to use interrupts
+and is not impacted by this change.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |    1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index 3ee7261..616ef62 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -268,6 +268,7 @@ static int sr_late_init(struct omap_sr *sr_info)
+                               0, name, (void *)sr_info);
+               if (ret)
+                       goto error;
++              disable_irq(sr_info->irq);
+       }
+       if (pdata && pdata->enable_on_init)
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0042-OMAP3-SR-enable-disable-SR-only-on-need.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0042-OMAP3-SR-enable-disable-SR-only-on-need.patch
new file mode 100644 (file)
index 0000000..5549c5d
--- /dev/null
@@ -0,0 +1,41 @@
+From 5f47ccf7f261602e30685bcf41c02ee8dc006fc9 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Mon, 14 Feb 2011 21:14:17 +0530
+Subject: [PATCH 42/59] OMAP3+: SR: enable/disable SR only on need
+
+Since we already know the state of the autocomp enablement, we can
+see if the requested state is different from the current state and
+enable/disable SR only on the need basis.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |   11 +++++++----
+ 1 files changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index 616ef62..3bd9fac 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -807,10 +807,13 @@ static int omap_sr_autocomp_store(void *data, u64 val)
+               return -EINVAL;
+       }
+-      if (!val)
+-              sr_stop_vddautocomp(sr_info);
+-      else
+-              sr_start_vddautocomp(sr_info);
++      /* control enable/disable only if there is a delta in value */
++      if (sr_info->autocomp_active != val) {
++              if (!val)
++                      sr_stop_vddautocomp(sr_info);
++              else
++                      sr_start_vddautocomp(sr_info);
++      }
+       return 0;
+ }
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0043-OMAP3-SR-fix-cosmetic-indentation.patch b/recipes-kernel/linux/linux-omap-2.6.39/pm/linux-omap-2.6.39-ti-pm/0043-OMAP3-SR-fix-cosmetic-indentation.patch
new file mode 100644 (file)
index 0000000..04c6129
--- /dev/null
@@ -0,0 +1,49 @@
+From ccdecc80f8c47e5fc20d10d17dd44d89302e0f83 Mon Sep 17 00:00:00 2001
+From: Nishanth Menon <nm@ti.com>
+Date: Mon, 14 Feb 2011 12:33:13 +0530
+Subject: [PATCH 43/59] OMAP3+: SR: fix cosmetic indentation
+
+Error label case seems to have a 2 tab indentation when just 1 is
+necessary.
+
+Signed-off-by: Nishanth Menon <nm@ti.com>
+Signed-off-by: Kevin Hilman <khilman@ti.com>
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/smartreflex.c |   20 ++++++++++----------
+ 1 files changed, 10 insertions(+), 10 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
+index 3bd9fac..2ce2fb7 100644
+--- a/arch/arm/mach-omap2/smartreflex.c
++++ b/arch/arm/mach-omap2/smartreflex.c
+@@ -277,16 +277,16 @@ static int sr_late_init(struct omap_sr *sr_info)
+       return ret;
+ error:
+-              iounmap(sr_info->base);
+-              mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
+-              release_mem_region(mem->start, resource_size(mem));
+-              list_del(&sr_info->node);
+-              dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
+-                      "interrupt handler. Smartreflex will"
+-                      "not function as desired\n", __func__);
+-              kfree(name);
+-              kfree(sr_info);
+-              return ret;
++      iounmap(sr_info->base);
++      mem = platform_get_resource(sr_info->pdev, IORESOURCE_MEM, 0);
++      release_mem_region(mem->start, resource_size(mem));
++      list_del(&sr_info->node);
++      dev_err(&sr_info->pdev->dev, "%s: ERROR in registering"
++              "interrupt handler. Smartreflex will"
++              "not function as desired\n", __func__);
++      kfree(name);
++      kfree(sr_info);
++      return ret;
+ }
+ static void sr_v1_disable(struct omap_sr *sr)
+-- 
+1.6.6.1
+
index 248d3312f9bfa96c2d10cbd9c4dca0d9faeac38f..86331d949390898a5ba254a11e7403e82171bead 100644 (file)
@@ -1,7 +1,7 @@
 From 49958f1925489048aa5a6834f61d61c8551f8ec3 Mon Sep 17 00:00:00 2001
 From: Tomi Valkeinen <tomi.valkeinen@ti.com>
 Date: Thu, 7 Apr 2011 15:28:47 +0300
-Subject: [PATCH 01/28] OMAP: DSS2: DSI: fix use_sys_clk & highfreq
+Subject: [PATCH 01/59] OMAP: DSS2: DSI: fix use_sys_clk & highfreq
 
 use_sys_clk and highfreq fields in dsi.current_cinfo were never set.
 Luckily they weren't used anywhere so it didn't cause any problems.
index 01fdd7276a8a4d2c4f97cfeb9e96795319d05baf..8dd413f19d76988d18e919f65cf6ea919584d51c 100644 (file)
@@ -1,7 +1,7 @@
 From ccf7f535d7e809e563812f1c4897bdb9a1ff9233 Mon Sep 17 00:00:00 2001
 From: Tomi Valkeinen <tomi.valkeinen@ti.com>
 Date: Mon, 4 Apr 2011 10:02:53 +0300
-Subject: [PATCH 02/28] OMAP: DSS2: DSI: fix dsi_dump_clocks()
+Subject: [PATCH 02/59] OMAP: DSS2: DSI: fix dsi_dump_clocks()
 
 On OMAP4, reading DSI_PLL_CONFIGURATION2 register requires the L3 clock
 (CIO_CLK_ICG) to PLL. Currently dsi_dump_clocks() tries to read that
index fb49a3efe6b35788a211405d359825b81c4e0cc2..a8d123d5981dc2e97d67fb76faf2d24b155599ec 100644 (file)
@@ -1,7 +1,7 @@
 From 2ffa7a6c3cafb4f2a48ae274b2952ad48ae78eeb Mon Sep 17 00:00:00 2001
 From: Archit Taneja <archit@ti.com>
 Date: Thu, 31 Mar 2011 13:23:35 +0530
-Subject: [PATCH 03/28] OMAP2PLUS: DSS2: Fix: Return correct lcd clock source for OMAP2/3
+Subject: [PATCH 03/59] OMAP2PLUS: DSS2: Fix: Return correct lcd clock source for OMAP2/3
 
 dss.lcd_clk_source is set to the default value DSS_CLK_SRC_FCK at dss_init.
 For OMAP2 and OMAP3, the dss.lcd_clk_source should always be the same as
index 81f82e7caade7ac1b4765365fc55e9bac3e4f184..be2ac858ab6ae07ae8d1ea1e8221516e307d7183 100644 (file)
@@ -1,7 +1,7 @@
 From ee251e5c35b1325d696df35d297f34a9ccd6f5af Mon Sep 17 00:00:00 2001
 From: Tomi Valkeinen <tomi.valkeinen@ti.com>
 Date: Fri, 15 Apr 2011 10:42:59 +0300
-Subject: [PATCH 04/28] OMAP: DSS: DSI: Fix DSI PLL power bug
+Subject: [PATCH 04/59] OMAP: DSS: DSI: Fix DSI PLL power bug
 
 OMAP3630 has a HW bug causing DSI PLL power command POWER_ON_DIV (0x3)
 to not work properly. The bug prevents us from enabling DSI PLL power
index b1845e928fd5748ec1dee83adc853cf32afeafc2..fb2b6664ad6f8708d5cc116def0f21030e368ec5 100644 (file)
@@ -1,7 +1,7 @@
 From c479d815f14b4b5ed7871660027d043a432968a8 Mon Sep 17 00:00:00 2001
 From: Tomi Valkeinen <tomi.valkeinen@ti.com>
 Date: Fri, 8 Apr 2011 09:30:27 +0300
-Subject: [PATCH 05/28] OMAP: DSS2: fix panel Kconfig dependencies
+Subject: [PATCH 05/59] OMAP: DSS2: fix panel Kconfig dependencies
 
 All DPI panels were missing dependency to OMAP2_DSS_DPI. Add the
 dependency.
index 4b89760749c00b58809b5d820d9a1bdf76ece42f..0679c74f73f632c129bf2247c569bcb0ac066ddb 100644 (file)
@@ -1,7 +1,7 @@
 From 661c19e763f0bda0a07bc64159c6b0c5f2f52b60 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Tue, 19 Jan 2010 21:19:15 -0800
-Subject: [PATCH 06/28] OMAP: DSS2: add bootarg for selecting svideo or composite for tv output
+Subject: [PATCH 06/59] OMAP: DSS2: add bootarg for selecting svideo or composite for tv output
 
 also add pal-16 and ntsc-16 omapfb.mode settings for 16bpp
 ---
index f624d58a125817780774d9a02349c6f831540c27..5182a730c35afcd4bbdfa825bc7f3fa936567b5a 100644 (file)
@@ -1,7 +1,7 @@
 From 14ea4d9f0f90726b653b42697043e73ef699b4ba Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Sat, 19 Dec 2009 06:52:43 -0800
-Subject: [PATCH 07/28] video: add timings for hd720
+Subject: [PATCH 07/59] video: add timings for hd720
 
 ---
  drivers/video/modedb.c |    4 ++++
index af14160d7e5d8de623367938b49f477c291848a5..716093f70ad2e35c0fdecbde81b83b7172f8882c 100644 (file)
@@ -1,7 +1,7 @@
 From b62ecb49cfe8978390b7c8848e13555c4c699b0f Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <sakoman@gmail.com>
 Date: Tue, 15 Dec 2009 15:17:44 -0800
-Subject: [PATCH 08/28] drivers: net: smsc911x: return ENODEV if device is not found
+Subject: [PATCH 08/59] drivers: net: smsc911x: return ENODEV if device is not found
 
 Signed-off-by: Steve Sakoman <sakoman@gmail.com>
 ---
index 042ab44ad0339bcfdd96190116b93643fd414ac9..567ed5422248f0d41f38859c0d2927ef901e2075 100644 (file)
@@ -1,7 +1,7 @@
 From b1515f616ee48452a7cb2c5d0f31b1f8f4463f94 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <sakoman@gmail.com>
 Date: Tue, 15 Dec 2009 15:24:10 -0800
-Subject: [PATCH 09/28] drivers: input: touchscreen: ads7846: return ENODEV if device is not found
+Subject: [PATCH 09/59] drivers: input: touchscreen: ads7846: return ENODEV if device is not found
 
 Signed-off-by: Steve Sakoman <sakoman@gmail.com>
 ---
index f5265a342d673ffa948721a6b416eb89c4658b58..cc4b87e9d5c59c47bcaf9f98214c70f8716d2dad 100644 (file)
@@ -1,7 +1,7 @@
 From c2b7ff69cae57875b711eeb9cb6c97e7ba090c08 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Thu, 3 Mar 2011 13:29:30 -0800
-Subject: [PATCH 10/28] Revert "omap2_mcspi: Flush posted writes"
+Subject: [PATCH 10/59] Revert "omap2_mcspi: Flush posted writes"
 
 This reverts commit a330ce2001b290c59fe98c37e981683ef0a75fdf.
 ---
index 7592bab28f74dfe2d78de099b90a945677358a1f..24c6ded6a7f2c9b7f27aa6bccbc0df5a9bfece9a 100644 (file)
@@ -1,7 +1,7 @@
 From ed9bca69fdaa7edac3573e5ef3f011c7f7dc4898 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Fri, 19 Nov 2010 15:11:19 -0800
-Subject: [PATCH 11/28] Revert "omap_hsmmc: improve interrupt synchronisation"
+Subject: [PATCH 11/59] Revert "omap_hsmmc: improve interrupt synchronisation"
 
 This reverts commit b417577d3b9bbb06a4ddc9aa955af9bd503f7242.
 
index f0a3aa45f04dfbfc4451c50ea9610c12b13784c2..1ead83577984eb027e66681786eac3e07406f26a 100644 (file)
@@ -1,7 +1,7 @@
 From 1d73698debdf57f9da6c3312239459c43278e064 Mon Sep 17 00:00:00 2001
 From: David Vrabel <david.vrabel@csr.com>
 Date: Fri, 2 Apr 2010 08:41:47 -0700
-Subject: [PATCH 12/28] Don't turn SDIO cards off to save power.  Doing so will lose all
+Subject: [PATCH 12/59] Don't turn SDIO cards off to save power.  Doing so will lose all
  internal state in the card.
 
 Signed-off-by: David Vrabel <david.vrabel@csr.com>
index f272276638f996bf671cd482a5a9d81727adbbf1..339bb5d342b759e2874f8a7c090b207c58db71a3 100644 (file)
@@ -1,7 +1,7 @@
 From bb4c074079c12d808367c8666cedcbba1dc456cc Mon Sep 17 00:00:00 2001
 From: David Vrabel <david.vrabel@csr.com>
 Date: Fri, 2 Apr 2010 08:42:22 -0700
-Subject: [PATCH 13/28] Enable the use of SDIO card interrupts.
+Subject: [PATCH 13/59] Enable the use of SDIO card interrupts.
 
 FCLK must be enabled while SDIO interrupts are enabled or the MMC
 module won't wake-up (even though ENAWAKEUP in SYSCONFIG and IWE in
index 12243d60c0468ba262fc10c004fb614291449c26..a82d06134144a656ea90865e97130528e1e236a5 100644 (file)
@@ -1,7 +1,7 @@
 From cee637c9d2b877dd40c5fc8c42dc70a21adb454b Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Thu, 17 Dec 2009 12:45:20 -0800
-Subject: [PATCH 14/28] soc: codecs: Enable audio capture by default for twl4030
+Subject: [PATCH 14/59] soc: codecs: Enable audio capture by default for twl4030
 
 ---
  sound/soc/codecs/twl4030.c |    4 ++--
index b3fa02ca215972ad406a982469c2c2c32a266538..e2dfe9836ff474d347fcff76d70527a68ff8238e 100644 (file)
@@ -1,7 +1,7 @@
 From 19fbeb71b9576ecdefa7809980aa3f0eecda408c Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Wed, 29 Dec 2010 11:39:16 -0800
-Subject: [PATCH 15/28] soc: codecs: twl4030: Turn on mic bias by default
+Subject: [PATCH 15/59] soc: codecs: twl4030: Turn on mic bias by default
 
 ---
  sound/soc/codecs/twl4030.c |    2 +-
index 55673b37ab68188297dd3534060b210f6ffeeb01..3bf42607c2f9777b84f97aa78e0aa2b2af8f3106 100644 (file)
@@ -1,7 +1,7 @@
 From 1c679da3fc28bd358c79b6fae05de81c9b84a681 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Thu, 4 Feb 2010 12:26:22 -0800
-Subject: [PATCH 16/28] RTC: add support for backup battery recharge
+Subject: [PATCH 16/59] RTC: add support for backup battery recharge
 
 ---
  drivers/rtc/rtc-twl.c |   25 +++++++++++++++++++++++++
index 6aacbf7af86bbb5651c0615316a716288277a919..9a9b46618830827778e19abade76c3469ef821a7 100644 (file)
@@ -1,7 +1,7 @@
 From 83b4a493176cbd50c8d2503440fecfa6e499f30e Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Sun, 24 Jan 2010 09:33:56 -0800
-Subject: [PATCH 17/28] ARM: OMAP2: mmc-twl4030: move clock input selection prior to vcc test
+Subject: [PATCH 17/59] ARM: OMAP2: mmc-twl4030: move clock input selection prior to vcc test
 
 otherwise it is not executed on systems that use non-twl regulators
 ---
index c5359c1b010eaa2def2bbd3b8b54d8ffe7ec9e08..044aa01b0d8799f5cc0594a2e4f4a0209d686b1b 100644 (file)
@@ -1,7 +1,7 @@
 From 890a8385d7f9bee69bf22616d16b225790b1d18c Mon Sep 17 00:00:00 2001
 From: =?UTF-8?q?Bernhard=20W=C3=B6rndl-Aichriedler?= <bwa@xdevelop.at>
 Date: Sat, 15 May 2010 16:34:05 +0200
-Subject: [PATCH 18/28] Add power-off support for the TWL4030 companion
+Subject: [PATCH 18/59] Add power-off support for the TWL4030 companion
 
 This patch adds support for the power-off on shutdown feature of the TWL4030
 ---
index 045089e0acf6d5b76ce1f8a8bb3917f9ba09854b..73637aeeda2cd002846a28a015d1eb3af411dcac 100644 (file)
@@ -1,7 +1,7 @@
 From 5b1ae684aa507a50630555d48c834a6f1fd2d1cf Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Thu, 17 Dec 2009 14:27:15 -0800
-Subject: [PATCH 19/28] ARM: OMAP: Add twl4030 madc support to Overo
+Subject: [PATCH 19/59] ARM: OMAP: Add twl4030 madc support to Overo
 
 Signed-off-by: Steve Sakoman <steve@sakoman.com>
 ---
index 771c2846e2744107fe11ddb4553f50557f51f0ff..4002e2a9be838c8ab4fe4ca19c069a80438fc891 100644 (file)
@@ -1,7 +1,7 @@
 From 79dc823c9ce624a2164a01b35a89452b22a7d174 Mon Sep 17 00:00:00 2001
 From: Keerthy <j-keerthy@ti.com>
 Date: Wed, 4 May 2011 01:14:50 +0530
-Subject: [PATCH 20/28] Enabling Hwmon driver for twl4030-madc
+Subject: [PATCH 20/59] Enabling Hwmon driver for twl4030-madc
 
 Signed-off-by: Keerthy <j-keerthy@ti.com>
 ---
index 05cd10d1fa0d7e8cbeaebca2e95b87f1ab4cadc2..6b4b33aa61061b918170298c127742fd048f715a 100644 (file)
@@ -1,7 +1,7 @@
 From 243d5534666eb795815f12d382cfcb77d5a43a8d Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Sat, 23 Jan 2010 06:26:54 -0800
-Subject: [PATCH 21/28] mfd: twl-core: enable madc clock
+Subject: [PATCH 21/59] mfd: twl-core: enable madc clock
 
 Now that the madc driver has been merged it is also necessary to enable the clock to the madc block
 
index 6d2a38a78572b65062562d9aa458f27924c5eac8..11134645210dcf62ea8050d6fe8493aee397e6cc 100644 (file)
@@ -1,7 +1,7 @@
 From df17c7eeca25cd9923828a4732a995e2c37d070b Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Wed, 24 Feb 2010 10:37:22 -0800
-Subject: [PATCH 22/28] ARM: OMAP: automatically set musb mode in platform data based on CONFIG options
+Subject: [PATCH 22/59] ARM: OMAP: automatically set musb mode in platform data based on CONFIG options
 
 ---
  arch/arm/mach-omap2/board-omap3beagle.c |    6 ++++++
index 212c5f0264dfdb573a5a5a6be82eee4800419b1b..22c0243c21b14bfa9cc141a3f69f99c5fa1c6aa3 100644 (file)
@@ -1,7 +1,7 @@
 From c60f16ec7e69f59b3bef9f9b7041a973d144dc87 Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Wed, 12 Jan 2011 05:54:55 -0800
-Subject: [PATCH 23/28] omap: mmc: Adjust dto to eliminate timeout errors
+Subject: [PATCH 23/59] omap: mmc: Adjust dto to eliminate timeout errors
 
 A number of SD card types were experiencing timeout errors.  This
 could also lead to data corruption in some cases.
index 13b7631a169f94529c432d9daab8d55a6a6519b7..e9cd3ffe90f8e356888eaf18d809154255d3b59c 100644 (file)
@@ -1,7 +1,7 @@
 From 592fdd511dacc42bf97f249ca596ba28d0c25281 Mon Sep 17 00:00:00 2001
 From: Charles Manning <cdhmanning@gmail.com>
 Date: Tue, 18 Jan 2011 11:25:25 +1300
-Subject: [PATCH 24/28] omap: Fix mtd subpage read alignment
+Subject: [PATCH 24/59] omap: Fix mtd subpage read alignment
 
 This allows the omap2 prefetch engine to work properly for subpage
 reads. Without this ECC errors will stop UBIFS from working.
index dadaa1c44569428db942b74ce30663e4d58332e9..113e4da0b783152877533b57d26920ba927abe81 100644 (file)
@@ -1,7 +1,7 @@
 From 2611e93b57147877fabb181bd86c78fd425a5467 Mon Sep 17 00:00:00 2001
 From: Charles Manning <manningc2@actrix.gen.nz>
 Date: Thu, 16 Dec 2010 20:35:56 -0800
-Subject: [PATCH 25/28] mtd: nand: omap2: Force all buffer reads to u32 alignment
+Subject: [PATCH 25/59] mtd: nand: omap2: Force all buffer reads to u32 alignment
 
 ---
  drivers/mtd/nand/omap2.c |   12 ++++++++++++
index c8dacdc985aa5037f590f7c69b0ee3e645d7e7fa..2d786dba43a5f7f2b2af3df92d42e99355e3d4b4 100644 (file)
@@ -1,7 +1,7 @@
 From 1f0278a4f5475cc9ad67e007763368dfdd7dee29 Mon Sep 17 00:00:00 2001
 From: kishore kadiyala <kishore.kadiyala@ti.com>
 Date: Mon, 2 May 2011 11:10:38 +0000
-Subject: [PATCH 26/28] omap : nand : fix subpage ecc issue with prefetch
+Subject: [PATCH 26/59] omap : nand : fix subpage ecc issue with prefetch
 
 For prefetch engine, read and write  got broken in commit '2c01946c'.
 We never hit a scenario of not getting 'gpmc_prefetch_enable'
index d126ca7385c4611540b59d557a9f5c7431f255c4..1241d4a3ec8b0cf0786677ecd03f33ff629d3646 100644 (file)
@@ -1,7 +1,7 @@
 From 61e1cb7dbff3b611644d6ba811f8b83db148c1e1 Mon Sep 17 00:00:00 2001
 From: Scott Ellis <scottellis.developer@gmail.com>
 Date: Sun, 23 Jan 2011 20:39:35 -0800
-Subject: [PATCH 27/28] OMAP: Overo: Add support for spidev
+Subject: [PATCH 27/59] OMAP: Overo: Add support for spidev
 
 ---
  arch/arm/mach-omap2/board-overo.c |   16 ++++++++++++++++
index 24cc7287079322fb9742e943ca34a28208adb8c4..513de9f9245c0570fd2fb6b9ecdc87cab87ffb0b 100644 (file)
@@ -1,7 +1,7 @@
 From d84fb8f137d9392574422213ec6c3dc53bb00abf Mon Sep 17 00:00:00 2001
 From: Steve Sakoman <steve@sakoman.com>
 Date: Mon, 2 May 2011 16:14:34 -0700
-Subject: [PATCH 28/28] unionfs: Add support for unionfs 2.5.9
+Subject: [PATCH 28/59] unionfs: Add support for unionfs 2.5.9
 
 ---
  Documentation/filesystems/00-INDEX             |    2 +
index b6927e179c282d0c00ef474de41e098f1a841729..087c2a7874fa20af1158ca018c4aa04af70e6245 100644 (file)
@@ -43,8 +43,41 @@ SRC_URI_append = " \
            file://sakoman/0027-OMAP-Overo-Add-support-for-spidev.patch \
            file://sakoman/0028-unionfs-Add-support-for-unionfs-2.5.9.patch \
            \
-           file://beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch \
-           file://beagle/0002-OMAP3-beagle-add-support-for-expansionboards.patch \
+           file://beagle/0029-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch \
+           file://beagle/0030-OMAP3-beagle-add-support-for-expansionboards.patch \
+           file://beagle/0031-OMAP3-beagle-add-MADC-support.patch \
+           \
+           file://pm/linux-omap-2.6.39-ti-pm/0032-OMAP3-voltage-remove-spurious-pr_notice-for-debugfs.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0033-OMAP4-PM-remove-redundant-ifdef-CONFIG_PM.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0034-OMAP3-smartreflex-fix-sr_late_init-error-path-in-pro.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0035-OMAP3-smartreflex-request-the-memory-region.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0036-OMAP3-smartreflex-fix-ioremap-leak-on-probe-error.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0037-OMAP3-smartreflex-delete-instance-from-sr_list-on-pr.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0038-OMAP3-smartreflex-delete-debugfs-entries-on-probe-er.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0039-OMAP3-cpuidle-remove-useless-SDP-specific-timings.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0040-OMAP3-SR-make-notify-independent-of-class.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0041-OMAP3-SR-disable-interrupt-by-default.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0042-OMAP3-SR-enable-disable-SR-only-on-need.patch \
+           file://pm/linux-omap-2.6.39-ti-pm/0043-OMAP3-SR-fix-cosmetic-indentation.patch \
+           \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0044-OMAP-CPUfreq-ensure-driver-initializes-after-cpufreq.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0045-OMAP-CPUfreq-ensure-policy-is-fully-initialized.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0046-OMAP3-PM-CPUFreq-driver-for-OMAP3.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0047-OMAP-PM-CPUFREQ-Fix-conditional-compilation.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0048-cpufreq-fixup-after-new-OPP-layer-merged.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0049-OMAP-cpufreq-Split-OMAP1-and-OMAP2PLUS-CPUfreq-drive.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0050-OMAP2PLUS-cpufreq-Add-SMP-support-to-cater-OMAP4430.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq/0051-OMAP2PLUS-cpufreq-Fix-typo-when-attempting-to-set-mp.patch \
+           \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0052-cpufreq-helpers-for-walking-the-frequency-table.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-hotplug/0053-cpufreq-introduce-hotplug-governor.patch \
+           \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0054-OMAP2-cpufreq-free-up-table-on-exit.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0055-OMAP2-cpufreq-handle-invalid-cpufreq-table.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0056-OMAP2-cpufreq-minor-comment-cleanup.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0057-OMAP2-cpufreq-use-clk_init_cpufreq_table-if-OPPs-not.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0058-OMAP2-cpufreq-use-cpufreq_frequency_table_target.patch \
+           file://pm/linux-omap-2.6.39-ti-pm-wip-cpufreq-fixes/0059-OMAP2-cpufreq-fix-freq_table-leak.patch \
            "
 
 SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \