From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 58AFDEB64DA for ; Tue, 4 Jul 2023 11:25:51 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230385AbjGDLZu (ORCPT ); Tue, 4 Jul 2023 07:25:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230156AbjGDLZt (ORCPT ); Tue, 4 Jul 2023 07:25:49 -0400 Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC7969D; Tue, 4 Jul 2023 04:25:48 -0700 (PDT) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 2BC8A5C0393; Tue, 4 Jul 2023 07:25:48 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute6.internal (MEProxy); Tue, 04 Jul 2023 07:25:48 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1688469948; x=1688556348; bh=EqlpD8ctHndfSnkUlREzHKZC65GCu4q4Tsy hQ+ThTmI=; b=ggVhmnDy4OR3yU2/Lnq7+qH5v1CDYfosvqFClzK7RAkdyi1PRft DjfINRwwEB2g4RqBozaK7iOPx4dX1NinelFLcddjDnfJnuHCpavnPn+RMkpHwPjZ vzohlHfsDyAKTCpvkQjA1asVREd9ds+HuudOMl6ISubKTKCLABCecJFXdolfCkBK BijdTjlJlCaub41V7gerSzBlwcxIuQh8DIJEtZUushcYbs96t4bRSIfYDS277iQI BG2RWYgRxZUFRgNpuFz/XRYB4jpIFyE6lmYOtNj3ddqq5HzZTHtJTXSHege/nX4G JpbOLmh7roJuP//VQuzNxo44ltEez7Fklog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1688469948; x=1688556348; bh=EqlpD8ctHndfSnkUlREzHKZC65GCu4q4Tsy hQ+ThTmI=; b=VeMVfZIenI9jWN3jHWfyUc1R9e+WfmmsZoD0L0RVkdNlgZuQd/+ L1l8szSOaRkosMjJvDMaRdL5FWQ1+E5KpJQdNrN/tygAm2X/+d9cqSWk/fiqCj6z L8vy7OBYPB5NMvdWODQIxMQhlRm2ZvDIFPk3yNeWT0XEwcNVjVBGzdDmVw4zr6gx wL1+YqSMHtHIBcJP8XtRFhpkY0R1TzpZGr87LX1ozrtAbLBtUZCZmvZ69Npgy/+E Zr9lQIv/bjDiZSwFgPoWZAgztTCLkpc0LxTFJsUpKjnNhCRGXNe2mdF8O0nGb7zA AvhGxoL3bjs1g9jDPlJfRjsGPMeZ8zPqaGw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedrudeggdegtdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefofgggkfgjfhffhffvvefutgfgsehtqhertderreejnecuhfhrohhmpedftehr nhguuceuvghrghhmrghnnhdfuceorghrnhgusegrrhhnuggsrdguvgeqnecuggftrfgrth htvghrnhepgeefjeehvdelvdffieejieejiedvvdfhleeivdelveehjeelteegudektdfg jeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hrnhgusegrrhhnuggsrdguvg X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 23982B6008D; Tue, 4 Jul 2023 07:25:47 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-527-gee7b8d90aa-fm-20230629.001-gee7b8d90 Mime-Version: 1.0 Message-Id: <28a513fd-1e7c-4772-a3c1-f312938459ed@app.fastmail.com> In-Reply-To: References: <20230522105049.1467313-1-schnelle@linux.ibm.com> <20230522105049.1467313-31-schnelle@linux.ibm.com> Date: Tue, 04 Jul 2023 13:25:22 +0200 From: "Arnd Bergmann" To: "Geert Uytterhoeven" , "Niklas Schnelle" Cc: "Alessandro Zummo" , "Alexandre Belloni" , "Greg Kroah-Hartman" , "Bjorn Helgaas" , =?UTF-8?Q?Uwe_Kleine-K=C3=B6nig?= , "Mauro Carvalho Chehab" , "Alan Stern" , "Rafael J . Wysocki" , "Paul Walmsley" , "Palmer Dabbelt" , "Albert Ou" , linux-kernel@vger.kernel.org, Linux-Arch , linux-pci@vger.kernel.org, "Arnd Bergmann" , linux-rtc@vger.kernel.org, "David S. Miller" Subject: Re: [PATCH v5 30/44] rtc: add HAS_IOPORT dependencies Content-Type: text/plain;charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-arch@vger.kernel.org On Tue, Jul 4, 2023, at 10:06, Geert Uytterhoeven wrote: > Hi Niklas, > > On Mon, May 22, 2023 at 12:51=E2=80=AFPM Niklas Schnelle wrote: >> In a future patch HAS_IOPORT=3Dn will result in inb()/outb() and frie= nds >> not being declared. We thus need to add HAS_IOPORT as dependency for >> those drivers using them. >> >> Co-developed-by: Arnd Bergmann >> Signed-off-by: Arnd Bergmann >> Signed-off-by: Niklas Schnelle > > Thanks for your patch, which is now commit 8bb12adb214b2d7c ("rtc: > add HAS_IOPORT dependencies") upstream. > >> --- a/drivers/rtc/Kconfig >> +++ b/drivers/rtc/Kconfig >> @@ -1193,7 +1195,7 @@ config RTC_DRV_MSM6242 >> >> config RTC_DRV_BQ4802 >> tristate "TI BQ4802" >> - depends on HAS_IOMEM >> + depends on HAS_IOMEM && HAS_IOPORT >> help >> If you say Y here you will get support for the TI >> BQ4802 RTC chip. > > This driver can use either iomem or ioport. > By adding a dependency on HAS_IOPORT, it can no longer be used > on platforms that provide HAS_IOMEM only. You are correct, we could allow building this driver even without IOPORT and make it use ioport_map() or an #ifdef. > Probably the driver should be refactored to make it use only > the accessors that are available. Since the driver itself has no DT support, it looks like the only way it can be used is from the sparc64/ultra45 wrapper, but that architecture always provides CONFIG_IOPORT, so I don't think it makes any difference in the end. We can change this again if another user comes up. It might be good to know whether the machine uses a memory or I/O resource in its device tree. Arnd