Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3299119ioa; Tue, 26 Apr 2022 00:19:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgDhDDPKZ3IHZvqO+UM6daCELMLQrnJZoIkWDUmq3j2iCFgegkjR43tgR4L6iNotwRHGgK X-Received: by 2002:a05:6a00:23d2:b0:4fa:f262:719 with SMTP id g18-20020a056a0023d200b004faf2620719mr23173821pfc.4.1650957587702; Tue, 26 Apr 2022 00:19:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650957587; cv=none; d=google.com; s=arc-20160816; b=bjsJ9qQoB8xRTpsRuon1mmnsnXiIros4NhFBSVKl9IJ4rXXz4nGjka7ZuJUuAzeWbt 88FvnNgwCap1gJqfSyraXYJHc4gDDssGuevAg/fxxsvD1lEMNAhA6U17/dKqThx2oBFz HqzPbEQhdL6ypwlDZ2EAsh7n4eb2RI7lW1wl8838dU1SsKnqVRSOT4j+FDyjtvMjJbHz D/gjA5DqNxkygxKePUg3t7vV4fOD2RUjrFyIWjFGeP2FydxEwpgM7/xbFRjxo29X2LUT djCNxLm7NBcA7YK9Z3yhD8/tQIN4tYpfF7iwjegZi+chAsM2A2eD2+qVQftec5mq/mjt JgOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=1FqatMv/6PzW/Iw5dr/rHHVca8kotB0x5MKbrf27csA=; b=V3A2+lJAEapt/7AsqWoyRXLTTZEcXTAFEgghZJOJEMZbi4z7PXU1bLAZhjcAxumMUb agxnP6z1NvSn/hlnc4eZjQXkpiyP8vK/IoVyB+ETpfyBYwKL4P0rNeyl/cyQ/FL1iMOf UO3lIR6BmMerbX3hQtkQdBK3Kz78Ez0vVvc0R57cbVbL+Z0cXzmm5V+GyZGb/G9vGYhK EGedgiZlaXd1w5YElC84brSjpzWM2rz0K023VZwFZMo/RIeObOr+ypz/xKnQ1Q3ooEm/ jUTEuR8CIF4ARkOKHwBeswTiwqTvmfA12mglCzgFKXWPqH+qoaBKHD5G5GrDBkQ+qxSW Xy0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=H7jlhwwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id nd7-20020a17090b4cc700b001d97aa1a56asi1421702pjb.187.2022.04.26.00.19.33; Tue, 26 Apr 2022 00:19:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=H7jlhwwD; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmx.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245308AbiDYVIl (ORCPT + 99 others); Mon, 25 Apr 2022 17:08:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42028 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbiDYVIj (ORCPT ); Mon, 25 Apr 2022 17:08:39 -0400 Received: from mout.gmx.net (mout.gmx.net [212.227.15.15]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97AD42612C for ; Mon, 25 Apr 2022 14:05:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1650920714; bh=2SinOKWBnYwh2Ez74Ny/iUhC1XiNGTZebW2WMKJ0ubI=; h=X-UI-Sender-Class:Date:From:To:Cc:Subject:References:In-Reply-To; b=H7jlhwwDTay1T74diKlSORH0Pv2/mVRZ0wAKG1wHm1Q3HNIxCkxt1JeQxQmBQkm/7 J40nKM7mrLXZ7CgD0gJsKLtwcqt2yIMTCGECDoTOnPxnA6B/JxMt5zwUxvzVK7iPfg bTngpbBY6ItXnFSxedYBkxwI7IadX6HvY3pXlRFY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.103]) by mail.gmx.net (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MYeQr-1nMOO92lJj-00VhIn; Mon, 25 Apr 2022 23:05:14 +0200 Date: Mon, 25 Apr 2022 23:05:12 +0200 From: Jonathan =?utf-8?Q?Neusch=C3=A4fer?= To: Linus Walleij Cc: Arnd Bergmann , "Verdun, Jean-Marie" , Daniel Lezcano , Linux Kernel Mailing List , Joel Stanley , "Hawkins, Nick" , Thomas Gleixner , OpenBMC Maillist Subject: Re: [PATCH v5 04/11] clocksource/drivers: Add HPE GXP timer Message-ID: References: <20220421192132.109954-1-nick.hawkins@hpe.com> <20220421192132.109954-5-nick.hawkins@hpe.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="gPm3dkYWD93jriOi" Content-Disposition: inline In-Reply-To: X-Provags-ID: V03:K1:qHKJGgTrT6rptDoQmCaR5/ooQ1RbWgCkWERKZg4FKnl54DurbY9 /PnSE0q4TbnF4XcudxKc/bCV3O8Qi0qYwy9qngDLVe7dRMximXWDiF+Ll3EnffCQfA83zxr SgaLaLEgSMoG86Vtdvrk9JIeEM96kwXd/NlDB6b5khdILv5EDfhsdP5QtQ/jWkZ3jjOPHZ7 ObeA5vSZYNcml2YfaPYoA== X-UI-Out-Filterresults: notjunk:1;V03:K0:PfseJihy3hs=:w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dr4HE4DHVf7QdHZgKO4mNdsEcLY0qzYO2Fl0mbw9JIzBxC7 meb5KClRPudfzI= X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --gPm3dkYWD93jriOi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 25, 2022 at 10:38:08PM +0200, Linus Walleij wrote: > On Fri, Apr 22, 2022 at 3:16 PM Arnd Bergmann wrote: [...] > The ixp4xx driver looks like that because the register range used for > the timer and the watchdog is combined, i.e. it is a single IP block: >=20 > timer@c8005000 { > compatible =3D "intel,ixp4xx-timer"; > reg =3D <0xc8005000 0x100>; > interrupts =3D <5 IRQ_TYPE_LEVEL_HIGH>; > }; >=20 > Device tree probing does not allow two devices to probe from the same > DT node, so this was solved by letting the (less important) watchdog > be spawn as a platform device from the timer. >=20 > I don't know if double-probing for the same register range can be fixed, > but I was assuming that the one-compatible-to-one-driver assumption > was pretty hard-coded into the abstractions. Maybe it isn't? >=20 > Another way is of course to introduce an MFD. That becomes > problematic in another way: MFD abstractions are supposed to > be inbetween the resource and the devices it spawns, and with > timers/clocksources this creates a horrible special-casing since the > MFD bus (the parent may be providing e.g. an MMIO regmap) > then need to be early-populated and searched by the timer core > from TIMER_OF_DECLARE() early in boot. >=20 > So this solution was the lesser evil that I could think about. Nuvoton NPCM platforms use yet another approach: timer0: timer@8000 { compatible =3D "nuvoton,npcm750-timer"; interrupts =3D ; reg =3D <0x8000 0x1C>; clocks =3D <&clk NPCM7XX_CLK_TIMER>; }; watchdog0: watchdog@801C { compatible =3D "nuvoton,npcm750-wdt"; interrupts =3D ; reg =3D <0x801C 0x4>; status =3D "disabled"; clocks =3D <&clk NPCM7XX_CLK_TIMER>; }; The watchdog control register is in the same register block, but represented by a separate DT node. (not necessarily a recommendation, but it is another existing approach.) Jonathan --gPm3dkYWD93jriOi Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEvHAHGBBjQPVy+qvDCDBEmo7zX9sFAmJnDNYACgkQCDBEmo7z X9utyw/+PQptdpmTDI9uz/64ZcyzJ7h8qjbmSrTHrfF2rk+MMvLysUgWCEyLZ3fl XJUpVAtcF6KJAVrj3yekWbcTqrC9RoHvJ3Wi5X26z/ij3up5ASlVW2NXLPs3dv4i TZ+5EbASXoMTETwwt6Q6nLxTt29oYpO2W/1xBUYcoj/NvIFAH/p025kLCJrNJvrG dGvnMbOmVHVfaNNKgK/tDS393lVWbyLOaqvg5vPgMiBogsqwh9YqcvAN6ES/8vQ+ TzQ2FMIdRcS/27PwXOVpOT0XuwNsOsUCNDfCl8ckLV3MlZLDOGb9NE6HiVQBCYZe VchyHb1gIaAcMAP7Y3nu+IFIy55+KRV1XjiogslO7yi6o6qrDAO8w8abyqbWeGnp 4ayx3qvjENa5/uVB05xpc2YMpF+tQ8nbayKSVh+oWbTmOWJFmRL0dfHghoUEI3WA 8zRhcJJzp98WvinsIAGp3vGm3Xd3k5oLvZg2DtchaZJsH8rJ4/TFgxoyappYn1PA PouDWjnFQelznYJFrxQJVbJbNMP3Nz9kh1kSyAmCBqMhlAyjuOYdvhYcskKfIoyU GLCckgHze9BVIjpSZ7/Unmcybc2TTJ+duxUkzrLGZqjM+40YuSvqkSVEbwk4MRNg DXJe8kmLQ6UFziCFGWta164HWrNVCXZgbuFUWpmLlG9iCVAZyNg= =SEJz -----END PGP SIGNATURE----- --gPm3dkYWD93jriOi--