X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=board%2Ftqc%2Ftqm8xx%2Ftqm8xx.c;h=58bd7fae47059a4f47dc2464e3d21632a4b04f2f;hb=2c62e313b14186d67f5bf26095f36a246cb0c3a4;hp=3b5230abc0d43f95cf787292a84475ffd90a5f3c;hpb=878cd63e02f63f245182a101807186b44e20f116;p=platform%2Fkernel%2Fu-boot.git diff --git a/board/tqc/tqm8xx/tqm8xx.c b/board/tqc/tqm8xx/tqm8xx.c index 3b5230a..58bd7fa 100644 --- a/board/tqc/tqm8xx/tqm8xx.c +++ b/board/tqc/tqm8xx/tqm8xx.c @@ -118,9 +118,7 @@ int checkboard (void) break; putc (buf[i]); } -#ifdef CONFIG_VIRTLAB2 - puts (" (Virtlab2)"); -#endif + putc ('\n'); return (0); @@ -128,13 +126,14 @@ int checkboard (void) /* ------------------------------------------------------------------------- */ -phys_size_t initdram (int board_type) +int dram_init(void) { volatile immap_t *immap = (immap_t *) CONFIG_SYS_IMMR; volatile memctl8xx_t *memctl = &immap->im_memctl; long int size8, size9, size10; long int size_b0 = 0; long int size_b1 = 0; + int board_type = gd->board_type; upmconfig (UPMA, (uint *) sdram_table, sizeof (sdram_table) / sizeof (uint)); @@ -391,7 +390,9 @@ phys_size_t initdram (int board_type) memctl->memc_or5 = CONFIG_SYS_OR5_ISP1362; memctl->memc_br5 = CONFIG_SYS_BR5_ISP1362; #endif /* CONFIG_ISP1362_USB */ - return (size_b0 + size_b1); + gd->ram_size = size_b0 + size_b1; + + return 0; } /* ------------------------------------------------------------------------- */ @@ -512,14 +513,6 @@ int misc_init_r (void) immap->im_ioport.iop_padat &= ~0x0001; /* turn it off */ # endif -#ifdef CONFIG_NSCU - /* wake up ethernet module */ - immap->im_ioport.iop_pcpar &= ~0x0004; /* GPIO pin */ - immap->im_ioport.iop_pcdir |= 0x0004; /* output */ - immap->im_ioport.iop_pcso &= ~0x0004; /* for clarity */ - immap->im_ioport.iop_pcdat |= 0x0004; /* enable */ -#endif /* CONFIG_NSCU */ - return (0); } #endif /* CONFIG_MISC_INIT_R */ @@ -682,49 +675,3 @@ int ft_board_setup(void *blob, bd_t *bd) return 0; } #endif /* defined(CONFIG_OF_BOARD_SETUP) && defined(CONFIG_OF_LIBFDT) */ - -/* ---------------------------------------------------------------------------- */ -/* TK885D specific initializaion */ -/* ---------------------------------------------------------------------------- */ -#ifdef CONFIG_TK885D -#include -int last_stage_init(void) -{ - const unsigned char phy[] = {CONFIG_FEC1_PHY, CONFIG_FEC2_PHY}; - unsigned short reg; - int ret, i = 100; - char *s; - - mii_init(); - /* Without this delay 0xff is read from the UART buffer later in - * abortboot() and autoboot is aborted */ - udelay(10000); - while (tstc() && i--) - (void)getc(); - - /* Check if auto-negotiation is prohibited */ - s = getenv("phy_auto_nego"); - - if (!s || !strcmp(s, "on")) - /* Nothing to do - autonegotiation by default */ - return 0; - - for (i = 0; i < 2; i++) { - ret = miiphy_read("FEC", phy[i], MII_BMCR, ®); - if (ret) { - printf("Cannot read BMCR on PHY %d\n", phy[i]); - return 0; - } - /* Auto-negotiation off, hard set full duplex, 100Mbps */ - ret = miiphy_write("FEC", phy[i], - MII_BMCR, (reg | BMCR_SPEED100 | - BMCR_FULLDPLX) & ~BMCR_ANENABLE); - if (ret) { - printf("Cannot write BMCR on PHY %d\n", phy[i]); - return 0; - } - } - - return 0; -} -#endif