summaryrefslogtreecommitdiff
path: root/board/esd/meesc/meesc.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/esd/meesc/meesc.c')
-rw-r--r--board/esd/meesc/meesc.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/board/esd/meesc/meesc.c b/board/esd/meesc/meesc.c
index e4bda7909a..0c5900a15a 100644
--- a/board/esd/meesc/meesc.c
+++ b/board/esd/meesc/meesc.c
@@ -181,7 +181,7 @@ int checkboard(void)
puts("Board: EtherCAN/2 Gateway");
break;
}
- if (getenv_f("serial#", str, sizeof(str)) > 0) {
+ if (env_get_f("serial#", str, sizeof(str)) > 0) {
puts(", serial# ");
puts(str);
}
@@ -198,7 +198,7 @@ void get_board_serial(struct tag_serialnr *serialnr)
{
char *str;
- char *serial = getenv("serial#");
+ char *serial = env_get("serial#");
if (serial) {
str = strchr(serial, '_');
if (str && (strlen(str) >= 4)) {
@@ -231,7 +231,8 @@ int misc_init_r(void)
* In some cases this this needs to be set to 4.
* Check the user has set environment mdiv to 4 to change the divisor.
*/
- if ((str = getenv("mdiv")) && (strcmp(str, "4") == 0)) {
+ str = env_get("mdiv");
+ if (str && (strcmp(str, "4") == 0)) {
writel((readl(&pmc->mckr) & ~AT91_PMC_MDIV) |
AT91SAM9_PMC_MDIV_4, &pmc->mckr);
at91_clock_init(CONFIG_SYS_AT91_MAIN_CLOCK);
@@ -247,13 +248,8 @@ int misc_init_r(void)
int board_early_init_f(void)
{
- at91_periph_clk_enable(ATMEL_ID_PIOA);
- at91_periph_clk_enable(ATMEL_ID_PIOB);
- at91_periph_clk_enable(ATMEL_ID_PIOCDE);
at91_periph_clk_enable(ATMEL_ID_UHP);
- at91_seriald_hw_init();
-
return 0;
}
@@ -268,9 +264,6 @@ int board_init(void)
#ifdef CONFIG_CMD_NAND
meesc_nand_hw_init();
#endif
-#ifdef CONFIG_HAS_DATAFLASH
- at91_spi0_hw_init(1 << 0);
-#endif
#ifdef CONFIG_MACB
meesc_macb_hw_init();
#endif