18c2ecf20Sopenharmony_ci/* 28c2ecf20Sopenharmony_ci * cirrus.h 1.4 1999/10/25 20:03:34 38c2ecf20Sopenharmony_ci * 48c2ecf20Sopenharmony_ci * The contents of this file are subject to the Mozilla Public License 58c2ecf20Sopenharmony_ci * Version 1.1 (the "License"); you may not use this file except in 68c2ecf20Sopenharmony_ci * compliance with the License. You may obtain a copy of the License 78c2ecf20Sopenharmony_ci * at http://www.mozilla.org/MPL/ 88c2ecf20Sopenharmony_ci * 98c2ecf20Sopenharmony_ci * Software distributed under the License is distributed on an "AS IS" 108c2ecf20Sopenharmony_ci * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 118c2ecf20Sopenharmony_ci * the License for the specific language governing rights and 128c2ecf20Sopenharmony_ci * limitations under the License. 138c2ecf20Sopenharmony_ci * 148c2ecf20Sopenharmony_ci * The initial developer of the original code is David A. Hinds 158c2ecf20Sopenharmony_ci * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds 168c2ecf20Sopenharmony_ci * are Copyright (C) 1999 David A. Hinds. All Rights Reserved. 178c2ecf20Sopenharmony_ci * 188c2ecf20Sopenharmony_ci * Alternatively, the contents of this file may be used under the 198c2ecf20Sopenharmony_ci * terms of the GNU General Public License version 2 (the "GPL"), in which 208c2ecf20Sopenharmony_ci * case the provisions of the GPL are applicable instead of the 218c2ecf20Sopenharmony_ci * above. If you wish to allow the use of your version of this file 228c2ecf20Sopenharmony_ci * only under the terms of the GPL and not to allow others to use 238c2ecf20Sopenharmony_ci * your version of this file under the MPL, indicate your decision by 248c2ecf20Sopenharmony_ci * deleting the provisions above and replace them with the notice and 258c2ecf20Sopenharmony_ci * other provisions required by the GPL. If you do not delete the 268c2ecf20Sopenharmony_ci * provisions above, a recipient may use your version of this file 278c2ecf20Sopenharmony_ci * under either the MPL or the GPL. 288c2ecf20Sopenharmony_ci */ 298c2ecf20Sopenharmony_ci 308c2ecf20Sopenharmony_ci#ifndef _LINUX_CIRRUS_H 318c2ecf20Sopenharmony_ci#define _LINUX_CIRRUS_H 328c2ecf20Sopenharmony_ci 338c2ecf20Sopenharmony_ci#define PD67_MISC_CTL_1 0x16 /* Misc control 1 */ 348c2ecf20Sopenharmony_ci#define PD67_FIFO_CTL 0x17 /* FIFO control */ 358c2ecf20Sopenharmony_ci#define PD67_MISC_CTL_2 0x1E /* Misc control 2 */ 368c2ecf20Sopenharmony_ci#define PD67_CHIP_INFO 0x1f /* Chip information */ 378c2ecf20Sopenharmony_ci#define PD67_ATA_CTL 0x026 /* 6730: ATA control */ 388c2ecf20Sopenharmony_ci#define PD67_EXT_INDEX 0x2e /* Extension index */ 398c2ecf20Sopenharmony_ci#define PD67_EXT_DATA 0x2f /* Extension data */ 408c2ecf20Sopenharmony_ci 418c2ecf20Sopenharmony_ci/* PD6722 extension registers -- indexed in PD67_EXT_INDEX */ 428c2ecf20Sopenharmony_ci#define PD67_DATA_MASK0 0x01 /* Data mask 0 */ 438c2ecf20Sopenharmony_ci#define PD67_DATA_MASK1 0x02 /* Data mask 1 */ 448c2ecf20Sopenharmony_ci#define PD67_DMA_CTL 0x03 /* DMA control */ 458c2ecf20Sopenharmony_ci 468c2ecf20Sopenharmony_ci/* PD6730 extension registers -- indexed in PD67_EXT_INDEX */ 478c2ecf20Sopenharmony_ci#define PD67_EXT_CTL_1 0x03 /* Extension control 1 */ 488c2ecf20Sopenharmony_ci#define PD67_MEM_PAGE(n) ((n)+5) /* PCI window bits 31:24 */ 498c2ecf20Sopenharmony_ci#define PD67_EXTERN_DATA 0x0a 508c2ecf20Sopenharmony_ci#define PD67_MISC_CTL_3 0x25 518c2ecf20Sopenharmony_ci#define PD67_SMB_PWR_CTL 0x26 528c2ecf20Sopenharmony_ci 538c2ecf20Sopenharmony_ci/* I/O window address offset */ 548c2ecf20Sopenharmony_ci#define PD67_IO_OFF(w) (0x36+((w)<<1)) 558c2ecf20Sopenharmony_ci 568c2ecf20Sopenharmony_ci/* Timing register sets */ 578c2ecf20Sopenharmony_ci#define PD67_TIME_SETUP(n) (0x3a + 3*(n)) 588c2ecf20Sopenharmony_ci#define PD67_TIME_CMD(n) (0x3b + 3*(n)) 598c2ecf20Sopenharmony_ci#define PD67_TIME_RECOV(n) (0x3c + 3*(n)) 608c2ecf20Sopenharmony_ci 618c2ecf20Sopenharmony_ci/* Flags for PD67_MISC_CTL_1 */ 628c2ecf20Sopenharmony_ci#define PD67_MC1_5V_DET 0x01 /* 5v detect */ 638c2ecf20Sopenharmony_ci#define PD67_MC1_MEDIA_ENA 0x01 /* 6730: Multimedia enable */ 648c2ecf20Sopenharmony_ci#define PD67_MC1_VCC_3V 0x02 /* 3.3v Vcc */ 658c2ecf20Sopenharmony_ci#define PD67_MC1_PULSE_MGMT 0x04 668c2ecf20Sopenharmony_ci#define PD67_MC1_PULSE_IRQ 0x08 678c2ecf20Sopenharmony_ci#define PD67_MC1_SPKR_ENA 0x10 688c2ecf20Sopenharmony_ci#define PD67_MC1_INPACK_ENA 0x80 698c2ecf20Sopenharmony_ci 708c2ecf20Sopenharmony_ci/* Flags for PD67_FIFO_CTL */ 718c2ecf20Sopenharmony_ci#define PD67_FIFO_EMPTY 0x80 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ci/* Flags for PD67_MISC_CTL_2 */ 748c2ecf20Sopenharmony_ci#define PD67_MC2_FREQ_BYPASS 0x01 758c2ecf20Sopenharmony_ci#define PD67_MC2_DYNAMIC_MODE 0x02 768c2ecf20Sopenharmony_ci#define PD67_MC2_SUSPEND 0x04 778c2ecf20Sopenharmony_ci#define PD67_MC2_5V_CORE 0x08 788c2ecf20Sopenharmony_ci#define PD67_MC2_LED_ENA 0x10 /* IRQ 12 is LED enable */ 798c2ecf20Sopenharmony_ci#define PD67_MC2_FAST_PCI 0x10 /* 6729: PCI bus > 25 MHz */ 808c2ecf20Sopenharmony_ci#define PD67_MC2_3STATE_BIT7 0x20 /* Floppy change bit */ 818c2ecf20Sopenharmony_ci#define PD67_MC2_DMA_MODE 0x40 828c2ecf20Sopenharmony_ci#define PD67_MC2_IRQ15_RI 0x80 /* IRQ 15 is ring enable */ 838c2ecf20Sopenharmony_ci 848c2ecf20Sopenharmony_ci/* Flags for PD67_CHIP_INFO */ 858c2ecf20Sopenharmony_ci#define PD67_INFO_SLOTS 0x20 /* 0 = 1 slot, 1 = 2 slots */ 868c2ecf20Sopenharmony_ci#define PD67_INFO_CHIP_ID 0xc0 878c2ecf20Sopenharmony_ci#define PD67_INFO_REV 0x1c 888c2ecf20Sopenharmony_ci 898c2ecf20Sopenharmony_ci/* Fields in PD67_TIME_* registers */ 908c2ecf20Sopenharmony_ci#define PD67_TIME_SCALE 0xc0 918c2ecf20Sopenharmony_ci#define PD67_TIME_SCALE_1 0x00 928c2ecf20Sopenharmony_ci#define PD67_TIME_SCALE_16 0x40 938c2ecf20Sopenharmony_ci#define PD67_TIME_SCALE_256 0x80 948c2ecf20Sopenharmony_ci#define PD67_TIME_SCALE_4096 0xc0 958c2ecf20Sopenharmony_ci#define PD67_TIME_MULT 0x3f 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ci/* Fields in PD67_DMA_CTL */ 988c2ecf20Sopenharmony_ci#define PD67_DMA_MODE 0xc0 998c2ecf20Sopenharmony_ci#define PD67_DMA_OFF 0x00 1008c2ecf20Sopenharmony_ci#define PD67_DMA_DREQ_INPACK 0x40 1018c2ecf20Sopenharmony_ci#define PD67_DMA_DREQ_WP 0x80 1028c2ecf20Sopenharmony_ci#define PD67_DMA_DREQ_BVD2 0xc0 1038c2ecf20Sopenharmony_ci#define PD67_DMA_PULLUP 0x20 /* Disable socket pullups? */ 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci/* Fields in PD67_EXT_CTL_1 */ 1068c2ecf20Sopenharmony_ci#define PD67_EC1_VCC_PWR_LOCK 0x01 1078c2ecf20Sopenharmony_ci#define PD67_EC1_AUTO_PWR_CLEAR 0x02 1088c2ecf20Sopenharmony_ci#define PD67_EC1_LED_ENA 0x04 1098c2ecf20Sopenharmony_ci#define PD67_EC1_INV_CARD_IRQ 0x08 1108c2ecf20Sopenharmony_ci#define PD67_EC1_INV_MGMT_IRQ 0x10 1118c2ecf20Sopenharmony_ci#define PD67_EC1_PULLUP_CTL 0x20 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci/* Fields in PD67_MISC_CTL_3 */ 1148c2ecf20Sopenharmony_ci#define PD67_MC3_IRQ_MASK 0x03 1158c2ecf20Sopenharmony_ci#define PD67_MC3_IRQ_PCPCI 0x00 1168c2ecf20Sopenharmony_ci#define PD67_MC3_IRQ_EXTERN 0x01 1178c2ecf20Sopenharmony_ci#define PD67_MC3_IRQ_PCIWAY 0x02 1188c2ecf20Sopenharmony_ci#define PD67_MC3_IRQ_PCI 0x03 1198c2ecf20Sopenharmony_ci#define PD67_MC3_PWR_MASK 0x0c 1208c2ecf20Sopenharmony_ci#define PD67_MC3_PWR_SERIAL 0x00 1218c2ecf20Sopenharmony_ci#define PD67_MC3_PWR_TI2202 0x08 1228c2ecf20Sopenharmony_ci#define PD67_MC3_PWR_SMB 0x0c 1238c2ecf20Sopenharmony_ci 1248c2ecf20Sopenharmony_ci/* Register definitions for Cirrus PD6832 PCI-to-CardBus bridge */ 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_ci/* PD6832 extension registers -- indexed in PD67_EXT_INDEX */ 1278c2ecf20Sopenharmony_ci#define PD68_EXT_CTL_2 0x0b 1288c2ecf20Sopenharmony_ci#define PD68_PCI_SPACE 0x22 1298c2ecf20Sopenharmony_ci#define PD68_PCCARD_SPACE 0x23 1308c2ecf20Sopenharmony_ci#define PD68_WINDOW_TYPE 0x24 1318c2ecf20Sopenharmony_ci#define PD68_EXT_CSC 0x2e 1328c2ecf20Sopenharmony_ci#define PD68_MISC_CTL_4 0x2f 1338c2ecf20Sopenharmony_ci#define PD68_MISC_CTL_5 0x30 1348c2ecf20Sopenharmony_ci#define PD68_MISC_CTL_6 0x31 1358c2ecf20Sopenharmony_ci 1368c2ecf20Sopenharmony_ci/* Extra flags in PD67_MISC_CTL_3 */ 1378c2ecf20Sopenharmony_ci#define PD68_MC3_HW_SUSP 0x10 1388c2ecf20Sopenharmony_ci#define PD68_MC3_MM_EXPAND 0x40 1398c2ecf20Sopenharmony_ci#define PD68_MC3_MM_ARM 0x80 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ci/* Bridge Control Register */ 1428c2ecf20Sopenharmony_ci#define PD6832_BCR_MGMT_IRQ_ENA 0x0800 1438c2ecf20Sopenharmony_ci 1448c2ecf20Sopenharmony_ci/* Socket Number Register */ 1458c2ecf20Sopenharmony_ci#define PD6832_SOCKET_NUMBER 0x004c /* 8 bit */ 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ci#endif /* _LINUX_CIRRUS_H */ 148