Convert CONFIG_SYS_DEVICE_NULLDEV to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_DEVICE_NULLDEV

Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/common/Kconfig b/common/Kconfig
index 62d78c5..5a6d0e0 100644
--- a/common/Kconfig
+++ b/common/Kconfig
@@ -635,6 +635,22 @@
 	  removed (for example a USB keyboard) then this option can be
 	  enabled to ensure this is handled correctly.
 
+config SPL_SYS_STDIO_DEREGISTER
+	bool "Allow deregistering stdio devices in SPL"
+	help
+	  Generally there is no need to deregister stdio devices since they
+	  are never deactivated. But if a stdio device is used which can be
+	  removed (for example a USB keyboard) then this option can be
+	  enabled to ensure this is handled correctly. This is very rarely
+	  needed in SPL.
+
+config SYS_DEVICE_NULLDEV
+	bool "Enable a null device for stdio"
+	help
+	  Enable creation of a "nulldev" stdio device. This allows silent
+	  operation of the console by setting stdout to "nulldev". Enable
+	  this to use a serial console under board control.
+
 endmenu
 
 menu "Logging"
diff --git a/configs/M5249EVB_defconfig b/configs/M5249EVB_defconfig
index d4871c6..8f8a4a6 100644
--- a/configs/M5249EVB_defconfig
+++ b/configs/M5249EVB_defconfig
@@ -5,6 +5,7 @@
 CONFIG_TARGET_M5249EVB=y
 CONFIG_DEFAULT_DEVICE_TREE="M5249EVB"
 CONFIG_SYS_CONSOLE_INFO_QUIET=y
+CONFIG_SYS_DEVICE_NULLDEV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 # CONFIG_CMDLINE_EDITING is not set
 # CONFIG_AUTOBOOT is not set
diff --git a/configs/colibri_pxa270_defconfig b/configs/colibri_pxa270_defconfig
index 89e0560..2865730 100644
--- a/configs/colibri_pxa270_defconfig
+++ b/configs/colibri_pxa270_defconfig
@@ -10,6 +10,7 @@
 CONFIG_ENV_VARS_UBOOT_CONFIG=y
 CONFIG_USE_BOOTARGS=y
 CONFIG_BOOTARGS="console=tty0 console=ttyS0,115200"
+CONFIG_SYS_DEVICE_NULLDEV=y
 # CONFIG_DISPLAY_BOARDINFO is not set
 CONFIG_DISPLAY_BOARDINFO_LATE=y
 # CONFIG_CMDLINE_EDITING is not set
diff --git a/doc/README.silent b/doc/README.silent
index 6d90a0e..00288e0 100644
--- a/doc/README.silent
+++ b/doc/README.silent
@@ -19,7 +19,7 @@
  - When the console devices have been initialized, "stdout" and
    "stderr" are set to "nulldev", so subsequent messages are
    suppressed automatically. Make sure to enable "nulldev" by
-   #defining CONFIG_SYS_DEVICE_NULLDEV in your board config file.
+   enabling CONFIG_SYS_DEVICE_NULLDEV in your board defconfig file.
 
  - When booting a linux kernel, the "bootargs" are fixed up so that
    the argument "console=" will be in the command line, no matter how
diff --git a/include/configs/M5249EVB.h b/include/configs/M5249EVB.h
index de71329..1a1a110 100644
--- a/include/configs/M5249EVB.h
+++ b/include/configs/M5249EVB.h
@@ -31,8 +31,6 @@
  */
 #undef CONFIG_BOOTP_BOOTFILESIZE
 
-#define CONFIG_SYS_DEVICE_NULLDEV	1	/* include nulldev device	*/
-
 #define CONFIG_SYS_LOAD_ADDR		0x200000	/* default load address */
 
 /*
diff --git a/include/configs/colibri_pxa270.h b/include/configs/colibri_pxa270.h
index 4686b89..3dedcda 100644
--- a/include/configs/colibri_pxa270.h
+++ b/include/configs/colibri_pxa270.h
@@ -69,8 +69,6 @@
 #define	CONFIG_BOOTP_BOOTFILESIZE
 #endif
 
-#define	CONFIG_SYS_DEVICE_NULLDEV	1
-
 /*
  * Clock Configuration
  */
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index 5c6790b..14d5e4c 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -2117,7 +2117,6 @@
 CONFIG_SYS_DEFAULT_LPDDR2_TIMINGS
 CONFIG_SYS_DEFAULT_VIDEO_MODE
 CONFIG_SYS_DEF_EEPROM_ADDR
-CONFIG_SYS_DEVICE_NULLDEV
 CONFIG_SYS_DFU_DATA_BUF_SIZE
 CONFIG_SYS_DFU_MAX_FILE_SIZE
 CONFIG_SYS_DIAG_ADDR