make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / include / asm-mips / au1000_pcmcia.h
1 /*
2  *
3  * Alchemy Semi Au1000 pcmcia driver include file
4  *
5  * Copyright 2001 MontaVista Software Inc.
6  * Author: MontaVista Software, Inc.
7  *              ppopov@mvista.com or source@mvista.com
8  *
9  * ########################################################################
10  *
11  *  This program is free software; you can distribute it and/or modify it
12  *  under the terms of the GNU General Public License (Version 2) as
13  *  published by the Free Software Foundation.
14  *
15  *  This program is distributed in the hope it will be useful, but WITHOUT
16  *  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
17  *  FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
18  *  for more details.
19  *
20  *  You should have received a copy of the GNU General Public License along
21  *  with this program; if not, write to the Free Software Foundation, Inc.,
22  *  59 Temple Place - Suite 330, Boston MA 02111-1307, USA.
23  *
24  * ########################################################################
25  *
26  *
27  */
28 #ifndef __ASM_AU1000_PCMCIA_H
29 #define __ASM_AU1000_PCMCIA_H
30
31
32 #define AU1000_PCMCIA_POLL_PERIOD    (2*HZ)
33 #define AU1000_PCMCIA_IO_SPEED       (255)
34 #define AU1000_PCMCIA_MEM_SPEED      (300)
35
36
37 struct pcmcia_state {
38   unsigned detect: 1,
39             ready: 1,
40            wrprot: 1,
41              bvd1: 1,
42              bvd2: 1,
43             vs_3v: 1,
44             vs_Xv: 1;
45 };
46
47
48 struct pcmcia_configure {
49   unsigned sock: 8,
50             vcc: 8,
51             vpp: 8,
52          output: 1,
53         speaker: 1,
54           reset: 1;
55 };
56
57 struct pcmcia_irq_info {
58         unsigned int sock;
59         unsigned int irq;
60 };
61
62 typedef u_int memaddr_t;        /* fix me */
63
64 struct au1000_pcmcia_socket {
65         socket_state_t        cs_state;
66         struct pcmcia_state   k_state;
67         unsigned int          irq;
68         void                  (*handler)(void *, unsigned int);
69         void                  *handler_info;
70         pccard_io_map         io_map[MAX_IO_WIN];
71         pccard_mem_map        mem_map[MAX_WIN];
72         u32                   virt_io;
73         memaddr_t             phys_attr, phys_mem;      /*FIX ME*/
74         unsigned short        speed_io, speed_attr, speed_mem;
75 };
76
77 struct pcmcia_init {
78         void (*handler)(int irq, void *dev, struct pt_regs *regs);
79 };
80
81 struct pcmcia_low_level {
82         int (*init)(struct pcmcia_init *);
83         int (*shutdown)(void);
84         int (*socket_state)(unsigned sock, struct pcmcia_state *);
85         int (*get_irq_info)(struct pcmcia_irq_info *);
86         int (*configure_socket)(const struct pcmcia_configure *);
87 };
88
89 #if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500)
90 extern struct pcmcia_low_level pb1x00_pcmcia_ops;
91 #else
92 error unknown Au1000 board
93 #endif
94
95 #endif /* __ASM_AU1000_PCMCIA_H */