]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/compulab/cm_t35/cm_t35.c
Merge branch 'master' of git://git.denx.de/u-boot-imx
[karo-tx-uboot.git] / board / compulab / cm_t35 / cm_t35.c
index bc8e0cad9496131739f7f747ce5ec34e369ad152..d0b0930f423ad633cce8aee1cd05a5ee032de64c 100644 (file)
@@ -53,16 +53,6 @@ static u32 gpmc_net_config[GPMC_MAX_REG] = {
        0
 };
 
-static u32 gpmc_nand_config[GPMC_MAX_REG] = {
-       SMNAND_GPMC_CONFIG1,
-       SMNAND_GPMC_CONFIG2,
-       SMNAND_GPMC_CONFIG3,
-       SMNAND_GPMC_CONFIG4,
-       SMNAND_GPMC_CONFIG5,
-       SMNAND_GPMC_CONFIG6,
-       0,
-};
-
 #ifdef CONFIG_LCD
 #ifdef CONFIG_CMD_NAND
 static int splash_load_from_nand(u32 bmp_load_addr)
@@ -105,6 +95,22 @@ static inline int splash_load_from_nand(void)
 }
 #endif /* CONFIG_CMD_NAND */
 
+#ifdef CONFIG_SPL_BUILD
+/*
+ * Routine: get_board_mem_timings
+ * Description: If we use SPL then there is no x-loader nor config header
+ * so we have to setup the DDR timings ourself on both banks.
+ */
+void get_board_mem_timings(struct board_sdrc_timings *timings)
+{
+       timings->mr = MICRON_V_MR_165;
+       timings->mcfg = MICRON_V_MCFG_200(256 << 20); /* raswidth 14 needed */
+       timings->ctrla = MICRON_V_ACTIMA_165;
+       timings->ctrlb = MICRON_V_ACTIMB_165;
+       timings->rfr_ctrl = SDP_3430_SDRC_RFR_CTRL_165MHz;
+}
+#endif
+
 int splash_screen_prepare(void)
 {
        char *env_splashimage_value;
@@ -132,9 +138,6 @@ int board_init(void)
 {
        gpmc_init(); /* in SRAM or SDRAM, finish GPMC */
 
-       enable_gpmc_cs_config(gpmc_nand_config, &gpmc_cfg->cs[0],
-                             CONFIG_SYS_NAND_BASE, GPMC_SIZE_16M);
-
        /* board id for Linux */
        if (get_cpu_family() == CPU_OMAP34XX)
                gd->bd->bi_arch_number = MACH_TYPE_CM_T35;
@@ -365,7 +368,7 @@ static void cm_t3x_set_common_muxconf(void)
        MUX_VAL(CP(SYS_OFF_MODE),       (IEN  | PTD | DIS | M0)); /*OFF_MODE*/
        MUX_VAL(CP(SYS_CLKOUT1),        (IEN  | PTD | DIS | M0)); /*CLKOUT1*/
        MUX_VAL(CP(SYS_CLKOUT2),        (IDIS | PTU | DIS | M4)); /*green LED*/
-       MUX_VAL(CP(JTAG_nTRST),         (IEN  | PTD | DIS | M0)); /*JTAG_nTRST*/
+       MUX_VAL(CP(JTAG_NTRST),         (IEN  | PTD | DIS | M0)); /*JTAG_NTRST*/
        MUX_VAL(CP(JTAG_TCK),           (IEN  | PTD | DIS | M0)); /*JTAG_TCK*/
        MUX_VAL(CP(JTAG_TMS),           (IEN  | PTD | DIS | M0)); /*JTAG_TMS*/
        MUX_VAL(CP(JTAG_TDI),           (IEN  | PTD | DIS | M0)); /*JTAG_TDI*/
@@ -440,7 +443,9 @@ void set_muxconf_regs(void)
                cm_t3730_set_muxconf();
 }
 
-#ifdef CONFIG_GENERIC_MMC
+#if defined(CONFIG_GENERIC_MMC) && !defined(CONFIG_SPL_BUILD)
+#define SB_T35_WP_GPIO 59
+
 int board_mmc_getcd(struct mmc *mmc)
 {
        u8 val;
@@ -453,7 +458,7 @@ int board_mmc_getcd(struct mmc *mmc)
 
 int board_mmc_init(bd_t *bis)
 {
-       return omap_mmc_init(0, 0, 0, -1, 59);
+       return omap_mmc_init(0, 0, 0, -1, SB_T35_WP_GPIO);
 }
 #endif