|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // e32\include\drivers\NandDevice.h |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef __NAND_DEVICE_H__ |
|
19 #define __NAND_DEVICE_H__ |
|
20 |
|
21 |
|
22 /** |
|
23 This enum contains an entry for every manufacturer ID of NAND flash which |
|
24 Symbian OS currently supports. |
|
25 @publishedPartner |
|
26 @released |
|
27 */ |
|
28 enum TManufacturerId |
|
29 { |
|
30 ESamsungId = 0xEC |
|
31 }; |
|
32 |
|
33 /** |
|
34 This enum specifies characterisitics exhibited by NAND devices. |
|
35 @publishedPartner |
|
36 @released |
|
37 */ |
|
38 enum TDeviceFlags |
|
39 { |
|
40 ELargeBlock = 0x01, |
|
41 ECycle5Dev = 0x02, |
|
42 EDataIoWidth16 = 0x04 // i/o width is 16 bits wide |
|
43 }; |
|
44 |
|
45 /** |
|
46 Container for storing all of the information about a particular |
|
47 type of NAND flash device. |
|
48 @publishedPartner |
|
49 @released |
|
50 */ |
|
51 struct TNandDeviceInfo |
|
52 { |
|
53 TManufacturerId iManufacturerCode; |
|
54 TUint8 iDeviceCode; |
|
55 TUint32 iNumBlocks; // no. of erase blocks in a device |
|
56 TUint32 iNumSectorsPerBlock;// no. of sectors in an erase block |
|
57 TUint32 iNumBytesMain; // size of a main array for one sector |
|
58 TUint32 iNumBytesSpare; // size of a spare array for one sector |
|
59 TUint8 iSectorShift; // shift value for a sector |
|
60 TUint8 iBlockShift; // shift value for a block |
|
61 TUint16 iBlksInRsv; // number of blocks in reservoir |
|
62 TUint8 iBadPos; // BadBlock Information Position in spare block |
|
63 TUint8 iLsnPos; // Lsn position in spare array |
|
64 TUint8 iECCPos; // ECC position in spare array |
|
65 TDeviceFlags iFlags; |
|
66 }; |
|
67 |
|
68 #endif |