diff options
Diffstat (limited to 'arch/m68knommu')
-rw-r--r-- | arch/m68knommu/platform/5206/config.c | 17 | ||||
-rw-r--r-- | arch/m68knommu/platform/5206e/config.c | 17 | ||||
-rw-r--r-- | arch/m68knommu/platform/5249/config.c | 14 | ||||
-rw-r--r-- | arch/m68knommu/platform/5272/config.c | 7 | ||||
-rw-r--r-- | arch/m68knommu/platform/5307/config.c | 14 | ||||
-rw-r--r-- | arch/m68knommu/platform/5407/config.c | 14 | ||||
-rw-r--r-- | arch/m68knommu/platform/coldfire/intc.c | 27 |
7 files changed, 27 insertions, 83 deletions
diff --git a/arch/m68knommu/platform/5206/config.c b/arch/m68knommu/platform/5206/config.c index f6f79874e9af..481617a23d09 100644 --- a/arch/m68knommu/platform/5206/config.c +++ b/arch/m68knommu/platform/5206/config.c | |||
@@ -68,23 +68,6 @@ static void __init m5206_uarts_init(void) | |||
68 | 68 | ||
69 | /***************************************************************************/ | 69 | /***************************************************************************/ |
70 | 70 | ||
71 | void mcf_autovector(unsigned int vec) | ||
72 | { | ||
73 | volatile unsigned char *mbar; | ||
74 | unsigned char icr; | ||
75 | |||
76 | if ((vec >= 25) && (vec <= 31)) { | ||
77 | vec -= 25; | ||
78 | mbar = (volatile unsigned char *) MCF_MBAR; | ||
79 | icr = MCFSIM_ICR_AUTOVEC | (vec << 3); | ||
80 | *(mbar + MCFSIM_ICR1 + vec) = icr; | ||
81 | vec = 0x1 << (vec + 1); | ||
82 | mcf_setimr(mcf_getimr() & ~vec); | ||
83 | } | ||
84 | } | ||
85 | |||
86 | /***************************************************************************/ | ||
87 | |||
88 | void mcf_settimericr(unsigned int timer, unsigned int level) | 71 | void mcf_settimericr(unsigned int timer, unsigned int level) |
89 | { | 72 | { |
90 | volatile unsigned char *icrp; | 73 | volatile unsigned char *icrp; |
diff --git a/arch/m68knommu/platform/5206e/config.c b/arch/m68knommu/platform/5206e/config.c index fcf1400db514..29e565a44431 100644 --- a/arch/m68knommu/platform/5206e/config.c +++ b/arch/m68knommu/platform/5206e/config.c | |||
@@ -69,23 +69,6 @@ static void __init m5206e_uarts_init(void) | |||
69 | 69 | ||
70 | /***************************************************************************/ | 70 | /***************************************************************************/ |
71 | 71 | ||
72 | void mcf_autovector(unsigned int vec) | ||
73 | { | ||
74 | volatile unsigned char *mbar; | ||
75 | unsigned char icr; | ||
76 | |||
77 | if ((vec >= 25) && (vec <= 31)) { | ||
78 | vec -= 25; | ||
79 | mbar = (volatile unsigned char *) MCF_MBAR; | ||
80 | icr = MCFSIM_ICR_AUTOVEC | (vec << 3); | ||
81 | *(mbar + MCFSIM_ICR1 + vec) = icr; | ||
82 | vec = 0x1 << (vec + 1); | ||
83 | mcf_setimr(mcf_getimr() & ~vec); | ||
84 | } | ||
85 | } | ||
86 | |||
87 | /***************************************************************************/ | ||
88 | |||
89 | void mcf_settimericr(unsigned int timer, unsigned int level) | 72 | void mcf_settimericr(unsigned int timer, unsigned int level) |
90 | { | 73 | { |
91 | volatile unsigned char *icrp; | 74 | volatile unsigned char *icrp; |
diff --git a/arch/m68knommu/platform/5249/config.c b/arch/m68knommu/platform/5249/config.c index 93d998825925..365fb6c52700 100644 --- a/arch/m68knommu/platform/5249/config.c +++ b/arch/m68knommu/platform/5249/config.c | |||
@@ -68,20 +68,6 @@ static void __init m5249_uarts_init(void) | |||
68 | 68 | ||
69 | /***************************************************************************/ | 69 | /***************************************************************************/ |
70 | 70 | ||
71 | void mcf_autovector(unsigned int vec) | ||
72 | { | ||
73 | volatile unsigned char *mbar; | ||
74 | |||
75 | if ((vec >= 25) && (vec <= 31)) { | ||
76 | mbar = (volatile unsigned char *) MCF_MBAR; | ||
77 | vec = 0x1 << (vec - 24); | ||
78 | *(mbar + MCFSIM_AVR) |= vec; | ||
79 | mcf_setimr(mcf_getimr() & ~vec); | ||
80 | } | ||
81 | } | ||
82 | |||
83 | /***************************************************************************/ | ||
84 | |||
85 | void mcf_settimericr(unsigned int timer, unsigned int level) | 71 | void mcf_settimericr(unsigned int timer, unsigned int level) |
86 | { | 72 | { |
87 | volatile unsigned char *icrp; | 73 | volatile unsigned char *icrp; |
diff --git a/arch/m68knommu/platform/5272/config.c b/arch/m68knommu/platform/5272/config.c index 5f95fcde05fd..94a66c12c96a 100644 --- a/arch/m68knommu/platform/5272/config.c +++ b/arch/m68knommu/platform/5272/config.c | |||
@@ -148,13 +148,6 @@ void mcf_disableall(void) | |||
148 | 148 | ||
149 | /***************************************************************************/ | 149 | /***************************************************************************/ |
150 | 150 | ||
151 | void mcf_autovector(unsigned int vec) | ||
152 | { | ||
153 | /* Everything is auto-vectored on the 5272 */ | ||
154 | } | ||
155 | |||
156 | /***************************************************************************/ | ||
157 | |||
158 | void mcf_settimericr(int timer, int level) | 151 | void mcf_settimericr(int timer, int level) |
159 | { | 152 | { |
160 | volatile unsigned long *icrp; | 153 | volatile unsigned long *icrp; |
diff --git a/arch/m68knommu/platform/5307/config.c b/arch/m68knommu/platform/5307/config.c index 39da9e9ff674..60fe45d51391 100644 --- a/arch/m68knommu/platform/5307/config.c +++ b/arch/m68knommu/platform/5307/config.c | |||
@@ -83,20 +83,6 @@ static void __init m5307_uarts_init(void) | |||
83 | 83 | ||
84 | /***************************************************************************/ | 84 | /***************************************************************************/ |
85 | 85 | ||
86 | void mcf_autovector(unsigned int vec) | ||
87 | { | ||
88 | volatile unsigned char *mbar; | ||
89 | |||
90 | if ((vec >= 25) && (vec <= 31)) { | ||
91 | mbar = (volatile unsigned char *) MCF_MBAR; | ||
92 | vec = 0x1 << (vec - 24); | ||
93 | *(mbar + MCFSIM_AVR) |= vec; | ||
94 | mcf_setimr(mcf_getimr() & ~vec); | ||
95 | } | ||
96 | } | ||
97 | |||
98 | /***************************************************************************/ | ||
99 | |||
100 | void mcf_settimericr(unsigned int timer, unsigned int level) | 86 | void mcf_settimericr(unsigned int timer, unsigned int level) |
101 | { | 87 | { |
102 | volatile unsigned char *icrp; | 88 | volatile unsigned char *icrp; |
diff --git a/arch/m68knommu/platform/5407/config.c b/arch/m68knommu/platform/5407/config.c index b41d942bf8d0..1e8ef74ea156 100644 --- a/arch/m68knommu/platform/5407/config.c +++ b/arch/m68knommu/platform/5407/config.c | |||
@@ -74,20 +74,6 @@ static void __init m5407_uarts_init(void) | |||
74 | 74 | ||
75 | /***************************************************************************/ | 75 | /***************************************************************************/ |
76 | 76 | ||
77 | void mcf_autovector(unsigned int vec) | ||
78 | { | ||
79 | volatile unsigned char *mbar; | ||
80 | |||
81 | if ((vec >= 25) && (vec <= 31)) { | ||
82 | mbar = (volatile unsigned char *) MCF_MBAR; | ||
83 | vec = 0x1 << (vec - 24); | ||
84 | *(mbar + MCFSIM_AVR) |= vec; | ||
85 | mcf_setimr(mcf_getimr() & ~vec); | ||
86 | } | ||
87 | } | ||
88 | |||
89 | /***************************************************************************/ | ||
90 | |||
91 | void mcf_settimericr(unsigned int timer, unsigned int level) | 77 | void mcf_settimericr(unsigned int timer, unsigned int level) |
92 | { | 78 | { |
93 | volatile unsigned char *icrp; | 79 | volatile unsigned char *icrp; |
diff --git a/arch/m68knommu/platform/coldfire/intc.c b/arch/m68knommu/platform/coldfire/intc.c index c81ab6e5cf26..f7a61346ee25 100644 --- a/arch/m68knommu/platform/coldfire/intc.c +++ b/arch/m68knommu/platform/coldfire/intc.c | |||
@@ -18,6 +18,33 @@ | |||
18 | #include <asm/coldfire.h> | 18 | #include <asm/coldfire.h> |
19 | #include <asm/mcfsim.h> | 19 | #include <asm/mcfsim.h> |
20 | 20 | ||
21 | /* | ||
22 | * Define the vector numbers for the basic 7 interrupt sources. | ||
23 | * These are often referred to as the "external" interrupts in | ||
24 | * the ColdFire documentation (for the early ColdFire cores at least). | ||
25 | */ | ||
26 | #define EIRQ1 25 | ||
27 | #define EIRQ7 31 | ||
28 | |||
29 | /* | ||
30 | * Interrupts can be "vectored" on the ColdFire cores that support this old | ||
31 | * interrupt controller. That is, the device raising the interrupt can also | ||
32 | * supply the vector number to interrupt through. The AVR register of the | ||
33 | * interrupt controller enables or disables this for each external interrupt, | ||
34 | * so provide generic support for this. Setting this up is out-of-band for | ||
35 | * the interrupt system API's, and needs to be done by the driver that | ||
36 | * supports this device. Very few devices actually use this. | ||
37 | */ | ||
38 | void mcf_autovector(int irq) | ||
39 | { | ||
40 | if ((irq >= EIRQ1) && (irq <= EIRQ7)) { | ||
41 | u8 avec; | ||
42 | avec = __raw_readb(MCF_MBAR + MCFSIM_AVR); | ||
43 | avec |= (0x1 << (irq - EIRQ1 + 1)); | ||
44 | __raw_writeb(avec, MCF_MBAR + MCFSIM_AVR); | ||
45 | } | ||
46 | } | ||
47 | |||
21 | static void intc_irq_mask(unsigned int irq) | 48 | static void intc_irq_mask(unsigned int irq) |
22 | { | 49 | { |
23 | } | 50 | } |