From a722df087dc745a213573ed860be57a255e799bb Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Sun, 2 Jul 2006 23:13:34 +0900 Subject: [MIPS] vr41xx: Removed unused definitions for NEC CMBVR4133. Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- include/asm-mips/vr41xx/cmbvr4133.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/asm-mips/vr41xx') diff --git a/include/asm-mips/vr41xx/cmbvr4133.h b/include/asm-mips/vr41xx/cmbvr4133.h index 42af389019ea..3fbfde19c80c 100644 --- a/include/asm-mips/vr41xx/cmbvr4133.h +++ b/include/asm-mips/vr41xx/cmbvr4133.h @@ -55,7 +55,4 @@ #define IDE_SECONDARY_IRQ I8259_IRQ(15) #define I8259_IRQ_LAST IDE_SECONDARY_IRQ -#define RTC_PORT(x) (0xaf000100 + (x)) -#define RTC_IO_EXTENT 0x140 - #endif /* __NEC_CMBVR4133_H */ -- cgit v1.2.3 From 66151bbd20c6c62dbe5b131484c885086e3a8d29 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 13 Jul 2006 17:33:03 +0900 Subject: [MIPS] vr41xx: Move IRQ numbers to asm-mips/vr41xx/irq.h Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/pci/fixup-mpc30x.c | 1 - arch/mips/vr41xx/common/icu.c | 1 + arch/mips/vr41xx/common/init.c | 1 + arch/mips/vr41xx/common/irq.c | 2 +- arch/mips/vr41xx/common/vrc4173.c | 1 + drivers/char/vr41xx_giu.c | 1 + drivers/rtc/rtc-vr41xx.c | 2 +- drivers/serial/vr41xx_siu.c | 1 + include/asm-mips/vr41xx/capcella.h | 2 +- include/asm-mips/vr41xx/cmbvr4133.h | 3 +- include/asm-mips/vr41xx/irq.h | 101 ++++++++++++++++++++++++++++++++++++ include/asm-mips/vr41xx/mpc30x.h | 2 +- include/asm-mips/vr41xx/tb0219.h | 2 +- include/asm-mips/vr41xx/tb0226.h | 2 +- include/asm-mips/vr41xx/tb0287.h | 2 +- include/asm-mips/vr41xx/vr41xx.h | 53 ------------------- include/asm-mips/vr41xx/vrc4173.h | 20 ------- 17 files changed, 114 insertions(+), 83 deletions(-) create mode 100644 include/asm-mips/vr41xx/irq.h (limited to 'include/asm-mips/vr41xx') diff --git a/arch/mips/pci/fixup-mpc30x.c b/arch/mips/pci/fixup-mpc30x.c index b67ddaa47122..3c9ae41f7517 100644 --- a/arch/mips/pci/fixup-mpc30x.c +++ b/arch/mips/pci/fixup-mpc30x.c @@ -21,7 +21,6 @@ #include #include -#include static const int internal_func_irqs[] __initdata = { VRC4173_CASCADE_IRQ, diff --git a/arch/mips/vr41xx/common/icu.c b/arch/mips/vr41xx/common/icu.c index 3cc5a4959275..7a5c31d58378 100644 --- a/arch/mips/vr41xx/common/icu.c +++ b/arch/mips/vr41xx/common/icu.c @@ -38,6 +38,7 @@ #include #include +#include #include static void __iomem *icu1_base; diff --git a/arch/mips/vr41xx/common/init.c b/arch/mips/vr41xx/common/init.c index 625f22f00384..a2e285c1d4d5 100644 --- a/arch/mips/vr41xx/common/init.c +++ b/arch/mips/vr41xx/common/init.c @@ -24,6 +24,7 @@ #include #include +#include #include #define IO_MEM_RESOURCE_START 0UL diff --git a/arch/mips/vr41xx/common/irq.c b/arch/mips/vr41xx/common/irq.c index 965f3d6312bd..4733c5344467 100644 --- a/arch/mips/vr41xx/common/irq.c +++ b/arch/mips/vr41xx/common/irq.c @@ -22,7 +22,7 @@ #include #include -#include +#include typedef struct irq_cascade { int (*get_irq)(unsigned int, struct pt_regs *); diff --git a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c index 4720a994dc19..3f1ae9721e4e 100644 --- a/arch/mips/vr41xx/common/vrc4173.c +++ b/arch/mips/vr41xx/common/vrc4173.c @@ -28,6 +28,7 @@ #include #include +#include #include #include diff --git a/drivers/char/vr41xx_giu.c b/drivers/char/vr41xx_giu.c index 1b9b1f1d4c49..8116a47b80f4 100644 --- a/drivers/char/vr41xx_giu.c +++ b/drivers/char/vr41xx_giu.c @@ -33,6 +33,7 @@ #include #include #include +#include #include MODULE_AUTHOR("Yoichi Yuasa "); diff --git a/drivers/rtc/rtc-vr41xx.c b/drivers/rtc/rtc-vr41xx.c index bb6d5ff24fd0..596764fd29f5 100644 --- a/drivers/rtc/rtc-vr41xx.c +++ b/drivers/rtc/rtc-vr41xx.c @@ -30,7 +30,7 @@ #include #include #include -#include +#include MODULE_AUTHOR("Yoichi Yuasa "); MODULE_DESCRIPTION("NEC VR4100 series RTC driver"); diff --git a/drivers/serial/vr41xx_siu.c b/drivers/serial/vr41xx_siu.c index e93d0edc2e08..6c8b0ea83c3c 100644 --- a/drivers/serial/vr41xx_siu.c +++ b/drivers/serial/vr41xx_siu.c @@ -38,6 +38,7 @@ #include #include +#include #include #include diff --git a/include/asm-mips/vr41xx/capcella.h b/include/asm-mips/vr41xx/capcella.h index d10ffda50de7..e0ee05a3dfcc 100644 --- a/include/asm-mips/vr41xx/capcella.h +++ b/include/asm-mips/vr41xx/capcella.h @@ -20,7 +20,7 @@ #ifndef __ZAO_CAPCELLA_H #define __ZAO_CAPCELLA_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/cmbvr4133.h b/include/asm-mips/vr41xx/cmbvr4133.h index 3fbfde19c80c..9490ade58b46 100644 --- a/include/asm-mips/vr41xx/cmbvr4133.h +++ b/include/asm-mips/vr41xx/cmbvr4133.h @@ -15,8 +15,7 @@ #ifndef __NEC_CMBVR4133_H #define __NEC_CMBVR4133_H -#include -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/irq.h b/include/asm-mips/vr41xx/irq.h new file mode 100644 index 000000000000..d315dfbc08f2 --- /dev/null +++ b/include/asm-mips/vr41xx/irq.h @@ -0,0 +1,101 @@ +/* + * include/asm-mips/vr41xx/irq.h + * + * Interrupt numbers for NEC VR4100 series. + * + * Copyright (C) 1999 Michael Klar + * Copyright (C) 2001, 2002 Paul Mundt + * Copyright (C) 2002 MontaVista Software, Inc. + * Copyright (C) 2002 TimeSys Corp. + * Copyright (C) 2003-2006 Yoichi Yuasa + * + * 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 the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + */ +#ifndef __NEC_VR41XX_IRQ_H +#define __NEC_VR41XX_IRQ_H + +/* + * CPU core Interrupt Numbers + */ +#define MIPS_CPU_IRQ_BASE 0 +#define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) +#define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) +#define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) +#define INT0_IRQ MIPS_CPU_IRQ(2) +#define INT1_IRQ MIPS_CPU_IRQ(3) +#define INT2_IRQ MIPS_CPU_IRQ(4) +#define INT3_IRQ MIPS_CPU_IRQ(5) +#define INT4_IRQ MIPS_CPU_IRQ(6) +#define TIMER_IRQ MIPS_CPU_IRQ(7) + +/* + * SYINT1 Interrupt Numbers + */ +#define SYSINT1_IRQ_BASE 8 +#define SYSINT1_IRQ(x) (SYSINT1_IRQ_BASE + (x)) +#define BATTRY_IRQ SYSINT1_IRQ(0) +#define POWER_IRQ SYSINT1_IRQ(1) +#define RTCLONG1_IRQ SYSINT1_IRQ(2) +#define ELAPSEDTIME_IRQ SYSINT1_IRQ(3) +/* RFU */ +#define PIU_IRQ SYSINT1_IRQ(5) +#define AIU_IRQ SYSINT1_IRQ(6) +#define KIU_IRQ SYSINT1_IRQ(7) +#define GIUINT_IRQ SYSINT1_IRQ(8) +#define SIU_IRQ SYSINT1_IRQ(9) +#define BUSERR_IRQ SYSINT1_IRQ(10) +#define SOFTINT_IRQ SYSINT1_IRQ(11) +#define CLKRUN_IRQ SYSINT1_IRQ(12) +#define DOZEPIU_IRQ SYSINT1_IRQ(13) +#define SYSINT1_IRQ_LAST DOZEPIU_IRQ + +/* + * SYSINT2 Interrupt Numbers + */ +#define SYSINT2_IRQ_BASE 24 +#define SYSINT2_IRQ(x) (SYSINT2_IRQ_BASE + (x)) +#define RTCLONG2_IRQ SYSINT2_IRQ(0) +#define LED_IRQ SYSINT2_IRQ(1) +#define HSP_IRQ SYSINT2_IRQ(2) +#define TCLOCK_IRQ SYSINT2_IRQ(3) +#define FIR_IRQ SYSINT2_IRQ(4) +#define CEU_IRQ SYSINT2_IRQ(4) /* same number as FIR_IRQ */ +#define DSIU_IRQ SYSINT2_IRQ(5) +#define PCI_IRQ SYSINT2_IRQ(6) +#define SCU_IRQ SYSINT2_IRQ(7) +#define CSI_IRQ SYSINT2_IRQ(8) +#define BCU_IRQ SYSINT2_IRQ(9) +#define ETHERNET_IRQ SYSINT2_IRQ(10) +#define SYSINT2_IRQ_LAST ETHERNET_IRQ + +/* + * GIU Interrupt Numbers + */ +#define GIU_IRQ_BASE 40 +#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */ +#define GIU_IRQ_LAST GIU_IRQ(31) + +/* + * VRC4173 Interrupt Numbers + */ +#define VRC4173_IRQ_BASE 72 +#define VRC4173_IRQ(x) (VRC4173_IRQ_BASE + (x)) +#define VRC4173_USB_IRQ VRC4173_IRQ(0) +#define VRC4173_PCMCIA2_IRQ VRC4173_IRQ(1) +#define VRC4173_PCMCIA1_IRQ VRC4173_IRQ(2) +#define VRC4173_PS2CH2_IRQ VRC4173_IRQ(3) +#define VRC4173_PS2CH1_IRQ VRC4173_IRQ(4) +#define VRC4173_PIU_IRQ VRC4173_IRQ(5) +#define VRC4173_AIU_IRQ VRC4173_IRQ(6) +#define VRC4173_KIU_IRQ VRC4173_IRQ(7) +#define VRC4173_GIU_IRQ VRC4173_IRQ(8) +#define VRC4173_AC97_IRQ VRC4173_IRQ(9) +#define VRC4173_AC97INT1_IRQ VRC4173_IRQ(10) +/* RFU */ +#define VRC4173_DOZEPIU_IRQ VRC4173_IRQ(13) +#define VRC4173_IRQ_LAST VRC4173_DOZEPIU_IRQ + +#endif /* __NEC_VR41XX_IRQ_H */ diff --git a/include/asm-mips/vr41xx/mpc30x.h b/include/asm-mips/vr41xx/mpc30x.h index a6cbe4da6667..1d67df843dc3 100644 --- a/include/asm-mips/vr41xx/mpc30x.h +++ b/include/asm-mips/vr41xx/mpc30x.h @@ -20,7 +20,7 @@ #ifndef __VICTOR_MPC30X_H #define __VICTOR_MPC30X_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/tb0219.h b/include/asm-mips/vr41xx/tb0219.h index b318b9612a83..dc981b4be0a4 100644 --- a/include/asm-mips/vr41xx/tb0219.h +++ b/include/asm-mips/vr41xx/tb0219.h @@ -23,7 +23,7 @@ #ifndef __TANBAC_TB0219_H #define __TANBAC_TB0219_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/tb0226.h b/include/asm-mips/vr41xx/tb0226.h index 2513f450e2d6..de527dcfa5f3 100644 --- a/include/asm-mips/vr41xx/tb0226.h +++ b/include/asm-mips/vr41xx/tb0226.h @@ -20,7 +20,7 @@ #ifndef __TANBAC_TB0226_H #define __TANBAC_TB0226_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/tb0287.h b/include/asm-mips/vr41xx/tb0287.h index dd9832313afe..61bead68abf0 100644 --- a/include/asm-mips/vr41xx/tb0287.h +++ b/include/asm-mips/vr41xx/tb0287.h @@ -22,7 +22,7 @@ #ifndef __TANBAC_TB0287_H #define __TANBAC_TB0287_H -#include +#include /* * General-Purpose I/O Pin Number diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h index 70828d5fae9c..dd3eb3dc5886 100644 --- a/include/asm-mips/vr41xx/vr41xx.h +++ b/include/asm-mips/vr41xx/vr41xx.h @@ -74,59 +74,6 @@ extern void vr41xx_mask_clock(vr41xx_clock_t clock); /* * Interrupt Control Unit */ -/* CPU core Interrupt Numbers */ -#define MIPS_CPU_IRQ_BASE 0 -#define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x)) -#define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0) -#define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1) -#define INT0_IRQ MIPS_CPU_IRQ(2) -#define INT1_IRQ MIPS_CPU_IRQ(3) -#define INT2_IRQ MIPS_CPU_IRQ(4) -#define INT3_IRQ MIPS_CPU_IRQ(5) -#define INT4_IRQ MIPS_CPU_IRQ(6) -#define TIMER_IRQ MIPS_CPU_IRQ(7) - -/* SYINT1 Interrupt Numbers */ -#define SYSINT1_IRQ_BASE 8 -#define SYSINT1_IRQ(x) (SYSINT1_IRQ_BASE + (x)) -#define BATTRY_IRQ SYSINT1_IRQ(0) -#define POWER_IRQ SYSINT1_IRQ(1) -#define RTCLONG1_IRQ SYSINT1_IRQ(2) -#define ELAPSEDTIME_IRQ SYSINT1_IRQ(3) -/* RFU */ -#define PIU_IRQ SYSINT1_IRQ(5) -#define AIU_IRQ SYSINT1_IRQ(6) -#define KIU_IRQ SYSINT1_IRQ(7) -#define GIUINT_IRQ SYSINT1_IRQ(8) -#define SIU_IRQ SYSINT1_IRQ(9) -#define BUSERR_IRQ SYSINT1_IRQ(10) -#define SOFTINT_IRQ SYSINT1_IRQ(11) -#define CLKRUN_IRQ SYSINT1_IRQ(12) -#define DOZEPIU_IRQ SYSINT1_IRQ(13) -#define SYSINT1_IRQ_LAST DOZEPIU_IRQ - -/* SYSINT2 Interrupt Numbers */ -#define SYSINT2_IRQ_BASE 24 -#define SYSINT2_IRQ(x) (SYSINT2_IRQ_BASE + (x)) -#define RTCLONG2_IRQ SYSINT2_IRQ(0) -#define LED_IRQ SYSINT2_IRQ(1) -#define HSP_IRQ SYSINT2_IRQ(2) -#define TCLOCK_IRQ SYSINT2_IRQ(3) -#define FIR_IRQ SYSINT2_IRQ(4) -#define CEU_IRQ SYSINT2_IRQ(4) /* same number as FIR_IRQ */ -#define DSIU_IRQ SYSINT2_IRQ(5) -#define PCI_IRQ SYSINT2_IRQ(6) -#define SCU_IRQ SYSINT2_IRQ(7) -#define CSI_IRQ SYSINT2_IRQ(8) -#define BCU_IRQ SYSINT2_IRQ(9) -#define ETHERNET_IRQ SYSINT2_IRQ(10) -#define SYSINT2_IRQ_LAST ETHERNET_IRQ - -/* GIU Interrupt Numbers */ -#define GIU_IRQ_BASE 40 -#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */ -#define GIU_IRQ_LAST GIU_IRQ(31) - extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign); extern int cascade_irq(unsigned int irq, int (*get_irq)(unsigned int, struct pt_regs *)); diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h index 96fdcd54cec7..e5e6ad1d2f86 100644 --- a/include/asm-mips/vr41xx/vrc4173.h +++ b/include/asm-mips/vr41xx/vrc4173.h @@ -26,26 +26,6 @@ #include -/* - * Interrupt Number - */ -#define VRC4173_IRQ_BASE 72 -#define VRC4173_IRQ(x) (VRC4173_IRQ_BASE + (x)) -#define VRC4173_USB_IRQ VRC4173_IRQ(0) -#define VRC4173_PCMCIA2_IRQ VRC4173_IRQ(1) -#define VRC4173_PCMCIA1_IRQ VRC4173_IRQ(2) -#define VRC4173_PS2CH2_IRQ VRC4173_IRQ(3) -#define VRC4173_PS2CH1_IRQ VRC4173_IRQ(4) -#define VRC4173_PIU_IRQ VRC4173_IRQ(5) -#define VRC4173_AIU_IRQ VRC4173_IRQ(6) -#define VRC4173_KIU_IRQ VRC4173_IRQ(7) -#define VRC4173_GIU_IRQ VRC4173_IRQ(8) -#define VRC4173_AC97_IRQ VRC4173_IRQ(9) -#define VRC4173_AC97INT1_IRQ VRC4173_IRQ(10) -/* RFU */ -#define VRC4173_DOZEPIU_IRQ VRC4173_IRQ(13) -#define VRC4173_IRQ_LAST VRC4173_DOZEPIU_IRQ - /* * PCI I/O accesses */ -- cgit v1.2.3 From efcb487a8e9a86874cf63c3fbf6c85bbf87e6d87 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 13 Jul 2006 17:33:14 +0900 Subject: [MIPS] vr41xx: Removed old v2.4 VRC4173 driver Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/vr41xx/Kconfig | 6 - arch/mips/vr41xx/common/Makefile | 3 +- arch/mips/vr41xx/common/vrc4173.c | 582 -------------------------------------- include/asm-mips/vr41xx/vrc4173.h | 201 ------------- 4 files changed, 1 insertion(+), 791 deletions(-) delete mode 100644 arch/mips/vr41xx/common/vrc4173.c delete mode 100644 include/asm-mips/vr41xx/vrc4173.h (limited to 'include/asm-mips/vr41xx') diff --git a/arch/mips/vr41xx/Kconfig b/arch/mips/vr41xx/Kconfig index 6046ef23b2bf..92f41f6f934a 100644 --- a/arch/mips/vr41xx/Kconfig +++ b/arch/mips/vr41xx/Kconfig @@ -86,9 +86,3 @@ config PCI_VR41XX depends on MACH_VR41XX && HW_HAS_PCI default y select PCI - -config VRC4173 - tristate "Add NEC VRC4173 companion chip support" - depends on MACH_VR41XX && PCI_VR41XX - help - The NEC VRC4173 is a companion chip for NEC VR4122/VR4131. diff --git a/arch/mips/vr41xx/common/Makefile b/arch/mips/vr41xx/common/Makefile index aa373974c80f..975d5caf9d1b 100644 --- a/arch/mips/vr41xx/common/Makefile +++ b/arch/mips/vr41xx/common/Makefile @@ -2,7 +2,6 @@ # Makefile for common code of the NEC VR4100 series. # -obj-y += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o -obj-$(CONFIG_VRC4173) += vrc4173.o +obj-y += bcu.o cmu.o icu.o init.o irq.o pmu.o type.o EXTRA_AFLAGS := $(CFLAGS) diff --git a/arch/mips/vr41xx/common/vrc4173.c b/arch/mips/vr41xx/common/vrc4173.c deleted file mode 100644 index 3f1ae9721e4e..000000000000 --- a/arch/mips/vr41xx/common/vrc4173.c +++ /dev/null @@ -1,582 +0,0 @@ -/* - * vrc4173.c, NEC VRC4173 base driver for NEC VR4122/VR4131. - * - * Copyright (C) 2001-2003 MontaVista Software Inc. - * Author: Yoichi Yuasa - * Copyright (C) 2004 Yoichi Yuasa - * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -MODULE_DESCRIPTION("NEC VRC4173 base driver for NEC VR4122/4131"); -MODULE_AUTHOR("Yoichi Yuasa "); -MODULE_LICENSE("GPL"); - -#define VRC4173_CMUCLKMSK 0x040 - #define MSKPIU 0x0001 - #define MSKKIU 0x0002 - #define MSKAIU 0x0004 - #define MSKPS2CH1 0x0008 - #define MSKPS2CH2 0x0010 - #define MSKUSB 0x0020 - #define MSKCARD1 0x0040 - #define MSKCARD2 0x0080 - #define MSKAC97 0x0100 - #define MSK48MUSB 0x0400 - #define MSK48MPIN 0x0800 - #define MSK48MOSC 0x1000 -#define VRC4173_CMUSRST 0x042 - #define USBRST 0x0001 - #define CARD1RST 0x0002 - #define CARD2RST 0x0004 - #define AC97RST 0x0008 - -#define VRC4173_SYSINT1REG 0x060 -#define VRC4173_MSYSINT1REG 0x06c -#define VRC4173_MPIUINTREG 0x06e -#define VRC4173_MAIUINTREG 0x070 -#define VRC4173_MKIUINTREG 0x072 - -#define VRC4173_SELECTREG 0x09e - #define SEL3 0x0008 - #define SEL2 0x0004 - #define SEL1 0x0002 - #define SEL0 0x0001 - -static struct pci_device_id vrc4173_id_table[] __devinitdata = { - { .vendor = PCI_VENDOR_ID_NEC, - .device = PCI_DEVICE_ID_NEC_VRC4173, - .subvendor = PCI_ANY_ID, - .subdevice = PCI_ANY_ID, }, - { .vendor = 0, }, -}; - -unsigned long vrc4173_io_offset = 0; - -EXPORT_SYMBOL(vrc4173_io_offset); - -static int vrc4173_initialized; -static uint16_t vrc4173_cmuclkmsk; -static uint16_t vrc4173_selectreg; -static DEFINE_SPINLOCK(vrc4173_cmu_lock); -static DEFINE_SPINLOCK(vrc4173_giu_lock); - -static inline void set_cmusrst(uint16_t val) -{ - uint16_t cmusrst; - - cmusrst = vrc4173_inw(VRC4173_CMUSRST); - cmusrst |= val; - vrc4173_outw(cmusrst, VRC4173_CMUSRST); -} - -static inline void clear_cmusrst(uint16_t val) -{ - uint16_t cmusrst; - - cmusrst = vrc4173_inw(VRC4173_CMUSRST); - cmusrst &= ~val; - vrc4173_outw(cmusrst, VRC4173_CMUSRST); -} - -void vrc4173_supply_clock(vrc4173_clock_t clock) -{ - if (vrc4173_initialized) { - spin_lock_irq(&vrc4173_cmu_lock); - - switch (clock) { - case VRC4173_PIU_CLOCK: - vrc4173_cmuclkmsk |= MSKPIU; - break; - case VRC4173_KIU_CLOCK: - vrc4173_cmuclkmsk |= MSKKIU; - break; - case VRC4173_AIU_CLOCK: - vrc4173_cmuclkmsk |= MSKAIU; - break; - case VRC4173_PS2_CH1_CLOCK: - vrc4173_cmuclkmsk |= MSKPS2CH1; - break; - case VRC4173_PS2_CH2_CLOCK: - vrc4173_cmuclkmsk |= MSKPS2CH2; - break; - case VRC4173_USBU_PCI_CLOCK: - set_cmusrst(USBRST); - vrc4173_cmuclkmsk |= MSKUSB; - break; - case VRC4173_CARDU1_PCI_CLOCK: - set_cmusrst(CARD1RST); - vrc4173_cmuclkmsk |= MSKCARD1; - break; - case VRC4173_CARDU2_PCI_CLOCK: - set_cmusrst(CARD2RST); - vrc4173_cmuclkmsk |= MSKCARD2; - break; - case VRC4173_AC97U_PCI_CLOCK: - set_cmusrst(AC97RST); - vrc4173_cmuclkmsk |= MSKAC97; - break; - case VRC4173_USBU_48MHz_CLOCK: - set_cmusrst(USBRST); - vrc4173_cmuclkmsk |= MSK48MUSB; - break; - case VRC4173_EXT_48MHz_CLOCK: - if (vrc4173_cmuclkmsk & MSK48MOSC) - vrc4173_cmuclkmsk |= MSK48MPIN; - else - printk(KERN_WARNING - "vrc4173_supply_clock: " - "Please supply VRC4173_48MHz_CLOCK first " - "rather than VRC4173_EXT_48MHz_CLOCK.\n"); - break; - case VRC4173_48MHz_CLOCK: - vrc4173_cmuclkmsk |= MSK48MOSC; - break; - default: - printk(KERN_WARNING - "vrc4173_supply_clock: Invalid CLOCK value %u\n", clock); - break; - } - - vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK); - - switch (clock) { - case VRC4173_USBU_PCI_CLOCK: - case VRC4173_USBU_48MHz_CLOCK: - clear_cmusrst(USBRST); - break; - case VRC4173_CARDU1_PCI_CLOCK: - clear_cmusrst(CARD1RST); - break; - case VRC4173_CARDU2_PCI_CLOCK: - clear_cmusrst(CARD2RST); - break; - case VRC4173_AC97U_PCI_CLOCK: - clear_cmusrst(AC97RST); - break; - default: - break; - } - - spin_unlock_irq(&vrc4173_cmu_lock); - } -} - -EXPORT_SYMBOL(vrc4173_supply_clock); - -void vrc4173_mask_clock(vrc4173_clock_t clock) -{ - if (vrc4173_initialized) { - spin_lock_irq(&vrc4173_cmu_lock); - - switch (clock) { - case VRC4173_PIU_CLOCK: - vrc4173_cmuclkmsk &= ~MSKPIU; - break; - case VRC4173_KIU_CLOCK: - vrc4173_cmuclkmsk &= ~MSKKIU; - break; - case VRC4173_AIU_CLOCK: - vrc4173_cmuclkmsk &= ~MSKAIU; - break; - case VRC4173_PS2_CH1_CLOCK: - vrc4173_cmuclkmsk &= ~MSKPS2CH1; - break; - case VRC4173_PS2_CH2_CLOCK: - vrc4173_cmuclkmsk &= ~MSKPS2CH2; - break; - case VRC4173_USBU_PCI_CLOCK: - set_cmusrst(USBRST); - vrc4173_cmuclkmsk &= ~MSKUSB; - break; - case VRC4173_CARDU1_PCI_CLOCK: - set_cmusrst(CARD1RST); - vrc4173_cmuclkmsk &= ~MSKCARD1; - break; - case VRC4173_CARDU2_PCI_CLOCK: - set_cmusrst(CARD2RST); - vrc4173_cmuclkmsk &= ~MSKCARD2; - break; - case VRC4173_AC97U_PCI_CLOCK: - set_cmusrst(AC97RST); - vrc4173_cmuclkmsk &= ~MSKAC97; - break; - case VRC4173_USBU_48MHz_CLOCK: - set_cmusrst(USBRST); - vrc4173_cmuclkmsk &= ~MSK48MUSB; - break; - case VRC4173_EXT_48MHz_CLOCK: - vrc4173_cmuclkmsk &= ~MSK48MPIN; - break; - case VRC4173_48MHz_CLOCK: - vrc4173_cmuclkmsk &= ~MSK48MOSC; - break; - default: - printk(KERN_WARNING "vrc4173_mask_clock: Invalid CLOCK value %u\n", clock); - break; - } - - vrc4173_outw(vrc4173_cmuclkmsk, VRC4173_CMUCLKMSK); - - switch (clock) { - case VRC4173_USBU_PCI_CLOCK: - case VRC4173_USBU_48MHz_CLOCK: - clear_cmusrst(USBRST); - break; - case VRC4173_CARDU1_PCI_CLOCK: - clear_cmusrst(CARD1RST); - break; - case VRC4173_CARDU2_PCI_CLOCK: - clear_cmusrst(CARD2RST); - break; - case VRC4173_AC97U_PCI_CLOCK: - clear_cmusrst(AC97RST); - break; - default: - break; - } - - spin_unlock_irq(&vrc4173_cmu_lock); - } -} - -EXPORT_SYMBOL(vrc4173_mask_clock); - -static inline void vrc4173_cmu_init(void) -{ - vrc4173_cmuclkmsk = vrc4173_inw(VRC4173_CMUCLKMSK); - - spin_lock_init(&vrc4173_cmu_lock); -} - -void vrc4173_select_function(vrc4173_function_t function) -{ - if (vrc4173_initialized) { - spin_lock_irq(&vrc4173_giu_lock); - - switch(function) { - case PS2_CHANNEL1: - vrc4173_selectreg |= SEL2; - break; - case PS2_CHANNEL2: - vrc4173_selectreg |= SEL1; - break; - case TOUCHPANEL: - vrc4173_selectreg &= SEL2 | SEL1 | SEL0; - break; - case KEYBOARD_8SCANLINES: - vrc4173_selectreg &= SEL3 | SEL2 | SEL1; - break; - case KEYBOARD_10SCANLINES: - vrc4173_selectreg &= SEL3 | SEL2; - break; - case KEYBOARD_12SCANLINES: - vrc4173_selectreg &= SEL3; - break; - case GPIO_0_15PINS: - vrc4173_selectreg |= SEL0; - break; - case GPIO_16_20PINS: - vrc4173_selectreg |= SEL3; - break; - } - - vrc4173_outw(vrc4173_selectreg, VRC4173_SELECTREG); - - spin_unlock_irq(&vrc4173_giu_lock); - } -} - -EXPORT_SYMBOL(vrc4173_select_function); - -static inline void vrc4173_giu_init(void) -{ - vrc4173_selectreg = vrc4173_inw(VRC4173_SELECTREG); - - spin_lock_init(&vrc4173_giu_lock); -} - -void vrc4173_enable_piuint(uint16_t mask) -{ - struct irq_desc *desc = irq_desc + VRC4173_PIU_IRQ; - unsigned long flags; - uint16_t val; - - spin_lock_irqsave(&desc->lock, flags); - val = vrc4173_inw(VRC4173_MPIUINTREG); - val |= mask; - vrc4173_outw(val, VRC4173_MPIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); -} - -EXPORT_SYMBOL(vrc4173_enable_piuint); - -void vrc4173_disable_piuint(uint16_t mask) -{ - struct irq_desc *desc = irq_desc + VRC4173_PIU_IRQ; - unsigned long flags; - uint16_t val; - - spin_lock_irqsave(&desc->lock, flags); - val = vrc4173_inw(VRC4173_MPIUINTREG); - val &= ~mask; - vrc4173_outw(val, VRC4173_MPIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); -} - -EXPORT_SYMBOL(vrc4173_disable_piuint); - -void vrc4173_enable_aiuint(uint16_t mask) -{ - struct irq_desc *desc = irq_desc + VRC4173_AIU_IRQ; - unsigned long flags; - uint16_t val; - - spin_lock_irqsave(&desc->lock, flags); - val = vrc4173_inw(VRC4173_MAIUINTREG); - val |= mask; - vrc4173_outw(val, VRC4173_MAIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); -} - -EXPORT_SYMBOL(vrc4173_enable_aiuint); - -void vrc4173_disable_aiuint(uint16_t mask) -{ - struct irq_desc *desc = irq_desc + VRC4173_AIU_IRQ; - unsigned long flags; - uint16_t val; - - spin_lock_irqsave(&desc->lock, flags); - val = vrc4173_inw(VRC4173_MAIUINTREG); - val &= ~mask; - vrc4173_outw(val, VRC4173_MAIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); -} - -EXPORT_SYMBOL(vrc4173_disable_aiuint); - -void vrc4173_enable_kiuint(uint16_t mask) -{ - struct irq_desc *desc = irq_desc + VRC4173_KIU_IRQ; - unsigned long flags; - uint16_t val; - - spin_lock_irqsave(&desc->lock, flags); - val = vrc4173_inw(VRC4173_MKIUINTREG); - val |= mask; - vrc4173_outw(val, VRC4173_MKIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); -} - -EXPORT_SYMBOL(vrc4173_enable_kiuint); - -void vrc4173_disable_kiuint(uint16_t mask) -{ - struct irq_desc *desc = irq_desc + VRC4173_KIU_IRQ; - unsigned long flags; - uint16_t val; - - spin_lock_irqsave(&desc->lock, flags); - val = vrc4173_inw(VRC4173_MKIUINTREG); - val &= ~mask; - vrc4173_outw(val, VRC4173_MKIUINTREG); - spin_unlock_irqrestore(&desc->lock, flags); -} - -EXPORT_SYMBOL(vrc4173_disable_kiuint); - -static void enable_vrc4173_irq(unsigned int irq) -{ - uint16_t val; - - val = vrc4173_inw(VRC4173_MSYSINT1REG); - val |= (uint16_t)1 << (irq - VRC4173_IRQ_BASE); - vrc4173_outw(val, VRC4173_MSYSINT1REG); -} - -static void disable_vrc4173_irq(unsigned int irq) -{ - uint16_t val; - - val = vrc4173_inw(VRC4173_MSYSINT1REG); - val &= ~((uint16_t)1 << (irq - VRC4173_IRQ_BASE)); - vrc4173_outw(val, VRC4173_MSYSINT1REG); -} - -static unsigned int startup_vrc4173_irq(unsigned int irq) -{ - enable_vrc4173_irq(irq); - return 0; /* never anything pending */ -} - -#define shutdown_vrc4173_irq disable_vrc4173_irq -#define ack_vrc4173_irq disable_vrc4173_irq - -static void end_vrc4173_irq(unsigned int irq) -{ - if (!(irq_desc[irq].status & (IRQ_DISABLED | IRQ_INPROGRESS))) - enable_vrc4173_irq(irq); -} - -static struct irq_chip vrc4173_irq_type = { - .typename = "VRC4173", - .startup = startup_vrc4173_irq, - .shutdown = shutdown_vrc4173_irq, - .enable = enable_vrc4173_irq, - .disable = disable_vrc4173_irq, - .ack = ack_vrc4173_irq, - .end = end_vrc4173_irq, -}; - -static int vrc4173_get_irq_number(int irq) -{ - uint16_t status, mask; - int i; - - status = vrc4173_inw(VRC4173_SYSINT1REG); - mask = vrc4173_inw(VRC4173_MSYSINT1REG); - - status &= mask; - if (status) { - for (i = 0; i < 16; i++) - if (status & (0x0001 << i)) - return VRC4173_IRQ(i); - } - - return -EINVAL; -} - -static inline int vrc4173_icu_init(int cascade_irq) -{ - int i; - - if (cascade_irq < GIU_IRQ(0) || cascade_irq > GIU_IRQ(15)) - return -EINVAL; - - vrc4173_outw(0, VRC4173_MSYSINT1REG); - - vr41xx_set_irq_trigger(GIU_IRQ_TO_PIN(cascade_irq), TRIGGER_LEVEL, SIGNAL_THROUGH); - vr41xx_set_irq_level(GIU_IRQ_TO_PIN(cascade_irq), LEVEL_LOW); - - for (i = VRC4173_IRQ_BASE; i <= VRC4173_IRQ_LAST; i++) - irq_desc[i].chip = &vrc4173_irq_type; - - return 0; -} - -static int __devinit vrc4173_probe(struct pci_dev *dev, - const struct pci_device_id *id) -{ - unsigned long start, flags; - int err; - - err = pci_enable_device(dev); - if (err < 0) { - printk(KERN_ERR "vrc4173: Failed to enable PCI device, aborting\n"); - return err; - } - - pci_set_master(dev); - - start = pci_resource_start(dev, 0); - if (start == 0) { - printk(KERN_ERR "vrc4173:No such PCI I/O resource, aborting\n"); - return -ENXIO; - } - - flags = pci_resource_flags(dev, 0); - if ((flags & IORESOURCE_IO) == 0) { - printk(KERN_ERR "vrc4173: No such PCI I/O resource, aborting\n"); - return -ENXIO; - } - - err = pci_request_regions(dev, "NEC VRC4173"); - if (err < 0) { - printk(KERN_ERR "vrc4173: PCI resources are busy, aborting\n"); - return err; - } - - set_vrc4173_io_offset(start); - - vrc4173_cmu_init(); - vrc4173_giu_init(); - - err = vrc4173_icu_init(dev->irq); - if (err < 0) { - printk(KERN_ERR "vrc4173: Invalid IRQ %d, aborting\n", dev->irq); - return err; - } - - err = vr41xx_cascade_irq(dev->irq, vrc4173_get_irq_number); - if (err < 0) { - printk(KERN_ERR "vrc4173: IRQ resource %d is busy, aborting\n", dev->irq); - return err; - } - - printk(KERN_INFO - "NEC VRC4173 at 0x%#08lx, IRQ is cascaded to %d\n", start, dev->irq); - - return 0; -} - -static void vrc4173_remove(struct pci_dev *dev) -{ - free_irq(dev->irq, NULL); - - pci_release_regions(dev); -} - -static struct pci_driver vrc4173_driver = { - .name = "NEC VRC4173", - .probe = vrc4173_probe, - .remove = vrc4173_remove, - .id_table = vrc4173_id_table, -}; - -static int __devinit vrc4173_init(void) -{ - int err; - - err = pci_register_driver(&vrc4173_driver); - if (err < 0) - return err; - - vrc4173_initialized = 1; - - return 0; -} - -static void __devexit vrc4173_exit(void) -{ - vrc4173_initialized = 0; - - pci_unregister_driver(&vrc4173_driver); -} - -module_init(vrc4173_init); -module_exit(vrc4173_exit); diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h deleted file mode 100644 index e5e6ad1d2f86..000000000000 --- a/include/asm-mips/vr41xx/vrc4173.h +++ /dev/null @@ -1,201 +0,0 @@ -/* - * vrc4173.h, Include file for NEC VRC4173. - * - * Copyright (C) 2000 Michael R. McDonald - * Copyright (C) 2001-2003 Montavista Software Inc. - * Author: Yoichi Yuasa - * Copyright (C) 2004 Yoichi Yuasa - * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org) - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __NEC_VRC4173_H -#define __NEC_VRC4173_H - -#include - -/* - * PCI I/O accesses - */ -#ifdef CONFIG_VRC4173 - -extern unsigned long vrc4173_io_offset; - -#define set_vrc4173_io_offset(offset) do { vrc4173_io_offset = (offset); } while (0) - -#define vrc4173_outb(val,port) outb((val), vrc4173_io_offset+(port)) -#define vrc4173_outw(val,port) outw((val), vrc4173_io_offset+(port)) -#define vrc4173_outl(val,port) outl((val), vrc4173_io_offset+(port)) -#define vrc4173_outb_p(val,port) outb_p((val), vrc4173_io_offset+(port)) -#define vrc4173_outw_p(val,port) outw_p((val), vrc4173_io_offset+(port)) -#define vrc4173_outl_p(val,port) outl_p((val), vrc4173_io_offset+(port)) - -#define vrc4173_inb(port) inb(vrc4173_io_offset+(port)) -#define vrc4173_inw(port) inw(vrc4173_io_offset+(port)) -#define vrc4173_inl(port) inl(vrc4173_io_offset+(port)) -#define vrc4173_inb_p(port) inb_p(vrc4173_io_offset+(port)) -#define vrc4173_inw_p(port) inw_p(vrc4173_io_offset+(port)) -#define vrc4173_inl_p(port) inl_p(vrc4173_io_offset+(port)) - -#define vrc4173_outsb(port,addr,count) outsb(vrc4173_io_offset+(port),(addr),(count)) -#define vrc4173_outsw(port,addr,count) outsw(vrc4173_io_offset+(port),(addr),(count)) -#define vrc4173_outsl(port,addr,count) outsl(vrc4173_io_offset+(port),(addr),(count)) - -#define vrc4173_insb(port,addr,count) insb(vrc4173_io_offset+(port),(addr),(count)) -#define vrc4173_insw(port,addr,count) insw(vrc4173_io_offset+(port),(addr),(count)) -#define vrc4173_insl(port,addr,count) insl(vrc4173_io_offset+(port),(addr),(count)) - -#else - -#define set_vrc4173_io_offset(offset) do {} while (0) - -#define vrc4173_outb(val,port) do {} while (0) -#define vrc4173_outw(val,port) do {} while (0) -#define vrc4173_outl(val,port) do {} while (0) -#define vrc4173_outb_p(val,port) do {} while (0) -#define vrc4173_outw_p(val,port) do {} while (0) -#define vrc4173_outl_p(val,port) do {} while (0) - -#define vrc4173_inb(port) 0 -#define vrc4173_inw(port) 0 -#define vrc4173_inl(port) 0 -#define vrc4173_inb_p(port) 0 -#define vrc4173_inw_p(port) 0 -#define vrc4173_inl_p(port) 0 - -#define vrc4173_outsb(port,addr,count) do {} while (0) -#define vrc4173_outsw(port,addr,count) do {} while (0) -#define vrc4173_outsl(port,addr,count) do {} while (0) - -#define vrc4173_insb(port,addr,count) do {} while (0) -#define vrc4173_insw(port,addr,count) do {} while (0) -#define vrc4173_insl(port,addr,count) do {} while (0) - -#endif - -/* - * Clock Mask Unit - */ -typedef enum vrc4173_clock { - VRC4173_PIU_CLOCK, - VRC4173_KIU_CLOCK, - VRC4173_AIU_CLOCK, - VRC4173_PS2_CH1_CLOCK, - VRC4173_PS2_CH2_CLOCK, - VRC4173_USBU_PCI_CLOCK, - VRC4173_CARDU1_PCI_CLOCK, - VRC4173_CARDU2_PCI_CLOCK, - VRC4173_AC97U_PCI_CLOCK, - VRC4173_USBU_48MHz_CLOCK, - VRC4173_EXT_48MHz_CLOCK, - VRC4173_48MHz_CLOCK, -} vrc4173_clock_t; - -#ifdef CONFIG_VRC4173 - -extern void vrc4173_supply_clock(vrc4173_clock_t clock); -extern void vrc4173_mask_clock(vrc4173_clock_t clock); - -#else - -static inline void vrc4173_supply_clock(vrc4173_clock_t clock) {} -static inline void vrc4173_mask_clock(vrc4173_clock_t clock) {} - -#endif - -/* - * Interupt Control Unit - */ - -#define VRC4173_PIUINT_COMMAND 0x0040 -#define VRC4173_PIUINT_DATA 0x0020 -#define VRC4173_PIUINT_PAGE1 0x0010 -#define VRC4173_PIUINT_PAGE0 0x0008 -#define VRC4173_PIUINT_DATALOST 0x0004 -#define VRC4173_PIUINT_STATUSCHANGE 0x0001 - -#ifdef CONFIG_VRC4173 - -extern void vrc4173_enable_piuint(uint16_t mask); -extern void vrc4173_disable_piuint(uint16_t mask); - -#else - -static inline void vrc4173_enable_piuint(uint16_t mask) {} -static inline void vrc4173_disable_piuint(uint16_t mask) {} - -#endif - -#define VRC4173_AIUINT_INPUT_DMAEND 0x0800 -#define VRC4173_AIUINT_INPUT_DMAHALT 0x0400 -#define VRC4173_AIUINT_INPUT_DATALOST 0x0200 -#define VRC4173_AIUINT_INPUT_DATA 0x0100 -#define VRC4173_AIUINT_OUTPUT_DMAEND 0x0008 -#define VRC4173_AIUINT_OUTPUT_DMAHALT 0x0004 -#define VRC4173_AIUINT_OUTPUT_NODATA 0x0002 - -#ifdef CONFIG_VRC4173 - -extern void vrc4173_enable_aiuint(uint16_t mask); -extern void vrc4173_disable_aiuint(uint16_t mask); - -#else - -static inline void vrc4173_enable_aiuint(uint16_t mask) {} -static inline void vrc4173_disable_aiuint(uint16_t mask) {} - -#endif - -#define VRC4173_KIUINT_DATALOST 0x0004 -#define VRC4173_KIUINT_DATAREADY 0x0002 -#define VRC4173_KIUINT_SCAN 0x0001 - -#ifdef CONFIG_VRC4173 - -extern void vrc4173_enable_kiuint(uint16_t mask); -extern void vrc4173_disable_kiuint(uint16_t mask); - -#else - -static inline void vrc4173_enable_kiuint(uint16_t mask) {} -static inline void vrc4173_disable_kiuint(uint16_t mask) {} - -#endif - -/* - * General-Purpose I/O Unit - */ -typedef enum vrc4173_function { - PS2_CHANNEL1, - PS2_CHANNEL2, - TOUCHPANEL, - KEYBOARD_8SCANLINES, - KEYBOARD_10SCANLINES, - KEYBOARD_12SCANLINES, - GPIO_0_15PINS, - GPIO_16_20PINS, -} vrc4173_function_t; - -#ifdef CONFIG_VRC4173 - -extern void vrc4173_select_function(vrc4173_function_t function); - -#else - -static inline void vrc4173_select_function(vrc4173_function_t function) {} - -#endif - -#endif /* __NEC_VRC4173_H */ -- cgit v1.2.3 From f26811e0d89d412a2f5d8e16760e71d3b5c2702c Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 13 Jul 2006 17:33:24 +0900 Subject: [MIPS] vr41xx: Update e55 setup function Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/vr41xx/casio-e55/setup.c | 15 ++++++++----- include/asm-mips/vr41xx/e55.h | 43 -------------------------------------- 2 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 include/asm-mips/vr41xx/e55.h (limited to 'include/asm-mips/vr41xx') diff --git a/arch/mips/vr41xx/casio-e55/setup.c b/arch/mips/vr41xx/casio-e55/setup.c index 814900915c28..6d9bab890587 100644 --- a/arch/mips/vr41xx/casio-e55/setup.c +++ b/arch/mips/vr41xx/casio-e55/setup.c @@ -1,7 +1,7 @@ /* * setup.c, Setup for the CASIO CASSIOPEIA E-11/15/55/65. * - * Copyright (C) 2002-2005 Yoichi Yuasa + * Copyright (C) 2002-2006 Yoichi Yuasa * * 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 @@ -21,13 +21,18 @@ #include #include -#include + +#define E55_ISA_IO_BASE 0x1400c000 +#define E55_ISA_IO_SIZE 0x03ff4000 +#define E55_ISA_IO_START 0 +#define E55_ISA_IO_END (E55_ISA_IO_SIZE - 1) +#define E55_IO_PORT_BASE KSEG1ADDR(E55_ISA_IO_BASE) static int __init casio_e55_setup(void) { - set_io_port_base(IO_PORT_BASE); - ioport_resource.start = IO_PORT_RESOURCE_START; - ioport_resource.end = IO_PORT_RESOURCE_END; + set_io_port_base(E55_IO_PORT_BASE); + ioport_resource.start = E55_ISA_IO_START; + ioport_resource.end = E55_ISA_IO_END; return 0; } diff --git a/include/asm-mips/vr41xx/e55.h b/include/asm-mips/vr41xx/e55.h deleted file mode 100644 index 558f2269bf37..000000000000 --- a/include/asm-mips/vr41xx/e55.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * e55.h, Include file for CASIO CASSIOPEIA E-10/15/55/65. - * - * Copyright (C) 2002-2004 Yoichi Yuasa - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __CASIO_E55_H -#define __CASIO_E55_H - -#include -#include - -/* - * Board specific address mapping - */ -#define VR41XX_ISA_MEM_BASE 0x10000000 -#define VR41XX_ISA_MEM_SIZE 0x04000000 - -/* VR41XX_ISA_IO_BASE includes offset from real base. */ -#define VR41XX_ISA_IO_BASE 0x1400c000 -#define VR41XX_ISA_IO_SIZE 0x03ff4000 - -#define ISA_BUS_IO_BASE 0 -#define ISA_BUS_IO_SIZE VR41XX_ISA_IO_SIZE - -#define IO_PORT_BASE KSEG1ADDR(VR41XX_ISA_IO_BASE) -#define IO_PORT_RESOURCE_START ISA_BUS_IO_BASE -#define IO_PORT_RESOURCE_END (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1) - -#endif /* __CASIO_E55_H */ -- cgit v1.2.3 From bddc8134db00002a9fd1b33fcb45747bdd3a2777 Mon Sep 17 00:00:00 2001 From: Yoichi Yuasa Date: Thu, 13 Jul 2006 17:33:33 +0900 Subject: [MIPS] vr41xx: Update workpad setup function Signed-off-by: Yoichi Yuasa Signed-off-by: Ralf Baechle --- arch/mips/vr41xx/ibm-workpad/setup.c | 15 ++++++++----- include/asm-mips/vr41xx/workpad.h | 43 ------------------------------------ 2 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 include/asm-mips/vr41xx/workpad.h (limited to 'include/asm-mips/vr41xx') diff --git a/arch/mips/vr41xx/ibm-workpad/setup.c b/arch/mips/vr41xx/ibm-workpad/setup.c index 50fe8af4c52c..9eef297eca1a 100644 --- a/arch/mips/vr41xx/ibm-workpad/setup.c +++ b/arch/mips/vr41xx/ibm-workpad/setup.c @@ -1,7 +1,7 @@ /* * setup.c, Setup for the IBM WorkPad z50. * - * Copyright (C) 2002-2005 Yoichi Yuasa + * Copyright (C) 2002-2006 Yoichi Yuasa * * 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 @@ -21,13 +21,18 @@ #include #include -#include + +#define WORKPAD_ISA_IO_BASE 0x15000000 +#define WORKPAD_ISA_IO_SIZE 0x03000000 +#define WORKPAD_ISA_IO_START 0 +#define WORKPAD_ISA_IO_END (WORKPAD_ISA_IO_SIZE - 1) +#define WORKPAD_IO_PORT_BASE KSEG1ADDR(WORKPAD_ISA_IO_BASE) static int __init ibm_workpad_setup(void) { - set_io_port_base(IO_PORT_BASE); - ioport_resource.start = IO_PORT_RESOURCE_START; - ioport_resource.end = IO_PORT_RESOURCE_END; + set_io_port_base(WORKPAD_IO_PORT_BASE); + ioport_resource.start = WORKPAD_ISA_IO_START; + ioport_resource.end = WORKPAD_ISA_IO_END; return 0; } diff --git a/include/asm-mips/vr41xx/workpad.h b/include/asm-mips/vr41xx/workpad.h deleted file mode 100644 index 6bfa9c009a9b..000000000000 --- a/include/asm-mips/vr41xx/workpad.h +++ /dev/null @@ -1,43 +0,0 @@ -/* - * workpad.h, Include file for IBM WorkPad z50. - * - * Copyright (C) 2002-2004 Yoichi Yuasa - * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ -#ifndef __IBM_WORKPAD_H -#define __IBM_WORKPAD_H - -#include -#include - -/* - * Board specific address mapping - */ -#define VR41XX_ISA_MEM_BASE 0x10000000 -#define VR41XX_ISA_MEM_SIZE 0x04000000 - -/* VR41XX_ISA_IO_BASE includes offset from real base. */ -#define VR41XX_ISA_IO_BASE 0x15000000 -#define VR41XX_ISA_IO_SIZE 0x03000000 - -#define ISA_BUS_IO_BASE 0 -#define ISA_BUS_IO_SIZE VR41XX_ISA_IO_SIZE - -#define IO_PORT_BASE KSEG1ADDR(VR41XX_ISA_IO_BASE) -#define IO_PORT_RESOURCE_START ISA_BUS_IO_BASE -#define IO_PORT_RESOURCE_END (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1) - -#endif /* __IBM_WORKPAD_H */ -- cgit v1.2.3