X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;ds=sidebyside;f=board%2Fomap1610inn%2Fomap1610innovator.c;h=78425181e894f7d0c21d1492f5bf21068bb70f03;hb=3c71f3e8aa4d74bc5b43dc55f9be893afbc13497;hp=521eee34c39f2213e3c87dc234a974ef747ff546;hpb=028ab6b598b628326116acd88e0f35aa9f526d12;p=oweals%2Fu-boot.git diff --git a/board/omap1610inn/omap1610innovator.c b/board/omap1610inn/omap1610innovator.c index 521eee34c3..78425181e8 100644 --- a/board/omap1610inn/omap1610innovator.c +++ b/board/omap1610inn/omap1610innovator.c @@ -36,6 +36,10 @@ #include <./configs/omap1510.h> #endif +#ifdef CONFIG_CS_AUTOBOOT +unsigned long omap_flash_base; +#endif + void flash__init (void); void ether__init (void); void set_muxconf_regs (void); @@ -58,9 +62,12 @@ 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; @@ -95,6 +102,12 @@ void flash__init (void) { #define EMIFS_GlB_Config_REG 0xfffecc0c unsigned int regval; + +#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; +#endif regval = *((volatile unsigned int *) EMIFS_GlB_Config_REG); /* Turn off write protection for flash devices. */ regval = regval | 0x0001;