Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 275387
b: refs/heads/master
c: 92b1bd5
h: refs/heads/master
i:
  275385: 7c3638b
  275383: 3dcc255
v: v3
  • Loading branch information
Geert Uytterhoeven committed Nov 8, 2011
1 parent 7115e87 commit a86d372
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 52 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: 34971bad3a1511db7b76eeb2337819967a135075
refs/heads/master: 92b1bd5f1aa88ce4760c02814bfcbb58ad521984
98 changes: 47 additions & 51 deletions trunk/arch/m68k/amiga/amiints.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code
* Amiga Linux interrupt handling code
*
* This file is subject to the terms and conditions of the GNU General Public
* License. See the file COPYING in the main directory of this archive
Expand All @@ -16,56 +16,6 @@
#include <asm/amigaints.h>
#include <asm/amipcmcia.h>

static void amiga_irq_enable(struct irq_data *data);
static void amiga_irq_disable(struct irq_data *data);
static irqreturn_t ami_int1(int irq, void *dev_id);
static irqreturn_t ami_int3(int irq, void *dev_id);
static irqreturn_t ami_int4(int irq, void *dev_id);
static irqreturn_t ami_int5(int irq, void *dev_id);

static struct irq_chip amiga_irq_chip = {
.name = "amiga",
.irq_enable = amiga_irq_enable,
.irq_disable = amiga_irq_disable,
};

/*
* void amiga_init_IRQ(void)
*
* Parameters: None
*
* Returns: Nothing
*
* This function should be called during kernel startup to initialize
* the amiga IRQ handling routines.
*/

void __init amiga_init_IRQ(void)
{
if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL))
pr_err("Couldn't register int%d\n", 1);
if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL))
pr_err("Couldn't register int%d\n", 3);
if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL))
pr_err("Couldn't register int%d\n", 4);
if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL))
pr_err("Couldn't register int%d\n", 5);

m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
AMI_STD_IRQS);

/* turn off PCMCIA interrupts */
if (AMIGAHW_PRESENT(PCMCIA))
gayle.inten = GAYLE_IRQ_IDE;

/* turn off all interrupts and enable the master interrupt bit */
amiga_custom.intena = 0x7fff;
amiga_custom.intreq = 0x7fff;
amiga_custom.intena = IF_SETCLR | IF_INTEN;

cia_init_IRQ(&ciaa_base);
cia_init_IRQ(&ciab_base);
}

/*
* Enable/disable a particular machine specific interrupt source.
Expand All @@ -84,6 +34,13 @@ static void amiga_irq_disable(struct irq_data *data)
amiga_custom.intena = 1 << (data->irq - IRQ_USER);
}

static struct irq_chip amiga_irq_chip = {
.name = "amiga",
.irq_enable = amiga_irq_enable,
.irq_disable = amiga_irq_disable,
};


/*
* The builtin Amiga hardware interrupt handlers.
*/
Expand Down Expand Up @@ -183,3 +140,42 @@ static irqreturn_t ami_int5(int irq, void *dev_id)
}
return IRQ_HANDLED;
}


/*
* void amiga_init_IRQ(void)
*
* Parameters: None
*
* Returns: Nothing
*
* This function should be called during kernel startup to initialize
* the amiga IRQ handling routines.
*/

void __init amiga_init_IRQ(void)
{
if (request_irq(IRQ_AUTO_1, ami_int1, 0, "int1", NULL))
pr_err("Couldn't register int%d\n", 1);
if (request_irq(IRQ_AUTO_3, ami_int3, 0, "int3", NULL))
pr_err("Couldn't register int%d\n", 3);
if (request_irq(IRQ_AUTO_4, ami_int4, 0, "int4", NULL))
pr_err("Couldn't register int%d\n", 4);
if (request_irq(IRQ_AUTO_5, ami_int5, 0, "int5", NULL))
pr_err("Couldn't register int%d\n", 5);

m68k_setup_irq_controller(&amiga_irq_chip, handle_simple_irq, IRQ_USER,
AMI_STD_IRQS);

/* turn off PCMCIA interrupts */
if (AMIGAHW_PRESENT(PCMCIA))
gayle.inten = GAYLE_IRQ_IDE;

/* turn off all interrupts and enable the master interrupt bit */
amiga_custom.intena = 0x7fff;
amiga_custom.intreq = 0x7fff;
amiga_custom.intena = IF_SETCLR | IF_INTEN;

cia_init_IRQ(&ciaa_base);
cia_init_IRQ(&ciab_base);
}

0 comments on commit a86d372

Please sign in to comment.