]> git.sur5r.net Git - u-boot/blobdiff - board/siemens/rut/board.c
env: Rename setenv() to env_set()
[u-boot] / board / siemens / rut / board.c
index 0cf17ef5b6ac91ff15f0b347e4d92af0dfc35858..2a97414bafa508d4a59137d35ef04426676b3521 100644 (file)
@@ -63,23 +63,26 @@ struct ddr_data rut_ddr3_data = {
        .datawdsratio0 = 0x85,
        .datafwsratio0 = 0x100,
        .datawrsratio0 = 0xc1,
-       .datauserank0delay = 1,
-       .datadldiff0 = PHY_DLL_LOCK_DIFF,
 };
 
 struct cmd_control rut_ddr3_cmd_ctrl_data = {
        .cmd0csratio = 0x40,
-       .cmd0dldiff = 0,
        .cmd0iclkout = 1,
        .cmd1csratio = 0x40,
-       .cmd1dldiff = 0,
        .cmd1iclkout = 1,
        .cmd2csratio = 0x40,
-       .cmd2dldiff = 0,
        .cmd2iclkout = 1,
 };
 
-       config_ddr(DDR_PLL_FREQ, RUT_IOCTRL_VAL, &rut_ddr3_data,
+const struct ctrl_ioregs ioregs = {
+       .cm0ioctl               = RUT_IOCTRL_VAL,
+       .cm1ioctl               = RUT_IOCTRL_VAL,
+       .cm2ioctl               = RUT_IOCTRL_VAL,
+       .dt0ioctl               = RUT_IOCTRL_VAL,
+       .dt1ioctl               = RUT_IOCTRL_VAL,
+};
+
+       config_ddr(DDR_PLL_FREQ, &ioregs, &rut_ddr3_data,
                   &rut_ddr3_cmd_ctrl_data, &rut_ddr3_emif_reg_data, 0);
 }
 
@@ -140,13 +143,13 @@ static struct cpsw_slave_data cpsw_slaves[] = {
        {
                .slave_reg_ofs  = 0x208,
                .sliver_reg_ofs = 0xd80,
-               .phy_id         = 1,
+               .phy_addr       = 1,
                .phy_if         = PHY_INTERFACE_MODE_RMII,
        },
        {
                .slave_reg_ofs  = 0x308,
                .sliver_reg_ofs = 0xdc0,
-               .phy_id         = 0,
+               .phy_addr       = 0,
                .phy_if         = PHY_INTERFACE_MODE_RMII,
        },
 };
@@ -171,7 +174,7 @@ static struct cpsw_platform_data cpsw_data = {
 };
 
 #if defined(CONFIG_DRIVER_TI_CPSW) || \
-       (defined(CONFIG_USB_ETHER) && defined(CONFIG_MUSB_GADGET))
+       (defined(CONFIG_USB_ETHER) && defined(CONFIG_USB_MUSB_GADGET))
 int board_eth_init(bd_t *bis)
 {
        struct ctrl_dev *cdev = (struct ctrl_dev *)CTRL_DEVICE_BASE;
@@ -179,7 +182,7 @@ int board_eth_init(bd_t *bis)
        int rv;
 
 #ifndef CONFIG_SPL_BUILD
-       factoryset_setenv();
+       factoryset_env_set();
 #endif
 
        /* Set rgmii mode and enable rmii clock to be sourced from chip */
@@ -397,7 +400,7 @@ static int conf_disp_pll(int m, int n)
 #if defined(DISPL_PLL_SPREAD_SPECTRUM)
        writel(0x64, &cmwkup->resv6[3]); /* 0x50 */
        writel(0x800, &cmwkup->resv6[2]); /* 0x4c */
-       writel(readl(&cmwkup->clkmoddplldisp) | (1 << 12),
+       writel(readl(&cmwkup->clkmoddplldisp) | CM_CLKMODE_DPLL_SSC_EN_MASK,
               &cmwkup->clkmoddplldisp); /* 0x98 */
 #endif
        return 0;
@@ -464,4 +467,27 @@ static int board_video_init(void)
        return 0;
 }
 #endif /* ifdef CONFIG_VIDEO */
+
+#ifdef CONFIG_BOARD_LATE_INIT
+int board_late_init(void)
+{
+       int ret;
+       char tmp[2 * MAX_STRING_LENGTH + 2];
+
+       omap_nand_switch_ecc(1, 8);
+
+       if (factory_dat.asn[0] != 0)
+               sprintf(tmp, "%s_%s", factory_dat.asn,
+                       factory_dat.comp_version);
+       else
+               strcpy(tmp, "QMX7.E38_4.0");
+
+       ret = env_set("boardid", tmp);
+       if (ret)
+               printf("error setting board id\n");
+
+       return 0;
+}
+#endif
+
 #include "../common/board.c"