Received: by 2002:ac0:b08d:0:0:0:0:0 with SMTP id l13csp2139668imc; Fri, 22 Feb 2019 19:18:29 -0800 (PST) X-Google-Smtp-Source: AHgI3IbDKFWdMCIKiJkjTSUgHLM/CmUi/seSVpoEugXCC9JqaAiSc7yVnoh0z1LiViTI3DTSaHPU X-Received: by 2002:a62:6383:: with SMTP id x125mr7379757pfb.239.1550891909000; Fri, 22 Feb 2019 19:18:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1550891908; cv=none; d=google.com; s=arc-20160816; b=QHxiyN2+WDZ5ox/CAy4pdCIxUQbtJ53yjQJ1nTBWuHT+/QkfjBhtk0ZWJExoLCmcrt oyFGBPErMugwtYjZiHngW8BADSZ0itStL4Qgp9b00vWOZrrgbHxEC+DLJcuGnRYsU6Xh gofGvN68xb0F5QRM5K46nHLMS2iZOhvgBrHAMWck9qf+NaimMwW4OPGWTO//0FWtR+Wi mUGzCd5BmV1+TlaH/ShStTUzjtOwNf5paSX7QuMSO/YQgZ/u+LG9oVVbtp22qQ0XqDRU eESPicFN1+9uLYDOTEvQjKWa1nCyXkUsb+qz14hWKDYTBCYBFLIcnnxiH2f9u38Kzyqy yyyw== 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:mime-version :references:in-reply-to:message-id:cc:to:subject:from:date :dkim-signature; bh=4KbSVb1ijM3oYHtM+13Cha0+e9uRIlTbHa9t0npCWgs=; b=gzeVrBe4iWs9occE5fbC8i2YICwieSgC1FsHe3Qb/IhmBsQ3htTrLrKX9BbRYBx8wB mbukPgNRKTURw/te5HVEZW4YlwPVGQ4TMKY0DkPdSXpm/0vrbO/IWhYm5IAXbXuuPk6t UK9XI+fUD0O+wedEnk698Es6Z+79hd6BVoWko74ZQSuDUs/pVnBZ3y35TaBdw8DqCo7w 4PwM5OuuhINss39D1onEqyks/t+zXeTrZVJmRvn/yI/rtt9Cn5QPbPy3+PBiqfsKJxAU +I42ONcIpg6Kysg5cBbjO2O9NU8xgRcYRWbEk+cwG5wKVW7yfwkLo+QtbqIi0LNjExxK 5n1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=Tw0ky+oF; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z23si2702976pgu.151.2019.02.22.19.18.12; Fri, 22 Feb 2019 19:18:28 -0800 (PST) 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=fail header.i=@crapouillou.net header.s=mail header.b=Tw0ky+oF; 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=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727673AbfBWDRx (ORCPT + 99 others); Fri, 22 Feb 2019 22:17:53 -0500 Received: from outils.crapouillou.net ([89.234.176.41]:52390 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726693AbfBWDRx (ORCPT ); Fri, 22 Feb 2019 22:17:53 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1550891868; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4KbSVb1ijM3oYHtM+13Cha0+e9uRIlTbHa9t0npCWgs=; b=Tw0ky+oFKuhLWQ5sTdT9Cj07RAhbsI1WuSjOGrpfDrdxJ/q1bM+6nEdLzevL7TX1gA6VA+ P0oQHXA9NrkX0lEaiWN+IRgfRCNYZraOUtG9v19rThwyDCv+vDcNbRso/J4SbLCo/UgHCH +KHiav28JGCtiEDS/ipBo4Z1vLA0oHc= Date: Sat, 23 Feb 2019 00:17:25 -0300 From: Paul Cercueil Subject: Re: [PATCH v8 05/26] clocksource: Add driver for the Ingenic JZ47xx OST To: Stephen Boyd Cc: Guenter Roeck , Mathieu Malaterre , Thierry Reding , Rob Herring , Mark Rutland , Daniel Lezcano , Thomas Gleixner , Ralf Baechle , Paul Burton , James Hogan , Jonathan Corbet , Ezequiel Garcia , PrasannaKumar Muralidharan , linux-pwm@vger.kernel.org, "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , LKML , linux-watchdog@vger.kernel.org, linux-mips@vger.kernel.org, linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, od@zcrc.me, Maarten ter Huurne Message-Id: <1550891845.20534.1@crapouillou.net> In-Reply-To: <1548370388.3881.2@crapouillou.net> References: <20181212220922.18759-1-paul@crapouillou.net> <20181212220922.18759-6-paul@crapouillou.net> <128675a5-7ede-4114-a649-89a536346dc8@roeck-us.net> <1548264353.3173.1@crapouillou.net> <20190123180155.GB9781@roeck-us.net> <154835808767.136743.14531363127962557756@swboyd.mtv.corp.google.com> <1548362788.3881.0@crapouillou.net> <154836998080.136743.17683029101430122926@swboyd.mtv.corp.google.com> <1548370388.3881.2@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed 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, Le jeu. 24 janv. 2019 =E0 19:53, Paul Cercueil a=20 =E9crit : >=20 >=20 > Le jeu. 24 janv. 2019 =E0 19:46, Stephen Boyd a=20 > =E9crit : >> Quoting Paul Cercueil (2019-01-24 12:46:28) >>>=20 >>>=20 >>> Le jeu. 24 janv. 2019 =E0 16:28, Stephen Boyd a >>> =E9crit : >>> > Quoting Guenter Roeck (2019-01-23 10:01:55) >>> >> On Wed, Jan 23, 2019 at 02:25:53PM -0300, Paul Cercueil wrote: >>> >> > Hi, >>> >> > >>> >> > Le mer. 23 janv. 2019 =C3 11:31, Guenter Roeck >>> >> a =C3=A9crit : >>> >> > >On 1/23/19 4:58 AM, Mathieu Malaterre wrote: >>> >> > >>On Wed, Dec 12, 2018 at 11:09 PM Paul Cercueil >>> >> >>> >> > >>wrote: >>> >> > >>> >>> >> > >>>From: Maarten ter Huurne >>> >> > >>> >>> >> > >>>OST is the OS Timer, a 64-bit timer/counter with buffered >>> >> reading. >>> >> > >>> >>> >> > >>>SoCs before the JZ4770 had (if any) a 32-bit OST; the=20 >>> =7F=7FJZ4770 >>> >> and >>> >> > >>>JZ4780 have a 64-bit OST. >>> >> > >>> >>> >> > >>>This driver will register both a clocksource and a=20 >>> =7F=7Fsched_clock >>> >> to the >>> >> > >>>system. >>> >> > >>> >>> >> > >>>Signed-off-by: Maarten ter Huurne >>> >> > >>>Signed-off-by: Paul Cercueil >>> >> > >>>--- >>> >> > >>> >>> >> > >>>Notes: >>> >> > >>> v5: New patch >>> >> > >>> >>> >> > >>> v6: - Get rid of SoC IDs; pass pointer to >>> >> ingenic_ost_soc_info >>> >> > >>>as >>> >> > >>> devicetree match data instead. >>> >> > >>> - Use device_get_match_data() instead of the=20 >>> of_* >>> >> variant >>> >> > >>> - Handle error of dev_get_regmap() properly >>> >> > >>> >>> >> > >>> v7: Fix section mismatch by using >>> >> > >>>builtin_platform_driver_probe() >>> >> > >>> >>> >> > >>> v8: builtin_platform_driver_probe() does not work >>> >> anymore in >>> >> > >>> 4.20-rc6? The probe function won't be called.=20 >>> =7F=7FWork >>> >> around >>> >> > >>>this >>> >> > >>> for now by using late_initcall. >>> >> > >>> >>> >> > > >>> >> > >Did anyone notice this ? Either something is wrong with the >>> >> driver, or >>> >> > >with the kernel core. Hacking around it seems like the worst >>> >> possible >>> >> > >"solution". >>> >> > >>> >> > I can confirm it still happens on 5.0-rc3. >>> >> > >>> >> > Just to explain what I'm doing: >>> >> > >>> >> > My ingenic-timer driver probes with=20 >>> =7F=7Fbuiltin_platform_driver_probe >>> >> (this >>> >> > works), >>> >> > and then calls of_platform_populate to probe its children.=20 >>> =7F=7FThis >>> >> driver, >>> >> > ingenic-ost, is one of them, and will fail to probe with >>> >> > builtin_platform_driver_probe. >>> >> > >>> >> >>> >> The big question is _why_ it fails to probe. >>> >> >>> > >>> > Are you sharing the device tree node between a 'normal' platform >>> > device >>> > driver and something more low level DT that marks the device's=20 >>> =7F=7Fbacking >>> > DT node as OF_POPULATED early on? That's my only guess why it's=20 >>> =7F=7Fnot >>> > working. >>>=20 >>> I do, but I clear the OF_POPULATED flag so that it is then probed=20 >>> =7F=7Fas a >>> normal platform device, and it's not on this driver's node but its >>> parent. >>>=20 >>=20 >> Where do you clear the OF_POPULATED flag? >>=20 >=20 > In the ingenic-timer driver introduced in patch [04/26], inside the=20 > probe function. Anything new on this? It still happens on 5.0-rc7. It probes with late_initcall, and not with device_initcall. I have no clue what's going on. -Paul =