Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 361385
b: refs/heads/master
c: 0ed66be
h: refs/heads/master
i:
  361383: c0f97ef
v: v3
  • Loading branch information
Ludovic Desroches authored and Nicolas Ferre committed Mar 14, 2013
1 parent 99fb03b commit 4faccd7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 647f8d94a4e69d39e88a617846755655853c20f5
refs/heads/master: 0ed66befaae893e82c9f016238282d73ef9fd6c7
20 changes: 8 additions & 12 deletions trunk/arch/arm/mach-at91/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,23 +92,21 @@ static int at91_aic_set_wake(struct irq_data *d, unsigned value)

void at91_irq_suspend(void)
{
int i = 0, bit;
int bit = -1;

if (has_aic5()) {
/* disable enabled irqs */
while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) {
while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IDCR, 1);
i = bit;
}
/* enable wakeup irqs */
i = 0;
while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) {
bit = -1;
while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IECR, 1);
i = bit;
}
} else {
at91_aic_write(AT91_AIC_IDCR, *backups);
Expand All @@ -118,23 +116,21 @@ void at91_irq_suspend(void)

void at91_irq_resume(void)
{
int i = 0, bit;
int bit = -1;

if (has_aic5()) {
/* disable wakeup irqs */
while ((bit = find_next_bit(wakeups, n_irqs, i)) < n_irqs) {
while ((bit = find_next_bit(wakeups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IDCR, 1);
i = bit;
}
/* enable irqs disabled for suspend */
i = 0;
while ((bit = find_next_bit(backups, n_irqs, i)) < n_irqs) {
bit = -1;
while ((bit = find_next_bit(backups, n_irqs, bit + 1)) < n_irqs) {
at91_aic_write(AT91_AIC5_SSR,
bit & AT91_AIC5_INTSEL_MSK);
at91_aic_write(AT91_AIC5_IECR, 1);
i = bit;
}
} else {
at91_aic_write(AT91_AIC_IDCR, *wakeups);
Expand Down

0 comments on commit 4faccd7

Please sign in to comment.