aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-mips/vr41xx
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-mips/vr41xx
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-mips/vr41xx')
-rw-r--r--include/asm-mips/vr41xx/capcella.h43
-rw-r--r--include/asm-mips/vr41xx/cmbvr4133.h61
-rw-r--r--include/asm-mips/vr41xx/e55.h43
-rw-r--r--include/asm-mips/vr41xx/mpc30x.h37
-rw-r--r--include/asm-mips/vr41xx/siu.h50
-rw-r--r--include/asm-mips/vr41xx/tb0219.h42
-rw-r--r--include/asm-mips/vr41xx/tb0226.h43
-rw-r--r--include/asm-mips/vr41xx/vr41xx.h320
-rw-r--r--include/asm-mips/vr41xx/vrc4173.h222
-rw-r--r--include/asm-mips/vr41xx/workpad.h43
10 files changed, 904 insertions, 0 deletions
diff --git a/include/asm-mips/vr41xx/capcella.h b/include/asm-mips/vr41xx/capcella.h
new file mode 100644
index 000000000000..5b55083c5281
--- /dev/null
+++ b/include/asm-mips/vr41xx/capcella.h
@@ -0,0 +1,43 @@
1/*
2 * capcella.h, Include file for ZAO Networks Capcella.
3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __ZAO_CAPCELLA_H
21#define __ZAO_CAPCELLA_H
22
23#include <asm/vr41xx/vr41xx.h>
24
25/*
26 * General-Purpose I/O Pin Number
27 */
28#define PC104PLUS_INTA_PIN 2
29#define PC104PLUS_INTB_PIN 3
30#define PC104PLUS_INTC_PIN 4
31#define PC104PLUS_INTD_PIN 5
32
33/*
34 * Interrupt Number
35 */
36#define RTL8139_1_IRQ GIU_IRQ(PC104PLUS_INTC_PIN)
37#define RTL8139_2_IRQ GIU_IRQ(PC104PLUS_INTD_PIN)
38#define PC104PLUS_INTA_IRQ GIU_IRQ(PC104PLUS_INTA_PIN)
39#define PC104PLUS_INTB_IRQ GIU_IRQ(PC104PLUS_INTB_PIN)
40#define PC104PLUS_INTC_IRQ GIU_IRQ(PC104PLUS_INTC_PIN)
41#define PC104PLUS_INTD_IRQ GIU_IRQ(PC104PLUS_INTD_PIN)
42
43#endif /* __ZAO_CAPCELLA_H */
diff --git a/include/asm-mips/vr41xx/cmbvr4133.h b/include/asm-mips/vr41xx/cmbvr4133.h
new file mode 100644
index 000000000000..42af389019ea
--- /dev/null
+++ b/include/asm-mips/vr41xx/cmbvr4133.h
@@ -0,0 +1,61 @@
1/*
2 * include/asm-mips/vr41xx/cmbvr4133.h
3 *
4 * Include file for NEC CMB-VR4133.
5 *
6 * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com> and
7 * Jun Sun <jsun@mvista.com, or source@mvista.com> and
8 * Alex Sapkov <asapkov@ru.mvista.com>
9 *
10 * 2002-2004 (c) MontaVista, Software, Inc. This file is licensed under
11 * the terms of the GNU General Public License version 2. This program
12 * is licensed "as is" without any warranty of any kind, whether express
13 * or implied.
14 */
15#ifndef __NEC_CMBVR4133_H
16#define __NEC_CMBVR4133_H
17
18#include <asm/addrspace.h>
19#include <asm/vr41xx/vr41xx.h>
20
21/*
22 * General-Purpose I/O Pin Number
23 */
24#define CMBVR41XX_INTA_PIN 1
25#define CMBVR41XX_INTB_PIN 1
26#define CMBVR41XX_INTC_PIN 3
27#define CMBVR41XX_INTD_PIN 1
28#define CMBVR41XX_INTE_PIN 1
29
30/*
31 * Interrupt Number
32 */
33#define CMBVR41XX_INTA_IRQ GIU_IRQ(CMBVR41XX_INTA_PIN)
34#define CMBVR41XX_INTB_IRQ GIU_IRQ(CMBVR41XX_INTB_PIN)
35#define CMBVR41XX_INTC_IRQ GIU_IRQ(CMBVR41XX_INTC_PIN)
36#define CMBVR41XX_INTD_IRQ GIU_IRQ(CMBVR41XX_INTD_PIN)
37#define CMBVR41XX_INTE_IRQ GIU_IRQ(CMBVR41XX_INTE_PIN)
38
39#define I8259_IRQ_BASE 72
40#define I8259_IRQ(x) (I8259_IRQ_BASE + (x))
41#define TIMER_IRQ I8259_IRQ(0)
42#define KEYBOARD_IRQ I8259_IRQ(1)
43#define I8259_SLAVE_IRQ I8259_IRQ(2)
44#define UART3_IRQ I8259_IRQ(3)
45#define UART1_IRQ I8259_IRQ(4)
46#define UART2_IRQ I8259_IRQ(5)
47#define FDC_IRQ I8259_IRQ(6)
48#define PARPORT_IRQ I8259_IRQ(7)
49#define RTC_IRQ I8259_IRQ(8)
50#define USB_IRQ I8259_IRQ(9)
51#define I8259_INTA_IRQ I8259_IRQ(10)
52#define AUDIO_IRQ I8259_IRQ(11)
53#define AUX_IRQ I8259_IRQ(12)
54#define IDE_PRIMARY_IRQ I8259_IRQ(14)
55#define IDE_SECONDARY_IRQ I8259_IRQ(15)
56#define I8259_IRQ_LAST IDE_SECONDARY_IRQ
57
58#define RTC_PORT(x) (0xaf000100 + (x))
59#define RTC_IO_EXTENT 0x140
60
61#endif /* __NEC_CMBVR4133_H */
diff --git a/include/asm-mips/vr41xx/e55.h b/include/asm-mips/vr41xx/e55.h
new file mode 100644
index 000000000000..ea37b56fc66d
--- /dev/null
+++ b/include/asm-mips/vr41xx/e55.h
@@ -0,0 +1,43 @@
1/*
2 * e55.h, Include file for CASIO CASSIOPEIA E-10/15/55/65.
3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __CASIO_E55_H
21#define __CASIO_E55_H
22
23#include <asm/addrspace.h>
24#include <asm/vr41xx/vr41xx.h>
25
26/*
27 * Board specific address mapping
28 */
29#define VR41XX_ISA_MEM_BASE 0x10000000
30#define VR41XX_ISA_MEM_SIZE 0x04000000
31
32/* VR41XX_ISA_IO_BASE includes offset from real base. */
33#define VR41XX_ISA_IO_BASE 0x1400c000
34#define VR41XX_ISA_IO_SIZE 0x03ff4000
35
36#define ISA_BUS_IO_BASE 0
37#define ISA_BUS_IO_SIZE VR41XX_ISA_IO_SIZE
38
39#define IO_PORT_BASE KSEG1ADDR(VR41XX_ISA_IO_BASE)
40#define IO_PORT_RESOURCE_START ISA_BUS_IO_BASE
41#define IO_PORT_RESOURCE_END (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1)
42
43#endif /* __CASIO_E55_H */
diff --git a/include/asm-mips/vr41xx/mpc30x.h b/include/asm-mips/vr41xx/mpc30x.h
new file mode 100644
index 000000000000..e6ac3c8e8bae
--- /dev/null
+++ b/include/asm-mips/vr41xx/mpc30x.h
@@ -0,0 +1,37 @@
1/*
2 * mpc30x.h, Include file for Victor MP-C303/304.
3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __VICTOR_MPC30X_H
21#define __VICTOR_MPC30X_H
22
23#include <asm/vr41xx/vr41xx.h>
24
25/*
26 * General-Purpose I/O Pin Number
27 */
28#define VRC4173_PIN 1
29#define MQ200_PIN 4
30
31/*
32 * Interrupt Number
33 */
34#define VRC4173_CASCADE_IRQ GIU_IRQ(VRC4173_PIN)
35#define MQ200_IRQ GIU_IRQ(MQ200_PIN)
36
37#endif /* __VICTOR_MPC30X_H */
diff --git a/include/asm-mips/vr41xx/siu.h b/include/asm-mips/vr41xx/siu.h
new file mode 100644
index 000000000000..865cc07ddd7f
--- /dev/null
+++ b/include/asm-mips/vr41xx/siu.h
@@ -0,0 +1,50 @@
1/*
2 * Include file for NEC VR4100 series Serial Interface Unit.
3 *
4 * Copyright (C) 2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __NEC_VR41XX_SIU_H
21#define __NEC_VR41XX_SIU_H
22
23typedef enum {
24 SIU_INTERFACE_RS232C,
25 SIU_INTERFACE_IRDA,
26} siu_interface_t;
27
28extern void vr41xx_select_siu_interface(siu_interface_t interface);
29
30typedef enum {
31 SIU_USE_IRDA,
32 FIR_USE_IRDA,
33} irda_use_t;
34
35extern void vr41xx_use_irda(irda_use_t use);
36
37typedef enum {
38 SHARP_IRDA,
39 TEMIC_IRDA,
40 HP_IRDA,
41} irda_module_t;
42
43typedef enum {
44 IRDA_TX_1_5MBPS,
45 IRDA_TX_4MBPS,
46} irda_speed_t;
47
48extern void vr41xx_select_irda_module(irda_module_t module, irda_speed_t speed);
49
50#endif /* __NEC_VR41XX_SIU_H */
diff --git a/include/asm-mips/vr41xx/tb0219.h b/include/asm-mips/vr41xx/tb0219.h
new file mode 100644
index 000000000000..273c6392688f
--- /dev/null
+++ b/include/asm-mips/vr41xx/tb0219.h
@@ -0,0 +1,42 @@
1/*
2 * tb0219.h, Include file for TANBAC TB0219.
3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * Modified for TANBAC TB0219:
7 * Copyright (C) 2003 Megasolution Inc. <matsu@megasolution.jp>
8 *
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */
23#ifndef __TANBAC_TB0219_H
24#define __TANBAC_TB0219_H
25
26#include <asm/vr41xx/vr41xx.h>
27
28/*
29 * General-Purpose I/O Pin Number
30 */
31#define TB0219_PCI_SLOT1_PIN 2
32#define TB0219_PCI_SLOT2_PIN 3
33#define TB0219_PCI_SLOT3_PIN 4
34
35/*
36 * Interrupt Number
37 */
38#define TB0219_PCI_SLOT1_IRQ GIU_IRQ(TB0219_PCI_SLOT1_PIN)
39#define TB0219_PCI_SLOT2_IRQ GIU_IRQ(TB0219_PCI_SLOT2_PIN)
40#define TB0219_PCI_SLOT3_IRQ GIU_IRQ(TB0219_PCI_SLOT3_PIN)
41
42#endif /* __TANBAC_TB0219_H */
diff --git a/include/asm-mips/vr41xx/tb0226.h b/include/asm-mips/vr41xx/tb0226.h
new file mode 100644
index 000000000000..0ff9a60ecacc
--- /dev/null
+++ b/include/asm-mips/vr41xx/tb0226.h
@@ -0,0 +1,43 @@
1/*
2 * tb0226.h, Include file for TANBAC TB0226.
3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __TANBAC_TB0226_H
21#define __TANBAC_TB0226_H
22
23#include <asm/vr41xx/vr41xx.h>
24
25/*
26 * General-Purpose I/O Pin Number
27 */
28#define GD82559_1_PIN 2
29#define GD82559_2_PIN 3
30#define UPD720100_INTA_PIN 4
31#define UPD720100_INTB_PIN 8
32#define UPD720100_INTC_PIN 13
33
34/*
35 * Interrupt Number
36 */
37#define GD82559_1_IRQ GIU_IRQ(GD82559_1_PIN)
38#define GD82559_2_IRQ GIU_IRQ(GD82559_2_PIN)
39#define UPD720100_INTA_IRQ GIU_IRQ(UPD720100_INTA_PIN)
40#define UPD720100_INTB_IRQ GIU_IRQ(UPD720100_INTB_PIN)
41#define UPD720100_INTC_IRQ GIU_IRQ(UPD720100_INTC_PIN)
42
43#endif /* __TANBAC_TB0226_H */
diff --git a/include/asm-mips/vr41xx/vr41xx.h b/include/asm-mips/vr41xx/vr41xx.h
new file mode 100644
index 000000000000..caacaced3213
--- /dev/null
+++ b/include/asm-mips/vr41xx/vr41xx.h
@@ -0,0 +1,320 @@
1/*
2 * include/asm-mips/vr41xx/vr41xx.h
3 *
4 * Include file for NEC VR4100 series.
5 *
6 * Copyright (C) 1999 Michael Klar
7 * Copyright (C) 2001, 2002 Paul Mundt
8 * Copyright (C) 2002 MontaVista Software, Inc.
9 * Copyright (C) 2002 TimeSys Corp.
10 * Copyright (C) 2003-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
11 *
12 * This program is free software; you can redistribute it and/or modify it
13 * under the terms of the GNU General Public License as published by the
14 * Free Software Foundation; either version 2 of the License, or (at your
15 * option) any later version.
16 */
17#ifndef __NEC_VR41XX_H
18#define __NEC_VR41XX_H
19
20#include <linux/interrupt.h>
21
22/*
23 * CPU Revision
24 */
25/* VR4122 0x00000c70-0x00000c72 */
26#define PRID_VR4122_REV1_0 0x00000c70
27#define PRID_VR4122_REV2_0 0x00000c70
28#define PRID_VR4122_REV2_1 0x00000c70
29#define PRID_VR4122_REV3_0 0x00000c71
30#define PRID_VR4122_REV3_1 0x00000c72
31
32/* VR4181A 0x00000c73-0x00000c7f */
33#define PRID_VR4181A_REV1_0 0x00000c73
34#define PRID_VR4181A_REV1_1 0x00000c74
35
36/* VR4131 0x00000c80-0x00000c83 */
37#define PRID_VR4131_REV1_2 0x00000c80
38#define PRID_VR4131_REV2_0 0x00000c81
39#define PRID_VR4131_REV2_1 0x00000c82
40#define PRID_VR4131_REV2_2 0x00000c83
41
42/* VR4133 0x00000c84- */
43#define PRID_VR4133 0x00000c84
44
45/*
46 * Bus Control Uint
47 */
48extern unsigned long vr41xx_calculate_clock_frequency(void);
49extern unsigned long vr41xx_get_vtclock_frequency(void);
50extern unsigned long vr41xx_get_tclock_frequency(void);
51
52/*
53 * Clock Mask Unit
54 */
55typedef enum {
56 PIU_CLOCK,
57 SIU_CLOCK,
58 AIU_CLOCK,
59 KIU_CLOCK,
60 FIR_CLOCK,
61 DSIU_CLOCK,
62 CSI_CLOCK,
63 PCIU_CLOCK,
64 HSP_CLOCK,
65 PCI_CLOCK,
66 CEU_CLOCK,
67 ETHER0_CLOCK,
68 ETHER1_CLOCK
69} vr41xx_clock_t;
70
71extern void vr41xx_supply_clock(vr41xx_clock_t clock);
72extern void vr41xx_mask_clock(vr41xx_clock_t clock);
73
74/*
75 * Interrupt Control Unit
76 */
77/* CPU core Interrupt Numbers */
78#define MIPS_CPU_IRQ_BASE 0
79#define MIPS_CPU_IRQ(x) (MIPS_CPU_IRQ_BASE + (x))
80#define MIPS_SOFTINT0_IRQ MIPS_CPU_IRQ(0)
81#define MIPS_SOFTINT1_IRQ MIPS_CPU_IRQ(1)
82#define INT0_CASCADE_IRQ MIPS_CPU_IRQ(2)
83#define INT1_CASCADE_IRQ MIPS_CPU_IRQ(3)
84#define INT2_CASCADE_IRQ MIPS_CPU_IRQ(4)
85#define INT3_CASCADE_IRQ MIPS_CPU_IRQ(5)
86#define INT4_CASCADE_IRQ MIPS_CPU_IRQ(6)
87#define TIMER_IRQ MIPS_CPU_IRQ(7)
88
89/* SYINT1 Interrupt Numbers */
90#define SYSINT1_IRQ_BASE 8
91#define SYSINT1_IRQ(x) (SYSINT1_IRQ_BASE + (x))
92#define BATTRY_IRQ SYSINT1_IRQ(0)
93#define POWER_IRQ SYSINT1_IRQ(1)
94#define RTCLONG1_IRQ SYSINT1_IRQ(2)
95#define ELAPSEDTIME_IRQ SYSINT1_IRQ(3)
96/* RFU */
97#define PIU_IRQ SYSINT1_IRQ(5)
98#define AIU_IRQ SYSINT1_IRQ(6)
99#define KIU_IRQ SYSINT1_IRQ(7)
100#define GIUINT_CASCADE_IRQ SYSINT1_IRQ(8)
101#define SIU_IRQ SYSINT1_IRQ(9)
102#define BUSERR_IRQ SYSINT1_IRQ(10)
103#define SOFTINT_IRQ SYSINT1_IRQ(11)
104#define CLKRUN_IRQ SYSINT1_IRQ(12)
105#define DOZEPIU_IRQ SYSINT1_IRQ(13)
106#define SYSINT1_IRQ_LAST DOZEPIU_IRQ
107
108/* SYSINT2 Interrupt Numbers */
109#define SYSINT2_IRQ_BASE 24
110#define SYSINT2_IRQ(x) (SYSINT2_IRQ_BASE + (x))
111#define RTCLONG2_IRQ SYSINT2_IRQ(0)
112#define LED_IRQ SYSINT2_IRQ(1)
113#define HSP_IRQ SYSINT2_IRQ(2)
114#define TCLOCK_IRQ SYSINT2_IRQ(3)
115#define FIR_IRQ SYSINT2_IRQ(4)
116#define CEU_IRQ SYSINT2_IRQ(4) /* same number as FIR_IRQ */
117#define DSIU_IRQ SYSINT2_IRQ(5)
118#define PCI_IRQ SYSINT2_IRQ(6)
119#define SCU_IRQ SYSINT2_IRQ(7)
120#define CSI_IRQ SYSINT2_IRQ(8)
121#define BCU_IRQ SYSINT2_IRQ(9)
122#define ETHERNET_IRQ SYSINT2_IRQ(10)
123#define SYSINT2_IRQ_LAST ETHERNET_IRQ
124
125/* GIU Interrupt Numbers */
126#define GIU_IRQ_BASE 40
127#define GIU_IRQ(x) (GIU_IRQ_BASE + (x)) /* IRQ 40-71 */
128#define GIU_IRQ_LAST GIU_IRQ(31)
129#define GIU_IRQ_TO_PIN(x) ((x) - GIU_IRQ_BASE) /* Pin 0-31 */
130
131extern int vr41xx_set_intassign(unsigned int irq, unsigned char intassign);
132extern int vr41xx_cascade_irq(unsigned int irq, int (*get_irq_number)(int irq));
133
134#define PIUINT_COMMAND 0x0040
135#define PIUINT_DATA 0x0020
136#define PIUINT_PAGE1 0x0010
137#define PIUINT_PAGE0 0x0008
138#define PIUINT_DATALOST 0x0004
139#define PIUINT_STATUSCHANGE 0x0001
140
141extern void vr41xx_enable_piuint(uint16_t mask);
142extern void vr41xx_disable_piuint(uint16_t mask);
143
144#define AIUINT_INPUT_DMAEND 0x0800
145#define AIUINT_INPUT_DMAHALT 0x0400
146#define AIUINT_INPUT_DATALOST 0x0200
147#define AIUINT_INPUT_DATA 0x0100
148#define AIUINT_OUTPUT_DMAEND 0x0008
149#define AIUINT_OUTPUT_DMAHALT 0x0004
150#define AIUINT_OUTPUT_NODATA 0x0002
151
152extern void vr41xx_enable_aiuint(uint16_t mask);
153extern void vr41xx_disable_aiuint(uint16_t mask);
154
155#define KIUINT_DATALOST 0x0004
156#define KIUINT_DATAREADY 0x0002
157#define KIUINT_SCAN 0x0001
158
159extern void vr41xx_enable_kiuint(uint16_t mask);
160extern void vr41xx_disable_kiuint(uint16_t mask);
161
162#define DSIUINT_CTS 0x0800
163#define DSIUINT_RXERR 0x0400
164#define DSIUINT_RX 0x0200
165#define DSIUINT_TX 0x0100
166#define DSIUINT_ALL 0x0f00
167
168extern void vr41xx_enable_dsiuint(uint16_t mask);
169extern void vr41xx_disable_dsiuint(uint16_t mask);
170
171#define FIRINT_UNIT 0x0010
172#define FIRINT_RX_DMAEND 0x0008
173#define FIRINT_RX_DMAHALT 0x0004
174#define FIRINT_TX_DMAEND 0x0002
175#define FIRINT_TX_DMAHALT 0x0001
176
177extern void vr41xx_enable_firint(uint16_t mask);
178extern void vr41xx_disable_firint(uint16_t mask);
179
180extern void vr41xx_enable_pciint(void);
181extern void vr41xx_disable_pciint(void);
182
183extern void vr41xx_enable_scuint(void);
184extern void vr41xx_disable_scuint(void);
185
186#define CSIINT_TX_DMAEND 0x0040
187#define CSIINT_TX_DMAHALT 0x0020
188#define CSIINT_TX_DATA 0x0010
189#define CSIINT_TX_FIFOEMPTY 0x0008
190#define CSIINT_RX_DMAEND 0x0004
191#define CSIINT_RX_DMAHALT 0x0002
192#define CSIINT_RX_FIFOEMPTY 0x0001
193
194extern void vr41xx_enable_csiint(uint16_t mask);
195extern void vr41xx_disable_csiint(uint16_t mask);
196
197extern void vr41xx_enable_bcuint(void);
198extern void vr41xx_disable_bcuint(void);
199
200/*
201 * Power Management Unit
202 */
203
204/*
205 * RTC
206 */
207extern void vr41xx_set_rtclong1_cycle(uint32_t cycles);
208extern uint32_t vr41xx_read_rtclong1_counter(void);
209
210extern void vr41xx_set_rtclong2_cycle(uint32_t cycles);
211extern uint32_t vr41xx_read_rtclong2_counter(void);
212
213extern void vr41xx_set_tclock_cycle(uint32_t cycles);
214extern uint32_t vr41xx_read_tclock_counter(void);
215
216/*
217 * General-Purpose I/O Unit
218 */
219enum {
220 TRIGGER_LEVEL,
221 TRIGGER_EDGE,
222 TRIGGER_EDGE_FALLING,
223 TRIGGER_EDGE_RISING
224};
225
226enum {
227 SIGNAL_THROUGH,
228 SIGNAL_HOLD
229};
230
231extern void vr41xx_set_irq_trigger(int pin, int trigger, int hold);
232
233enum {
234 LEVEL_LOW,
235 LEVEL_HIGH
236};
237
238extern void vr41xx_set_irq_level(int pin, int level);
239
240enum {
241 PIO_INPUT,
242 PIO_OUTPUT
243};
244
245enum {
246 DATA_LOW,
247 DATA_HIGH
248};
249
250/*
251 * PCI Control Unit
252 */
253#define PCI_MASTER_ADDRESS_MASK 0x7fffffffU
254
255struct pci_master_address_conversion {
256 uint32_t bus_base_address;
257 uint32_t address_mask;
258 uint32_t pci_base_address;
259};
260
261struct pci_target_address_conversion {
262 uint32_t address_mask;
263 uint32_t bus_base_address;
264};
265
266typedef enum {
267 CANNOT_LOCK_FROM_DEVICE,
268 CAN_LOCK_FROM_DEVICE,
269} pci_exclusive_access_t;
270
271struct pci_mailbox_address {
272 uint32_t base_address;
273};
274
275struct pci_target_address_window {
276 uint32_t base_address;
277};
278
279typedef enum {
280 PCI_ARBITRATION_MODE_FAIR,
281 PCI_ARBITRATION_MODE_ALTERNATE_0,
282 PCI_ARBITRATION_MODE_ALTERNATE_B,
283} pci_arbiter_priority_control_t;
284
285typedef enum {
286 PCI_TAKE_AWAY_GNT_DISABLE,
287 PCI_TAKE_AWAY_GNT_ENABLE,
288} pci_take_away_gnt_mode_t;
289
290struct pci_controller_unit_setup {
291 struct pci_master_address_conversion *master_memory1;
292 struct pci_master_address_conversion *master_memory2;
293
294 struct pci_target_address_conversion *target_memory1;
295 struct pci_target_address_conversion *target_memory2;
296
297 struct pci_master_address_conversion *master_io;
298
299 pci_exclusive_access_t exclusive_access;
300
301 uint32_t pci_clock_max;
302 uint8_t wait_time_limit_from_irdy_to_trdy; /* Only VR4122 is supported */
303
304 struct pci_mailbox_address *mailbox;
305 struct pci_target_address_window *target_window1;
306 struct pci_target_address_window *target_window2;
307
308 uint8_t master_latency_timer;
309 uint8_t retry_limit;
310
311 pci_arbiter_priority_control_t arbiter_priority_control;
312 pci_take_away_gnt_mode_t take_away_gnt_mode;
313
314 struct resource *mem_resource;
315 struct resource *io_resource;
316};
317
318extern void vr41xx_pciu_setup(struct pci_controller_unit_setup *setup);
319
320#endif /* __NEC_VR41XX_H */
diff --git a/include/asm-mips/vr41xx/vrc4173.h b/include/asm-mips/vr41xx/vrc4173.h
new file mode 100644
index 000000000000..58e193c51b45
--- /dev/null
+++ b/include/asm-mips/vr41xx/vrc4173.h
@@ -0,0 +1,222 @@
1/*
2 * vrc4173.h, Include file for NEC VRC4173.
3 *
4 * Copyright (C) 2000 Michael R. McDonald
5 * Copyright (C) 2001-2003 Montavista Software Inc.
6 * Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
7 * Copyright (C) 2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
8 * Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 */
24#ifndef __NEC_VRC4173_H
25#define __NEC_VRC4173_H
26
27#include <linux/config.h>
28#include <asm/io.h>
29
30/*
31 * Interrupt Number
32 */
33#define VRC4173_IRQ_BASE 72
34#define VRC4173_IRQ(x) (VRC4173_IRQ_BASE + (x))
35#define VRC4173_USB_IRQ VRC4173_IRQ(0)
36#define VRC4173_PCMCIA2_IRQ VRC4173_IRQ(1)
37#define VRC4173_PCMCIA1_IRQ VRC4173_IRQ(2)
38#define VRC4173_PS2CH2_IRQ VRC4173_IRQ(3)
39#define VRC4173_PS2CH1_IRQ VRC4173_IRQ(4)
40#define VRC4173_PIU_IRQ VRC4173_IRQ(5)
41#define VRC4173_AIU_IRQ VRC4173_IRQ(6)
42#define VRC4173_KIU_IRQ VRC4173_IRQ(7)
43#define VRC4173_GIU_IRQ VRC4173_IRQ(8)
44#define VRC4173_AC97_IRQ VRC4173_IRQ(9)
45#define VRC4173_AC97INT1_IRQ VRC4173_IRQ(10)
46/* RFU */
47#define VRC4173_DOZEPIU_IRQ VRC4173_IRQ(13)
48#define VRC4173_IRQ_LAST VRC4173_DOZEPIU_IRQ
49
50/*
51 * PCI I/O accesses
52 */
53#ifdef CONFIG_VRC4173
54
55extern unsigned long vrc4173_io_offset;
56
57#define set_vrc4173_io_offset(offset) do { vrc4173_io_offset = (offset); } while (0)
58
59#define vrc4173_outb(val,port) outb((val), vrc4173_io_offset+(port))
60#define vrc4173_outw(val,port) outw((val), vrc4173_io_offset+(port))
61#define vrc4173_outl(val,port) outl((val), vrc4173_io_offset+(port))
62#define vrc4173_outb_p(val,port) outb_p((val), vrc4173_io_offset+(port))
63#define vrc4173_outw_p(val,port) outw_p((val), vrc4173_io_offset+(port))
64#define vrc4173_outl_p(val,port) outl_p((val), vrc4173_io_offset+(port))
65
66#define vrc4173_inb(port) inb(vrc4173_io_offset+(port))
67#define vrc4173_inw(port) inw(vrc4173_io_offset+(port))
68#define vrc4173_inl(port) inl(vrc4173_io_offset+(port))
69#define vrc4173_inb_p(port) inb_p(vrc4173_io_offset+(port))
70#define vrc4173_inw_p(port) inw_p(vrc4173_io_offset+(port))
71#define vrc4173_inl_p(port) inl_p(vrc4173_io_offset+(port))
72
73#define vrc4173_outsb(port,addr,count) outsb(vrc4173_io_offset+(port),(addr),(count))
74#define vrc4173_outsw(port,addr,count) outsw(vrc4173_io_offset+(port),(addr),(count))
75#define vrc4173_outsl(port,addr,count) outsl(vrc4173_io_offset+(port),(addr),(count))
76
77#define vrc4173_insb(port,addr,count) insb(vrc4173_io_offset+(port),(addr),(count))
78#define vrc4173_insw(port,addr,count) insw(vrc4173_io_offset+(port),(addr),(count))
79#define vrc4173_insl(port,addr,count) insl(vrc4173_io_offset+(port),(addr),(count))
80
81#else
82
83#define set_vrc4173_io_offset(offset) do {} while (0)
84
85#define vrc4173_outb(val,port) do {} while (0)
86#define vrc4173_outw(val,port) do {} while (0)
87#define vrc4173_outl(val,port) do {} while (0)
88#define vrc4173_outb_p(val,port) do {} while (0)
89#define vrc4173_outw_p(val,port) do {} while (0)
90#define vrc4173_outl_p(val,port) do {} while (0)
91
92#define vrc4173_inb(port) 0
93#define vrc4173_inw(port) 0
94#define vrc4173_inl(port) 0
95#define vrc4173_inb_p(port) 0
96#define vrc4173_inw_p(port) 0
97#define vrc4173_inl_p(port) 0
98
99#define vrc4173_outsb(port,addr,count) do {} while (0)
100#define vrc4173_outsw(port,addr,count) do {} while (0)
101#define vrc4173_outsl(port,addr,count) do {} while (0)
102
103#define vrc4173_insb(port,addr,count) do {} while (0)
104#define vrc4173_insw(port,addr,count) do {} while (0)
105#define vrc4173_insl(port,addr,count) do {} while (0)
106
107#endif
108
109/*
110 * Clock Mask Unit
111 */
112typedef enum vrc4173_clock {
113 VRC4173_PIU_CLOCK,
114 VRC4173_KIU_CLOCK,
115 VRC4173_AIU_CLOCK,
116 VRC4173_PS2_CH1_CLOCK,
117 VRC4173_PS2_CH2_CLOCK,
118 VRC4173_USBU_PCI_CLOCK,
119 VRC4173_CARDU1_PCI_CLOCK,
120 VRC4173_CARDU2_PCI_CLOCK,
121 VRC4173_AC97U_PCI_CLOCK,
122 VRC4173_USBU_48MHz_CLOCK,
123 VRC4173_EXT_48MHz_CLOCK,
124 VRC4173_48MHz_CLOCK,
125} vrc4173_clock_t;
126
127#ifdef CONFIG_VRC4173
128
129extern void vrc4173_supply_clock(vrc4173_clock_t clock);
130extern void vrc4173_mask_clock(vrc4173_clock_t clock);
131
132#else
133
134static inline void vrc4173_supply_clock(vrc4173_clock_t clock) {}
135static inline void vrc4173_mask_clock(vrc4173_clock_t clock) {}
136
137#endif
138
139/*
140 * Interupt Control Unit
141 */
142
143#define VRC4173_PIUINT_COMMAND 0x0040
144#define VRC4173_PIUINT_DATA 0x0020
145#define VRC4173_PIUINT_PAGE1 0x0010
146#define VRC4173_PIUINT_PAGE0 0x0008
147#define VRC4173_PIUINT_DATALOST 0x0004
148#define VRC4173_PIUINT_STATUSCHANGE 0x0001
149
150#ifdef CONFIG_VRC4173
151
152extern void vrc4173_enable_piuint(uint16_t mask);
153extern void vrc4173_disable_piuint(uint16_t mask);
154
155#else
156
157static inline void vrc4173_enable_piuint(uint16_t mask) {}
158static inline void vrc4173_disable_piuint(uint16_t mask) {}
159
160#endif
161
162#define VRC4173_AIUINT_INPUT_DMAEND 0x0800
163#define VRC4173_AIUINT_INPUT_DMAHALT 0x0400
164#define VRC4173_AIUINT_INPUT_DATALOST 0x0200
165#define VRC4173_AIUINT_INPUT_DATA 0x0100
166#define VRC4173_AIUINT_OUTPUT_DMAEND 0x0008
167#define VRC4173_AIUINT_OUTPUT_DMAHALT 0x0004
168#define VRC4173_AIUINT_OUTPUT_NODATA 0x0002
169
170#ifdef CONFIG_VRC4173
171
172extern void vrc4173_enable_aiuint(uint16_t mask);
173extern void vrc4173_disable_aiuint(uint16_t mask);
174
175#else
176
177static inline void vrc4173_enable_aiuint(uint16_t mask) {}
178static inline void vrc4173_disable_aiuint(uint16_t mask) {}
179
180#endif
181
182#define VRC4173_KIUINT_DATALOST 0x0004
183#define VRC4173_KIUINT_DATAREADY 0x0002
184#define VRC4173_KIUINT_SCAN 0x0001
185
186#ifdef CONFIG_VRC4173
187
188extern void vrc4173_enable_kiuint(uint16_t mask);
189extern void vrc4173_disable_kiuint(uint16_t mask);
190
191#else
192
193static inline void vrc4173_enable_kiuint(uint16_t mask) {}
194static inline void vrc4173_disable_kiuint(uint16_t mask) {}
195
196#endif
197
198/*
199 * General-Purpose I/O Unit
200 */
201typedef enum vrc4173_function {
202 PS2_CHANNEL1,
203 PS2_CHANNEL2,
204 TOUCHPANEL,
205 KEYBOARD_8SCANLINES,
206 KEYBOARD_10SCANLINES,
207 KEYBOARD_12SCANLINES,
208 GPIO_0_15PINS,
209 GPIO_16_20PINS,
210} vrc4173_function_t;
211
212#ifdef CONFIG_VRC4173
213
214extern void vrc4173_select_function(vrc4173_function_t function);
215
216#else
217
218static inline void vrc4173_select_function(vrc4173_function_t function) {}
219
220#endif
221
222#endif /* __NEC_VRC4173_H */
diff --git a/include/asm-mips/vr41xx/workpad.h b/include/asm-mips/vr41xx/workpad.h
new file mode 100644
index 000000000000..dfe01b43fb79
--- /dev/null
+++ b/include/asm-mips/vr41xx/workpad.h
@@ -0,0 +1,43 @@
1/*
2 * workpad.h, Include file for IBM WorkPad z50.
3 *
4 * Copyright (C) 2002-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20#ifndef __IBM_WORKPAD_H
21#define __IBM_WORKPAD_H
22
23#include <asm/addrspace.h>
24#include <asm/vr41xx/vr41xx.h>
25
26/*
27 * Board specific address mapping
28 */
29#define VR41XX_ISA_MEM_BASE 0x10000000
30#define VR41XX_ISA_MEM_SIZE 0x04000000
31
32/* VR41XX_ISA_IO_BASE includes offset from real base. */
33#define VR41XX_ISA_IO_BASE 0x15000000
34#define VR41XX_ISA_IO_SIZE 0x03000000
35
36#define ISA_BUS_IO_BASE 0
37#define ISA_BUS_IO_SIZE VR41XX_ISA_IO_SIZE
38
39#define IO_PORT_BASE KSEG1ADDR(VR41XX_ISA_IO_BASE)
40#define IO_PORT_RESOURCE_START ISA_BUS_IO_BASE
41#define IO_PORT_RESOURCE_END (ISA_BUS_IO_BASE + ISA_BUS_IO_SIZE - 1)
42
43#endif /* __IBM_WORKPAD_H */