[PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces

2008-04-24 Thread Koen Kooi

From 101e01552974e9ce7b4bf26aa5e4a203130b6dfd Mon Sep 17 00:00:00 2001
From: Koen Kooi <[EMAIL PROTECTED]>
Date: Thu, 24 Apr 2008 12:28:53 +0200
Subject: [PATCH] omap3beagle: register USB interfaces

Signed-off-by: Koen Kooi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile  |3 ++-
 arch/arm/mach-omap2/board-omap3beagle.c   |1 +
 include/asm-arm/arch-omap/board-omap3beagle.h |1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index c37df1a..10607cf 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)   += 
board-3430sdp.o \
   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
-  board-sdp-hsmmc.o
+  board-sdp-hsmmc.o \
+  board-3430sdp-usb.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
   board-apollon-mmc.o  \
   board-apollon-keys.o
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach- 
omap2/board-omap3beagle.c

index c03bb26..3e14b6b 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -66,6 +66,7 @@ static void __init omap3_beagle_init(void)
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init();
sdp_mmc_init();
+   sdp3430_usb_init();
 }

 arch_initcall(omap3_beagle_i2c_init);
diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/ 
asm-arm/arch-omap/board-omap3beagle.h

index 782e2e5..5f78621 100644
--- a/include/asm-arm/arch-omap/board-omap3beagle.h
+++ b/include/asm-arm/arch-omap/board-omap3beagle.h
@@ -30,6 +30,7 @@
 #define __ASM_ARCH_OMAP3_BEAGLE_H

 extern void sdp_mmc_init(void);
+extern void sdp3430_usb_init(void);

 #define TWL4030_IRQNUM INT_34XX_SYS_NIRQ

--
1.5.4.3


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


RE: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces

2008-04-24 Thread Syed Mohammed, Khasim
Hi Koen,

> -Original Message-
> From: Koen Kooi [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 24, 2008 4:20 PM
> To: linux-omap@vger.kernel.org
> Cc: Syed Mohammed, Khasim
> Subject: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces
> 
>  From 101e01552974e9ce7b4bf26aa5e4a203130b6dfd Mon Sep 17 00:00:00 2001
> From: Koen Kooi <[EMAIL PROTECTED]>
> Date: Thu, 24 Apr 2008 12:28:53 +0200
> Subject: [PATCH] omap3beagle: register USB interfaces
> 
> Signed-off-by: Koen Kooi <[EMAIL PROTECTED]>
> ---
>   arch/arm/mach-omap2/Makefile  |3 ++-
>   arch/arm/mach-omap2/board-omap3beagle.c   |1 +
>   include/asm-arm/arch-omap/board-omap3beagle.h |1 +
>   3 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index c37df1a..10607cf 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += board-
> 3430sdp.o \
>  board-3430sdp-flash.o
>   obj-$(CONFIG_MACH_OMAP3EVM) += board-omap3evm.o
>   obj-$(CONFIG_MACH_OMAP3_BEAGLE) += board-omap3beagle.o \
> -board-sdp-hsmmc.o
> +board-sdp-hsmmc.o \
> +board-3430sdp-usb.o
>   obj-$(CONFIG_MACH_OMAP_APOLLON) += board-apollon.o \
>  board-apollon-mmc.o  \
>  board-apollon-keys.o
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
> omap2/board-omap3beagle.c
> index c03bb26..3e14b6b 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -66,6 +66,7 @@ static void __init omap3_beagle_init(void)
>   omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
>   omap_serial_init();
>   sdp_mmc_init();
> + sdp3430_usb_init();
>   }
> 
>   arch_initcall(omap3_beagle_i2c_init);
> diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/
> asm-arm/arch-omap/board-omap3beagle.h
> index 782e2e5..5f78621 100644
> --- a/include/asm-arm/arch-omap/board-omap3beagle.h
> +++ b/include/asm-arm/arch-omap/board-omap3beagle.h
> @@ -30,6 +30,7 @@
>   #define __ASM_ARCH_OMAP3_BEAGLE_H
> 
>   extern void sdp_mmc_init(void);
> +extern void sdp3430_usb_init(void);
> 

I think we are neglecting David B's comments, 

As suggested by David, we have to rename sdp3430 to  some thing common and move 
these definitions out of the board dependent files -or rename these specific to 
beagle something like omap3beagle_usb_init().

Same thing is applicable to mmc and other common interfaces.

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


Re: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces

2008-04-24 Thread Koen Kooi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Op 24 apr 2008, om 13:02 heeft Syed Mohammed, Khasim het volgende  
geschreven:

Hi Koen,


-Original Message-
From: Koen Kooi [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 24, 2008 4:20 PM
To: linux-omap@vger.kernel.org
Cc: Syed Mohammed, Khasim
Subject: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces

From 101e01552974e9ce7b4bf26aa5e4a203130b6dfd Mon Sep 17 00:00:00  
2001

From: Koen Kooi <[EMAIL PROTECTED]>
Date: Thu, 24 Apr 2008 12:28:53 +0200
Subject: [PATCH] omap3beagle: register USB interfaces

Signed-off-by: Koen Kooi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile  |3 ++-
 arch/arm/mach-omap2/board-omap3beagle.c   |1 +
 include/asm-arm/arch-omap/board-omap3beagle.h |1 +
 3 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/ 
Makefile

index c37df1a..10607cf 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)   += board-
3430sdp.o \
   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
-  board-sdp-hsmmc.o
+  board-sdp-hsmmc.o \
+  board-3430sdp-usb.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
   board-apollon-mmc.o  \
   board-apollon-keys.o
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
omap2/board-omap3beagle.c
index c03bb26..3e14b6b 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -66,6 +66,7 @@ static void __init omap3_beagle_init(void)
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init();
sdp_mmc_init();
+   sdp3430_usb_init();
 }

 arch_initcall(omap3_beagle_i2c_init);
diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/
asm-arm/arch-omap/board-omap3beagle.h
index 782e2e5..5f78621 100644
--- a/include/asm-arm/arch-omap/board-omap3beagle.h
+++ b/include/asm-arm/arch-omap/board-omap3beagle.h
@@ -30,6 +30,7 @@
 #define __ASM_ARCH_OMAP3_BEAGLE_H

 extern void sdp_mmc_init(void);
+extern void sdp3430_usb_init(void);



I think we are neglecting David B's comments,

As suggested by David, we have to rename sdp3430 to  some thing common


Right, but I'm not qualified enough to do that and frankly lack the  
time and inclination to move such an invasive patch through review,  
sorry.


regards,

Koen


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFIEHlAMkyGM64RGpERAlBrAKC9GnxL3qEpeq+Xw8jfp/tOp14kigCgqMDd
VZugiC3WW9x9m47V//5s91E=
=QrOH
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces

2008-04-24 Thread Felipe Balbi


On Thu, 24 Apr 2008 16:32:39 +0530, "Syed Mohammed, Khasim" <[EMAIL PROTECTED]>
wrote:
> Hi Koen,
> 
>> -Original Message-
>> From: Koen Kooi [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, April 24, 2008 4:20 PM
>> To: linux-omap@vger.kernel.org
>> Cc: Syed Mohammed, Khasim
>> Subject: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces
>>
>>  From 101e01552974e9ce7b4bf26aa5e4a203130b6dfd Mon Sep 17 00:00:00 2001
>> From: Koen Kooi <[EMAIL PROTECTED]>
>> Date: Thu, 24 Apr 2008 12:28:53 +0200
>> Subject: [PATCH] omap3beagle: register USB interfaces
>>
>> Signed-off-by: Koen Kooi <[EMAIL PROTECTED]>
>> ---
>>   arch/arm/mach-omap2/Makefile  |3 ++-
>>   arch/arm/mach-omap2/board-omap3beagle.c   |1 +
>>   include/asm-arm/arch-omap/board-omap3beagle.h |1 +
>>   3 files changed, 4 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
>> index c37df1a..10607cf 100644
>> --- a/arch/arm/mach-omap2/Makefile
>> +++ b/arch/arm/mach-omap2/Makefile
>> @@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-
>> 3430sdp.o \
>> board-3430sdp-flash.o
>>   obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
>>   obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
>> -   board-sdp-hsmmc.o
>> +   board-sdp-hsmmc.o \
>> +   board-3430sdp-usb.o
>>   obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
>> board-apollon-mmc.o  \
>> board-apollon-keys.o
>> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
>> omap2/board-omap3beagle.c
>> index c03bb26..3e14b6b 100644
>> --- a/arch/arm/mach-omap2/board-omap3beagle.c
>> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
>> @@ -66,6 +66,7 @@ static void __init omap3_beagle_init(void)
>>  omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
>>  omap_serial_init();
>>  sdp_mmc_init();
>> +sdp3430_usb_init();
>>   }
>>
>>   arch_initcall(omap3_beagle_i2c_init);
>> diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/
>> asm-arm/arch-omap/board-omap3beagle.h
>> index 782e2e5..5f78621 100644
>> --- a/include/asm-arm/arch-omap/board-omap3beagle.h
>> +++ b/include/asm-arm/arch-omap/board-omap3beagle.h
>> @@ -30,6 +30,7 @@
>>   #define __ASM_ARCH_OMAP3_BEAGLE_H
>>
>>   extern void sdp_mmc_init(void);
>> +extern void sdp3430_usb_init(void);
>>
> 
> I think we are neglecting David B's comments,
> 
> As suggested by David, we have to rename sdp3430 to  some thing common
and
> move these definitions out of the board dependent files -or rename these
> specific to beagle something like omap3beagle_usb_init().
> 
> Same thing is applicable to mmc and other common interfaces.

That's true, maybe something like the attached (DRAFT), would be enough.

ps: only compile test, kernel probably won't boot with such changes, still
gotta work on it.

-- 
Best Regards,

Felipe Balbi
http://felipebalbi.com
[EMAIL PROTECTED]From 24217e0ea68fbe531ecf3e1a9ee2a0bc343d24dc Mon Sep 17 00:00:00 2001
From: Felipe Balbi <[EMAIL PROTECTED]>
Date: Thu, 24 Apr 2008 15:27:54 +0300
Subject: [PATCH] USB: Generalize usb initialization for omap hw

*** DRAFT UNTESTED ***

Create a generic board-file for initializing usb
on omap2430 and omap3 boards.

Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile   |4 +-
 arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
 arch/arm/mach-omap2/board-2430sdp.c|3 +-
 arch/arm/mach-omap2/board-3430sdp.c|3 +-
 .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
 include/asm-arm/arch-omap/cpu.h|3 +-
 include/asm-arm/arch-omap/usb-musb.h   |   35 +++
 7 files changed, 63 insertions(+), 113 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
 rename arch/arm/mach-omap2/{board-3430sdp-usb.c => usb-musb.c} (91%)
 create mode 100644 include/asm-arm/arch-omap/usb-musb.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index c37df1a..d95f8e9 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -29,11 +29,11 @@ obj-$(CONFIG_MACH_OMAP_H4)		+= board-h4.o board-h4-mmc.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)		+= board-2430sdp.o \
 	   board-2430sdp-flash.o \
 	   board-sdp-hsmmc.o \
-	   board-2430sdp-usb.o
+	   usb-musb.o
 obj-$(CONFIG_MACH_OMAP_2430OSK)		+= board-2430osk.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)		+= board-3430sdp.o \
 	   board-sdp-hsmmc.o \
-	   board-3430sdp-usb.o \
+	   usb-musb.o \
 	   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)		+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)		+= b

RE: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces

2008-04-24 Thread Syed Mohammed, Khasim


> -Original Message-
> From: Koen Kooi [mailto:[EMAIL PROTECTED]
> Sent: Thursday, April 24, 2008 5:43 PM
> To: Syed Mohammed, Khasim
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> 
> Op 24 apr 2008, om 13:02 heeft Syed Mohammed, Khasim het volgende
> geschreven:
> > Hi Koen,
> >
> >> -Original Message-
> >> From: Koen Kooi [mailto:[EMAIL PROTECTED]
> >> Sent: Thursday, April 24, 2008 4:20 PM
> >> To: linux-omap@vger.kernel.org
> >> Cc: Syed Mohammed, Khasim
> >> Subject: [PATCH 1/1] ARM: OMAP: omap3beagle: register USB interfaces
> >>
> >> From 101e01552974e9ce7b4bf26aa5e4a203130b6dfd Mon Sep 17 00:00:00
> >> 2001
> >> From: Koen Kooi <[EMAIL PROTECTED]>
> >> Date: Thu, 24 Apr 2008 12:28:53 +0200
> >> Subject: [PATCH] omap3beagle: register USB interfaces
> >>
> >> Signed-off-by: Koen Kooi <[EMAIL PROTECTED]>
> >> ---
> >>  arch/arm/mach-omap2/Makefile  |3 ++-
> >>  arch/arm/mach-omap2/board-omap3beagle.c   |1 +
> >>  include/asm-arm/arch-omap/board-omap3beagle.h |1 +
> >>  3 files changed, 4 insertions(+), 1 deletions(-)
> >>
> >> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/
> >> Makefile
> >> index c37df1a..10607cf 100644
> >> --- a/arch/arm/mach-omap2/Makefile
> >> +++ b/arch/arm/mach-omap2/Makefile
> >> @@ -37,7 +37,8 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)  += board-
> >> 3430sdp.o \
> >>   board-3430sdp-flash.o
> >>  obj-$(CONFIG_MACH_OMAP3EVM)   += board-omap3evm.o
> >>  obj-$(CONFIG_MACH_OMAP3_BEAGLE)   += board-omap3beagle.o \
> >> - board-sdp-hsmmc.o
> >> + board-sdp-hsmmc.o \
> >> + board-3430sdp-usb.o
> >>  obj-$(CONFIG_MACH_OMAP_APOLLON)   += board-apollon.o \
> >>   board-apollon-mmc.o  \
> >>   board-apollon-keys.o
> >> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-
> >> omap2/board-omap3beagle.c
> >> index c03bb26..3e14b6b 100644
> >> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> >> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> >> @@ -66,6 +66,7 @@ static void __init omap3_beagle_init(void)
> >>omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
> >>omap_serial_init();
> >>sdp_mmc_init();
> >> +  sdp3430_usb_init();
> >>  }
> >>
> >>  arch_initcall(omap3_beagle_i2c_init);
> >> diff --git a/include/asm-arm/arch-omap/board-omap3beagle.h b/include/
> >> asm-arm/arch-omap/board-omap3beagle.h
> >> index 782e2e5..5f78621 100644
> >> --- a/include/asm-arm/arch-omap/board-omap3beagle.h
> >> +++ b/include/asm-arm/arch-omap/board-omap3beagle.h
> >> @@ -30,6 +30,7 @@
> >>  #define __ASM_ARCH_OMAP3_BEAGLE_H
> >>
> >>  extern void sdp_mmc_init(void);
> >> +extern void sdp3430_usb_init(void);
> >>
> >
> > I think we are neglecting David B's comments,
> >
> > As suggested by David, we have to rename sdp3430 to  some thing common
> 
> Right, but I'm not qualified enough to do that and frankly lack the
> time and inclination to move such an invasive patch through review,
> sorry.
> 

SORRY about that :) - you are doing a good job, just trying to make it look 
better.

It shouldn't be that hard, just replace sdp3430_usb_init with omap3_usb_init.

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


[PATCH 1/2] OMAP: Introduce cpu_class_is_omap3()

2008-04-24 Thread Felipe Balbi
Add cpu_class_is_omap3().

Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
---
 arch/arm/plat-omap/common.c |2 +-
 arch/arm/plat-omap/dma.c|   58 +++---
 arch/arm/plat-omap/dmtimer.c|   10 +++---
 arch/arm/plat-omap/gpio.c   |   14 +-
 arch/arm/plat-omap/sram.c   |4 +-
 arch/arm/plat-omap/usb.c|2 +-
 include/asm-arm/arch-omap/cpu.h |3 +-
 7 files changed, 47 insertions(+), 46 deletions(-)

diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
index fd6f329..d4dfe4c 100644
--- a/arch/arm/plat-omap/common.c
+++ b/arch/arm/plat-omap/common.c
@@ -240,7 +240,7 @@ static int __init omap_init_clocksource_32k(void)
static char err[] __initdata = KERN_ERR
"%s: can't register clocksource!\n";
 
-   if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
+   if (cpu_is_omap16xx() || cpu_class_is_omap2() || cpu_class_is_omap3()) {
struct clk *sync_32k_ick;
 
sync_32k_ick = clk_get(NULL, "omap_32ksync_ick");
diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
index c00eda5..c16ea64 100644
--- a/arch/arm/plat-omap/dma.c
+++ b/arch/arm/plat-omap/dma.c
@@ -211,7 +211,7 @@ void omap_set_dma_priority(int lch, int dst_port, int 
priority)
omap_writel(l, reg);
}
 
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
if (priority)
OMAP_DMA_CCR_REG(lch) |= (1 << 6);
else
@@ -236,7 +236,7 @@ void omap_set_dma_transfer_params(int lch, int data_type, 
int elem_count,
OMAP1_DMA_CCR2_REG(lch) |= 1 << 2;
}
 
-   if (cpu_class_is_omap2() && dma_trigger) {
+   if ((cpu_class_is_omap2() || cpu_class_is_omap3()) && dma_trigger) {
u32 val = OMAP_DMA_CCR_REG(lch);
 
val &= ~(3 << 19);
@@ -276,7 +276,7 @@ void omap_set_dma_color_mode(int lch, enum 
omap_dma_color_mode mode, u32 color)
 
BUG_ON(omap_dma_in_1510_mode());
 
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
REVISIT_24XX();
return;
}
@@ -308,7 +308,7 @@ void omap_set_dma_color_mode(int lch, enum 
omap_dma_color_mode mode, u32 color)
 
 void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode)
 {
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
OMAP_DMA_CSDP_REG(lch) &= ~(0x3 << 16);
OMAP_DMA_CSDP_REG(lch) |= (mode << 16);
}
@@ -332,7 +332,7 @@ void omap_set_dma_src_params(int lch, int src_port, int 
src_amode,
OMAP1_DMA_CSSA_L_REG(lch) = src_start;
}
 
-   if (cpu_class_is_omap2())
+   if (cpu_class_is_omap2() || cpu_class_is_omap3())
OMAP2_DMA_CSSA_REG(lch) = src_start;
 
OMAP_DMA_CSEI_REG(lch) = src_ei;
@@ -359,7 +359,7 @@ void omap_set_dma_params(int lch, struct 
omap_dma_channel_params * params)
 
 void omap_set_dma_src_index(int lch, int eidx, int fidx)
 {
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
REVISIT_24XX();
return;
}
@@ -383,13 +383,13 @@ void omap_set_dma_src_burst_mode(int lch, enum 
omap_dma_burst_mode burst_mode)
case OMAP_DMA_DATA_BURST_DIS:
break;
case OMAP_DMA_DATA_BURST_4:
-   if (cpu_class_is_omap2())
+   if (cpu_class_is_omap2() || cpu_class_is_omap3())
burst = 0x1;
else
burst = 0x2;
break;
case OMAP_DMA_DATA_BURST_8:
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
burst = 0x2;
break;
}
@@ -398,7 +398,7 @@ void omap_set_dma_src_burst_mode(int lch, enum 
omap_dma_burst_mode burst_mode)
 * fall through
 */
case OMAP_DMA_DATA_BURST_16:
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
burst = 0x3;
break;
}
@@ -429,7 +429,7 @@ void omap_set_dma_dest_params(int lch, int dest_port, int 
dest_amode,
OMAP1_DMA_CDSA_L_REG(lch) = dest_start;
}
 
-   if (cpu_class_is_omap2())
+   if (cpu_class_is_omap2() || cpu_class_is_omap3())
OMAP2_DMA_CDSA_REG(lch) = dest_start;
 
OMAP_DMA_CDEI_REG(lch) = dst_ei;
@@ -438,7 +438,7 @@ void omap_set_dma_dest_params(int lch, int dest_port, int 
dest_amode,
 
 void omap_set_dma_dest_index(int lch, int eidx, int fidx)
 {
-   if (cpu_class_is_omap2()) {
+   if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
REVISIT_24XX();

[RFC][PATCH 0/2] musb init generalization

2008-04-24 Thread Felipe Balbi
The following two patches allow us to use a common
board file for usb initialization on omap2430 and omap3
boards.

First we introduce cpu_class_is_omap3() and use it to change
resource offsets.

It's should be ok adding cpu_class_is_omap3() now since soon we
already have omap35xx chips and sooner or later we're gonna
have patches for it in linux-omap (??)

Both patches are RFC but they're working on omap3430sdp.

Maybe someone could try on omap2430.

Comments are always welcome.

Felipe Balbi (2):
  OMAP: Introduce cpu_class_is_omap3()
  USB: Generalize usb initialization for omap hw

 arch/arm/mach-omap2/Makefile   |4 +-
 arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
 arch/arm/mach-omap2/board-2430sdp.c|3 +-
 arch/arm/mach-omap2/board-3430sdp.c|3 +-
 .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
 arch/arm/plat-omap/common.c|2 +-
 arch/arm/plat-omap/dma.c   |   58 ++--
 arch/arm/plat-omap/dmtimer.c   |   10 +-
 arch/arm/plat-omap/gpio.c  |   14 ++--
 arch/arm/plat-omap/sram.c  |4 +-
 arch/arm/plat-omap/usb.c   |2 +-
 include/asm-arm/arch-omap/cpu.h|3 +-
 include/asm-arm/arch-omap/usb-musb.h   |   35 +++
 13 files changed, 108 insertions(+), 158 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
 rename arch/arm/mach-omap2/{board-3430sdp-usb.c => usb-musb.c} (91%)
 create mode 100644 include/asm-arm/arch-omap/usb-musb.h

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


[PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Felipe Balbi
Create a generic board-file for initializing usb
on omap2430 and omap3 boards.

Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile   |4 +-
 arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
 arch/arm/mach-omap2/board-2430sdp.c|3 +-
 arch/arm/mach-omap2/board-3430sdp.c|3 +-
 .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
 include/asm-arm/arch-omap/usb-musb.h   |   35 +++
 6 files changed, 61 insertions(+), 112 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
 rename arch/arm/mach-omap2/{board-3430sdp-usb.c => usb-musb.c} (91%)
 create mode 100644 include/asm-arm/arch-omap/usb-musb.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index c37df1a..d95f8e9 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -29,11 +29,11 @@ obj-$(CONFIG_MACH_OMAP_H4)  += board-h4.o 
board-h4-mmc.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)+= board-2430sdp.o \
   board-2430sdp-flash.o \
   board-sdp-hsmmc.o \
-  board-2430sdp-usb.o
+  usb-musb.o
 obj-$(CONFIG_MACH_OMAP_2430OSK)+= board-2430osk.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-3430sdp.o \
   board-sdp-hsmmc.o \
-  board-3430sdp-usb.o \
+  usb-musb.o \
   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
diff --git a/arch/arm/mach-omap2/board-2430sdp-usb.c 
b/arch/arm/mach-omap2/board-2430sdp-usb.c
deleted file mode 100644
index cfbf73e..000
--- a/arch/arm/mach-omap2/board-2430sdp-usb.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/board-2430sdp-usb.c
- *
- * Copyright (C) 2007 MontaVista Software, Inc. <[EMAIL PROTECTED]>
- * Author: Kevin Hilman
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-
-static struct resource musb_resources[] = {
-   [0] = {
-   .start  = OMAP243X_HS_BASE,
-   .end= OMAP243X_HS_BASE + SZ_8K - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   [1] = { /* general IRQ */
-   .start  = INT_243X_HS_USB_MC,
-   .flags  = IORESOURCE_IRQ,
-   },
-   [2] = { /* DMA IRQ */
-   .start  = INT_243X_HS_USB_DMA,
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static int usbhs_ick_on;
-
-static int musb_set_clock(struct clk *clk, int state)
-{
-   if (state) {
-   if (usbhs_ick_on > 0)
-   return -ENODEV;
-
-   omap2_block_sleep();
-   clk_enable(clk);
-   usbhs_ick_on = 1;
-   } else {
-   if (usbhs_ick_on == 0)
-   return -ENODEV;
-
-   clk_disable(clk);
-   usbhs_ick_on = 0;
-   omap2_allow_sleep();
-   }
-
-   return 0;
-}
-
-static struct musb_hdrc_platform_data musb_plat = {
-#ifdef CONFIG_USB_MUSB_OTG
-   .mode   = MUSB_OTG,
-#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
-   .mode   = MUSB_HOST,
-#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
-   .mode   = MUSB_PERIPHERAL,
-#endif
-   .multipoint = 1,
-   .clock  = "usbhs_ick",
-   .set_clock  = musb_set_clock,
-};
-
-static u64 musb_dmamask = ~(u32)0;
-
-static struct platform_device musb_device = {
-   .name   = "musb_hdrc",
-   .id = 0,
-   .dev = {
-   .dma_mask   = &musb_dmamask,
-   .coherent_dma_mask  = 0x,
-   .platform_data  = &musb_plat,
-   },
-   .num_resources  = ARRAY_SIZE(musb_resources),
-   .resource   = musb_resources,
-};
-
-void __init sdp2430_usb_init(void)
-{
-   if (platform_device_register(&musb_device) < 0) {
-   printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
-   return;
-   }
-}
-
diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index 76bbe06..623c38e 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -390,7 +391,7 @@ static void __init omap_2430sdp_init(void)
omap_ser

RE: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Gadiyar, Anand
> -Original Message-
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of Felipe Balbi
> Sent: Thursday, April 24, 2008 7:16 PM
> To: linux-omap@vger.kernel.org; David Brownell
> Cc: Tony Lindgren; Syed Mohammed, Khasim; Felipe Balbi
> Subject: [PATCH 2/2] USB: Generalize usb initialization for omap hw
> 
> Create a generic board-file for initializing usb
> on omap2430 and omap3 boards.
> 
> Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> ---
>  arch/arm/mach-omap2/Makefile   |4 +-
>  arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
> 
>  arch/arm/mach-omap2/board-2430sdp.c|3 +-
>  arch/arm/mach-omap2/board-3430sdp.c|3 +-
>  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
>  include/asm-arm/arch-omap/usb-musb.h   |   35 +++

usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.

>  6 files changed, 61 insertions(+), 112 deletions(-)
>  delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
>  rename arch/arm/mach-omap2/{board-3430sdp-usb.c => usb-musb.c} (91%)
>  create mode 100644 include/asm-arm/arch-omap/usb-musb.h
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


USB and Serial Flashing tool?

2008-04-24 Thread Nishanth Menon
Hi Folks,
we have a recent discussion in the beagle forum which might interest
all: 
http://groups.google.com/group/beagleboard/browse_thread/thread/dabf503ace976ea1.
This is based on a tiny little trial Dirk and I had done w.r.t a
simple Download utility working for beagle over USB and UART
http://groups.google.com/group/beagleboard/browse_thread/thread/80ad3da0eb2aa555
(Sample code also attached in the thread)

Do let us know your views.
Regards,
Nishanth Menon
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Felipe Balbi
On Thu, Apr 24, 2008 at 07:43:16PM +0530, ext Gadiyar, Anand wrote:
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Felipe Balbi
> > Sent: Thursday, April 24, 2008 7:16 PM
> > To: linux-omap@vger.kernel.org; David Brownell
> > Cc: Tony Lindgren; Syed Mohammed, Khasim; Felipe Balbi
> > Subject: [PATCH 2/2] USB: Generalize usb initialization for omap hw
> > 
> > Create a generic board-file for initializing usb
> > on omap2430 and omap3 boards.
> > 
> > Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> > ---
> >  arch/arm/mach-omap2/Makefile   |4 +-
> >  arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
> > 
> >  arch/arm/mach-omap2/board-2430sdp.c|3 +-
> >  arch/arm/mach-omap2/board-3430sdp.c|3 +-
> >  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
> >  include/asm-arm/arch-omap/usb-musb.h   |   35 +++
> 
> usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.

that's true, you suggest any other name ?

maybe omap-usb.[ch] ?

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


[RFC/PATCH 1/1] McBSP support for 2430/34XX

2008-04-24 Thread Chandra shekhar

Hi,

Here is a patch that adds support for McBSP on 2430/34XX (without disturbing 
the current mcbsp equilibrium).
Omap2420 specific code has been left in mcbsp.c because of difference in 
register set.( 16 bit registers in 2420)
It has been verified in digital loopback mode. ( Compilation tested for 2420 )
Since 2430 onwards registers are 32 bit, all the instances of omap24xx which 
were relevant to 
only 2420 has been changed to omap2420.  

The patch includes the following features.


1. Supporting all the LP features.
2. Support of DMA chaining mode and one time configuration for entire transfer 
to improve performance.
3. Independent configurations and transfer of Rx and Tx
4. MCBSP data transfer in 8, 16 and 32 bit mode.
5. instead of mcbsp client configuring all the register, it allows clients to  
configure parameters like clk polarity, clk src and
other parameters.

Regards
Chandra Shekhar

Signed-off-by: chandra shekhar <[EMAIL PROTECTED]>

---
 arch/arm/configs/omap_3430sdp_defconfig |1 
 arch/arm/mach-omap2/Makefile|4 
 arch/arm/mach-omap2/omap2-mcbsp.c   | 1132 
 arch/arm/plat-omap/mcbsp.c  |  126 +--
 include/asm-arm/arch-omap/mcbsp.h   |  348 -
 5 files changed, 1489 insertions(+), 122 deletions(-)

Index: 2.6_kernel/arch/arm/configs/omap_3430sdp_defconfig
===
--- 2.6_kernel.orig/arch/arm/configs/omap_3430sdp_defconfig 2008-04-24 
19:48:59.0 +0530
+++ 2.6_kernel/arch/arm/configs/omap_3430sdp_defconfig  2008-04-24 
19:50:31.0 +0530
@@ -179,6 +179,7 @@
 # CONFIG_OMAP_MCBSP is not set
 # CONFIG_OMAP_MMU_FWK is not set
 # CONFIG_OMAP_MBOX_FWK is not set
+CONFIG_OMAP_MCBSP=y
 # CONFIG_OMAP_MPU_TIMER is not set
 CONFIG_OMAP_32K_TIMER=y
 CONFIG_OMAP_32K_TIMER_HZ=128
Index: 2.6_kernel/arch/arm/mach-omap2/Makefile
===
--- 2.6_kernel.orig/arch/arm/mach-omap2/Makefile2008-04-24 
19:49:07.0 +0530
+++ 2.6_kernel/arch/arm/mach-omap2/Makefile 2008-04-24 19:50:40.0 
+0530
@@ -22,6 +22,10 @@
 mailbox_mach-objs  := mailbox.o
 mmu_mach-objs  := mmu.o
 
+ifeq ($(CONFIG_ARCH_OMAP2420),)
+obj-$(CONFIG_OMAP_MCBSP) += omap2-mcbsp.o
+endif
+
 # Specific board support
 obj-$(CONFIG_MACH_OMAP_GENERIC)+= board-generic.o
 obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o board-h4-mmc.o
Index: 2.6_kernel/arch/arm/mach-omap2/omap2-mcbsp.c
===
--- /dev/null   1970-01-01 00:00:00.0 +
+++ 2.6_kernel/arch/arm/mach-omap2/omap2-mcbsp.c2008-04-24 
19:50:20.0 +0530
@@ -0,0 +1,1132 @@
+/*
+ * arch/arm/mach-omap2/omap2-mcbsp.c
+ *
+ * Copyright (C) 2007 Texas Instruments, Inc.
+ * Author: chandra shekhar <[EMAIL PROTECTED]>
+ *
+ * This file is licensed under the terms of the GNU General Public License
+ * version 2. This program is licensed "as is" without any warranty of any
+ * kind, whether express or implied.
+ *
+ */
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+#include 
+
+static char omap_mcbsp_ick[OMAP_MAX_MCBSP_COUNT][15] = {"mcbsp1_ick\0",
+   "mcbsp2_ick\0",
+   "mcbsp3_ick\0",
+   "mcbsp4_ick\0",
+   "mcbsp5_ick\0"
+   };
+
+static char omap_mcbsp_fck[OMAP_MAX_MCBSP_COUNT][15] = {"mcbsp1_fck\0",
+   "mcbsp2_fck\0",
+   "mcbsp3_fck\0",
+   "mcbsp4_fck\0",
+   "mcbsp5_fck\0"
+   };
+
+static struct omap_mcbsp_clocks {
+   struct clk *ick;
+   struct clk *fck;
+   } omap_mcbsp_clk[OMAP_MAX_MCBSP_COUNT];
+
+/* No. of dma channels in a chain, setting 2 for each interface */
+static int omap_mcbsp_max_dmachs_rx[OMAP_MAX_MCBSP_COUNT] = {2, 2, 2, 2, 2};
+static int omap_mcbsp_max_dmachs_tx[OMAP_MAX_MCBSP_COUNT] = {2, 2, 2, 2, 2};
+
+static void omap2_mcbsp_rx_dma_callback(int lch, u16 ch_status, void *data)
+{
+   struct omap_mcbsp *mcbsp_dma_rx = data;
+   u32 io_base;
+   io_base = mcbsp_dma_rx->io_base;
+
+   /* If we are at the last transfer, Shut down the reciever */
+   if ((mcbsp_dma_rx->auto_reset & OMAP_MCBSP_AUTO_RRST)
+   && (omap_dma_chain_status(mcbsp_dma_rx->dma_rx_lch) ==
+

[PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

2008-04-24 Thread Eduardo Valentin
From: Eduardo Valentin <[EMAIL PROTECTED]>

This patch adds DMA and IRQ definition for McBSP 1 and 2
devices for omap34xx based systems.

Signed-off-by: Eduardo Valentin <[EMAIL PROTECTED]>
---
 include/asm-arm/arch-omap/dma.h  |4 
 include/asm-arm/arch-omap/irqs.h |4 
 2 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
index be0431e..270e158 100644
--- a/include/asm-arm/arch-omap/dma.h
+++ b/include/asm-arm/arch-omap/dma.h
@@ -273,6 +273,10 @@
 #define OMAP24XX_DMA_MS63  /* S_DMA_62 */
 #define OMAP242X_DMA_EXT_DMAREQ5   64  /* S_DMA_63 */
 #define OMAP243X_DMA_EXT_DMAREQ6   64  /* S_DMA_63 */
+#define OMAP34XX_DMA_MCBSP1_TX 31  /* S_DMA_30 */
+#define OMAP34XX_DMA_MCBSP1_RX 32  /* S_DMA_31 */
+#define OMAP34XX_DMA_MCBSP2_TX 33  /* S_DMA_32 */
+#define OMAP34XX_DMA_MCBSP2_RX 34  /* S_DMA_33 */
 #define OMAP34XX_DMA_EXT_DMAREQ3   64  /* S_DMA_63 */
 #define OMAP34XX_DMA_AES2_TX   65  /* S_DMA_64 */
 #define OMAP34XX_DMA_AES2_RX   66  /* S_DMA_65 */
diff --git a/include/asm-arm/arch-omap/irqs.h b/include/asm-arm/arch-omap/irqs.h
index 15446fd..4e185a8 100644
--- a/include/asm-arm/arch-omap/irqs.h
+++ b/include/asm-arm/arch-omap/irqs.h
@@ -316,7 +316,11 @@
 #define INT_34XX_USIM_IRQ  35
 #define INT_34XX_WDT3_IRQ  36
 #define INT_34XX_SPI4_IRQ  48
+#define INT_34XX_MCBSP1_IRQ_TX 59
+#define INT_34XX_MCBSP1_IRQ_RX 60
 #define INT_34XX_I2C3_IRQ  61
+#define INT_34XX_MCBSP2_IRQ_TX 62
+#define INT_34XX_MCBSP2_IRQ_RX 63
 #define INT_34XX_PBIAS_IRQ 75
 #define INT_34XX_OHCI_IRQ  76
 #define INT_34XX_EHCI_IRQ  77
-- 
1.5.5.1.67.gbdb8.dirty

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


[PATCH 2/5] MACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1

2008-04-24 Thread Eduardo Valentin
From: Eduardo Valentin <[EMAIL PROTECTED]>

This patch adds support for mach-omap1 based on current
mcbsp platform driver.

Signed-off-by: Eduardo Valentin <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap1/Makefile |2 +
 arch/arm/mach-omap1/mcbsp.c  |  166 ++
 2 files changed, 168 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap1/mcbsp.c

diff --git a/arch/arm/mach-omap1/Makefile b/arch/arm/mach-omap1/Makefile
index 6ebf23b..09246a7 100644
--- a/arch/arm/mach-omap1/Makefile
+++ b/arch/arm/mach-omap1/Makefile
@@ -5,6 +5,8 @@
 # Common support
 obj-y := io.o id.o clock.o irq.o mux.o serial.o devices.o
 
+obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
+
 obj-$(CONFIG_OMAP_MPU_TIMER)   += time.o
 obj-$(CONFIG_OMAP_32K_TIMER)   += timer32k.o
 
diff --git a/arch/arm/mach-omap1/mcbsp.c b/arch/arm/mach-omap1/mcbsp.c
new file mode 100644
index 000..a519609
--- /dev/null
+++ b/arch/arm/mach-omap1/mcbsp.c
@@ -0,0 +1,166 @@
+/*
+ * linux/arch/arm/mach-omap1/mcbsp.c
+ *
+ * Copyright (C) 2008 Instituto Nokia de Tecnologia
+ * Contact: Eduardo Valentin <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Multichannel mode not supported.
+ */
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define DPS_RSTCT2_PER_EN  (1 << 0)
+#define DSP_RSTCT2_WD_PER_EN   (1 << 1)
+
+static int omap1_mcbsp_check(unsigned int id)
+{
+   /* REVISIT: Check correctly for number of registered McBSPs */
+   if (cpu_is_omap730()) {
+   if (id > OMAP_MAX_MCBSP_COUNT - 2) {
+  printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
+   id + 1);
+  return -ENODEV;
+   }
+   return 0;
+   }
+
+   if (cpu_is_omap15xx() || cpu_is_omap16xx()) {
+   if (id > OMAP_MAX_MCBSP_COUNT - 1) {
+   printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n",
+   id + 1);
+   return -ENODEV;
+   }
+   return 0;
+   }
+
+   return -ENODEV;
+}
+
+static void omap1_mcbsp_request(unsigned int id)
+{
+   /*
+* On 1510, 1610 and 1710, McBSP1 and McBSP3
+* are DSP public peripherals.
+*/
+   if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3) {
+   omap_dsp_request_mem();
+   /*
+* DSP external peripheral reset
+* FIXME: This should be moved to dsp code
+*/
+   __raw_writew(__raw_readw(DSP_RSTCT2) | DPS_RSTCT2_PER_EN |
+   DSP_RSTCT2_WD_PER_EN, DSP_RSTCT2);
+   }
+}
+
+static void omap1_mcbsp_free(unsigned int id)
+{
+   if (id == OMAP_MCBSP1 || id == OMAP_MCBSP3)
+   omap_dsp_release_mem();
+}
+
+static struct omap_mcbsp_ops omap1_mcbsp_ops = {
+   .check  = omap1_mcbsp_check,
+   .request= omap1_mcbsp_request,
+   .free   = omap1_mcbsp_free,
+};
+
+static struct omap_mcbsp_platform_data omap1_mcbsp_pdata[] = {
+#ifdef CONFIG_ARCH_OMAP730
+   {
+   .virt_base  = io_p2v(OMAP730_MCBSP1_BASE),
+   .dma_rx_sync= OMAP_DMA_MCBSP1_RX,
+   .dma_tx_sync= OMAP_DMA_MCBSP1_TX,
+   .rx_irq = INT_730_McBSP1RX,
+   .tx_irq = INT_730_McBSP1TX,
+   .ops= &omap1_mcbsp_ops,
+   },
+   {
+   .virt_base  = io_p2v(OMAP730_MCBSP2_BASE),
+   .dma_rx_sync= OMAP_DMA_MCBSP3_RX,
+   .dma_tx_sync= OMAP_DMA_MCBSP3_TX,
+   .rx_irq = INT_730_McBSP2RX,
+   .tx_irq = INT_730_McBSP2TX
+   .ops= &omap1_mcbsp_ops,
+   },
+#endif
+#ifdef CONFIG_ARCH_OMAP15XX
+   {
+   .virt_base  = OMAP1510_MCBSP1_BASE,
+   .dma_rx_sync= OMAP_DMA_MCBSP1_RX,
+   .dma_tx_sync= OMAP_DMA_MCBSP1_TX,
+   .rx_irq = INT_McBSP1RX,
+   .tx_irq = INT_McBSP1TX,
+   .ops= &omap1_mcbsp_ops,
+   .clocks = { "dsp_ck", "api_ck", "dspxor_ck" },
+   },
+   {
+   .virt_base  = io_p2v(OMAP1510_MCBSP2_BASE),
+   .dma_rx_sync= OMAP_DMA_MCBSP2_RX,
+   .dma_tx_sync= OMAP_DMA_MCBSP2_TX,
+   .rx_irq = INT_1510_SPI_RX,
+   .tx_irq = INT_1510_SPI_TX,
+   .ops= &omap1_mcbsp_ops,
+   },
+   {
+   .virt_base  = OMAP1510_MCBSP3_BASE,
+   .dma_rx_sync= OMAP_DMA_MCBSP3_RX,
+   .dma_tx_sync= OMAP_DMA_MCBSP3_TX,

[PATCH 0/5] Updates on mcbsp driver

2008-04-24 Thread Eduardo Valentin
From: Eduardo Valentin <[EMAIL PROTECTED]>

This patch series updates mcbsp driver by transforming it into
a platform driver. This is a very initial implementation.
Basically it moves machine specific code to their correct place
and creates the platform driver necessary structures.

It must be working for previous boards. For omap34xx it should
work for mcbsp 1 and 2.

In order to do not break other places, I tryied to do not change
previous API. But future improvements are needed.

Clock definitions for  mcbsp 1 and 2 were also modified to add
correct support for omap34xx.

Comments are wellcome.

Cheers,

Eduardo Valentin (5):
  PLAT-OMAP: MCBSP: Tranform into platform driver
  MACH-OMAP1: MCBSP: Add support for mcbsp on mach-omap1
  Fix mcbsp clock definition on clock34xx.h
  OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2
  MACH-OMAP2: MCBSP: Add support for mcbsp on mach-omap2

 arch/arm/mach-omap1/Makefile  |2 +
 arch/arm/mach-omap1/mcbsp.c   |  166 +
 arch/arm/mach-omap2/Makefile  |2 +
 arch/arm/mach-omap2/clock34xx.h   |   30 ++-
 arch/arm/mach-omap2/mcbsp.c   |  108 ++
 arch/arm/plat-omap/devices.c  |   45 +++
 arch/arm/plat-omap/mcbsp.c|  662 ++---
 include/asm-arm/arch-omap/dma.h   |4 +
 include/asm-arm/arch-omap/irqs.h  |4 +
 include/asm-arm/arch-omap/mcbsp.h |   73 -
 10 files changed, 675 insertions(+), 421 deletions(-)
 create mode 100644 arch/arm/mach-omap1/mcbsp.c
 create mode 100644 arch/arm/mach-omap2/mcbsp.c

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


[PATCH 3/5] Fix mcbsp clock definition on clock34xx.h

2008-04-24 Thread Eduardo Valentin
From: Eduardo Valentin <[EMAIL PROTECTED]>

This patch fix the clock definition for mcbsps on clock34xx.h.
Device identification must be done using .id field, not
only name field.

Signed-off-by: Eduardo Valentin <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/clock34xx.h |   30 --
 1 files changed, 20 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/clock34xx.h b/arch/arm/mach-omap2/clock34xx.h
index f10a9a5..4b16bb9 100644
--- a/arch/arm/mach-omap2/clock34xx.h
+++ b/arch/arm/mach-omap2/clock34xx.h
@@ -1472,7 +1472,8 @@ static const struct clksel mcbsp_15_clksel[] = {
 };
 
 static struct clk mcbsp5_fck = {
-   .name   = "mcbsp5_fck",
+   .name   = "mcbsp_fck",
+   .id = 5,
.init   = &omap2_init_clksel_parent,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
@@ -1485,7 +1486,8 @@ static struct clk mcbsp5_fck = {
 };
 
 static struct clk mcbsp1_fck = {
-   .name   = "mcbsp1_fck",
+   .name   = "mcbsp_fck",
+   .id = 1,
.init   = &omap2_init_clksel_parent,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
.enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
@@ -1933,7 +1935,8 @@ static struct clk gpt10_ick = {
 };
 
 static struct clk mcbsp5_ick = {
-   .name   = "mcbsp5_ick",
+   .name   = "mcbsp_ick",
+   .id = 5,
.parent = &core_l4_ick,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_MCBSP5_SHIFT,
@@ -1943,7 +1946,8 @@ static struct clk mcbsp5_ick = {
 };
 
 static struct clk mcbsp1_ick = {
-   .name   = "mcbsp1_ick",
+   .name   = "mcbsp_ick",
+   .id = 1,
.parent = &core_l4_ick,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_ICLKEN1),
.enable_bit = OMAP3430_EN_MCBSP1_SHIFT,
@@ -2768,7 +2772,8 @@ static struct clk gpt2_ick = {
 };
 
 static struct clk mcbsp2_ick = {
-   .name   = "mcbsp2_ick",
+   .name   = "mcbsp_ick",
+   .id = 2,
.parent = &per_l4_ick,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
.enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
@@ -2778,7 +2783,8 @@ static struct clk mcbsp2_ick = {
 };
 
 static struct clk mcbsp3_ick = {
-   .name   = "mcbsp3_ick",
+   .name   = "mcbsp_ick",
+   .id = 3,
.parent = &per_l4_ick,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
.enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
@@ -2788,7 +2794,8 @@ static struct clk mcbsp3_ick = {
 };
 
 static struct clk mcbsp4_ick = {
-   .name   = "mcbsp4_ick",
+   .name   = "mcbsp_ick",
+   .id = 4,
.parent = &per_l4_ick,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_ICLKEN),
.enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
@@ -2804,7 +2811,8 @@ static const struct clksel mcbsp_234_clksel[] = {
 };
 
 static struct clk mcbsp2_fck = {
-   .name   = "mcbsp2_fck",
+   .name   = "mcbsp_fck",
+   .id = 2,
.init   = &omap2_init_clksel_parent,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_MCBSP2_SHIFT,
@@ -2817,7 +2825,8 @@ static struct clk mcbsp2_fck = {
 };
 
 static struct clk mcbsp3_fck = {
-   .name   = "mcbsp3_fck",
+   .name   = "mcbsp_fck",
+   .id = 3,
.init   = &omap2_init_clksel_parent,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_MCBSP3_SHIFT,
@@ -2830,7 +2839,8 @@ static struct clk mcbsp3_fck = {
 };
 
 static struct clk mcbsp4_fck = {
-   .name   = "mcbsp4_fck",
+   .name   = "mcbsp_fck",
+   .id = 4,
.init   = &omap2_init_clksel_parent,
.enable_reg = OMAP_CM_REGADDR(OMAP3430_PER_MOD, CM_FCLKEN),
.enable_bit = OMAP3430_EN_MCBSP4_SHIFT,
-- 
1.5.5.1.67.gbdb8.dirty

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


[PATCH 5/5] MACH-OMAP2: MCBSP: Add support for mcbsp on mach-omap2

2008-04-24 Thread Eduardo Valentin
From: Eduardo Valentin <[EMAIL PROTECTED]>

This patch adds support for mach-omap2 based on current
mcbsp platform driver.

Signed-off-by: Eduardo Valentin <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile |2 +
 arch/arm/mach-omap2/mcbsp.c  |  108 ++
 2 files changed, 110 insertions(+), 0 deletions(-)
 create mode 100644 arch/arm/mach-omap2/mcbsp.c

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 06348d3..05f1612 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -7,6 +7,8 @@ obj-y := irq.o id.o io.o memory.o control.o prcm.o clock.o 
mux.o \
devices.o serial.o gpmc.o timer-gp.o powerdomain.o \
clockdomain.o
 
+obj-$(CONFIG_OMAP_MCBSP) += mcbsp.o
+
 # Functions loaded to SRAM
 obj-$(CONFIG_ARCH_OMAP2)   += sram24xx.o
 
diff --git a/arch/arm/mach-omap2/mcbsp.c b/arch/arm/mach-omap2/mcbsp.c
new file mode 100644
index 000..2a2462b
--- /dev/null
+++ b/arch/arm/mach-omap2/mcbsp.c
@@ -0,0 +1,108 @@
+/*
+ * linux/arch/arm/mach-omap2/mcbsp.c
+ *
+ * Copyright (C) 2008 Instituto Nokia de Tecnologia
+ * Contact: Eduardo Valentin <[EMAIL PROTECTED]>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ * Multichannel mode not supported.
+ */
+#include 
+#include 
+#include 
+#include 
+
+#include 
+#include 
+#include 
+#include 
+
+static void omap2_mcbsp2_mux_setup(void)
+{
+   if (cpu_is_omap2420()) {
+   omap_cfg_reg(Y15_24XX_MCBSP2_CLKX);
+   omap_cfg_reg(R14_24XX_MCBSP2_FSX);
+   omap_cfg_reg(W15_24XX_MCBSP2_DR);
+   omap_cfg_reg(V15_24XX_MCBSP2_DX);
+   omap_cfg_reg(V14_24XX_GPIO117);
+   }
+   /*
+* TODO: Need to add MUX settings for OMAP 2430 SDP
+*/
+}
+
+static void omap2_mcbsp_request(unsigned int id)
+{
+   if (id == OMAP_MCBSP2)
+   omap2_mcbsp2_mux_setup();
+}
+
+static int omap2_mcbsp_check(unsigned int id)
+{
+   if (id > OMAP_MAX_MCBSP_COUNT - 1) {
+   printk(KERN_ERR "OMAP-McBSP: McBSP%d doesn't exist\n", id + 1);
+   return -ENODEV;
+   }
+   return 0;
+}
+
+static struct omap_mcbsp_ops omap2_mcbsp_ops = {
+   .request= omap2_mcbsp_request,
+   .check  = omap2_mcbsp_check,
+};
+
+static struct omap_mcbsp_platform_data omap2_mcbsp_pdata[] = {
+#ifdef CONFIG_ARCH_OMAP24XX
+   {
+   .virt_base  = IO_ADDRESS(OMAP24XX_MCBSP1_BASE),
+   .dma_rx_sync= OMAP24XX_DMA_MCBSP1_RX,
+   .dma_tx_sync= OMAP24XX_DMA_MCBSP1_TX,
+   .rx_irq = INT_24XX_MCBSP1_IRQ_RX,
+   .tx_irq = INT_24XX_MCBSP1_IRQ_TX,
+   .ops= &omap2_mcbsp_ops,
+   .clocks = { "mcbsp_ick", "mcbsp_fck" },
+   },
+   {
+   .virt_base  = IO_ADDRESS(OMAP24XX_MCBSP2_BASE),
+   .dma_rx_sync= OMAP24XX_DMA_MCBSP2_RX,
+   .dma_tx_sync= OMAP24XX_DMA_MCBSP2_TX,
+   .rx_irq = INT_24XX_MCBSP2_IRQ_RX,
+   .tx_irq = INT_24XX_MCBSP2_IRQ_TX,
+   .ops= &omap2_mcbsp_ops,
+   .clocks = { "mcbsp_ick", "mcbsp_fck" },
+   },
+#endif
+#ifdef CONFIG_ARCH_OMAP34XX
+   {
+   .virt_base  = IO_ADDRESS(OMAP34XX_MCBSP1_BASE),
+   .dma_rx_sync= OMAP34XX_DMA_MCBSP1_RX,
+   .dma_tx_sync= OMAP34XX_DMA_MCBSP1_TX,
+   .rx_irq = INT_34XX_MCBSP1_IRQ_RX,
+   .tx_irq = INT_34XX_MCBSP1_IRQ_TX,
+   .ops= &omap2_mcbsp_ops,
+   .clocks = { "mcbsp_ick", "mcbsp_fck" },
+   },
+   {
+   .virt_base  = IO_ADDRESS(OMAP34XX_MCBSP2_BASE),
+   .dma_rx_sync= OMAP34XX_DMA_MCBSP2_RX,
+   .dma_tx_sync= OMAP34XX_DMA_MCBSP2_TX,
+   .rx_irq = INT_34XX_MCBSP2_IRQ_RX,
+   .tx_irq = INT_34XX_MCBSP2_IRQ_TX,
+   .ops= &omap2_mcbsp_ops,
+   .clocks = { "mcbsp_ick", "mcbsp_fck" },
+   },
+#endif
+};
+#define mcbsp_countARRAY_SIZE(omap2_mcbsp_pdata)
+
+int __init omap2_mcbsp_init(void)
+{
+   if (mcbsp_count > 0)
+   omap_mcbsp_register_board_cfg(omap2_mcbsp_pdata, mcbsp_count);
+
+   return omap_mcbsp_init();
+}
+arch_initcall(omap2_mcbsp_init);
-- 
1.5.5.1.67.gbdb8.dirty

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


[PATCH 1/5] PLAT-OMAP: MCBSP: Tranform into platform driver

2008-04-24 Thread Eduardo Valentin
From: Eduardo Valentin <[EMAIL PROTECTED]>

This patch transform mcbsp code into a very initial
implementation of a platform driver.

It also gets ride of ifdefs on mcbsp.c code.
To do it, a platform data structure was defined.

Platform devices are located in arch/arm/plat-omap/devices.c

Signed-off-by: Eduardo Valentin <[EMAIL PROTECTED]>
---
 arch/arm/plat-omap/devices.c  |   45 +++
 arch/arm/plat-omap/mcbsp.c|  662 ++---
 include/asm-arm/arch-omap/mcbsp.h |   73 -
 3 files changed, 369 insertions(+), 411 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 6f07451..415bcd7 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdefined(CONFIG_OMAP_DSP) || defined(CONFIG_OMAP_DSP_MODULE)
 
@@ -150,6 +151,49 @@ static inline void omap_init_kp(void) {}
 #endif
 
 /*-*/
+#if defined(CONFIG_OMAP_MCBSP) || defined(CONFIG_OMAP_MCBSP_MODULE)
+
+static struct platform_device omap_mcbsp_devices[OMAP_MAX_MCBSP_COUNT];
+static int mcbsps_configured;
+
+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
+   int size)
+{
+   int i;
+
+   if (size > OMAP_MAX_MCBSP_COUNT) {
+   printk(KERN_WARNING "Registered too many McBSPs platform_data."
+   " Using maximum (%d) available.\n",
+   OMAP_MAX_MCBSP_COUNT);
+   size = OMAP_MAX_MCBSP_COUNT;
+   }
+
+   for (i = 0; i < size; i++) {
+   struct platform_device *new_mcbsp = &omap_mcbsp_devices[i];
+   new_mcbsp->name = "omap-mcbsp";
+   new_mcbsp->id = i + 1;
+   new_mcbsp->dev.platform_data = &config[i];
+   }
+   mcbsps_configured = size;
+}
+
+static void __init omap_init_mcbsp(void)
+{
+   int i;
+
+   for (i = 0; i < mcbsps_configured; i++)
+   platform_device_register(&omap_mcbsp_devices[i]);
+}
+#else
+void omap_mcbsp_register_board_cfg(struct omap_mcbsp_platform_data *config,
+   int size)
+{  }
+
+static inline void __init omap_init_mcbsp(void)
+{  }
+#endif
+
+/*-*/
 
 #ifdefined(CONFIG_MMC_OMAP) || defined(CONFIG_MMC_OMAP_MODULE) \
|| defined(CONFIG_MMC_OMAP_HS) || defined(CONFIG_MMC_OMAP_HS_MODULE)
@@ -511,6 +555,7 @@ static int __init omap_init_devices(void)
 */
omap_init_dsp();
omap_init_kp();
+   omap_init_mcbsp();
omap_init_mmc();
omap_init_uwire();
omap_init_wdt();
diff --git a/arch/arm/plat-omap/mcbsp.c b/arch/arm/plat-omap/mcbsp.c
index 053de31..1fc5913 100644
--- a/arch/arm/plat-omap/mcbsp.c
+++ b/arch/arm/plat-omap/mcbsp.c
@@ -15,6 +15,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -25,83 +26,53 @@
 #include 
 
 #include 
-#include 
-#include 
-#include 
 #include 
 
-#ifdef CONFIG_MCBSP_DEBUG
-#define DBG(x...)  printk(x)
-#else
-#define DBG(x...)  do { } while (0)
-#endif
-
-struct omap_mcbsp {
-   u32  io_base;
-   u8   id;
-   u8   free;
-   omap_mcbsp_word_length   rx_word_length;
-   omap_mcbsp_word_length   tx_word_length;
-
-   omap_mcbsp_io_type_t io_type; /* IRQ or poll */
-   /* IRQ based TX/RX */
-   int  rx_irq;
-   int  tx_irq;
-
-   /* DMA stuff */
-   u8   dma_rx_sync;
-   shortdma_rx_lch;
-   u8   dma_tx_sync;
-   shortdma_tx_lch;
-
-   /* Completion queues */
-   struct completiontx_irq_completion;
-   struct completionrx_irq_completion;
-   struct completiontx_dma_completion;
-   struct completionrx_dma_completion;
-
-   /* Protect the field .free, while checking if the mcbsp is in use */
-   spinlock_t   lock;
-};
-
 static struct omap_mcbsp mcbsp[OMAP_MAX_MCBSP_COUNT];
-#ifdef CONFIG_ARCH_OMAP1
-static struct clk *mcbsp_dsp_ck;
-static struct clk *mcbsp_api_ck;
-static struct clk *mcbsp_dspxor_ck;
-#endif
-#ifdef CONFIG_ARCH_OMAP2
-static struct clk *mcbsp1_ick;
-static struct clk *mcbsp1_fck;
-static struct clk *mcbsp2_ick;
-static struct clk *mcbsp2_fck;
-#endif
+
+#define omap_mcbsp_check_invalid_id(id)(mcbsp[id].pdata && \
+   mcbsp[id].pdata->ops && \
+   mcbsp[id].pdata->ops->check && \
+   (mcbsp[id].pdata->ops->check(id) < 0))
 
 static void omap_m

framebuffer on 2430sdp, configuration and bug

2008-04-24 Thread Simon Braunschmidt
Hi all

We are running 2.6.24-omap1.

We have problems to get the framebuffer driver running on a
SDP2430-VG5.0.1 board. At the moment the LCD stays dark, no penguin to
be seen, test program not displaying anything, nothing. We tried
different configurations already but we are not exactly sure which
Kconfig options are relevant. The sdp2430 defconfig does not work for
us.

A .config for a known to be working framebuffer configuration would be
very helpfull, together with kernel version or git tag.

Also we are seeing a bug, instability, whatever coming from :

drivers/video/omap/dispc.c

in function:

static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)

This patch adds extra debug output:




Index: drivers/video/omap/dispc.c
===
--- drivers/video/omap/dispc.c  (revision 325)
+++ drivers/video/omap/dispc.c  (working copy)
@@ -864,8 +864,13 @@

if (stat & DISPC_IRQ_MASK_ERROR) {
if (printk_ratelimit()) {
-   dev_err(dispc.fbdev->dev, "irq error status %04x\n",
+   dev_err(dispc.fbdev->dev, "irq error status %04x",
stat & 0x7fff);
+   printk("%s",(stat & DISPC_IRQ_SYNC_LOST)? "
DISPC_IRQ_SYNC_LOST " : " ");
+   printk("%s",(stat &
DISPC_IRQ_VID2_FIFO_UNDERFLOW)? "DISPC_IRQ_VID2_FIFO_UNDERFLOW " : "
");
+   printk("%s",(stat &
DISPC_IRQ_VID1_FIFO_UNDERFLOW)? "DISPC_IRQ_VID1_FIFO_UNDERFLOW " : "
");
+   printk("%s",(stat &
DISPC_IRQ_GFX_FIFO_UNDERFLOW)? "DISPC_IRQ_GFX_FIFO_UNDERFLOW\n" :
"\n");
+
}
}




Resulting console output is :

omapfb omapfb: irq error status 40e2DISPC_IRQ_SYNC_LOST
DISPC_IRQ_GFX_FIFO_UNDERFLOW´
omapfb omapfb: irq error status 0040   DISPC_IRQ_GFX_FIFO_UNDERFLOW´
omapfb omapfb: irq error status 4022DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4000DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4000DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4022DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4000DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4000DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4022DISPC_IRQ_SYNC_LOST   ´
omapfb omapfb: irq error status 4000DISPC_IRQ_SYNC_LOST   ´

omapfb omapfb: irq error status 4000DISPC_IRQ_SYNC_LOST   ´
printk: 1487165 messages suppressed.´

Can someone please provide insight on whats happening here?

Maybe the sync lost signal coming from dispc (display controller) has
to be handled properly, its only reported in the current code.

In the very old kernel snapshots on linux.omap.com, these kinds of
messages were counted and suppressed after 5 occurences, so it seems
like they were know at some stage in the development. The old
snapshots do not compile with our toolchain (codesourcery 2007 and
2008), suggestions for this?
I know that the hardware is working in principle, a precompiled
kernel, 2.6.10, maybe montavista or something TI developed internally,
is running succesfully with framebuffer.

Help, a working .config, some insight would be much appreciated...

Regards, Gruessla
Simon Braunschmidt


The errors start right after powermanagment init according to bootlog,
maybe related?
Below is partial bootlog, notice omapfb device registration and
following omapfb error messages:

---snip---
io scheduler deadline registered
io scheduler cfq registered
omapfb: configured for panel sdp2430
omapfb: DISPC version 3.0 initialized
Console: switching to colour frame buffer device 30x40
omapfb: Framebuffer initialized. Total vram 155648 planes 1
omapfb: Pixclock 5156 kHz hfreq 18.2 kHz vfreq 54.8 Hz
omap_rng omap_rng: OMAP Random Number Generator ver. 50
Serial: 8250/16550 driver $Revision: 1.90 $ 4 ports, IRQ sharing enabled
serial8250.0: ttyS0 at MMIO 0x4806a000 (irq = 72) is a ST16654
console [ttyS0] enabled
serial8250.0: ttyS1 at MMIO 0x4806c000 (irq = 73) is a ST16654
serial8250.0: ttyS2 at MMIO 0x4806e000 (irq = 74) is a ST16654
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
loop: module loaded
smc91x.c: v1.1, sep 22 2004 by Nicolas Pitre <[EMAIL PROTECTED]>
eth0: SMC91C94 (rev 9) at c2850300 IRQ 309 [nowait]
eth0: Ethernet addr: 08:00:28:01:17:d1
i2c /dev entries driver
TWL4030 GPIO Demux: IRQ Range 376 to 386, Initialization Failed
omapflash.0: Found 1 x16 devices at 0x0 in 16-bit bank
omapflash.0: Found 1 x16 devices at 0x200 in 16-bit bank
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
 Intel/Sharp Extended Query Table at 0x010A
Using buffer write method
cfi_cmdset_0001: Erase suspend on write enabled
Creating 4 MTD partitions on "omapflash.0":
0x-0x0004 : "bootloader"
0x0004-0x0006 : "params"
0x0006-0x002

Re: [PATCH 1/2] OMAP: Introduce cpu_class_is_omap3()

2008-04-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080424 06:47]:
> Add cpu_class_is_omap3().

Well I thinks cpu_class_is_omap2() currently should cover both 24xx
and 34xx. This should be only used to differentiate between mach-omap1
and mach-omap2.

Tony


> Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> ---
>  arch/arm/plat-omap/common.c |2 +-
>  arch/arm/plat-omap/dma.c|   58 +++---
>  arch/arm/plat-omap/dmtimer.c|   10 +++---
>  arch/arm/plat-omap/gpio.c   |   14 +-
>  arch/arm/plat-omap/sram.c   |4 +-
>  arch/arm/plat-omap/usb.c|2 +-
>  include/asm-arm/arch-omap/cpu.h |3 +-
>  7 files changed, 47 insertions(+), 46 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c
> index fd6f329..d4dfe4c 100644
> --- a/arch/arm/plat-omap/common.c
> +++ b/arch/arm/plat-omap/common.c
> @@ -240,7 +240,7 @@ static int __init omap_init_clocksource_32k(void)
>   static char err[] __initdata = KERN_ERR
>   "%s: can't register clocksource!\n";
>  
> - if (cpu_is_omap16xx() || cpu_class_is_omap2()) {
> + if (cpu_is_omap16xx() || cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   struct clk *sync_32k_ick;
>  
>   sync_32k_ick = clk_get(NULL, "omap_32ksync_ick");
> diff --git a/arch/arm/plat-omap/dma.c b/arch/arm/plat-omap/dma.c
> index c00eda5..c16ea64 100644
> --- a/arch/arm/plat-omap/dma.c
> +++ b/arch/arm/plat-omap/dma.c
> @@ -211,7 +211,7 @@ void omap_set_dma_priority(int lch, int dst_port, int 
> priority)
>   omap_writel(l, reg);
>   }
>  
> - if (cpu_class_is_omap2()) {
> + if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   if (priority)
>   OMAP_DMA_CCR_REG(lch) |= (1 << 6);
>   else
> @@ -236,7 +236,7 @@ void omap_set_dma_transfer_params(int lch, int data_type, 
> int elem_count,
>   OMAP1_DMA_CCR2_REG(lch) |= 1 << 2;
>   }
>  
> - if (cpu_class_is_omap2() && dma_trigger) {
> + if ((cpu_class_is_omap2() || cpu_class_is_omap3()) && dma_trigger) {
>   u32 val = OMAP_DMA_CCR_REG(lch);
>  
>   val &= ~(3 << 19);
> @@ -276,7 +276,7 @@ void omap_set_dma_color_mode(int lch, enum 
> omap_dma_color_mode mode, u32 color)
>  
>   BUG_ON(omap_dma_in_1510_mode());
>  
> - if (cpu_class_is_omap2()) {
> + if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   REVISIT_24XX();
>   return;
>   }
> @@ -308,7 +308,7 @@ void omap_set_dma_color_mode(int lch, enum 
> omap_dma_color_mode mode, u32 color)
>  
>  void omap_set_dma_write_mode(int lch, enum omap_dma_write_mode mode)
>  {
> - if (cpu_class_is_omap2()) {
> + if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   OMAP_DMA_CSDP_REG(lch) &= ~(0x3 << 16);
>   OMAP_DMA_CSDP_REG(lch) |= (mode << 16);
>   }
> @@ -332,7 +332,7 @@ void omap_set_dma_src_params(int lch, int src_port, int 
> src_amode,
>   OMAP1_DMA_CSSA_L_REG(lch) = src_start;
>   }
>  
> - if (cpu_class_is_omap2())
> + if (cpu_class_is_omap2() || cpu_class_is_omap3())
>   OMAP2_DMA_CSSA_REG(lch) = src_start;
>  
>   OMAP_DMA_CSEI_REG(lch) = src_ei;
> @@ -359,7 +359,7 @@ void omap_set_dma_params(int lch, struct 
> omap_dma_channel_params * params)
>  
>  void omap_set_dma_src_index(int lch, int eidx, int fidx)
>  {
> - if (cpu_class_is_omap2()) {
> + if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   REVISIT_24XX();
>   return;
>   }
> @@ -383,13 +383,13 @@ void omap_set_dma_src_burst_mode(int lch, enum 
> omap_dma_burst_mode burst_mode)
>   case OMAP_DMA_DATA_BURST_DIS:
>   break;
>   case OMAP_DMA_DATA_BURST_4:
> - if (cpu_class_is_omap2())
> + if (cpu_class_is_omap2() || cpu_class_is_omap3())
>   burst = 0x1;
>   else
>   burst = 0x2;
>   break;
>   case OMAP_DMA_DATA_BURST_8:
> - if (cpu_class_is_omap2()) {
> + if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   burst = 0x2;
>   break;
>   }
> @@ -398,7 +398,7 @@ void omap_set_dma_src_burst_mode(int lch, enum 
> omap_dma_burst_mode burst_mode)
>* fall through
>*/
>   case OMAP_DMA_DATA_BURST_16:
> - if (cpu_class_is_omap2()) {
> + if (cpu_class_is_omap2() || cpu_class_is_omap3()) {
>   burst = 0x3;
>   break;
>   }
> @@ -429,7 +429,7 @@ void omap_set_dma_dest_params(int lch, int dest_port, int 
> dest_amode,
>   OMAP1_DMA_CDSA_L_REG(lch) = dest_start;
>   }
>  
> - if (cpu_class_is_omap2())
> + if (cpu_class_is_omap2() || cpu_class_is_omap3())
>   OMAP2_DMA_CDSA_REG(lch) = dest_start;
> 

Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080424 06:48]:
> Create a generic board-file for initializing usb
> on omap2430 and omap3 boards.
> 
> Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> ---
>  arch/arm/mach-omap2/Makefile   |4 +-
>  arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
> 
>  arch/arm/mach-omap2/board-2430sdp.c|3 +-
>  arch/arm/mach-omap2/board-3430sdp.c|3 +-
>  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
>  include/asm-arm/arch-omap/usb-musb.h   |   35 +++
>  6 files changed, 61 insertions(+), 112 deletions(-)
>  delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
>  rename arch/arm/mach-omap2/{board-3430sdp-usb.c => usb-musb.c} (91%)
>  create mode 100644 include/asm-arm/arch-omap/usb-musb.h
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index c37df1a..d95f8e9 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -29,11 +29,11 @@ obj-$(CONFIG_MACH_OMAP_H4)+= board-h4.o 
> board-h4-mmc.o
>  obj-$(CONFIG_MACH_OMAP_2430SDP)  += board-2430sdp.o \
>  board-2430sdp-flash.o \
>  board-sdp-hsmmc.o \
> -board-2430sdp-usb.o
> +usb-musb.o
>  obj-$(CONFIG_MACH_OMAP_2430OSK)  += board-2430osk.o
>  obj-$(CONFIG_MACH_OMAP_3430SDP)  += board-3430sdp.o \
>  board-sdp-hsmmc.o \
> -board-3430sdp-usb.o \
> +usb-musb.o \
>  board-3430sdp-flash.o
>  obj-$(CONFIG_MACH_OMAP3EVM)  += board-omap3evm.o
>  obj-$(CONFIG_MACH_OMAP3_BEAGLE)  += board-omap3beagle.o \
> diff --git a/arch/arm/mach-omap2/board-2430sdp-usb.c 
> b/arch/arm/mach-omap2/board-2430sdp-usb.c
> deleted file mode 100644
> index cfbf73e..000
> --- a/arch/arm/mach-omap2/board-2430sdp-usb.c
> +++ /dev/null
> @@ -1,96 +0,0 @@
> -/*
> - * linux/arch/arm/mach-omap2/board-2430sdp-usb.c
> - *
> - * Copyright (C) 2007 MontaVista Software, Inc. <[EMAIL PROTECTED]>
> - * Author: Kevin Hilman
> - *
> - * This program is free software; you can redistribute it and/or modify
> - * it under the terms of the GNU General Public License version 2 as
> - * published by the Free Software Foundation.
> - */
> -
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -#include 
> -
> -#include 
> -#include 
> -#include 
> -
> -static struct resource musb_resources[] = {
> - [0] = {
> - .start  = OMAP243X_HS_BASE,
> - .end= OMAP243X_HS_BASE + SZ_8K - 1,
> - .flags  = IORESOURCE_MEM,
> - },
> - [1] = { /* general IRQ */
> - .start  = INT_243X_HS_USB_MC,
> - .flags  = IORESOURCE_IRQ,
> - },
> - [2] = { /* DMA IRQ */
> - .start  = INT_243X_HS_USB_DMA,
> - .flags  = IORESOURCE_IRQ,
> - },
> -};
> -
> -static int usbhs_ick_on;
> -
> -static int musb_set_clock(struct clk *clk, int state)
> -{
> -   if (state) {
> -   if (usbhs_ick_on > 0)
> -   return -ENODEV;
> -
> -   omap2_block_sleep();
> -   clk_enable(clk);
> -   usbhs_ick_on = 1;
> -   } else {
> -   if (usbhs_ick_on == 0)
> -   return -ENODEV;
> -
> -   clk_disable(clk);
> -   usbhs_ick_on = 0;
> -   omap2_allow_sleep();
> -   }
> -
> -   return 0;
> -}
> -
> -static struct musb_hdrc_platform_data musb_plat = {
> -#ifdef CONFIG_USB_MUSB_OTG
> - .mode   = MUSB_OTG,
> -#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
> - .mode   = MUSB_HOST,
> -#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
> - .mode   = MUSB_PERIPHERAL,
> -#endif
> - .multipoint = 1,
> - .clock  = "usbhs_ick",
> - .set_clock  = musb_set_clock,
> -};
> -
> -static u64 musb_dmamask = ~(u32)0;
> -
> -static struct platform_device musb_device = {
> - .name   = "musb_hdrc",
> - .id = 0,
> - .dev = {
> - .dma_mask   = &musb_dmamask,
> - .coherent_dma_mask  = 0x,
> - .platform_data  = &musb_plat,
> - },
> - .num_resources  = ARRAY_SIZE(musb_resources),
> - .resource   = musb_resources,
> -};
> -
> -void __init sdp2430_usb_init(void)
> -{
> - if (platform_device_register(&musb_device) < 0) {
> - printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
> - return;
> - }
> -}
> -
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
> b/arch/arm/mach-omap2/board-2430sdp.c
> index 76bbe06..623c38e 100644
> --- 

Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Tony Lindgren
* Gadiyar, Anand <[EMAIL PROTECTED]> [080424 07:17]:
> > -Original Message-
> > From: [EMAIL PROTECTED] 
> > [mailto:[EMAIL PROTECTED] On Behalf Of Felipe Balbi
> > Sent: Thursday, April 24, 2008 7:16 PM
> > To: linux-omap@vger.kernel.org; David Brownell
> > Cc: Tony Lindgren; Syed Mohammed, Khasim; Felipe Balbi
> > Subject: [PATCH 2/2] USB: Generalize usb initialization for omap hw
> > 
> > Create a generic board-file for initializing usb
> > on omap2430 and omap3 boards.
> > 
> > Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> > ---
> >  arch/arm/mach-omap2/Makefile   |4 +-
> >  arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
> > 
> >  arch/arm/mach-omap2/board-2430sdp.c|3 +-
> >  arch/arm/mach-omap2/board-3430sdp.c|3 +-
> >  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
> >  include/asm-arm/arch-omap/usb-musb.h   |   35 +++
> 
> usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.

This is all musb stuff, no? If not, there should be a separate
usb-ehci.c.

Tony


> >  6 files changed, 61 insertions(+), 112 deletions(-)
> >  delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
> >  rename arch/arm/mach-omap2/{board-3430sdp-usb.c => usb-musb.c} (91%)
> >  create mode 100644 include/asm-arm/arch-omap/usb-musb.h
> > 
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080424 07:20]:
> On Thu, Apr 24, 2008 at 07:43:16PM +0530, ext Gadiyar, Anand wrote:
> > > -Original Message-
> > > From: [EMAIL PROTECTED] 
> > > [mailto:[EMAIL PROTECTED] On Behalf Of Felipe Balbi
> > > Sent: Thursday, April 24, 2008 7:16 PM
> > > To: linux-omap@vger.kernel.org; David Brownell
> > > Cc: Tony Lindgren; Syed Mohammed, Khasim; Felipe Balbi
> > > Subject: [PATCH 2/2] USB: Generalize usb initialization for omap hw
> > > 
> > > Create a generic board-file for initializing usb
> > > on omap2430 and omap3 boards.
> > > 
> > > Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> > > ---
> > >  arch/arm/mach-omap2/Makefile   |4 +-
> > >  arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
> > > 
> > >  arch/arm/mach-omap2/board-2430sdp.c|3 +-
> > >  arch/arm/mach-omap2/board-3430sdp.c|3 +-
> > >  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
> > >  include/asm-arm/arch-omap/usb-musb.h   |   35 +++
> > 
> > usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.
> 
> that's true, you suggest any other name ?
> 
> maybe omap-usb.[ch] ?

Sorry, I missed this post. I suggested separating out EHCI stuff to
usb-ehci.c as they can be compiled in separately.

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


Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Felipe Balbi
On Thu, Apr 24, 2008 at 10:16:18AM -0700, Tony Lindgren wrote:
> * Felipe Balbi <[EMAIL PROTECTED]> [080424 07:20]:
> > On Thu, Apr 24, 2008 at 07:43:16PM +0530, ext Gadiyar, Anand wrote:
> > > > -Original Message-
> > > > From: [EMAIL PROTECTED] 
> > > > [mailto:[EMAIL PROTECTED] On Behalf Of Felipe Balbi
> > > > Sent: Thursday, April 24, 2008 7:16 PM
> > > > To: linux-omap@vger.kernel.org; David Brownell
> > > > Cc: Tony Lindgren; Syed Mohammed, Khasim; Felipe Balbi
> > > > Subject: [PATCH 2/2] USB: Generalize usb initialization for omap hw
> > > > 
> > > > Create a generic board-file for initializing usb
> > > > on omap2430 and omap3 boards.
> > > > 
> > > > Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> > > > ---
> > > >  arch/arm/mach-omap2/Makefile   |4 +-
> > > >  arch/arm/mach-omap2/board-2430sdp-usb.c|   96 
> > > > 
> > > >  arch/arm/mach-omap2/board-2430sdp.c|3 +-
> > > >  arch/arm/mach-omap2/board-3430sdp.c|3 +-
> > > >  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
> > > >  include/asm-arm/arch-omap/usb-musb.h   |   35 +++
> > > 
> > > usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.
> > 
> > that's true, you suggest any other name ?
> > 
> > maybe omap-usb.[ch] ?
> 
> Sorry, I missed this post. I suggested separating out EHCI stuff to
> usb-ehci.c as they can be compiled in separately.

K, I'll do it :-)

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


Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread David Brownell
On Thursday 24 April 2008, Tony Lindgren wrote:
> > > >  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---

Good:  so some of the inappropriate sdp_*() names will vanish ...


> > > >  include/asm-arm/arch-omap/usb-musb.h               |   35 +++
> > > 
> > > usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.
> > 
> > that's true, you suggest any other name ?
> > 
> > maybe omap-usb.[ch] ?
> 
> Sorry, I missed this post. I suggested separating out EHCI stuff to
> usb-ehci.c as they can be compiled in separately.

Sounds right to me.  Dis-entange that stuff.

- Dave

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


Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Felipe Balbi
On Thu, Apr 24, 2008 at 11:29:27AM -0700, David Brownell wrote:
> On Thursday 24 April 2008, Tony Lindgren wrote:
> > > > >  .../mach-omap2/{board-3430sdp-usb.c => usb-musb.c} |   32 ---
> 
> Good:  so some of the inappropriate sdp_*() names will vanish ...
> 
> 
> > > > >  include/asm-arm/arch-omap/usb-musb.h               |   35 +++
> > > > 
> > > > usb-musb.{c,h}? EHCI/OHCI has nothing to do with mentor.
> > > 
> > > that's true, you suggest any other name ?
> > > 
> > > maybe omap-usb.[ch] ?
> > 
> > Sorry, I missed this post. I suggested separating out EHCI stuff to
> > usb-ehci.c as they can be compiled in separately.
> 
> Sounds right to me.  Dis-entange that stuff.

How about the header, introduce usb-musb.h and usb-ehci.h or usb.h is
enough ??

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


[PATCH] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Felipe Balbi
Create a generic board-file for initializing usb
on omap2430 and omap3 boards.

Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile|6 +-
 arch/arm/mach-omap2/board-2430sdp-usb.c |   96 
 arch/arm/mach-omap2/board-2430sdp.c |5 +-
 arch/arm/mach-omap2/board-3430sdp-usb.c |  241 ---
 arch/arm/mach-omap2/board-3430sdp.c |5 +-
 arch/arm/mach-omap2/usb-ehci.c  |  162 +
 arch/arm/mach-omap2/usb-musb.c  |  116 +++
 include/asm-arm/arch-omap/usb-ehci.h|   35 +
 include/asm-arm/arch-omap/usb-musb.h|   35 +
 9 files changed, 360 insertions(+), 341 deletions(-)
 delete mode 100644 arch/arm/mach-omap2/board-2430sdp-usb.c
 delete mode 100644 arch/arm/mach-omap2/board-3430sdp-usb.c
 create mode 100644 arch/arm/mach-omap2/usb-ehci.c
 create mode 100644 arch/arm/mach-omap2/usb-musb.c
 create mode 100644 include/asm-arm/arch-omap/usb-ehci.h
 create mode 100644 include/asm-arm/arch-omap/usb-musb.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index c37df1a..9b6f60e 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -29,11 +29,13 @@ obj-$(CONFIG_MACH_OMAP_H4)  += board-h4.o 
board-h4-mmc.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)+= board-2430sdp.o \
   board-2430sdp-flash.o \
   board-sdp-hsmmc.o \
-  board-2430sdp-usb.o
+  usb-musb.o \
+  usb-ehci.o
 obj-$(CONFIG_MACH_OMAP_2430OSK)+= board-2430osk.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-3430sdp.o \
   board-sdp-hsmmc.o \
-  board-3430sdp-usb.o \
+  usb-musb.o \
+  usb-ehci.o \
   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
diff --git a/arch/arm/mach-omap2/board-2430sdp-usb.c 
b/arch/arm/mach-omap2/board-2430sdp-usb.c
deleted file mode 100644
index cfbf73e..000
--- a/arch/arm/mach-omap2/board-2430sdp-usb.c
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * linux/arch/arm/mach-omap2/board-2430sdp-usb.c
- *
- * Copyright (C) 2007 MontaVista Software, Inc. <[EMAIL PROTECTED]>
- * Author: Kevin Hilman
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
-#include 
-#include 
-#include 
-
-static struct resource musb_resources[] = {
-   [0] = {
-   .start  = OMAP243X_HS_BASE,
-   .end= OMAP243X_HS_BASE + SZ_8K - 1,
-   .flags  = IORESOURCE_MEM,
-   },
-   [1] = { /* general IRQ */
-   .start  = INT_243X_HS_USB_MC,
-   .flags  = IORESOURCE_IRQ,
-   },
-   [2] = { /* DMA IRQ */
-   .start  = INT_243X_HS_USB_DMA,
-   .flags  = IORESOURCE_IRQ,
-   },
-};
-
-static int usbhs_ick_on;
-
-static int musb_set_clock(struct clk *clk, int state)
-{
-   if (state) {
-   if (usbhs_ick_on > 0)
-   return -ENODEV;
-
-   omap2_block_sleep();
-   clk_enable(clk);
-   usbhs_ick_on = 1;
-   } else {
-   if (usbhs_ick_on == 0)
-   return -ENODEV;
-
-   clk_disable(clk);
-   usbhs_ick_on = 0;
-   omap2_allow_sleep();
-   }
-
-   return 0;
-}
-
-static struct musb_hdrc_platform_data musb_plat = {
-#ifdef CONFIG_USB_MUSB_OTG
-   .mode   = MUSB_OTG,
-#elif defined(CONFIG_USB_MUSB_HDRC_HCD)
-   .mode   = MUSB_HOST,
-#elif defined(CONFIG_USB_GADGET_MUSB_HDRC)
-   .mode   = MUSB_PERIPHERAL,
-#endif
-   .multipoint = 1,
-   .clock  = "usbhs_ick",
-   .set_clock  = musb_set_clock,
-};
-
-static u64 musb_dmamask = ~(u32)0;
-
-static struct platform_device musb_device = {
-   .name   = "musb_hdrc",
-   .id = 0,
-   .dev = {
-   .dma_mask   = &musb_dmamask,
-   .coherent_dma_mask  = 0x,
-   .platform_data  = &musb_plat,
-   },
-   .num_resources  = ARRAY_SIZE(musb_resources),
-   .resource   = musb_resources,
-};
-
-void __init sdp2430_usb_init(void)
-{
-   if (platform_device_register(&musb_device) < 0) {
-   printk(KERN_ERR "Unable to register HS-USB (MUSB) device\n");
-   r

usb generalization

2008-04-24 Thread Felipe Balbi
Hi all,

Here's an updated version of the usb generalization.

Please give it a good review, it might be that I missed something in the
middle although it seems to be working nice in my 3430sdp.

I need someone to test on 2430sdp and give it an ack as well.

Here's some output from minicom:

ehci-omap ehci-omap.0: new USB bus registered, assigned bus number 1
ehci-omap ehci-omap.0: irq 77, io mem 0x48064800
ehci-omap ehci-omap.0: USB 0.0 started, EHCI 1.00, driver 10 Dec 2004
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb1: Product: OMAP-EHCI Host Controller
usb usb1: Manufacturer: Linux 2.6.25-omap1-08065-g11978e7 ehci_hcd
usb usb1: SerialNumber: ehci-omap.0
zero gadget: Gadget Zero, version: Lughnasadh, 2007
zero gadget: using musb_hdrc, OUT ep1out IN ep1in
musb_hdrc musb_hdrc.0: MUSB HDRC host driver
musb_hdrc musb_hdrc.0: new USB bus registered, assigned bus number 2
usb usb2: configuration #1 chosen from 1 choice
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
usb usb2: Product: MUSB HDRC host driver
usb usb2: Manufacturer: Linux 2.6.25-omap1-08065-g11978e7 musb-hcd
usb usb2: SerialNumber: musb_hdrc.0

BR,
- Balbi

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


Re: [PATCH 2/2] USB: Generalize usb initialization for omap hw

2008-04-24 Thread David Brownell
On Thursday 24 April 2008, Felipe Balbi wrote:
> 
> > > Sorry, I missed this post. I suggested separating out EHCI stuff to
> > > usb-ehci.c as they can be compiled in separately.
> > 
> > Sounds right to me.  Dis-entangle that stuff.
> 
> How about the header, introduce usb-musb.h and usb-ehci.h or usb.h is
> enough ??

Your call.



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


Re: [PATCH] USB: Generalize usb initialization for omap hw

2008-04-24 Thread David Brownell
Looks better to me, but:

On Thursday 24 April 2008, Felipe Balbi wrote:
> +static void setup_ehci_io_mux(void)
> +{
> +#ifdef CONFIG_OMAP_EHCI_PHY_MODE

This PHY_MODE thing should probably be provided by the board
data not Kconfig, and

> +   /* PHY mode of operation for board: 750-2083-001
> +    * ISP1504 connected to Port1 and Port2
> +    * Do Func Mux setting for 12-pin ULPI PHY mode
> +    */
> +
> +   /* Port1 */
> +   omap_cfg_reg(Y9_3430_USB1HS_PHY_STP);
> +   omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK);
>   ...

All those MUX options should be driven by the board data too.

Unless it's for some reason not possible to configure only one
of the three EHCI ports at a time...

This patch being cleanup-only, I don't suggest you fix that
at this time.

- Dave



> +
> +#else
> +   /* Set Func mux for :
> +    * TLL mode of operation
> +    * 12-pin ULPI SDR TLL mode for Port1/2/3
> +    */
> +
> +   /* Port1 */
> +   omap_cfg_reg(Y9_3430_USB1HS_TLL_STP);
> +   omap_cfg_reg(Y8_3430_USB1HS_TLL_CLK);
> +     ...
> +#endif /* CONFIG_OMAP_EHCI_PHY_MODE */
> +
> +   return;
> +}


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


[PATCH] ARM: OMAP: Fix MMC2 device configuration for OMAP2430

2008-04-24 Thread Seth Forshee
Currently the MMC2 device configuration is defined for OMAP2430
when CONFIG_ARCH_OMAP243X is defined.  This should be
CONFIG_ARCH_OMAP2430.

Signed-off-by: Seth Forshee <[EMAIL PROTECTED]>
---
 arch/arm/plat-omap/devices.c |6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
index 6f07451..099182b 100644
--- a/arch/arm/plat-omap/devices.c
+++ b/arch/arm/plat-omap/devices.c
@@ -202,7 +202,7 @@ static struct platform_device mmc_omap_device1 = {
.resource   = mmc1_resources,
 };
 
-#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \
defined(CONFIG_ARCH_OMAP34XX)
 
 static struct omap_mmc_platform_data mmc2_data;
@@ -251,7 +251,7 @@ static void __init omap_init_mmc(void)
if (mmc->enabled)
(void) platform_device_register(&mmc_omap_device1);
 
-#if defined(CONFIG_ARCH_OMAP243X) || defined(CONFIG_ARCH_OMAP34XX)
+#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX)
mmc = &mmc_conf->mmc[1];
if (mmc->enabled)
(void) platform_device_register(&mmc_omap_device2);
@@ -349,7 +349,7 @@ void omap_set_mmc_info(int host, const struct 
omap_mmc_platform_data *info)
case 1:
mmc1_data = *info;
break;
-#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
+#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \
defined(CONFIG_ARCH_OMAP34XX)
case 2:
mmc2_data = *info;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] ARM: OMAP: omap3beagle: register SD interface

2008-04-24 Thread Koen Kooi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Op 24 apr 2008, om 02:21 heeft Tony Lindgren het volgende geschreven:

Hi,

* Koen Kooi <[EMAIL PROTECTED]> [080423 00:42]:
From dac3cdc5952ab39fa7ae0545d43e2daa95329b07 Mon Sep 17 00:00:00  
2001

From: Koen Kooi <[EMAIL PROTECTED]>
Date: Wed, 23 Apr 2008 09:38:31 +0200
Subject: [PATCH] omap3beagle: register SD interface


Thanks for updating it. I've pushed it now, but I had to apply some
parts manually because of recent changes. Can you please check it
got applied OK?


I compiled an booted latest git and see this:

6>TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter [1]
<1>Unable to handle kernel NULL pointer dereference at virtual address  


<1>pgd = c0004000
<1>[] *pgd=
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0Not tainted  (2.6.25-omap1 #11)
PC is at __rcu_process_callbacks+0x1ac/0x244
LR is at free_task+0x38/0x40
pc : []lr : []psr: 8113
sp : c7c1dda8  ip : c7c085c0  fp : c7c1ddc4
r10:   r9 : c0405678  r8 : 0001
r7 : c0400d80  r6 : 0005  r5 :   r4 : c040563c
r3 :   r2 : 0027  r1 : c7c78340  r0 : c7c085c0
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 00c5387f  Table: 80004018  DAC: 0017
Process swapper (pid: 1, stack limit = 0xc7c1c2e0)
Stack: (0xc7c1dda8 to 0xc7c1e000)
dda0:   c02fae30 c0400e04 0001 0008 c7c1ddd4  
c7c1ddc8
ddc0: c00739d4 c0073784 c7c1de04 c7c1ddd8 c004f6f4 c00739c8 c7c1de04  
c03dd4e0
dde0: 0025  c03fc8f5 c7c1df14 c03ece00 0049 c7c1de1c  
c7c1de08
de00: c004f79c c004f6a0 c03dd4e0 c03dd4e0 c7c1de3c c7c1de20 c002c050  
c004f760
de20: 0010  d820  c7c1defc c7c1de40 c002c630  
c002c00c
de40: c03daec8 07f0  4013 c03fc8ac c03ed158   
c03fc8f5
de60: c7c1df14 c03ece00 0049 c7c1defc c7c1de58 c7c1de88 c004ab10  
c004b228
de80: 6013  c7c1dea4 c7c1dea4 c7c1dee4 4013 c02faabc  
c0067800
dea0: c0194a14     c7ca0470 c7c1dee4  
c7c1dec8
dec0: c02fadd0 c0067534  c7ca0470 c03ece58 c03ecff8 c03ed158  

dee0: 0001 c7ca0438 c03ece00 c7ca05ac c7c1df0c c7c1df00 c03b2c00  
c004af70
df00: c7c1df54 c7c1df20 c01ad5e0 c03b2bf4 c03989af c03ed158 c7ca05ac  
0001
df20: c03ece00   c7ca0438 c03ece00 c03ec870   
c7c1c000
df40:  c0027404 c7c1df74 c7c1df58 c01aa41c c01ad524   
c00260bc
df60:   c7c1df84 c7c1df78 c001c870 c01aa37c c7c1dff4  
c7c1df88
df80: c0008620 c001c864 c7c1dfac c7c1df98 c004801c c0047ea4 307ffe12  

dfa0:  c7c1dfb0 c002cb04 c0048004   c0008550  
c004d8f8
dfc0:  0001       

dfe0:    c7c1dff8 c004d8f8 c000855c 002ffe02  
0073ecca

Backtrace:
[] (__rcu_process_callbacks+0x0/0x244) from []  
(rcu_process_callbacks+0x18/0x38)

 r6:0008 r5:0001 r4:c0400e04
[] (rcu_process_callbacks+0x0/0x38) from []  
(__do_softirq+0x60/0xc0)
[] (__do_softirq+0x0/0xc0) from [] (irq_exit 
+0x48/0x88)
[] (irq_exit+0x0/0x88) from []  
(__exception_text_start+0x50/0x68)

 r4:c03dd4e0
[] (__exception_text_start+0x0/0x68) from []  
(__irq_svc+0x30/0x80)

Exception stack(0xc7c1de40 to 0xc7c1de88)
de40: c03daec8 07f0  4013 c03fc8ac c03ed158   
c03fc8f5
de60: c7c1df14 c03ece00 0049 c7c1defc c7c1de58 c7c1de88 c004ab10  
c004b228

de80: 6013 
 r6: r5:d820 r4:
[] (vprintk+0x0/0x30c) from [] (printk+0x1c/0x24)
[] (printk+0x0/0x24) from []  
(twl4030_attach_adapter+0xc8/0x69c)

 r3:0001 r2:c7ca05ac r1:c03ed158 r0:c03989af
[] (twl4030_attach_adapter+0x0/0x69c) from []  
(i2c_register_driver+0xac/0xf8)
[] (i2c_register_driver+0x0/0xf8) from []  
(twl4030_init+0x18/0x20)

 r7: r6: r5:c00260bc r4:
[] (twl4030_init+0x0/0x20) from [] (kernel_init 
+0xd0/0x29c)
[] (kernel_init+0x0/0x29c) from [] (do_exit 
+0x0/0x5ec)

Code: e5943024 e353 099da870 e3a06000 (e5935000)
<0>Kernel panic - not syncing: Fatal exception in interrupt

More bootlogs at 
http://amethyst.openembedded.net/~koen/beagleboard/beagle-i2c-crash.txt

I suspect it's somewhere in i2c, but I have no proof for that. Any  
quick guesses what might be causing this?


regards,

Koen

-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFIEOV5MkyGM64RGpERAoIlAKCl71J80g7O8yLnmQC53DPIrNYmwQCfV9kq
PRME+NAiBykLP575dTjMocM=
=1y57
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] ARM: OMAP: omap3beagle: register SD interface

2008-04-24 Thread Tony Lindgren
* Koen Kooi <[EMAIL PROTECTED]> [080424 12:54]:
> 
> Op 24 apr 2008, om 02:21 heeft Tony Lindgren het volgende geschreven:
> > Hi,
> >
> > * Koen Kooi <[EMAIL PROTECTED]> [080423 00:42]:
> >> From dac3cdc5952ab39fa7ae0545d43e2daa95329b07 Mon Sep 17 00:00:00  
> >> 2001
> >> From: Koen Kooi <[EMAIL PROTECTED]>
> >> Date: Wed, 23 Apr 2008 09:38:31 +0200
> >> Subject: [PATCH] omap3beagle: register SD interface
> >
> > Thanks for updating it. I've pushed it now, but I had to apply some
> > parts manually because of recent changes. Can you please check it
> > got applied OK?
> 
> I compiled an booted latest git and see this:
> 
> 6>TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter [1]
> <1>Unable to handle kernel NULL pointer dereference at virtual address  
> 
> <1>pgd = c0004000
> <1>[] *pgd=
> Internal error: Oops: 5 [#1]
> Modules linked in:
> CPU: 0Not tainted  (2.6.25-omap1 #11)
> PC is at __rcu_process_callbacks+0x1ac/0x244
> LR is at free_task+0x38/0x40
> pc : []lr : []psr: 8113
> sp : c7c1dda8  ip : c7c085c0  fp : c7c1ddc4
> r10:   r9 : c0405678  r8 : 0001
> r7 : c0400d80  r6 : 0005  r5 :   r4 : c040563c
> r3 :   r2 : 0027  r1 : c7c78340  r0 : c7c085c0
> Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
> Control: 00c5387f  Table: 80004018  DAC: 0017
> Process swapper (pid: 1, stack limit = 0xc7c1c2e0)
> Stack: (0xc7c1dda8 to 0xc7c1e000)
> dda0:   c02fae30 c0400e04 0001 0008 c7c1ddd4  
> c7c1ddc8
> ddc0: c00739d4 c0073784 c7c1de04 c7c1ddd8 c004f6f4 c00739c8 c7c1de04  
> c03dd4e0
> dde0: 0025  c03fc8f5 c7c1df14 c03ece00 0049 c7c1de1c  
> c7c1de08
> de00: c004f79c c004f6a0 c03dd4e0 c03dd4e0 c7c1de3c c7c1de20 c002c050  
> c004f760
> de20: 0010  d820  c7c1defc c7c1de40 c002c630  
> c002c00c
> de40: c03daec8 07f0  4013 c03fc8ac c03ed158   
> c03fc8f5
> de60: c7c1df14 c03ece00 0049 c7c1defc c7c1de58 c7c1de88 c004ab10  
> c004b228
> de80: 6013  c7c1dea4 c7c1dea4 c7c1dee4 4013 c02faabc  
> c0067800
> dea0: c0194a14     c7ca0470 c7c1dee4  
> c7c1dec8
> dec0: c02fadd0 c0067534  c7ca0470 c03ece58 c03ecff8 c03ed158  
> 
> dee0: 0001 c7ca0438 c03ece00 c7ca05ac c7c1df0c c7c1df00 c03b2c00  
> c004af70
> df00: c7c1df54 c7c1df20 c01ad5e0 c03b2bf4 c03989af c03ed158 c7ca05ac  
> 0001
> df20: c03ece00   c7ca0438 c03ece00 c03ec870   
> c7c1c000
> df40:  c0027404 c7c1df74 c7c1df58 c01aa41c c01ad524   
> c00260bc
> df60:   c7c1df84 c7c1df78 c001c870 c01aa37c c7c1dff4  
> c7c1df88
> df80: c0008620 c001c864 c7c1dfac c7c1df98 c004801c c0047ea4 307ffe12  
> 
> dfa0:  c7c1dfb0 c002cb04 c0048004   c0008550  
> c004d8f8
> dfc0:  0001       
> 
> dfe0:    c7c1dff8 c004d8f8 c000855c 002ffe02  
> 0073ecca
> Backtrace:
> [] (__rcu_process_callbacks+0x0/0x244) from []  
> (rcu_process_callbacks+0x18/0x38)
>   r6:0008 r5:0001 r4:c0400e04
> [] (rcu_process_callbacks+0x0/0x38) from []  
> (__do_softirq+0x60/0xc0)
> [] (__do_softirq+0x0/0xc0) from [] (irq_exit 
> +0x48/0x88)
> [] (irq_exit+0x0/0x88) from []  
> (__exception_text_start+0x50/0x68)
>   r4:c03dd4e0
> [] (__exception_text_start+0x0/0x68) from []  
> (__irq_svc+0x30/0x80)
> Exception stack(0xc7c1de40 to 0xc7c1de88)
> de40: c03daec8 07f0  4013 c03fc8ac c03ed158   
> c03fc8f5
> de60: c7c1df14 c03ece00 0049 c7c1defc c7c1de58 c7c1de88 c004ab10  
> c004b228
> de80: 6013 
>   r6: r5:d820 r4:
> [] (vprintk+0x0/0x30c) from [] (printk+0x1c/0x24)
> [] (printk+0x0/0x24) from []  
> (twl4030_attach_adapter+0xc8/0x69c)
>   r3:0001 r2:c7ca05ac r1:c03ed158 r0:c03989af
> [] (twl4030_attach_adapter+0x0/0x69c) from []  
> (i2c_register_driver+0xac/0xf8)
> [] (i2c_register_driver+0x0/0xf8) from []  
> (twl4030_init+0x18/0x20)
>   r7: r6: r5:c00260bc r4:
> [] (twl4030_init+0x0/0x20) from [] (kernel_init 
> +0xd0/0x29c)
> [] (kernel_init+0x0/0x29c) from [] (do_exit 
> +0x0/0x5ec)
> Code: e5943024 e353 099da870 e3a06000 (e5935000)
> <0>Kernel panic - not syncing: Fatal exception in interrupt
> 
> More bootlogs at 
> http://amethyst.openembedded.net/~koen/beagleboard/beagle-i2c-crash.txt
> 
> I suspect it's somewhere in i2c, but I have no proof for that. Any  
> quick guesses what might be causing this?

Can you try if reverting following helps?

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=38c50a71591628c38206aa402500074a6137a4dc

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


Re: [PATCH 1/1] ARM: OMAP: omap3beagle: register SD interface

2008-04-24 Thread Tony Lindgren
* Tony Lindgren <[EMAIL PROTECTED]> [080424 13:00]:
> * Koen Kooi <[EMAIL PROTECTED]> [080424 12:54]:
> > 
> > Op 24 apr 2008, om 02:21 heeft Tony Lindgren het volgende geschreven:
> > > Hi,
> > >
> > > * Koen Kooi <[EMAIL PROTECTED]> [080423 00:42]:
> > >> From dac3cdc5952ab39fa7ae0545d43e2daa95329b07 Mon Sep 17 00:00:00  
> > >> 2001
> > >> From: Koen Kooi <[EMAIL PROTECTED]>
> > >> Date: Wed, 23 Apr 2008 09:38:31 +0200
> > >> Subject: [PATCH] omap3beagle: register SD interface
> > >
> > > Thanks for updating it. I've pushed it now, but I had to apply some
> > > parts manually because of recent changes. Can you please check it
> > > got applied OK?
> > 
> > I compiled an booted latest git and see this:
> > 
> > 6>TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter [1]
> > <1>Unable to handle kernel NULL pointer dereference at virtual address  
> > 
> > <1>pgd = c0004000
> > <1>[] *pgd=
> > Internal error: Oops: 5 [#1]
> > Modules linked in:
> > CPU: 0Not tainted  (2.6.25-omap1 #11)
> > PC is at __rcu_process_callbacks+0x1ac/0x244
> > LR is at free_task+0x38/0x40
> > pc : []lr : []psr: 8113
> > sp : c7c1dda8  ip : c7c085c0  fp : c7c1ddc4
> > r10:   r9 : c0405678  r8 : 0001
> > r7 : c0400d80  r6 : 0005  r5 :   r4 : c040563c
> > r3 :   r2 : 0027  r1 : c7c78340  r0 : c7c085c0
> > Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
> > Control: 00c5387f  Table: 80004018  DAC: 0017
> > Process swapper (pid: 1, stack limit = 0xc7c1c2e0)
> > Stack: (0xc7c1dda8 to 0xc7c1e000)
> > dda0:   c02fae30 c0400e04 0001 0008 c7c1ddd4  
> > c7c1ddc8
> > ddc0: c00739d4 c0073784 c7c1de04 c7c1ddd8 c004f6f4 c00739c8 c7c1de04  
> > c03dd4e0
> > dde0: 0025  c03fc8f5 c7c1df14 c03ece00 0049 c7c1de1c  
> > c7c1de08
> > de00: c004f79c c004f6a0 c03dd4e0 c03dd4e0 c7c1de3c c7c1de20 c002c050  
> > c004f760
> > de20: 0010  d820  c7c1defc c7c1de40 c002c630  
> > c002c00c
> > de40: c03daec8 07f0  4013 c03fc8ac c03ed158   
> > c03fc8f5
> > de60: c7c1df14 c03ece00 0049 c7c1defc c7c1de58 c7c1de88 c004ab10  
> > c004b228
> > de80: 6013  c7c1dea4 c7c1dea4 c7c1dee4 4013 c02faabc  
> > c0067800
> > dea0: c0194a14     c7ca0470 c7c1dee4  
> > c7c1dec8
> > dec0: c02fadd0 c0067534  c7ca0470 c03ece58 c03ecff8 c03ed158  
> > 
> > dee0: 0001 c7ca0438 c03ece00 c7ca05ac c7c1df0c c7c1df00 c03b2c00  
> > c004af70
> > df00: c7c1df54 c7c1df20 c01ad5e0 c03b2bf4 c03989af c03ed158 c7ca05ac  
> > 0001
> > df20: c03ece00   c7ca0438 c03ece00 c03ec870   
> > c7c1c000
> > df40:  c0027404 c7c1df74 c7c1df58 c01aa41c c01ad524   
> > c00260bc
> > df60:   c7c1df84 c7c1df78 c001c870 c01aa37c c7c1dff4  
> > c7c1df88
> > df80: c0008620 c001c864 c7c1dfac c7c1df98 c004801c c0047ea4 307ffe12  
> > 
> > dfa0:  c7c1dfb0 c002cb04 c0048004   c0008550  
> > c004d8f8
> > dfc0:  0001       
> > 
> > dfe0:    c7c1dff8 c004d8f8 c000855c 002ffe02  
> > 0073ecca
> > Backtrace:
> > [] (__rcu_process_callbacks+0x0/0x244) from []  
> > (rcu_process_callbacks+0x18/0x38)
> >   r6:0008 r5:0001 r4:c0400e04
> > [] (rcu_process_callbacks+0x0/0x38) from []  
> > (__do_softirq+0x60/0xc0)
> > [] (__do_softirq+0x0/0xc0) from [] (irq_exit 
> > +0x48/0x88)
> > [] (irq_exit+0x0/0x88) from []  
> > (__exception_text_start+0x50/0x68)
> >   r4:c03dd4e0
> > [] (__exception_text_start+0x0/0x68) from []  
> > (__irq_svc+0x30/0x80)
> > Exception stack(0xc7c1de40 to 0xc7c1de88)
> > de40: c03daec8 07f0  4013 c03fc8ac c03ed158   
> > c03fc8f5
> > de60: c7c1df14 c03ece00 0049 c7c1defc c7c1de58 c7c1de88 c004ab10  
> > c004b228
> > de80: 6013 
> >   r6: r5:d820 r4:
> > [] (vprintk+0x0/0x30c) from [] (printk+0x1c/0x24)
> > [] (printk+0x0/0x24) from []  
> > (twl4030_attach_adapter+0xc8/0x69c)
> >   r3:0001 r2:c7ca05ac r1:c03ed158 r0:c03989af
> > [] (twl4030_attach_adapter+0x0/0x69c) from []  
> > (i2c_register_driver+0xac/0xf8)
> > [] (i2c_register_driver+0x0/0xf8) from []  
> > (twl4030_init+0x18/0x20)
> >   r7: r6: r5:c00260bc r4:
> > [] (twl4030_init+0x0/0x20) from [] (kernel_init 
> > +0xd0/0x29c)
> > [] (kernel_init+0x0/0x29c) from [] (do_exit 
> > +0x0/0x5ec)
> > Code: e5943024 e353 099da870 e3a06000 (e5935000)
> > <0>Kernel panic - not syncing: Fatal exception in interrupt
> > 
> > More bootlogs at 
> > http://amethyst.openembedded.net/~koen/beagleboard/beagle-i2c-crash.txt
> > 
> > I suspect it's somewhere in i2c, but I have no proof for that. Any  
> > quick guesses what might be causing this?
> 
> Can you try if reverting following helps?
> 
> http://source.mvista.com/git/g

Re: [PATCH] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Tony Lindgren
* David Brownell <[EMAIL PROTECTED]> [080424 12:07]:
> Looks better to me, but:
> 
> On Thursday 24 April 2008, Felipe Balbi wrote:
> > +static void setup_ehci_io_mux(void)
> > +{
> > +#ifdef CONFIG_OMAP_EHCI_PHY_MODE
> 
> This PHY_MODE thing should probably be provided by the board
> data not Kconfig, and
> 
> > +   /* PHY mode of operation for board: 750-2083-001
> > +    * ISP1504 connected to Port1 and Port2
> > +    * Do Func Mux setting for 12-pin ULPI PHY mode
> > +    */
> > +
> > +   /* Port1 */
> > +   omap_cfg_reg(Y9_3430_USB1HS_PHY_STP);
> > +   omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK);
> > ...
> 
> All those MUX options should be driven by the board data too.
> 
> Unless it's for some reason not possible to configure only one
> of the three EHCI ports at a time...
> 
> This patch being cleanup-only, I don't suggest you fix that
> at this time.

OK, I'll push Felipe's patch today.

Tony



> - Dave
> 
> 
> 
> > +
> > +#else
> > +   /* Set Func mux for :
> > +    * TLL mode of operation
> > +    * 12-pin ULPI SDR TLL mode for Port1/2/3
> > +    */
> > +
> > +   /* Port1 */
> > +   omap_cfg_reg(Y9_3430_USB1HS_TLL_STP);
> > +   omap_cfg_reg(Y8_3430_USB1HS_TLL_CLK);
> > +   ...
> > +#endif /* CONFIG_OMAP_EHCI_PHY_MODE */
> > +
> > +   return;
> > +}
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 1/1] ARM: OMAP: omap3beagle: register SD interface

2008-04-24 Thread Koen Kooi

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Op 24 apr 2008, om 22:00 heeft Tony Lindgren het volgende geschreven:

* Koen Kooi <[EMAIL PROTECTED]> [080424 12:54]:


Op 24 apr 2008, om 02:21 heeft Tony Lindgren het volgende geschreven:

Hi,

* Koen Kooi <[EMAIL PROTECTED]> [080423 00:42]:

From dac3cdc5952ab39fa7ae0545d43e2daa95329b07 Mon Sep 17 00:00:00
2001
From: Koen Kooi <[EMAIL PROTECTED]>
Date: Wed, 23 Apr 2008 09:38:31 +0200
Subject: [PATCH] omap3beagle: register SD interface


Thanks for updating it. I've pushed it now, but I had to apply some
parts manually because of recent changes. Can you please check it
got applied OK?


I compiled an booted latest git and see this:

6>TWL4030: TRY attach Slave TWL4030-ID1 on Adapter OMAP I2C adapter  
[1]
<1>Unable to handle kernel NULL pointer dereference at virtual  
address


<1>pgd = c0004000
<1>[] *pgd=
Internal error: Oops: 5 [#1]
Modules linked in:
CPU: 0Not tainted  (2.6.25-omap1 #11)
PC is at __rcu_process_callbacks+0x1ac/0x244
LR is at free_task+0x38/0x40
pc : []lr : []psr: 8113
sp : c7c1dda8  ip : c7c085c0  fp : c7c1ddc4
r10:   r9 : c0405678  r8 : 0001
r7 : c0400d80  r6 : 0005  r5 :   r4 : c040563c
r3 :   r2 : 0027  r1 : c7c78340  r0 : c7c085c0
Flags: Nzcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
Control: 00c5387f  Table: 80004018  DAC: 0017
Process swapper (pid: 1, stack limit = 0xc7c1c2e0)

More bootlogs at 
http://amethyst.openembedded.net/~koen/beagleboard/beagle-i2c-crash.txt

I suspect it's somewhere in i2c, but I have no proof for that. Any
quick guesses what might be causing this?


Can you try if reverting following helps?

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=commitdiff;h=38c50a71591628c38206aa402500074a6137a4dc


That doesn't seem to make a difference.

regards,

Koen
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFIEPUnMkyGM64RGpERAgO8AJ4l8t+4daVTVsDUVKxQ6sU7tpG+JQCfeqpf
TUDPkP0LNE8sPOOqumMMnGI=
=fL1j
-END PGP SIGNATURE-
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Felipe Balbi
On Thu, Apr 24, 2008 at 01:48:11PM -0700, Tony Lindgren wrote:
> * David Brownell <[EMAIL PROTECTED]> [080424 12:07]:
> > Looks better to me, but:
> > 
> > On Thursday 24 April 2008, Felipe Balbi wrote:
> > > +static void setup_ehci_io_mux(void)
> > > +{
> > > +#ifdef CONFIG_OMAP_EHCI_PHY_MODE
> > 
> > This PHY_MODE thing should probably be provided by the board
> > data not Kconfig, and
> > 
> > > +   /* PHY mode of operation for board: 750-2083-001
> > > +    * ISP1504 connected to Port1 and Port2
> > > +    * Do Func Mux setting for 12-pin ULPI PHY mode
> > > +    */
> > > +
> > > +   /* Port1 */
> > > +   omap_cfg_reg(Y9_3430_USB1HS_PHY_STP);
> > > +   omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK);
> > >   ...
> > 
> > All those MUX options should be driven by the board data too.
> > 
> > Unless it's for some reason not possible to configure only one
> > of the three EHCI ports at a time...
> > 
> > This patch being cleanup-only, I don't suggest you fix that
> > at this time.
> 
> OK, I'll push Felipe's patch today.

Thanks tony, i'll check dave's comments tomorrow then. Maybe i can come
up with some stuff soon.

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] Updates on mcbsp driver

2008-04-24 Thread Felipe Balbi
On Thu, Apr 24, 2008 at 11:54:20AM -0400, Eduardo Valentin wrote:
> From: Eduardo Valentin <[EMAIL PROTECTED]>
> 
> This patch series updates mcbsp driver by transforming it into
> a platform driver. This is a very initial implementation.
> Basically it moves machine specific code to their correct place
> and creates the platform driver necessary structures.
> 
> It must be working for previous boards. For omap34xx it should
> work for mcbsp 1 and 2.
> 
> In order to do not break other places, I tryied to do not change
> previous API. But future improvements are needed.
> 
> Clock definitions for  mcbsp 1 and 2 were also modified to add
> correct support for omap34xx.
> 
> Comments are wellcome.

checkpatch doesn't complain, although i didn't really test it.

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: framebuffer on 2430sdp, configuration and bug

2008-04-24 Thread Felipe Balbi
On Thu, Apr 24, 2008 at 06:57:48PM +0200, Simon Braunschmidt wrote:
> Hi all
> 
> We are running 2.6.24-omap1.
> 
> We have problems to get the framebuffer driver running on a
> SDP2430-VG5.0.1 board. At the moment the LCD stays dark, no penguin to
> be seen, test program not displaying anything, nothing. We tried
> different configurations already but we are not exactly sure which
> Kconfig options are relevant. The sdp2430 defconfig does not work for
> us.
> 
> A .config for a known to be working framebuffer configuration would be
> very helpfull, together with kernel version or git tag.
> 
> Also we are seeing a bug, instability, whatever coming from :
> 
> drivers/video/omap/dispc.c
> 
> in function:
> 
> static irqreturn_t omap_dispc_irq_handler(int irq, void *dev)
> 
> This patch adds extra debug output:
> 
> 
> 
> 
> Index: drivers/video/omap/dispc.c
> ===
> --- drivers/video/omap/dispc.c  (revision 325)
> +++ drivers/video/omap/dispc.c  (working copy)
> @@ -864,8 +864,13 @@
> 
> if (stat & DISPC_IRQ_MASK_ERROR) {
> if (printk_ratelimit()) {
> -   dev_err(dispc.fbdev->dev, "irq error status %04x\n",
> +   dev_err(dispc.fbdev->dev, "irq error status %04x",
> stat & 0x7fff);
> +   printk("%s",(stat & DISPC_IRQ_SYNC_LOST)? "
> DISPC_IRQ_SYNC_LOST " : " ");
> +   printk("%s",(stat &
> DISPC_IRQ_VID2_FIFO_UNDERFLOW)? "DISPC_IRQ_VID2_FIFO_UNDERFLOW " : "
> ");
> +   printk("%s",(stat &
> DISPC_IRQ_VID1_FIFO_UNDERFLOW)? "DISPC_IRQ_VID1_FIFO_UNDERFLOW " : "
> ");
> +   printk("%s",(stat &
> DISPC_IRQ_GFX_FIFO_UNDERFLOW)? "DISPC_IRQ_GFX_FIFO_UNDERFLOW\n" :
> "\n");

It's wrapped and you need to add some spaces before %s in all of them
:-p

In any case, this is only for testing purpose, i think it shouldn't be
applied. I don't have lcd working on 3430sdp as well but never look at
it.

-- 
Best Regards,

Felipe Balbi
[EMAIL PROTECTED]
http://blog.felipebalbi.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 0/5] Updates on mcbsp driver

2008-04-24 Thread Igor Stoppa
On Fri, 2008-04-25 at 00:10 +0300, ext Felipe Balbi wrote:
> On Thu, Apr 24, 2008 at 11:54:20AM -0400, Eduardo Valentin wrote:
> > From: Eduardo Valentin <[EMAIL PROTECTED]>
> > 
> > This patch series updates mcbsp driver by transforming it into
> > a platform driver. This is a very initial implementation.
> > Basically it moves machine specific code to their correct place
> > and creates the platform driver necessary structures.
> > 
> > It must be working for previous boards. For omap34xx it should
> > work for mcbsp 1 and 2.
> > 
> > In order to do not break other places, I tryied to do not change
> > previous API. But future improvements are needed.
> > 
> > Clock definitions for  mcbsp 1 and 2 were also modified to add
> > correct support for omap34xx.
> > 
> > Comments are wellcome.
> 
> checkpatch doesn't complain, although i didn't really test it.

However I'd prefer see this patchset being merged with

[RFC/PATCH  1/1] McBSP support for 2430/34XX

and only later considered for integration.

-- 
Cheers, Igor

---

Igor Stoppa
Next Generation Software
Nokia Devices R&D - Helsinki
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] ARM: OMAP: Fix MMC2 device configuration for OMAP2430

2008-04-24 Thread Tony Lindgren
* Seth Forshee <[EMAIL PROTECTED]> [080424 12:27]:
> Currently the MMC2 device configuration is defined for OMAP2430
> when CONFIG_ARCH_OMAP243X is defined.  This should be
> CONFIG_ARCH_OMAP2430.

Thanks, pushing today.

Tony

> Signed-off-by: Seth Forshee <[EMAIL PROTECTED]>
> ---
>  arch/arm/plat-omap/devices.c |6 +++---
>  1 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm/plat-omap/devices.c b/arch/arm/plat-omap/devices.c
> index 6f07451..099182b 100644
> --- a/arch/arm/plat-omap/devices.c
> +++ b/arch/arm/plat-omap/devices.c
> @@ -202,7 +202,7 @@ static struct platform_device mmc_omap_device1 = {
>   .resource   = mmc1_resources,
>  };
>  
> -#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
> +#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \
>   defined(CONFIG_ARCH_OMAP34XX)
>  
>  static struct omap_mmc_platform_data mmc2_data;
> @@ -251,7 +251,7 @@ static void __init omap_init_mmc(void)
>   if (mmc->enabled)
>   (void) platform_device_register(&mmc_omap_device1);
>  
> -#if defined(CONFIG_ARCH_OMAP243X) || defined(CONFIG_ARCH_OMAP34XX)
> +#if defined(CONFIG_ARCH_OMAP2430) || defined(CONFIG_ARCH_OMAP34XX)
>   mmc = &mmc_conf->mmc[1];
>   if (mmc->enabled)
>   (void) platform_device_register(&mmc_omap_device2);
> @@ -349,7 +349,7 @@ void omap_set_mmc_info(int host, const struct 
> omap_mmc_platform_data *info)
>   case 1:
>   mmc1_data = *info;
>   break;
> -#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP243X) || \
> +#if defined(CONFIG_ARCH_OMAP16XX) || defined(CONFIG_ARCH_OMAP2430) || \
>   defined(CONFIG_ARCH_OMAP34XX)
>   case 2:
>   mmc2_data = *info;
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: Generalize usb initialization for omap hw

2008-04-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080424 14:07]:
> On Thu, Apr 24, 2008 at 01:48:11PM -0700, Tony Lindgren wrote:
> > * David Brownell <[EMAIL PROTECTED]> [080424 12:07]:
> > > Looks better to me, but:
> > > 
> > > On Thursday 24 April 2008, Felipe Balbi wrote:
> > > > +static void setup_ehci_io_mux(void)
> > > > +{
> > > > +#ifdef CONFIG_OMAP_EHCI_PHY_MODE
> > > 
> > > This PHY_MODE thing should probably be provided by the board
> > > data not Kconfig, and
> > > 
> > > > +   /* PHY mode of operation for board: 750-2083-001
> > > > +    * ISP1504 connected to Port1 and Port2
> > > > +    * Do Func Mux setting for 12-pin ULPI PHY mode
> > > > +    */
> > > > +
> > > > +   /* Port1 */
> > > > +   omap_cfg_reg(Y9_3430_USB1HS_PHY_STP);
> > > > +   omap_cfg_reg(Y8_3430_USB1HS_PHY_CLK);
> > > > ...
> > > 
> > > All those MUX options should be driven by the board data too.
> > > 
> > > Unless it's for some reason not possible to configure only one
> > > of the three EHCI ports at a time...
> > > 
> > > This patch being cleanup-only, I don't suggest you fix that
> > > at this time.
> > 
> > OK, I'll push Felipe's patch today.
> 
> Thanks tony, i'll check dave's comments tomorrow then. Maybe i can come
> up with some stuff soon.

Great. While at it, can you also set the TWL4030_IRQNUM during init based
on cpu_is_omap() macros? I already got rid of all the other TWL defines
in board-*.h files as you already probably noticed.

That way we can remove it from the board-*.h files as it would block
compiling in multiple omaps.

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


[PATCH] USB: BEAGLE: Add usb support for omap3beagle

2008-04-24 Thread Felipe Balbi
From: Felipe Balbi <[EMAIL PROTECTED]>

This patch is based on previous patch by
Koen Kooi <[EMAIL PROTECTED]>. It uses
the new generic usb init calls for omap3-
and omap2430-based boards.

Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile|1 +
 arch/arm/mach-omap2/board-omap3beagle.c |4 
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 9b6f60e..725dae5 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -39,6 +39,7 @@ obj-$(CONFIG_MACH_OMAP_3430SDP)   += 
board-3430sdp.o \
   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
+  usb-musb.o usb-ehci.o \
   board-sdp-hsmmc.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
   board-apollon-mmc.o  \
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index c03bb26..ad5ad2e 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -27,6 +27,8 @@
 
 #include 
 #include 
+#include 
+#include 
 #include 
 
 static struct omap_uart_config omap3_beagle_uart_config __initdata = {
@@ -66,6 +68,8 @@ static void __init omap3_beagle_init(void)
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init();
sdp_mmc_init();
+   usb_musb_init();
+   usb_ehci_init();
 }
 
 arch_initcall(omap3_beagle_i2c_init);
-- 
1.5.4.3.447.gc95b3

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


Re: [PATCH 0/5] Updates on mcbsp driver

2008-04-24 Thread Tony Lindgren
* Igor Stoppa <[EMAIL PROTECTED]> [080424 14:20]:
> On Fri, 2008-04-25 at 00:10 +0300, ext Felipe Balbi wrote:
> > On Thu, Apr 24, 2008 at 11:54:20AM -0400, Eduardo Valentin wrote:
> > > From: Eduardo Valentin <[EMAIL PROTECTED]>
> > > 
> > > This patch series updates mcbsp driver by transforming it into
> > > a platform driver. This is a very initial implementation.
> > > Basically it moves machine specific code to their correct place
> > > and creates the platform driver necessary structures.
> > > 
> > > It must be working for previous boards. For omap34xx it should
> > > work for mcbsp 1 and 2.
> > > 
> > > In order to do not break other places, I tryied to do not change
> > > previous API. But future improvements are needed.
> > > 
> > > Clock definitions for  mcbsp 1 and 2 were also modified to add
> > > correct support for omap34xx.
> > > 
> > > Comments are wellcome.
> > 
> > checkpatch doesn't complain, although i didn't really test it.
> 
> However I'd prefer see this patchset being merged with
> 
> [RFC/PATCH  1/1] McBSP support for 2430/34XX
> 
> and only later considered for integration.

Yeah, Chandra and Eduardo, can you guys put together a merged series
of patches?

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


Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

2008-04-24 Thread Tony Lindgren
* Eduardo Valentin <[EMAIL PROTECTED]> [080424 09:03]:
> From: Eduardo Valentin <[EMAIL PROTECTED]>
> 
> This patch adds DMA and IRQ definition for McBSP 1 and 2
> devices for omap34xx based systems.

I'll push this patch only for now.

Tony

> Signed-off-by: Eduardo Valentin <[EMAIL PROTECTED]>
> ---
>  include/asm-arm/arch-omap/dma.h  |4 
>  include/asm-arm/arch-omap/irqs.h |4 
>  2 files changed, 8 insertions(+), 0 deletions(-)
> 
> diff --git a/include/asm-arm/arch-omap/dma.h b/include/asm-arm/arch-omap/dma.h
> index be0431e..270e158 100644
> --- a/include/asm-arm/arch-omap/dma.h
> +++ b/include/asm-arm/arch-omap/dma.h
> @@ -273,6 +273,10 @@
>  #define OMAP24XX_DMA_MS  63  /* S_DMA_62 */
>  #define OMAP242X_DMA_EXT_DMAREQ5 64  /* S_DMA_63 */
>  #define OMAP243X_DMA_EXT_DMAREQ6 64  /* S_DMA_63 */
> +#define OMAP34XX_DMA_MCBSP1_TX   31  /* S_DMA_30 */
> +#define OMAP34XX_DMA_MCBSP1_RX   32  /* S_DMA_31 */
> +#define OMAP34XX_DMA_MCBSP2_TX   33  /* S_DMA_32 */
> +#define OMAP34XX_DMA_MCBSP2_RX   34  /* S_DMA_33 */
>  #define OMAP34XX_DMA_EXT_DMAREQ3 64  /* S_DMA_63 */
>  #define OMAP34XX_DMA_AES2_TX 65  /* S_DMA_64 */
>  #define OMAP34XX_DMA_AES2_RX 66  /* S_DMA_65 */
> diff --git a/include/asm-arm/arch-omap/irqs.h 
> b/include/asm-arm/arch-omap/irqs.h
> index 15446fd..4e185a8 100644
> --- a/include/asm-arm/arch-omap/irqs.h
> +++ b/include/asm-arm/arch-omap/irqs.h
> @@ -316,7 +316,11 @@
>  #define INT_34XX_USIM_IRQ35
>  #define INT_34XX_WDT3_IRQ36
>  #define INT_34XX_SPI4_IRQ48
> +#define INT_34XX_MCBSP1_IRQ_TX   59
> +#define INT_34XX_MCBSP1_IRQ_RX   60
>  #define INT_34XX_I2C3_IRQ61
> +#define INT_34XX_MCBSP2_IRQ_TX   62
> +#define INT_34XX_MCBSP2_IRQ_RX   63
>  #define INT_34XX_PBIAS_IRQ   75
>  #define INT_34XX_OHCI_IRQ76
>  #define INT_34XX_EHCI_IRQ77
> -- 
> 1.5.5.1.67.gbdb8.dirty
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] USB: BEAGLE: Add usb support for omap3beagle

2008-04-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080424 14:45]:
> From: Felipe Balbi <[EMAIL PROTECTED]>
> 
> This patch is based on previous patch by
> Koen Kooi <[EMAIL PROTECTED]>. It uses
> the new generic usb init calls for omap3-
> and omap2430-based boards.

Great, pushing today.

Tony

> Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> ---
>  arch/arm/mach-omap2/Makefile|1 +
>  arch/arm/mach-omap2/board-omap3beagle.c |4 
>  2 files changed, 5 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 9b6f60e..725dae5 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -39,6 +39,7 @@ obj-$(CONFIG_MACH_OMAP_3430SDP) += 
> board-3430sdp.o \
>  board-3430sdp-flash.o
>  obj-$(CONFIG_MACH_OMAP3EVM)  += board-omap3evm.o
>  obj-$(CONFIG_MACH_OMAP3_BEAGLE)  += board-omap3beagle.o \
> +usb-musb.o usb-ehci.o \
>  board-sdp-hsmmc.o
>  obj-$(CONFIG_MACH_OMAP_APOLLON)  += board-apollon.o \
>  board-apollon-mmc.o  \
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index c03bb26..ad5ad2e 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -27,6 +27,8 @@
>  
>  #include 
>  #include 
> +#include 
> +#include 
>  #include 
>  
>  static struct omap_uart_config omap3_beagle_uart_config __initdata = {
> @@ -66,6 +68,8 @@ static void __init omap3_beagle_init(void)
>   omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
>   omap_serial_init();
>   sdp_mmc_init();
> + usb_musb_init();
> + usb_ehci_init();
>  }
>  
>  arch_initcall(omap3_beagle_i2c_init);
> -- 
> 1.5.4.3.447.gc95b3
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to [EMAIL PROTECTED]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


mmc generalization

2008-04-24 Thread Felipe Balbi
Hi all,

The following patch, similarly to usb patch, makes mmc_init
more generic by moving files around and changing function names.

*** COMPILE TESTED ONLY ***

Please give it a review, I might let something out.

BR,

- Balbi

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


[PATCH] OMAP: MMC: Generalize mmc init routine

2008-04-24 Thread Felipe Balbi
Make sdp_mmc_init routine more generic by moving files
around and changing function names.

Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/Makefile   |6 ++--
 arch/arm/mach-omap2/board-2430sdp.c|3 +-
 arch/arm/mach-omap2/board-3430sdp.c|3 +-
 arch/arm/mach-omap2/board-omap3beagle.c|3 +-
 arch/arm/mach-omap2/{board-sdp-hsmmc.c => hsmmc.c} |   35 ++-
 include/asm-arm/arch-omap/hsmmc.h  |   35 
 6 files changed, 62 insertions(+), 23 deletions(-)
 rename arch/arm/mach-omap2/{board-sdp-hsmmc.c => hsmmc.c} (88%)
 create mode 100644 include/asm-arm/arch-omap/hsmmc.h

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 725dae5..512b446 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -28,19 +28,19 @@ obj-$(CONFIG_MACH_OMAP_GENERIC) += 
board-generic.o
 obj-$(CONFIG_MACH_OMAP_H4) += board-h4.o board-h4-mmc.o
 obj-$(CONFIG_MACH_OMAP_2430SDP)+= board-2430sdp.o \
   board-2430sdp-flash.o \
-  board-sdp-hsmmc.o \
+  hsmmc.o \
   usb-musb.o \
   usb-ehci.o
 obj-$(CONFIG_MACH_OMAP_2430OSK)+= board-2430osk.o
 obj-$(CONFIG_MACH_OMAP_3430SDP)+= board-3430sdp.o \
-  board-sdp-hsmmc.o \
+  hsmmc.o \
   usb-musb.o \
   usb-ehci.o \
   board-3430sdp-flash.o
 obj-$(CONFIG_MACH_OMAP3EVM)+= board-omap3evm.o
 obj-$(CONFIG_MACH_OMAP3_BEAGLE)+= board-omap3beagle.o \
   usb-musb.o usb-ehci.o \
-  board-sdp-hsmmc.o
+  hsmmc.o
 obj-$(CONFIG_MACH_OMAP_APOLLON)+= board-apollon.o \
   board-apollon-mmc.o  \
   board-apollon-keys.o
diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
b/arch/arm/mach-omap2/board-2430sdp.c
index 2018b5d..5ea0a6b 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -398,7 +399,7 @@ static void __init omap_2430sdp_init(void)
spi_register_board_info(sdp2430_spi_board_info,
ARRAY_SIZE(sdp2430_spi_board_info));
ads7846_dev_init();
-   sdp_mmc_init();
+   hsmmc_init();
 
/* turn off secondary LCD backlight */
omap_set_gpio_direction(SECONDARY_LCD_GPIO, 0);
diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
b/arch/arm/mach-omap2/board-3430sdp.c
index 060c976..f6cd08b 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -301,7 +302,7 @@ static void __init omap_3430sdp_init(void)
omap_serial_init();
usb_musb_init();
usb_ehci_init();
-   sdp_mmc_init();
+   hsmmc_init();
 }
 
 static void __init omap_3430sdp_map_io(void)
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
b/arch/arm/mach-omap2/board-omap3beagle.c
index ad5ad2e..626f004 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -29,6 +29,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 static struct omap_uart_config omap3_beagle_uart_config __initdata = {
@@ -67,7 +68,7 @@ static void __init omap3_beagle_init(void)
omap_board_config = omap3_beagle_config;
omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
omap_serial_init();
-   sdp_mmc_init();
+   hsmmc_init();
usb_musb_init();
usb_ehci_init();
 }
diff --git a/arch/arm/mach-omap2/board-sdp-hsmmc.c b/arch/arm/mach-omap2/hsmmc.c
similarity index 88%
rename from arch/arm/mach-omap2/board-sdp-hsmmc.c
rename to arch/arm/mach-omap2/hsmmc.c
index fcf5e86..e16d6c0 100644
--- a/arch/arm/mach-omap2/board-sdp-hsmmc.c
+++ b/arch/arm/mach-omap2/hsmmc.c
@@ -1,7 +1,8 @@
 /*
  * linux/arch/arm/mach-omap2/board-sdp-hsmmc.c
  *
- * Copyright (C) 2007 Texas Instruments
+ * Copyright (C) 2007-2008 Texas Instruments
+ * Copyright (C) 2008 Nokia Corporation
  * Author: Texas Instruments
  *
  * This program is free software; you can redistribute it and/or modify
@@ -45,7 +46,7 @@
 #define OMAP2_CONTROL_PBIAS_PWRDNZ (1 << 1)
 #define OMAP2_CONTROL_PBIAS_SCTRL  (1 << 2)
 
-static int sdp_mmc_card_detect(int irq)
+static int hsm

Re: [PATCH] OMAP: MMC: Generalize mmc init routine

2008-04-24 Thread Tony Lindgren
* Felipe Balbi <[EMAIL PROTECTED]> [080424 15:32]:
> Make sdp_mmc_init routine more generic by moving files
> around and changing function names.

Great, seems to work on 3430sdp, pushing.

Tony

> Signed-off-by: Felipe Balbi <[EMAIL PROTECTED]>
> ---
>  arch/arm/mach-omap2/Makefile   |6 ++--
>  arch/arm/mach-omap2/board-2430sdp.c|3 +-
>  arch/arm/mach-omap2/board-3430sdp.c|3 +-
>  arch/arm/mach-omap2/board-omap3beagle.c|3 +-
>  arch/arm/mach-omap2/{board-sdp-hsmmc.c => hsmmc.c} |   35 ++-
>  include/asm-arm/arch-omap/hsmmc.h  |   35 
> 
>  6 files changed, 62 insertions(+), 23 deletions(-)
>  rename arch/arm/mach-omap2/{board-sdp-hsmmc.c => hsmmc.c} (88%)
>  create mode 100644 include/asm-arm/arch-omap/hsmmc.h
> 
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 725dae5..512b446 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -28,19 +28,19 @@ obj-$(CONFIG_MACH_OMAP_GENERIC)   += 
> board-generic.o
>  obj-$(CONFIG_MACH_OMAP_H4)   += board-h4.o board-h4-mmc.o
>  obj-$(CONFIG_MACH_OMAP_2430SDP)  += board-2430sdp.o \
>  board-2430sdp-flash.o \
> -board-sdp-hsmmc.o \
> +hsmmc.o \
>  usb-musb.o \
>  usb-ehci.o
>  obj-$(CONFIG_MACH_OMAP_2430OSK)  += board-2430osk.o
>  obj-$(CONFIG_MACH_OMAP_3430SDP)  += board-3430sdp.o \
> -board-sdp-hsmmc.o \
> +hsmmc.o \
>  usb-musb.o \
>  usb-ehci.o \
>  board-3430sdp-flash.o
>  obj-$(CONFIG_MACH_OMAP3EVM)  += board-omap3evm.o
>  obj-$(CONFIG_MACH_OMAP3_BEAGLE)  += board-omap3beagle.o \
>  usb-musb.o usb-ehci.o \
> -board-sdp-hsmmc.o
> +hsmmc.o
>  obj-$(CONFIG_MACH_OMAP_APOLLON)  += board-apollon.o \
>  board-apollon-mmc.o  \
>  board-apollon-keys.o
> diff --git a/arch/arm/mach-omap2/board-2430sdp.c 
> b/arch/arm/mach-omap2/board-2430sdp.c
> index 2018b5d..5ea0a6b 100644
> --- a/arch/arm/mach-omap2/board-2430sdp.c
> +++ b/arch/arm/mach-omap2/board-2430sdp.c
> @@ -37,6 +37,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -398,7 +399,7 @@ static void __init omap_2430sdp_init(void)
>   spi_register_board_info(sdp2430_spi_board_info,
>   ARRAY_SIZE(sdp2430_spi_board_info));
>   ads7846_dev_init();
> - sdp_mmc_init();
> + hsmmc_init();
>  
>   /* turn off secondary LCD backlight */
>   omap_set_gpio_direction(SECONDARY_LCD_GPIO, 0);
> diff --git a/arch/arm/mach-omap2/board-3430sdp.c 
> b/arch/arm/mach-omap2/board-3430sdp.c
> index 060c976..f6cd08b 100644
> --- a/arch/arm/mach-omap2/board-3430sdp.c
> +++ b/arch/arm/mach-omap2/board-3430sdp.c
> @@ -35,6 +35,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  #include 
>  #include 
> @@ -301,7 +302,7 @@ static void __init omap_3430sdp_init(void)
>   omap_serial_init();
>   usb_musb_init();
>   usb_ehci_init();
> - sdp_mmc_init();
> + hsmmc_init();
>  }
>  
>  static void __init omap_3430sdp_map_io(void)
> diff --git a/arch/arm/mach-omap2/board-omap3beagle.c 
> b/arch/arm/mach-omap2/board-omap3beagle.c
> index ad5ad2e..626f004 100644
> --- a/arch/arm/mach-omap2/board-omap3beagle.c
> +++ b/arch/arm/mach-omap2/board-omap3beagle.c
> @@ -29,6 +29,7 @@
>  #include 
>  #include 
>  #include 
> +#include 
>  #include 
>  
>  static struct omap_uart_config omap3_beagle_uart_config __initdata = {
> @@ -67,7 +68,7 @@ static void __init omap3_beagle_init(void)
>   omap_board_config = omap3_beagle_config;
>   omap_board_config_size = ARRAY_SIZE(omap3_beagle_config);
>   omap_serial_init();
> - sdp_mmc_init();
> + hsmmc_init();
>   usb_musb_init();
>   usb_ehci_init();
>  }
> diff --git a/arch/arm/mach-omap2/board-sdp-hsmmc.c 
> b/arch/arm/mach-omap2/hsmmc.c
> similarity index 88%
> rename from arch/arm/mach-omap2/board-sdp-hsmmc.c
> rename to arch/arm/mach-omap2/hsmmc.c
> index fcf5e86..e16d6c0 100644
> --- a/arch/arm/mach-omap2/board-sdp-hsmmc.c
> +++ b/arch/arm/mach-omap2/hsmmc.c
> @@ -1,7 +1,8 @@
>  /*
>   * linux/arch/arm/mach-omap2/board-sdp-hsmmc.c
>   *
> - * Copyright (C) 2007 Texas Instruments
> + * Copyright (C) 2007-2008 Texas Instruments
> + * Copyright (C) 2008 Nokia Corporation
>   * Author: T

Re: [PATCH 1/4] Adding OMAP3 EVM support

2008-04-24 Thread Kevin Hilman
Minor cosmetic suggestion...

As new files are added, can we please leave out full path to the file
in the file header?  Not only is this unnecessary clutter, after a
short amount of time, these are usually wrong as files get renamed,
reorganized etc. and the paths rarely get updated.

It's best to just leave them out.

Kevin

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


PRCM_CLKSRC_CTRL bits set incorrectly in omap2_en_osc_ck

2008-04-24 Thread Seth Forshee
On my OMAP2430 board I was seeing the contents of DRAM become corrupted
shortly after the kernel started.  I tracked this down to
omap2_enable_osc_ck().  I think this function is intended to only clear
the bits in OMAP_AUTOEXTCLKMODE_MASK, but it has the side-effect of
setting all of the other bits in the register.  This includes setting
some fields to reserved values.

I'm not 100% sure whether the problem is with omap2_enable_osc_ck() or
prm_rmw_reg_bits() (maybe this should be masking off any bits not set in
mask), but based on what I see elsewhere I think that
omap2_enable_osc_ck() is to blame.  If this is the case, the patch below
fixes the problem.


--
From: Seth Forshee <[EMAIL PROTECTED]>
Subject: [PATCH] ARM: OMAP2: Set PRCM_CLKSRC_CTRL correctly in 
omap2_enable_osc_ck

This patch fixes an incorrect use of prm_rmw_reg_bits() in
omap2_enable_osc_ck() which is changing bits in PRCM_CLKSRC_CTRL
that are unrelated to the function it is performing.

Signed-off-by: Seth Forshee <[EMAIL PROTECTED]>
---
 arch/arm/mach-omap2/clock24xx.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/arm/mach-omap2/clock24xx.c b/arch/arm/mach-omap2/clock24xx.c
index 9b7fd15..e7968e7 100644
--- a/arch/arm/mach-omap2/clock24xx.c
+++ b/arch/arm/mach-omap2/clock24xx.c
@@ -78,7 +78,7 @@ static u32 omap2_get_dpll_rate_24xx(struct clk *tclk)
 static int omap2_enable_osc_ck(struct clk *clk)
 {
 
-   prm_rmw_reg_bits(OMAP_AUTOEXTCLKMODE_MASK, ~OMAP_AUTOEXTCLKMODE_MASK,
+   prm_rmw_reg_bits(OMAP_AUTOEXTCLKMODE_MASK, 0,
 OMAP24XX_PRCM_CLKSRC_CTRL);
 
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

2008-04-24 Thread Gadiyar, Anand

> diff --git a/include/asm-arm/arch-omap/dma.h
> b/include/asm-arm/arch-omap/dma.h
> index be0431e..270e158 100644
> --- a/include/asm-arm/arch-omap/dma.h
> +++ b/include/asm-arm/arch-omap/dma.h
> @@ -273,6 +273,10 @@
>  #define OMAP24XX_DMA_MS  63  /* S_DMA_62 */
>  #define OMAP242X_DMA_EXT_DMAREQ5 64  /* S_DMA_63 */
>  #define OMAP243X_DMA_EXT_DMAREQ6 64  /* S_DMA_63 */
> +#define OMAP34XX_DMA_MCBSP1_TX   31  /* S_DMA_30 */
> +#define OMAP34XX_DMA_MCBSP1_RX   32  /* S_DMA_31 */
> +#define OMAP34XX_DMA_MCBSP2_TX   33  /* S_DMA_32 */
> +#define OMAP34XX_DMA_MCBSP2_RX   34  /* S_DMA_33 */
>  #define OMAP34XX_DMA_EXT_DMAREQ3 64  /* S_DMA_63 */
>  #define OMAP34XX_DMA_AES2_TX 65  /* S_DMA_64 */
>  #define OMAP34XX_DMA_AES2_RX 66  /* S_DMA_65 */

What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

> diff --git a/include/asm-arm/arch-omap/irqs.h
> b/include/asm-arm/arch-omap/irqs.h
> index 15446fd..4e185a8 100644
> --- a/include/asm-arm/arch-omap/irqs.h
> +++ b/include/asm-arm/arch-omap/irqs.h
> @@ -316,7 +316,11 @@
>  #define INT_34XX_USIM_IRQ35
>  #define INT_34XX_WDT3_IRQ36
>  #define INT_34XX_SPI4_IRQ48
> +#define INT_34XX_MCBSP1_IRQ_TX   59
> +#define INT_34XX_MCBSP1_IRQ_RX   60
>  #define INT_34XX_I2C3_IRQ61
> +#define INT_34XX_MCBSP2_IRQ_TX   62
> +#define INT_34XX_MCBSP2_IRQ_RX   63
>  #define INT_34XX_PBIAS_IRQ   75
>  #define INT_34XX_OHCI_IRQ76
>  #define INT_34XX_EHCI_IRQ77

Ditto with the IRQ lines?

@Tony,
It would be nice to give people some time to take a look at the patches before 
they get pushed.

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


Re: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

2008-04-24 Thread Eduardo Valentin
Hi Anand,

On Fri, Apr 25, 2008 at 1:11 AM, Gadiyar, Anand <[EMAIL PROTECTED]> wrote:
> 
>
> > diff --git a/include/asm-arm/arch-omap/dma.h
>  > b/include/asm-arm/arch-omap/dma.h
>  > index be0431e..270e158 100644
>  > --- a/include/asm-arm/arch-omap/dma.h
>  > +++ b/include/asm-arm/arch-omap/dma.h
>  > @@ -273,6 +273,10 @@
>  >  #define OMAP24XX_DMA_MS  63  /* S_DMA_62 */
>  >  #define OMAP242X_DMA_EXT_DMAREQ5 64  /* S_DMA_63 */
>  >  #define OMAP243X_DMA_EXT_DMAREQ6 64  /* S_DMA_63 */
>  > +#define OMAP34XX_DMA_MCBSP1_TX   31  /* S_DMA_30 */
>  > +#define OMAP34XX_DMA_MCBSP1_RX   32  /* S_DMA_31 */
>  > +#define OMAP34XX_DMA_MCBSP2_TX   33  /* S_DMA_32 */
>  > +#define OMAP34XX_DMA_MCBSP2_RX   34  /* S_DMA_33 */
>  >  #define OMAP34XX_DMA_EXT_DMAREQ3 64  /* S_DMA_63 */
>  >  #define OMAP34XX_DMA_AES2_TX 65  /* S_DMA_64 */
>  >  #define OMAP34XX_DMA_AES2_RX 66  /* S_DMA_65 */
>
>  What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?

Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values.
There is no big difference, but readability. That's the point of this patch.
Defining names OMAP34XX_DMA_MCBSP* would let people to
write more readable code when specifying things specific for OMAP34XX.

>
>
>  > diff --git a/include/asm-arm/arch-omap/irqs.h
>  > b/include/asm-arm/arch-omap/irqs.h
>  > index 15446fd..4e185a8 100644
>  > --- a/include/asm-arm/arch-omap/irqs.h
>  > +++ b/include/asm-arm/arch-omap/irqs.h
>  > @@ -316,7 +316,11 @@
>  >  #define INT_34XX_USIM_IRQ35
>  >  #define INT_34XX_WDT3_IRQ36
>  >  #define INT_34XX_SPI4_IRQ48
>  > +#define INT_34XX_MCBSP1_IRQ_TX   59
>  > +#define INT_34XX_MCBSP1_IRQ_RX   60
>  >  #define INT_34XX_I2C3_IRQ61
>  > +#define INT_34XX_MCBSP2_IRQ_TX   62
>  > +#define INT_34XX_MCBSP2_IRQ_RX   63
>  >  #define INT_34XX_PBIAS_IRQ   75
>  >  #define INT_34XX_OHCI_IRQ76
>  >  #define INT_34XX_EHCI_IRQ77
>
>  Ditto with the IRQ lines?

same here.

>
>  @Tony,
>  It would be nice to give people some time to take a look at the patches 
> before they get pushed.
>
>  Regards,
>  Anand
>



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


Re: [PATCH 0/5] Updates on mcbsp driver

2008-04-24 Thread Eduardo Valentin
Hi Tony and Igor,


>  > >
>  > > checkpatch doesn't complain, although i didn't really test it.
>  >
>  > However I'd prefer see this patchset being merged with
>  >
>  > [RFC/PATCH  1/1] McBSP support for 2430/34XX
>  >
>  > and only later considered for integration.
>
>  Yeah, Chandra and Eduardo, can you guys put together a merged series
>  of patches?
>

I'll check with Chandra the best way to merge this with his patch.
However, it'd be nice to have comments for our patches before starting
to merge.

>  Tony
>



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


Re: Android on N810 File System Problem

2008-04-24 Thread Dirk Behme

Jonathan,

CCing OMAP mailing list, there are more people to help.

Jonathan Herriott wrote:

Hi,

I'm trying to get android installed on an N810.  I have successfully
installed the kernel, 


Which kernel (2.6.x, x == ?)  do you use on N810? If I remember 
correctly, with N810 people use an older kernel than the one coming 
with Android SDK.



but I am having major issues with the file
system.  I followed the tutorial you provided at
http://elinux.org/Android_on_OMAP, but I get a segmentation fault when
I try to init the kernel.  I made sure to use the same android SDK
version that was used to patch the kernel.

My steps for reproduction are:

1) On my computer, unpack the ramdisk image to a folder.
2) Untar system, dev, and data to the unpacked ramdisk image.
3) Tar up the patched file system and scp it to /opt on the device.
Ssh to the device and unpack the file system in /opt
4) Run umask 000 && chroot /opt/android /init
5) Receive a segmentation fault.


Can you send us the complete segementation fault output?

Regards

Dirk


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


RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

2008-04-24 Thread Gadiyar, Anand
> > 
> >
> > > diff --git a/include/asm-arm/arch-omap/dma.h
> > > b/include/asm-arm/arch-omap/dma.h
> > > index be0431e..270e158 100644
> > > --- a/include/asm-arm/arch-omap/dma.h
> > > +++ b/include/asm-arm/arch-omap/dma.h
> > > @@ -273,6 +273,10 @@
> > >  #define OMAP24XX_DMA_MS  63  /* S_DMA_62 */
> > >  #define OMAP242X_DMA_EXT_DMAREQ5 64  /* S_DMA_63 */
> > >  #define OMAP243X_DMA_EXT_DMAREQ6 64  /* S_DMA_63 */
> > > +#define OMAP34XX_DMA_MCBSP1_TX   31  /* S_DMA_30 */
> > > +#define OMAP34XX_DMA_MCBSP1_RX   32  /* S_DMA_31 */
> > > +#define OMAP34XX_DMA_MCBSP2_TX   33  /* S_DMA_32 */
> > > +#define OMAP34XX_DMA_MCBSP2_RX   34  /* S_DMA_33 */
> > >  #define OMAP34XX_DMA_EXT_DMAREQ3 64  /* S_DMA_63 */
> > >  #define OMAP34XX_DMA_AES2_TX 65  /* S_DMA_64 */
> > >  #define OMAP34XX_DMA_AES2_RX 66  /* S_DMA_65 */
> >
> >  What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP* names?
>
> Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values.
> There is no big difference, but readability. That's the point
> of this patch.
> Defining names OMAP34XX_DMA_MCBSP* would let people to
> write more readable code when specifying things specific for OMAP34XX.

I was under the impression that one wouldn't be writing code specific to 
OMAP34XX given that it would work with zero modifications on a 24XX as in this 
case. In such a case, would it not make more sense to use the more generic 
name? That was why I left it that way - anything common to a 24XX and a 34XX 
gets the OMAP24XX name.

__Quote__
OMAP242X_* for 2420 specific names
OMAP243X_* for 2430 specific names/names present from 243X onwards
OMAP24XX_* for names common to all 24XX, 34XX
OMAP34XX_* for 34XX specific names
__End_Quote__

That's why I did not see a point in this patch.

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


RE: [PATCH 4/5] OMAP3xx: Add DMA and IRQ definition for McBSP 1 and 2

2008-04-24 Thread Syed Mohammed, Khasim

> > > >  #define OMAP24XX_DMA_MS  63  /* S_DMA_62 */
> > > >  #define OMAP242X_DMA_EXT_DMAREQ5 64  /* S_DMA_63 */
> > > >  #define OMAP243X_DMA_EXT_DMAREQ6 64  /* S_DMA_63 */
> > > > +#define OMAP34XX_DMA_MCBSP1_TX   31  /* S_DMA_30 */
> > > > +#define OMAP34XX_DMA_MCBSP1_RX   32  /* S_DMA_31 */
> > > > +#define OMAP34XX_DMA_MCBSP2_TX   33  /* S_DMA_32 */
> > > > +#define OMAP34XX_DMA_MCBSP2_RX   34  /* S_DMA_33 */
> > > >  #define OMAP34XX_DMA_EXT_DMAREQ3 64  /* S_DMA_63 */
> > > >  #define OMAP34XX_DMA_AES2_TX 65  /* S_DMA_64 */
> > > >  #define OMAP34XX_DMA_AES2_RX 66  /* S_DMA_65 */
> > >
> > >  What's the point of this patch? Can't you use OMAP24XX_DMA_MCBSP*
> names?
> >
> > Yes, OMAP24XX_DMA_MCBSP* can be used as they have same values.
> > There is no big difference, but readability. That's the point
> > of this patch.
> > Defining names OMAP34XX_DMA_MCBSP* would let people to
> > write more readable code when specifying things specific for OMAP34XX.
> 
> I was under the impression that one wouldn't be writing code specific to
> OMAP34XX given that it would work with zero modifications on a 24XX as in
> this case. In such a case, would it not make more sense to use the more
> generic name? That was why I left it that way - anything common to a 24XX
> and a 34XX gets the OMAP24XX name.
> 
> __Quote__
> OMAP242X_* for 2420 specific names
> OMAP243X_* for 2430 specific names/names present from 243X onwards
> OMAP24XX_* for names common to all 24XX, 34XX
> OMAP34XX_* for 34XX specific names
> __End_Quote__
> 

One small correction, can we make OMAP34XX as just OMAP3, today we have 
OMAP3410, 3420, 3430 and OMAP3530, 3503. We also have OMAP2530, but changing 
OMAP24XX to OMAP2 will be a painful task. Let's just take this up for OMAP3 
alone.

Regards,
Khasim


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


RE: [PATCH 1/4] Adding OMAP3 EVM support

2008-04-24 Thread Syed Mohammed, Khasim
Hi Kevin,

> -Original Message-
> From: Kevin Hilman [mailto:[EMAIL PROTECTED]
> Sent: Friday, April 25, 2008 4:52 AM
> To: Syed Mohammed, Khasim
> Cc: linux-omap@vger.kernel.org; [EMAIL PROTECTED]
> Subject: Re: [PATCH 1/4] Adding OMAP3 EVM support
> 
> Minor cosmetic suggestion...
> 
> As new files are added, can we please leave out full path to the file
> in the file header?  Not only is this unnecessary clutter, after a
> short amount of time, these are usually wrong as files get renamed,
> reorganized etc. and the paths rarely get updated.
> 
> It's best to just leave them out.
> 

Will consider this, but sometimes it is also better to have complete path, 
especially when I pass complete file to some one, I don't have to give path 
names separately, and they can just get this info from file header. But as you 
said, it has to be maintained properly :)

Do you think we should also consider removing the last line in this paragraph 
from the GPL header,

* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*

"either version 2 of the License, or (at your option) any later version."

Any later version will add GPL version 3 to the list. 

Any thoughts on this?

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