From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joe Hershberger Date: Wed, 11 Feb 2015 00:08:47 -0600 Subject: [U-Boot] [RFC PATCH v3 01/14] dm: core: Allow seq numbers to be resolved before probe In-Reply-To: References: <1422923925-5572-1-git-send-email-joe.hershberger@ni.com> <1423618233-11397-1-git-send-email-joe.hershberger@ni.com> <1423618233-11397-2-git-send-email-joe.hershberger@ni.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 Simon, On Tue, Feb 10, 2015 at 10:39 PM, Simon Glass wrote: > > Hi Joe, > > On 10 February 2015 at 18:30, Joe Hershberger wrote: > > Before this patch, if the sequence numbers were resolved before probe, > > this code would insist on defining new non-conflicting-with-itself seq > > numbers. Now any "non -1" seq number is accepted as already resolved. > > Can you explain what problem this solves? At present, when probing a > device, ->seq must be -1 (sort-of by definition since it doesn't exist > as an active device in the uclass). Please look at eth_post_bind() in patch 07/14. The Ethernet devices need to write their hardware addresses to the registers in bind (since it needs to happen regardless of the device being used so that Linux will see the MAC address). As such, the sequence number is needed to look up the ethaddr. In order to avoid probing all the devices to get the seq number resolved, I resolve it in post_bind to avoid the rest of the overhead (thus no longer probing in post_bind, which was one of the issues previously). Then when probe comes along, the seq is already resolved. That's why this patch is needed. Thanks, -Joe