aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
diff options
context:
space:
mode:
authorKyle Manna <kyle.manna@fuel7.com>2011-10-18 14:47:41 -0400
committerPaul Walmsley <paul@pwsan.com>2011-12-16 00:44:34 -0500
commit4bf90f6573d04845917dc0ac38170746f84c533c (patch)
treee8f976c9adf7b632e37917ee3176eac41d7084ff /arch/arm/mach-omap2/omap_hwmod_3xxx_data.c
parent91a36bdb3ada99ebf3a613a0dab2d741445ffd7f (diff)
ARM: OMAP: hwmod data: Add support for AM35xx UART4/ttyO3
Add hwmod support to enable access to UART4 of the AM35xx series of chips. The UART4 device referenced from the TRM will show up as ttyO3. This was tested on an AM3505. Signed-off-by: Kyle Manna <kyle.manna@fuel7.com> Signed-off-by: Paul Walmsley <paul@pwsan.com>
Diffstat (limited to 'arch/arm/mach-omap2/omap_hwmod_3xxx_data.c')
-rw-r--r--arch/arm/mach-omap2/omap_hwmod_3xxx_data.c52
1 files changed, 52 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 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;
164static struct omap_hwmod omap3xxx_uart2_hwmod; 164static struct omap_hwmod omap3xxx_uart2_hwmod;
165static struct omap_hwmod omap3xxx_uart3_hwmod; 165static struct omap_hwmod omap3xxx_uart3_hwmod;
166static struct omap_hwmod omap3xxx_uart4_hwmod; 166static struct omap_hwmod omap3xxx_uart4_hwmod;
167static struct omap_hwmod am35xx_uart4_hwmod;
167static struct omap_hwmod omap3xxx_usbhsotg_hwmod; 168static 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 */
304static 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
312static 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 */
303static struct omap_hwmod_ocp_if omap3_l4_core__i2c1 = { 321static 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
1330static struct omap_hwmod_irq_info am35xx_uart4_mpu_irqs[] = {
1331 { .irq = INT_35XX_UART4_IRQ, },
1332};
1333
1334static 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
1339static struct omap_hwmod_ocp_if *am35xx_uart4_slaves[] = {
1340 &am35xx_l4_core__uart4,
1341};
1342
1343static 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
1312static struct omap_hwmod_class i2c_class = { 1363static 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[] = {
3287static __initdata struct omap_hwmod *am35xx_hwmods[] = { 3338static __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