From e4fe061629d8ca2bd0a1cb9b9f8bbd39b7bef619 Mon Sep 17 00:00:00 2001 From: Mathias Nyman Date: Tue, 15 Nov 2011 14:46:52 -0800 Subject: [PATCH] --- yaml --- r: 276411 b: refs/heads/master c: 35d476996288af6a4aaa8b172bcd31decd233de7 h: refs/heads/master i: 276409: 4ecc0df8c7e8803be1a4e92d263fdb1df12ab8ba 276407: 88956fc021163e6edee594536b906b8dc556d1a5 v: v3 --- [refs] | 2 +- trunk/arch/x86/include/asm/mrst.h | 9 +++++++++ trunk/arch/x86/kernel/rtc.c | 5 +++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index aeb4ffdeeb76..e12e26bbf31c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a7a280493fb63f8e9fbfc8feec5810bf50e1e54f +refs/heads/master: 35d476996288af6a4aaa8b172bcd31decd233de7 diff --git a/trunk/arch/x86/include/asm/mrst.h b/trunk/arch/x86/include/asm/mrst.h index e6283129c821..93f79094c224 100644 --- a/trunk/arch/x86/include/asm/mrst.h +++ b/trunk/arch/x86/include/asm/mrst.h @@ -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, diff --git a/trunk/arch/x86/kernel/rtc.c b/trunk/arch/x86/kernel/rtc.c index 348ce016a835..af6db6ec5b2a 100644 --- a/trunk/arch/x86/kernel/rtc.c +++ b/trunk/arch/x86/kernel/rtc.c @@ -12,6 +12,7 @@ #include #include #include +#include #ifdef CONFIG_X86_32 /* @@ -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");