|
1 // Copyright (c) 2010 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 // Partition Management for Embedded MMC devices |
|
15 // |
|
16 // |
|
17 |
|
18 #ifndef BGAHSMMCPTN_H |
|
19 #define BGAHSMMCPTN_H |
|
20 |
|
21 /* Partition attributes */ |
|
22 #define BGAHSMMCPTN_ATTR_READ 0x00 |
|
23 #define BGAHSMMCPTN_ATTR_WRITE 0x01 |
|
24 |
|
25 /* Partition information ID and fixed size */ |
|
26 #define BGAHSMMCPTN_PI_ID "BGAHSMMCPI:" |
|
27 #define BGAHSMMCPTN_PI_ID_SIZE 12 /* Fixed (4B aligned) */ |
|
28 |
|
29 /* Partition information version */ |
|
30 #define BGAHSMMCPTN_PI_VER_MAJOR 1 |
|
31 #define BGAHSMMCPTN_PI_VER_MINOR 0 |
|
32 |
|
33 #define BGAHSMMCPTN_LAST_DRIVE 7 /* MMC1_DRIVECOUNT - defined in variantmediadef.h */ |
|
34 |
|
35 typedef struct |
|
36 { |
|
37 TUint32 start_sector; /* Partition start sector */ |
|
38 TUint32 size; /* Partition size in sectors */ |
|
39 TUint32 attributes; /* RO, RW attributes (bitmask) */ |
|
40 TUint8 partition_id; /* Partition number */ |
|
41 TUint8 reserved1[3]; /* Reserved (padding for compiler alignment)*/ |
|
42 TUint32 partition_attributes; /* Partition attributes (see e32const.h) */ |
|
43 TUint8 reserved2[8]; /* Reserved */ |
|
44 /* = 28 bytes */ |
|
45 } BGAHSMMCPTN_PART_STR; |
|
46 |
|
47 typedef struct |
|
48 { |
|
49 TUint8 id[BGAHSMMCPTN_PI_ID_SIZE]; /* Partition information version */ |
|
50 TUint32 sector_size; /* Used sector size */ |
|
51 TUint16 major_ver; /* Major version number */ |
|
52 TUint16 minor_ver; /* Minor version number */ |
|
53 TUint16 partition_amount; /* The amount of partitions */ |
|
54 TUint8 reserved[42]; /* Reserved */ |
|
55 /* = 64 bytes */ |
|
56 BGAHSMMCPTN_PART_STR partitions[BGAHSMMCPTN_LAST_DRIVE]; |
|
57 } BGAHSMMCPTN_PI_STR; |
|
58 |
|
59 #define BGAHSMMCPTN_PI_STR_SIZE sizeof( BGAHSMMCPTN_PI_STR ) |
|
60 |
|
61 #endif /*BGAHSMMCPTN_H*/ |