1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
|
/*
* (C) Copyright 2004-2009 Texas Instruments, <www.ti.com>
* Kishore Kadiyala <kishore.kadiyala@ti.com>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
#include <common.h>
#include <asm/io.h>
#include <asm/arch/cpu.h>
#include <asm/arch/mem.h>
#if (CONFIG_FASTBOOT)
#include <fastboot.h>
#endif
void board_mmc_init(void)
{
#if (CONFIG_FASTBOOT)
/* Partitons on EMMC preasent on OMAP4SDP required for Fastboot*/
fastboot_ptentry ptn[10] = {
{
.name = "ptable",
.start = 0x00, /*Sector Start */
.length = 128*1024, /*128KB */
.flags = 0,
},
{
.name = "xloader",
.start = 0x100, /*Sector Start */
.length = 128*1024, /*128KB */
.flags = 0,
},
{
.name = "bootloader",
.start = 0x200, /*Sector Start */
.length = 256*1024, /*256KB */
.flags = 0,
},
{
.name = "environment",
.start = 0x400, /* Sector Start */
.length = 128*1024, /*128KB */
.flags = FASTBOOT_PTENTRY_FLAGS_WRITE_ENV,
},
{
.name = "boot",
.start = 0x500, /* Sector Start */
.length = 14*1024*1024, /*14MB */
.flags = 0,
},
{
.name = "recovery",
.start = 0x7500, /*Sector Start */
.length = 14*1024*1024, /*14MB */
.flags = 0,
},
{
.name = "system",
.start = 0x11800, /* Sector Start */
.length = 384*1024*1024, /*384MB */
.flags = 0,
},
{
.name = "userdata",
.start = 0xD2000, /* Sector Start */
.length = 512*1024*1024, /*512MB */
.flags = 0,
},
{
.name = "cache",
.start = 0x1D5000, /* Sector Start */
.length = 128*1024*1024, /*128MB */
.flags = 0,
},
{
.name = "media",
.start = 0x217800, /* Sector Start */
.length = 1024*1024*1024, /*1GB */
.flags = 0,
},
/* Rest of the RAW Partitions can start from Sector start 0x27B622 */
};
int i;
for (i = 0; i < 10; i++)
fastboot_flash_add_ptn(&ptn[i]);
#endif
}
int fastboot_oem(const char *cmd)
{
if (!strcmp(cmd,"format"))
printf("\nBlze: format oem : not implemented yet\n");
return -1;
}
|