Skip to contentSkip to conversation

ARM: OMAP: misc. PM fixes for v3.2-rc

PATCH New Kevin Hilman 2 participants 5 messages Nov 18, 2011 – Nov 19, 2011

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

cover ARM: OMAP: misc. PM fixes for v3.2-rc

Tony,

Here's a couple more PM fixes for v3.2-rc.

Also available here if you prefer to pull:

git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_3.2/fixes/pm

(Note that this branch also includes the CPUidle fix that you already have
in your fixes branch)

Kevin

Felipe Balbi (1):
arm: omap: smartreflex: fix IRQ handling bug

Kevin Hilman (1):
ARM: OMAP: PM: only register TWL with voltage layer when device is
present

 arch/arm/mach-omap2/pm.c          |    6 ++----
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 arch/arm/mach-omap2/twl-common.c  |   11 +++++++++++
 arch/arm/mach-omap2/twl-common.h  |    3 +++
 4 files changed, 17 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.6
#1 lore raw

PATCH 1/2 ARM: OMAP: PM: only register TWL with voltage layer when device is present

Current code registers voltage layer details for TWL PMIC even when a TWL has not been registered. Fix this to only register the TWL with voltage layer when the TWL PMIC is initialized by board-level code.

---
 arch/arm/mach-omap2/pm.c         |    6 ++----
 arch/arm/mach-omap2/twl-common.c |   11 +++++++++++
 arch/arm/mach-omap2/twl-common.h |    3 +++
 3 files changed, 16 insertions(+), 4 deletions(-)
arch/arm/mach-omap2/pm.c +2 -4
index 1e79bdf..00bff46 100644
@@ -24,6 +24,7 @@
 #include "powerdomain.h"
 #include "clockdomain.h"
 #include "pm.h"
+#include "twl-common.h"
 
 static struct omap_device_pm_latency *pm_lats;
 
@@ -226,11 +227,8 @@ postcore_initcall(omap2_common_pm_init);
 
 static int __init omap2_common_pm_late_init(void)
 {
-	/* Init the OMAP TWL parameters */
-	omap3_twl_init();
-	omap4_twl_init();
-
 	/* Init the voltage layer */
+	omap_pmic_late_init();
 	omap_voltage_late_init();
 
 	/* Initialize the voltages */
arch/arm/mach-omap2/twl-common.c +11 -0
index 52243577..10b20c6 100644
@@ -30,6 +30,7 @@
 #include <plat/usb.h>
 
 #include "twl-common.h"
+#include "pm.h"
 
 static struct i2c_board_info __initdata pmic_i2c_board_info = {
 	.addr		= 0x48,
@@ -48,6 +49,16 @@ void __init omap_pmic_init(int bus, u32 clkrate,
 	omap_register_i2c_bus(bus, clkrate, &pmic_i2c_board_info, 1);
 }
 
+void __init omap_pmic_late_init(void)
+{
+	/* Init the OMAP TWL parameters (if PMIC has been registerd) */
+	if (!pmic_i2c_board_info.irq)
+		return;
+
+	omap3_twl_init();
+	omap4_twl_init();
+}
+
 #if defined(CONFIG_ARCH_OMAP3)
 static struct twl4030_usb_data omap3_usb_pdata = {
 	.usb_mode	= T2_USB_MODE_ULPI,
arch/arm/mach-omap2/twl-common.h +3 -0
index 5e83a5b..275dde8 100644
@@ -1,6 +1,8 @@
 #ifndef __OMAP_PMIC_COMMON__
 #define __OMAP_PMIC_COMMON__
 
+#include <plat/irqs.h>
+
 #define TWL_COMMON_PDATA_USB		(1 << 0)
 #define TWL_COMMON_PDATA_BCI		(1 << 1)
 #define TWL_COMMON_PDATA_MADC		(1 << 2)
@@ -30,6 +32,7 @@ struct twl4030_platform_data;
 
 void omap_pmic_init(int bus, u32 clkrate, const char *pmic_type, int pmic_irq,
 		    struct twl4030_platform_data *pmic_data);
+void omap_pmic_late_init(void);
 
 static inline void omap2_pmic_init(const char *pmic_type,
 				   struct twl4030_platform_data *pmic_data)
Signature · 1 line
1.7.6
#2 lore raw

PATCH 2/2 arm: omap: smartreflex: fix IRQ handling bug

In reply to Kevin Hilman

From: Felipe Balbi <[email protected]>

fix a bug which has been on this driver since it was added by the original commit 984aa6db which would never clear IRQSTATUS bits.

---
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/smartreflex.c +1 -1
index 6a4f683..cf246b3 100644
@@ -139,7 +139,7 @@ static irqreturn_t sr_interrupt(int irq, void *data)
 		sr_write_reg(sr_info, ERRCONFIG_V1, status);
 	} else if (sr_info->ip_type == SR_TYPE_V2) {
 		/* Read the status bits */
-		sr_read_reg(sr_info, IRQSTATUS);
+		status = sr_read_reg(sr_info, IRQSTATUS);
 
 		/* Clear them by writing back */
 		sr_write_reg(sr_info, IRQSTATUS, status);
Signature · 1 line
1.7.6
maintainer
#3 lore raw

cover ARM: OMAP: misc. PM fixes for v3.2-rc

In reply to Kevin Hilman
Quoted 10 lines · Kevin Hilman

Tony,

Here's a couple more PM fixes for v3.2-rc.

Also available here if you prefer to pull:

git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_3.2/fixes/pm

(Note that this branch also includes the CPUidle fix that you already have
in your fixes branch)

This leads into the same commit showing up twice since it's now applied in two different trees. Can you please rebase your branch on the current fixes?

Regards,

Tony

Quoted 18 lines

Kevin

Felipe Balbi (1):
arm: omap: smartreflex: fix IRQ handling bug

Kevin Hilman (1):
ARM: OMAP: PM: only register TWL with voltage layer when device is
present

 arch/arm/mach-omap2/pm.c          |    6 ++----
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 arch/arm/mach-omap2/twl-common.c  |   11 +++++++++++
 arch/arm/mach-omap2/twl-common.h  |    3 +++
 4 files changed, 17 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.6
maintainer
#4 lore raw

cover ARM: OMAP: misc. PM fixes for v3.2-rc

Quoted 7 lines · Tony Lindgren
Quoted 6 lines · Kevin Hilman

Tony,

Here's a couple more PM fixes for v3.2-rc.

Also available here if you prefer to pull:

Quoted 8 lines
Quoted 4 lines

git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-omap-pm.git for_3.2/fixes/pm

(Note that this branch also includes the CPUidle fix that you already have
in your fixes branch)

This leads into the same commit showing up twice since it's now applied in two different trees. Can you please rebase your branch on the current fixes?

Thanks for updating it, pulling in the fixed branch.

Tony

Quoted 20 lines
Quoted 7 lines

Felipe Balbi (1):
arm: omap: smartreflex: fix IRQ handling bug

Kevin Hilman (1):
ARM: OMAP: PM: only register TWL with voltage layer when device is
present

Quoted 9 lines
 arch/arm/mach-omap2/pm.c          |    6 ++----
 arch/arm/mach-omap2/smartreflex.c |    2 +-
 arch/arm/mach-omap2/twl-common.c  |   11 +++++++++++
 arch/arm/mach-omap2/twl-common.h  |    3 +++
 4 files changed, 17 insertions(+), 5 deletions(-)
Signature · 1 line
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html