diff options
author | Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 2007-01-11 09:53:18 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-02-06 11:53:13 -0500 |
commit | 9a0ad9e9d8cae1087fe7b0b137e1c84d12dc0c76 (patch) | |
tree | 10ef61c1db0cd626a6ac4be924dc9d53fc78f9fd /arch/mips/vr41xx/common | |
parent | 6f284a2ce7b8bc49cb8455b1763357897a899abb (diff) |
[MIPS] vr41xx: add MACINT controls
This patch has added MACINT controls.
They are necessary for VR4133 ethernet driver.
Signed-off-by: Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/vr41xx/common')
-rw-r--r-- | arch/mips/vr41xx/common/icu.c | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c index c075261976c5..34622f3f5ff4 100644 --- a/arch/mips/vr41xx/common/icu.c +++ b/arch/mips/vr41xx/common/icu.c | |||
@@ -3,7 +3,7 @@ | |||
3 | * | 3 | * |
4 | * Copyright (C) 2001-2002 MontaVista Software Inc. | 4 | * Copyright (C) 2001-2002 MontaVista Software Inc. |
5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> | 5 | * Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com> |
6 | * Copyright (C) 2003-2005 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> | 6 | * Copyright (C) 2003-2006 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp> |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
9 | * it under the terms of the GNU General Public License as published by | 9 | * it under the terms of the GNU General Public License as published by |
@@ -68,6 +68,7 @@ static unsigned char sysint2_assign[16] = { | |||
68 | #define MPIUINTREG 0x0e | 68 | #define MPIUINTREG 0x0e |
69 | #define MAIUINTREG 0x10 | 69 | #define MAIUINTREG 0x10 |
70 | #define MKIUINTREG 0x12 | 70 | #define MKIUINTREG 0x12 |
71 | #define MMACINTREG 0x12 | ||
71 | #define MGIUINTLREG 0x14 | 72 | #define MGIUINTLREG 0x14 |
72 | #define MDSIUINTREG 0x16 | 73 | #define MDSIUINTREG 0x16 |
73 | #define NMIREG 0x18 | 74 | #define NMIREG 0x18 |
@@ -241,6 +242,30 @@ void vr41xx_disable_kiuint(uint16_t mask) | |||
241 | 242 | ||
242 | EXPORT_SYMBOL(vr41xx_disable_kiuint); | 243 | EXPORT_SYMBOL(vr41xx_disable_kiuint); |
243 | 244 | ||
245 | void vr41xx_enable_macint(uint16_t mask) | ||
246 | { | ||
247 | struct irq_desc *desc = irq_desc + ETHERNET_IRQ; | ||
248 | unsigned long flags; | ||
249 | |||
250 | spin_lock_irqsave(&desc->lock, flags); | ||
251 | icu1_set(MMACINTREG, mask); | ||
252 | spin_unlock_irqrestore(&desc->lock, flags); | ||
253 | } | ||
254 | |||
255 | EXPORT_SYMBOL(vr41xx_enable_macint); | ||
256 | |||
257 | void vr41xx_disable_macint(uint16_t mask) | ||
258 | { | ||
259 | struct irq_desc *desc = irq_desc + ETHERNET_IRQ; | ||
260 | unsigned long flags; | ||
261 | |||
262 | spin_lock_irqsave(&desc->lock, flags); | ||
263 | icu1_clear(MMACINTREG, mask); | ||
264 | spin_unlock_irqrestore(&desc->lock, flags); | ||
265 | } | ||
266 | |||
267 | EXPORT_SYMBOL(vr41xx_disable_macint); | ||
268 | |||
244 | void vr41xx_enable_dsiuint(uint16_t mask) | 269 | void vr41xx_enable_dsiuint(uint16_t mask) |
245 | { | 270 | { |
246 | struct irq_desc *desc = irq_desc + DSIU_IRQ; | 271 | struct irq_desc *desc = irq_desc + DSIU_IRQ; |