tizen: add ramdisk2 partition to default parition table
[profile/mobile/platform/kernel/u-boot-tm1.git] / property / android_boot.c
1 #include <common.h>
2 #include <android_boot.h>
3 #include <asm/mach-types.h>
4 void MMU_InvalideICACHEALL(void);
5 void creat_atags(unsigned taddr, const char *cmdline,unsigned raddr, unsigned rsize)
6 {
7         unsigned n = 0;
8         unsigned pcount;
9         unsigned *tags = (unsigned *)taddr;
10
11         //ATAG_CORE
12         tags[n++] = 2;
13         tags[n++] = 0x54410001;
14
15         if(rsize) {
16                 //ATAG_INITRD2
17                 tags[n++] = 4;
18                 tags[n++] = 0x54420005;
19                 tags[n++] = raddr;
20                 tags[n++] = rsize;
21         }
22         if(cmdline && cmdline[0]) {
23                 const char *src;
24                 char *dst;
25                 unsigned len = 0;
26                                                                         
27                 dst = (char*) (tags + n + 2);
28                 src = cmdline;
29                 while((*dst++ = *src++)) len++;
30                                 
31                 len++;
32                 len = (len + 3) & (~3);
33
34                 // ATAG_CMDLINE
35                  tags[n++] = 2 + (len / 4);
36                  tags[n++] = 0x54410009;
37
38                  n += (len / 4);
39          }
40                                  
41                  // ATAG_NONE
42                  tags[n++] = 0;
43                  tags[n++] = 0;
44 }
45
46 void boot_linux(unsigned kaddr, unsigned taddr)
47 {
48         void (*entry)(unsigned,unsigned,unsigned) = (void*) kaddr;
49
50 #ifndef CONFIG_SC8810
51     MMU_InvalideICACHEALL();
52 #endif
53         entry(0, machine_arch_type, taddr);
54 }