linux 3.0: enable 1GHz for beagle and add 2 MADC patches from sakomans tree
authorKoen Kooi <koen@dominion.thruhere.net>
Thu, 21 Jul 2011 15:49:05 +0000 (17:49 +0200)
committerKoen Kooi <koen@dominion.thruhere.net>
Thu, 21 Jul 2011 15:49:05 +0000 (17:49 +0200)
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
recipes-kernel/linux/linux-3.0/beagle/0004-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch [new file with mode: 0644]
recipes-kernel/linux/linux-3.0/madc/0001-Enabling-Hwmon-driver-for-twl4030-madc.patch [new file with mode: 0644]
recipes-kernel/linux/linux-3.0/madc/0002-mfd-twl-core-enable-madc-clock.patch [new file with mode: 0644]
recipes-kernel/linux/linux_3.0.bb

diff --git a/recipes-kernel/linux/linux-3.0/beagle/0004-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch b/recipes-kernel/linux/linux-3.0/beagle/0004-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch
new file mode 100644 (file)
index 0000000..5448693
--- /dev/null
@@ -0,0 +1,31 @@
+From fce3172f75d60e89f9192148d045d1735dd643b8 Mon Sep 17 00:00:00 2001
+From: Koen Kooi <koen@dominion.thruhere.net>
+Date: Wed, 25 May 2011 08:57:40 +0200
+Subject: [PATCH 4/4] OMAP3: beagle: HACK! add in 1GHz OPP
+
+Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
+---
+ arch/arm/mach-omap2/board-omap3beagle.c |    2 ++
+ 1 files changed, 2 insertions(+), 0 deletions(-)
+
+diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
+index a04f5a0..5e1d9f9 100644
+--- a/arch/arm/mach-omap2/board-omap3beagle.c
++++ b/arch/arm/mach-omap2/board-omap3beagle.c
+@@ -701,11 +701,13 @@ static void __init beagle_opp_init(void)
+               /* Enable MPU 1GHz and lower opps */
+               dev = &mh->od->pdev.dev;
+               r = opp_enable(dev, 800000000);
++              r |= opp_enable(dev, 1000000000);
+               /* TODO: MPU 1GHz needs SR and ABB */
+               /* Enable IVA 800MHz and lower opps */
+               dev = &dh->od->pdev.dev;
+               r |= opp_enable(dev, 660000000);
++              r |= opp_enable(dev, 800000000);
+               /* TODO: DSP 800MHz needs SR and ABB */
+               if (r) {
+                       pr_err("%s: failed to enable higher opp %d\n",
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-3.0/madc/0001-Enabling-Hwmon-driver-for-twl4030-madc.patch b/recipes-kernel/linux/linux-3.0/madc/0001-Enabling-Hwmon-driver-for-twl4030-madc.patch
new file mode 100644 (file)
index 0000000..bb23137
--- /dev/null
@@ -0,0 +1,46 @@
+From 0822fbeb40d129a054c5a23bf825f282560cc26d Mon Sep 17 00:00:00 2001
+From: Keerthy <j-keerthy@ti.com>
+Date: Wed, 4 May 2011 01:14:50 +0530
+Subject: [PATCH 1/2] Enabling Hwmon driver for twl4030-madc
+
+Signed-off-by: Keerthy <j-keerthy@ti.com>
+---
+ drivers/mfd/twl-core.c |   15 +++++++++++++++
+ 1 files changed, 15 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
+index b8f2a4e..463ee67 100644
+--- a/drivers/mfd/twl-core.c
++++ b/drivers/mfd/twl-core.c
+@@ -83,6 +83,13 @@
+ #define twl_has_madc()        false
+ #endif
++#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\
++       defined(CONFIG_SENSORS_TWL4030_MADC_MODULE)
++#define twl_has_madc_hwmon()  true
++#else
++#define twl_has_madc_hwmon()  false
++#endif
++
+ #ifdef CONFIG_TWL4030_POWER
+ #define twl_has_power()        true
+ #else
+@@ -669,6 +676,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features)
+                       return PTR_ERR(child);
+       }
++if (twl_has_madc_hwmon()) {
++              child = add_child(2, "twl4030_madc_hwmon",
++                              NULL, 0,
++                              true, pdata->irq_base + MADC_INTR_OFFSET, 0);
++              if (IS_ERR(child))
++                      return PTR_ERR(child);
++      }
++
+       if (twl_has_rtc()) {
+               /*
+                * REVISIT platform_data here currently might expose the
+-- 
+1.6.6.1
+
diff --git a/recipes-kernel/linux/linux-3.0/madc/0002-mfd-twl-core-enable-madc-clock.patch b/recipes-kernel/linux/linux-3.0/madc/0002-mfd-twl-core-enable-madc-clock.patch
new file mode 100644 (file)
index 0000000..2cc984e
--- /dev/null
@@ -0,0 +1,54 @@
+From a5931ecd1718f6936fa3d84821b4d9a874251ff7 Mon Sep 17 00:00:00 2001
+From: Steve Sakoman <steve@sakoman.com>
+Date: Sat, 23 Jan 2010 06:26:54 -0800
+Subject: [PATCH 2/2] 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
+
+Signed-off-by: Steve Sakoman <steve@sakoman.com>
+---
+ drivers/mfd/twl-core.c  |    8 ++++++++
+ include/linux/i2c/twl.h |    1 +
+ 2 files changed, 9 insertions(+), 0 deletions(-)
+
+diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c
+index 463ee67..e659d4e 100644
+--- a/drivers/mfd/twl-core.c
++++ b/drivers/mfd/twl-core.c
+@@ -217,6 +217,11 @@
+ /* Few power values */
+ #define R_CFG_BOOT                    0x05
++#define R_GPBR1                               0x0C
++
++/* MADC clock values for R_GPBR1 */
++#define MADC_HFCLK_EN                 0x80
++#define DEFAULT_MADC_CLK_EN           0x10
+ /* some fields in R_CFG_BOOT */
+ #define HFCLK_FREQ_19p2_MHZ           (1 << 0)
+@@ -1152,6 +1157,9 @@ static void clocks_init(struct device *dev,
+       e |= unprotect_pm_master();
+       /* effect->MADC+USB ck en */
++      if (twl_has_madc())
++              e |= twl_i2c_write_u8(TWL_MODULE_INTBR,
++                              MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1);
+       e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT);
+       e |= protect_pm_master();
+diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h
+index ba4f886..6802efc 100644
+--- a/include/linux/i2c/twl.h
++++ b/include/linux/i2c/twl.h
+@@ -74,6 +74,7 @@
+ #define TWL_MODULE_USB                TWL4030_MODULE_USB
+ #define TWL_MODULE_AUDIO_VOICE        TWL4030_MODULE_AUDIO_VOICE
++#define TWL_MODULE_INTBR      TWL4030_MODULE_INTBR
+ #define TWL_MODULE_PIH                TWL4030_MODULE_PIH
+ #define TWL_MODULE_MADC               TWL4030_MODULE_MADC
+ #define TWL_MODULE_MAIN_CHARGE        TWL4030_MODULE_MAIN_CHARGE
+-- 
+1.6.6.1
+
index 7b0e51bd4a59f3389fa075c2559cf58ca8cdc905..9a46292e9cc459193d579408ee90469268ea9998 100644 (file)
@@ -9,7 +9,7 @@ COMPATIBLE_MACHINE = "(beagleboard)"
 SRCREV_pn-${PN} = "cf6ace16a3cd8b728fb0afa68368fd40bbeae19f"
 
 # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc
-MACHINE_KERNEL_PR_append = "c"
+MACHINE_KERNEL_PR_append = "d"
 
 FILESPATHPKG_prepend = "linux-3.0:"
 
@@ -193,6 +193,9 @@ SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;pro
             file://beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch \
             file://beagle/0002-UNFINISHED-OMAP3-beagle-add-support-for-expansionboa.patch \
             file://beagle/0003-HACK-OMAP3-beagle-switch-to-GPTIMER1.patch \
+            file://beagle/0004-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch \
+            file://madc/0001-Enabling-Hwmon-driver-for-twl4030-madc.patch \
+            file://madc/0002-mfd-twl-core-enable-madc-clock.patch \
             file://defconfig"
 
 SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \