linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
@ 2010-05-20 13:38 Govindraj.R
  2010-05-21 23:42 ` Kevin Hilman
  2010-05-21 23:48 ` Kevin Hilman
  0 siblings, 2 replies; 6+ messages in thread
From: Govindraj.R @ 2010-05-20 13:38 UTC (permalink / raw)
  To: linux-omap; +Cc: Kevin Hilman


Introduce UART4 hwmod data for OMAP3630

Cc: Kevin Hilman <khilman@deeprootsystems.com>
Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
---
 arch/arm/mach-omap2/omap_hwmod_3xxx_data.c |   54 ++++++++++++++++++++++++++++
 arch/arm/mach-omap2/prcm-common.h          |    2 +
 arch/arm/plat-omap/include/plat/dma.h      |    2 +
 arch/arm/plat-omap/include/plat/irqs.h     |    2 +
 4 files changed, 60 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index 5f74c34..079a65e 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -86,6 +86,7 @@ static struct omap_hwmod omap3xxx_l4_wkup_hwmod;
 static struct omap_hwmod omap3xxx_uart1_hwmod;
 static struct omap_hwmod omap3xxx_uart2_hwmod;
 static struct omap_hwmod omap3xxx_uart3_hwmod;
+static struct omap_hwmod omap3xxx_uart4_hwmod;
 static struct omap_hwmod omap3xxx_mmc1_hwmod;
 static struct omap_hwmod omap3xxx_mmc2_hwmod;
 static struct omap_hwmod omap3xxx_mmc3_hwmod;
@@ -151,6 +152,24 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart3 = {
 	.user		= OCP_USER_MPU | OCP_USER_SDMA,
 };

+/* L4 PER -> UART4 interface */
+static struct omap_hwmod_addr_space omap3xxx_uart4_addr_space[] = {
+	{
+		.pa_start	= OMAP3_UART4_BASE,
+		.pa_end		= OMAP3_UART4_BASE + SZ_1K - 1,
+		.flags		= ADDR_MAP_ON_INIT | ADDR_TYPE_RT,
+	},
+};
+
+static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = {
+	.master		= &omap3xxx_l4_per_hwmod,
+	.slave		= &omap3xxx_uart4_hwmod,
+	.clk		= "uart4_ick",
+	.addr		= omap3xxx_uart4_addr_space,
+	.addr_cnt	= ARRAY_SIZE(omap3xxx_uart4_addr_space),
+	.user		= OCP_USER_MPU | OCP_USER_SDMA,
+};
+
 /* L4 CORE -> MMC1 interface */
 static struct omap_hwmod_addr_space omap3xxx_mmc1_addr_space[] = {
 	{
@@ -257,6 +276,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
 /* Master interfaces on the L4_PER interconnect */
 static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
 	&omap3_l4_per__uart3,
+	&omap3_l4_per__uart4,
 };

 /* L4 PER */
@@ -425,6 +445,40 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
 	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3430),
 };

+/* UART4 */
+
+static struct omap_hwmod_irq_info uart4_mpu_irqs[] = {
+	{ .irq = INT_36XX_UART4_IRQ, },
+};
+
+static struct omap_hwmod_dma_info uart4_sdma_chs[] = {
+	{ .name = "rx",	.dma_ch = OMAP36XX_DMA_UART4_RX, },
+	{ .name = "tx",	.dma_ch = OMAP36XX_DMA_UART4_TX, },
+};
+
+static struct omap_hwmod_ocp_if *omap3xxx_uart4_slaves[] = {
+	&omap3_l4_per__uart4,
+};
+
+static struct omap_hwmod omap3xxx_uart4_hwmod = {
+	.name		= "uart4",
+	.mpu_irqs	= uart4_mpu_irqs,
+	.mpu_irqs_cnt	= ARRAY_SIZE(uart4_mpu_irqs),
+	.sdma_chs	= uart4_sdma_chs,
+	.sdma_chs_cnt	= ARRAY_SIZE(uart4_sdma_chs),
+	.main_clk	= "uart4_fck",
+	.prcm		= {
+		.omap2 = {
+			.prcm_reg_id = 1,
+			.module_bit = OMAP3630_EN_UART4_SHIFT,
+		},
+	},
+	.slaves		= omap3xxx_uart4_slaves,
+	.slaves_cnt	= ARRAY_SIZE(omap3xxx_uart4_slaves),
+	.class		= &uart_class,
+	.omap_chip	= OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
+};
+
 /* MMC/SD/SDIO common */

 static struct omap_hwmod_class_sysconfig mmc_sysc = {
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index 90f603d..0fc20c9 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -390,6 +390,8 @@
 #define OMAP3430_EN_MPU_SHIFT				1

 /* CM_FCLKEN_PER, CM_ICLKEN_PER, PM_WKEN_PER shared bits */
+#define OMAP3630_EN_UART4				(1 << 18)
+#define OMAP3630_EN_UART4_SHIFT				18
 #define OMAP3430_EN_GPIO6				(1 << 17)
 #define OMAP3430_EN_GPIO6_SHIFT				17
 #define OMAP3430_EN_GPIO5				(1 << 16)
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index 02232ca..105bdb5 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -319,6 +319,8 @@
 #define OMAP34XX_DMA_USIM_TX		79	/* S_DMA_78 */
 #define OMAP34XX_DMA_USIM_RX		80	/* S_DMA_79 */

+#define OMAP36XX_DMA_UART4_TX		81	/* S_DMA_80 */
+#define OMAP36XX_DMA_UART4_RX		82	/* S_DMA_81 */
 /*----------------------------------------------------------------------------*/

 #define OMAP1_DMA_TOUT_IRQ		(1 << 0)
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h
index 4017019..1732cca 100644
--- a/arch/arm/plat-omap/include/plat/irqs.h
+++ b/arch/arm/plat-omap/include/plat/irqs.h
@@ -345,6 +345,8 @@
 #define INT_34XX_MMC3_IRQ	94
 #define INT_34XX_GPT12_IRQ	95

+#define INT_36XX_UART4_IRQ	80
+
 #define INT_35XX_HECC0_IRQ		24
 #define INT_35XX_HECC1_IRQ		28
 #define INT_35XX_EMAC_C0_RXTHRESH_IRQ	67
-- 
1.6.3.3





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

* Re: [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
  2010-05-20 13:38 [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data Govindraj.R
@ 2010-05-21 23:42 ` Kevin Hilman
  2010-05-21 23:48 ` Kevin Hilman
  1 sibling, 0 replies; 6+ messages in thread
From: Kevin Hilman @ 2010-05-21 23:42 UTC (permalink / raw)
  To: Govindraj.R; +Cc: linux-omap

"Govindraj.R" <govindraj.raja@ti.com> writes:

> Introduce UART4 hwmod data for OMAP3630
>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>

Looks good, except omap4_hwmod was not added to the master list of
hwmods to initialize.

Fixed up locally.

Kevin

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

* Re: [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
  2010-05-20 13:38 [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data Govindraj.R
  2010-05-21 23:42 ` Kevin Hilman
@ 2010-05-21 23:48 ` Kevin Hilman
  2010-05-24 12:56   ` Govindraj
       [not found]   ` <17f301cafb40$2bc91e80$LocalHost@wipblrx0100947A>
  1 sibling, 2 replies; 6+ messages in thread
From: Kevin Hilman @ 2010-05-21 23:48 UTC (permalink / raw)
  To: Govindraj.R; +Cc: linux-omap

"Govindraj.R" <govindraj.raja@ti.com> writes:

> Introduce UART4 hwmod data for OMAP3630
>
> Cc: Kevin Hilman <khilman@deeprootsystems.com>
> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>

Just FYI...

After adding UART4 to the master list, it hangs on 3630/Zoom3 (log below)

I didn't dig into this one yet.

Kevin

[...]
Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz                              
omap_hwmod: uart4: cannot clk_get main_clk uart4_fck                            
omap_hwmod: uart4: cannot clk_get interface_clk uart4_ick                       
omap_hwmod: l3_hwmod: cannot be enabled (3)                                     
omap_hwmod: l4_core_hwmod: cannot be enabled (3)                                
omap_hwmod: l4_per_hwmod: cannot be enabled (3)                                 
omap_hwmod: l4_wkup_hwmod: cannot be enabled (3)                                
Unhandled fault: external abort on non-linefetch (0x1028) at 0xfb042054         
Internal error: : 1028 [#1] PREEMPT                                             
last sysfs file:                                                                
Modules linked in:                                                              
CPU: 0    Not tainted  (2.6.34-pm-next-default-10673-g60b93ed #3)               
PC is at omap_hwmod_readl+0x10/0x18                                             
LR is at _update_sysc_cache+0x44/0x74                                           
pc : [<c0523adc>]    lr : [<c05240bc>]    psr: a00001d3                         
sp : c08c5f10  ip : c08c5f20  fp : c08c5f1c                                     
r10: 0000001f  r9 : 413fc082  r8 : 80028340                                     
r7 : c08c82cc  r6 : c0524c98  r5 : 00000001  r4 : c08dcc2c                      
r3 : fb042000  r2 : 00000004  r1 : 00000054  r0 : c08dcc2c                      
Flags: NzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel           
Control: 10c5387f  Table: 80004019  DAC: 00000017                               
Process swapper (pid: 0, stack limit = 0xc08c42e8)                              
Stack: (0xc08c5f10 to 0xc08c6000)                                               
5f00:                                     c08c5f34 c08c5f20 c05240bc c0523ad8   
5f20: 00000000 c08dcc2c c08c5f4c c08c5f38 c0524740 c0524084 00000012 c08dcc2c   
5f40: c08c5f64 c08c5f50 c0524d28 c052463c c08dcc2c 00000000 c08c5f84 c08c5f68   
5f60: c0523e14 c0524ca4 c090ae5c c08e4e30 c08e4e30 c050c014 c08c5f94 c08c5f88   
5f80: c05241d0 c0523df0 c08c5fac c08c5f98 c000e530 c052417c c090a200 c050c018   
5fa0: c08c5fbc c08c5fb0 c0013894 c000e460 c08c5fcc c08c5fc0 c000b438 c001386c   
5fc0: c08c5ff4 c08c5fd0 c0008a6c c000b40c c00086b8 00000000 00000000 c050c018   
5fe0: 10c53c7d c090a5a0 00000000 c08c5ff8 80008034 c0008914 00000000 00000000   
Backtrace:                                                                      
[<c0523acc>] (omap_hwmod_readl+0x0/0x18) from [<c05240bc>] (_update_sysc_cache+)
[<c0524078>] (_update_sysc_cache+0x0/0x74) from [<c0524740>] (_enable+0x110/0x1)
 r4:c08dcc2c r3:00000000                                                        
[<c0524630>] (_enable+0x0/0x134) from [<c0524d28>] (_setup+0x90/0x100)          
 r4:c08dcc2c r3:00000012                                                        
[<c0524c98>] (_setup+0x0/0x100) from [<c0523e14>] (omap_hwmod_for_each+0x30/0x7)
 r5:00000000 r4:c08dcc2c                                                        
[<c0523de4>] (omap_hwmod_for_each+0x0/0x78) from [<c05241d0>] (omap_hwmod_late_)
 r6:c050c014 r5:c08e4e30 r4:c08e4e30 r3:c090ae5c                                
[<c0524170>] (omap_hwmod_late_init+0x0/0x8c) from [<c000e530>] (omap2_init_comm)
[<c000e454>] (omap2_init_common_hw+0x0/0x194) from [<c0013894>] (omap_zoom_init)
 r5:c050c018 r4:c090a200                                                        
[<c0013860>] (omap_zoom_init_irq+0x0/0x50) from [<c000b438>] (init_IRQ+0x38/0x4)
[<c000b400>] (init_IRQ+0x0/0x48) from [<c0008a6c>] (start_kernel+0x164/0x2d0)   
[<c0008908>] (start_kernel+0x0/0x2d0) from [<80008034>] (0x80008034)            
 r5:c090a5a0 r4:10c53c7d                                                        
Code: e1a0c00d e92dd800 e24cb004 e5903038 (e7910003)                            


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

* Re: [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
  2010-05-21 23:48 ` Kevin Hilman
@ 2010-05-24 12:56   ` Govindraj
       [not found]   ` <17f301cafb40$2bc91e80$LocalHost@wipblrx0100947A>
  1 sibling, 0 replies; 6+ messages in thread
From: Govindraj @ 2010-05-24 12:56 UTC (permalink / raw)
  To: Kevin Hilman; +Cc: Govindraj.R, linux-omap

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

This happening because we are missing these patches:

https://patchwork.kernel.org/patch/84748/
https://patchwork.kernel.org/patch/84749/
https://patchwork.kernel.org/patch/84755/
https://patchwork.kernel.org/patch/84750/

Not part of LO yet.

But we need these patches for uart4 support for 3630.

I have rebased the patches on top of wip-uart and tested with 3630SDP.

Attaching the same.

Regards,
Govindraj R


On Sat, May 22, 2010 at 5:18 AM, Kevin Hilman
<khilman@deeprootsystems.com> wrote:
> "Govindraj.R" <govindraj.raja@ti.com> writes:
>
>> Introduce UART4 hwmod data for OMAP3630
>>
>> Cc: Kevin Hilman <khilman@deeprootsystems.com>
>> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
>
> Just FYI...
>
> After adding UART4 to the master list, it hangs on 3630/Zoom3 (log below)
>
> I didn't dig into this one yet.
>
> Kevin
>
> [...]
> Clocking rate (Crystal/Core/MPU): 26.0/400/600 MHz
> omap_hwmod: uart4: cannot clk_get main_clk uart4_fck
> omap_hwmod: uart4: cannot clk_get interface_clk uart4_ick
> omap_hwmod: l3_hwmod: cannot be enabled (3)
> omap_hwmod: l4_core_hwmod: cannot be enabled (3)
> omap_hwmod: l4_per_hwmod: cannot be enabled (3)
> omap_hwmod: l4_wkup_hwmod: cannot be enabled (3)
> Unhandled fault: external abort on non-linefetch (0x1028) at 0xfb042054
> Internal error: : 1028 [#1] PREEMPT
> last sysfs file:
> Modules linked in:
> CPU: 0    Not tainted  (2.6.34-pm-next-default-10673-g60b93ed #3)
> PC is at omap_hwmod_readl+0x10/0x18
> LR is at _update_sysc_cache+0x44/0x74
> pc : [<c0523adc>]    lr : [<c05240bc>]    psr: a00001d3
> sp : c08c5f10  ip : c08c5f20  fp : c08c5f1c
> r10: 0000001f  r9 : 413fc082  r8 : 80028340
> r7 : c08c82cc  r6 : c0524c98  r5 : 00000001  r4 : c08dcc2c
> r3 : fb042000  r2 : 00000004  r1 : 00000054  r0 : c08dcc2c
> Flags: NzCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment kernel
> Control: 10c5387f  Table: 80004019  DAC: 00000017
> Process swapper (pid: 0, stack limit = 0xc08c42e8)
> Stack: (0xc08c5f10 to 0xc08c6000)
> 5f00:                                     c08c5f34 c08c5f20 c05240bc c0523ad8
> 5f20: 00000000 c08dcc2c c08c5f4c c08c5f38 c0524740 c0524084 00000012 c08dcc2c
> 5f40: c08c5f64 c08c5f50 c0524d28 c052463c c08dcc2c 00000000 c08c5f84 c08c5f68
> 5f60: c0523e14 c0524ca4 c090ae5c c08e4e30 c08e4e30 c050c014 c08c5f94 c08c5f88
> 5f80: c05241d0 c0523df0 c08c5fac c08c5f98 c000e530 c052417c c090a200 c050c018
> 5fa0: c08c5fbc c08c5fb0 c0013894 c000e460 c08c5fcc c08c5fc0 c000b438 c001386c
> 5fc0: c08c5ff4 c08c5fd0 c0008a6c c000b40c c00086b8 00000000 00000000 c050c018
> 5fe0: 10c53c7d c090a5a0 00000000 c08c5ff8 80008034 c0008914 00000000 00000000
> Backtrace:
> [<c0523acc>] (omap_hwmod_readl+0x0/0x18) from [<c05240bc>] (_update_sysc_cache+)
> [<c0524078>] (_update_sysc_cache+0x0/0x74) from [<c0524740>] (_enable+0x110/0x1)
>  r4:c08dcc2c r3:00000000
> [<c0524630>] (_enable+0x0/0x134) from [<c0524d28>] (_setup+0x90/0x100)
>  r4:c08dcc2c r3:00000012
> [<c0524c98>] (_setup+0x0/0x100) from [<c0523e14>] (omap_hwmod_for_each+0x30/0x7)
>  r5:00000000 r4:c08dcc2c
> [<c0523de4>] (omap_hwmod_for_each+0x0/0x78) from [<c05241d0>] (omap_hwmod_late_)
>  r6:c050c014 r5:c08e4e30 r4:c08e4e30 r3:c090ae5c
> [<c0524170>] (omap_hwmod_late_init+0x0/0x8c) from [<c000e530>] (omap2_init_comm)
> [<c000e454>] (omap2_init_common_hw+0x0/0x194) from [<c0013894>] (omap_zoom_init)
>  r5:c050c018 r4:c090a200
> [<c0013860>] (omap_zoom_init_irq+0x0/0x50) from [<c000b438>] (init_IRQ+0x38/0x4)
> [<c000b400>] (init_IRQ+0x0/0x48) from [<c0008a6c>] (start_kernel+0x164/0x2d0)
> [<c0008908>] (start_kernel+0x0/0x2d0) from [<80008034>] (0x80008034)
>  r5:c090a5a0 r4:10c53c7d
> Code: e1a0c00d e92dd800 e24cb004 e5903038 (e7910003)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

[-- Attachment #2: rebase_uart4_wip-uart.zip --]
[-- Type: application/zip, Size: 4266 bytes --]

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

* Re: [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
       [not found]   ` <17f301cafb40$2bc91e80$LocalHost@wipblrx0100947A>
@ 2010-05-25  0:07     ` Kevin Hilman
  2010-05-25 11:10       ` Aguirre, Sergio
  0 siblings, 1 reply; 6+ messages in thread
From: Kevin Hilman @ 2010-05-25  0:07 UTC (permalink / raw)
  To: Govindraj.R, saaguirre; +Cc: linux-omap

"Govindraj.R" <govindraj.raja@ti.com> writes:

> This happening because we are missing these patches:
>  
> https://patchwork.kernel.org/patch/84748/
> https://patchwork.kernel.org/patch/84749/
> https://patchwork.kernel.org/patch/84755/
> https://patchwork.kernel.org/patch/84750/
>  
> Not part of LO yet.
>
> But we need these patches for uart4 support for 3630.

Ah, OK.  I thought these had been merged already.

Looks like these need to be refreshed/resubmitted for l-o.  Sergio?

Kevin

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

* RE: [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
  2010-05-25  0:07     ` Kevin Hilman
@ 2010-05-25 11:10       ` Aguirre, Sergio
  0 siblings, 0 replies; 6+ messages in thread
From: Aguirre, Sergio @ 2010-05-25 11:10 UTC (permalink / raw)
  To: Kevin Hilman, Raja, Govindraj; +Cc: linux-omap@vger.kernel.org

> From: Kevin Hilman [khilman@deeprootsystems.com]
> Sent: Monday, May 24, 2010 7:07 PM
> To: Raja, Govindraj; Aguirre, Sergio
> Cc: linux-omap@vger.kernel.org
> Subject: Re: [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data.
> 
> "Govindraj.R" <govindraj.raja@ti.com> writes:
>  not in my 
> > This happening because we are missing these patches:
> >
> > https://patchwork.kernel.org/patch/84748/
> > https://patchwork.kernel.org/patch/84749/
> > https://patchwork.kernel.org/patch/84755/
> > https://patchwork.kernel.org/patch/84750/
> >
> > Not part of LO yet.
> >
> > But we need these patches for uart4 support for 3630.
> 
> Ah, OK.  I thought these had been merged already.
> 
> Looks like these need to be refreshed/resubmitted for l-o.  Sergio?
> 

Ah, I forgot about resubmitting these for the merge window.

Got dragged for this last weeks into high priority work and have abandoned them a little bit. :/

I'm in a business trip at this point and I don't have access to the 3630SDP to try this.

You can either wait for me to go back and test them, or I can just send them, and somebody else can
help me out re-vaidating them, once i rebase and resend.

Does that sound ok?

Regards,
Sergio

> Kevin
> 

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

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

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-20 13:38 [pm-wip/uart][PATCH 2/6] Serial: Add UART4 hwmod data Govindraj.R
2010-05-21 23:42 ` Kevin Hilman
2010-05-21 23:48 ` Kevin Hilman
2010-05-24 12:56   ` Govindraj
     [not found]   ` <17f301cafb40$2bc91e80$LocalHost@wipblrx0100947A>
2010-05-25  0:07     ` Kevin Hilman
2010-05-25 11:10       ` Aguirre, Sergio

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