-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 86235 b: refs/heads/master c: 5cc265a h: refs/heads/master i: 86233: 61a2e17 86231: 43de4c0 v: v3
- Loading branch information
Yoshinori Sato
authored and
Linus Torvalds
committed
Feb 24, 2008
1 parent
73ecc54
commit 8c9a058
Showing
8 changed files
with
95 additions
and
328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: 4223cc34365e46f5e50d5496623367c552cd8a51 | ||
refs/heads/master: 5cc265a5de169d8e61ad5ba009610467e158fcec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ | |
# Reuse any files we can from the H8/300H | ||
# | ||
|
||
obj-y := irq_pin.o ptrace_h8300h.o | ||
obj-y := irq.o ptrace_h8300h.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
/* | ||
* Interrupt handling H8/300H depend. | ||
* Yoshinori Sato <ysato@users.sourceforge.jp> | ||
* | ||
*/ | ||
|
||
#include <linux/init.h> | ||
#include <linux/errno.h> | ||
|
||
#include <asm/ptrace.h> | ||
#include <asm/traps.h> | ||
#include <asm/irq.h> | ||
#include <asm/io.h> | ||
#include <asm/gpio.h> | ||
#include <asm/regs306x.h> | ||
|
||
const int __initdata h8300_saved_vectors[] = { | ||
#if defined(CONFIG_GDB_DEBUG) | ||
TRAP3_VEC, /* TRAPA #3 is GDB breakpoint */ | ||
#endif | ||
-1, | ||
}; | ||
|
||
const h8300_vector __initdata h8300_trap_table[] = { | ||
0, 0, 0, 0, 0, 0, 0, 0, | ||
system_call, | ||
0, | ||
0, | ||
trace_break, | ||
}; | ||
|
||
int h8300_enable_irq_pin(unsigned int irq) | ||
{ | ||
int bitmask; | ||
if (irq < EXT_IRQ0 || irq > EXT_IRQ5) | ||
return 0; | ||
|
||
/* initialize IRQ pin */ | ||
bitmask = 1 << (irq - EXT_IRQ0); | ||
switch(irq) { | ||
case EXT_IRQ0: | ||
case EXT_IRQ1: | ||
case EXT_IRQ2: | ||
case EXT_IRQ3: | ||
if (H8300_GPIO_RESERVE(H8300_GPIO_P8, bitmask) == 0) | ||
return -EBUSY; | ||
H8300_GPIO_DDR(H8300_GPIO_P8, bitmask, H8300_GPIO_INPUT); | ||
break; | ||
case EXT_IRQ4: | ||
case EXT_IRQ5: | ||
if (H8300_GPIO_RESERVE(H8300_GPIO_P9, bitmask) == 0) | ||
return -EBUSY; | ||
H8300_GPIO_DDR(H8300_GPIO_P9, bitmask, H8300_GPIO_INPUT); | ||
break; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
void h8300_disable_irq_pin(unsigned int irq) | ||
{ | ||
int bitmask; | ||
if (irq < EXT_IRQ0 || irq > EXT_IRQ5) | ||
return; | ||
|
||
/* disable interrupt & release IRQ pin */ | ||
bitmask = 1 << (irq - EXT_IRQ0); | ||
switch(irq) { | ||
case EXT_IRQ0: | ||
case EXT_IRQ1: | ||
case EXT_IRQ2: | ||
case EXT_IRQ3: | ||
*(volatile unsigned char *)IER &= ~bitmask; | ||
H8300_GPIO_FREE(H8300_GPIO_P8, bitmask); | ||
break ; | ||
case EXT_IRQ4: | ||
case EXT_IRQ5: | ||
*(volatile unsigned char *)IER &= ~bitmask; | ||
H8300_GPIO_FREE(H8300_GPIO_P9, bitmask); | ||
break; | ||
} | ||
} |
Oops, something went wrong.