diff options
-rw-r--r-- | arch/arm/mach-omap2/clock3xxx_data.c | 11 | ||||
-rw-r--r-- | arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | 52 | ||||
-rw-r--r-- | arch/arm/mach-omap2/prcm-common.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/irqs.h | 2 | ||||
-rw-r--r-- | arch/arm/plat-omap/include/plat/serial.h | 1 |
5 files changed, 67 insertions, 1 deletions
diff --git a/arch/arm/mach-omap2/clock3xxx_data.c b/arch/arm/mach-omap2/clock3xxx_data.c index 5d0064a4fb5a..4e1b1a2f0537 100644 --- a/arch/arm/mach-omap2/clock3xxx_data.c +++ b/arch/arm/mach-omap2/clock3xxx_data.c | |||
@@ -2480,6 +2480,16 @@ static struct clk uart4_fck = { | |||
2480 | .recalc = &followparent_recalc, | 2480 | .recalc = &followparent_recalc, |
2481 | }; | 2481 | }; |
2482 | 2482 | ||
2483 | static struct clk uart4_fck_am35xx = { | ||
2484 | .name = "uart4_fck", | ||
2485 | .ops = &clkops_omap2_dflt_wait, | ||
2486 | .parent = &per_48m_fck, | ||
2487 | .enable_reg = OMAP_CM_REGADDR(CORE_MOD, CM_FCLKEN1), | ||
2488 | .enable_bit = OMAP3430_EN_UART4_SHIFT, | ||
2489 | .clkdm_name = "core_l4_clkdm", | ||
2490 | .recalc = &followparent_recalc, | ||
2491 | }; | ||
2492 | |||
2483 | static struct clk gpt2_fck = { | 2493 | static struct clk gpt2_fck = { |
2484 | .name = "gpt2_fck", | 2494 | .name = "gpt2_fck", |
2485 | .ops = &clkops_omap2_dflt_wait, | 2495 | .ops = &clkops_omap2_dflt_wait, |
@@ -3403,6 +3413,7 @@ static struct omap_clk omap3xxx_clks[] = { | |||
3403 | CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), | 3413 | CLK(NULL, "per_48m_fck", &per_48m_fck, CK_3XXX), |
3404 | CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), | 3414 | CLK(NULL, "uart3_fck", &uart3_fck, CK_3XXX), |
3405 | CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX), | 3415 | CLK(NULL, "uart4_fck", &uart4_fck, CK_36XX), |
3416 | CLK(NULL, "uart4_fck", &uart4_fck_am35xx, CK_3505 | CK_3517), | ||
3406 | CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX), | 3417 | CLK(NULL, "gpt2_fck", &gpt2_fck, CK_3XXX), |
3407 | CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX), | 3418 | CLK(NULL, "gpt3_fck", &gpt3_fck, CK_3XXX), |
3408 | CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX), | 3419 | CLK(NULL, "gpt4_fck", &gpt4_fck, CK_3XXX), |
diff --git a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c index 126cb49c0de7..3be90feca77c 100644 --- a/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c +++ b/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c | |||
@@ -164,6 +164,7 @@ static struct omap_hwmod omap3xxx_uart1_hwmod; | |||
164 | static struct omap_hwmod omap3xxx_uart2_hwmod; | 164 | static struct omap_hwmod omap3xxx_uart2_hwmod; |
165 | static struct omap_hwmod omap3xxx_uart3_hwmod; | 165 | static struct omap_hwmod omap3xxx_uart3_hwmod; |
166 | static struct omap_hwmod omap3xxx_uart4_hwmod; | 166 | static struct omap_hwmod omap3xxx_uart4_hwmod; |
167 | static struct omap_hwmod am35xx_uart4_hwmod; | ||
167 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod; | 168 | static struct omap_hwmod omap3xxx_usbhsotg_hwmod; |
168 | 169 | ||
169 | /* l3_core -> usbhsotg interface */ | 170 | /* l3_core -> usbhsotg interface */ |
@@ -299,6 +300,23 @@ static struct omap_hwmod_ocp_if omap3_l4_per__uart4 = { | |||
299 | .user = OCP_USER_MPU | OCP_USER_SDMA, | 300 | .user = OCP_USER_MPU | OCP_USER_SDMA, |
300 | }; | 301 | }; |
301 | 302 | ||
303 | /* AM35xx: L4 CORE -> UART4 interface */ | ||
304 | static struct omap_hwmod_addr_space am35xx_uart4_addr_space[] = { | ||
305 | { | ||
306 | .pa_start = OMAP3_UART4_AM35XX_BASE, | ||
307 | .pa_end = OMAP3_UART4_AM35XX_BASE + SZ_1K - 1, | ||
308 | .flags = ADDR_MAP_ON_INIT | ADDR_TYPE_RT, | ||
309 | }, | ||
310 | }; | ||
311 | |||
312 | static struct omap_hwmod_ocp_if am35xx_l4_core__uart4 = { | ||
313 | .master = &omap3xxx_l4_core_hwmod, | ||
314 | .slave = &am35xx_uart4_hwmod, | ||
315 | .clk = "uart4_ick", | ||
316 | .addr = am35xx_uart4_addr_space, | ||
317 | .user = OCP_USER_MPU | OCP_USER_SDMA, | ||
318 | }; | ||
319 | |||
302 | /* L4 CORE -> I2C1 interface */ | 320 | /* L4 CORE -> I2C1 interface */ |
303 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { | 321 | static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { |
304 | .master = &omap3xxx_l4_core_hwmod, | 322 | .master = &omap3xxx_l4_core_hwmod, |
@@ -1309,6 +1327,39 @@ static struct omap_hwmod omap3xxx_uart4_hwmod = { | |||
1309 | .class = &omap2_uart_class, | 1327 | .class = &omap2_uart_class, |
1310 | }; | 1328 | }; |
1311 | 1329 | ||
1330 | static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = { | ||
1331 | { .irq = INT_35XX_UART4_IRQ, }, | ||
1332 | }; | ||
1333 | |||
1334 | static struct omap_hwmod_dma_info am35xx_uart4_sdma_reqs[] = { | ||
1335 | { .name = "rx", .dma_req = AM35XX_DMA_UART4_RX, }, | ||
1336 | { .name = "tx", .dma_req = AM35XX_DMA_UART4_TX, }, | ||
1337 | }; | ||
1338 | |||
1339 | static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = { | ||
1340 | &am35xx_l4_core__uart4, | ||
1341 | }; | ||
1342 | |||
1343 | static struct omap_hwmod am35xx_uart4_hwmod = { | ||
1344 | .name = "uart4", | ||
1345 | .mpu_irqs = am35xx_uart4_mpu_irqs, | ||
1346 | .sdma_reqs = am35xx_uart4_sdma_reqs, | ||
1347 | .main_clk = "uart4_fck", | ||
1348 | .prcm = { | ||
1349 | .omap2 = { | ||
1350 | .module_offs = CORE_MOD, | ||
1351 | .prcm_reg_id = 1, | ||
1352 | .module_bit = OMAP3430_EN_UART4_SHIFT, | ||
1353 | .idlest_reg_id = 1, | ||
1354 | .idlest_idle_bit = OMAP3430_EN_UART4_SHIFT, | ||
1355 | }, | ||
1356 | }, | ||
1357 | .slaves = am35xx_uart4_slaves, | ||
1358 | .slaves_cnt = ARRAY_SIZE(am35xx_uart4_slaves), | ||
1359 | .class = &omap2_uart_class, | ||
1360 | }; | ||
1361 | |||
1362 | |||
1312 | static struct omap_hwmod_class i2c_class = { | 1363 | static struct omap_hwmod_class i2c_class = { |
1313 | .name = "i2c", | 1364 | .name = "i2c", |
1314 | .sysc = &i2c_sysc, | 1365 | .sysc = &i2c_sysc, |
@@ -3287,6 +3338,7 @@ static __initdata struct omap_hwmod *omap36xx_hwmods[] = { | |||
3287 | static __initdata struct omap_hwmod *am35xx_hwmods[] = { | 3338 | static __initdata struct omap_hwmod *am35xx_hwmods[] = { |
3288 | &omap3xxx_dss_core_hwmod, /* XXX ??? */ | 3339 | &omap3xxx_dss_core_hwmod, /* XXX ??? */ |
3289 | &am35xx_usbhsotg_hwmod, | 3340 | &am35xx_usbhsotg_hwmod, |
3341 | &am35xx_uart4_hwmod, | ||
3290 | NULL | 3342 | NULL |
3291 | }; | 3343 | }; |
3292 | 3344 | ||
diff --git a/arch/arm/mach-omap2/prcm-common.h b/arch/arm/mach-omap2/prcm-common.h index 0363dcb0ef93..da2d80f5fcbd 100644 --- a/arch/arm/mach-omap2/prcm-common.h +++ b/arch/arm/mach-omap2/prcm-common.h | |||
@@ -201,6 +201,8 @@ | |||
201 | #define OMAP3430_EN_MMC2_SHIFT 25 | 201 | #define OMAP3430_EN_MMC2_SHIFT 25 |
202 | #define OMAP3430_EN_MMC1_MASK (1 << 24) | 202 | #define OMAP3430_EN_MMC1_MASK (1 << 24) |
203 | #define OMAP3430_EN_MMC1_SHIFT 24 | 203 | #define OMAP3430_EN_MMC1_SHIFT 24 |
204 | #define OMAP3430_EN_UART4_MASK (1 << 23) | ||
205 | #define OMAP3430_EN_UART4_SHIFT 23 | ||
204 | #define OMAP3430_EN_MCSPI4_MASK (1 << 21) | 206 | #define OMAP3430_EN_MCSPI4_MASK (1 << 21) |
205 | #define OMAP3430_EN_MCSPI4_SHIFT 21 | 207 | #define OMAP3430_EN_MCSPI4_SHIFT 21 |
206 | #define OMAP3430_EN_MCSPI3_MASK (1 << 20) | 208 | #define OMAP3430_EN_MCSPI3_MASK (1 << 20) |
diff --git a/arch/arm/plat-omap/include/plat/irqs.h b/arch/arm/plat-omap/include/plat/irqs.h index 30e10719b774..6e5d3a0cb9d5 100644 --- a/arch/arm/plat-omap/include/plat/irqs.h +++ b/arch/arm/plat-omap/include/plat/irqs.h | |||
@@ -357,7 +357,7 @@ | |||
357 | #define INT_35XX_EMAC_C0_TX_PULSE_IRQ 69 | 357 | #define INT_35XX_EMAC_C0_TX_PULSE_IRQ 69 |
358 | #define INT_35XX_EMAC_C0_MISC_PULSE_IRQ 70 | 358 | #define INT_35XX_EMAC_C0_MISC_PULSE_IRQ 70 |
359 | #define INT_35XX_USBOTG_IRQ 71 | 359 | #define INT_35XX_USBOTG_IRQ 71 |
360 | #define INT_35XX_UART4 84 | 360 | #define INT_35XX_UART4_IRQ 84 |
361 | #define INT_35XX_CCDC_VD0_IRQ 88 | 361 | #define INT_35XX_CCDC_VD0_IRQ 88 |
362 | #define INT_35XX_CCDC_VD1_IRQ 92 | 362 | #define INT_35XX_CCDC_VD1_IRQ 92 |
363 | #define INT_35XX_CCDC_VD2_IRQ 93 | 363 | #define INT_35XX_CCDC_VD2_IRQ 93 |
diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h index 1ab9fd6abe6d..865a2ba7ffa8 100644 --- a/arch/arm/plat-omap/include/plat/serial.h +++ b/arch/arm/plat-omap/include/plat/serial.h | |||
@@ -44,6 +44,7 @@ | |||
44 | #define OMAP3_UART2_BASE OMAP2_UART2_BASE | 44 | #define OMAP3_UART2_BASE OMAP2_UART2_BASE |
45 | #define OMAP3_UART3_BASE 0x49020000 | 45 | #define OMAP3_UART3_BASE 0x49020000 |
46 | #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */ | 46 | #define OMAP3_UART4_BASE 0x49042000 /* Only on 36xx */ |
47 | #define OMAP3_UART4_AM35XX_BASE 0x4809E000 /* Only on AM35xx */ | ||
47 | 48 | ||
48 | /* OMAP4 serial ports */ | 49 | /* OMAP4 serial ports */ |
49 | #define OMAP4_UART1_BASE OMAP2_UART1_BASE | 50 | #define OMAP4_UART1_BASE OMAP2_UART1_BASE |