From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dinh Nguyen Date: Tue, 03 Feb 2015 21:58:57 -0600 Subject: [U-Boot] [PATCHv1 08/22] arm: socfpga: spl: Add call to timer_init In-Reply-To: <201501150045.59566.marex@denx.de> References: <1421253662-27222-1-git-send-email-dinguyen@opensource.altera.com> <1421253662-27222-9-git-send-email-dinguyen@opensource.altera.com> <201501150045.59566.marex@denx.de> Message-ID: <54D19901.5070509@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 On 1/14/15 5:45 PM, Marek Vasut wrote: > On Wednesday, January 14, 2015 at 05:40:48 PM, dinguyen at opensource.altera.com > wrote: >> From: Dinh Nguyen >> >> Signed-off-by: Dinh Nguyen > > You might want to check common/spl/spl.c , which implements most of the standard > SPL init procedure. It even includes the call to timer_init() there in > board_init_r() . I wonder if you really need to call it here one more time. > Do you ? > Your logic makes sense, but I think this timer_init() call in spl_board_init() is needed. The reason is that we are releasing the timer from reset in spl_board_init, and timer_init is getting called before spl_board_init. If I take out this timer_init, the SPL doesn't work so well. Dinh