Esempio n. 1
0
int saveenv(void)
{
#if !defined(CONFIG_SMDK6440)
#if defined(CONFIG_S5PC100) || defined(CONFIG_S5PC110) || defined(CONFIG_S5P6442)

        if (INF_REG3_REG == 2)
                saveenv_nand();
        else if (INF_REG3_REG == 3)
                saveenv_movinand();
        else if (INF_REG3_REG == 1)
                saveenv_onenand();
        else if (INF_REG3_REG == 4)
                saveenv_nor();
        else
                printf("Unknown boot device\n");
#else   // others
        if (INF_REG3_REG == 2 || INF_REG3_REG == 3)
                saveenv_nand();
        else if (INF_REG3_REG == 4 || INF_REG3_REG == 5 || INF_REG3_REG == 6)
                saveenv_nand_adv();
        else if (INF_REG3_REG == 0 || INF_REG3_REG == 7)
                saveenv_movinand();
        else if (INF_REG3_REG == 1)
                saveenv_onenand();
        else
                printf("Unknown boot device\n");

#endif
#else	// CONFIG_SMDK6440
        if (INF_REG3_REG == 3)
                saveenv_nand();
        else if (INF_REG3_REG == 4 || INF_REG3_REG == 5 || INF_REG3_REG == 6)
                saveenv_nand_adv();
        else if (INF_REG3_REG == 0 || INF_REG3_REG == 1 || INF_REG3_REG == 7)
                saveenv_movinand();
        else
                printf("Unknown boot device\n");
#endif

        return 0;
}
int saveenv(void)
{
        if (INF_REG3_REG == 1)
                saveenv_onenand();
//        else if (INF_REG3_REG == 2)
//                saveenv_nand();
#if defined(CONFIG_CMD_MOVINAND)
        else if (INF_REG3_REG == 3)
                saveenv_movinand();
#endif
        else
                printf("Unknown boot device\n");

        return 0;
}