os/kernelhwsrv/kernel/eka/include/drivers/nanddevice.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/kernel/eka/include/drivers/nanddevice.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,68 @@
     1.4 +// Copyright (c) 2004-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\include\drivers\NandDevice.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +#ifndef __NAND_DEVICE_H__
    1.22 +#define __NAND_DEVICE_H__
    1.23 +
    1.24 +
    1.25 +/**
    1.26 +This enum contains an entry for every manufacturer ID of NAND flash which
    1.27 +Symbian OS currently supports.
    1.28 +@publishedPartner
    1.29 +@released
    1.30 +*/
    1.31 +enum TManufacturerId
    1.32 +	{
    1.33 +	ESamsungId = 0xEC
    1.34 +	};
    1.35 +
    1.36 +/**
    1.37 +This enum specifies characterisitics exhibited by NAND devices.
    1.38 +@publishedPartner
    1.39 +@released
    1.40 +*/
    1.41 +enum TDeviceFlags
    1.42 +	{
    1.43 +	ELargeBlock = 0x01,
    1.44 +	ECycle5Dev = 0x02,
    1.45 +	EDataIoWidth16 = 0x04		// i/o width is 16 bits wide
    1.46 +	};
    1.47 +
    1.48 +/**
    1.49 +Container for storing all of the information about a particular
    1.50 +type of NAND flash device.
    1.51 +@publishedPartner
    1.52 +@released
    1.53 +*/
    1.54 +struct TNandDeviceInfo
    1.55 +	{ 
    1.56 +	TManufacturerId     iManufacturerCode;
    1.57 +	TUint8				iDeviceCode;
    1.58 +	TUint32				iNumBlocks;			// no. of erase blocks in a device
    1.59 +	TUint32				iNumSectorsPerBlock;// no. of sectors in an erase block
    1.60 +	TUint32				iNumBytesMain;		// size of a main array for one sector
    1.61 +	TUint32				iNumBytesSpare;		// size of a spare array for one sector
    1.62 +    TUint8				iSectorShift;		// shift value for a sector
    1.63 +    TUint8				iBlockShift;		// shift value for a block	
    1.64 +	TUint16				iBlksInRsv;			// number of blocks in reservoir
    1.65 +    TUint8				iBadPos;			// BadBlock Information Position in spare block
    1.66 +	TUint8				iLsnPos;			// Lsn position in spare array
    1.67 +	TUint8				iECCPos;			// ECC position in spare array
    1.68 +	TDeviceFlags		iFlags;
    1.69 +	};
    1.70 +
    1.71 +#endif