]> git.sur5r.net Git - u-boot/blobdiff - board/omap1610inn/omap1610innovator.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[u-boot] / board / omap1610inn / omap1610innovator.c
index ab1dabeb9ff99babd42cab64cecd2c14700112c3..8dbe686a8913214bfc0d7b9fa8602d0f51b72b6e 100644 (file)
@@ -36,6 +36,8 @@
 #include <./configs/omap1510.h>
 #endif
 
+DECLARE_GLOBAL_DATA_PTR;
+
 #ifdef CONFIG_CS_AUTOBOOT
 unsigned long omap_flash_base;
 #endif
@@ -60,11 +62,12 @@ static inline void delay (unsigned long loops)
 
 int board_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
-       /* arch number of OMAP 1510-Board */
-       /* to be changed for OMAP 1610 Board */
-       gd->bd->bi_arch_number = 234;
+       if (machine_is_omap_h2())
+               gd->bd->bi_arch_number = MACH_TYPE_OMAP_H2;
+       else if (machine_is_omap_innovator())
+               gd->bd->bi_arch_number = MACH_TYPE_OMAP_INNOVATOR;
+       else
+               gd->bd->bi_arch_number = MACH_TYPE_OMAP_GENERIC;
 
        /* adress of boot parameters */
        gd->bd->bi_boot_params = 0x10000100;
@@ -102,8 +105,8 @@ void flash__init (void)
 
 #ifdef CONFIG_CS_AUTOBOOT
         /* Check swapping of CS0 and CS3, set flash base accordingly */
-        omap_flash_base = ((*((u32 *)OMAP_EMIFS_CONFIG_REG) & 0x02) == 0) ?
-                                       PHYS_FLASH_1_BM0 : PHYS_FLASH_1_BM1;
+       omap_flash_base = ((*((u32 *)OMAP_EMIFS_CONFIG_REG) & 0x02) == 0) ?
+                                       PHYS_FLASH_1_BM0 : PHYS_FLASH_1_BM1;
 #endif
        regval = *((volatile unsigned int *) EMIFS_GlB_Config_REG);
        /* Turn off write protection for flash devices. */
@@ -150,8 +153,6 @@ void ether__init (void)
 ******************************/
 int dram_init (void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        gd->bd->bi_dram[0].start = PHYS_SDRAM_1;
        gd->bd->bi_dram[0].size = PHYS_SDRAM_1_SIZE;