From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dinh Nguyen Date: Fri, 7 Aug 2015 15:26:04 -0500 Subject: [U-Boot] [PATCH 1/6] arm: socfpga: scan: Clean up scan_chain_engine_is_idle() In-Reply-To: <1438611733-7373-1-git-send-email-marex@denx.de> References: <1438611733-7373-1-git-send-email-marex@denx.de> Message-ID: <55C5145C.30209@opensource.altera.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 8/3/15 9:22 AM, Marek Vasut wrote: > Rework this function so it's clear that it is only polling for certain > bits to be cleared. Add kerneldoc. Fix it's return value to be either > 0 on success and -ETIMEDOUT on error and propagate this through the > scan manager code. > > Signed-off-by: Marek Vasut > --- > arch/arm/mach-socfpga/include/mach/scan_manager.h | 9 ---- > arch/arm/mach-socfpga/scan_manager.c | 53 +++++++++++++++-------- > 2 files changed, 34 insertions(+), 28 deletions(-) > [...] > @@ -16,26 +28,26 @@ static const struct socfpga_scan_manager *scan_manager_base = > static const struct socfpga_freeze_controller *freeze_controller_base = > (void *)(SOCFPGA_SYSMGR_ADDRESS + SYSMGR_FRZCTRL_ADDRESS); > > -/* > +/** > + * scan_chain_engine_is_idle() - Check if the JTAG scan chain is idle > + * @max_iter: Maximum number of iterations to wait for idle > + * > * Function to check IO scan chain engine status and wait if the engine is > * is active. Poll the IO scan chain engine till maximum iteration reached. > */ > -static inline uint32_t scan_chain_engine_is_idle(uint32_t max_iter) > +static u32 scan_chain_engine_is_idle(uint32_t max_iter) Should you go ahead and change this to u32? Only comment, otherwise: Acked-by: Dinh Nguyen Thanks, Dinh