diff mbox

[RFC,08/15] rtc: at91sam9: Add missing MFD_SYSCON dependency on HAS_IOMEM

Message ID 1456992221-26712-9-git-send-email-k.kozlowski@samsung.com (mailing list archive)
State RFC
Headers show

Commit Message

Krzysztof Kozlowski March 3, 2016, 8:03 a.m. UTC
The MFD_SYSCON depends on HAS_IOMEM so when selecting it avoid unmet
direct dependencies.

Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 drivers/rtc/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Arnd Bergmann March 3, 2016, 10:55 a.m. UTC | #1
On Thursday 03 March 2016 17:03:34 Krzysztof Kozlowski wrote:
> index 0da40e2e4280..5c530b6b125d 100644
> --- a/drivers/rtc/Kconfig
> +++ b/drivers/rtc/Kconfig
> @@ -1302,6 +1302,7 @@ config RTC_DRV_AT91RM9200
>  config RTC_DRV_AT91SAM9
>         tristate "AT91SAM9 RTT as RTC"
>         depends on ARCH_AT91 || COMPILE_TEST
> +       depends on HAS_IOMEM    # For MFD_SYSCON
>         select MFD_SYSCON
>         help
>           Some AT91SAM9 SoCs provide an RTT (Real Time Timer) block which
> 

This is technically correct, but the entire RTC menu is hidden
inside of 'depends on !UML && !S390', so we won't ever get there
on any configuration that does not use HAS_IOMEM.

If we did, all other RTC drivers would also fail.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven March 3, 2016, 12:27 p.m. UTC | #2
On Thu, Mar 3, 2016 at 11:55 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> On Thursday 03 March 2016 17:03:34 Krzysztof Kozlowski wrote:
>> index 0da40e2e4280..5c530b6b125d 100644
>> --- a/drivers/rtc/Kconfig
>> +++ b/drivers/rtc/Kconfig
>> @@ -1302,6 +1302,7 @@ config RTC_DRV_AT91RM9200
>>  config RTC_DRV_AT91SAM9
>>         tristate "AT91SAM9 RTT as RTC"
>>         depends on ARCH_AT91 || COMPILE_TEST
>> +       depends on HAS_IOMEM    # For MFD_SYSCON
>>         select MFD_SYSCON
>>         help
>>           Some AT91SAM9 SoCs provide an RTT (Real Time Timer) block which
>>
>
> This is technically correct, but the entire RTC menu is hidden
> inside of 'depends on !UML && !S390', so we won't ever get there
> on any configuration that does not use HAS_IOMEM.
>
> If we did, all other RTC drivers would also fail.

So UML has no RTC. Should/can it use RTC_DRV_GENERIC?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Arnd Bergmann March 3, 2016, 12:58 p.m. UTC | #3
On Thursday 03 March 2016 13:27:59 Geert Uytterhoeven wrote:
> On Thu, Mar 3, 2016 at 11:55 AM, Arnd Bergmann <arnd@arndb.de> wrote:
> > On Thursday 03 March 2016 17:03:34 Krzysztof Kozlowski wrote:
> >> index 0da40e2e4280..5c530b6b125d 100644
> >> --- a/drivers/rtc/Kconfig
> >> +++ b/drivers/rtc/Kconfig
> >> @@ -1302,6 +1302,7 @@ config RTC_DRV_AT91RM9200
> >>  config RTC_DRV_AT91SAM9
> >>         tristate "AT91SAM9 RTT as RTC"
> >>         depends on ARCH_AT91 || COMPILE_TEST
> >> +       depends on HAS_IOMEM    # For MFD_SYSCON
> >>         select MFD_SYSCON
> >>         help
> >>           Some AT91SAM9 SoCs provide an RTT (Real Time Timer) block which
> >>
> >
> > This is technically correct, but the entire RTC menu is hidden
> > inside of 'depends on !UML && !S390', so we won't ever get there
> > on any configuration that does not use HAS_IOMEM.
> >
> > If we did, all other RTC drivers would also fail.
> 
> So UML has no RTC. Should/can it use RTC_DRV_GENERIC?

I think nothing should use that, even if it could ;-)

Funny enough, RTC_DRV_GENERIC would probably actually work if you
run UML as root and set iopl() to allow port access, but we don't
really want it to mess with the host RTC.

I don't know where UML gets it real time, but it doesn't actually
need much other than calling clock_gettime(CLOCK_REALTIME, ...)
to get the host time. Presumably it uses some variation of that.

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 0da40e2e4280..5c530b6b125d 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -1302,6 +1302,7 @@  config RTC_DRV_AT91RM9200
 config RTC_DRV_AT91SAM9
 	tristate "AT91SAM9 RTT as RTC"
 	depends on ARCH_AT91 || COMPILE_TEST
+	depends on HAS_IOMEM	# For MFD_SYSCON
 	select MFD_SYSCON
 	help
 	  Some AT91SAM9 SoCs provide an RTT (Real Time Timer) block which