From patchwork Wed Aug 22 20:10:11 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 179401 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 25B6C2C009E for ; Thu, 23 Aug 2012 06:10:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D78E62807E; Wed, 22 Aug 2012 22:10:44 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aVsiuypXyLJ5; Wed, 22 Aug 2012 22:10:44 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BD81628081; Wed, 22 Aug 2012 22:10:40 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id AE1AD28081 for ; Wed, 22 Aug 2012 22:10:37 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jmXNNb-24vid for ; Wed, 22 Aug 2012 22:10:36 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f172.google.com (mail-gg0-f172.google.com [209.85.161.172]) by theia.denx.de (Postfix) with ESMTPS id 9D89A2807E for ; Wed, 22 Aug 2012 22:10:34 +0200 (CEST) Received: by ggnh4 with SMTP id h4so1045246ggn.3 for ; Wed, 22 Aug 2012 13:10:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=zi+dxe1Od9IH9xNKUpa2PpMBf42BFx1aVvs7dxKpYXc=; b=G6mkmPL47JE/m9H5XjQfgWyJHQDzHZzxXKC7W5aj3ZVqY64AEk0e+co4FdK4aT7JXc zswkTa9ZLbplRfmw8bhuF4LEtqh1A+FRlAZFKmrMi6IvVHvFZmujGwh49sQW5cVelFBK ogRyGvcJYy9G9PWJ7ud8pHB5GbLL9rE0KotdxVT3qhHd0BIbsSKnDsB2O19+MdbZ18G4 Jr2Qc0OiPI06umK/5Y3Asmfa5bYoWnXkvjvLDqKWmEOBc1ouzFhUzTYQVfGYH+So97Ga BeBopXyarzPZwugs59pvOEowMHs4vh6D0dUUlPXlSYzeHpxpzWpjoToesMvIg45/cklR FT4w== Received: by 10.236.75.132 with SMTP id z4mr29460680yhd.25.1345666231461; Wed, 22 Aug 2012 13:10:31 -0700 (PDT) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([201.82.136.222]) by mx.google.com with ESMTPS id h8sm4907550ank.9.2012.08.22.13.10.28 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 13:10:30 -0700 (PDT) From: Fabio Estevam To: sbabic@denx.de Date: Wed, 22 Aug 2012 17:10:11 -0300 Message-Id: <1345666211-25992-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 Cc: marex@denx.de, u-boot@lists.denx.de, Fabio Estevam Subject: [U-Boot] [PATCH] mxs: Convert timeout parameter to 'unsigned int' X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Fabio Estevam > For representing a timeout value, it makes more sense to pass it as 'unsigned int'. Signed-off-by: Fabio Estevam Acked-by: Marek Vasut Acked-by: Stefano Babic --- arch/arm/cpu/arm926ejs/mxs/mxs.c | 6 ++++-- arch/arm/include/asm/arch-mxs/sys_proto.h | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/mxs.c b/arch/arm/cpu/arm926ejs/mxs/mxs.c index c028e5e..19c79f2 100644 --- a/arch/arm/cpu/arm926ejs/mxs/mxs.c +++ b/arch/arm/cpu/arm926ejs/mxs/mxs.c @@ -81,7 +81,8 @@ void enable_caches(void) #endif } -int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout) +int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, unsigned + int timeout) { while (--timeout) { if ((readl(®->reg) & mask) == mask) @@ -92,7 +93,8 @@ int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, int timeout) return !timeout; } -int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, int timeout) +int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, unsigned + int timeout) { while (--timeout) { if ((readl(®->reg) & mask) == 0) diff --git a/arch/arm/include/asm/arch-mxs/sys_proto.h b/arch/arm/include/asm/arch-mxs/sys_proto.h index 4610363..983b888 100644 --- a/arch/arm/include/asm/arch-mxs/sys_proto.h +++ b/arch/arm/include/asm/arch-mxs/sys_proto.h @@ -26,10 +26,10 @@ int mxs_reset_block(struct mxs_register_32 *reg); int mxs_wait_mask_set(struct mxs_register_32 *reg, uint32_t mask, - int timeout); + unsigned int timeout); int mxs_wait_mask_clr(struct mxs_register_32 *reg, uint32_t mask, - int timeout); + unsigned int timeout); int mxsmmc_initialize(bd_t *bis, int id, int (*wp)(int));