Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3370711imm; Mon, 4 Jun 2018 02:23:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIEnOaQkPUrobOuMfCmY/E9OCiTLt9ZQmw3Va94u1D2dfJSvIHAyvLhpxM+KknVx0XTgPLI X-Received: by 2002:a17:902:a716:: with SMTP id w22-v6mr20607213plq.215.1528104206110; Mon, 04 Jun 2018 02:23:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528104206; cv=none; d=google.com; s=arc-20160816; b=REQk7zscafOwO70zozmWkcq1gj6QJaGxhIrUMoyL8Mif4ElU1D+klczu2RJg+UrqN0 lUaP1MxA9dE2YiwXzZUDXt0fxfpiQzTiwxqB6ksFsZIDCY3FzXp0/AgPRtAqWOsi3I80 Yr4+rFdl4M9RGmjjaTlq3GYfzpiJdKMjDD+hY2yu0mAH0a49fuPnaY3OiHxL0wCb1Usi v1PolDhvcbUP+iD7pifQ+z8XjYMOrO3/jOniX60n5m/YW3bN/8LuoNXG0jjB0LoJ3X/W 2QEA7QrK4FbABQdbtGnq/bBkiq8CMwI4NPlMCcAFIqEZiZ6sqq3zSIQp4jc4NLHr1nRz Twug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature:arc-authentication-results; bh=s95I9TXoPltahIAapA0szDnpGswEA5qc3uCmJdIJJmM=; b=b0NdQOcII4nRMzLmpdHhxoBBCYMgCfTAb/K9+MgM1DYZXsbLUKV+bsV+alVYaQCVyG AhWE6gS6NR5qrhXvL+hm3jL/6vRpPkebV1rtOtGTSfZK7zMsrK5u84VYUmxTctazmruw b2tLIjuEM2iOwTIl1Q8bxyZCTP3hmT0e9nC/UXj9AAvPiyT/3UDlDq5hvgPXS48skg8a YK+1lbA5RWmCw8joWWqzUBnFDGP+0rfJvu/uUyioYURYW8CySdphfSFcsLIHnJPJGZyN VRnYpRFGstfqwCvU4fuSVXR8O7gqsrM+UNY3vxrsSLRChqrLkCt8J6Gjzgbq2ZScW61c oYSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fcp4H7FW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i9-v6si6045076pgs.418.2018.06.04.02.23.11; Mon, 04 Jun 2018 02:23:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Fcp4H7FW; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751796AbeFDJVo (ORCPT + 99 others); Mon, 4 Jun 2018 05:21:44 -0400 Received: from mail-yw0-f194.google.com ([209.85.161.194]:39354 "EHLO mail-yw0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750866AbeFDJVm (ORCPT ); Mon, 4 Jun 2018 05:21:42 -0400 Received: by mail-yw0-f194.google.com with SMTP id 81-v6so6628098ywb.6; Mon, 04 Jun 2018 02:21:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=s95I9TXoPltahIAapA0szDnpGswEA5qc3uCmJdIJJmM=; b=Fcp4H7FWODQtJ68iB7bnqnCdwWmPEnKccsTzFVoLbRCZYuAy//ohvNKnCXU0LarXho oyyVr1x/284uxMvl286tkm2WemChumB+doe7WQOfXi/Wx2MiZLqDO0foC48mpXdIez5L vDdhfDyPFLnK+40UwrJiD6umi2dj+9ftHtDyFD8XI3rn7pu+jCiidIgipB8pbbNtLeGS +ExlUHVfLss08xcUYLHuhPjaBR044PALAe2h8YaDPEwuV629q/tFG8WbxD1U14QTeV+R 8PJKRktJARh/bQClo9Y0Wngn67cNhCEbk0jTTh1aZ52kvIrx6/R+1pIa4KI9kt9/jAq1 FE6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=s95I9TXoPltahIAapA0szDnpGswEA5qc3uCmJdIJJmM=; b=jrga0GZG8vwdWHOGBrgja5/L0wxYnqLSG1bUkRxccJA7b4EhfKYU/wlgt4lOSDoUwA TdSo6Yr2Nl1aCrOxJSadIrxAM6VUPtir69y7Rf1DSh+kIfuwgOVidowgeaFsVCyTio39 Aq/7G/8FOzP2tik4gnOEBQchaYokI4z1BtaayUm+wyVvpK0xjSR8TH15SxOCsjxK5vf6 xOtyDoHn+2abpSrdAITubjXONYHHvE12sl3CU18O1bkT/3/B+T1lM5V/AFvNUO2Zx0vT ngkmYild2yBKzDMqgPGvGX2XqH30XWNnErmHpi8GxSfpARB18wfMnJdmWXTUSkkztmSW 2f2g== X-Gm-Message-State: ALKqPwd7nZGnWVzkQJVYetrBfRE8r6BsMR88l+M9X9hAaNCGd1dh+rOM sjJ2mNPZLqjhU+fV6OHBqUH+lcR77hSuuZVmo+o= X-Received: by 2002:a81:9285:: with SMTP id j127-v6mr10102025ywg.377.1528104101487; Mon, 04 Jun 2018 02:21:41 -0700 (PDT) MIME-Version: 1.0 References: <20180530120327.27681-1-peron.clem@gmail.com> <20180530120327.27681-5-peron.clem@gmail.com> <677be207-67be-ccbc-8bb3-ab90bf9d05a7@mentor.com> In-Reply-To: <677be207-67be-ccbc-8bb3-ab90bf9d05a7@mentor.com> From: =?UTF-8?B?Q2zDqW1lbnQgUMOpcm9u?= Date: Mon, 4 Jun 2018 11:21:30 +0200 Message-ID: Subject: Re: [PATCH v4 4/5] clocksource: add driver for i.MX EPIT timer To: Vladimir Zapolskiy Cc: Colin Didier , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Lezcano , Thomas Gleixner , Fabio Estevam , Sascha Hauer , Rob Herring , NXP Linux Team , Pengutronix Kernel Team , =?UTF-8?Q?Cl=C3=A9ment_Peron?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Vladimir, On Thu, 31 May 2018 at 10:36, Vladimir Zapolskiy wrote: > > Hi Cl=C3=A9ment, > > On 05/30/2018 03:03 PM, Cl=C3=A9ment P=C3=A9ron wrote: > > From: Colin Didier > > > > Add driver for NXP's EPIT timer used in i.MX 6 family of SoC. > > > > Signed-off-by: Colin Didier > > Signed-off-by: Cl=C3=A9ment Peron > > --- > > [snip] > > > +++ b/drivers/clocksource/timer-imx-epit.c > > @@ -0,0 +1,281 @@ > > +// SPDX-License-Identifier: GPL-2.0 > > +/* > > + * i.MX EPIT Timer > > + * > > + * Copyright (C) 2010 Sascha Hauer > > + * Copyright (C) 2018 Colin Didier > > + * Copyright (C) 2018 Cl=C3=A9ment P=C3=A9ron > > + */ > > + > > +#include > > +#include > > +#include > > The included header above still can be removed. Ok. > > I have no more comments about the code, I will try to find time to > test the driver, but please don't take it as a promise. Regarding the clks, i think the management of the ipg clk in the driver is useless has it is already handled by the imx clk driver. I remove the ipg clk and test it on i.MX6Q. My test is limited to disabled the GPT and enabled the EPIT in the device-t= ree &gpt { status =3D "disabled"; }; &epit1 { status =3D "okay"; }; [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.17.0-rc6 (cperon@cperon-Latitude-7490) (gcc version 6.4.1 20170707 (Linaro GCC 6.4-2017.08)) #1 SMP PREEMPT Mon Jun 4 11:13:41 CEST 2018 [ 0.000000] CPU: ARMv7 Processor [412fc09a] revision 10 (ARMv7), cr=3D10= c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] OF: fdt: Machine model: Devialet Aerobase [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] Normal zone: 2048 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 262144 pages, LIFO batch:31 [ 0.000000] random: get_random_bytes called from start_kernel+0x80/0x398 with crng_init=3D0 [ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s35084 r8192 d22260 u65536 [ 0.000000] pcpu-alloc: s35084 r8192 d22260 u65536 alloc=3D16*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 26009= 6 [ 0.000000] Kernel command line: console=3Dttymxc0,115200 root=3D/dev/nfs rw nfsroot=3D192.168.0.4:/opt/nfsroot,v3,tcp ip=3Ddhcp [ 0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 by= tes) [ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 byte= s) [ 0.000000] Memory: 1029544K/1048576K available (6144K kernel code, 194K rwdata, 1312K rodata, 1024K init, 224K bss, 19032K reserved, 0K cma-reserved) [ 0.000000] Virtual kernel memory layout: [ 0.000000] SLUB: HWalign=3D64, Order=3D0-3, MinObjects=3D0, CPUs=3D4, N= odes=3D1 [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Tasks RCU enabled.\x00 [ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16 [ 0.000000] L2C-310 errata 752271 769419 enabled [ 0.000000] L2C-310 enabling early BRESP for Cortex-A9 [ 0.000000] L2C-310 full line of zeros enabled for Cortex-A9 [ 0.000000] L2C-310 ID prefetch enabled, offset 16 lines [ 0.000000] L2C-310 dynamic clock gating enabled, standby mode enabled [ 0.000000] L2C-310 cache controller enabled, 16 ways, 1024 kB [ 0.000000] L2C-310: CACHE_ID 0x410000c7, AUX_CTRL 0x76470001 [ 0.000012] sched_clock: 32 bits at 66MHz, resolution 15ns, wraps every 32537631224ns [ 0.000032] clocksource: epit: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 28958491609 ns [ 0.001231] Calibrating delay loop... 1560.57 BogoMIPS (lpj=3D780288) [ 0.008161] pid_max: default: 32768 minimum: 301 [ 0.008336] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.008360] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 by= tes) [ 0.009042] CPU: Testing write buffer coherency: ok [ 0.009506] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.014238] Setting up static identity map for 0x10100000 - 0x10100060 [ 0.015207] Hierarchical SRCU implementation. [ 0.017208] smp: Bringing up secondary CPUs ... [ 0.029147] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.041146] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.053146] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.053321] smp: Brought up 1 node, 4 CPUs [ 0.053340] SMP: Total of 4 processors activated (6303.74 BogoMIPS). [ 0.053349] CPU: All CPU(s) started in SVC mode. [ 0.054441] devtmpfs: initialized [ 0.063770] VFP support v0.3: implementor 41 architecture 3 part 30 variant 9 rev 4 [ 0.064454] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000 ns [ 0.064477] futex hash table entries: 1024 (order: 4, 65536 bytes) [ 0.064742] pinctrl core: initialized pinctrl subsystem [ 0.066693] NET: Registered protocol family 16 [ 0.068623] DMA: preallocated 256 KiB pool for atomic coherent allocatio= ns [ 0.071654] cpuidle: using governor menu [ 0.071802] CPU identified as i.MX6Q, silicon rev 1.2 > > -- > With best wishes, > Vladimir