aboutsummaryrefslogtreecommitdiff
path: root/hw/misc/aspeed_sdmc.c
diff options
context:
space:
mode:
authorCédric Le Goater <clg@kaod.org>2016-09-22 18:13:06 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-09-22 18:13:06 +0100
commitb2fd45458d294e0a8a7c559881788d8642958bb7 (patch)
treee8aae3337f3ef3b96bc01e103bee20378d798188 /hw/misc/aspeed_sdmc.c
parent3755f9e3164360ca34dcc77d842ce1d41321db4e (diff)
downloadqemu-b2fd45458d294e0a8a7c559881788d8642958bb7.zip
qemu-b2fd45458d294e0a8a7c559881788d8642958bb7.tar.gz
qemu-b2fd45458d294e0a8a7c559881788d8642958bb7.tar.bz2
aspeed: use error_report instead of LOG_GUEST_ERROR
Also change the default value used in case of an error. The minimum size is a bit severe, so let's just use an average RAM size. Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-id: 1473438177-26079-13-git-send-email-clg@kaod.org Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'hw/misc/aspeed_sdmc.c')
-rw-r--r--hw/misc/aspeed_sdmc.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/hw/misc/aspeed_sdmc.c b/hw/misc/aspeed_sdmc.c
index 1d28252..20bcdb5 100644
--- a/hw/misc/aspeed_sdmc.c
+++ b/hw/misc/aspeed_sdmc.c
@@ -9,6 +9,7 @@
#include "qemu/osdep.h"
#include "qemu/log.h"
+#include "qemu/error-report.h"
#include "hw/misc/aspeed_sdmc.h"
#include "hw/misc/aspeed_scu.h"
#include "hw/qdev-properties.h"
@@ -151,13 +152,13 @@ static int ast2400_rambits(void)
case 512:
return ASPEED_SDMC_DRAM_512MB;
default:
- qemu_log_mask(LOG_GUEST_ERROR, "%s: Invalid RAM size: 0x"
- RAM_ADDR_FMT "\n", __func__, ram_size);
break;
}
- /* set a minimum default */
- return ASPEED_SDMC_DRAM_64MB;
+ /* use a common default */
+ error_report("warning: Invalid RAM size 0x" RAM_ADDR_FMT
+ ". Using default 256M", ram_size);
+ return ASPEED_SDMC_DRAM_256MB;
}
static int ast2500_rambits(void)
@@ -172,13 +173,13 @@ static int ast2500_rambits(void)
case 1024:
return ASPEED_SDMC_AST2500_1024MB;
default:
- qemu_log_mask(LOG_GUEST_ERROR, "%s: Invalid RAM size: 0x"
- RAM_ADDR_FMT "\n", __func__, ram_size);
break;
}
- /* set a minimum default */
- return ASPEED_SDMC_AST2500_128MB;
+ /* use a common default */
+ error_report("warning: Invalid RAM size 0x" RAM_ADDR_FMT
+ ". Using default 512M", ram_size);
+ return ASPEED_SDMC_AST2500_512MB;
}
static void aspeed_sdmc_reset(DeviceState *dev)