From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Vasut Date: Thu, 2 Jul 2015 20:31:37 +0200 Subject: [U-Boot] [PATCH 04/11] imx-common: add syscounter driver In-Reply-To: <1435834988-13032-5-git-send-email-Peng.Fan@freescale.com> References: <1435834988-13032-1-git-send-email-Peng.Fan@freescale.com> <1435834988-13032-5-git-send-email-Peng.Fan@freescale.com> Message-ID: <201507022031.37143.marex@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday, July 02, 2015 at 01:03:01 PM, Peng Fan wrote: > syscounter exists on i.MX6UL and i.MX7D, so implement the driver > in imx-common. > If want to use syscounter, define CONFIG_SYSCOUNTER_TIMER; if > still want to use GPT timer, #define CONFIG_GPT_TIMER. > > Signed-off-by: Ye.Li > Signed-off-by: Peng Fan > --- > arch/arm/imx-common/Makefile | 7 +- > arch/arm/imx-common/syscounter.c | 124 > +++++++++++++++++++++++++++ arch/arm/imx-common/timer.c | > 8 +- > arch/arm/include/asm/imx-common/syscounter.h | 29 +++++++ > 4 files changed, 164 insertions(+), 4 deletions(-) > create mode 100644 arch/arm/imx-common/syscounter.c > create mode 100644 arch/arm/include/asm/imx-common/syscounter.h Can this be converted to generic timer framework (see lib/time.c) ? I think it can , which would trim down this body of code considerably. Best regards, Marek Vasut