diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-04-15 03:19:22 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-05-25 08:13:43 -0400 |
commit | dd8cb37b4e92c487fd10e7da96bab18d33de62da (patch) | |
tree | 98e31500bbe893eed0bb93962e91868c1699a107 /arch/blackfin | |
parent | f58c3276d3652b0d96654ba08f0afc87c013da57 (diff) |
Blackfin: bf54x: drop unused pm gpio handling
This functionality was merged into the common bfin_pm_standby_ctrl func
some time ago, so punt these now unused funcs and data, and localize the
wake funcs that aren't needed externally anymore.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'arch/blackfin')
-rw-r--r-- | arch/blackfin/mach-common/ints-priority.c | 42 |
1 files changed, 2 insertions, 40 deletions
diff --git a/arch/blackfin/mach-common/ints-priority.c b/arch/blackfin/mach-common/ints-priority.c index e32cd6f11010..a77f96f9be7c 100644 --- a/arch/blackfin/mach-common/ints-priority.c +++ b/arch/blackfin/mach-common/ints-priority.c | |||
@@ -559,7 +559,7 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type) | |||
559 | } | 559 | } |
560 | 560 | ||
561 | #ifdef CONFIG_PM | 561 | #ifdef CONFIG_PM |
562 | int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) | 562 | static int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) |
563 | { | 563 | { |
564 | return gpio_pm_wakeup_ctrl(irq_to_gpio(d->irq), state); | 564 | return gpio_pm_wakeup_ctrl(irq_to_gpio(d->irq), state); |
565 | } | 565 | } |
@@ -855,15 +855,11 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type) | |||
855 | } | 855 | } |
856 | 856 | ||
857 | #ifdef CONFIG_PM | 857 | #ifdef CONFIG_PM |
858 | u32 pint_saved_masks[NR_PINT_SYS_IRQS]; | 858 | static int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) |
859 | u32 pint_wakeup_masks[NR_PINT_SYS_IRQS]; | ||
860 | |||
861 | int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) | ||
862 | { | 859 | { |
863 | u32 pint_irq; | 860 | u32 pint_irq; |
864 | u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; | 861 | u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; |
865 | u32 bank = PINT_2_BANK(pint_val); | 862 | u32 bank = PINT_2_BANK(pint_val); |
866 | u32 pintbit = PINT_BIT(pint_val); | ||
867 | 863 | ||
868 | switch (bank) { | 864 | switch (bank) { |
869 | case 0: | 865 | case 0: |
@@ -884,42 +880,8 @@ int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) | |||
884 | 880 | ||
885 | bfin_internal_set_wake(pint_irq, state); | 881 | bfin_internal_set_wake(pint_irq, state); |
886 | 882 | ||
887 | if (state) | ||
888 | pint_wakeup_masks[bank] |= pintbit; | ||
889 | else | ||
890 | pint_wakeup_masks[bank] &= ~pintbit; | ||
891 | |||
892 | return 0; | 883 | return 0; |
893 | } | 884 | } |
894 | |||
895 | u32 bfin_pm_setup(void) | ||
896 | { | ||
897 | u32 val, i; | ||
898 | |||
899 | for (i = 0; i < NR_PINT_SYS_IRQS; i++) { | ||
900 | val = pint[i]->mask_clear; | ||
901 | pint_saved_masks[i] = val; | ||
902 | if (val ^ pint_wakeup_masks[i]) { | ||
903 | pint[i]->mask_clear = val; | ||
904 | pint[i]->mask_set = pint_wakeup_masks[i]; | ||
905 | } | ||
906 | } | ||
907 | |||
908 | return 0; | ||
909 | } | ||
910 | |||
911 | void bfin_pm_restore(void) | ||
912 | { | ||
913 | u32 i, val; | ||
914 | |||
915 | for (i = 0; i < NR_PINT_SYS_IRQS; i++) { | ||
916 | val = pint_saved_masks[i]; | ||
917 | if (val ^ pint_wakeup_masks[i]) { | ||
918 | pint[i]->mask_clear = pint[i]->mask_clear; | ||
919 | pint[i]->mask_set = val; | ||
920 | } | ||
921 | } | ||
922 | } | ||
923 | #else | 885 | #else |
924 | # define bfin_gpio_set_wake NULL | 886 | # define bfin_gpio_set_wake NULL |
925 | #endif | 887 | #endif |