sandbox: Move CONFIG_SANDBOX_SERIAL to Kconfig
Move this over to Kconfig and tidy up.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/serial/serial-uclass.c b/drivers/serial/serial-uclass.c
index 5674d5e..815fec3 100644
--- a/drivers/serial/serial-uclass.c
+++ b/drivers/serial/serial-uclass.c
@@ -32,7 +32,7 @@
struct udevice *dev;
int node;
- if (OF_CONTROL) {
+ if (OF_CONTROL && gd->fdt_blob) {
/* Check for a chosen console */
node = fdtdec_get_chosen_node(gd->fdt_blob, "stdout-path");
if (node < 0)
@@ -54,7 +54,8 @@
return;
}
}
- } else {
+ }
+ if (!SPL_BUILD || !OF_CONTROL || !gd->fdt_blob) {
/*
* Try to use CONFIG_CONS_INDEX if available (it is numbered
* from 1!).