]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/p2041rdb/p2041rdb.c
Merge remote-tracking branch 'u-boot-imx/master'
[karo-tx-uboot.git] / board / freescale / p2041rdb / p2041rdb.c
index 60694a6723d1cb7c79edf4b6c6ff8747de91a361..a14b43b5a503e4a272e7e6baab96e37ce858467c 100644 (file)
@@ -116,7 +116,7 @@ void board_config_lanes_mux(void)
 int board_early_init_r(void)
 {
        const unsigned int flashbase = CONFIG_SYS_FLASH_BASE;
-       const u8 flash_esel = find_tlb_idx((void *)flashbase, 1);
+       int flash_esel = find_tlb_idx((void *)flashbase, 1);
 
        /*
         * Remap Boot flash + PROMJET region to caching-inhibited
@@ -127,8 +127,14 @@ int board_early_init_r(void)
        flush_dcache();
        invalidate_icache();
 
-       /* invalidate existing TLB entry for flash + promjet */
-       disable_tlb(flash_esel);
+       if (flash_esel == -1) {
+               /* very unlikely unless something is messed up */
+               puts("Error: Could not find TLB for FLASH BASE\n");
+               flash_esel = 2; /* give our best effort to continue */
+       } else {
+               /* invalidate existing TLB entry for flash + promjet */
+               disable_tlb(flash_esel);
+       }
 
        set_tlb(1, flashbase, CONFIG_SYS_FLASH_BASE_PHYS,
                        MAS3_SX|MAS3_SW|MAS3_SR, MAS2_I|MAS2_G,
@@ -155,20 +161,6 @@ unsigned long get_board_sys_clk(unsigned long dummy)
        }
 }
 
-static const char *serdes_clock_to_string(u32 clock)
-{
-       switch (clock) {
-       case SRDS_PLLCR0_RFCK_SEL_100:
-               return "100";
-       case SRDS_PLLCR0_RFCK_SEL_125:
-               return "125";
-       case SRDS_PLLCR0_RFCK_SEL_156_25:
-               return "156.25";
-       default:
-               return "150";
-       }
-}
-
 #define NUM_SRDS_BANKS 2
 
 int misc_init_r(void)