mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-04 05:37:36 +00:00
x86/rtc, mrst: Don't register a platform RTC device for for Intel MID 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>
This commit is contained in:
parent
a7a280493f
commit
35d4769962
2 changed files with 14 additions and 0 deletions
|
@ -31,11 +31,20 @@ enum mrst_cpu_type {
|
||||||
};
|
};
|
||||||
|
|
||||||
extern enum mrst_cpu_type __mrst_cpu_chip;
|
extern enum mrst_cpu_type __mrst_cpu_chip;
|
||||||
|
|
||||||
|
#ifdef CONFIG_X86_INTEL_MID
|
||||||
|
|
||||||
static inline enum mrst_cpu_type mrst_identify_cpu(void)
|
static inline enum mrst_cpu_type mrst_identify_cpu(void)
|
||||||
{
|
{
|
||||||
return __mrst_cpu_chip;
|
return __mrst_cpu_chip;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else /* !CONFIG_X86_INTEL_MID */
|
||||||
|
|
||||||
|
#define mrst_identify_cpu() (0)
|
||||||
|
|
||||||
|
#endif /* !CONFIG_X86_INTEL_MID */
|
||||||
|
|
||||||
enum mrst_timer_options {
|
enum mrst_timer_options {
|
||||||
MRST_TIMER_DEFAULT,
|
MRST_TIMER_DEFAULT,
|
||||||
MRST_TIMER_APBT_ONLY,
|
MRST_TIMER_APBT_ONLY,
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include <asm/vsyscall.h>
|
#include <asm/vsyscall.h>
|
||||||
#include <asm/x86_init.h>
|
#include <asm/x86_init.h>
|
||||||
#include <asm/time.h>
|
#include <asm/time.h>
|
||||||
|
#include <asm/mrst.h>
|
||||||
|
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
/*
|
/*
|
||||||
|
@ -242,6 +243,10 @@ static __init int add_rtc_cmos(void)
|
||||||
if (of_have_populated_dt())
|
if (of_have_populated_dt())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
/* Intel MID platforms don't have ioport rtc */
|
||||||
|
if (mrst_identify_cpu())
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
platform_device_register(&rtc_device);
|
platform_device_register(&rtc_device);
|
||||||
dev_info(&rtc_device.dev,
|
dev_info(&rtc_device.dev,
|
||||||
"registered platform RTC device (no PNP device found)\n");
|
"registered platform RTC device (no PNP device found)\n");
|
||||||
|
|
Loading…
Add table
Reference in a new issue