From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Warren Date: Thu, 19 Feb 2009 21:39:26 -0800 Subject: [U-Boot] Query on timeouts with NetSetTimeout In-Reply-To: <19F8576C6E063C45BE387C64729E739403FA90441B@dbde02.ent.ti.com> References: <19F8576C6E063C45BE387C64729E739403FA90441B@dbde02.ent.ti.com> Message-ID: <499E420E.9060204@gmail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Minikandan, Pillai, Manikandan wrote: > Hi, > > Recently I ran into some timeout issues with Ethernet on U-Boot 2009.01 for OMAP3 EVM boards. > > NetSetTimeout() function provide a way to get timeouts for network related operations. I understand > From the code now that the NetSetTimeout() function takes 2 params , the 1st being the timeout value > and the second one being the function to be invoked when timeout expires. > The issue is now the NetSetTimeout() takes timeout in milliseconds only i.e the first parameter has > to be a count in milliseconds. > > The NetSetTimeout() invokes get_timer() to do its operations. The get_timer() should return the > counter value. It's not always true that the counter runs at millisecond clock. I believe the earlier > versions of the NetSetTimeout calls in u-boot/net directory used to have a multiple of > CONFIG_SYS_HZ for timeout that could easily be used to get required timeout for different platforms. > get_timer() is expected to return milliseconds. If your architecture isn't doing this it should be fixed. You'll find much about this in the archives. regards, Ben