Skip to content

Commit

Permalink
x86/rtc, mrst: Don't register a platform RTC device for for Intel MID…
Browse files Browse the repository at this point in the history
… platforms

Intel MID x86 platforms have a memory mapped virtual RTC
instead.  No MID platform have the default ports (and
accessing them may do weird stuff).

Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Alan Cox <alan@linux.intel.com>
Cc: feng.tang@intel.com
Cc: Feng Tang <feng.tang@intel.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Mathias Nyman authored and Ingo Molnar committed Dec 5, 2011
1 parent a7a2804 commit 35d4769
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/x86/include/asm/mrst.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,20 @@ enum mrst_cpu_type {
};

extern enum mrst_cpu_type __mrst_cpu_chip;

#ifdef CONFIG_X86_INTEL_MID

static inline enum mrst_cpu_type mrst_identify_cpu(void)
{
return __mrst_cpu_chip;
}

#else /* !CONFIG_X86_INTEL_MID */

#define mrst_identify_cpu() (0)

#endif /* !CONFIG_X86_INTEL_MID */

enum mrst_timer_options {
MRST_TIMER_DEFAULT,
MRST_TIMER_APBT_ONLY,
Expand Down
5 changes: 5 additions & 0 deletions arch/x86/kernel/rtc.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <asm/vsyscall.h>
#include <asm/x86_init.h>
#include <asm/time.h>
#include <asm/mrst.h>

#ifdef CONFIG_X86_32
/*
Expand Down Expand Up @@ -242,6 +243,10 @@ static __init int add_rtc_cmos(void)
if (of_have_populated_dt())
return 0;

/* Intel MID platforms don't have ioport rtc */
if (mrst_identify_cpu())
return -ENODEV;

platform_device_register(&rtc_device);
dev_info(&rtc_device.dev,
"registered platform RTC device (no PNP device found)\n");
Expand Down

0 comments on commit 35d4769

Please sign in to comment.