Skip to contentSkip to conversation

ARM: OMAP: compile fix for CONFIG_PM_DEBUG=y

PATCH In review Kevin Hilman 3 participants 8 messages Jun 6, 2007 – Jun 8, 2007

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

PATCH 1/1 ARM: OMAP: compile fix for CONFIG_PM_DEBUG=y

Various compile fixes needed after PRCM updates for PM_DEBUG

---
 arch/arm/mach-omap2/pm.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/pm.c +8 -7
index d6c81dd..a1655c2 100644
@@ -138,7 +138,7 @@ static void serial_console_sleep(int enable)
 				serial_wakeup = 1;
 			break;
 		case 3:
-			l = prm_read_mod_reg(CORE_MOD, PM_WKST2);
+			l = prm_read_mod_reg(CORE_MOD, OMAP24XX_PM_WKST2);
 			if (l & OMAP24XX_ST_UART3)
 				serial_wakeup = 1;
 			break;
@@ -180,19 +180,19 @@ static void pm_init_serial_console(void)
 	}
 	switch (serial_console_uart) {
 	case 1:
-		l = prcm_read_mod_reg(CORE_MOD, PM_WKEN1);
+		l = prm_read_mod_reg(CORE_MOD, PM_WKEN1);
 		l |= OMAP24XX_ST_UART1;
 		prm_write_mod_reg(l, CORE_MOD, PM_WKEN1);
 		break;
 	case 2:
-		l = prcm_read_mod_reg(CORE_MOD, PM_WKEN1);
+		l = prm_read_mod_reg(CORE_MOD, PM_WKEN1);
 		l |= OMAP24XX_ST_UART2;
 		prm_write_mod_reg(l, CORE_MOD, PM_WKEN1);
 		break;
 	case 3:
-		l = prcm_read_mod_reg(CORE_MOD, PM_WKEN2);
+		l = prm_read_mod_reg(CORE_MOD, OMAP24XX_PM_WKEN2);
 		l |= OMAP24XX_ST_UART3;
-		prm_write_mod_reg(l, CORE_MOD, PM_WKEN2);
+		prm_write_mod_reg(l, CORE_MOD, OMAP24XX_PM_WKEN2);
 		break;
 	}
 }
@@ -265,7 +265,7 @@ static void omap2_pm_dump(int mode, int resume, unsigned int us)
 #endif
 	} else {
 		DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST1);
-		DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST2);
+		DUMP_PRM_MOD_REG(CORE_MOD, OMAP24XX_PM_WKST2);
 		DUMP_PRM_MOD_REG(WKUP_MOD, PM_WKST);
 		DUMP_PRM_REG(OMAP24XX_PRCM_IRQSTATUS_MPU);
 #if 1
@@ -293,7 +293,8 @@ static void omap2_pm_dump(int mode, int resume, unsigned int us)
 	if (!resume)
 #if defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
 		printk("--- Going to %s %s (next timer after %u ms)\n", s1, s2,
-		       jiffies_to_msecs(next_timer_interrupt() - jiffies));
+		       jiffies_to_msecs(get_next_timer_interrupt(jiffies) - 
+					jiffies));
 #else
 		printk("--- Going to %s %s\n", s1, s2);
 #endif
Signature · 1 line
1.5.2
#1 lore raw

PATCH 1/1 ARM: OMAP: 2430 PM: emul_ck is only available on 242x

omap2_pm_init: on 2430, don't fail if emul_ck is not available. It is only available on 2420

---
 arch/arm/mach-omap2/pm.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/pm.c +7 -5
index a1655c2..974fdc5 100644
@@ -783,11 +783,13 @@ int __init omap2_pm_init(void)
 		return -ENODEV;
 	}
 
-	emul_ck = clk_get(NULL, "emul_ck");
-	if (IS_ERR(emul_ck)) {
-		printk(KERN_ERR "could not get emul_ck\n");
-		clk_put(osc_ck);
-		return -ENODEV;
+	if (cpu_is_omap242x()) {
+		emul_ck = clk_get(NULL, "emul_ck");
+		if (IS_ERR(emul_ck)) {
+			printk(KERN_ERR "could not get emul_ck\n");
+			clk_put(osc_ck);
+			return -ENODEV;
+		}
 	}
 
 	prcm_setup_regs();
Signature · 1 line
1.5.2
#3 lore raw

PATCH 1/1 ARM: OMAP: init section mismatch for omap2/timer-gp

In reply to Kevin Hilman
---
 arch/arm/mach-omap2/timer-gp.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mach-omap2/timer-gp.c +1 -1
index 8f380a1..948d7ec 100644
@@ -175,6 +175,6 @@ static void __init omap2_gp_timer_init(void)
 	omap2_gp_clocksource_init();
 }
 
-struct sys_timer omap_timer = {
+struct sys_timer omap_timer __initdata = {
 	.init	= omap2_gp_timer_init,
 };
Signature · 1 line
1.5.2
#5 lore raw

PATCH 1/1 ARM: OMAP: 2430SDP: minor fixups for fb driver

In reply to Kevin Hilman

Remove redundant #defines
Fix LCD pixelclock to 5.4 MHz

---
 drivers/video/omap/lcd_2430sdp.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/video/omap/lcd_2430sdp.c +2 -6
index 0c50d10..6e5b603 100644
@@ -31,14 +31,10 @@
 
 #define LCD_PANEL_BACKLIGHT_GPIO	91
 #define LCD_PANEL_ENABLE_GPIO		154
-#define H4_LCD_PIXCLOCK_MAX		185186 /* freq 5.4 MHz */
+#define LCD_PIXCLOCK_MAX		5400 /* freq 5.4 MHz */
 #define PM_RECEIVER             TWL4030_MODULE_PM_RECIEVER
 #define ENABLE_VAUX2_DEDICATED  0x09
 #define ENABLE_VAUX2_DEV_GRP    0x20
-#define TWL4030_VAUX2_DEV_GRP           0x1B
-#define TWL4030_VAUX2_DEDICATED         0x1E
-#define TWL4030_MODULE_PM_RECIEVER  0x13
-
 
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)
@@ -99,7 +95,7 @@ struct lcd_panel sdp2430_panel = {
 	.vfp		= 2,		/* lower_margin */
 	.vbp		= 7,		/* upper_margin (8) - 1 */
 
-	.pixel_clock	= H4_LCD_PIXCLOCK_MAX,
+	.pixel_clock	= LCD_PIXCLOCK_MAX,
 
 	.init		= sdp2430_panel_init,
 	.cleanup	= sdp2430_panel_cleanup,
Signature · 1 line
1.5.2
#4 lore raw

Re: [PATCH] ARM: OMAP: init section mismatch for omap2/timer-gp

In reply to Kevin Hilman

Kevin,
Kevin Hilman stated on 6/5/2007 8:00 PM:

arch/arm/mach-omap2/timer-gp.c static void __init omap2_gp_timer_init(void) · line 180

Quoted 6 lines
arch/arm/mach-omap2/timer-gp.c +1 -1
-struct sys_timer omap_timer = {
+struct sys_timer omap_timer __initdata = {
 	.init	= omap2_gp_timer_init,
 };

Patch attempted here:
http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010075.html

Rejected here:
http://linux.omap.com/pipermail/linux-omap-open-source/2007-May/010097.html

Regards,
Nishanth Menon

maintainer
#7 lore raw
In reply to Kevin Hilman
Quoted 54 lines · Kevin Hilman

Various compile fixes needed after PRCM updates for PM_DEBUG

---
 arch/arm/mach-omap2/pm.c |   15 ++++++++-------
 1 files changed, 8 insertions(+), 7 deletions(-)
arch/arm/mach-omap2/pm.c +6 -6
index d6c81dd..a1655c2 100644
@@ -138,7 +138,7 @@ static void serial_console_sleep(int enable)
 				serial_wakeup = 1;
 			break;
 		case 3:
-			l = prm_read_mod_reg(CORE_MOD, PM_WKST2);
+			l = prm_read_mod_reg(CORE_MOD, OMAP24XX_PM_WKST2);
 			if (l & OMAP24XX_ST_UART3)
 				serial_wakeup = 1;
 			break;
@@ -180,19 +180,19 @@ static void pm_init_serial_console(void)
 	}
 	switch (serial_console_uart) {
 	case 1:
-		l = prcm_read_mod_reg(CORE_MOD, PM_WKEN1);
+		l = prm_read_mod_reg(CORE_MOD, PM_WKEN1);
 		l |= OMAP24XX_ST_UART1;
 		prm_write_mod_reg(l, CORE_MOD, PM_WKEN1);
 		break;
 	case 2:
-		l = prcm_read_mod_reg(CORE_MOD, PM_WKEN1);
+		l = prm_read_mod_reg(CORE_MOD, PM_WKEN1);
 		l |= OMAP24XX_ST_UART2;
 		prm_write_mod_reg(l, CORE_MOD, PM_WKEN1);
 		break;
 	case 3:
-		l = prcm_read_mod_reg(CORE_MOD, PM_WKEN2);
+		l = prm_read_mod_reg(CORE_MOD, OMAP24XX_PM_WKEN2);
 		l |= OMAP24XX_ST_UART3;
-		prm_write_mod_reg(l, CORE_MOD, PM_WKEN2);
+		prm_write_mod_reg(l, CORE_MOD, OMAP24XX_PM_WKEN2);
 		break;
 	}
 }
@@ -265,7 +265,7 @@ static void omap2_pm_dump(int mode, int resume, unsigned int us)
 #endif
 	} else {
 		DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST1);
-		DUMP_PRM_MOD_REG(CORE_MOD, PM_WKST2);
+		DUMP_PRM_MOD_REG(CORE_MOD, OMAP24XX_PM_WKST2);
 		DUMP_PRM_MOD_REG(WKUP_MOD, PM_WKST);
 		DUMP_PRM_REG(OMAP24XX_PRCM_IRQSTATUS_MPU);
 #if 1

arch/arm/mach-omap2/pm.c static void omap2_pm_dump(int mode, int resume, unsigned int us) · line 300

Quoted 9 lines
arch/arm/mach-omap2/pm.c +2 -1
@@ -293,7 +293,8 @@ static void omap2_pm_dump(int mode, int resume, unsigned int us)
 	if (!resume)
 #if defined(CONFIG_NO_IDLE_HZ) || defined(CONFIG_NO_HZ)
 		printk("--- Going to %s %s (next timer after %u ms)\n", s1, s2,
-		       jiffies_to_msecs(next_timer_interrupt() - jiffies));
+		       jiffies_to_msecs(get_next_timer_interrupt(jiffies) - 
+					jiffies));
 #else
 		printk("--- Going to %s %s\n", s1, s2);
 #endif

Pushing today.

Tony

maintainer
#2 lore raw

Re: [PATCH] ARM: OMAP: 2430 PM: emul_ck is only available on 242x

In reply to Kevin Hilman
Quoted 21 lines · Kevin Hilman

omap2_pm_init: on 2430, don't fail if emul_ck is not available. It is only available on 2420

---
 arch/arm/mach-omap2/pm.c |   12 +++++++-----
 1 files changed, 7 insertions(+), 5 deletions(-)
arch/arm/mach-omap2/pm.c +0 -5
index a1655c2..974fdc5 100644
@@ -783,11 +783,13 @@ int __init omap2_pm_init(void)
 		return -ENODEV;
 	}
 
-	emul_ck = clk_get(NULL, "emul_ck");
-	if (IS_ERR(emul_ck)) {
-		printk(KERN_ERR "could not get emul_ck\n");
-		clk_put(osc_ck);
-		return -ENODEV;

arch/arm/mach-omap2/pm.c int __init omap2_pm_init(void) · line 795

Quoted 10 lines
arch/arm/mach-omap2/pm.c +7 -0
+	if (cpu_is_omap242x()) {
+		emul_ck = clk_get(NULL, "emul_ck");
+		if (IS_ERR(emul_ck)) {
+			printk(KERN_ERR "could not get emul_ck\n");
+			clk_put(osc_ck);
+			return -ENODEV;
+		}
 	}
 
 	prcm_setup_regs();

Pushing today.

Tony

maintainer
#6 lore raw

Re: [PATCH] ARM: OMAP: 2430SDP: minor fixups for fb driver

In reply to Kevin Hilman
Quoted 30 lines · Kevin Hilman

Remove redundant #defines
Fix LCD pixelclock to 5.4 MHz

---
 drivers/video/omap/lcd_2430sdp.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
drivers/video/omap/lcd_2430sdp.c +1 -5
index 0c50d10..6e5b603 100644
@@ -31,14 +31,10 @@
 
 #define LCD_PANEL_BACKLIGHT_GPIO	91
 #define LCD_PANEL_ENABLE_GPIO		154
-#define H4_LCD_PIXCLOCK_MAX		185186 /* freq 5.4 MHz */
+#define LCD_PIXCLOCK_MAX		5400 /* freq 5.4 MHz */
 #define PM_RECEIVER             TWL4030_MODULE_PM_RECIEVER
 #define ENABLE_VAUX2_DEDICATED  0x09
 #define ENABLE_VAUX2_DEV_GRP    0x20
-#define TWL4030_VAUX2_DEV_GRP           0x1B
-#define TWL4030_VAUX2_DEDICATED         0x1E
-#define TWL4030_MODULE_PM_RECIEVER  0x13
-
 
 
 #define t2_out(c, r, v) twl4030_i2c_write_u8(c, r, v)

drivers/video/omap/lcd_2430sdp.c struct lcd_panel sdp2430_panel = { · line 101

Quoted 8 lines
drivers/video/omap/lcd_2430sdp.c +1 -1
@@ -99,7 +95,7 @@ struct lcd_panel sdp2430_panel = {
 	.vfp		= 2,		/* lower_margin */
 	.vbp		= 7,		/* upper_margin (8) - 1 */
 
-	.pixel_clock	= H4_LCD_PIXCLOCK_MAX,
+	.pixel_clock	= LCD_PIXCLOCK_MAX,
 
 	.init		= sdp2430_panel_init,
 	.cleanup	= sdp2430_panel_cleanup,

Pushing today.

Tony