3 * Alchemy Semi Au1000 pcmcia driver include file
5 * Copyright 2001 MontaVista Software Inc.
6 * Author: MontaVista Software, Inc.
7 * ppopov@mvista.com or source@mvista.com
9 * ########################################################################
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.
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
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.
24 * ########################################################################
28 #ifndef __ASM_AU1000_PCMCIA_H
29 #define __ASM_AU1000_PCMCIA_H
32 #define AU1000_PCMCIA_POLL_PERIOD (2*HZ)
33 #define AU1000_PCMCIA_IO_SPEED (255)
34 #define AU1000_PCMCIA_MEM_SPEED (300)
36 #define AU1X_SOCK0_IO 0xF00000000
37 #define AU1X_SOCK0_PHYS_ATTR 0xF40000000
38 #define AU1X_SOCK0_PHYS_MEM 0xF80000000
40 /* pcmcia socket 1 needs external glue logic so the memory map
41 * differs from board to board.
43 #if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_PB1500)
44 #define AU1X_SOCK1_IO 0xF08000000
45 #define AU1X_SOCK1_PHYS_ATTR 0xF48000000
46 #define AU1X_SOCK1_PHYS_MEM 0xF88000000
47 #elif defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1100) || defined(CONFIG_MIPS_DB1500) || defined(CONFIG_MIPS_PB1550) || defined(CONFIG_MIPS_DB1550)
48 #define AU1X_SOCK1_IO 0xF04000000
49 #define AU1X_SOCK1_PHYS_ATTR 0xF44000000
50 #define AU1X_SOCK1_PHYS_MEM 0xF84000000
63 struct pcmcia_configure {
72 struct pcmcia_irq_info {
78 struct au1000_pcmcia_socket {
79 socket_state_t cs_state;
80 struct pcmcia_state k_state;
82 void (*handler)(void *, unsigned int);
84 pccard_io_map io_map[MAX_IO_WIN];
85 pccard_mem_map mem_map[MAX_WIN];
87 ioaddr_t phys_attr, phys_mem;
88 unsigned short speed_io, speed_attr, speed_mem;
92 void (*handler)(int irq, void *dev, struct pt_regs *regs);
95 struct pcmcia_low_level {
96 int (*init)(struct pcmcia_init *);
97 int (*shutdown)(void);
98 int (*socket_state)(unsigned sock, struct pcmcia_state *);
99 int (*get_irq_info)(struct pcmcia_irq_info *);
100 int (*configure_socket)(const struct pcmcia_configure *);
103 extern struct pcmcia_low_level au1x00_pcmcia_ops;
104 #endif /* __ASM_AU1000_PCMCIA_H */