aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/platform/intel-mid/intel-mid.c
AgeCommit message (Collapse)AuthorFilesLines
2019-06-05treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 441Thomas Gleixner1-5/+1
Based on 1 normalized pattern(s): 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 extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 315 file(s). Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Allison Randal <[email protected]> Reviewed-by: Armijn Hemel <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2018-07-03x86/platform/intel-mid: Remove per platform codeAndy Shevchenko1-16/+1
After custom TSC calibration gone, there is no more reason to have custom platform code for each of Intel MID. Thus, remove it for good. Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Pavel Tatashin <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2018-07-03x86/platform/intel-mid: Remove custom TSC calibrationAndy Shevchenko1-6/+0
Since the commit 7da7c1561366 ("x86, tsc: Add static (MSR) TSC calibration on Intel Atom SoCs") introduced a common way for all Intel MID chips to get their TSC frequency via MSRs, there is no need to keep a duplication in each of Intel MID platform code. Thus, remove the custom calibration code for good. Note, there is slight difference in how to get frequency for (reserved?) values in MSRs, i.e. legacy code enforces some defaults while new code just uses 0 in that cases. Suggested-by: Alexander Shishkin <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: "H. Peter Anvin" <[email protected]> Cc: Pavel Tatashin <[email protected]> Cc: Bin Gao <[email protected]> Link: https://lkml.kernel.org/r/[email protected]
2018-03-14Merge branch 'x86/urgent' into x86/mm to pick up dependenciesThomas Gleixner1-1/+1
2018-03-12x86/platform/intel-mid: Add special handling for ACPI HW reduced platformsAndy Shevchenko1-0/+6
When switching to ACPI HW reduced platforms we still want to initialize timers. Override x86_init.acpi.reduced_hw_init to achieve that. Signed-off-by: Andy Shevchenko <[email protected]> Reviewed-by: Rafael J. Wysocki <[email protected]> Cc: Eric Biederman <[email protected]> Cc: Juergen Gross <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J . Wysocki <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2018-02-28x86/platform/intel-mid: Handle Intel Edison reboot correctlySebastian Panceac1-1/+1
When the Intel Edison module is powered with 3.3V, the reboot command makes the module stuck. If the module is powered at a greater voltage, like 4.4V (as the Edison Mini Breakout board does), reboot works OK. The official Intel Edison BSP sends the IPCMSG_COLD_RESET message to the SCU by default. The IPCMSG_COLD_BOOT which is used by the upstream kernel is only sent when explicitely selected on the kernel command line. Use IPCMSG_COLD_RESET unconditionally which makes reboot work independent of the power supply voltage. [ tglx: Massaged changelog ] Fixes: bda7b072de99 ("x86/platform/intel-mid: Implement power off sequence") Signed-off-by: Sebastian Panceac <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Andy Shevchenko <[email protected]> Cc: [email protected] Link: https://lkml.kernel.org/r/[email protected]
2018-01-19x86/platform/intel-mid: Move PCI initialization to arch_init()Andy Shevchenko1-1/+1
ACPI redefines x86_init.pci.init when enabled. Though we still need special treatment for MID platforms. Move our specific callback to x86_init.pci.arch_init() and, by calling acpi_noirq_set(), take back a control over IRQ assignment. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2017-07-25x86/platform/intel-mid: Group timers callbacks togetherAndy Shevchenko1-1/+1
Group timers callback initializers together in x86_intel_mid_early_setup() for easy to find and maintain. No functional change intended. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-12-19x86/init: Remove i8042_detect() from platform opsDmitry Torokhov1-7/+0
Now that i8042 uses flag in legacy platform data, i8042_detect() is no longer used and can be removed. Signed-off-by: Dmitry Torokhov <[email protected]> Tested-by: Takashi Iwai <[email protected]> Acked-by: Marcos Paulo de Souza <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2016-09-08x86/platform/intel-mid: Implement power off sequenceAndy Shevchenko1-0/+5
Tell SCU that we are about powering off the device. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-07-14x86/platform: Audit and remove any unnecessary uses of module.hPaul Gortmaker1-1/+1
Historically a lot of these existed because we did not have a distinction between what was modular code and what was providing support to modules via EXPORT_SYMBOL and friends. That changed when we forked out support for the latter into the export.h file. This means we should be able to reduce the usage of module.h in code that is obj-y Makefile or bool Kconfig. The advantage in doing so is that module.h itself sources about 15 other headers; adding significantly to what we feed cpp, and it can obscure what headers we are effectively using. Since module.h was the source for init.h (for __init) and for export.h (for EXPORT_SYMBOL) we consider each obj-y/bool instance for the presence of either and replace as needed. One module.h was converted to moduleparam.h since the file had multiple module_param() in it, and another file had an instance of MODULE_DEVICE_TABLE deleted, since that is a no-op when builtin. Finally, the 32 bit build coverage of olpc_ofw revealed a couple implicit includes, which were pretty self evident to fix based on what gcc was complaining about. Signed-off-by: Paul Gortmaker <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2016-07-10x86/platform/intel-mid: Mark regulators explicitly definedAndy Shevchenko1-0/+10
Intel MID platforms are using explicitly defined regulators. Let the regulator core know that we do not have any additional regulators left. This lets it substitute unprovided regulators with dummy ones. Without this change when CONFIG_REGULATOR=y the USB driver fails on getting "vbus" regulator and SDHCI can't get "vmmc" and "vqmmc" regulators either. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/1468071929-77383-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <[email protected]>
2016-01-19x86/platform/intel-mid: Join string and fix SoC nameAndy Shevchenko1-5/+3
Join string back to make grepping a bit easier. While here, lowering case for Penwell SoC name in one case to be aligned with the rest messages. Signed-off-by: Andy Shevchenko <[email protected]> Cc: Andy Lutomirski <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Brian Gerst <[email protected]> Cc: Denys Vlasenko <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Linus Torvalds <[email protected]> Cc: Mika Westerberg <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Thomas Gleixner <[email protected]> Link: http://lkml.kernel.org/r/1452888668-147116-2-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Ingo Molnar <[email protected]>
2015-10-11x86/intel-mid: Make intel_mid_ops staticAndy Shevchenko1-1/+1
The following warning is issued on unfixed code. arch/x86/platform/intel-mid/intel-mid.c:64:22: warning: symbol 'intel_mid_ops' was not declared. Should it be static? Signed-off-by: Andy Shevchenko <[email protected]> Link: http://lkml.kernel.org/r/1444400741-98669-1-git-send-email-andriy.shevchenko@linux.intel.com Signed-off-by: Thomas Gleixner <[email protected]>
2015-04-24x86/intel-mid: Delay initialization of APB timerThomas Gleixner1-5/+13
MID has no PIC, but depending on the platform it requires the abt_timer, which is connected to irq0. The timer is set up at late_time_init(). But, looking at the MID code it seems, that there is no reason to do so. The only code which might need the timer working is the TSC calibration code, but thats a non issue on MID as that is using its own empty calibration function. And check_timer() is not invoked either because MID has no PIC and therefor no legacy irqs. So if you look at intel_mid_time_init() then you'll see that in the ARAT case the timer setup is skipped already. So until the point where x86_init.timers.setup_percpu_clockev() is called for the boot cpu nothing really needs a timer on MID. According to the MID code the apbt horror is only used for moorestown. Medfield and later use the local apic timer without the apbt nonsense. The best thing we can do is to drop moorestown support and get rid of that apbt nonsense alltogether. I don't think anyone deeply cares about it not being supported from 3.18 on. The number of devices which sport a moorestown should be pretty limited and the only relevant use case of those is to act as a pocket heater with short battery life time. Its pretty pointless to update kernels on pocket heaters except for bragging reasons. If someone at Intel really thinks that we need to keep moorestown alive for other than documentary and sentimental reasons, then we can move the apbt setup to x86_init.timers.setup_percpu_clockev(). At that point the IOAPIC is setup already, so it should just work. Signed-off-by: Thomas Gleixner <[email protected]> Tested-by: Andy Shevchenko <[email protected]> Signed-off-by: Jiang Liu <[email protected]> Cc: Konrad Rzeszutek Wilk <[email protected]> Cc: David Cohen <[email protected]> Cc: Sander Eikelenboom <[email protected]> Cc: David Vrabel <[email protected]> Cc: Tony Luck <[email protected]> Cc: Joerg Roedel <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: H. Peter Anvin <[email protected]> Cc: Kuppuswamy Sathyanarayanan <[email protected]> Cc: Bjorn Helgaas <[email protected]> Cc: Benjamin Herrenschmidt <[email protected]> Cc: Rafael J. Wysocki <[email protected]> Cc: Randy Dunlap <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: Borislav Petkov <[email protected]> Cc: Dimitri Sivanich <[email protected]> Cc: Rickard Strandqvist <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-02-24x86/platform/intel-mid: Fix trivial printk message typo in ↵Yannick Guerrini1-1/+1
intel_mid_arch_setup() Change 'Uknown' to 'Unknown' Signed-off-by: Yannick Guerrini <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
2014-01-15x86, intel-mid: Add Merrifield platform supportDavid Cohen1-0/+4
This code was partially based on Mark Brown's previous work. Signed-off-by: David Cohen <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Fei Yang <[email protected]> Cc: Mark F. Brown <[email protected]> Cc: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2014-01-15x86, intel-mid: Add Clovertrail platform supportKuppuswamy Sathyanarayanan1-3/+36
This patch adds Clovertrail support on intel-mid and makes it more flexible to support other SoCs. Signed-off-by: David Cohen <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: Fei Yang <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2014-01-15x86, intel-mid: Move Medfield code out of intel-mid.c core fileDavid Cohen1-35/+2
In order make the driver more portable and support other Intel MID (Mobile Internet Device) platforms we need to move Medfield code from intel-mid.c core to its own mfld.c file. This patch contains no functional changes. Signed-off-by: David Cohen <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-11-07x86, intel-mid: Do not re-introduce usage of obsolete __cpuinitPaul Gortmaker1-1/+1
The commit 712b6aa8731a7e148298c58cea66a5209c659e3c [Nov7 linux-next via tip/auto-latest] ("intel_mid: Renamed *mrst* to *intel_mid*") adds a __cpuinit. We removed this a couple versions ago; we now want to remove the compat no-op stubs. Introducing new users is not what we want to see at this point in time, as it will break once the stubs are gone. Cc: Kuppuswamy Sathyanarayanan <[email protected]> Cc: David Cohen <[email protected]> Signed-off-by: Paul Gortmaker <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Move platform device setups to their own platform_<device>.* filesDavid Cohen1-419/+0
As Intel rolling out more SoC's after Moorestown, we need to re-structure the code in a way that is backward compatible and easy to expand. This patch implements a flexible way to support multiple boards and devices. This patch does not add any new functional support. It just refactors the existing code to increase the modularity and decrease the code duplication for supporting multiple soc's and boards. Currently intel-mid.c has both board and soc related code in one file. This patch moves the board related code to new files and let linker script to create SFI devite table following this: 1. Move the SFI device specific code to arch/x86/platform/intel-mid/device-libs/platform_<device>.* A new device file is added for every supported device. This code will get conditionally compiled by using corresponding device driver CONFIG option. 2. Move the device_ids location to .x86_intel_mid_dev.init section by using new sfi_device() macro. This patch was based on previous code from Sathyanarayanan Kuppuswamy. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Moved SFI related code to sfi.cKuppuswamy Sathyanarayanan1-450/+1
Moved SFI specific parsing/handling code to sfi.c. This will enable us to reuse our intel-mid code for platforms that supports firmware interfaces other than SFI (like ACPI). Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Added custom handler for ipc devicesKuppuswamy Sathyanarayanan1-31/+51
Added a custom handler for medfield based ipc devices and moved devs_id structure defintion to header file. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Added custom device_handler supportKuppuswamy Sathyanarayanan1-34/+40
This patch provides a means to add custom handler for SFI devices. If you set device_handler as NULL in device_id table standard SFI device handler will be used. If its not NULL custom handler will be called. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Refactored sfi_parse_devs() functionKuppuswamy Sathyanarayanan1-70/+71
SFI device_id[] table parsing code is duplicated in every SFI device handler. This patch removes this code duplication, by adding a seperate function get_device_id() to parse through the device table. Also this patch moves the SPI, I2C, IPC info code from sfi_parse_devs() to respective device handlers. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Renamed *mrst* to *intel_mid*Kuppuswamy Sathyanarayanan1-55/+54
mrst is used as common name to represent all intel_mid type soc's. But moorsetwon is just one of the intel_mid soc. So renamed them to use intel_mid. This patch mainly renames the variables and related functions that uses *mrst* prefix with *intel_mid*. To ensure that there are no functional changes, I have compared the objdump of related files before and after rename and found the only difference is symbol and name changes. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>
2013-10-17intel_mid: Renamed *mrst* to *intel_mid*Kuppuswamy Sathyanarayanan1-0/+1055
Following files contains code that is common to all intel mid soc's. So renamed them as below. mrst/mrst.c -> intel-mid/intel-mid.c mrst/vrtc.c -> intel-mid/intel_mid_vrtc.c mrst/early_printk_mrst.c -> intel-mid/intel_mid_vrtc.c pci/mrst.c -> pci/intel_mid_pci.c Also, renamed the corresponding header files and made changes to the driver files that included these header files. To ensure that there are no functional changes, I have compared the objdump of renamed files before and after rename and found that the only difference is file name change. Signed-off-by: Kuppuswamy Sathyanarayanan <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: David Cohen <[email protected]> Signed-off-by: H. Peter Anvin <[email protected]>