From patchwork Tue Dec 20 06:53:29 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 88549 Delivered-To: patch@linaro.org Received: by 10.140.20.101 with SMTP id 92csp1575370qgi; Mon, 19 Dec 2016 22:54:44 -0800 (PST) X-Received: by 10.194.22.72 with SMTP id b8mr16354189wjf.124.1482216884347; Mon, 19 Dec 2016 22:54:44 -0800 (PST) Return-Path: Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id qp9si21395541wjc.142.2016.12.19.22.54.44; Mon, 19 Dec 2016 22:54:44 -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 2480AA7680; Tue, 20 Dec 2016 07:54:29 +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 Xmgj-Dv57sOu; Tue, 20 Dec 2016 07:54:28 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7DD36A7670; Tue, 20 Dec 2016 07:54:28 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 880C0B390E for ; Tue, 20 Dec 2016 07:54:26 +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 G1cKoLu2ZoJT for ; Tue, 20 Dec 2016 07:54:26 +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 31210A7670 for ; Tue, 20 Dec 2016 07:54:21 +0100 (CET) Received: from pug.jp.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-12.nifty.com with ESMTP id uBK6ratK015897; Tue, 20 Dec 2016 15:53:38 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-12.nifty.com uBK6ratK015897 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1482216818; bh=gQZlYzCUIxANmpSFOENMQ/TSa6mNRiVXHufi9PsZexU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HUPSzfuwba8rCx+1zo2SKvBsMNh+UebjRyzksaGv/NInwzt+12x7MDJKeUSZTGxkP 4gpvTgVyzi8mFp60/GMCpUL3M4E4sT3hN/C9kphB6I8VtgVoxRbqXM6kQni0RT96uA lqHTvXia8gjt78kFKwi3wrNWJf1nU182d/BpkAoyPgVRVEJItKvc6ApL6H0U1dNdvo ZlxBjgIxQOVu04JNDS9RXUccSOrw9Ke/QfdJwhJzs0pH/Qq1h4wury3vkcQYgCks4P Mo7nqASiHcFsjIvVs5i3usgo7V5x+oUQLCdEA79vNnDBXN7PjXxyHLx9rt41oAjj8B PqQD//pa3hcyA== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: u-boot@lists.denx.de Date: Tue, 20 Dec 2016 15:53:29 +0900 Message-Id: <1482216812-18379-3-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1482216812-18379-1-git-send-email-yamada.masahiro@socionext.com> References: <1482216812-18379-1-git-send-email-yamada.masahiro@socionext.com> Cc: Albert ARIBAUD , Joe Hershberger Subject: [U-Boot] [PATCH 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/timer.h. Signed-off-by: Masahiro Yamada --- 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 Reviewed-by: Simon Glass 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 */