From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 18 Oct 2018 21:25:42 -0600 Subject: [U-Boot] [PATCH] drivers: serial: probe all serial devices In-Reply-To: References: <1539562189-3137-1-git-send-email-vabhav.sharma@nxp.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Bin, On 15 October 2018 at 06:28, Bin Meng wrote: > On Mon, Oct 15, 2018 at 8:15 PM Vabhav Sharma wrote: >> >> Serial subsystem search and probe only one first serial >> device and unable to use remaining available UART devices >> >> This patch changes the logic to probe all available serial devices >> using platform data or device tree in DM model in order to use all >> UART devices >> >> Signed-off-by: Vabhav Sharma >> --- >> drivers/serial/Kconfig | 12 ++++++++++++ >> drivers/serial/serial-uclass.c | 42 ++++++++++++++++++++++++++++++++++++++++++ >> 2 files changed, 54 insertions(+) >> > > Looks more and more devices have requirement to be probed during boot. > Guess we should handle such in a unified way? How about: - in dm_init(), after binding, we move on to an auto-probe step - a uclass flag indicates that all devices in that uclass must be probed (that will be useful for PCI) - a way to tell DM to probe all devices in a particular uclass (e.g. a call to dm_set_uclass_autoprobe(enum uclass_id, bool) (that will be useful for this serial case) Regards, Simon