Dear TI partners,
according to some threads here and I googled, I got below modification for AM3517 EVM with EZSDK 06.00
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c
index df312a1..f79c457 100644
--- a/arch/arm/mach-omap2/clock3xxx_data.c
+++ b/arch/arm/mach-omap2/clock3xxx_data.c
@@ -2486,7 +2486,7 @@ static struct clk uart4_fck_am35xx = {
.ops = &clkops_omap2_dflt_wait,
.parent = &core_48m_fck,
.enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1),
- .enable_bit = OMAP3430_EN_UART4_SHIFT,
+ .enable_bit = AM35XX_EN_UART4_SHIFT,
.clkdm_name = "core_l4_clkdm",
.recalc = &followparent_recalc,
};
@@ -3383,7 +3383,7 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "per_96m_fck", &per_96m_fck, CK_3XXX),
CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX),
CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX),
- //CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX),
+ CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX),
CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_AM35XX),
CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX),
CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX),
@@ -3408,7 +3408,7 @@ static struct omap_clk omap3xxx_clks[] = {
CLK(NULL, "gpio2_ick", &gpio2_ick, CK_3XXX),
CLK(NULL, "wdt3_ick", &wdt3_ick, CK_3XXX),
CLK(NULL, "uart3_ick", &uart3_ick, CK_3XXX),
- //CLK(NULL, "uart4_ick", &uart4_ick, CK_3XXX),
+ CLK(NULL, "uart4_ick", &uart4_ick, CK_36XX),
CLK(NULL, "gpt9_ick", &gpt9_ick, CK_3XXX),
CLK(NULL, "gpt8_ick", &gpt8_ick, CK_3XXX),
CLK(NULL, "gpt7_ick", &gpt7_ick, CK_3XXX),
diff --git a/arch/arm/mach-omap2/cm-regbits-34xx.h b/arch/arm/mach-omap2/cm-regbits-34xx.h
index b912759..6910d72 100644
--- a/arch/arm/mach-omap2/cm-regbits-34xx.h
+++ b/arch/arm/mach-omap2/cm-regbits-34xx.h
@@ -171,6 +171,8 @@
#define AM35XX_EN_IPSS_SHIFT 4
#define AM35XX_EN_UART4_MASK (1 << 23)
#define AM35XX_EN_UART4_SHIFT 23
+#define AM35XX_ST_UART4_MASK (1<< 23)
+#define AM35XX_ST_UART4_SHIFT 23
/* CM_ICLKEN2_CORE */
#define OMAP3430_EN_PKA_MASK (1 << 4)
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
index b2507c0..3b42307 100644
--- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
+++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
@@ -320,8 +320,6 @@ static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = {
.user = OCP_USER_MPU | OCP_USER_SDMA,
};
-
-
/* Slave interfaces on the L4_CORE interconnect */
static struct omap_hwmod_ocp_if *omap3xxx_l4_core_slaves[] = {
&omap3xxx_l3_main__l4_core,
@@ -361,6 +359,7 @@ static struct omap_hwmod_ocp_if *omap3xxx_l4_per_slaves[] = {
static struct omap_hwmod_ocp_if *omap3xxx_l4_per_masters[] = {
&omap3_l4_per__uart3,
&omap3_l4_per__uart4,
+ //&am35xx_l4_core__uart4,
};
/* L4 PER */
@@ -684,17 +683,18 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = {
.omap_chip = OMAP_CHIP_INIT(CHIP_IS_OMAP3630ES1),
};
+/* only for AM35xx */
static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
{ .irq = INT_35XX_UART4_IRQ, },
};
static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = {
- { .name = "rx", .dma_req = OMAP24XX_DMA_USB_W2FC_TX0 /*AM35XX_DMA_UART4_RX*/, },
- { .name = "tx", .dma_req = OMAP24XX_DMA_USB_W2FC_RX0 /*AM35XX_DMA_UART4_TX*/, },
+ { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, },
+ { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, },
};
static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = {
- &am35xx_l4_core__uart4,
+ &am35xx_l4_core__uart4,
};
static struct omap_hwmod am35xx_uart4_hwmod = {
@@ -721,17 +721,17 @@ static struct omap_hwmod am35xx_uart4_hwmod = {
*/
.name = "uart4",
.mpu_irqs = am35xx_uart4_mpu_irqs,
- .mpu_irqs_cnt = ARRAY_SIZE(am35xx_uart4_mpu_irqs),
+ //.mpu_irqs_cnt = ARRAY_SIZE(am35xx_uart4_mpu_irqs),
.sdma_reqs = am35xx_uart4_sdma_reqs,
- .sdma_reqs_cnt = ARRAY_SIZE(am35xx_uart4_sdma_reqs),
+ //.sdma_reqs_cnt = ARRAY_SIZE(am35xx_uart4_sdma_reqs),
.main_clk = "uart4_fck",
.prcm = {
.omap2 = {
.module_offs = CORE_MOD,
.prcm_reg_id = 1,
- .module_bit = OMAP3430_EN_UART4_SHIFT,
+ .module_bit = AM35XX_EN_UART4_SHIFT,
.idlest_reg_id = 1,
- .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT,
+ .idlest_idle_bit = AM35XX_ST_UART4_SHIFT,
},
},
.slaves = am35xx_uart4_slaves,
@@ -1488,7 +1488,7 @@ static __initdata struct omap_hwmod *am35xx_hwmods[] = {
&omap3xxx_uart1_hwmod,
&omap3xxx_uart2_hwmod,
&omap3xxx_uart3_hwmod,
- &omap3xxx_uart4_hwmod,
+ //&omap3xxx_uart4_hwmod,
&am35xx_uart4_hwmod,
&omap3xxx_i2c1_hwmod,
&omap3xxx_i2c2_hwmod,
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h
index c33c86c..04e0de6 100644
--- a/arch/arm/mach-omap2/prcm-common.h
+++ b/arch/arm/mach-omap2/prcm-common.h
@@ -237,6 +237,8 @@
#define OMAP3430_ST_MMC2_MASK (1 << 25)
#define OMAP3430_ST_MMC1_SHIFT 24
#define OMAP3430_ST_MMC1_MASK (1 << 24)
+#define OMAP3430_ST_UART4_SHIFT 23
+#define OMAP3430_ST_UART4_MASK (1 << 23)
#define OMAP3430_ST_MCSPI4_SHIFT 21
#define OMAP3430_ST_MCSPI4_MASK (1 << 21)
#define OMAP3430_ST_MCSPI3_SHIFT 20
diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c
index 78c4beb..d3fcef7 100644
--- a/arch/arm/mach-omap2/serial.c
+++ b/arch/arm/mach-omap2/serial.c
@@ -508,7 +508,7 @@ static void omap_uart_idle_init(struct omap_uart_state *uart)
padconf = 0x19e;
break;
case 3:
- wk_mask = OMAP3630_ST_UART4_MASK;
+ wk_mask = OMAP3430_ST_UART4_MASK;//OMAP3630_ST_UART4_MASK;
padconf = 0x0d2;
break;
}
diff --git a/arch/arm/plat-omap/include/plat/dma.h b/arch/arm/plat-omap/include/plat/dma.h
index 6e02755..293e047 100644
--- a/arch/arm/plat-omap/include/plat/dma.h
+++ b/arch/arm/plat-omap/include/plat/dma.h
@@ -258,6 +258,10 @@
#define OMAP36XX_DMA_UART4_TX 81 /* S_DMA_80 */
#define OMAP36XX_DMA_UART4_RX 82 /* S_DMA_81 */
+/* only for AM35xx */
+#define AM35XX_DMA_UART4_TX 54
+#define AM35XX_DMA_UART4_RX 55
+
/*----------------------------------------------------------------------------*/
#define OMAP1_DMA_TOUT_IRQ (1 << 0)
I still got stuck in booting the kernel...
I cannot get any message even I opened early printk.
Any advice?