Skip to content

Commit 66dde54

Browse files
Santosh ShilimkarPaul Walmsley
authored andcommitted
ARM: OMAP2+: hwmod-data: UART IP needs software control to manage sidle modes
OMAP UART IP needs software control for slave idle modes based on functional state of the IP. i.e The IP slave idle settings should be set to 'noidle' when being used and then put back to 'smart_idle' when unused. Currently this is handled by the driver with function pointers implemented in platform code. This however breaks in case of device tree because of missing idle handling APIs. Previous patches in this series added a flag HWMOD_SWSUP_SIDLE_ACTIVE which takes care of the mentioned requirement. Hence add the flag for all UART IPs to take advantage of feature supported by framework. Subsequent patches removes the slave idle handling from driver code. Tested-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Tested-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Tested-by: Kevin Hilman <khilman@linaro.org> # OMAP4/Panda Signed-off-by: Paul Walmsley <paul@pwsan.com>
1 parent ca43ea3 commit 66dde54

4 files changed

Lines changed: 18 additions & 1 deletion

File tree

‎arch/arm/mach-omap2/omap_hwmod_2xxx_ipblock_data.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,7 @@ struct omap_hwmod omap2xxx_uart1_hwmod = {
512512
.mpu_irqs = omap2_uart1_mpu_irqs,
513513
.sdma_reqs = omap2_uart1_sdma_reqs,
514514
.main_clk = "uart1_fck",
515+
.flags = HWMOD_SWSUP_SIDLE_ACT,
515516
.prcm = {
516517
.omap2 = {
517518
.module_offs = CORE_MOD,
@@ -531,6 +532,7 @@ struct omap_hwmod omap2xxx_uart2_hwmod = {
531532
.mpu_irqs = omap2_uart2_mpu_irqs,
532533
.sdma_reqs = omap2_uart2_sdma_reqs,
533534
.main_clk = "uart2_fck",
535+
.flags = HWMOD_SWSUP_SIDLE_ACT,
534536
.prcm = {
535537
.omap2 = {
536538
.module_offs = CORE_MOD,
@@ -550,6 +552,7 @@ struct omap_hwmod omap2xxx_uart3_hwmod = {
550552
.mpu_irqs = omap2_uart3_mpu_irqs,
551553
.sdma_reqs = omap2_uart3_sdma_reqs,
552554
.main_clk = "uart3_fck",
555+
.flags = HWMOD_SWSUP_SIDLE_ACT,
553556
.prcm = {
554557
.omap2 = {
555558
.module_offs = CORE_MOD,

‎arch/arm/mach-omap2/omap_hwmod_33xx_data.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,7 @@ static struct omap_hwmod am33xx_uart1_hwmod = {
19951995
.name = "uart1",
19961996
.class = &uart_class,
19971997
.clkdm_name = "l4_wkup_clkdm",
1998+
.flags = HWMOD_SWSUP_SIDLE_ACT,
19981999
.mpu_irqs = am33xx_uart1_irqs,
19992000
.sdma_reqs = uart1_edma_reqs,
20002001
.main_clk = "dpll_per_m2_div4_wkupdm_ck",
@@ -2015,6 +2016,7 @@ static struct omap_hwmod am33xx_uart2_hwmod = {
20152016
.name = "uart2",
20162017
.class = &uart_class,
20172018
.clkdm_name = "l4ls_clkdm",
2019+
.flags = HWMOD_SWSUP_SIDLE_ACT,
20182020
.mpu_irqs = am33xx_uart2_irqs,
20192021
.sdma_reqs = uart1_edma_reqs,
20202022
.main_clk = "dpll_per_m2_div4_ck",
@@ -2042,6 +2044,7 @@ static struct omap_hwmod am33xx_uart3_hwmod = {
20422044
.name = "uart3",
20432045
.class = &uart_class,
20442046
.clkdm_name = "l4ls_clkdm",
2047+
.flags = HWMOD_SWSUP_SIDLE_ACT,
20452048
.mpu_irqs = am33xx_uart3_irqs,
20462049
.sdma_reqs = uart3_edma_reqs,
20472050
.main_clk = "dpll_per_m2_div4_ck",
@@ -2062,6 +2065,7 @@ static struct omap_hwmod am33xx_uart4_hwmod = {
20622065
.name = "uart4",
20632066
.class = &uart_class,
20642067
.clkdm_name = "l4ls_clkdm",
2068+
.flags = HWMOD_SWSUP_SIDLE_ACT,
20652069
.mpu_irqs = am33xx_uart4_irqs,
20662070
.sdma_reqs = uart1_edma_reqs,
20672071
.main_clk = "dpll_per_m2_div4_ck",
@@ -2082,6 +2086,7 @@ static struct omap_hwmod am33xx_uart5_hwmod = {
20822086
.name = "uart5",
20832087
.class = &uart_class,
20842088
.clkdm_name = "l4ls_clkdm",
2089+
.flags = HWMOD_SWSUP_SIDLE_ACT,
20852090
.mpu_irqs = am33xx_uart5_irqs,
20862091
.sdma_reqs = uart1_edma_reqs,
20872092
.main_clk = "dpll_per_m2_div4_ck",
@@ -2102,6 +2107,7 @@ static struct omap_hwmod am33xx_uart6_hwmod = {
21022107
.name = "uart6",
21032108
.class = &uart_class,
21042109
.clkdm_name = "l4ls_clkdm",
2110+
.flags = HWMOD_SWSUP_SIDLE_ACT,
21052111
.mpu_irqs = am33xx_uart6_irqs,
21062112
.sdma_reqs = uart1_edma_reqs,
21072113
.main_clk = "dpll_per_m2_div4_ck",

‎arch/arm/mach-omap2/omap_hwmod_3xxx_data.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,7 @@ static struct omap_hwmod omap3xxx_uart1_hwmod = {
490490
.mpu_irqs = omap2_uart1_mpu_irqs,
491491
.sdma_reqs = omap2_uart1_sdma_reqs,
492492
.main_clk = "uart1_fck",
493+
.flags = HWMOD_SWSUP_SIDLE_ACT,
493494
.prcm = {
494495
.omap2 = {
495496
.module_offs = CORE_MOD,
@@ -508,6 +509,7 @@ static struct omap_hwmod omap3xxx_uart2_hwmod = {
508509
.mpu_irqs = omap2_uart2_mpu_irqs,
509510
.sdma_reqs = omap2_uart2_sdma_reqs,
510511
.main_clk = "uart2_fck",
512+
.flags = HWMOD_SWSUP_SIDLE_ACT,
511513
.prcm = {
512514
.omap2 = {
513515
.module_offs = CORE_MOD,
@@ -526,6 +528,7 @@ static struct omap_hwmod omap3xxx_uart3_hwmod = {
526528
.mpu_irqs = omap2_uart3_mpu_irqs,
527529
.sdma_reqs = omap2_uart3_sdma_reqs,
528530
.main_clk = "uart3_fck",
531+
.flags = HWMOD_SWSUP_SIDLE_ACT,
529532
.prcm = {
530533
.omap2 = {
531534
.module_offs = OMAP3430_PER_MOD,
@@ -555,6 +558,7 @@ static struct omap_hwmod omap36xx_uart4_hwmod = {
555558
.mpu_irqs = uart4_mpu_irqs,
556559
.sdma_reqs = uart4_sdma_reqs,
557560
.main_clk = "uart4_fck",
561+
.flags = HWMOD_SWSUP_SIDLE_ACT,
558562
.prcm = {
559563
.omap2 = {
560564
.module_offs = OMAP3430_PER_MOD,

‎arch/arm/mach-omap2/omap_hwmod_44xx_data.c‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3434,6 +3434,7 @@ static struct omap_hwmod omap44xx_uart1_hwmod = {
34343434
.name = "uart1",
34353435
.class = &omap44xx_uart_hwmod_class,
34363436
.clkdm_name = "l4_per_clkdm",
3437+
.flags = HWMOD_SWSUP_SIDLE_ACT,
34373438
.mpu_irqs = omap44xx_uart1_irqs,
34383439
.sdma_reqs = omap44xx_uart1_sdma_reqs,
34393440
.main_clk = "func_48m_fclk",
@@ -3462,6 +3463,7 @@ static struct omap_hwmod omap44xx_uart2_hwmod = {
34623463
.name = "uart2",
34633464
.class = &omap44xx_uart_hwmod_class,
34643465
.clkdm_name = "l4_per_clkdm",
3466+
.flags = HWMOD_SWSUP_SIDLE_ACT,
34653467
.mpu_irqs = omap44xx_uart2_irqs,
34663468
.sdma_reqs = omap44xx_uart2_sdma_reqs,
34673469
.main_clk = "func_48m_fclk",
@@ -3490,7 +3492,8 @@ static struct omap_hwmod omap44xx_uart3_hwmod = {
34903492
.name = "uart3",
34913493
.class = &omap44xx_uart_hwmod_class,
34923494
.clkdm_name = "l4_per_clkdm",
3493-
.flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET,
3495+
.flags = HWMOD_INIT_NO_IDLE | HWMOD_INIT_NO_RESET |
3496+
HWMOD_SWSUP_SIDLE_ACT,
34943497
.mpu_irqs = omap44xx_uart3_irqs,
34953498
.sdma_reqs = omap44xx_uart3_sdma_reqs,
34963499
.main_clk = "func_48m_fclk",
@@ -3519,6 +3522,7 @@ static struct omap_hwmod omap44xx_uart4_hwmod = {
35193522
.name = "uart4",
35203523
.class = &omap44xx_uart_hwmod_class,
35213524
.clkdm_name = "l4_per_clkdm",
3525+
.flags = HWMOD_SWSUP_SIDLE_ACT,
35223526
.mpu_irqs = omap44xx_uart4_irqs,
35233527
.sdma_reqs = omap44xx_uart4_sdma_reqs,
35243528
.main_clk = "func_48m_fclk",

0 commit comments

Comments
 (0)