Skip to contentSkip to conversation

ARM: OMAP: Make OMAP1 work again

PATCH In review Dirk Behme 3 participants 7 messages Oct 6, 2006

Subsystems (4)
lore
Share & tools
lore

Dirk Behme

author
#0 lore raw

PATCH 1/1 ARM: OMAP: Make OMAP1 work again

In mach-omap1/mailbox.c the mailbox name is .name = "DSP" while in plat-omap/dsp/dsp_core.c function dsp_mbox_init() asks for "dsp". This results in a strcmp() mismatch and then OMAP1 system crashes due to NULL pointer. OMAP2 is correct, there .name is "dsp". Correct OMAP1 name to "dsp" as well.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>
arch/arm/mach-omap1/mailbox.c renamed from arch/arm/mach-omap1/mailbox.c_orig +1 -1
@@ -136,7 +136,7 @@ static struct omap_mbox1_priv omap1_mbox
 };
 
 struct omap_mbox mbox_dsp_info = {
-	.name = "DSP",
+	.name = "dsp",
 	.ops  = &omap1_mbox_ops,
 	.priv = &omap1_mbox_dsp_priv,
 };
#1 lore raw

Bug? - OSK Frame Buffer Support in Kernel 2.6.18-omap1

Hello,

When trying to build the 2.6.18-omap1 kernel with the frame buffer support option for the OSK selected, the build fails while trying to compile ".../drivers/video/omap/omapfb_main.c" with numerous errors.

I selected frame buffer support as shown at the "OSK for Dummies" web site (albeit without the "OMAP internal LCD controller support" option checked as it apparently no longer exists)...

http://oskfordummies.hp.infoseek.co.jp/howto/lcd.html

Has anyone successfully built the 2.6.18-omap1 kernel with frame buffer support? Is my problem a known bug? Any help is appreciated.

I am going to try to revert to a 2.6.14-omap1 kernel, but there are no guarantees that the old build will resolve my problem.

Thanks, in advance.
______________________________________________
Scott R. Sideleau
ECE '07, Worcester Polytechnic Institute
@ MQP Ireland A'06, University of Limerick
+353 61-307310 / [email protected]

author
#2 lore raw

Re: Bug? - OSK Frame Buffer Support in Kernel 2.6.18-omap1

Quoted 4 lines · Scott R

When trying to build the 2.6.18-omap1 kernel with the frame buffer support option for the OSK selected, the build fails while trying to compile ".../drivers/video/omap/omapfb_main.c" with numerous errors.

Quoted 8 lines

I selected frame buffer support as shown at the "OSK for Dummies" web site (albeit without the "OMAP internal LCD controller support" option checked as it apparently no longer exists)...

http://oskfordummies.hp.infoseek.co.jp/howto/lcd.html

Has anyone successfully built the 2.6.18-omap1 kernel with frame buffer support?

With patch I sent some minutes ago most recent git works for me on OSK with frame buffer and Mistral LCD.

Do you use recent git? What are your errors?

I use

CONFIG_OMAP_OSK_MISTRAL=y
CONFIG_VIDEO_V4L2=y
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_OMAP=y
CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2
CONFIG_FB_OMAP_DMA_TUNE=y

Cheers

Dirk

reviewer
#6 lore raw
In reply to Dirk Behme
Quoted 15 lines · Dirk Behme

In mach-omap1/mailbox.c the mailbox name is .name = "DSP" while in plat-omap/dsp/dsp_core.c function dsp_mbox_init() asks for "dsp". This results in a strcmp() mismatch and then OMAP1 system crashes due to NULL pointer. OMAP2 is correct, there .name is "dsp". Correct OMAP1 name to "dsp" as well.

Signed-off-by Dirk Behme <dirk.behme_at_gmail.com>

arch/arm/mach-omap1/mailbox.c static struct omap_mbox1_priv omap1_mbox · line 142

Quoted 8 lines
arch/arm/mach-omap1/mailbox.c renamed from arch/arm/mach-omap1/mailbox.c_orig +1 -1
@@ -136,7 +136,7 @@ static struct omap_mbox1_priv omap1_mbox
 };
 
 struct omap_mbox mbox_dsp_info = {
-	.name = "DSP",
+	.name = "dsp",
 	.ops  = &omap1_mbox_ops,
 	.priv = &omap1_mbox_dsp_priv,
 };

Great, I pushed it.

Regards,

Tony

#3 lore raw

RE: Bug? - OSK Frame Buffer Support in Kernel 2.6.18-omap1

In reply to Dirk Behme

Hello,

Thanks for the reply, Dirk.

Quoted 4 lines

With patch I sent some minutes ago most recent git works for me on OSK with frame buffer and Mistral LCD.

Do you use recent git? What are your errors?

I was quite certain I was not using the latest Git, so I've spent most of the day updating everything. I grabbed the latest 2.6.18-omap1 kernel from the repository (and put it in a completely new place) via:

git-clone git://source.mvista.com/git/linux-omap-2.6.git

I'm quite certain I have the absolute latest git right now. I then chose the proper frame buffer support via 'make menuconfig' that I then compared against your list. From your list, the following lines match in my .config file:

CONFIG_VIDEO_V4L2=y
CONFIG_FB=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_OMAP=y
CONFIG_FB_OMAP_CONSISTENT_DMA_SIZE=2

The following lines simply do not exist in my .config file (even commented out, as they should appear if I didn't select them):

CONFIG_OMAP_OSK_MISTRAL=y
CONFIG_FB_OMAP_DMA_TUNE=y

I just attempted another compile and it failed at the same point in 'omapfb_main.c'. Here's an excerpt of the errors dumped to my terminal:

=====
drivers/video/omap/omapfb_main.c:1558: error: request for member $(B!F(Bfb_info$(B!G(B in something not a structure or union drivers/video/omap/omapfb_main.c:1558: warning: passing argument 1 of $(B!F(Bomapfb_blank$(B!G(B makes integer from pointer without a cast drivers/video/omap/omapfb_main.c:1558: warning: passing argument 2 of $(B!F(Bomapfb_blank$(B!G(B makes pointer from integer without a cast drivers/video/omap/omapfb_main.c: In function $(B!F(Bomapfb_setup$(B!G(B:
drivers/video/omap/omapfb_main.c:1609: error: assignment of read-only location
drivers/video/omap/omapfb_main.c: In function $(B!F(Bomapfb_init$(B!G(B:
drivers/video/omap/omapfb_main.c:1638: warning: implicit declaration of function $(B!F(Bfb_get_options$(B!G(B drivers/video/omap/omapfb_main.c: At top level:
drivers/video/omap/omapfb_main.c:1657: error: invalid operands to binary / drivers/video/omap/omapfb_main.c:1657: error: initializer element is not constant
drivers/video/omap/omapfb_main.c:1657: error: (near initialization for $(B!F(B__param_arr_vram.max$(B!G(B) drivers/video/omap/omapfb_main.c:1657: error: initializer element is not constant
drivers/video/omap/omapfb_main.c:1657: error: (near initialization for $(B!F(B__param_arr_vram.elem$(B!G(B)
make[3]: *** [drivers/video/omap/omapfb_main.o] Error 1
make[2]: *** [drivers/video/omap] Error 2
make[1]: *** [drivers/video] Error 2
make: *** [drivers] Error 2
=====

Any help would be appreciated. Thanks, in advance.
______________________________________________
Scott R. Sideleau
ECE '07, Worcester Polytechnic Institute
@ MQP Ireland A'06, University of Limerick +353 61-307310 / [email protected]

#4 lore raw

RE: Can't Boot - OSK Frame Buffer Support in Kernel 2.6.18-omap1

Hello,

I was finally able to get a successful compile of the 2.6.18-omap1 kernel with the help of Dirk Behme's config file (thanks again, Dirk). Now, though, the OSK is unable to boot the new kernel, but instead just hangs. From my console (as it has been running for the last half-hour)...

=====
U-Boot 1.1.4 (Aug 29 2006 - 17:05:48)

CPU:   OMAP162123 at 96.0 MHz (DPLL1=96.0 MHz)
Board: OSK5912
DRAM:  32 MB
Flash: 32 MB
In:    serial
Out:   serial
Err:   serial
Hit any key to stop autoboot:  0
## Booting image at 00100000 ...
   Image Name:   OE
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    1065210 Bytes =  1 MB

Load Address: 10c08000
Entry Point: 10c08000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

Starting kernel ...
=====

This kernel build includes the two pushes earlier today by Tony Lindgren.

Any ideas? Any and all help/direction is appreciated.
______________________________________________
Scott R. Sideleau
ECE '07, Worcester Polytechnic Institute
@ MQP Ireland A'06, University of Limerick +353 61-307310 / [email protected]

author
#5 lore raw

Re: Can't Boot - OSK Frame Buffer Support in Kernel 2.6.18-omap1

Quoted 8 lines · Scott R

## Booting image at 00100000 ...

   Image Name:   OE
   Image Type:   ARM Linux Kernel Image (gzip compressed)
   Data Size:    1065210 Bytes =  1 MB

Load Address: 10c08000
Entry Point: 10c08000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK

I wonder about the adresses used here. Do you followed

http://oskfordummies.hp.infoseek.co.jp/howto/flash_kernel.html

?

I would assume kernel at 0x40000 and start address/entry point at 0x10008000. E.g.:

## Checking image at 00040000 ...

     Image Name:   Linux-2.6.11-omap1
     Image Type:   ARM Linux Kernel Image (umcompressed)
     Data Size:    1159328 Bytes = 1.1 MB
     Load Address: 10008000
     Entry Point:  10008000
     Veryfying Checksum ... OK
Quoted 1 line

Any ideas? Any and all help/direction is appreciated.

For debugging, enable

Kernel hacking -> Kernel debugging -> Kernel low-level debugging functions

(and temporarily apply patch in attachment, seems to be necessary to work low level debugging properly).

Dirk

arch/arm/plat-omap/clock.c renamed from arch/arm/plat-omap/clock.c_orig +1 -1
@@ -135,7 +135,7 @@ void clk_disable(struct clk *clk)
 		return;
 
 	spin_lock_irqsave(&clockfw_lock, flags);
-	BUG_ON(clk->usecount == 0);
+	//BUG_ON(clk->usecount == 0);
 	if (arch_clock->clk_disable)
 		arch_clock->clk_disable(clk);
 	spin_unlock_irqrestore(&clockfw_lock, flags);
arch/arm/mach-omap1/clock.c renamed from arch/arm/mach-omap1/clock.c_orig +1 -1
@@ -651,7 +651,7 @@ int __init omap1_clk_init(void)
 
 	/* USB_REQ_EN will be disabled later if necessary (usb_dc_ck) */
 	reg = omap_readw(SOFT_REQ_REG) & (1 << 4);
-	omap_writew(reg, SOFT_REQ_REG);
+	//omap_writew(reg, SOFT_REQ_REG);
 	if (!cpu_is_omap15xx())
 		omap_writew(0, SOFT_REQ_REG2);