162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * cisreg.h 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * The initial developer of the original code is David A. Hinds 662306a36Sopenharmony_ci * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds 762306a36Sopenharmony_ci * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. 862306a36Sopenharmony_ci * 962306a36Sopenharmony_ci * (C) 1999 David A. Hinds 1062306a36Sopenharmony_ci */ 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_ci#ifndef _LINUX_CISREG_H 1362306a36Sopenharmony_ci#define _LINUX_CISREG_H 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci/* 1662306a36Sopenharmony_ci * Offsets from ConfigBase for CIS registers 1762306a36Sopenharmony_ci */ 1862306a36Sopenharmony_ci#define CISREG_COR 0x00 1962306a36Sopenharmony_ci#define CISREG_CCSR 0x02 2062306a36Sopenharmony_ci#define CISREG_PRR 0x04 2162306a36Sopenharmony_ci#define CISREG_SCR 0x06 2262306a36Sopenharmony_ci#define CISREG_ESR 0x08 2362306a36Sopenharmony_ci#define CISREG_IOBASE_0 0x0a 2462306a36Sopenharmony_ci#define CISREG_IOBASE_1 0x0c 2562306a36Sopenharmony_ci#define CISREG_IOBASE_2 0x0e 2662306a36Sopenharmony_ci#define CISREG_IOBASE_3 0x10 2762306a36Sopenharmony_ci#define CISREG_IOSIZE 0x12 2862306a36Sopenharmony_ci 2962306a36Sopenharmony_ci/* 3062306a36Sopenharmony_ci * Configuration Option Register 3162306a36Sopenharmony_ci */ 3262306a36Sopenharmony_ci#define COR_CONFIG_MASK 0x3f 3362306a36Sopenharmony_ci#define COR_MFC_CONFIG_MASK 0x38 3462306a36Sopenharmony_ci#define COR_FUNC_ENA 0x01 3562306a36Sopenharmony_ci#define COR_ADDR_DECODE 0x02 3662306a36Sopenharmony_ci#define COR_IREQ_ENA 0x04 3762306a36Sopenharmony_ci#define COR_LEVEL_REQ 0x40 3862306a36Sopenharmony_ci#define COR_SOFT_RESET 0x80 3962306a36Sopenharmony_ci 4062306a36Sopenharmony_ci/* 4162306a36Sopenharmony_ci * Card Configuration and Status Register 4262306a36Sopenharmony_ci */ 4362306a36Sopenharmony_ci#define CCSR_INTR_ACK 0x01 4462306a36Sopenharmony_ci#define CCSR_INTR_PENDING 0x02 4562306a36Sopenharmony_ci#define CCSR_POWER_DOWN 0x04 4662306a36Sopenharmony_ci#define CCSR_AUDIO_ENA 0x08 4762306a36Sopenharmony_ci#define CCSR_IOIS8 0x20 4862306a36Sopenharmony_ci#define CCSR_SIGCHG_ENA 0x40 4962306a36Sopenharmony_ci#define CCSR_CHANGED 0x80 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci/* 5262306a36Sopenharmony_ci * Pin Replacement Register 5362306a36Sopenharmony_ci */ 5462306a36Sopenharmony_ci#define PRR_WP_STATUS 0x01 5562306a36Sopenharmony_ci#define PRR_READY_STATUS 0x02 5662306a36Sopenharmony_ci#define PRR_BVD2_STATUS 0x04 5762306a36Sopenharmony_ci#define PRR_BVD1_STATUS 0x08 5862306a36Sopenharmony_ci#define PRR_WP_EVENT 0x10 5962306a36Sopenharmony_ci#define PRR_READY_EVENT 0x20 6062306a36Sopenharmony_ci#define PRR_BVD2_EVENT 0x40 6162306a36Sopenharmony_ci#define PRR_BVD1_EVENT 0x80 6262306a36Sopenharmony_ci 6362306a36Sopenharmony_ci/* 6462306a36Sopenharmony_ci * Socket and Copy Register 6562306a36Sopenharmony_ci */ 6662306a36Sopenharmony_ci#define SCR_SOCKET_NUM 0x0f 6762306a36Sopenharmony_ci#define SCR_COPY_NUM 0x70 6862306a36Sopenharmony_ci 6962306a36Sopenharmony_ci/* 7062306a36Sopenharmony_ci * Extended Status Register 7162306a36Sopenharmony_ci */ 7262306a36Sopenharmony_ci#define ESR_REQ_ATTN_ENA 0x01 7362306a36Sopenharmony_ci#define ESR_REQ_ATTN 0x10 7462306a36Sopenharmony_ci 7562306a36Sopenharmony_ci/* 7662306a36Sopenharmony_ci * CardBus Function Status Registers 7762306a36Sopenharmony_ci */ 7862306a36Sopenharmony_ci#define CBFN_EVENT 0x00 7962306a36Sopenharmony_ci#define CBFN_MASK 0x04 8062306a36Sopenharmony_ci#define CBFN_STATE 0x08 8162306a36Sopenharmony_ci#define CBFN_FORCE 0x0c 8262306a36Sopenharmony_ci 8362306a36Sopenharmony_ci/* 8462306a36Sopenharmony_ci * These apply to all the CardBus function registers 8562306a36Sopenharmony_ci */ 8662306a36Sopenharmony_ci#define CBFN_WP 0x0001 8762306a36Sopenharmony_ci#define CBFN_READY 0x0002 8862306a36Sopenharmony_ci#define CBFN_BVD2 0x0004 8962306a36Sopenharmony_ci#define CBFN_BVD1 0x0008 9062306a36Sopenharmony_ci#define CBFN_GWAKE 0x0010 9162306a36Sopenharmony_ci#define CBFN_INTR 0x8000 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ci/* 9462306a36Sopenharmony_ci * Extra bits in the Function Event Mask Register 9562306a36Sopenharmony_ci */ 9662306a36Sopenharmony_ci#define FEMR_BAM_ENA 0x0020 9762306a36Sopenharmony_ci#define FEMR_PWM_ENA 0x0040 9862306a36Sopenharmony_ci#define FEMR_WKUP_MASK 0x4000 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci/* 10162306a36Sopenharmony_ci * Indirect Addressing Registers for Zoomed Video: these are addresses 10262306a36Sopenharmony_ci * in common memory space 10362306a36Sopenharmony_ci */ 10462306a36Sopenharmony_ci#define CISREG_ICTRL0 0x02 /* control registers */ 10562306a36Sopenharmony_ci#define CISREG_ICTRL1 0x03 10662306a36Sopenharmony_ci#define CISREG_IADDR0 0x04 /* address registers */ 10762306a36Sopenharmony_ci#define CISREG_IADDR1 0x05 10862306a36Sopenharmony_ci#define CISREG_IADDR2 0x06 10962306a36Sopenharmony_ci#define CISREG_IADDR3 0x07 11062306a36Sopenharmony_ci#define CISREG_IDATA0 0x08 /* data registers */ 11162306a36Sopenharmony_ci#define CISREG_IDATA1 0x09 11262306a36Sopenharmony_ci 11362306a36Sopenharmony_ci#define ICTRL0_COMMON 0x01 11462306a36Sopenharmony_ci#define ICTRL0_AUTOINC 0x02 11562306a36Sopenharmony_ci#define ICTRL0_BYTEGRAN 0x04 11662306a36Sopenharmony_ci 11762306a36Sopenharmony_ci#endif /* _LINUX_CISREG_H */ 118