linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Fri, 18 Mar 2005 21:54:02 +0000
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/03/18 21:53:56

Modified files:
        arch/mips/vr41xx: Kconfig 
        arch/mips/vr41xx/common: giu.c 

Log message:
        GUI update.

diff -urN linux/arch/mips/vr41xx/Kconfig linux/arch/mips/vr41xx/Kconfig
--- linux/arch/mips/vr41xx/Kconfig      2005/03/18 17:36:54     1.3
+++ linux/arch/mips/vr41xx/Kconfig      2005/03/18 21:53:56     1.4
@@ -91,7 +91,7 @@
        depends on MACH_VR41XX && PCI
 
 config GPIO_VR41XX
-       bool "Add General-purpose I/O unit support of NEC VR4100 series"
+       tristate "Add General-purpose I/O unit support of NEC VR4100 series"
        depends on MACH_VR41XX
 
 config VRC4171
diff -urN linux/arch/mips/vr41xx/common/giu.c 
linux/arch/mips/vr41xx/common/giu.c
--- linux/arch/mips/vr41xx/common/giu.c 2005/01/15 01:31:06     1.15
+++ linux/arch/mips/vr41xx/common/giu.c 2005/03/18 21:53:56     1.16
@@ -3,8 +3,7 @@
  *
  *  Copyright (C) 2002 MontaVista Software Inc.
  *    Author: Yoichi Yuasa <yyuasa@mvista.com or source@mvista.com>
- *  Copyright (C) 2003-2004  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
- *  Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
+ *  Copyright (C) 2003-2005  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
@@ -29,6 +28,7 @@
  *  - Added support for NEC VR4133.
  *  - Removed board_irq_init.
  */
+#include <linux/config.h>
 #include <linux/errno.h>
 #include <linux/init.h>
 #include <linux/irq.h>
@@ -63,12 +63,6 @@
 
 static uint32_t giu_base;
 
-static struct irqaction giu_cascade = {
-       .handler        = no_action,
-       .mask           = CPU_MASK_NONE,
-       .name           = "cascade",
-};
-
 #define read_giuint(offset)            readw(giu_base + (offset))
 #define write_giuint(val, offset)      writew((val), giu_base + (offset))
 
@@ -192,18 +186,20 @@
        .end            = end_giuint_high_irq,
 };
 
-void __init init_vr41xx_giuint_irq(void)
+void vr41xx_enable_giuint(unsigned int pin)
 {
-       int i;
-
-       for (i = GIU_IRQ_BASE; i <= GIU_IRQ_LAST; i++) {
-               if (i < (GIU_IRQ_BASE + GIUINT_HIGH_OFFSET))
-                       irq_desc[i].handler = &giuint_low_irq_type;
-               else
-                       irq_desc[i].handler = &giuint_high_irq_type;
-       }
+       if (pin < GIUINT_HIGH_OFFSET)
+               enable_giuint_low_irq(GIU_IRQ(pin));
+       else
+               enable_giuint_high_irq(GIU_IRQ(pin));
+}
 
-       setup_irq(GIUINT_CASCADE_IRQ, &giu_cascade);
+void vr41xx_disable_giuint(unsigned int pin)
+{
+       if (pin < GIUINT_HIGH_OFFSET)
+               disable_giuint_low_irq(GIU_IRQ(pin));
+       else
+               disable_giuint_high_irq(GIU_IRQ(pin));
 }
 
 void vr41xx_set_irq_trigger(int pin, int trigger, int hold)
@@ -296,6 +292,8 @@
 
 EXPORT_SYMBOL(vr41xx_set_irq_level);
 
+#ifndef MODULE
+
 #define GIUINT_NR_IRQS         32
 
 enum {
@@ -310,6 +308,12 @@
 
 static struct vr41xx_giuint_cascade giuint_cascade[GIUINT_NR_IRQS];
 
+static struct irqaction giu_cascade = {
+       .handler        = no_action,
+       .mask           = CPU_MASK_NONE,
+       .name           = "cascade",
+};
+
 static int no_irq_number(int irq)
 {
        return -EINVAL;
@@ -421,7 +425,7 @@
        enable_irq(GIUINT_CASCADE_IRQ);
 }
 
-static int __init vr41xx_giu_init(void)
+void __init init_vr41xx_giuint_irq(void)
 {
        int i;
 
@@ -437,7 +441,7 @@
                break;
        default:
                printk(KERN_ERR "GIU: Unexpected CPU of NEC VR4100 series\n");
-               return -EINVAL;
+               return;
        }
 
        for (i = 0; i < GIUINT_NR_IRQS; i++) {
@@ -449,7 +453,14 @@
                giuint_cascade[i].get_irq_number = no_irq_number;
        }
 
-       return 0;
+       for (i = GIU_IRQ_BASE; i <= GIU_IRQ_LAST; i++) {
+               if (i < (GIU_IRQ_BASE + GIUINT_HIGH_OFFSET))
+                       irq_desc[i].handler = &giuint_low_irq_type;
+               else
+                       irq_desc[i].handler = &giuint_high_irq_type;
+       }
+
+       setup_irq(GIUINT_CASCADE_IRQ, &giu_cascade);
 }
 
-early_initcall(vr41xx_giu_init);
+#endif

<Prev in Thread] Current Thread [Next in Thread>