* [PATCH 26/37] rtc: add HAS_IOPORT dependencies
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
@ 2022-04-29 13:50 ` Niklas Schnelle
2022-04-29 14:46 ` Niklas Schnelle
2022-04-29 13:50 ` [RFC v2 29/39] " Niklas Schnelle
1 sibling, 1 reply; 6+ messages in thread
From: Niklas Schnelle @ 2022-04-29 13:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Alessandro Zummo, Alexandre Belloni,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM
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 41c65b4d2baf..e1bb11a225b2 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -951,6 +951,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
@@ -971,6 +972,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
@@ -1188,7 +1190,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.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [RFC v2 29/39] rtc: add HAS_IOPORT dependencies
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
2022-04-29 13:50 ` [PATCH 26/37] rtc: add HAS_IOPORT dependencies Niklas Schnelle
@ 2022-04-29 13:50 ` Niklas Schnelle
2022-05-17 22:15 ` Alexandre Belloni
2022-06-01 12:25 ` Maciej W. Rozycki
1 sibling, 2 replies; 6+ messages in thread
From: Niklas Schnelle @ 2022-04-29 13:50 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Alessandro Zummo, Alexandre Belloni,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM
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 41c65b4d2baf..e1bb11a225b2 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -951,6 +951,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
@@ -971,6 +972,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
@@ -1188,7 +1190,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.32.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 26/37] rtc: add HAS_IOPORT dependencies
2022-04-29 13:50 ` [PATCH 26/37] rtc: add HAS_IOPORT dependencies Niklas Schnelle
@ 2022-04-29 14:46 ` Niklas Schnelle
0 siblings, 0 replies; 6+ messages in thread
From: Niklas Schnelle @ 2022-04-29 14:46 UTC (permalink / raw)
To: Arnd Bergmann
Cc: Greg Kroah-Hartman, linux-kernel, linux-arch, linux-pci,
Arnd Bergmann, Alessandro Zummo, Alexandre Belloni,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM
On Fri, 2022-04-29 at 15:50 +0200, 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>
> ---
Sorry everyone. I sent this as PATCH in error while preparing to sent
the same series as RFC. Since e-mail has no remote delete and I lack a
time machine let's just all pretend you only got the RFC.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v2 29/39] rtc: add HAS_IOPORT dependencies
2022-04-29 13:50 ` [RFC v2 29/39] " Niklas Schnelle
@ 2022-05-17 22:15 ` Alexandre Belloni
2022-05-18 13:47 ` Niklas Schnelle
2022-06-01 12:25 ` Maciej W. Rozycki
1 sibling, 1 reply; 6+ messages in thread
From: Alexandre Belloni @ 2022-05-17 22:15 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel, linux-arch,
linux-pci, Arnd Bergmann, Alessandro Zummo,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM
Hi,
On 29/04/2022 15:50:49+0200, 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.
>
I'm fine taking that this cycle if there are no dependencies. Should I?
> 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 41c65b4d2baf..e1bb11a225b2 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -951,6 +951,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
> @@ -971,6 +972,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
> @@ -1188,7 +1190,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.32.0
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v2 29/39] rtc: add HAS_IOPORT dependencies
2022-05-17 22:15 ` Alexandre Belloni
@ 2022-05-18 13:47 ` Niklas Schnelle
0 siblings, 0 replies; 6+ messages in thread
From: Niklas Schnelle @ 2022-05-18 13:47 UTC (permalink / raw)
To: Alexandre Belloni
Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel, linux-arch,
linux-pci, Arnd Bergmann, Alessandro Zummo,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM
On Wed, 2022-05-18 at 00:15 +0200, Alexandre Belloni wrote:
> Hi,
>
> On 29/04/2022 15:50:49+0200, 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.
> >
>
> I'm fine taking that this cycle if there are no dependencies. Should I?
>
I'd say the dependency here is the first patch in the series and we
don't seem to have full consensus on this yet. So as of now I sadly
don't think so.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [RFC v2 29/39] rtc: add HAS_IOPORT dependencies
2022-04-29 13:50 ` [RFC v2 29/39] " Niklas Schnelle
2022-05-17 22:15 ` Alexandre Belloni
@ 2022-06-01 12:25 ` Maciej W. Rozycki
1 sibling, 0 replies; 6+ messages in thread
From: Maciej W. Rozycki @ 2022-06-01 12:25 UTC (permalink / raw)
To: Niklas Schnelle
Cc: Arnd Bergmann, Greg Kroah-Hartman, linux-kernel, linux-arch,
linux-pci, Arnd Bergmann, Alessandro Zummo, Alexandre Belloni,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM
On Fri, 29 Apr 2022, Niklas Schnelle wrote:
> diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
> index 41c65b4d2baf..e1bb11a225b2 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -951,6 +951,7 @@ comment "Platform RTC drivers"
> config RTC_DRV_CMOS
> tristate "PC-style 'CMOS'"
> depends on X86 || ARM || PPC || MIPS || SPARC64
> + depends on HAS_IOPORT
Umm, I missed this one previously and this is wrong. We use this driver
for the DECstation machines (CONFIG_MIPS/CONFIG_MACH_DECSTATION) and those
do not use (nor indeed have) port I/O as they are TURBOchannel systems and
they only have a single (memory) address space. Consequently their DS1287
chip is memory-mapped (in a linear fashion actually, i.e. there's no
visible address/data register and individual locations are accessible with
single CPU instructions), cf. arch/mips/include/asm/mach-dec/mc146818rtc.h
(that probably ought to be converted to `readb'/`writeb' one day).
So this has to be sorted differently, perhaps by just:
+ depends on HAS_IOPORT || MACH_DECSTATION
Note that other machines handled by the MIPS port do use port I/O, cf.
arch/mips/include/asm/mach-*/mc146818rtc.h.
Maciej
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-06-01 12:25 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20220429135108.2781579-1-schnelle@linux.ibm.com>
2022-04-29 13:50 ` [PATCH 26/37] rtc: add HAS_IOPORT dependencies Niklas Schnelle
2022-04-29 14:46 ` Niklas Schnelle
2022-04-29 13:50 ` [RFC v2 29/39] " Niklas Schnelle
2022-05-17 22:15 ` Alexandre Belloni
2022-05-18 13:47 ` Niklas Schnelle
2022-06-01 12:25 ` Maciej W. Rozycki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox