linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* omap-pm: omap3_pm_defconfig no longer booting on Overo
@ 2010-04-29  7:24 Peter Tseng
  2010-04-30 18:54 ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Tseng @ 2010-04-29  7:24 UTC (permalink / raw)
  To: linux-omap

Since the rc5 tag, omap3_pm_defconfig from the pm branch no longer boots
on the Gumstix Overo.
I am certain that a build back in the rc3 days worked. Unfortunately, I
don't know about rc4, or anything that happenend in the intervening time.

Any clues on how to fix? If necessary, I'll provide what info I can to
help diagnose the issue if told what to do.

Peter Tseng

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: omap-pm: omap3_pm_defconfig no longer booting on Overo
  2010-04-29  7:24 omap-pm: omap3_pm_defconfig no longer booting on Overo Peter Tseng
@ 2010-04-30 18:54 ` Kevin Hilman
  2010-05-01  3:12   ` Peter Tseng
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2010-04-30 18:54 UTC (permalink / raw)
  To: Peter Tseng; +Cc: linux-omap

Peter Tseng <tsenpet09@gmail.com> writes:

> Since the rc5 tag, omap3_pm_defconfig from the pm branch no longer boots
> on the Gumstix Overo.
> I am certain that a build back in the rc3 days worked. Unfortunately, I
> don't know about rc4, or anything that happenend in the intervening time.
>
> Any clues on how to fix? If necessary, I'll provide what info I can to
> help diagnose the issue if told what to do.

First step is to enable CONFIG_LL_DEBUG and CONFIG_EARLYPRINTK in the
defconfig (I should have these enabled by default in omap3_pm_defconfig)

Then, boot adding 'earlyprintk' to your boot cmdline and post the
resulting bootlog here.

Thanks,

Kevin


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: omap-pm: omap3_pm_defconfig no longer booting on Overo
  2010-04-30 18:54 ` Kevin Hilman
@ 2010-05-01  3:12   ` Peter Tseng
  2010-05-01 15:32     ` Nishanth Menon
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Tseng @ 2010-05-01  3:12 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: linux-omap

[-- Attachment #1: Type: text/plain, Size: 801 bytes --]

On 04/30/2010 02:54 PM, Kevin Hilman wrote:
> Peter Tseng <tsenpet09@gmail.com> writes:
> 
>> Since the rc5 tag, omap3_pm_defconfig from the pm branch no longer boots
>> on the Gumstix Overo.
>> I am certain that a build back in the rc3 days worked. Unfortunately, I
>> don't know about rc4, or anything that happenend in the intervening time.
>>
>> Any clues on how to fix? If necessary, I'll provide what info I can to
>> help diagnose the issue if told what to do.
> 
> First step is to enable CONFIG_LL_DEBUG and CONFIG_EARLYPRINTK in the
> defconfig (I should have these enabled by default in omap3_pm_defconfig)
> 
> Then, boot adding 'earlyprintk' to your boot cmdline and post the
> resulting bootlog here.

Here it is. (Forgot to also send to mailing list the first time around)

Peter Tseng

[-- Attachment #2: bootlog --]
[-- Type: text/plain, Size: 4515 bytes --]

reading uImage

2069060 bytes read
Booting from mmc ...
## Booting kernel from Legacy Image at 82000000 ...
   Image Name:   Linux-2.6.34-rc5-10043-g94e884a
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2068996 Bytes =  2 MB
   Load Address: 80008000
   Entry Point:  80008000
   Verifying Checksum ... OK
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Linux version 2.6.34-rc5-10043-g94e884a (leftylink@lefty) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #61 PREEMPT Fri Apr 30 23:00:48 EDT 2010
CPU: ARMv7 Processor [411fc083] revision 3 (ARMv7), cr=10c53c7f
CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
Machine: Gumstix Overo
bootconsole [earlycon0] enabled
Memory policy: ECC disabled, Data cache writeback
OMAP3430/3530 ES3.1 (l2cache iva sgx neon isp )
SRAM: Mapped pa 0x40200000 to va 0xfe400000 size: 0x100000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
Kernel command line: console=ttyS2,115200n8 vram=12M omapfb.mode=dvi:1024x768MR-16@60 omapfb.debug=y omapdss.def_disp=dvi root=/dev/mmcblk0p2 rw rootfstype=ext3 rootwait earlyprintk
PID hash table entries: 1024 (order: 0, 4096 bytes)
Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
Memory: 128MB 128MB = 256MB total
Memory: 255540k/255540k available, 6604k reserved, 0K highmem
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)
    vmalloc : 0xd0800000 - 0xf8000000   ( 632 MB)
    lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .init : 0xc0008000 - 0xc0035000   ( 180 kB)
      .text : 0xc0035000 - 0xc03da000   (3732 kB)
      .data : 0xc03da000 - 0xc041cf60   ( 268 kB)
SLUB: Genslabs=9, HWalign=64, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
Hierarchical RCU implementation.
NR_IRQS:402
Clocking rate (Crystal/Core/MPU): 26.0/331/500 MHz
kernel BUG at arch/arm/mach-omap2/resource34xx.c:229!
Unable to handle kernel NULL pointer dereference at virtual address 00000000
pgd = c0004000
[00000000] *pgd=00000000
Internal error: Oops: 805 [#1] PREEMPT
last sysfs file: 
Modules linked in:
CPU: 0    Not tainted  (2.6.34-rc5-10043-g94e884a #61)
PC is at __bug+0x20/0x2c
LR is at vprintk+0x394/0x404
pc : [<c00392ec>]    lr : [<c006442c>]    psr: 400001d3
sp : c03dbf18  ip : c03dbe68  fp : c03dbf24
r10: 0000001f  r9 : 411fc083  r8 : 80027764
r7 : c03de2d4  r6 : 00000000  r5 : c041dfa0  r4 : c03f3424
r3 : 00000000  r2 : c03dbe68  r1 : 800001d3  r0 : 0000003c
Flags: nZcv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
Control: 10c5387f  Table: 80004019  DAC: 00000017
Process swapper (pid: 0, stack limit = 0xc03da2e8)
Stack: (0xc03dbf18 to 0xc03dc000)
bf00:                                                       c03dbf4c c03dbf28
bf20: c004c9fc c00392d8 c005598c c01ce138 c03dbf4c c03f3424 c03fa128 00000000
bf40: c03dbf6c c03dbf50 c0055c7c c004c920 c03f3424 c0031a10 00000034 c002a014
bf60: c03dbf84 c03dbf70 c0055d08 c0055bf4 c03f40b0 c03f40b0 c03dbf94 c03dbf88
bf80: c0016114 c0055cb0 c03dbfac c03dbf98 c000e518 c001610c c041cf80 c002a018
bfa0: c03dbfbc c03dbfb0 c0012858 c000e43c c03dbfcc c03dbfc0 c000b458 c0012834
bfc0: c03dbff4 c03dbfd0 c0008a8c c000b42c c00086d8 00000000 00000000 c002a018
bfe0: 10c53c7d c041d320 00000000 c03dbff8 80008034 c0008934 00000000 00000000
Backtrace: 
[<c00392cc>] (__bug+0x0/0x2c) from [<c004c9fc>] (init_opp+0xe8/0x118)
[<c004c914>] (init_opp+0x0/0x118) from [<c0055c7c>] (resource_register+0x94/0xbc)
 r6:00000000 r5:c03fa128 r4:c03f3424
[<c0055be8>] (resource_register+0x0/0xbc) from [<c0055d08>] (resource_init+0x64/0x84)
 r6:c002a014 r5:00000034 r4:c0031a10 r3:c03f3424
[<c0055ca4>] (resource_init+0x0/0x84) from [<c0016114>] (omap_pm_if_init+0x14/0x20)
 r5:c03f40b0 r4:c03f40b0
[<c0016100>] (omap_pm_if_init+0x0/0x20) from [<c000e518>] (omap2_init_common_hw+0xe8/0x19c)
[<c000e430>] (omap2_init_common_hw+0x0/0x19c) from [<c0012858>] (overo_init_irq+0x30/0x4c)
 r5:c002a018 r4:c041cf80
[<c0012828>] (overo_init_irq+0x0/0x4c) from [<c000b458>] (init_IRQ+0x38/0x48)
[<c000b420>] (init_IRQ+0x0/0x48) from [<c0008a8c>] (start_kernel+0x164/0x2d0)
[<c0008928>] (start_kernel+0x0/0x2d0) from [<80008034>] (0x80008034)
 r5:c041d320 r4:10c53c7d
Code: e1a01000 e59f000c eb0b0474 e3a03000 (e5833000) 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: omap-pm: omap3_pm_defconfig no longer booting on Overo
  2010-05-01  3:12   ` Peter Tseng
@ 2010-05-01 15:32     ` Nishanth Menon
  2010-05-07 22:02       ` Cliff Brake
  0 siblings, 1 reply; 6+ messages in thread
From: Nishanth Menon @ 2010-05-01 15:32 UTC (permalink / raw)
  To: Peter Tseng; +Cc: Kevin Hilman, linux-omap

[-- Attachment #1: Type: text/plain, Size: 1431 bytes --]

On 04/30/2010 10:12 PM, Peter Tseng wrote:
> On 04/30/2010 02:54 PM, Kevin Hilman wrote:
>> Peter Tseng<tsenpet09@gmail.com>  writes:
>>
>>> Since the rc5 tag, omap3_pm_defconfig from the pm branch no longer boots
>>> on the Gumstix Overo.
>>> I am certain that a build back in the rc3 days worked. Unfortunately, I
>>> don't know about rc4, or anything that happenend in the intervening time.
>>>
>>> Any clues on how to fix? If necessary, I'll provide what info I can to
>>> help diagnose the issue if told what to do.
>>
>> First step is to enable CONFIG_LL_DEBUG and CONFIG_EARLYPRINTK in the
>> defconfig (I should have these enabled by default in omap3_pm_defconfig)
>>
>> Then, boot adding 'earlyprintk' to your boot cmdline and post the
>> resulting bootlog here.
>
> Here it is. (Forgot to also send to mailing list the first time around)
>
> Peter Tseng

DISCLAIMER: I dont have a overo, so no idea if this would work.. but 
here you go..

Attached is a diff which probably will help you with the specific 
changes needed for making pm boot on overo. hope it helps..

a.diff is the change you would probably need for the overo file to fix 
it up once for all

the patch file is cleaning up the unnecessary BUG() in resource34xx.c 
which caused the lockup -> elegant fix will potentially need more 
cleaning up.. but lets just leave it at the fact that srf is going to go 
away in a month or so..

Regards,
Nishanth Menon

[-- Attachment #2: a.diff --]
[-- Type: text/x-patch, Size: 1397 bytes --]

diff --git a/arch/arm/mach-omap2/board-overo.c b/arch/arm/mach-omap2/board-overo.c
index 8848c7c..a93ae3d 100644
--- a/arch/arm/mach-omap2/board-overo.c
+++ b/arch/arm/mach-omap2/board-overo.c
@@ -49,6 +49,8 @@
 #include "mux.h"
 #include "sdram-micron-mt46h32m32lf-6.h"
 #include "hsmmc.h"
+#include "pm.h"
+#include "omap3-opp.h"
 
 #define OVERO_GPIO_BT_XGATE	15
 #define OVERO_GPIO_W2W_NRESET	16
@@ -71,6 +73,26 @@
 #include <linux/spi/spi.h>
 #include <linux/spi/ads7846.h>
 
+/*
+ * FIXME: These are not the optimal setup values to be used on overo
+ * Hacked from board-3430sdp.c
+ */
+static struct prm_setup_vc omap3_setuptime_table = {
+	.clksetup = 0xff,
+	.voltsetup_time1 = 0xfff,
+	.voltsetup_time2 = 0xfff,
+	.voltoffset = 0xff,
+	.voltsetup2 = 0xff,
+	.vdd0_on = 0x30,
+	.vdd0_onlp = 0x20,
+	.vdd0_ret = 0x1e,
+	.vdd0_off = 0x00,
+	.vdd1_on = 0x2c,
+	.vdd1_onlp = 0x20,
+	.vdd1_ret = 0x1e,
+	.vdd1_off = 0x00,
+};
+
 static struct omap2_mcspi_device_config ads7846_mcspi_config = {
 	.turbo_mode	= 0,
 	.single_channel	= 1,	/* 0: slave, 1: master */
@@ -384,6 +406,8 @@ static void __init overo_init_irq(void)
 {
 	omap_board_config = overo_config;
 	omap_board_config_size = ARRAY_SIZE(overo_config);
+	omap3_pm_init_opp_table();
+	omap3_pm_init_vc(&omap3_setuptime_table);
 	omap2_init_common_hw(mt46h32m32lf6_sdrc_params,
 			     mt46h32m32lf6_sdrc_params);
 	omap_init_irq();

[-- Attachment #3: 0001-OMAP3-PM-quickly-hack-fix-up-init_opp.patch --]
[-- Type: text/x-patch, Size: 2164 bytes --]

>From 54d5b1b47560fc4d790834c760dc5140d48e25ab Mon Sep 17 00:00:00 2001
From: Nishanth Menon <nm@ti.com>
Date: Sat, 1 May 2010 10:25:25 -0500
Subject: [RFC] [PATCH] OMAP3: PM: quickly hack fix up init_opp

init_opp is seen to crash, in resource34xx.c BUG() causes
a kernel oops when OPP layer is not registered!

Original Report:
http://marc.info/?l=linux-omap&m=127268352116119&w=2

Cc: Peter Tseng <tsenpet09@gmail.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Reported-by: Peter Tseng <tsenpet09@gmail.com>
Signed-off-by: Nishanth Menon <nm@ti.com>

---
Completely untested!! just for a dry-run and srf is going to go off
in a month, so this is more or less a curio..

 arch/arm/mach-omap2/resource34xx.c |   26 ++++++++++++++++++++++++--
 1 files changed, 24 insertions(+), 2 deletions(-)

diff --git a/arch/arm/mach-omap2/resource34xx.c b/arch/arm/mach-omap2/resource34xx.c
index c6cce8b..2297385 100644
--- a/arch/arm/mach-omap2/resource34xx.c
+++ b/arch/arm/mach-omap2/resource34xx.c
@@ -226,14 +226,36 @@ void init_opp(struct shared_resource *resp)
 		dpll1_clk = clk_get(NULL, "dpll1_ck");
 		dpll2_clk = clk_get(NULL, "dpll2_ck");
 		ret = freq_to_opp(&opp_id, OPP_MPU, dpll1_clk->rate);
-		BUG_ON(ret); /* TBD Cleanup handling */
+		if (ret) {
+			pr_err("%s: initializing %s failed! !match for %ld\n",
+				__func__, resp->name, dpll1_clk->rate);
+			if (dpll1_clk)
+				clk_put(dpll1_clk);
+			if (dpll2_clk)
+				clk_put(dpll2_clk);
+			dpll1_clk = NULL;
+			dpll2_clk = NULL;
+			vdd1_resp = NULL;
+			return;
+		}
 		curr_vdd1_opp = opp_id;
 	} else if (strcmp(resp->name, "vdd2_opp") == 0) {
 		vdd2_resp = resp;
 		dpll3_clk = clk_get(NULL, "dpll3_m2_ck");
 		l3_clk = clk_get(NULL, "l3_ick");
 		ret = freq_to_opp(&opp_id, OPP_L3, l3_clk->rate);
-		BUG_ON(ret); /* TBD Cleanup handling */
+		if (ret) {
+			pr_err("%s: initializing %s failed! !match for %ld\n",
+				__func__, resp->name, l3_clk->rate);
+			if (l3_clk)
+				clk_put(l3_clk);
+			if (dpll3_clk)
+				clk_put(dpll3_clk);
+			l3_clk = NULL;
+			dpll3_clk = NULL;
+			vdd1_resp = NULL;
+			return;
+		}
 		curr_vdd2_opp = opp_id;
 	}
 	resp->curr_level = opp_id;
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: omap-pm: omap3_pm_defconfig no longer booting on Overo
  2010-05-01 15:32     ` Nishanth Menon
@ 2010-05-07 22:02       ` Cliff Brake
  2010-05-10 16:02         ` Kevin Hilman
  0 siblings, 1 reply; 6+ messages in thread
From: Cliff Brake @ 2010-05-07 22:02 UTC (permalink / raw)
  To: Nishanth Menon; +Cc: Peter Tseng, Kevin Hilman, linux-omap

On Sat, May 1, 2010 at 11:32 AM, Nishanth Menon
<menon.nishanth@gmail.com> wrote:
> DISCLAIMER: I dont have a overo, so no idea if this would work.. but here
> you go..
>
> Attached is a diff which probably will help you with the specific changes
> needed for making pm boot on overo. hope it helps..
>
> a.diff is the change you would probably need for the overo file to fix it up
> once for all
>
> the patch file is cleaning up the unnecessary BUG() in resource34xx.c which
> caused the lockup -> elegant fix will potentially need more cleaning up..
> but lets just leave it at the fact that srf is going to go away in a month
> or so..

Nishanth,

These patches get my overo booting with the PM branch -- can they be
pushed to the pm branch?

Thanks,
Cliff

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: omap-pm: omap3_pm_defconfig no longer booting on Overo
  2010-05-07 22:02       ` Cliff Brake
@ 2010-05-10 16:02         ` Kevin Hilman
  0 siblings, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2010-05-10 16:02 UTC (permalink / raw)
  To: Cliff Brake; +Cc: Nishanth Menon, Peter Tseng, linux-omap

Cliff Brake <cliff.brake@gmail.com> writes:

> On Sat, May 1, 2010 at 11:32 AM, Nishanth Menon
> <menon.nishanth@gmail.com> wrote:
>> DISCLAIMER: I dont have a overo, so no idea if this would work.. but here
>> you go..
>>
>> Attached is a diff which probably will help you with the specific changes
>> needed for making pm boot on overo. hope it helps..
>>
>> a.diff is the change you would probably need for the overo file to fix it up
>> once for all
>>
>> the patch file is cleaning up the unnecessary BUG() in resource34xx.c which
>> caused the lockup -> elegant fix will potentially need more cleaning up..
>> but lets just leave it at the fact that srf is going to go away in a month
>> or so..
>
> Nishanth,
>
> These patches get my overo booting with the PM branch -- can they be
> pushed to the pm branch?
>

Hi Cliff,

The SRF fixup patches are already pushed to the PM branch.  This will
at least allow a non-crashing boot on Overo.  If you want to enable
DVFS on Overo, someone will have to test and validate Nishanth's other
change on Overo and (re)submit with proper changelog etc.

Thanks,

Kevin




^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-10 16:02 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-29  7:24 omap-pm: omap3_pm_defconfig no longer booting on Overo Peter Tseng
2010-04-30 18:54 ` Kevin Hilman
2010-05-01  3:12   ` Peter Tseng
2010-05-01 15:32     ` Nishanth Menon
2010-05-07 22:02       ` Cliff Brake
2010-05-10 16:02         ` Kevin Hilman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).