nor standard legacy replacement devices/features. e.g. Medfield does
not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
+config X86_MRFLD
+ bool "Merrifield MID platform"
+ depends on PCI
+ depends on PCI_GOANY
+ depends on X86_IO_APIC
+ select INTEL_SCU_IPC
+ select X86_PLATFORM_DEVICES
+ ---help---
+ Merrifield is Intel's Low Power Intel Architecture (LPIA) based Moblin
+ Internet Device(MID) platform.
+ Unlike Medfield, Merrifield does have many legacy devices supported
+ by the iLB unit. That includes i8259, i8254, HPET, ACPI, and RTC.
+
choice
prompt "Intel MID board type"
depends on X86_INTEL_MID
shares all the codes with Medfield except the board file(i.e.
only platform devices and platform device data are different)
+config BOARD_MRFLD_VP
+ bool "Merrifield simulation platform board type"
+ depends on X86_MRFLD
+ ---help---
+ Merrifield based simulation configuration. This includes:
+ VP, HVP, SLE targets.
endchoice
endif
static inline unsigned long apbt_quick_calibrate(void) {return 0; }
static inline void apbt_time_init(void) { }
+static inline apbt_setup_secondary_clock(void) { }
#endif
#endif /* ASM_X86_APBT_H */
INTEL_MID_CPU_CHIP_LINCROFT = 1,
INTEL_MID_CPU_CHIP_PENWELL,
INTEL_MID_CPU_CHIP_CLOVERVIEW,
+ INTEL_MID_CPU_CHIP_TANGIER,
};
extern enum intel_mid_cpu_type __intel_mid_cpu_chip;
extern const struct atomisp_platform_data *intel_get_v4l2_subdev_table(void);
extern void (*saved_shutdown)(void);
+
+#ifdef CONFIG_X86_MRFLD
+enum intel_mrfl_sim_type {
+ INTEL_MRFL_CPU_SIMULATION_NONE = 0,
+ INTEL_MRFL_CPU_SIMULATION_VP,
+ INTEL_MRFL_CPU_SIMULATION_SLE,
+};
+
+extern enum intel_mrfl_sim_type __intel_mrfl_sim_platform;
+
+static inline enum intel_mrfl_sim_type intel_mrfl_identify_sim(void)
+{
+ return __intel_mrfl_sim_platform;
+}
+
+#else /* !CONFIG_X86_MRFLD */
+#define intel_mrfl_identify_sim() (0)
+#endif /* !CONFIG_X86_MRFLD */
+
#endif /* _ASM_X86_INTEL_MID_H */
# MFLD specific files
obj-$(CONFIG_X86_MDFLD) += mfld.o
obj-$(CONFIG_INTEL_MID_MDFLD_POWER) += mfld-pmu.o
+# MRFL specific file
+obj-$(CONFIG_X86_MRFLD) += mrfl.o
# BOARD files
obj-$(CONFIG_BOARD_MFLD_BLACKBAY) += board-blackbay.o
obj-$(CONFIG_BOARD_REDRIDGE) += board-redridge.o
obj-$(CONFIG_BOARD_CTP) += board-ctp.o
+obj-$(CONFIG_BOARD_MRFLD_VP) += board-vp.o
--- /dev/null
+/*
+ * board-vp.c: Intel Merrifield based board (Virtual Platform)
+ *
+ * (C) Copyright 2012 Intel Corporation
+ * Author: Mark F. Brown <mark.f.brown@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ */
+
+/* not supported */
+int penwell_otg_query_charging_cap(void *dummy)
+{
+ return -1;
+}
enum intel_mid_cpu_type __intel_mid_cpu_chip;
EXPORT_SYMBOL_GPL(__intel_mid_cpu_chip);
+#ifdef CONFIG_X86_MRFLD
+enum intel_mrfl_sim_type __intel_mrfl_sim_platform;
+EXPORT_SYMBOL_GPL(__intel_mrfl_sim_platform);
+#endif /* X86_CONFIG_MRFLD */
+
int sfi_mtimer_num;
struct sfi_rtc_table_entry sfi_mrtc_array[SFI_MRTC_MAX];
static void __init intel_mid_time_init(void)
{
sfi_table_parse(SFI_SIG_MTMR, NULL, NULL, sfi_parse_mtmr);
+
+/* [REVERT ME] ARAT capability not set in VP. Force setting */
+#ifdef CONFIG_X86_MRFLD
+ if (intel_mrfl_identify_sim() == INTEL_MRFL_CPU_SIMULATION_VP)
+ set_cpu_cap(&boot_cpu_data, X86_FEATURE_ARAT);
+#endif /* CONFIG_X86_MRFLD */
+
switch (intel_mid_timer_options) {
case INTEL_MID_TIMER_APBT_ONLY:
break;
__intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_LINCROFT;
else if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x35)
__intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_CLOVERVIEW;
+ else if (boot_cpu_data.x86 == 6 && boot_cpu_data.x86_model == 0x3C)
+ __intel_mid_cpu_chip = INTEL_MID_CPU_CHIP_TANGIER;
else {
pr_err("Unknown Moorestown CPU (%d:%d), default to Lincroft\n",
boot_cpu_data.x86, boot_cpu_data.x86_model);
--- /dev/null
+/*
+ * mrfl.c: Intel Merrifield platform specific setup code
+ *
+ * (C) Copyright 2012 Intel Corporation
+ * Author: Mark F. Brown <mark.f.brown@intel.com>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; version 2
+ * of the License.
+ */
+
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/interrupt.h>
+#include <linux/sfi.h>
+#include <linux/irq.h>
+#include <linux/module.h>
+#include <asm/setup.h>
+#include <asm/intel-mid.h>
+#include <asm/processor.h>
+
+unsigned long __init intel_mid_calibrate_tsc(void)
+{
+ /* [REVERT ME] fast timer calibration method to be defined */
+ if (intel_mrfl_identify_sim() == INTEL_MRFL_CPU_SIMULATION_VP) {
+ lapic_timer_frequency = 50000;
+ return 1000000;
+ }
+
+ return 0;
+}
+
+/* Allow user to enable simulator quirks settings for kernel */
+static int __init set_simulation_platform(char *str)
+{
+ int platform;
+ if (get_option(&str, &platform)) {
+ __intel_mrfl_sim_platform = platform;
+ pr_info("simulator mode %d enabled.\n",
+ __intel_mrfl_sim_platform);
+ return 0;
+ }
+
+ return -EINVAL;
+}
+early_param("mrfld_simulation", set_simulation_platform);