Commit dd8cb37b authored by Mike Frysinger's avatar Mike Frysinger

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: default avatarMike Frysinger <vapier@gentoo.org>
parent f58c3276
...@@ -559,7 +559,7 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type) ...@@ -559,7 +559,7 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) static int bfin_gpio_set_wake(struct irq_data *d, unsigned int state)
{ {
return gpio_pm_wakeup_ctrl(irq_to_gpio(d->irq), state); return gpio_pm_wakeup_ctrl(irq_to_gpio(d->irq), state);
} }
...@@ -855,15 +855,11 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type) ...@@ -855,15 +855,11 @@ static int bfin_gpio_irq_type(struct irq_data *d, unsigned int type)
} }
#ifdef CONFIG_PM #ifdef CONFIG_PM
u32 pint_saved_masks[NR_PINT_SYS_IRQS]; static int bfin_gpio_set_wake(struct irq_data *d, unsigned int state)
u32 pint_wakeup_masks[NR_PINT_SYS_IRQS];
int bfin_gpio_set_wake(struct irq_data *d, unsigned int state)
{ {
u32 pint_irq; u32 pint_irq;
u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS]; u32 pint_val = irq2pint_lut[d->irq - SYS_IRQS];
u32 bank = PINT_2_BANK(pint_val); u32 bank = PINT_2_BANK(pint_val);
u32 pintbit = PINT_BIT(pint_val);
switch (bank) { switch (bank) {
case 0: case 0:
...@@ -884,42 +880,8 @@ int bfin_gpio_set_wake(struct irq_data *d, unsigned int state) ...@@ -884,42 +880,8 @@ int bfin_gpio_set_wake(struct irq_data *d, unsigned int state)
bfin_internal_set_wake(pint_irq, state); bfin_internal_set_wake(pint_irq, state);
if (state)
pint_wakeup_masks[bank] |= pintbit;
else
pint_wakeup_masks[bank] &= ~pintbit;
return 0; return 0;
} }
u32 bfin_pm_setup(void)
{
u32 val, i;
for (i = 0; i < NR_PINT_SYS_IRQS; i++) {
val = pint[i]->mask_clear;
pint_saved_masks[i] = val;
if (val ^ pint_wakeup_masks[i]) {
pint[i]->mask_clear = val;
pint[i]->mask_set = pint_wakeup_masks[i];
}
}
return 0;
}
void bfin_pm_restore(void)
{
u32 i, val;
for (i = 0; i < NR_PINT_SYS_IRQS; i++) {
val = pint_saved_masks[i];
if (val ^ pint_wakeup_masks[i]) {
pint[i]->mask_clear = pint[i]->mask_clear;
pint[i]->mask_set = val;
}
}
}
#else #else
# define bfin_gpio_set_wake NULL # define bfin_gpio_set_wake NULL
#endif #endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment