x86/platform/intel-mid: Enable RTC on Intel Merrifield

Intel Merrifield has legacy RTC in contrast to the rest on Intel MID
platforms.

Set legacy RTC flag explicitly in architecture initialization code and
allocate interrupt for it.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/20170113164355.66161-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
Andy Shevchenko 2017-01-13 18:43:55 +02:00 committed by Ingo Molnar
parent a665ece8b4
commit de1c2540aa
2 changed files with 15 additions and 0 deletions

View File

@ -91,6 +91,7 @@ static unsigned long __init tangier_calibrate_tsc(void)
static void __init tangier_arch_setup(void)
{
x86_platform.calibrate_tsc = tangier_calibrate_tsc;
x86_platform.legacy.rtc = 1;
}
/* tangier arch ops */

View File

@ -41,6 +41,7 @@
#include <asm/intel_scu_ipc.h>
#include <asm/apb_timer.h>
#include <asm/reboot.h>
#include <asm/time.h>
#define SFI_SIG_OEM0 "OEM0"
#define MAX_IPCDEVS 24
@ -539,8 +540,21 @@ static int __init sfi_parse_devs(struct sfi_table_header *table)
return 0;
}
static int __init intel_mid_legacy_rtc_init(void)
{
struct irq_alloc_info info;
if (!x86_platform.legacy.rtc)
return -ENODEV;
ioapic_set_alloc_attr(&info, NUMA_NO_NODE, 1, 0);
return mp_map_gsi_to_irq(RTC_IRQ, IOAPIC_MAP_ALLOC, &info);
}
static int __init intel_mid_platform_init(void)
{
intel_mid_legacy_rtc_init();
sfi_table_parse(SFI_SIG_GPIO, NULL, NULL, sfi_parse_gpio);
sfi_table_parse(SFI_SIG_DEVS, NULL, NULL, sfi_parse_devs);
return 0;