Message ID | 20230314121216.413434-29-schnelle@linux.ibm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5915:0:0:0:0:0 with SMTP id v21csp1721728wrd; Tue, 14 Mar 2023 05:17:56 -0700 (PDT) X-Google-Smtp-Source: AK7set+G2PObBQmxMlGsEc+gahgaq10lby9ms3kAMYh2PpAqXKHBmoAr0HLft+Bf2D+Ze0sqzVCn X-Received: by 2002:a17:90a:359:b0:233:fdfd:7122 with SMTP id 25-20020a17090a035900b00233fdfd7122mr41286443pjf.37.1678796276154; Tue, 14 Mar 2023 05:17:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1678796276; cv=none; d=google.com; s=arc-20160816; b=kWvUDsURW0agalo415RV2ZzPmldR6wIxRbiI+tbDn5aSAqiFvhgnx4IkWQXVvy2Wdq 6CdAq9jXpqf3UvD4nzo4zx8qZRnrwuk5GLZG3Lp4Elv4o+zKI29Fjyrs76fj8lE7IWSr pj4b3bOBtYfbPy6crH5mhg9WN7OZhFILBm4rSW7l2dzsw0AL0KZV4LaGyYSoUDt+S16I 8cFyZ1F+nT1OA7CVpTF3NfL4ASJVMzMJMvBWUlL950fMYuTq4zKKiBvZMt7gKefPluJR sqSnaBn7QwDqltVkOoTuJyeIk5g6oQh/nmSJXYBj0EhPtG9WP5JRQCfYZsFr1G++Knhe 6TmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=4s5IzeE50FKgT5lCLIC3rUk2mGkqu67OQKlzgenEORU=; b=HP29M4uPwqQkx2AYT9YFB5INB4z50DXvr1OsPgeJct6eTaLF1jxiXuDm68ApAfBKb9 A6VqhbmfNg3GEhYL9+IF1Cb1VoPVYkwPn55l/SHWAl+0I+1Bp307hkj8OXKjfeAcwxI+ Z8Nma4Eyd2mVWmrUysZlkGvELuTwNZC0ewZS54C9ABJu/KGEFdUeVJtI3WH7RWe+I5a3 OQiVGIpR5u4vn7cIVpLx98j+ZNDbqTjzrST0kToD58FxYEbM6IF3jvhTpcjkSC3noOeW dSeC0/zAUb8xQ5k7doCkOumN0/fMsyuph67VmbO3qJaT//lRwzgw36Z35bGeeUbM1MZy w0pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=mzcd+nuv; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lp15-20020a17090b4a8f00b00235563071d3si2594339pjb.75.2023.03.14.05.17.38; Tue, 14 Mar 2023 05:17:56 -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=@ibm.com header.s=pp1 header.b=mzcd+nuv; 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=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231787AbjCNMQN (ORCPT <rfc822;realc9580@gmail.com> + 99 others); Tue, 14 Mar 2023 08:16:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55992 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231948AbjCNMOv (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 14 Mar 2023 08:14:51 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62F7FA17D4; Tue, 14 Mar 2023 05:13:45 -0700 (PDT) Received: from pps.filterd (m0187473.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32EBJfXW004950; Tue, 14 Mar 2023 12:12:52 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-transfer-encoding; s=pp1; bh=4s5IzeE50FKgT5lCLIC3rUk2mGkqu67OQKlzgenEORU=; b=mzcd+nuvqoVoReILcFQr7mLizX0YEBh0rbn+2KdFCHnkmPCyf/eg+ekdCGIn4D+i8YdI xw2PFUy9qDE5oeFjtT3DQierBKtsGCFnD45mPuQJD6wmICnxA1qk/2aRVQWEwtHqpTyz /650AhHy6GdVu6QiHDEsaCK12DGZr4uGN3VoiGR4tLSwCaKlYzxeEqYAmEEJTxWy6kBs 1envjOADScs4NTJYmQ81oOhBgp4LDCIhH5kdZk2r5RCAVhfk9QkCubVLxIjqtGVyJueA S6tHxENqXcuc+4/fSaqYeTzRoJUS5sS8Z9HxUDCuaeWBH1OLnElKQTBsmTcq2TMkAjvx xQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pap49cmq0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:52 +0000 Received: from m0187473.ppops.net (m0187473.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 32EAc9H5037490; Tue, 14 Mar 2023 12:12:51 GMT Received: from ppma04ams.nl.ibm.com (63.31.33a9.ip4.static.sl-reverse.com [169.51.49.99]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3pap49cmne-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:51 +0000 Received: from pps.filterd (ppma04ams.nl.ibm.com [127.0.0.1]) by ppma04ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 32E6few9028628; Tue, 14 Mar 2023 12:12:48 GMT Received: from smtprelay03.fra02v.mail.ibm.com ([9.218.2.224]) by ppma04ams.nl.ibm.com (PPS) with ESMTPS id 3p8h96msmy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 14 Mar 2023 12:12:48 +0000 Received: from smtpav05.fra02v.mail.ibm.com (smtpav05.fra02v.mail.ibm.com [10.20.54.104]) by smtprelay03.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 32ECCkNh27198134 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 14 Mar 2023 12:12:46 GMT Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E72DF2007D; Tue, 14 Mar 2023 12:12:45 +0000 (GMT) Received: from smtpav05.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6C30A2007A; Tue, 14 Mar 2023 12:12:45 +0000 (GMT) Received: from tuxmaker.boeblingen.de.ibm.com (unknown [9.152.85.9]) by smtpav05.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 14 Mar 2023 12:12:45 +0000 (GMT) From: Niklas Schnelle <schnelle@linux.ibm.com> To: Arnd Bergmann <arnd@arndb.de>, Alessandro Zummo <a.zummo@towertech.it>, Alexandre Belloni <alexandre.belloni@bootlin.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Bjorn Helgaas <bhelgaas@google.com>, =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>, Mauro Carvalho Chehab <mchehab@kernel.org>, Alan Stern <stern@rowland.harvard.edu>, "Rafael J. Wysocki" <rafael@kernel.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linux-pci@vger.kernel.org, Arnd Bergmann <arnd@kernel.org>, linux-rtc@vger.kernel.org Subject: [PATCH v3 28/38] rtc: add HAS_IOPORT dependencies Date: Tue, 14 Mar 2023 13:12:06 +0100 Message-Id: <20230314121216.413434-29-schnelle@linux.ibm.com> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20230314121216.413434-1-schnelle@linux.ibm.com> References: <20230314121216.413434-1-schnelle@linux.ibm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: DlOU3Lpa4pwpaG9dyu6d7RQ6cpkrfNi9 X-Proofpoint-ORIG-GUID: G27jwAgQCa0xo34Ec3NOSW-wx8e6dyr1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-14_06,2023-03-14_02,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 malwarescore=0 clxscore=1011 bulkscore=0 spamscore=0 mlxlogscore=818 phishscore=0 mlxscore=0 impostorscore=0 adultscore=0 lowpriorityscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2303140103 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1760345483603864984?= X-GMAIL-MSGID: =?utf-8?q?1760345483603864984?= |
Series |
Kconfig: Introduce HAS_IOPORT config option
|
|
Commit Message
Niklas Schnelle
March 14, 2023, 12:12 p.m. UTC
In a future patch HAS_IOPORT=n will result in inb()/outb() and friends
not being declared. We thus need to add HAS_IOPORT as dependency for
those drivers using them.
Co-developed-by: Arnd Bergmann <arnd@kernel.org>
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
---
drivers/rtc/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Comments
Hello, On 14/03/2023 13:12:06+0100, Niklas Schnelle wrote: > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > not being declared. We thus need to add HAS_IOPORT as dependency for > those drivers using them. > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > --- > drivers/rtc/Kconfig | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig > index 5a71579af0a1..20aa77bf0a9f 100644 > --- a/drivers/rtc/Kconfig > +++ b/drivers/rtc/Kconfig > @@ -956,6 +956,7 @@ comment "Platform RTC drivers" > config RTC_DRV_CMOS > tristate "PC-style 'CMOS'" > depends on X86 || ARM || PPC || MIPS || SPARC64 > + depends on HAS_IOPORT Did you check that this will not break platforms that doesn't have RTC_PORT defined? > default y if X86 > select RTC_MC146818_LIB > help > @@ -976,6 +977,7 @@ config RTC_DRV_CMOS > config RTC_DRV_ALPHA > bool "Alpha PC-style CMOS" > depends on ALPHA > + depends on HAS_IOPORT > select RTC_MC146818_LIB > default y > help > @@ -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. > -- > 2.37.2 >
On Tue, 2023-03-14 at 13:52 +0100, Alexandre Belloni wrote: > Hello, > > On 14/03/2023 13:12:06+0100, Niklas Schnelle wrote: > > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > > not being declared. We thus need to add HAS_IOPORT as dependency for > > those drivers using them. > > > > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > > --- > > drivers/rtc/Kconfig | 4 +++- > > 1 file changed, 3 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig > > index 5a71579af0a1..20aa77bf0a9f 100644 > > --- a/drivers/rtc/Kconfig > > +++ b/drivers/rtc/Kconfig > > @@ -956,6 +956,7 @@ comment "Platform RTC drivers" > > config RTC_DRV_CMOS > > tristate "PC-style 'CMOS'" > > depends on X86 || ARM || PPC || MIPS || SPARC64 > > + depends on HAS_IOPORT > > Did you check that this will not break platforms that doesn't have RTC_PORT defined? > > From what I can tell the CMOS_READ() macro this driver relies on uses some form of inb() style I/O port access in all its definitions. So my understanding is that this device is always accessed via I/O ports even if the variants differ slightly and would make no sense on a platform without any way of accessing I/O ports which is what lack of HAS_IOPORT means. From what I can see even without RTC_PORT being defined the CMOS_READ is still used. Hope that answers your question?
On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote: > On Tue, 2023-03-14 at 13:52 +0100, Alexandre Belloni wrote: >> Hello, >> >> On 14/03/2023 13:12:06+0100, Niklas Schnelle wrote: >> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends >> > not being declared. We thus need to add HAS_IOPORT as dependency for >> > those drivers using them. >> > >> > Co-developed-by: Arnd Bergmann <arnd@kernel.org> >> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> >> > --- >> > drivers/rtc/Kconfig | 4 +++- >> > 1 file changed, 3 insertions(+), 1 deletion(-) >> > >> > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig >> > index 5a71579af0a1..20aa77bf0a9f 100644 >> > --- a/drivers/rtc/Kconfig >> > +++ b/drivers/rtc/Kconfig >> > @@ -956,6 +956,7 @@ comment "Platform RTC drivers" >> > config RTC_DRV_CMOS >> > tristate "PC-style 'CMOS'" >> > depends on X86 || ARM || PPC || MIPS || SPARC64 >> > + depends on HAS_IOPORT >> >> Did you check that this will not break platforms that doesn't have RTC_PORT defined? >> > > > From what I can tell the CMOS_READ() macro this driver relies on uses > some form of inb() style I/O port access in all its definitions. So my > understanding is that this device is always accessed via I/O ports even > if the variants differ slightly and would make no sense on a platform > without any way of accessing I/O ports which is what lack of HAS_IOPORT > means. From what I can see even without RTC_PORT being defined the > CMOS_READ is still used. Hope that answers your question? I think the m68k/atari and mips/dec variants don't necessarily qualify as PIO, those are really just pointer dereferences, and they don't use the actual inb/outb functions. On atari, it looks like HAS_IOPORT may be set if ATARI_ROM_ISA is, but on dec it's never enabled. Arnd
Hi Arnd, On Mon, May 8, 2023 at 10:01 PM Arnd Bergmann <arnd@arndb.de> wrote: > On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote: > > On Tue, 2023-03-14 at 13:52 +0100, Alexandre Belloni wrote: > >> On 14/03/2023 13:12:06+0100, Niklas Schnelle wrote: > >> > In a future patch HAS_IOPORT=n will result in inb()/outb() and friends > >> > not being declared. We thus need to add HAS_IOPORT as dependency for > >> > those drivers using them. > >> > > >> > Co-developed-by: Arnd Bergmann <arnd@kernel.org> > >> > Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com> > >> > --- > >> > drivers/rtc/Kconfig | 4 +++- > >> > 1 file changed, 3 insertions(+), 1 deletion(-) > >> > > >> > diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig > >> > index 5a71579af0a1..20aa77bf0a9f 100644 > >> > --- a/drivers/rtc/Kconfig > >> > +++ b/drivers/rtc/Kconfig > >> > @@ -956,6 +956,7 @@ comment "Platform RTC drivers" > >> > config RTC_DRV_CMOS > >> > tristate "PC-style 'CMOS'" > >> > depends on X86 || ARM || PPC || MIPS || SPARC64 > >> > + depends on HAS_IOPORT > >> > >> Did you check that this will not break platforms that doesn't have RTC_PORT defined? > >> > > > > > From what I can tell the CMOS_READ() macro this driver relies on uses > > some form of inb() style I/O port access in all its definitions. So my > > understanding is that this device is always accessed via I/O ports even > > if the variants differ slightly and would make no sense on a platform > > without any way of accessing I/O ports which is what lack of HAS_IOPORT > > means. From what I can see even without RTC_PORT being defined the > > CMOS_READ is still used. Hope that answers your question? > > I think the m68k/atari and mips/dec variants don't necessarily > qualify as PIO, those are really just pointer dereferences, and > they don't use the actual inb/outb functions. > > On atari, it looks like HAS_IOPORT may be set if ATARI_ROM_ISA > is, but on dec it's never enabled. Atari does not use RTC_DRV_CMOS, but still relies on generic RTC instead. Last time (in 2013?) I tried converting to RTC_DRV_CMOS by registering an "rtc_cmos" platform device, I couldn't get it to work. Gr{oetje,eeting}s, Geert
On Tue, May 9, 2023, at 08:38, Geert Uytterhoeven wrote: > On Mon, May 8, 2023 at 10:01 PM Arnd Bergmann <arnd@arndb.de> wrote: >> On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote: >> >> I think the m68k/atari and mips/dec variants don't necessarily >> qualify as PIO, those are really just pointer dereferences, and >> they don't use the actual inb/outb functions. >> >> On atari, it looks like HAS_IOPORT may be set if ATARI_ROM_ISA >> is, but on dec it's never enabled. > > Atari does not use RTC_DRV_CMOS, but still relies on generic RTC > instead. Ah right, I now remember working on that code, so we're good on m68k then. I think it should work for everyone using depends on HAS_IOPORT || ARCH_DECSTATION in that case, as that is the only exception. > Last time (in 2013?) I tried converting to RTC_DRV_CMOS by registering > an "rtc_cmos" platform device, I couldn't get it to work. If you ever want to revisit this, I suspect the harder part here is to detach arch/m68k/ from the RTC_DRV_GENERIC code first, pushing the device registration into the individual machine specific time.c code. It's probably not even worth trying to share the rtc-cmos driver, but it might be useful to share the library code like RTC_DRV_ALPHA does. Arnd
Hi Arnd, On Tue, May 9, 2023 at 10:23 AM Arnd Bergmann <arnd@arndb.de> wrote: > On Tue, May 9, 2023, at 08:38, Geert Uytterhoeven wrote: > > On Mon, May 8, 2023 at 10:01 PM Arnd Bergmann <arnd@arndb.de> wrote: > >> On Mon, May 8, 2023, at 17:36, Niklas Schnelle wrote: > >> > >> I think the m68k/atari and mips/dec variants don't necessarily > >> qualify as PIO, those are really just pointer dereferences, and > >> they don't use the actual inb/outb functions. > >> > >> On atari, it looks like HAS_IOPORT may be set if ATARI_ROM_ISA > >> is, but on dec it's never enabled. > > > > Atari does not use RTC_DRV_CMOS, but still relies on generic RTC > > instead. > > Ah right, I now remember working on that code, so we're good on > m68k then. I think it should work for everyone using > > depends on HAS_IOPORT || ARCH_DECSTATION > > in that case, as that is the only exception. > > > Last time (in 2013?) I tried converting to RTC_DRV_CMOS by registering > > an "rtc_cmos" platform device, I couldn't get it to work. > > If you ever want to revisit this, I suspect the harder part here > is to detach arch/m68k/ from the RTC_DRV_GENERIC code first, pushing > the device registration into the individual machine specific time.c > code. It's probably not even worth trying to share the rtc-cmos > driver, but it might be useful to share the library code like > RTC_DRV_ALPHA does. Arch/m68k is not that entangled with RTC_DRV_GENERIC, as amiga_defconfig does not enable it, but enables CONFIG_RTC_DRV_MSM6242 and CONFIG_RTC_DRV_RP5C01 instead. Gr{oetje,eeting}s, Geert
On Tue, May 9, 2023, at 10:51, Geert Uytterhoeven wrote: > On Tue, May 9, 2023 at 10:23 AM Arnd Bergmann <arnd@arndb.de> wrote: >> On Tue, May 9, 2023, at 08:38, Geert Uytterhoeven wrote: >> If you ever want to revisit this, I suspect the harder part here >> is to detach arch/m68k/ from the RTC_DRV_GENERIC code first, pushing >> the device registration into the individual machine specific time.c >> code. It's probably not even worth trying to share the rtc-cmos >> driver, but it might be useful to share the library code like >> RTC_DRV_ALPHA does. > > Arch/m68k is not that entangled with RTC_DRV_GENERIC, as amiga_defconfig > does not enable it, but enables CONFIG_RTC_DRV_MSM6242 and > CONFIG_RTC_DRV_RP5C01 instead. Ah, I see now, I misremembered this part. The only bit that is shared on m68k is the mach_hwclk() function that is used for either read_persistent_clock64() or rtc_generic on platforms that have one. So any platform could indeed be converted from mach_hwclk() to a custom rtc driver without affecting the others. Arnd
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index 5a71579af0a1..20aa77bf0a9f 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -956,6 +956,7 @@ comment "Platform RTC drivers" config RTC_DRV_CMOS tristate "PC-style 'CMOS'" depends on X86 || ARM || PPC || MIPS || SPARC64 + depends on HAS_IOPORT default y if X86 select RTC_MC146818_LIB help @@ -976,6 +977,7 @@ config RTC_DRV_CMOS config RTC_DRV_ALPHA bool "Alpha PC-style CMOS" depends on ALPHA + depends on HAS_IOPORT select RTC_MC146818_LIB default y help @@ -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.