summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/board_f.c3
-rw-r--r--common/cmd_cpu.c1
-rw-r--r--common/cmd_date.c12
-rw-r--r--common/cmd_sf.c8
4 files changed, 16 insertions, 8 deletions
diff --git a/common/board_f.c b/common/board_f.c
index fbbad1b..21be26f 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -753,6 +753,9 @@ static init_fnc_t init_sequence_f[] = {
#ifdef CONFIG_OF_CONTROL
fdtdec_setup,
#endif
+#if defined(CONFIG_X86) && defined(CONFIG_HAVE_FSP)
+ x86_fsp_init,
+#endif
#ifdef CONFIG_TRACE
trace_early_init,
#endif
diff --git a/common/cmd_cpu.c b/common/cmd_cpu.c
index c3e229f..b4af64f 100644
--- a/common/cmd_cpu.c
+++ b/common/cmd_cpu.c
@@ -9,6 +9,7 @@
#include <command.h>
#include <cpu.h>
#include <dm.h>
+#include <errno.h>
static const char *cpu_feature_name[CPU_FEAT_COUNT] = {
"L1 cache",
diff --git a/common/cmd_date.c b/common/cmd_date.c
index 61727e3..8714699 100644
--- a/common/cmd_date.c
+++ b/common/cmd_date.c
@@ -37,7 +37,7 @@ static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
int old_bus __maybe_unused;
/* switch to correct I2C bus */
-#ifdef CONFIG_DM_I2C
+#ifdef CONFIG_DM_RTC
struct udevice *dev;
rcode = uclass_get_device(UCLASS_RTC, 0, &dev);
@@ -57,7 +57,7 @@ static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
case 2: /* set date & time */
if (strcmp(argv[1],"reset") == 0) {
puts ("Reset RTC...\n");
-#ifdef CONFIG_DM_I2C
+#ifdef CONFIG_DM_RTC
rcode = dm_rtc_reset(dev);
if (!rcode)
rcode = dm_rtc_set(dev, &default_tm);
@@ -69,7 +69,7 @@ static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
puts("## Failed to set date after RTC reset\n");
} else {
/* initialize tm with current time */
-#ifdef CONFIG_DM_I2C
+#ifdef CONFIG_DM_RTC
rcode = dm_rtc_get(dev, &tm);
#else
rcode = rtc_get(&tm);
@@ -81,7 +81,7 @@ static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
break;
}
/* and write to RTC */
-#ifdef CONFIG_DM_I2C
+#ifdef CONFIG_DM_RTC
rcode = dm_rtc_set(dev, &tm);
#else
rcode = rtc_set(&tm);
@@ -96,7 +96,7 @@ static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
}
/* FALL TROUGH */
case 1: /* get date & time */
-#ifdef CONFIG_DM_I2C
+#ifdef CONFIG_DM_RTC
rcode = dm_rtc_get(dev, &tm);
#else
rcode = rtc_get(&tm);
@@ -120,7 +120,7 @@ static int do_date(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
/* switch back to original I2C bus */
#ifdef CONFIG_SYS_I2C
i2c_set_bus_num(old_bus);
-#elif !defined(CONFIG_DM_I2C)
+#elif !defined(CONFIG_DM_RTC)
I2C_SET_BUS(old_bus);
#endif
diff --git a/common/cmd_sf.c b/common/cmd_sf.c
index aef8c2a..3746e0d 100644
--- a/common/cmd_sf.c
+++ b/common/cmd_sf.c
@@ -303,8 +303,12 @@ static int do_spi_flash_read_write(int argc, char * const argv[])
else
ret = spi_flash_write(flash, offset, len, buf);
- printf("SF: %zu bytes @ %#x %s: %s\n", (size_t)len, (u32)offset,
- read ? "Read" : "Written", ret ? "ERROR" : "OK");
+ printf("SF: %zu bytes @ %#x %s: ", (size_t)len, (u32)offset,
+ read ? "Read" : "Written");
+ if (ret)
+ printf("ERROR %d\n", ret);
+ else
+ printf("OK\n");
}
unmap_physmem(buf, len);