diff options
| author | Koen Kooi <koen@dominion.thruhere.net> | 2011-07-21 17:49:05 +0200 |
|---|---|---|
| committer | Koen Kooi <koen@dominion.thruhere.net> | 2011-07-21 17:49:05 +0200 |
| commit | 2b4cb76e5f187decda8e03f8ff42bc01f3b911c7 (patch) | |
| tree | 0c65801db1a2263120914d9a1b48c8bf27ecbf33 /recipes-kernel | |
| parent | 34ce3ae0c34c9e4eaac50fdd11bb9702a5647701 (diff) | |
| download | meta-ti-2b4cb76e5f187decda8e03f8ff42bc01f3b911c7.tar.gz | |
linux 3.0: enable 1GHz for beagle and add 2 MADC patches from sakomans tree
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>
Diffstat (limited to 'recipes-kernel')
4 files changed, 135 insertions, 1 deletions
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 index 00000000..54486930 --- /dev/null +++ b/recipes-kernel/linux/linux-3.0/beagle/0004-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | From fce3172f75d60e89f9192148d045d1735dd643b8 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Koen Kooi <koen@dominion.thruhere.net> | ||
| 3 | Date: Wed, 25 May 2011 08:57:40 +0200 | ||
| 4 | Subject: [PATCH 4/4] OMAP3: beagle: HACK! add in 1GHz OPP | ||
| 5 | |||
| 6 | Signed-off-by: Koen Kooi <koen@dominion.thruhere.net> | ||
| 7 | --- | ||
| 8 | arch/arm/mach-omap2/board-omap3beagle.c | 2 ++ | ||
| 9 | 1 files changed, 2 insertions(+), 0 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c | ||
| 12 | index a04f5a0..5e1d9f9 100644 | ||
| 13 | --- a/arch/arm/mach-omap2/board-omap3beagle.c | ||
| 14 | +++ b/arch/arm/mach-omap2/board-omap3beagle.c | ||
| 15 | @@ -701,11 +701,13 @@ static void __init beagle_opp_init(void) | ||
| 16 | /* Enable MPU 1GHz and lower opps */ | ||
| 17 | dev = &mh->od->pdev.dev; | ||
| 18 | r = opp_enable(dev, 800000000); | ||
| 19 | + r |= opp_enable(dev, 1000000000); | ||
| 20 | /* TODO: MPU 1GHz needs SR and ABB */ | ||
| 21 | |||
| 22 | /* Enable IVA 800MHz and lower opps */ | ||
| 23 | dev = &dh->od->pdev.dev; | ||
| 24 | r |= opp_enable(dev, 660000000); | ||
| 25 | + r |= opp_enable(dev, 800000000); | ||
| 26 | /* TODO: DSP 800MHz needs SR and ABB */ | ||
| 27 | if (r) { | ||
| 28 | pr_err("%s: failed to enable higher opp %d\n", | ||
| 29 | -- | ||
| 30 | 1.6.6.1 | ||
| 31 | |||
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 index 00000000..bb23137a --- /dev/null +++ b/recipes-kernel/linux/linux-3.0/madc/0001-Enabling-Hwmon-driver-for-twl4030-madc.patch | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | From 0822fbeb40d129a054c5a23bf825f282560cc26d Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Keerthy <j-keerthy@ti.com> | ||
| 3 | Date: Wed, 4 May 2011 01:14:50 +0530 | ||
| 4 | Subject: [PATCH 1/2] Enabling Hwmon driver for twl4030-madc | ||
| 5 | |||
| 6 | Signed-off-by: Keerthy <j-keerthy@ti.com> | ||
| 7 | --- | ||
| 8 | drivers/mfd/twl-core.c | 15 +++++++++++++++ | ||
| 9 | 1 files changed, 15 insertions(+), 0 deletions(-) | ||
| 10 | |||
| 11 | diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c | ||
| 12 | index b8f2a4e..463ee67 100644 | ||
| 13 | --- a/drivers/mfd/twl-core.c | ||
| 14 | +++ b/drivers/mfd/twl-core.c | ||
| 15 | @@ -83,6 +83,13 @@ | ||
| 16 | #define twl_has_madc() false | ||
| 17 | #endif | ||
| 18 | |||
| 19 | +#if defined(CONFIG_SENSORS_TWL4030_MADC) ||\ | ||
| 20 | + defined(CONFIG_SENSORS_TWL4030_MADC_MODULE) | ||
| 21 | +#define twl_has_madc_hwmon() true | ||
| 22 | +#else | ||
| 23 | +#define twl_has_madc_hwmon() false | ||
| 24 | +#endif | ||
| 25 | + | ||
| 26 | #ifdef CONFIG_TWL4030_POWER | ||
| 27 | #define twl_has_power() true | ||
| 28 | #else | ||
| 29 | @@ -669,6 +676,14 @@ add_children(struct twl4030_platform_data *pdata, unsigned long features) | ||
| 30 | return PTR_ERR(child); | ||
| 31 | } | ||
| 32 | |||
| 33 | +if (twl_has_madc_hwmon()) { | ||
| 34 | + child = add_child(2, "twl4030_madc_hwmon", | ||
| 35 | + NULL, 0, | ||
| 36 | + true, pdata->irq_base + MADC_INTR_OFFSET, 0); | ||
| 37 | + if (IS_ERR(child)) | ||
| 38 | + return PTR_ERR(child); | ||
| 39 | + } | ||
| 40 | + | ||
| 41 | if (twl_has_rtc()) { | ||
| 42 | /* | ||
| 43 | * REVISIT platform_data here currently might expose the | ||
| 44 | -- | ||
| 45 | 1.6.6.1 | ||
| 46 | |||
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 index 00000000..2cc984e0 --- /dev/null +++ b/recipes-kernel/linux/linux-3.0/madc/0002-mfd-twl-core-enable-madc-clock.patch | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | From a5931ecd1718f6936fa3d84821b4d9a874251ff7 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Steve Sakoman <steve@sakoman.com> | ||
| 3 | Date: Sat, 23 Jan 2010 06:26:54 -0800 | ||
| 4 | Subject: [PATCH 2/2] mfd: twl-core: enable madc clock | ||
| 5 | |||
| 6 | Now that the madc driver has been merged it is also necessary to enable the clock to the madc block | ||
| 7 | |||
| 8 | Signed-off-by: Steve Sakoman <steve@sakoman.com> | ||
| 9 | --- | ||
| 10 | drivers/mfd/twl-core.c | 8 ++++++++ | ||
| 11 | include/linux/i2c/twl.h | 1 + | ||
| 12 | 2 files changed, 9 insertions(+), 0 deletions(-) | ||
| 13 | |||
| 14 | diff --git a/drivers/mfd/twl-core.c b/drivers/mfd/twl-core.c | ||
| 15 | index 463ee67..e659d4e 100644 | ||
| 16 | --- a/drivers/mfd/twl-core.c | ||
| 17 | +++ b/drivers/mfd/twl-core.c | ||
| 18 | @@ -217,6 +217,11 @@ | ||
| 19 | |||
| 20 | /* Few power values */ | ||
| 21 | #define R_CFG_BOOT 0x05 | ||
| 22 | +#define R_GPBR1 0x0C | ||
| 23 | + | ||
| 24 | +/* MADC clock values for R_GPBR1 */ | ||
| 25 | +#define MADC_HFCLK_EN 0x80 | ||
| 26 | +#define DEFAULT_MADC_CLK_EN 0x10 | ||
| 27 | |||
| 28 | /* some fields in R_CFG_BOOT */ | ||
| 29 | #define HFCLK_FREQ_19p2_MHZ (1 << 0) | ||
| 30 | @@ -1152,6 +1157,9 @@ static void clocks_init(struct device *dev, | ||
| 31 | |||
| 32 | e |= unprotect_pm_master(); | ||
| 33 | /* effect->MADC+USB ck en */ | ||
| 34 | + if (twl_has_madc()) | ||
| 35 | + e |= twl_i2c_write_u8(TWL_MODULE_INTBR, | ||
| 36 | + MADC_HFCLK_EN | DEFAULT_MADC_CLK_EN, R_GPBR1); | ||
| 37 | e |= twl_i2c_write_u8(TWL_MODULE_PM_MASTER, ctrl, R_CFG_BOOT); | ||
| 38 | e |= protect_pm_master(); | ||
| 39 | |||
| 40 | diff --git a/include/linux/i2c/twl.h b/include/linux/i2c/twl.h | ||
| 41 | index ba4f886..6802efc 100644 | ||
| 42 | --- a/include/linux/i2c/twl.h | ||
| 43 | +++ b/include/linux/i2c/twl.h | ||
| 44 | @@ -74,6 +74,7 @@ | ||
| 45 | |||
| 46 | #define TWL_MODULE_USB TWL4030_MODULE_USB | ||
| 47 | #define TWL_MODULE_AUDIO_VOICE TWL4030_MODULE_AUDIO_VOICE | ||
| 48 | +#define TWL_MODULE_INTBR TWL4030_MODULE_INTBR | ||
| 49 | #define TWL_MODULE_PIH TWL4030_MODULE_PIH | ||
| 50 | #define TWL_MODULE_MADC TWL4030_MODULE_MADC | ||
| 51 | #define TWL_MODULE_MAIN_CHARGE TWL4030_MODULE_MAIN_CHARGE | ||
| 52 | -- | ||
| 53 | 1.6.6.1 | ||
| 54 | |||
diff --git a/recipes-kernel/linux/linux_3.0.bb b/recipes-kernel/linux/linux_3.0.bb index 7b0e51bd..9a46292e 100644 --- a/recipes-kernel/linux/linux_3.0.bb +++ b/recipes-kernel/linux/linux_3.0.bb | |||
| @@ -9,7 +9,7 @@ COMPATIBLE_MACHINE = "(beagleboard)" | |||
| 9 | SRCREV_pn-${PN} = "cf6ace16a3cd8b728fb0afa68368fd40bbeae19f" | 9 | SRCREV_pn-${PN} = "cf6ace16a3cd8b728fb0afa68368fd40bbeae19f" |
| 10 | 10 | ||
| 11 | # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc | 11 | # The main PR is now using MACHINE_KERNEL_PR, for omap3 see conf/machine/include/omap3.inc |
| 12 | MACHINE_KERNEL_PR_append = "c" | 12 | MACHINE_KERNEL_PR_append = "d" |
| 13 | 13 | ||
| 14 | FILESPATHPKG_prepend = "linux-3.0:" | 14 | FILESPATHPKG_prepend = "linux-3.0:" |
| 15 | 15 | ||
| @@ -193,6 +193,9 @@ SRC_URI += "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git;pro | |||
| 193 | file://beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch \ | 193 | file://beagle/0001-OMAP3-beagle-add-support-for-beagleboard-xM-revision.patch \ |
| 194 | file://beagle/0002-UNFINISHED-OMAP3-beagle-add-support-for-expansionboa.patch \ | 194 | file://beagle/0002-UNFINISHED-OMAP3-beagle-add-support-for-expansionboa.patch \ |
| 195 | file://beagle/0003-HACK-OMAP3-beagle-switch-to-GPTIMER1.patch \ | 195 | file://beagle/0003-HACK-OMAP3-beagle-switch-to-GPTIMER1.patch \ |
| 196 | file://beagle/0004-OMAP3-beagle-HACK-add-in-1GHz-OPP.patch \ | ||
| 197 | file://madc/0001-Enabling-Hwmon-driver-for-twl4030-madc.patch \ | ||
| 198 | file://madc/0002-mfd-twl-core-enable-madc-clock.patch \ | ||
| 196 | file://defconfig" | 199 | file://defconfig" |
| 197 | 200 | ||
| 198 | SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ | 201 | SRC_URI_append_beagleboard = " file://logo_linux_clut224.ppm \ |
