Path: blob/master/arch/m68k/include/asm/amipcmcia.h
10820 views
/*1** asm-m68k/pcmcia.h -- Amiga Linux PCMCIA Definitions2**3** Copyright 1997 by Alain Malek4**5** This file is subject to the terms and conditions of the GNU General Public6** License. See the file COPYING in the main directory of this archive7** for more details.8**9** Created: 12/10/97 by Alain Malek10*/1112#ifndef __AMIGA_PCMCIA_H__13#define __AMIGA_PCMCIA_H__1415#include <asm/amigayle.h>1617/* prototypes */1819void pcmcia_reset(void);20int pcmcia_copy_tuple(unsigned char tuple_id, void *tuple, int max_len);21void pcmcia_program_voltage(int voltage);22void pcmcia_access_speed(int speed);23void pcmcia_write_enable(void);24void pcmcia_write_disable(void);2526static inline u_char pcmcia_read_status(void)27{28return (gayle.cardstatus & 0x7c);29}3031static inline u_char pcmcia_get_intreq(void)32{33return (gayle.intreq);34}3536static inline void pcmcia_ack_int(u_char intreq)37{38gayle.intreq = 0xf8;39}4041static inline void pcmcia_enable_irq(void)42{43gayle.inten |= GAYLE_IRQ_IRQ;44}4546static inline void pcmcia_disable_irq(void)47{48gayle.inten &= ~GAYLE_IRQ_IRQ;49}5051#define PCMCIA_INSERTED (gayle.cardstatus & GAYLE_CS_CCDET)5253/* valid voltages for pcmcia_ProgramVoltage */5455#define PCMCIA_0V 056#define PCMCIA_5V 557#define PCMCIA_12V 125859/* valid speeds for pcmcia_AccessSpeed */6061#define PCMCIA_SPEED_100NS 10062#define PCMCIA_SPEED_150NS 15063#define PCMCIA_SPEED_250NS 25064#define PCMCIA_SPEED_720NS 7206566/* PCMCIA Tuple codes */6768#define CISTPL_NULL 0x0069#define CISTPL_DEVICE 0x0170#define CISTPL_LONGLINK_CB 0x0271#define CISTPL_CONFIG_CB 0x0472#define CISTPL_CFTABLE_ENTRY_CB 0x0573#define CISTPL_LONGLINK_MFC 0x0674#define CISTPL_BAR 0x0775#define CISTPL_CHECKSUM 0x1076#define CISTPL_LONGLINK_A 0x1177#define CISTPL_LONGLINK_C 0x1278#define CISTPL_LINKTARGET 0x1379#define CISTPL_NO_LINK 0x1480#define CISTPL_VERS_1 0x1581#define CISTPL_ALTSTR 0x1682#define CISTPL_DEVICE_A 0x1783#define CISTPL_JEDEC_C 0x1884#define CISTPL_JEDEC_A 0x1985#define CISTPL_CONFIG 0x1a86#define CISTPL_CFTABLE_ENTRY 0x1b87#define CISTPL_DEVICE_OC 0x1c88#define CISTPL_DEVICE_OA 0x1d89#define CISTPL_DEVICE_GEO 0x1e90#define CISTPL_DEVICE_GEO_A 0x1f91#define CISTPL_MANFID 0x2092#define CISTPL_FUNCID 0x2193#define CISTPL_FUNCE 0x2294#define CISTPL_SWIL 0x2395#define CISTPL_END 0xff9697/* FUNCID */9899#define CISTPL_FUNCID_MULTI 0x00100#define CISTPL_FUNCID_MEMORY 0x01101#define CISTPL_FUNCID_SERIAL 0x02102#define CISTPL_FUNCID_PARALLEL 0x03103#define CISTPL_FUNCID_FIXED 0x04104#define CISTPL_FUNCID_VIDEO 0x05105#define CISTPL_FUNCID_NETWORK 0x06106#define CISTPL_FUNCID_AIMS 0x07107#define CISTPL_FUNCID_SCSI 0x08108109#endif110111112