1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/kernelhwsrv/kernel/eka/drivers/pbus/pccard/cis.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,140 @@
1.4 +// Copyright (c) 1995-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of the License "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// e32\drivers\pbus\pccard\cis.h
1.18 +//
1.19 +//
1.20 +
1.21 +// General definitions, applicable to multiple tuple types
1.22 +const TUint8 KCisTplExt=0x80; // Extended tuple
1.23 +const TUint8 KCisTplExponM=0x07; // Mask for exponent field.
1.24 +const TUint8 KCisTplMantM=0x78; // Mask for mantisa field.
1.25 +const TUint8 KCisTplMantFO=3; // Offset for mantisa field.
1.26 +
1.27 +
1.28 +// Function Identification Tuple (KCisTplFuncId) - Function codes
1.29 +const TUint8 KCisTplFuncIdMultiFunc=0x00;
1.30 +const TUint8 KCisTplFuncIdMemory=0x01;
1.31 +const TUint8 KCisTplFuncIdSerial=0x02;
1.32 +const TUint8 KCisTplFuncIdParallel=0x03;
1.33 +const TUint8 KCisTplFuncIdFixed=0x04;
1.34 +const TUint8 KCisTplFuncIdVideo=0x05;
1.35 +const TUint8 KCisTplFuncIdNetwork=0x06;
1.36 +const TUint8 KCisTplFuncIdAims=0x07;
1.37 +const TUint8 KCisTplFuncIdScsi=0x08;
1.38 +const TUint8 KCisTplFuncIdVendorSpecific=0xFE;
1.39 +const TUint8 KCisTplFuncIdInvalid=0xFF;
1.40 +
1.41 +// Configuration Tuple (KCisTplConfig)
1.42 +const TUint8 KTpCcRaszM=0x03; // Mask for size of TPCC_RADR field.
1.43 +const TUint8 KTpCcRaszFO=0; // Offset for size of TPCC_RADR field.
1.44 +const TUint8 KTpCcRmszM=0x3C; // Mask for size of TPCC_RMSK field.
1.45 +const TUint8 KTpCcRmszFO=2; // Offset for size of TPCC_RMSK field.
1.46 +
1.47 +// Configuration Table Entry Tuple (KCisTplCfTableEntry)
1.48 +const TUint8 KTpCeOptionM=0x3F; // Mask for Config. Option field.
1.49 +const TUint8 KTpCeIsDefaultM=0x40; // Mask for Is Default field.
1.50 +const TUint8 KTpCeIntfPresM=0x80; // Mask for interface present field.
1.51 +const TUint8 KTpCeIntfTypeM=0x0F; // Mask for interface type field.
1.52 +
1.53 +const TUint8 KTpCeBvdM=0x10; // Mask for BVD active field
1.54 +const TUint8 KTpCeWpM=0x20; // Mask for WP active field
1.55 +const TUint8 KTpCeReadyM=0x40; // Mask for READY active field
1.56 +const TUint8 KTpCeWaitM=0x80; // Mask for WAIT active field
1.57 +
1.58 +const TUint8 KTpCePwrPresM=0x03; // Mask for Power present field.
1.59 +const TUint8 KTpCePwrPresFO=0; // Offset for Power present field.
1.60 +const TUint8 KTpCeTimPresM=0x04; // Mask for Timing present field.
1.61 +const TUint8 KTpCeTimPresFO=2; // Offset for Timing present field.
1.62 +const TUint8 KTpCeIoPresM=0x08; // Mask for IO space present field.
1.63 +const TUint8 KTpCeIoPresFO=3; // Offset for IO space present field.
1.64 +const TUint8 KTpCeIrqPresM=0x10; // Mask for IRQ present field.
1.65 +const TUint8 KTpCeIrqPresFO=4; // Offset for IRQ present field.
1.66 +const TUint8 KTpCeMemPresM=0x60; // Mask for Mem space present field.
1.67 +const TUint8 KTpCeMemPresFO=5; // Offset for Mem space present field.
1.68 +const TUint8 KTpCeMiscPresM=0x80; // Mask for Misc present field.
1.69 +const TUint8 KTpCeMiscPresFO=7; // Offset for Misc present field.
1.70 +
1.71 +const TUint8 KTpCeTimWaitM=0x03; // Mask for wait timing field.
1.72 +const TUint8 KTpCeTimWaitFO=0; // Offset for wait timing field.
1.73 +const TUint8 KTpCeTimRdyM=0x1C; // Mask for ready timing field.
1.74 +const TUint8 KTpCeTimRdyFO=2; // Offset for ready timing field.
1.75 +const TUint8 KTpCeTimResM=0xE0; // Mask for reserved timing field.
1.76 +const TUint8 KTpCeTimResFO=5; // Offset for reserved timing field.
1.77 +
1.78 +const TUint8 KTpCeIoLinesM=0x1F; // Mask for IOAddrLines field.
1.79 +const TUint8 KTpCeIoLinesFO=0; // Offset for IOAddrLines field.
1.80 +const TUint8 KTpCeBus16_8M=0x60; // Mask for Bus16/8 field.
1.81 +const TUint8 KTpCeBus16_8FO=5; // Offset for Bus16/8 field.
1.82 +const TUint8 KTpCeRangePresM=0x80; // Mask for IO range field.
1.83 +const TUint8 KTpCeRangePresFO=7; // Offset for IO range field.
1.84 +const TUint8 KTpCeIoRangesM=0x0F; // Mask for number of IO ranges.
1.85 +const TUint8 KTpCeIoRangesFO=0; // Offset for number of IO ranges.
1.86 +const TUint8 KTpCeIoAddrSzM=0x30; // Mask for size of IO addr.
1.87 +const TUint8 KTpCeIoAddrSzFO=4; // Offset for size of IO addr.
1.88 +const TUint8 KTpCeIoAddrLenM=0xC0; // Mask for size of IO len.
1.89 +const TUint8 KTpCeIoAddrLenFO=6; // Offset for size of IO len.
1.90 +
1.91 +const TUint8 KTpCeIrqMaskM=0x10; // Mask for mask field in IRQ info.
1.92 +
1.93 +const TUint8 KTpCeMemWindowsM=0x07; // Mask for number of memory windows.
1.94 +const TUint8 KTpCeMemLenSzM=0x18; // Mask for size of each window len.
1.95 +const TUint8 KTpCeMemLenSzFO=3; // Offset for size of each window len.
1.96 +const TUint8 KTpCeMemAddrSzM=0x60; // Mask for size of each window addr.
1.97 +const TUint8 KTpCeMemAddrSzFO=5; // Offset for size of each window addr.
1.98 +const TUint8 KTpCeMemHostAddrM=0x80;// Mask for host address field
1.99 +
1.100 +const TUint8 KTpCePwrDownM=0x20; // Mask for power down in Misc info.
1.101 +
1.102 +// Device Information Tuples (KCisTplDevice,KCisTplDeviceA)
1.103 +const TUint8 KTpDiDSpeedM=0x07; // Mask for Device Speed field.
1.104 +const TUint8 KTpDiDSpeedNull=0;
1.105 +const TUint8 KTpDiDSpeed250nS=1;
1.106 +const TUint8 KTpDiDSpeed200nS=2;
1.107 +const TUint8 KTpDiDSpeed150nS=3;
1.108 +const TUint8 KTpDiDSpeed100nS=4;
1.109 +const TUint8 KTpDiDSpeedExt=7;
1.110 +
1.111 +const TUint8 KTpDiWpsM=0x08; // Mask for Write Prot. field.
1.112 +const TUint8 KTpDiDTypeM=0xF0; // Mask for Device Type field.
1.113 +const TUint8 KTpDiDTypeFO=4; // Offset for Device Type field.
1.114 +const TUint8 KTpDiDTypeNull=0;
1.115 +const TUint8 KTpDiDTypeRom=1;
1.116 +const TUint8 KTpDiDTypeOtprom=2;
1.117 +const TUint8 KTpDiDTypeEprom=3;
1.118 +const TUint8 KTpDiDTypeEeprom=4;
1.119 +const TUint8 KTpDiDTypeFlash=5;
1.120 +const TUint8 KTpDiDTypeSram=6;
1.121 +const TUint8 KTpDiDTypeDram=7;
1.122 +const TUint8 KTpDiDTypeFuncSpec=13;
1.123 +const TUint8 KTpDiDTypeExtend=14;
1.124 +
1.125 +const TUint8 KTpDiDSizeM=0x07; // Mask for Size Code field.
1.126 +const TUint8 KTpDiDSizeFO=0; // Offset for Size Code field.
1.127 +const TUint8 KTpDiDUnitsM=0xF8; // Mask for Num of Units field.
1.128 +const TUint8 KTpDiDUnitsFO=3; // Offset for Num of Units field.
1.129 +const TUint8 KTpDiDSize512=0;
1.130 +const TUint8 KTpDiDSize2K=1;
1.131 +const TUint8 KTpDiDSize8K=2;
1.132 +const TUint8 KTpDiDSize32K=3;
1.133 +const TUint8 KTpDiDSize128K=4;
1.134 +const TUint8 KTpDiDSize512K=5;
1.135 +const TUint8 KTpDiDSize2M=6;
1.136 +
1.137 +// Other Conditions Device Info. Tuples (KCisTplDeviceOC,KCisTplDeviceOA)
1.138 +const TUint8 KTpDoMWaitM=0x01; // Mask for MWAIT field.
1.139 +const TUint8 KTpDoVccUsedM=0x06; // Mask for VccUsed field.
1.140 +const TUint8 KTpDoVccUsedFO=1; // Offset for VccUsed field.
1.141 +
1.142 +const TInt KMaxTuplesPerCis=256;
1.143 +