From: "Varadarajan, Charulatha" <charu@ti.com> To: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: tony@atomide.com, khilman@deeprootsystems.com, paul@pwsan.com, Charulatha V <charu@ti.com> Subject: [PATCH 5/7] OMAP2+: GPIO: make workaround_enabled bank specific Date: Mon, 18 Apr 2011 20:36:55 +0530 [thread overview] Message-ID: <1303139217-10285-6-git-send-email-charu@ti.com> (raw) In-Reply-To: <no> From: Charulatha V <charu@ti.com> Make workaround_enabled flag bank-specific instead of using a single flag for all the banks together. This would be helpful while making use of runtime framework in OMAP GPIO driver which would make the driver handle each GPIO bank independently. Also rename workaround_enabled flag to off_mode_wkup_wa_enabled Signed-off-by: Charulatha V <charu@ti.com> --- arch/arm/plat-omap/gpio.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 5d4ed6c..5933c98 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -176,6 +176,7 @@ struct gpio_bank { int stride; bool looses_context; u32 ctx_lost_cnt_before; + bool off_mode_wkup_wa_enabled; }; /* @@ -1636,6 +1637,7 @@ static void __init omap_gpio_chip_init(struct gpio_bank *bank) static int gpio; bank->mod_usage = 0; + bank->off_mode_wkup_wa_enabled = false; /* * REVISIT eventually switch from OMAP-specific gpio structs * over to the generic ones @@ -1858,11 +1860,9 @@ static struct sys_device omap_gpio_device = { static void omap_gpio_save_context(struct gpio_bank *bank); static void omap_gpio_restore_context(struct gpio_bank *bank); -static int workaround_enabled; - void omap2_gpio_prepare_for_idle(int off_mode) { - int i, c = 0; + int i; for (i = 0; i < gpio_bank_count; i++) { struct gpio_bank *bank = &gpio_bank[i]; @@ -1922,7 +1922,7 @@ void omap2_gpio_prepare_for_idle(int off_mode) __raw_writel(l2, bank->base + OMAP4_GPIO_RISINGDETECT); } - c++; + bank->off_mode_wkup_wa_enabled = true; save_gpio_ctx: pdev = to_platform_device(bank->dev); @@ -1930,11 +1930,6 @@ save_gpio_ctx: omap_device_get_context_loss_count(pdev); omap_gpio_save_context(bank); } - if (!c) { - workaround_enabled = 0; - return; - } - workaround_enabled = 1; } void omap2_gpio_resume_after_idle(void) @@ -1964,7 +1959,7 @@ void omap2_gpio_resume_after_idle(void) if (ctx_lost_cnt_after == bank->ctx_lost_cnt_before) continue; - if (!workaround_enabled) + if (!bank->off_mode_wkup_wa_enabled) goto restore_gpio_ctx; if (!(bank->enabled_non_wakeup_gpios)) @@ -2042,6 +2037,7 @@ void omap2_gpio_resume_after_idle(void) } restore_gpio_ctx: + bank->off_mode_wkup_wa_enabled = false; omap_gpio_restore_context(bank); } -- 1.7.1
WARNING: multiple messages have this Message-ID (diff)
From: charu@ti.com (Varadarajan, Charulatha) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 5/7] OMAP2+: GPIO: make workaround_enabled bank specific Date: Mon, 18 Apr 2011 20:36:55 +0530 [thread overview] Message-ID: <1303139217-10285-6-git-send-email-charu@ti.com> (raw) In-Reply-To: <no> From: Charulatha V <charu@ti.com> Make workaround_enabled flag bank-specific instead of using a single flag for all the banks together. This would be helpful while making use of runtime framework in OMAP GPIO driver which would make the driver handle each GPIO bank independently. Also rename workaround_enabled flag to off_mode_wkup_wa_enabled Signed-off-by: Charulatha V <charu@ti.com> --- arch/arm/plat-omap/gpio.c | 16 ++++++---------- 1 files changed, 6 insertions(+), 10 deletions(-) diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c index 5d4ed6c..5933c98 100644 --- a/arch/arm/plat-omap/gpio.c +++ b/arch/arm/plat-omap/gpio.c @@ -176,6 +176,7 @@ struct gpio_bank { int stride; bool looses_context; u32 ctx_lost_cnt_before; + bool off_mode_wkup_wa_enabled; }; /* @@ -1636,6 +1637,7 @@ static void __init omap_gpio_chip_init(struct gpio_bank *bank) static int gpio; bank->mod_usage = 0; + bank->off_mode_wkup_wa_enabled = false; /* * REVISIT eventually switch from OMAP-specific gpio structs * over to the generic ones @@ -1858,11 +1860,9 @@ static struct sys_device omap_gpio_device = { static void omap_gpio_save_context(struct gpio_bank *bank); static void omap_gpio_restore_context(struct gpio_bank *bank); -static int workaround_enabled; - void omap2_gpio_prepare_for_idle(int off_mode) { - int i, c = 0; + int i; for (i = 0; i < gpio_bank_count; i++) { struct gpio_bank *bank = &gpio_bank[i]; @@ -1922,7 +1922,7 @@ void omap2_gpio_prepare_for_idle(int off_mode) __raw_writel(l2, bank->base + OMAP4_GPIO_RISINGDETECT); } - c++; + bank->off_mode_wkup_wa_enabled = true; save_gpio_ctx: pdev = to_platform_device(bank->dev); @@ -1930,11 +1930,6 @@ save_gpio_ctx: omap_device_get_context_loss_count(pdev); omap_gpio_save_context(bank); } - if (!c) { - workaround_enabled = 0; - return; - } - workaround_enabled = 1; } void omap2_gpio_resume_after_idle(void) @@ -1964,7 +1959,7 @@ void omap2_gpio_resume_after_idle(void) if (ctx_lost_cnt_after == bank->ctx_lost_cnt_before) continue; - if (!workaround_enabled) + if (!bank->off_mode_wkup_wa_enabled) goto restore_gpio_ctx; if (!(bank->enabled_non_wakeup_gpios)) @@ -2042,6 +2037,7 @@ void omap2_gpio_resume_after_idle(void) } restore_gpio_ctx: + bank->off_mode_wkup_wa_enabled = false; omap_gpio_restore_context(bank); } -- 1.7.1
next prev parent reply other threads:[~2011-04-18 15:03 UTC|newest] Thread overview: 206+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <no> 2008-08-15 2:20 ` [PATCH 00/07] dyn_array/nr_irqs/sparse_irq support v10 - fix Yinghai Lu 2008-08-15 2:20 ` [PATCH 1/7] x86: some debug info for 32bit sparse_irq Yinghai Lu 2008-08-15 2:20 ` [PATCH 2/7] x86: remove union about dest for log/phy Yinghai Lu 2008-08-15 2:20 ` [PATCH 3/7] x86: make 32bit support per_cpu vector fix #1 Yinghai Lu 2008-08-15 2:20 ` [PATCH 4/7] x86_64: rename irq_desc/irq_desc_with_new - fix Yinghai Lu 2008-08-15 2:20 ` [PATCH 5/7] x86: make 32bit support per_cpu vector fix #2 Yinghai Lu 2008-08-15 2:20 ` [PATCH 6/7] x86: ordering functions in io_apic_32.c Yinghai Lu 2008-08-15 2:20 ` [PATCH 7/7] x86: ordering functions in io_apic_64.c Yinghai Lu 2008-08-15 8:21 ` [PATCH 3/7] x86: make 32bit support per_cpu vector fix #1 Ingo Molnar 2008-08-15 8:29 ` Yinghai Lu 2008-08-15 8:51 ` Ingo Molnar 2008-08-15 8:27 ` [PATCH 00/07] dyn_array/nr_irqs/sparse_irq support v10 - fix Ingo Molnar 2008-08-15 8:34 ` Yinghai Lu 2008-08-15 8:51 ` Ingo Molnar 2008-08-15 9:35 ` Ingo Molnar 2008-08-15 10:00 ` Peter Zijlstra 2008-08-15 10:19 ` Ingo Molnar 2008-08-15 10:28 ` Peter Zijlstra 2008-08-15 17:07 ` Yinghai Lu 2008-08-15 23:42 ` [PATCH 0/7] merge io_apic_xx.c Yinghai Lu 2008-08-15 23:42 ` [PATCH 1/7] x86: ordering functions in io_apic_32.c - fix Yinghai Lu 2008-08-15 23:42 ` [PATCH 2/7] x86: make headers files the smae in io_apic_xx.c Yinghai Lu 2008-08-15 23:42 ` [PATCH 3/7] x86: make 64 handle sis_apic_bug like the 32 bit Yinghai Lu 2008-08-15 23:42 ` [PATCH 4/7] x86: remve ioapic_force Yinghai Lu 2008-08-15 23:42 ` [PATCH 5/7] x86: make io_apic_64.c and io_apic_32.c the same Yinghai Lu 2008-08-15 23:42 ` [PATCH 6/7] rename io_apic_64.c to io_apic.c Yinghai Lu 2008-08-15 23:42 ` [PATCH 7/7] make 32 bit have io_apic resource in /proc/iomem Yinghai Lu 2008-08-16 8:02 ` [PATCH 6/7] rename io_apic_64.c to io_apic.c Ingo Molnar 2008-08-16 8:22 ` [PATCH] x86: io_apic.c, build fix Ingo Molnar 2008-08-16 8:26 ` Yinghai Lu 2008-08-18 4:12 ` [PATCH] x86: apic - unify lapic_resume - fix Yinghai Lu 2008-08-18 4:12 ` [PATCH 1/2] x86: make HAVE_SPARSE_IRQ support selectable Yinghai Lu 2008-08-18 4:12 ` [PATCH 2/2] irq: rename irq_desc() to to_irq_desc() Yinghai Lu 2008-08-18 7:37 ` Ingo Molnar 2008-08-18 18:14 ` Yinghai Lu 2008-08-18 7:25 ` [PATCH] x86: apic - unify lapic_resume - fix Ingo Molnar 2008-08-18 20:44 ` [PATCH] irq: rename irq_desc() to to_irq_desc() " Yinghai Lu 2008-08-18 20:44 ` [PATCH] irq: rename irq_desc() to to_irq_desc() - fix #2 Yinghai Lu 2008-08-18 20:44 ` [PATCH] irq: rename irq_desc() to to_irq_desc() - fix #3 Yinghai Lu 2008-08-19 0:11 ` Ingo Molnar 2008-08-19 0:38 ` Ingo Molnar 2008-08-19 0:48 ` Yinghai Lu 2008-08-19 1:16 ` Ingo Molnar 2010-04-15 9:02 ` [U-Boot] [PATCH] OpenRD: Bring PCIe endpoint out of reset Tanmay Upadhyay 2010-04-20 5:51 ` Tanmay Upadhyay 2010-04-30 6:49 ` Prafulla Wadaskar 2010-04-22 13:16 ` [PATCH] OpenRD: Enable SD/UART selection for serial port 1 Tanmay Upadhyay 2010-05-04 12:48 ` [U-Boot] [PATCH] OpenRD: Reset PCIe endpoint while boot-up through PERST# Tanmay Upadhyay 2010-06-10 9:12 ` [U-Boot] [PATCH] ARM: Kirkwood: Add support for OpenRD-Client & OpenRD-Ultimate Tanmay Upadhyay 2010-06-10 9:16 ` Simon Kagstrom 2010-06-10 9:38 ` Tanmay Upadhyay 2010-06-10 10:25 ` Simon Kagstrom 2010-06-10 19:03 ` Prafulla Wadaskar 2010-06-14 11:02 ` Tanmay Upadhyay 2010-06-13 11:53 ` Albert ARIBAUD 2010-06-13 12:41 ` Wolfgang Denk 2010-06-13 12:51 ` Wolfgang Denk 2010-06-13 13:39 ` Albert ARIBAUD 2010-08-10 8:29 ` [PATCH v2] OpenRD: Enable SD/UART selection for serial port 1 Tanmay Upadhyay 2010-08-10 8:56 ` Alexander Clouter 2010-08-10 8:58 ` Alexander Clouter 2010-08-10 10:27 ` Tanmay Upadhyay 2010-08-10 10:28 ` Alexander Clouter 2010-08-10 10:49 ` Tanmay Upadhyay 2010-08-10 11:53 ` Alexander Clouter 2010-08-11 5:21 ` Tanmay Upadhyay 2010-08-10 8:40 ` [PATCH] ARM: Fix broken Kconfig in arch/arm Tanmay Upadhyay 2011-03-02 8:38 ` [RFC PATCH 1/5] x86/Kconfig: Add Page Cache Accounting entry Liu Yuan 2011-03-02 8:38 ` Liu Yuan 2011-03-02 16:24 ` Randy Dunlap 2011-03-02 16:24 ` Randy Dunlap 2011-03-03 3:11 ` Liu Yuan 2011-03-02 8:38 ` [RFC PATCH 2/5] block: Add functions and data types for Page Cache Accounting Liu Yuan 2011-03-02 8:38 ` Liu Yuan 2011-03-02 8:38 ` [RFC PATCH 3/5] block: Make Page Cache counters work with sysfs Liu Yuan 2011-03-02 8:38 ` Liu Yuan 2011-03-02 8:38 ` [RFC PATCH 4/5] mm: Add hit/miss accounting for Page Cache Liu Yuan 2011-03-02 8:38 ` Liu Yuan 2011-03-02 8:45 ` Ingo Molnar 2011-03-02 8:45 ` Ingo Molnar 2011-03-02 17:02 ` Dave Hansen 2011-03-02 17:02 ` Dave Hansen 2011-03-02 18:49 ` Ingo Molnar 2011-03-02 18:49 ` Ingo Molnar 2011-03-03 0:33 ` Wu Fengguang 2011-03-03 0:33 ` Wu Fengguang 2011-03-03 2:01 ` KOSAKI Motohiro 2011-03-03 2:01 ` KOSAKI Motohiro 2011-03-03 3:14 ` Tao Ma 2011-03-03 3:14 ` Tao Ma 2011-03-03 9:34 ` Ingo Molnar 2011-03-03 9:34 ` Ingo Molnar 2011-03-03 15:08 ` Tao Ma 2011-03-03 15:08 ` Tao Ma 2011-03-02 8:38 ` [RFC PATCH 5/5] mm: Add readpages accounting Liu Yuan 2011-03-02 8:38 ` Liu Yuan 2011-04-18 15:06 ` [v2 0/7] OMAP: GPIO: Use PM runtime framework Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-04-19 6:26 ` Tony Lindgren 2011-04-19 6:26 ` Tony Lindgren 2011-04-20 23:59 ` Kevin Hilman 2011-04-20 23:59 ` Kevin Hilman 2011-04-21 5:42 ` Tony Lindgren 2011-04-21 5:42 ` Tony Lindgren 2011-04-21 15:15 ` Kevin Hilman 2011-04-21 15:15 ` Kevin Hilman 2011-04-22 6:11 ` Tony Lindgren 2011-04-22 6:11 ` Tony Lindgren 2011-04-23 8:35 ` Linus Walleij 2011-04-23 8:35 ` Linus Walleij 2011-04-26 7:29 ` Tony Lindgren 2011-04-26 7:29 ` Tony Lindgren 2011-04-27 13:18 ` Linus Walleij 2011-04-27 13:18 ` Linus Walleij 2011-05-03 16:22 ` Kevin Hilman 2011-05-03 16:22 ` Kevin Hilman 2011-05-03 21:41 ` Linus Walleij 2011-05-03 21:41 ` Linus Walleij 2011-05-04 6:19 ` Tony Lindgren 2011-05-04 6:19 ` Tony Lindgren 2011-05-12 0:57 ` Linus Walleij 2011-05-12 0:57 ` Linus Walleij 2011-05-12 9:42 ` Kevin Hilman 2011-05-12 9:42 ` Kevin Hilman 2011-05-19 19:08 ` Grant Likely 2011-05-19 19:08 ` Grant Likely 2011-05-20 3:34 ` Shawn Guo 2011-05-20 3:34 ` Shawn Guo 2011-05-19 19:05 ` Grant Likely 2011-05-19 19:05 ` Grant Likely 2011-04-18 15:06 ` [PATCH 1/7] OMAP: GPIO: Make gpio_context part of gpio_bank structure Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-04-18 15:06 ` [PATCH 2/7] OMAP: GPIO: Use flag to identify wkup dmn GPIO Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-04-18 15:06 ` [PATCH 3/7] OMAP4: GPIO: Save/restore context Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-04-21 0:26 ` Kevin Hilman 2011-04-21 0:26 ` Kevin Hilman 2011-04-18 15:06 ` [PATCH 4/7] OMAP: GPIO: handle save/restore ctx in GPIO driver Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha [this message] 2011-04-18 15:06 ` [PATCH 5/7] OMAP2+: GPIO: make workaround_enabled bank specific Varadarajan, Charulatha 2011-04-18 15:06 ` [PATCH 6/7] OMAP: GPIO: Cleanup prepare_for_idle/resume Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-04-18 15:06 ` [PATCH 7/7] OMAP: GPIO: use PM runtime framework Varadarajan, Charulatha 2011-04-18 15:06 ` Varadarajan, Charulatha 2011-07-05 7:17 ` [U-Boot] [PATCH v2] Armada100: Add Board Support for Marvell GuruPlug-Display Ajay Bhargav 2011-07-06 5:49 ` Prafulla Wadaskar 2011-07-14 9:37 ` [PATCH 1/2] ARM: pxa168: gplugD: Get rid of mfp-gplugd.h Tanmay Upadhyay 2011-07-18 6:00 ` Eric Miao 2011-07-14 9:37 ` [PATCH 2/2] ARM: pxa168: gplugD: bug-fix: Free correct GPIO Tanmay Upadhyay 2011-07-18 5:59 ` Eric Miao 2011-09-14 5:59 ` [PATCH] mmc: sdhci-pxa: Check pdata before using its members Tanmay Upadhyay 2011-09-14 6:15 ` zhangfei gao 2011-09-21 18:12 ` Chris Ball 2011-11-14 9:43 ` [U-Boot] [Patch V2] mmc: mv_sdhci: Fix host version read for Armada100 Ajay Bhargav 2011-11-25 23:44 ` Andy Fleming 2011-12-06 11:07 ` [PATCH] USB: pxa168: Fix compilation error Tanmay Upadhyay 2011-12-06 11:25 ` Sergei Shtylyov 2011-12-08 4:33 ` [PATCH v2] " Tanmay Upadhyay 2011-12-07 19:57 ` [PATCH] " Alan Stern 2012-02-07 22:58 ` [PATCH v2] add support for AR6003 2048 byte board file Prasanna Kumar 2012-02-08 9:41 ` Kalle Valo 2012-07-10 13:46 ` [Qemu-devel] [PATCH] pseries iommu: h_put_tce split to support more IOMMUs Alexey Kardashevskiy 2012-07-10 13:46 ` [Qemu-devel] [PATCH] pseries pci: removed cached qemu_irq from PCI host bus Alexey Kardashevskiy 2012-07-10 13:46 ` [Qemu-devel] [PATCH] pseries: added allocator for a block of IRQs Alexey Kardashevskiy 2012-07-10 13:46 ` [Qemu-devel] [PATCH] pseries pci: enable debugging with disabled emulated PCI bus Alexey Kardashevskiy 2012-07-10 13:46 ` [Qemu-devel] [PATCH] xics: added end-of-interrupt (EOI) handlers Alexey Kardashevskiy 2012-07-13 8:04 ` Alexey Kardashevskiy 2012-07-10 13:46 ` [Qemu-devel] [PATCH] pseries dma: DMA window params added to PHB and DT population changed Alexey Kardashevskiy 2012-07-25 5:20 ` [PATCH] fixed a macro coding style issue Baodong Chen 2012-07-25 5:27 ` Venu Byravarasu 2012-07-25 5:37 ` Dmitry Torokhov 2012-07-25 6:09 ` Baodong Chen 2012-07-25 6:15 ` Al Viro 2012-07-25 6:36 ` Dmitry Torokhov 2012-07-31 7:27 ` Dmitry Torokhov 2012-09-27 12:51 ` [PATCH 1/8] fs/namespace.c: introduce helper function path_unmounted() Yan Hong 2012-09-27 12:51 ` [PATCH 2/8] fs/namespace.c: remove unused macro MNT_WRITER_UNDERFLOW_LIMIT Yan Hong 2012-09-27 12:51 ` [PATCH 3/8] fs/namespace.c: trivial code clean Yan Hong 2012-09-27 12:51 ` [PATCH 4/8] fs/namespace.c: check permission early in sys_[u]mount Yan Hong 2012-09-27 12:51 ` [PATCH 5/8] fs/namei.c: introduce macro AT_FDINV Yan Hong 2012-09-27 12:51 ` [PATCH 6/8] fs/inode.c: call alloc_inode() in new_inode() directly Yan Hong 2012-09-27 12:51 ` [PATCH 7/8] fs/inode.c: remove outstanding spin lock prefetch Yan Hong 2012-09-27 12:51 ` [PATCH 8/8] vfs: misc comment clean Yan Hong 2013-01-07 18:11 ` [PATCH] Staging: android: fixed const coding style issue in binder.c Patrik Karlin 2013-01-07 23:01 ` Greg KH 2013-11-11 9:27 ` [PATCH 1/2] mklibs: add dependency on dpkg-native Lei Liu 2013-11-11 9:27 ` [PATCH 2/2] Fix grep pattern when mklibs collects executables in rootfs Lei Liu 2013-11-12 10:23 ` Richard Purdie 2013-11-13 3:05 ` Lei Liu 2013-11-22 22:33 ` Nicolas Dechesne [not found] ` <52955AAB.6000801@gmail.com> 2013-11-27 13:00 ` Nicolas Dechesne 2014-02-08 2:29 ` [PATCH v2] SUNRPC: Allow one callback request to be received from two sk_buff shaobingqing 2014-02-08 19:14 ` Sergei Shtylyov 2014-02-08 19:14 ` Sergei Shtylyov 2014-02-10 17:46 ` Trond Myklebust 2014-02-10 17:46 ` Trond Myklebust 2014-02-11 19:42 ` [PATCH v2] SUNRPC: RPC callbacks may be split across several TCP segments Trond Myklebust 2019-02-18 11:59 ` [PATCH] net/bonding: fix reset active slave Hari Kumar Vemula 2019-02-18 15:58 ` Radu Nicolau 2019-02-20 12:33 ` [dpdk-stable] " Ferruh Yigit 2019-02-20 14:56 ` Radu Nicolau 2019-02-20 15:16 ` Hyong Youb Kim 2019-02-22 1:52 ` Chas Williams 2019-02-22 13:57 ` Ferruh Yigit
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=1303139217-10285-6-git-send-email-charu@ti.com \ --to=charu@ti.com \ --cc=khilman@deeprootsystems.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=paul@pwsan.com \ --cc=tony@atomide.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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.