From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Sat, 19 Dec 2020 11:40:37 -0500 Subject: [PATCH v3 04/28] dm: core: Add a new sequence number for devices In-Reply-To: <20201217042034.411902-3-sjg@chromium.org> References: <20201217042034.411902-3-sjg@chromium.org> <20201217042034.411902-1-sjg@chromium.org> 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 At present each device has two sequence numbers, with 'req_seq' being set up at bind time and 'seq' at probe time. The idea is that devices can 'request' a sequence number and then the conflicts are resolved when the device is probed. This makes things complicated in a few cases, since we don't really know what the sequence number will end up being. We want to honour the bind-time requests if at all possible, but in fact the only source of these at present is the devicetree aliases. Since we have the devicetree available at bind time, we may as well just use it, in the hope that the required processing will turn out to be useful later (i.e. the device actually gets used). Add a new 'sqq' member, the bind-time sequence number. It operates in parallel to the old values for now. All devices get a valid sqq value, i.e. it is never -1. Drop an #ifdef while we are here. Signed-off-by: Simon Glass --- (no changes since v2) Changes in v2: - Give all devices a sequence number - Drop uclass_alloc_all_seqs() and GD_FLG_DM_NO_SEQ flag drivers/core/device.c | 22 ++++++++++++++++------ drivers/core/root.c | 8 +++++--- include/dm/device.h | 8 ++++++++ 3 files changed, 29 insertions(+), 9 deletions(-) Applied to u-boot-dm/next, thanks!