diff for duplicates of <87vct2hq79.fsf@ti.com> diff --git a/a/1.txt b/N1/1.txt index 35bbb20..e96c5bf 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -66,258 +66,3 @@ Will post these officially after a bit more testing, but so far it's working on OMAP2420/n810 and OMAP3430/n900. Kevin - - ->From 8ad40f8c7f950105b25cc8d2cc35caa50871f86f Mon Sep 17 00:00:00 2001 -From: Kevin Hilman <khilman@ti.com> -Date: Wed, 7 Sep 2011 12:04:44 -0700 -Subject: [PATCH 1/2] OMAP2/3: PM: trigger CPU PM notifiers in idle and - suspend path - -Add calls to CPU PM notifier core in the idle and suspend paths -so any CPU PM notifiers are properly called. - -[add more description about the need to trigger notifiers only after - next power states are programmed.] - -Signed-off-by: Kevin Hilman <khilman@ti.com> ---- - arch/arm/mach-omap2/pm24xx.c | 5 +++++ - arch/arm/mach-omap2/pm34xx.c | 5 +++++ - 2 files changed, 10 insertions(+), 0 deletions(-) - -diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c -index bf089e7..9f7e551 100644 ---- a/arch/arm/mach-omap2/pm24xx.c -+++ b/arch/arm/mach-omap2/pm24xx.c -@@ -31,6 +31,7 @@ - #include <linux/time.h> - #include <linux/gpio.h> - #include <linux/console.h> -+#include <linux/cpu_pm.h> - - #include <asm/mach/time.h> - #include <asm/mach/irq.h> -@@ -142,11 +143,15 @@ static void omap2_enter_full_retention(void) - omap_uart_prepare_idle(1); - omap_uart_prepare_idle(2); - -+ cpu_pm_enter(); -+ - /* Jump to SRAM suspend code */ - omap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL), - OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL), - OMAP_SDRC_REGADDR(SDRC_POWER)); - -+ cpu_pm_exit(); -+ - omap_uart_resume_idle(2); - omap_uart_resume_idle(1); - omap_uart_resume_idle(0); -diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c -index 7255d9b..b167c7f 100644 ---- a/arch/arm/mach-omap2/pm34xx.c -+++ b/arch/arm/mach-omap2/pm34xx.c -@@ -29,6 +29,7 @@ - #include <linux/delay.h> - #include <linux/slab.h> - #include <linux/console.h> -+#include <linux/cpu_pm.h> - #include <trace/events/power.h> - - #include <asm/suspend.h> -@@ -386,6 +387,8 @@ void omap_sram_idle(void) - if (!console_trylock()) - goto console_still_active; - -+ cpu_pm_enter(); -+ - /* PER */ - if (per_next_state < PWRDM_POWER_ON) { - per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; -@@ -465,6 +468,8 @@ void omap_sram_idle(void) - omap_uart_resume_idle(3); - } - -+ cpu_pm_exit(); -+ - if (!is_suspending()) - console_unlock(); - --- -1.7.6 - - - - ->From 38800600dc72d96c74a3db5264ddd516e7e1a0c8 Mon Sep 17 00:00:00 2001 -From: Kevin Hilman <khilman@ti.com> -Date: Wed, 15 Jun 2011 16:23:29 -0700 -Subject: [PATCH 2/2] KJH: use CPU PM for UART - ---- - arch/arm/mach-omap2/pm24xx.c | 8 ------- - arch/arm/mach-omap2/pm34xx.c | 8 ------- - arch/arm/mach-omap2/serial.c | 33 ++++++++++++++++++++++++++++- - arch/arm/plat-omap/include/plat/serial.h | 2 - - 4 files changed, 31 insertions(+), 20 deletions(-) - -diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c -index 9f7e551..e66c412 100644 ---- a/arch/arm/mach-omap2/pm24xx.c -+++ b/arch/arm/mach-omap2/pm24xx.c -@@ -139,10 +139,6 @@ static void omap2_enter_full_retention(void) - if (!console_trylock()) - goto no_sleep; - -- omap_uart_prepare_idle(0); -- omap_uart_prepare_idle(1); -- omap_uart_prepare_idle(2); -- - cpu_pm_enter(); - - /* Jump to SRAM suspend code */ -@@ -152,10 +148,6 @@ static void omap2_enter_full_retention(void) - - cpu_pm_exit(); - -- omap_uart_resume_idle(2); -- omap_uart_resume_idle(1); -- omap_uart_resume_idle(0); -- - if (!is_suspending()) - console_unlock(); - -diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c -index b167c7f..04f7075 100644 ---- a/arch/arm/mach-omap2/pm34xx.c -+++ b/arch/arm/mach-omap2/pm34xx.c -@@ -392,8 +392,6 @@ void omap_sram_idle(void) - /* PER */ - if (per_next_state < PWRDM_POWER_ON) { - per_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0; -- omap_uart_prepare_idle(2); -- omap_uart_prepare_idle(3); - omap2_gpio_prepare_for_idle(per_going_off); - if (per_next_state == PWRDM_POWER_OFF) - omap3_per_save_context(); -@@ -401,8 +399,6 @@ void omap_sram_idle(void) - - /* CORE */ - if (core_next_state < PWRDM_POWER_ON) { -- omap_uart_prepare_idle(0); -- omap_uart_prepare_idle(1); - if (core_next_state == PWRDM_POWER_OFF) { - omap3_core_save_context(); - omap3_cm_save_context(); -@@ -449,8 +445,6 @@ void omap_sram_idle(void) - omap3_sram_restore_context(); - omap2_sms_restore_context(); - } -- omap_uart_resume_idle(0); -- omap_uart_resume_idle(1); - if (core_next_state == PWRDM_POWER_OFF) - omap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK, - OMAP3430_GR_MOD, -@@ -464,8 +458,6 @@ void omap_sram_idle(void) - omap2_gpio_resume_after_idle(); - if (per_prev_state == PWRDM_POWER_OFF) - omap3_per_restore_context(); -- omap_uart_resume_idle(2); -- omap_uart_resume_idle(3); - } - - cpu_pm_exit(); -diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c -index 466fc722..1961484 100644 ---- a/arch/arm/mach-omap2/serial.c -+++ b/arch/arm/mach-omap2/serial.c -@@ -28,6 +28,7 @@ - #include <linux/serial_8250.h> - #include <linux/pm_runtime.h> - #include <linux/console.h> -+#include <linux/cpu_pm.h> - - #ifdef CONFIG_SERIAL_OMAP - #include <plat/omap-serial.h> -@@ -102,6 +103,8 @@ struct omap_uart_state { - u16 wer; - u16 mcr; - #endif -+ -+ struct notifier_block nb; - }; - - static LIST_HEAD(uart_list); -@@ -389,7 +392,7 @@ static void omap_uart_idle_timer(unsigned long data) - omap_uart_allow_sleep(uart); - } - --void omap_uart_prepare_idle(int num) -+static void omap_uart_prepare_idle(int num) - { - struct omap_uart_state *uart; - -@@ -401,7 +404,7 @@ void omap_uart_prepare_idle(int num) - } - } - --void omap_uart_resume_idle(int num) -+static void omap_uart_resume_idle(int num) - { - struct omap_uart_state *uart; - -@@ -855,6 +858,30 @@ void __init omap_serial_init_port(struct omap_board_data *bdata) - uart->errata |= UART_ERRATA_i202_MDR1_ACCESS; - } - -+ -+static int uart_notifier_call(struct notifier_block *nb, -+ unsigned long val, void *p) -+{ -+ struct omap_uart_state *uart = -+ container_of(nb, struct omap_uart_state, nb); -+ -+ switch (val) { -+ case CPU_PM_ENTER: -+ case CPU_CLUSTER_PM_ENTER: -+ omap_uart_prepare_idle(uart->num); -+ break; -+ case CPU_PM_EXIT: -+ case CPU_CLUSTER_PM_EXIT: -+ omap_uart_resume_idle(uart->num); -+ break; -+ default: -+ WARN(1,"%s: un-handled notifier value: 0x%lx\n", __func__, val); -+ break; -+ } -+ -+ return 0; -+} -+ - /** - * omap_serial_init() - initialize all supported serial ports - * -@@ -874,5 +901,7 @@ void __init omap_serial_init(void) - bdata.pads_cnt = 0; - omap_serial_init_port(&bdata); - -+ uart->nb.notifier_call = uart_notifier_call; -+ cpu_pm_register_notifier(&uart->nb); - } - } -diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h -index de3b10c..0e78f6d 100644 ---- a/arch/arm/plat-omap/include/plat/serial.h -+++ b/arch/arm/plat-omap/include/plat/serial.h -@@ -112,8 +112,6 @@ extern void omap_serial_init_port(struct omap_board_data *bdata); - extern int omap_uart_can_sleep(void); - extern void omap_uart_check_wakeup(void); - extern void omap_uart_prepare_suspend(void); --extern void omap_uart_prepare_idle(int num); --extern void omap_uart_resume_idle(int num); - extern void omap_uart_enable_irqs(int enable); - #endif - --- -1.7.6 diff --git a/a/content_digest b/N1/content_digest index 1c0b13c..850f324 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,13 +1,9 @@ "ref\01315144466-9395-1-git-send-email-santosh.shilimkar@ti.com\0" "ref\01315144466-9395-26-git-send-email-santosh.shilimkar@ti.com\0" - "From\0Kevin Hilman <khilman@ti.com>\0" - "Subject\0Re: [PATCH 25/25] OMAP3: CPUidle: Make use of CPU PM notifiers\0" + "From\0khilman@ti.com (Kevin Hilman)\0" + "Subject\0[PATCH 25/25] OMAP3: CPUidle: Make use of CPU PM notifiers\0" "Date\0Thu, 08 Sep 2011 10:57:46 -0700\0" - "To\0Santosh Shilimkar <santosh.shilimkar@ti.com>\0" - "Cc\0linux-omap@vger.kernel.org" - linux@arm.linux.org.uk - linux-arm-kernel@lists.infradead.org - " rnayak@ti.com\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" "b\0" "Hi Santosh,\n" @@ -77,261 +73,6 @@ "Will post these officially after a bit more testing, but so far it's\n" "working on OMAP2420/n810 and OMAP3430/n900.\n" "\n" - "Kevin\n" - "\n" - "\n" - ">From 8ad40f8c7f950105b25cc8d2cc35caa50871f86f Mon Sep 17 00:00:00 2001\n" - "From: Kevin Hilman <khilman@ti.com>\n" - "Date: Wed, 7 Sep 2011 12:04:44 -0700\n" - "Subject: [PATCH 1/2] OMAP2/3: PM: trigger CPU PM notifiers in idle and\n" - " suspend path\n" - "\n" - "Add calls to CPU PM notifier core in the idle and suspend paths\n" - "so any CPU PM notifiers are properly called.\n" - "\n" - "[add more description about the need to trigger notifiers only after\n" - " next power states are programmed.]\n" - "\n" - "Signed-off-by: Kevin Hilman <khilman@ti.com>\n" - "---\n" - " arch/arm/mach-omap2/pm24xx.c | 5 +++++\n" - " arch/arm/mach-omap2/pm34xx.c | 5 +++++\n" - " 2 files changed, 10 insertions(+), 0 deletions(-)\n" - "\n" - "diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c\n" - "index bf089e7..9f7e551 100644\n" - "--- a/arch/arm/mach-omap2/pm24xx.c\n" - "+++ b/arch/arm/mach-omap2/pm24xx.c\n" - "@@ -31,6 +31,7 @@\n" - " #include <linux/time.h>\n" - " #include <linux/gpio.h>\n" - " #include <linux/console.h>\n" - "+#include <linux/cpu_pm.h>\n" - " \n" - " #include <asm/mach/time.h>\n" - " #include <asm/mach/irq.h>\n" - "@@ -142,11 +143,15 @@ static void omap2_enter_full_retention(void)\n" - " \tomap_uart_prepare_idle(1);\n" - " \tomap_uart_prepare_idle(2);\n" - " \n" - "+\tcpu_pm_enter();\n" - "+\n" - " \t/* Jump to SRAM suspend code */\n" - " \tomap2_sram_suspend(sdrc_read_reg(SDRC_DLLA_CTRL),\n" - " \t\t\t OMAP_SDRC_REGADDR(SDRC_DLLA_CTRL),\n" - " \t\t\t OMAP_SDRC_REGADDR(SDRC_POWER));\n" - " \n" - "+\tcpu_pm_exit();\n" - "+\n" - " \tomap_uart_resume_idle(2);\n" - " \tomap_uart_resume_idle(1);\n" - " \tomap_uart_resume_idle(0);\n" - "diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c\n" - "index 7255d9b..b167c7f 100644\n" - "--- a/arch/arm/mach-omap2/pm34xx.c\n" - "+++ b/arch/arm/mach-omap2/pm34xx.c\n" - "@@ -29,6 +29,7 @@\n" - " #include <linux/delay.h>\n" - " #include <linux/slab.h>\n" - " #include <linux/console.h>\n" - "+#include <linux/cpu_pm.h>\n" - " #include <trace/events/power.h>\n" - " \n" - " #include <asm/suspend.h>\n" - "@@ -386,6 +387,8 @@ void omap_sram_idle(void)\n" - " \t\t\tif (!console_trylock())\n" - " \t\t\t\tgoto console_still_active;\n" - " \n" - "+\tcpu_pm_enter();\n" - "+\n" - " \t/* PER */\n" - " \tif (per_next_state < PWRDM_POWER_ON) {\n" - " \t\tper_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;\n" - "@@ -465,6 +468,8 @@ void omap_sram_idle(void)\n" - " \t\tomap_uart_resume_idle(3);\n" - " \t}\n" - " \n" - "+\tcpu_pm_exit();\n" - "+\n" - " \tif (!is_suspending())\n" - " \t\tconsole_unlock();\n" - " \n" - "-- \n" - "1.7.6\n" - "\n" - "\n" - "\n" - "\n" - ">From 38800600dc72d96c74a3db5264ddd516e7e1a0c8 Mon Sep 17 00:00:00 2001\n" - "From: Kevin Hilman <khilman@ti.com>\n" - "Date: Wed, 15 Jun 2011 16:23:29 -0700\n" - "Subject: [PATCH 2/2] KJH: use CPU PM for UART\n" - "\n" - "---\n" - " arch/arm/mach-omap2/pm24xx.c | 8 -------\n" - " arch/arm/mach-omap2/pm34xx.c | 8 -------\n" - " arch/arm/mach-omap2/serial.c | 33 ++++++++++++++++++++++++++++-\n" - " arch/arm/plat-omap/include/plat/serial.h | 2 -\n" - " 4 files changed, 31 insertions(+), 20 deletions(-)\n" - "\n" - "diff --git a/arch/arm/mach-omap2/pm24xx.c b/arch/arm/mach-omap2/pm24xx.c\n" - "index 9f7e551..e66c412 100644\n" - "--- a/arch/arm/mach-omap2/pm24xx.c\n" - "+++ b/arch/arm/mach-omap2/pm24xx.c\n" - "@@ -139,10 +139,6 @@ static void omap2_enter_full_retention(void)\n" - " \t\tif (!console_trylock())\n" - " \t\t\tgoto no_sleep;\n" - " \n" - "-\tomap_uart_prepare_idle(0);\n" - "-\tomap_uart_prepare_idle(1);\n" - "-\tomap_uart_prepare_idle(2);\n" - "-\n" - " \tcpu_pm_enter();\n" - " \n" - " \t/* Jump to SRAM suspend code */\n" - "@@ -152,10 +148,6 @@ static void omap2_enter_full_retention(void)\n" - " \n" - " \tcpu_pm_exit();\n" - " \n" - "-\tomap_uart_resume_idle(2);\n" - "-\tomap_uart_resume_idle(1);\n" - "-\tomap_uart_resume_idle(0);\n" - "-\n" - " \tif (!is_suspending())\n" - " \t\tconsole_unlock();\n" - " \n" - "diff --git a/arch/arm/mach-omap2/pm34xx.c b/arch/arm/mach-omap2/pm34xx.c\n" - "index b167c7f..04f7075 100644\n" - "--- a/arch/arm/mach-omap2/pm34xx.c\n" - "+++ b/arch/arm/mach-omap2/pm34xx.c\n" - "@@ -392,8 +392,6 @@ void omap_sram_idle(void)\n" - " \t/* PER */\n" - " \tif (per_next_state < PWRDM_POWER_ON) {\n" - " \t\tper_going_off = (per_next_state == PWRDM_POWER_OFF) ? 1 : 0;\n" - "-\t\tomap_uart_prepare_idle(2);\n" - "-\t\tomap_uart_prepare_idle(3);\n" - " \t\tomap2_gpio_prepare_for_idle(per_going_off);\n" - " \t\tif (per_next_state == PWRDM_POWER_OFF)\n" - " \t\t\t\tomap3_per_save_context();\n" - "@@ -401,8 +399,6 @@ void omap_sram_idle(void)\n" - " \n" - " \t/* CORE */\n" - " \tif (core_next_state < PWRDM_POWER_ON) {\n" - "-\t\tomap_uart_prepare_idle(0);\n" - "-\t\tomap_uart_prepare_idle(1);\n" - " \t\tif (core_next_state == PWRDM_POWER_OFF) {\n" - " \t\t\tomap3_core_save_context();\n" - " \t\t\tomap3_cm_save_context();\n" - "@@ -449,8 +445,6 @@ void omap_sram_idle(void)\n" - " \t\t\tomap3_sram_restore_context();\n" - " \t\t\tomap2_sms_restore_context();\n" - " \t\t}\n" - "-\t\tomap_uart_resume_idle(0);\n" - "-\t\tomap_uart_resume_idle(1);\n" - " \t\tif (core_next_state == PWRDM_POWER_OFF)\n" - " \t\t\tomap2_prm_clear_mod_reg_bits(OMAP3430_AUTO_OFF_MASK,\n" - " \t\t\t\t\t OMAP3430_GR_MOD,\n" - "@@ -464,8 +458,6 @@ void omap_sram_idle(void)\n" - " \t\tomap2_gpio_resume_after_idle();\n" - " \t\tif (per_prev_state == PWRDM_POWER_OFF)\n" - " \t\t\tomap3_per_restore_context();\n" - "-\t\tomap_uart_resume_idle(2);\n" - "-\t\tomap_uart_resume_idle(3);\n" - " \t}\n" - " \n" - " \tcpu_pm_exit();\n" - "diff --git a/arch/arm/mach-omap2/serial.c b/arch/arm/mach-omap2/serial.c\n" - "index 466fc722..1961484 100644\n" - "--- a/arch/arm/mach-omap2/serial.c\n" - "+++ b/arch/arm/mach-omap2/serial.c\n" - "@@ -28,6 +28,7 @@\n" - " #include <linux/serial_8250.h>\n" - " #include <linux/pm_runtime.h>\n" - " #include <linux/console.h>\n" - "+#include <linux/cpu_pm.h>\n" - " \n" - " #ifdef CONFIG_SERIAL_OMAP\n" - " #include <plat/omap-serial.h>\n" - "@@ -102,6 +103,8 @@ struct omap_uart_state {\n" - " \tu16 wer;\n" - " \tu16 mcr;\n" - " #endif\n" - "+\n" - "+\tstruct notifier_block nb;\n" - " };\n" - " \n" - " static LIST_HEAD(uart_list);\n" - "@@ -389,7 +392,7 @@ static void omap_uart_idle_timer(unsigned long data)\n" - " \tomap_uart_allow_sleep(uart);\n" - " }\n" - " \n" - "-void omap_uart_prepare_idle(int num)\n" - "+static void omap_uart_prepare_idle(int num)\n" - " {\n" - " \tstruct omap_uart_state *uart;\n" - " \n" - "@@ -401,7 +404,7 @@ void omap_uart_prepare_idle(int num)\n" - " \t}\n" - " }\n" - " \n" - "-void omap_uart_resume_idle(int num)\n" - "+static void omap_uart_resume_idle(int num)\n" - " {\n" - " \tstruct omap_uart_state *uart;\n" - " \n" - "@@ -855,6 +858,30 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)\n" - " \t\tuart->errata |= UART_ERRATA_i202_MDR1_ACCESS;\n" - " }\n" - " \n" - "+ \n" - "+static int uart_notifier_call(struct notifier_block *nb, \n" - "+\t\t\t unsigned long val, void *p)\n" - "+{\n" - "+\tstruct omap_uart_state *uart = \n" - "+\t\tcontainer_of(nb, struct omap_uart_state, nb);\n" - "+\n" - "+\tswitch (val) {\n" - "+\tcase CPU_PM_ENTER:\n" - "+\tcase CPU_CLUSTER_PM_ENTER:\n" - "+\t\tomap_uart_prepare_idle(uart->num);\n" - "+\t\tbreak;\n" - "+\tcase CPU_PM_EXIT:\n" - "+\tcase CPU_CLUSTER_PM_EXIT:\n" - "+\t\tomap_uart_resume_idle(uart->num);\n" - "+\t\tbreak;\n" - "+\tdefault:\n" - "+\t\tWARN(1,\"%s: un-handled notifier value: 0x%lx\\n\", __func__, val);\n" - "+\t\tbreak;\n" - "+\t}\n" - "+\n" - "+\treturn 0;\n" - "+}\n" - "+\n" - " /**\n" - " * omap_serial_init() - initialize all supported serial ports\n" - " *\n" - "@@ -874,5 +901,7 @@ void __init omap_serial_init(void)\n" - " \t\tbdata.pads_cnt = 0;\n" - " \t\tomap_serial_init_port(&bdata);\n" - " \n" - "+\t\tuart->nb.notifier_call = uart_notifier_call;\n" - "+\t\tcpu_pm_register_notifier(&uart->nb);\n" - " \t}\n" - " }\n" - "diff --git a/arch/arm/plat-omap/include/plat/serial.h b/arch/arm/plat-omap/include/plat/serial.h\n" - "index de3b10c..0e78f6d 100644\n" - "--- a/arch/arm/plat-omap/include/plat/serial.h\n" - "+++ b/arch/arm/plat-omap/include/plat/serial.h\n" - "@@ -112,8 +112,6 @@ extern void omap_serial_init_port(struct omap_board_data *bdata);\n" - " extern int omap_uart_can_sleep(void);\n" - " extern void omap_uart_check_wakeup(void);\n" - " extern void omap_uart_prepare_suspend(void);\n" - "-extern void omap_uart_prepare_idle(int num);\n" - "-extern void omap_uart_resume_idle(int num);\n" - " extern void omap_uart_enable_irqs(int enable);\n" - " #endif\n" - " \n" - "-- \n" - 1.7.6 + Kevin -5876b30538988c12631af15d2f465ecf732dafc8ddd49205c62ce2cd02670dc8 +882ec5b64e7e922cdc9fc7894342556b47c5f7bf03e71fd6627992974c731d4f
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.