From patchwork Tue Dec 27 15:36:00 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 89108 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp5039884qgi; Tue, 27 Dec 2016 07:37:06 -0800 (PST) X-Received: by 10.28.225.138 with SMTP id y132mr29497490wmg.52.1482853026789; Tue, 27 Dec 2016 07:37:06 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id cv4si23466819wjb.220.2016.12.27.07.37.05; Tue, 27 Dec 2016 07:37:06 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) client-ip=85.214.87.163; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@nifty.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 85.214.87.163 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A2AAB391A; Tue, 27 Dec 2016 16:36:48 +0100 (CET) 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 1YzYK5CnN1Li; Tue, 27 Dec 2016 16:36:48 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 18FFAB38F5; Tue, 27 Dec 2016 16:36:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 82BBFB3925 for ; Tue, 27 Dec 2016 16:36:45 +0100 (CET) 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 0jq_AauJ8wVg for ; Tue, 27 Dec 2016 16:36:45 +0100 (CET) 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 conuserg-12.nifty.com (conuserg-12.nifty.com [210.131.2.79]) by theia.denx.de (Postfix) with ESMTPS id 2709FB391E for ; Tue, 27 Dec 2016 16:36:41 +0100 (CET) Received: from grover.sesame (FL1-111-169-71-157.osk.mesh.ad.jp [111.169.71.157]) (authenticated) by conuserg-12.nifty.com with ESMTP id uBRFa5RI030807; Wed, 28 Dec 2016 00:36:12 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com uBRFa5RI030807 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1482852972; bh=95yjy75KJgswugP0EkUSOKbQY+WOw9Vd8TqoepaYtQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eDs3z3J+M4JAKMprZVI4Vkye0KW0Wcam2uNFK6jaG78ibDCMd/fLKr5H7qh1i4PzL RUnJeMlJBFqCImfkZaJq/69oVzdxerdls9q5AZjOPH9YwjjN4D7bBtsJwOMNSqOyBA tT8wfGAG2Vaa4Qa4HSAwVBTJ1npcwY4q0bI9+Z25z2U7H/3b9GI7HeXWXGOjbxq4J6 NqupifOCxNrf2p8ftxfcQE+toF/mz3QaRWj6Qh18EZi/v86+e1xfghIHUGMsuzFILj +gcF/6olqUfNLbnUHARytG8i3IUALNLIqAvbrtJF1ilHRVStx+8HfORhAKlUx0nvNX 14Ygz14CtteCg== X-Nifty-SrcIP: [111.169.71.157] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Wed, 28 Dec 2016 00:36:00 +0900 Message-Id: <1482852963-6887-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482852963-6887-1-git-send-email-yamada.masahiro@socionext.com> References: <1482852963-6887-1-git-send-email-yamada.masahiro@socionext.com> Cc: Albert ARIBAUD , Joe Hershberger Subject: [U-Boot] [PATCH v2 2/5] time: move timer APIs to include/time.h X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The include/common.h is a collection of unrelated declarations, macros, etc. It is horrible to include such a cluttered header just for some timer functions. Split out timer functions into include/time.h. Signed-off-by: Masahiro Yamada Reviewed-by: Simon Glass --- Changes in v2: - Fix typo include/timer.h -> include/time.h include/common.h | 8 +------- include/time.h | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) create mode 100644 include/time.h -- 2.7.4 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot diff --git a/include/common.h b/include/common.h index 682205d..08f581c 100644 --- a/include/common.h +++ b/include/common.h @@ -17,6 +17,7 @@ typedef volatile unsigned char vu_char; #include #include +#include #include #include #include @@ -577,12 +578,6 @@ void ddr_enable_ecc(unsigned int dram_size); #endif #endif -/* - * Return the current value of a monotonically increasing microsecond timer. - * Granularity may be larger than 1us if hardware does not support this. - */ -ulong timer_get_us(void); - /* $(CPU)/cpu.c */ static inline int cpumask_next(int cpu, unsigned int mask) { @@ -721,7 +716,6 @@ void external_interrupt (struct pt_regs *); void irq_install_handler(int, interrupt_handler_t *, void *); void irq_free_handler (int); void reset_timer (void); -ulong get_timer (ulong base); /* Return value of monotonic microsecond timer */ unsigned long timer_get_us(void); diff --git a/include/time.h b/include/time.h new file mode 100644 index 0000000..5ed021f --- /dev/null +++ b/include/time.h @@ -0,0 +1,16 @@ +/* + * SPDX-License-Identifier: GPL-2.0+ + */ + +#ifndef _TIME_H +#define _TIME_H + +unsigned long get_timer(unsigned long base); + +/* + * Return the current value of a monotonically increasing microsecond timer. + * Granularity may be larger than 1us if hardware does not support this. + */ +unsigned long timer_get_us(void); + +#endif /* _TIME_H */