lkml.org 
[lkml]   [2022]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC v2 29/39] rtc: add HAS_IOPORT dependencies
    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

    \
     
     \ /
      Last update: 2022-06-01 14:26    [W:4.130 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site