help
The size of the RX buffer (needs to be power of 2)
+config SERIAL_SEARCH_ALL
+ bool "Search for serial devices after default one failed"
+ depends on DM_SERIAL
+ help
+ The serial subsystem only searches for a single serial device
+ that was instantiated, but does not check whether it was probed
+ correctly. With this option set, we make successful probing
+ mandatory and search for fallback serial devices if the default
+ device does not work.
+
+ If unsure, say N.
+
config SPL_DM_SERIAL
bool "Enable Driver Model for serial drivers in SPL"
depends on DM_SERIAL
{
const void *blob = gd->fdt_blob;
struct udevice *dev;
+#ifdef CONFIG_SERIAL_SEARCH_ALL
int ret;
+#endif
if (CONFIG_IS_ENABLED(OF_PLATDATA)) {
uclass_first_device(UCLASS_SERIAL, &dev);
#else
#define INDEX 0
#endif
+
+#ifdef CONFIG_SERIAL_SEARCH_ALL
if (!uclass_get_device_by_seq(UCLASS_SERIAL, INDEX, &dev) ||
!uclass_get_device(UCLASS_SERIAL, INDEX, &dev)) {
if (dev->flags & DM_FLAG_ACTIVATED) {
return;
}
}
+#else
+ if (!uclass_get_device_by_seq(UCLASS_SERIAL, INDEX, &dev) ||
+ !uclass_get_device(UCLASS_SERIAL, INDEX, &dev) ||
+ (!uclass_first_device(UCLASS_SERIAL, &dev) && dev)) {
+ gd->cur_serial_dev = dev;
+ return;
+ }
+#endif
+
#undef INDEX
}