From patchwork Thu Feb 28 15:03:26 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fadil Berisha X-Patchwork-Id: 224110 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 998482C0294 for ; Fri, 1 Mar 2013 02:04:03 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1002E4A0C2; Thu, 28 Feb 2013 16:04:02 +0100 (CET) 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 fV4U+fhFAIiA; Thu, 28 Feb 2013 16:04:01 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 596304A095; Thu, 28 Feb 2013 16:04:00 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5BF1B4A058 for ; Thu, 28 Feb 2013 16:03:58 +0100 (CET) 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 pynLnj7oO65Y for ; Thu, 28 Feb 2013 16:03:57 +0100 (CET) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) by theia.denx.de (Postfix) with ESMTPS id 43CE24A02F for ; Thu, 28 Feb 2013 16:03:57 +0100 (CET) Received: by mail-ie0-f175.google.com with SMTP id c12so2137350ieb.6 for ; Thu, 28 Feb 2013 07:03:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer; bh=ecMpIl9RMas75kJVMwD5Oswr7lTOo187O0thnt2T2KY=; b=xVi9k/Z9k5n7mYlwW4z4wXRgW09ziTijDIxEub6C9noSqU6/B5bIMKHc4pxM/W1XMN UkRBoE2YB932Wp6mQwSKlcgVniDFnBYSsmuiPvG9TR6aXsj8QhPJX9EkqdkGyWxBeZ5Y Mo0Gpy6FIBxtlK+Q/KAYwDSe9YUKMzjFtHbegsZ9/qvwJBWyN23HpmmlHuXhfIsYM6bU ZYR8GpsNk69FtE3hWV/G4Z246OXYErfELPPHDf0Yl9zwLHCqgW4yYodlhtLTnvBX0BpN TgGyzMo6cIkCwLkpBcGRPTkGs7848PiOE8lFNsuQXLuiO0PoUHGzHRaEkXB//oxXp885 28/w== X-Received: by 10.50.209.4 with SMTP id mi4mr3817817igc.40.1362063834085; Thu, 28 Feb 2013 07:03:54 -0800 (PST) Received: from localhost.localdomain (192-0-128-113.cpe.teksavvy.com. [192.0.128.113]) by mx.google.com with ESMTPS id s8sm5890550igs.0.2013.02.28.07.03.51 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 28 Feb 2013 07:03:53 -0800 (PST) From: Fadil Berisha To: Date: Thu, 28 Feb 2013 10:03:26 -0500 Message-Id: <1362063806-24667-1-git-send-email-f.koliqi@gmail.com> X-Mailer: git-send-email 1.7.10 Cc: Marek Vasut , Fabio Estevam , Fadil Berisha , Otavio Salvador Subject: [U-Boot] [PATCH] mxs: timrot: Rename local macros 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: Fadil Berisha Local macros apply to both iMX23 and iMX28. This patch renames local macros with attribute MX28 to MXS. Signed-off-by: Fadil Berisha Cc: Marek Vasut Cc: Otavio Salvador Cc: Fabio Estevam Cc: Stefano Babic Acked-by: Otavio Salvador Acked-by: Marek Vasut --- arch/arm/cpu/arm926ejs/mxs/timer.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/arm/cpu/arm926ejs/mxs/timer.c b/arch/arm/cpu/arm926ejs/mxs/timer.c index fc0a2af..61da0ca 100644 --- a/arch/arm/cpu/arm926ejs/mxs/timer.c +++ b/arch/arm/cpu/arm926ejs/mxs/timer.c @@ -46,22 +46,22 @@ DECLARE_GLOBAL_DATA_PTR; /* * This driver uses 1kHz clock source. */ -#define MX28_INCREMENTER_HZ 1000 +#define MXS_INCREMENTER_HZ 1000 static inline unsigned long tick_to_time(unsigned long tick) { - return tick / (MX28_INCREMENTER_HZ / CONFIG_SYS_HZ); + return tick / (MXS_INCREMENTER_HZ / CONFIG_SYS_HZ); } static inline unsigned long time_to_tick(unsigned long time) { - return time * (MX28_INCREMENTER_HZ / CONFIG_SYS_HZ); + return time * (MXS_INCREMENTER_HZ / CONFIG_SYS_HZ); } /* Calculate how many ticks happen in "us" microseconds */ static inline unsigned long us_to_tick(unsigned long us) { - return (us * MX28_INCREMENTER_HZ) / 1000000; + return (us * MXS_INCREMENTER_HZ) / 1000000; } int timer_init(void) @@ -136,17 +136,17 @@ ulong get_timer(ulong base) } /* We use the HW_DIGCTL_MICROSECONDS register for sub-millisecond timer. */ -#define MX28_HW_DIGCTL_MICROSECONDS 0x8001c0c0 +#define MXS_HW_DIGCTL_MICROSECONDS 0x8001c0c0 void __udelay(unsigned long usec) { uint32_t old, new, incr; uint32_t counter = 0; - old = readl(MX28_HW_DIGCTL_MICROSECONDS); + old = readl(MXS_HW_DIGCTL_MICROSECONDS); while (counter < usec) { - new = readl(MX28_HW_DIGCTL_MICROSECONDS); + new = readl(MXS_HW_DIGCTL_MICROSECONDS); /* Check if the timer wrapped. */ if (new < old) { @@ -171,5 +171,5 @@ void __udelay(unsigned long usec) ulong get_tbclk(void) { - return MX28_INCREMENTER_HZ; + return MXS_INCREMENTER_HZ; }