| .. | .. |
|---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-only |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * arch/arm/mach-iop32x/irq.c |
|---|
| 3 | 4 | * |
|---|
| .. | .. |
|---|
| 5 | 6 | * |
|---|
| 6 | 7 | * Author: Rory Bolt <rorybolt@pacbell.net> |
|---|
| 7 | 8 | * Copyright (C) 2002 Rory Bolt |
|---|
| 8 | | - * |
|---|
| 9 | | - * This program is free software; you can redistribute it and/or modify |
|---|
| 10 | | - * it under the terms of the GNU General Public License version 2 as |
|---|
| 11 | | - * published by the Free Software Foundation. |
|---|
| 12 | 9 | */ |
|---|
| 13 | 10 | |
|---|
| 14 | 11 | #include <linux/init.h> |
|---|
| .. | .. |
|---|
| 16 | 13 | #include <linux/list.h> |
|---|
| 17 | 14 | #include <asm/mach/irq.h> |
|---|
| 18 | 15 | #include <asm/irq.h> |
|---|
| 19 | | -#include <mach/hardware.h> |
|---|
| 20 | 16 | #include <asm/mach-types.h> |
|---|
| 17 | + |
|---|
| 18 | +#include "hardware.h" |
|---|
| 21 | 19 | |
|---|
| 22 | 20 | static u32 iop32x_mask; |
|---|
| 23 | 21 | |
|---|
| .. | .. |
|---|
| 34 | 32 | static void |
|---|
| 35 | 33 | iop32x_irq_mask(struct irq_data *d) |
|---|
| 36 | 34 | { |
|---|
| 37 | | - iop32x_mask &= ~(1 << d->irq); |
|---|
| 35 | + iop32x_mask &= ~(1 << (d->irq - 1)); |
|---|
| 38 | 36 | intctl_write(iop32x_mask); |
|---|
| 39 | 37 | } |
|---|
| 40 | 38 | |
|---|
| 41 | 39 | static void |
|---|
| 42 | 40 | iop32x_irq_unmask(struct irq_data *d) |
|---|
| 43 | 41 | { |
|---|
| 44 | | - iop32x_mask |= 1 << d->irq; |
|---|
| 42 | + iop32x_mask |= 1 << (d->irq - 1); |
|---|
| 45 | 43 | intctl_write(iop32x_mask); |
|---|
| 46 | 44 | } |
|---|
| 47 | 45 | |
|---|
| .. | .. |
|---|
| 67 | 65 | machine_is_em7210()) |
|---|
| 68 | 66 | *IOP3XX_PCIIRSR = 0x0f; |
|---|
| 69 | 67 | |
|---|
| 70 | | - for (i = 0; i < NR_IRQS; i++) { |
|---|
| 68 | + for (i = 1; i < NR_IRQS; i++) { |
|---|
| 71 | 69 | irq_set_chip_and_handler(i, &ext_chip, handle_level_irq); |
|---|
| 72 | 70 | irq_clear_status_flags(i, IRQ_NOREQUEST | IRQ_NOPROBE); |
|---|
| 73 | 71 | } |
|---|