Personal tools

Log in

Changes

From IGEP - ISEE Wiki

Jump to: navigation, search

The IGEP X-loader

1,575 bytes added, 20:03, 27 February 2011
no edit summary
</pre>At the end and after the s_init call the code jump to initial C function called [http://git.igep.es/?p=pub/scm/igep-x-loader.git;a=blob;f=lib/board.c start_armboot] defined in the file lib/board.c.<br><pre> 65 init_fnc_t *init_sequence[] = { 66 cpu_init, /* basic cpu dependent setup */ 67 board_init, /* basic board dependent setup */ 68 #ifdef CFG_NS16550_SERIAL 69 serial_init, /* serial communications setup */ 70 #endif 71 print_info, 72 nand_init, /* board specific nand init */ 73 #ifdef CONFIG_MMC 74 init_func_i2c, 75 #endif 76 NULL, 77 }; 78 79 void start_armboot (void) 80 { 81 init_fnc_t **init_fnc_ptr; 82 int i, size; 83 uchar *buf; 84 int *first_instruction; 85 block_dev_desc_t *dev_desc = NULL; 86 #ifdef CONFIG_ONENAND 87 unsigned int onenand_features; 88 #endif 89 /* Execute init_sequence */ 90 for (init_fnc_ptr = init_sequence; *init_fnc_ptr; ++init_fnc_ptr) { 91 if ((*init_fnc_ptr)() != 0) { 92 hang (); 93 } 94 } 95 96 /* Execute board specific misc init */ 97 misc_init_r(); 98 99 /* Initialize OneNand */ 100 onenand_init(); 101 102 /* Initialize MMC */ 103 mmc_init(1); 104 105 /* Load the Linux kernel */ 106 /* boot_linux() should never return */ 107 boot_linux(); 108 109 hang(); 110 }</pre>
== C Execution Flow<br> ==
=== s_init<br> ===
Function: [http://git.igep.es/?p=pub/scm/igep-x-loader.git;a=blob;f=board/igep0020/igep0020.c s_init]<br>
This function it's responsable to do the basic board (processor) initialization. It's called before the "C" generic initialization code.<br>
<pre> 874 /**********************************************************
875 * Routine: s_init
</pre>This function set the PLL clocks, MUX settings, GPMC configuration and memory configuration.
=== cpu_init<br> ===
902 return 0;
903 }
</pre>=== serial_init<br> === Function:&nbsp;[http://git.igep.es/?p=pub/scm/igep-x-loader.git;a=blob;f=drivers/serial.c serial_init] This function initializes the serial driver.  
=== <br> <br> 4 Settings &amp; Configuration: ===