aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/Kconfig31
-rw-r--r--arch/x86/Kconfig.debug6
-rw-r--r--arch/x86/include/asm/fixmap.h2
-rw-r--r--arch/x86/include/asm/setup.h2
-rw-r--r--arch/x86/kernel/early_printk.c2
-rw-r--r--arch/x86/kernel/smpboot.c16
-rw-r--r--arch/x86/kernel/tsc.c20
-rw-r--r--arch/x86/pci/Makefile2
-rw-r--r--arch/x86/platform/mrst/Makefile6
-rw-r--r--arch/x86/platform/mrst/mrst.c4
-rw-r--r--drivers/platform/x86/Kconfig2
-rw-r--r--drivers/rtc/Kconfig6
-rw-r--r--init/calibrate.c15
13 files changed, 89 insertions, 25 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
index 2513da0e6b67..a150f4c35e94 100644
--- a/arch/x86/Kconfig
+++ b/arch/x86/Kconfig
@@ -420,12 +420,14 @@ config X86_MRST
420 depends on PCI 420 depends on PCI
421 depends on PCI_GOANY 421 depends on PCI_GOANY
422 depends on X86_IO_APIC 422 depends on X86_IO_APIC
423 select X86_INTEL_MID
424 select SFI
425 select DW_APB_TIMER
423 select APB_TIMER 426 select APB_TIMER
424 select I2C 427 select I2C
425 select SPI 428 select SPI
426 select INTEL_SCU_IPC 429 select INTEL_SCU_IPC
427 select X86_PLATFORM_DEVICES 430 select X86_PLATFORM_DEVICES
428 select X86_INTEL_MID
429 ---help--- 431 ---help---
430 Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin 432 Moorestown is Intel's Low Power Intel Architecture (LPIA) based Moblin
431 Internet Device(MID) platform. Moorestown consists of two chips: 433 Internet Device(MID) platform. Moorestown consists of two chips:
@@ -434,6 +436,26 @@ config X86_MRST
434 nor standard legacy replacement devices/features. e.g. Moorestown does 436 nor standard legacy replacement devices/features. e.g. Moorestown does
435 not contain i8259, i8254, HPET, legacy BIOS, most of the io ports. 437 not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
436 438
439config X86_MDFLD
440 bool "Medfield MID platform"
441 depends on PCI
442 depends on PCI_GOANY
443 depends on X86_IO_APIC
444 select X86_INTEL_MID
445 select SFI
446 select DW_APB_TIMER
447 select APB_TIMER
448 select I2C
449 select SPI
450 select INTEL_SCU_IPC
451 select X86_PLATFORM_DEVICES
452 ---help---
453 Medfield is Intel's Low Power Intel Architecture (LPIA) based Moblin
454 Internet Device(MID) platform.
455 Unlike standard x86 PCs, Medfield does not have many legacy devices
456 nor standard legacy replacement devices/features. e.g. Medfield does
457 not contain i8259, i8254, HPET, legacy BIOS, most of the io ports.
458
437endif 459endif
438 460
439config X86_RDC321X 461config X86_RDC321X
@@ -631,7 +653,7 @@ config X86_SUMMIT_NUMA
631 653
632config X86_CYCLONE_TIMER 654config X86_CYCLONE_TIMER
633 def_bool y 655 def_bool y
634 depends on X86_32_NON_STANDARD 656 depends on X86_SUMMIT
635 657
636source "arch/x86/Kconfig.cpu" 658source "arch/x86/Kconfig.cpu"
637 659
@@ -659,9 +681,10 @@ config HPET_EMULATE_RTC
659 depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y) 681 depends on HPET_TIMER && (RTC=y || RTC=m || RTC_DRV_CMOS=m || RTC_DRV_CMOS=y)
660 682
661config APB_TIMER 683config APB_TIMER
662 def_bool y if MRST 684 def_bool y if X86_INTEL_MID
663 prompt "Langwell APB Timer Support" if X86_MRST 685 prompt "Intel MID APB Timer Support" if X86_INTEL_MID
664 select DW_APB_TIMER 686 select DW_APB_TIMER
687 depends on X86_INTEL_MID && SFI
665 help 688 help
666 APB timer is the replacement for 8254, HPET on X86 MID platforms. 689 APB timer is the replacement for 8254, HPET on X86 MID platforms.
667 The APBT provides a stable time base on SMP 690 The APBT provides a stable time base on SMP
diff --git a/arch/x86/Kconfig.debug b/arch/x86/Kconfig.debug
index aa4158f3ce62..e46c2147397f 100644
--- a/arch/x86/Kconfig.debug
+++ b/arch/x86/Kconfig.debug
@@ -43,9 +43,9 @@ config EARLY_PRINTK
43 with klogd/syslogd or the X server. You should normally N here, 43 with klogd/syslogd or the X server. You should normally N here,
44 unless you want to debug such a crash. 44 unless you want to debug such a crash.
45 45
46config EARLY_PRINTK_MRST 46config EARLY_PRINTK_INTEL_MID
47 bool "Early printk for MRST platform support" 47 bool "Early printk for Intel MID platform support"
48 depends on EARLY_PRINTK && X86_MRST 48 depends on EARLY_PRINTK && X86_INTEL_MID
49 49
50config EARLY_PRINTK_DBGP 50config EARLY_PRINTK_DBGP
51 bool "Early printk via EHCI debug port" 51 bool "Early printk via EHCI debug port"
diff --git a/arch/x86/include/asm/fixmap.h b/arch/x86/include/asm/fixmap.h
index 460c74e4852c..4da3c0c4c974 100644
--- a/arch/x86/include/asm/fixmap.h
+++ b/arch/x86/include/asm/fixmap.h
@@ -117,7 +117,7 @@ enum fixed_addresses {
117#endif 117#endif
118 FIX_TEXT_POKE1, /* reserve 2 pages for text_poke() */ 118 FIX_TEXT_POKE1, /* reserve 2 pages for text_poke() */
119 FIX_TEXT_POKE0, /* first page is last, because allocation is backward */ 119 FIX_TEXT_POKE0, /* first page is last, because allocation is backward */
120#ifdef CONFIG_X86_MRST 120#ifdef CONFIG_X86_INTEL_MID
121 FIX_LNW_VRTC, 121 FIX_LNW_VRTC,
122#endif 122#endif
123 __end_of_permanent_fixed_addresses, 123 __end_of_permanent_fixed_addresses,
diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 9756551ec760..d0f19f9fb846 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -47,7 +47,7 @@ extern void reserve_standard_io_resources(void);
47extern void i386_reserve_resources(void); 47extern void i386_reserve_resources(void);
48extern void setup_default_timer_irq(void); 48extern void setup_default_timer_irq(void);
49 49
50#ifdef CONFIG_X86_MRST 50#ifdef CONFIG_X86_INTEL_MID
51extern void x86_mrst_early_setup(void); 51extern void x86_mrst_early_setup(void);
52#else 52#else
53static inline void x86_mrst_early_setup(void) { } 53static inline void x86_mrst_early_setup(void) { }
diff --git a/arch/x86/kernel/early_printk.c b/arch/x86/kernel/early_printk.c
index 9d42a52d2331..9b9f18b49918 100644
--- a/arch/x86/kernel/early_printk.c
+++ b/arch/x86/kernel/early_printk.c
@@ -240,7 +240,7 @@ static int __init setup_early_printk(char *buf)
240 if (!strncmp(buf, "xen", 3)) 240 if (!strncmp(buf, "xen", 3))
241 early_console_register(&xenboot_console, keep); 241 early_console_register(&xenboot_console, keep);
242#endif 242#endif
243#ifdef CONFIG_EARLY_PRINTK_MRST 243#ifdef CONFIG_EARLY_PRINTK_INTEL_MID
244 if (!strncmp(buf, "mrst", 4)) { 244 if (!strncmp(buf, "mrst", 4)) {
245 mrst_early_console_init(); 245 mrst_early_console_init();
246 early_console_register(&early_mrst_console, keep); 246 early_console_register(&early_mrst_console, keep);
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 79f636bc44c6..66d250c00d11 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -207,23 +207,29 @@ static void __cpuinit smp_callin(void)
207 * Need to setup vector mappings before we enable interrupts. 207 * Need to setup vector mappings before we enable interrupts.
208 */ 208 */
209 setup_vector_irq(smp_processor_id()); 209 setup_vector_irq(smp_processor_id());
210
211 /*
212 * Save our processor parameters. Note: this information
213 * is needed for clock calibration.
214 */
215 smp_store_cpu_info(cpuid);
216
210 /* 217 /*
211 * Get our bogomips. 218 * Get our bogomips.
219 * Update loops_per_jiffy in cpu_data. Previous call to
220 * smp_store_cpu_info() stored a value that is close but not as
221 * accurate as the value just calculated.
212 * 222 *
213 * Need to enable IRQs because it can take longer and then 223 * Need to enable IRQs because it can take longer and then
214 * the NMI watchdog might kill us. 224 * the NMI watchdog might kill us.
215 */ 225 */
216 local_irq_enable(); 226 local_irq_enable();
217 calibrate_delay(); 227 calibrate_delay();
228 cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy;
218 local_irq_disable(); 229 local_irq_disable();
219 pr_debug("Stack at about %p\n", &cpuid); 230 pr_debug("Stack at about %p\n", &cpuid);
220 231
221 /* 232 /*
222 * Save our processor parameters
223 */
224 smp_store_cpu_info(cpuid);
225
226 /*
227 * This must be done before setting cpu_online_mask 233 * This must be done before setting cpu_online_mask
228 * or calling notify_cpu_starting. 234 * or calling notify_cpu_starting.
229 */ 235 */
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index 2c9cf0fd78f5..c0dd5b603749 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -995,3 +995,23 @@ void __init tsc_init(void)
995 check_system_tsc_reliable(); 995 check_system_tsc_reliable();
996} 996}
997 997
998#ifdef CONFIG_SMP
999/*
1000 * If we have a constant TSC and are using the TSC for the delay loop,
1001 * we can skip clock calibration if another cpu in the same socket has already
1002 * been calibrated. This assumes that CONSTANT_TSC applies to all
1003 * cpus in the socket - this should be a safe assumption.
1004 */
1005unsigned long __cpuinit calibrate_delay_is_known(void)
1006{
1007 int i, cpu = smp_processor_id();
1008
1009 if (!tsc_disabled && !cpu_has(&cpu_data(cpu), X86_FEATURE_CONSTANT_TSC))
1010 return 0;
1011
1012 for_each_online_cpu(i)
1013 if (cpu_data(i).phys_proc_id == cpu_data(cpu).phys_proc_id)
1014 return cpu_data(i).loops_per_jiffy;
1015 return 0;
1016}
1017#endif
diff --git a/arch/x86/pci/Makefile b/arch/x86/pci/Makefile
index 6b8759f7634e..75b06f34b1f2 100644
--- a/arch/x86/pci/Makefile
+++ b/arch/x86/pci/Makefile
@@ -15,7 +15,7 @@ obj-$(CONFIG_X86_VISWS) += visws.o
15 15
16obj-$(CONFIG_X86_NUMAQ) += numaq_32.o 16obj-$(CONFIG_X86_NUMAQ) += numaq_32.o
17 17
18obj-$(CONFIG_X86_MRST) += mrst.o 18obj-$(CONFIG_X86_INTEL_MID) += mrst.o
19 19
20obj-y += common.o early.o 20obj-y += common.o early.o
21obj-y += amd_bus.o bus_numa.o 21obj-y += amd_bus.o bus_numa.o
diff --git a/arch/x86/platform/mrst/Makefile b/arch/x86/platform/mrst/Makefile
index 1ea38775a6d3..7baed5135e0f 100644
--- a/arch/x86/platform/mrst/Makefile
+++ b/arch/x86/platform/mrst/Makefile
@@ -1,4 +1,4 @@
1obj-$(CONFIG_X86_MRST) += mrst.o 1obj-$(CONFIG_X86_INTEL_MID) += mrst.o
2obj-$(CONFIG_X86_MRST) += vrtc.o 2obj-$(CONFIG_X86_INTEL_MID) += vrtc.o
3obj-$(CONFIG_EARLY_PRINTK_MRST) += early_printk_mrst.o 3obj-$(CONFIG_EARLY_PRINTK_INTEL_MID) += early_printk_mrst.o
4obj-$(CONFIG_X86_MRST) += pmu.o 4obj-$(CONFIG_X86_MRST) += pmu.o
diff --git a/arch/x86/platform/mrst/mrst.c b/arch/x86/platform/mrst/mrst.c
index ad4ec1cb097e..475e2cd0f3c3 100644
--- a/arch/x86/platform/mrst/mrst.c
+++ b/arch/x86/platform/mrst/mrst.c
@@ -848,8 +848,7 @@ static void __init sfi_handle_ipc_dev(struct sfi_device_table_entry *entry)
848 if (mrst_has_msic()) 848 if (mrst_has_msic())
849 return; 849 return;
850 850
851 /* ID as IRQ is a hack that will go away */ 851 pdev = platform_device_alloc(entry->name, 0);
852 pdev = platform_device_alloc(entry->name, entry->irq);
853 if (pdev == NULL) { 852 if (pdev == NULL) {
854 pr_err("out of memory for SFI platform device '%s'.\n", 853 pr_err("out of memory for SFI platform device '%s'.\n",
855 entry->name); 854 entry->name);
@@ -1030,6 +1029,7 @@ static int __init pb_keys_init(void)
1030 num = sizeof(gpio_button) / sizeof(struct gpio_keys_button); 1029 num = sizeof(gpio_button) / sizeof(struct gpio_keys_button);
1031 for (i = 0; i < num; i++) { 1030 for (i = 0; i < num; i++) {
1032 gb[i].gpio = get_gpio_by_name(gb[i].desc); 1031 gb[i].gpio = get_gpio_by_name(gb[i].desc);
1032 pr_debug("info[%2d]: name = %s, gpio = %d\n", i, gb[i].desc, gb[i].gpio);
1033 if (gb[i].gpio == -1) 1033 if (gb[i].gpio == -1)
1034 continue; 1034 continue;
1035 1035
diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig
index 7f43cf86d776..f995e6e2f78c 100644
--- a/drivers/platform/x86/Kconfig
+++ b/drivers/platform/x86/Kconfig
@@ -639,7 +639,7 @@ config ACPI_CMPC
639 639
640config INTEL_SCU_IPC 640config INTEL_SCU_IPC
641 bool "Intel SCU IPC Support" 641 bool "Intel SCU IPC Support"
642 depends on X86_MRST 642 depends on X86_INTEL_MID
643 default y 643 default y
644 ---help--- 644 ---help---
645 IPC is used to bridge the communications between kernel and SCU on 645 IPC is used to bridge the communications between kernel and SCU on
diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig
index 877cf6fdcf24..e19a4031f45e 100644
--- a/drivers/rtc/Kconfig
+++ b/drivers/rtc/Kconfig
@@ -498,9 +498,9 @@ config RTC_DRV_CMOS
498 will be called rtc-cmos. 498 will be called rtc-cmos.
499 499
500config RTC_DRV_VRTC 500config RTC_DRV_VRTC
501 tristate "Virtual RTC for Moorestown platforms" 501 tristate "Virtual RTC for Intel MID platforms"
502 depends on X86_MRST 502 depends on X86_INTEL_MID
503 default y if X86_MRST 503 default y if X86_INTEL_MID
504 504
505 help 505 help
506 Say "yes" here to get direct support for the real time clock 506 Say "yes" here to get direct support for the real time clock
diff --git a/init/calibrate.c b/init/calibrate.c
index 24df7976816c..5f117ca9e069 100644
--- a/init/calibrate.c
+++ b/init/calibrate.c
@@ -246,6 +246,19 @@ recalibrate:
246 246
247static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 }; 247static DEFINE_PER_CPU(unsigned long, cpu_loops_per_jiffy) = { 0 };
248 248
249/*
250 * Check if cpu calibration delay is already known. For example,
251 * some processors with multi-core sockets may have all cores
252 * with the same calibration delay.
253 *
254 * Architectures should override this function if a faster calibration
255 * method is available.
256 */
257unsigned long __attribute__((weak)) __cpuinit calibrate_delay_is_known(void)
258{
259 return 0;
260}
261
249void __cpuinit calibrate_delay(void) 262void __cpuinit calibrate_delay(void)
250{ 263{
251 unsigned long lpj; 264 unsigned long lpj;
@@ -265,6 +278,8 @@ void __cpuinit calibrate_delay(void)
265 lpj = lpj_fine; 278 lpj = lpj_fine;
266 pr_info("Calibrating delay loop (skipped), " 279 pr_info("Calibrating delay loop (skipped), "
267 "value calculated using timer frequency.. "); 280 "value calculated using timer frequency.. ");
281 } else if ((lpj = calibrate_delay_is_known())) {
282 ;
268 } else if ((lpj = calibrate_delay_direct()) != 0) { 283 } else if ((lpj = calibrate_delay_direct()) != 0) {
269 if (!printed) 284 if (!printed)
270 pr_info("Calibrating delay using timer " 285 pr_info("Calibrating delay using timer "