Skip to contentSkip to conversation

ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

PATCH New Jon Hunter 2 participants 6 messages Jan 10, 2013 – Jan 18, 2013

Subsystems (4)
lore
Share & tools
lore

Jon Hunter

author
#0 lore raw

PATCH 1/1 ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

During the migration to the common clock framework, calls to the functions omap2xxx_clkt_vps_late_init() and omap2xxx_clkt_vps_check_bootloader_rates() were not preserved for OMAP2420 and OMAP2430. This causes the variables "sys_ck_rate" and "curr_prcm_set" to be uninitialised on boot. On reboot, this causes the following error message to be displayed because the appropriate MPU clock frequency (derived from sys_ck_rate) cannot be found.

"Could not set MPU rate to 4294MHz"

Fix this by adding back calls to omap2xxx_clkt_vps_late_init() and omap2xxx_clkt_vps_check_bootloader_rates() in the OMAP2420 and OMAP2430 clock initialisation code.

---

Tested on OMAP2420 H4 board only.

 arch/arm/mach-omap2/cclock2420_data.c |    5 +++++
 arch/arm/mach-omap2/cclock2430_data.c |    5 +++++
 2 files changed, 10 insertions(+)
arch/arm/mach-omap2/cclock2420_data.c +5 -0
index 7e5febe..0dadfb9 100644
@@ -1935,8 +1935,13 @@ int __init omap2420_clk_init(void)
 			omap2_init_clk_hw_omap_clocks(c->lk.clk);
 	}
 
+	omap2xxx_clkt_vps_late_init();
+
 	omap2_clk_disable_autoidle_all();
 
+	/* XXX Can this be done from the virt_prcm_set clk init function? */
+	omap2xxx_clkt_vps_check_bootloader_rates();
+
 	omap2_clk_enable_init_clocks(enable_init_clks,
 				     ARRAY_SIZE(enable_init_clks));
 
arch/arm/mach-omap2/cclock2430_data.c +5 -0
index eda079b..722ff84 100644
@@ -2050,8 +2050,13 @@ int __init omap2430_clk_init(void)
 			omap2_init_clk_hw_omap_clocks(c->lk.clk);
 	}
 
+	omap2xxx_clkt_vps_late_init();
+
 	omap2_clk_disable_autoidle_all();
 
+	/* XXX Can this be done from the virt_prcm_set clk init function? */
+	omap2xxx_clkt_vps_check_bootloader_rates();
+
 	omap2_clk_enable_init_clocks(enable_init_clks,
 				     ARRAY_SIZE(enable_init_clks));
 
Signature · 1 line
1.7.10.4
maintainer
#1 lore raw

PATCH 1/1 ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

Hi Jon

Quoted 9 lines · Jon Hunter

During the migration to the common clock framework, calls to the functions omap2xxx_clkt_vps_late_init() and omap2xxx_clkt_vps_check_bootloader_rates() were not preserved for OMAP2420 and OMAP2430. This causes the variables "sys_ck_rate" and "curr_prcm_set" to be uninitialised on boot. On reboot, this causes the following error message to be displayed because the appropriate MPU clock frequency (derived from sys_ck_rate) cannot be found.

"Could not set MPU rate to 4294MHz"

I don't see this message on 2430sdp or n800 with v3.8-rc3, but maybe that's due to sys_clk differences. Do you still see this on v3.8-rc3 with H4?

Also, there's already a call to omap2xxx_clkt_vps_check_bootloader_rates() -- is it necessary to add another one?

- Paul

author
#2 lore raw

PATCH 1/1 ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

Hi Paul,

Quoted 12 lines · Paul Walmsley

Hi Jon

Quoted 8 lines · Jon Hunter

During the migration to the common clock framework, calls to the functions omap2xxx_clkt_vps_late_init() and omap2xxx_clkt_vps_check_bootloader_rates() were not preserved for OMAP2420 and OMAP2430. This causes the variables "sys_ck_rate" and "curr_prcm_set" to be uninitialised on boot. On reboot, this causes the following error message to be displayed because the appropriate MPU clock frequency (derived from sys_ck_rate) cannot be found.

Quoted 5 lines
Quoted 1 line

"Could not set MPU rate to 4294MHz"

I don't see this message on 2430sdp or n800 with v3.8-rc3, but maybe that's due to sys_clk differences. Do you still see this on v3.8-rc3 with H4?

Yes I still see it. You don't see it on reboot?

The reason why there is such a large number is because omap2_round_to_table_rate() is returning the value -EINVAL. You could add a print to omap2_round_to_table_rate() to see what it returns on reboot. Or we could add a WARN to the function is sys_ck_rate is 0 for testing.

Quoted 2 lines

Also, there's already a call to omap2xxx_clkt_vps_check_bootloader_rates() -- is it necessary to add another one?

Thanks. I see that now and so that is not needed then.

Cheers
Jon

maintainer
#3 lore raw

PATCH 1/1 ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

Hi Jon,

Quoted 1 line · Jon Hunter

Yes I still see it. You don't see it on reboot?

Ah that's probably explains the discrepancy - I missed the part about the reboot.

Quoted 10 lines

The reason why there is such a large number is because omap2_round_to_table_rate() is returning the value -EINVAL. You could add a print to omap2_round_to_table_rate() to see what it returns on reboot. Or we could add a WARN to the function is sys_ck_rate is 0 for testing.

Quoted 2 lines

Also, there's already a call to omap2xxx_clkt_vps_check_bootloader_rates() -- is it necessary to add another one?

Thanks. I see that now and so that is not needed then.

OK, I'll queue your patch for 3.8-rc fixes, dropping the omap2xxx_clkt_vps_check_bootloader_rates() calls.

- Paul

maintainer
#4 lore raw

PATCH 1/1 ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

Here's the updated version (at the bottom of this message). Seems to work based on a quick test on 2430SDP.

# shutdown -r -n now
shutdown: sending all processes the TERM signal...
shutdown: sending all processes the KILL signal.
shutdown: turning off swap
shutdown: unmounting all file systems
umount: /debug: not mounted
umount: /run/shm: not mounted
umount: /dev: not mounted
umount: /tmp: not mounted
umount: /run/lock: not mounted
umount: /run: not mounted
umount: /lib/init/rw: not found
Please stand by while rebooting the system.
[   79.635925] Disabling non-boot CPUs ...
[   79.640197] Restarting system.

U-Boot 1.1.4 (Mar 18 2007 - 12:22:00)

OMAP2430C-GP revision 3, PRCM #5A
TI 2430SDP 1.1 Version + mDDR (Boot NOR)

DRAM:  128 MB
Flash: 192 MB
NAND:64 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 

... etc. ...

- Paul

From: Jon Hunter <[email protected]>
Date: Thu, 10 Jan 2013 14:53:29 -0600
Subject: [PATCH] ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function
calls

During the migration to the common clock framework, calls to the functions omap2xxx_clkt_vps_late_init() were not preserved for OMAP2420 and OMAP2430. This causes the variables "sys_ck_rate" and "curr_prcm_set" to be uninitialised on boot. On reboot, this causes the following error message to be displayed because the appropriate MPU clock frequency (derived from sys_ck_rate) cannot be found.

"Could not set MPU rate to 4294MHz"

Fix this by adding back calls to omap2xxx_clkt_vps_late_init() in the OMAP2420 and OMAP2430 clock initialisation code.

[paul at pwsan.com: dropped the duplicated call to
omap2xxx_clkt_vps_check_bootloader_rates() after consultation with Jon; updated patch description]

---
 arch/arm/mach-omap2/cclock2420_data.c |    2 ++
 arch/arm/mach-omap2/cclock2430_data.c |    2 ++
 2 files changed, 4 insertions(+)
arch/arm/mach-omap2/cclock2420_data.c +2 -0
index 7e5febe..ab7e952 100644
@@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void)
 			omap2_init_clk_hw_omap_clocks(c->lk.clk);
 	}
 
+	omap2xxx_clkt_vps_late_init();
+
 	omap2_clk_disable_autoidle_all();
 
 	omap2_clk_enable_init_clocks(enable_init_clks,
arch/arm/mach-omap2/cclock2430_data.c +2 -0
index eda079b..eb3dab6 100644
@@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void)
 			omap2_init_clk_hw_omap_clocks(c->lk.clk);
 	}
 
+	omap2xxx_clkt_vps_late_init();
+
 	omap2_clk_disable_autoidle_all();
 
 	omap2_clk_enable_init_clocks(enable_init_clks,
Signature · 1 line
1.7.10.4
author
#5 lore raw

PATCH 1/1 ARM: OMAP2: Fix missing omap2xxx_clkt_vps_xxx function calls

Hi Paul,

Quoted 85 lines · Paul Walmsley

Here's the updated version (at the bottom of this message). Seems to work based on a quick test on 2430SDP.

# shutdown -r -n now
shutdown: sending all processes the TERM signal...
shutdown: sending all processes the KILL signal.
shutdown: turning off swap
shutdown: unmounting all file systems
umount: /debug: not mounted
umount: /run/shm: not mounted
umount: /dev: not mounted
umount: /tmp: not mounted
umount: /run/lock: not mounted
umount: /run: not mounted
umount: /lib/init/rw: not found
Please stand by while rebooting the system.
[   79.635925] Disabling non-boot CPUs ...
[   79.640197] Restarting system.

U-Boot 1.1.4 (Mar 18 2007 - 12:22:00)

OMAP2430C-GP revision 3, PRCM #5A
TI 2430SDP 1.1 Version + mDDR (Boot NOR)

DRAM:  128 MB
Flash: 192 MB
NAND:64 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0 

... etc. ...

- Paul

From: Jon Hunter <[email protected]>
Date: Thu, 10 Jan 2013 14:53:29 -0600
Subject: [PATCH] ARM: OMAP2: Fix missing omap2xxx_clkt_vps_late_init function
calls

During the migration to the common clock framework, calls to the functions omap2xxx_clkt_vps_late_init() were not preserved for OMAP2420 and OMAP2430. This causes the variables "sys_ck_rate" and "curr_prcm_set" to be uninitialised on boot. On reboot, this causes the following error message to be displayed because the appropriate MPU clock frequency (derived from sys_ck_rate) cannot be found.

"Could not set MPU rate to 4294MHz"

Fix this by adding back calls to omap2xxx_clkt_vps_late_init() in the OMAP2420 and OMAP2430 clock initialisation code.

[paul at pwsan.com: dropped the duplicated call to
omap2xxx_clkt_vps_check_bootloader_rates() after consultation with Jon; updated patch description]

---
 arch/arm/mach-omap2/cclock2420_data.c |    2 ++
 arch/arm/mach-omap2/cclock2430_data.c |    2 ++
 2 files changed, 4 insertions(+)
arch/arm/mach-omap2/cclock2420_data.c +2 -0
index 7e5febe..ab7e952 100644
@@ -1935,6 +1935,8 @@ int __init omap2420_clk_init(void)
 			omap2_init_clk_hw_omap_clocks(c->lk.clk);
 	}
 
+	omap2xxx_clkt_vps_late_init();
+
 	omap2_clk_disable_autoidle_all();
 
 	omap2_clk_enable_init_clocks(enable_init_clks,
arch/arm/mach-omap2/cclock2430_data.c +0 -0
index eda079b..eb3dab6 100644

arch/arm/mach-omap2/cclock2430_data.c int __init omap2430_clk_init(void) · line 2057

Quoted 8 lines
arch/arm/mach-omap2/cclock2430_data.c +2 -0
@@ -2050,6 +2050,8 @@ int __init omap2430_clk_init(void)
 			omap2_init_clk_hw_omap_clocks(c->lk.clk);
 	}
 
+	omap2xxx_clkt_vps_late_init();
+
 	omap2_clk_disable_autoidle_all();
 
 	omap2_clk_enable_init_clocks(enable_init_clks,

Thanks! Looks good to me.

Jon