Merge tag 'powerpc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: "Highlights: - PowerNV PCI hotplug support. - Lots more Power9 support. - eBPF JIT support on ppc64le. - Lots of cxl updates. - Boot code consolidation. Bug fixes: - Fix spin_unlock_wait() from Boqun Feng - Fix stack pointer corruption in __tm_recheckpoint() from Michael Neuling - Fix multiple bugs in memory_hotplug_max() from Bharata B Rao - mm: Ensure "special" zones are empty from Oliver O'Halloran - ftrace: Separate the heuristics for checking call sites from Michael Ellerman - modules: Never restore r2 for a mprofile-kernel style mcount() call from Michael Ellerman - Fix endianness when reading TCEs from Alexey Kardashevskiy - start rtasd before PCI probing from Greg Kurz - PCI: rpaphp: Fix slot registration for multiple slots under a PHB from Tyrel Datwyler - powerpc/mm: Add memory barrier in __hugepte_alloc() from Sukadev Bhattiprolu Cleanups & fixes: - Drop support for MPIC in pseries from Rashmica Gupta - Define and use PPC64_ELF_ABI_v2/v1 from Michael Ellerman - Remove unused symbols in asm-offsets.c from Rashmica Gupta - Fix SRIOV not building without EEH enabled from Russell Currey - Remove kretprobe_trampoline_holder from Thiago Jung Bauermann - Reduce log level of PCI I/O space warning from Benjamin Herrenschmidt - Add array bounds checking to crash_shutdown_handlers from Suraj Jitindar Singh - Avoid -maltivec when using clang integrated assembler from Anton Blanchard - Fix array overrun in ppc_rtas() syscall from Andrew Donnellan - Fix error return value in cmm_mem_going_offline() from Rasmus Villemoes - export cpu_to_core_id() from Mauricio Faria de Oliveira - Remove old symbols from defconfigs from Andrew Donnellan - Update obsolete comments in setup_32.c about entry conditions from Benjamin Herrenschmidt - Add comment explaining the purpose of setup_kdump_trampoline() from Benjamin Herrenschmidt - Merge the RELOCATABLE config entries for ppc32 and ppc64 from Kevin Hao - Remove RELOCATABLE_PPC32 from Kevin Hao - Fix .long's in tlb-radix.c to more meaningful from Balbir Singh Minor cleanups & fixes: - Andrew Donnellan, Anna-Maria Gleixner, Anton Blanchard, Benjamin Herrenschmidt, Bharata B Rao, Christophe Leroy, Colin Ian King, Geliang Tang, Greg Kurz, Madhavan Srinivasan, Michael Ellerman, Michael Ellerman, Stephen Rothwell, Stewart Smith. Freescale updates from Scott: - "Highlights include more 8xx optimizations, device tree updates, and MVME7100 support." PowerNV PCI hotplug from Gavin Shan: - PCI: Add pcibios_setup_bridge() - Override pcibios_setup_bridge() - Remove PCI_RESET_DELAY_US - Move pnv_pci_ioda_setup_opal_tce_kill() around - Increase PE# capacity - Allocate PE# in reverse order - Create PEs in pcibios_setup_bridge() - Setup PE for root bus - Extend PCI bridge resources - Make pnv_ioda_deconfigure_pe() visible - Dynamically release PE - Update bridge windows on PCI plug - Delay populating pdn - Support PCI slot ID - Use PCI slot reset infrastructure - Introduce pnv_pci_get_slot_id() - Functions to get/set PCI slot state - PCI/hotplug: PowerPC PowerNV PCI hotplug driver - Print correct PHB type names Power9 idle support from Shreyas B. Prabhu: - set power_save func after the idle states are initialized - Use PNV_THREAD_WINKLE macro while requesting for winkle - make hypervisor state restore a function - Rename idle_power7.S to idle_book3s.S - Rename reusable idle functions to hardware agnostic names - Make pnv_powersave_common more generic - abstraction for saving SPRs before entering deep idle states - Add platform support for stop instruction - cpuidle/powernv: Use CPUIDLE_STATE_MAX instead of MAX_POWERNV_IDLE_STATES - cpuidle/powernv: cleanup cpuidle-powernv.c - cpuidle/powernv: Add support for POWER ISA v3 idle states - Use deepest stop state when cpu is offlined Power9 PMU from Madhavan Srinivasan: - factor out power8 pmu macros and defines - factor out power8 pmu functions - factor out power8 __init_pmu code - Add power9 event list macros for generic and cache events - Power9 PMU support - Export Power9 generic and cache events to sysfs Power9 preliminary interrupt & PCI support from Benjamin Herrenschmidt: - Add XICS emulation APIs - Move a few exception common handlers to make room - Add support for HV virtualization interrupts - Add mechanism to force a replay of interrupts - Add ICP OPAL backend - Discover IODA3 PHBs - pci: Remove obsolete SW invalidate - opal: Add real mode call wrappers - Rename TCE invalidation calls - Remove SWINV constants and obsolete TCE code - Rework accessing the TCE invalidate register - Fallback to OPAL for TCE invalidations - Use the device-tree to get available range of M64's - Check status of a PHB before using it - pci: Don't try to allocate resources that will be reassigned Other Power9: - Send SIGBUS on unaligned copy and paste from Chris Smart - Large Decrementer support from Oliver O'Halloran - Load Monitor Register Support from Jack Miller Performance improvements from Anton Blanchard: - Avoid load hit store in __giveup_fpu() and __giveup_altivec() - Avoid load hit store in setup_sigcontext() - Remove assembly versions of strcpy, strcat, strlen and strcmp - Align hot loops of some string functions eBPF JIT from Naveen N. Rao: - Fix/enhance 32-bit Load Immediate implementation - Optimize 64-bit Immediate loads - Introduce rotate immediate instructions - A few cleanups - Isolate classic BPF JIT specifics into a separate header - Implement JIT compiler for extended BPF Operator Panel driver from Suraj Jitindar Singh: - devicetree/bindings: Add binding for operator panel on FSP machines - Add inline function to get rc from an ASYNC_COMP opal_msg - Add driver for operator panel on FSP machines Sparse fixes from Daniel Axtens: - make some things static - Introduce asm-prototypes.h - Include headers containing prototypes - Use #ifdef __BIG_ENDIAN__ #else for REG_BYTE - kvm: Clarify __user annotations - Pass endianness to sparse - Make ppc_md.{halt, restart} __noreturn MM fixes & cleanups from Aneesh Kumar K.V: - radix: Update LPCR HR bit as per ISA - use _raw variant of page table accessors - Compile out radix related functions if RADIX_MMU is disabled - Clear top 16 bits of va only on older cpus - Print formation regarding the the MMU mode - hash: Update SDR1 size encoding as documented in ISA 3.0 - radix: Update PID switch sequence - radix: Update machine call back to support new HCALL. - radix: Add LPID based tlb flush helpers - radix: Add a kernel command line to disable radix - Cleanup LPCR defines Boot code consolidation from Benjamin Herrenschmidt: - Move epapr_paravirt_early_init() to early_init_devtree() - cell: Don't use flat device-tree after boot - ge_imp3a: Don't use the flat device-tree after boot - mpc85xx_ds: Don't use the flat device-tree after boot - mpc85xx_rdb: Don't use the flat device-tree after boot - Don't test for machine type in rtas_initialize() - Don't test for machine type in smp_setup_cpu_maps() - dt: Add of_device_compatible_match() - Factor do_feature_fixup calls - Move 64-bit feature fixup earlier - Move 64-bit memory reserves to setup_arch() - Use a cachable DART - Move FW feature probing out of pseries probe() - Put exception configuration in a common place - Remove early allocation of the SMU command buffer - Move MMU backend selection out of platform code - pasemi: Remove IOBMAP allocation from platform probe() - mm/hash: Don't use machine_is() early during boot - Don't test for machine type to detect HEA special case - pmac: Remove spurrious machine type test - Move hash table ops to a separate structure - Ensure that ppc_md is empty before probing for machine type - Move 64-bit probe_machine() to later in the boot process - Move 32-bit probe() machine to later in the boot process - Get rid of ppc_md.init_early() - Move the boot time info banner to a separate function - Move setting of {i,d}cache_bsize to initialize_cache_info() - Move the content of setup_system() to setup_arch() - Move cache info inits to a separate function - Re-order the call to smp_setup_cpu_maps() - Re-order setup_panic() - Make a few boot functions __init - Merge 32-bit and 64-bit setup_arch() Other new features: - tty/hvc: Use IRQF_SHARED for OPAL hvc consoles from Sam Mendoza-Jonas - tty/hvc: Use opal irqchip interface if available from Sam Mendoza-Jonas - powerpc: Add module autoloading based on CPU features from Alastair D'Silva - crypto: vmx - Convert to CPU feature based module autoloading from Alastair D'Silva - Wake up kopald polling thread before waiting for events from Benjamin Herrenschmidt - xmon: Dump ISA 2.06 SPRs from Michael Ellerman - xmon: Dump ISA 2.07 SPRs from Michael Ellerman - Add a parameter to disable 1TB segs from Oliver O'Halloran - powerpc/boot: Add OPAL console to epapr wrappers from Oliver O'Halloran - Assign fixed PHB number based on device-tree properties from Guilherme G. Piccoli - pseries: Add pseries hotplug workqueue from John Allen - pseries: Add support for hotplug interrupt source from John Allen - pseries: Use kernel hotplug queue for PowerVM hotplug events from John Allen - pseries: Move property cloning into its own routine from Nathan Fontenot - pseries: Dynamic add entires to associativity lookup array from Nathan Fontenot - pseries: Auto-online hotplugged memory from Nathan Fontenot - pseries: Remove call to memblock_add() from Nathan Fontenot cxl: - Add set and get private data to context struct from Michael Neuling - make base more explicitly non-modular from Paul Gortmaker - Use for_each_compatible_node() macro from Wei Yongjun - Frederic Barrat - Abstract the differences between the PSL and XSL - Make vPHB device node match adapter's - Philippe Bergheaud - Add mechanism for delivering AFU driver specific events - Ignore CAPI adapters misplaced in switched slots - Refine slice error debug messages - Andrew Donnellan - static-ify variables to fix sparse warnings - PCI/hotplug: pnv_php: export symbols and move struct types needed by cxl - PCI/hotplug: pnv_php: handle OPAL_PCI_SLOT_OFFLINE power state - Add cxl_check_and_switch_mode() API to switch bi-modal cards - remove dead Kconfig options - fix potential NULL dereference in free_adapter() - Ian Munsie - Update process element after allocating interrupts - Add support for CAPP DMA mode - Fix allowing bogus AFU descriptors with 0 maximum processes - Fix allocating a minimum of 2 pages for the SPA - Fix bug where AFU disable operation had no effect - Workaround XSL bug that does not clear the RA bit after a reset - Fix NULL pointer dereference on kernel contexts with no AFU interrupts - powerpc/powernv: Split cxl code out into a separate file - Add cxl_slot_is_supported API - Enable bus mastering for devices using CAPP DMA mode - Move cxl_afu_get / cxl_afu_put to base - Allow a default context to be associated with an external pci_dev - Do not create vPHB if there are no AFU configuration records - powerpc/powernv: Add support for the cxl kernel api on the real phb - Add support for using the kernel API with a real PHB - Add kernel APIs to get & set the max irqs per context - Add preliminary workaround for CX4 interrupt limitation - Add support for interrupts on the Mellanox CX4 - Workaround PE=0 hardware limitation in Mellanox CX4 - powerpc/powernv: Fix pci-cxl.c build when CONFIG_MODULES=n selftests: - Test unaligned copy and paste from Chris Smart - Load Monitor Register Tests from Jack Miller - Cyril Bur - exec() with suspended transaction - Use signed long to read perf_event_paranoid - Fix usage message in context_switch - Fix generation of vector instructions/types in context_switch - Michael Ellerman - Use "Delta" rather than "Error" in normal output - Import Anton's mmap & futex micro benchmarks - Add a test for PROT_SAO" * tag 'powerpc-4.8-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (263 commits) powerpc/mm: Parenthesise IS_ENABLED() in if condition tty/hvc: Use opal irqchip interface if available tty/hvc: Use IRQF_SHARED for OPAL hvc consoles selftests/powerpc: exec() with suspended transaction powerpc: Improve comment explaining why we modify VRSAVE powerpc/mm: Drop unused externs for hpte_init_beat[_v3]() powerpc/mm: Rename hpte_init_lpar() and move the fallback to a header powerpc/mm: Fix build break when PPC_NATIVE=n crypto: vmx - Convert to CPU feature based module autoloading powerpc: Add module autoloading based on CPU features powerpc/powernv/ioda: Fix endianness when reading TCEs powerpc/mm: Add memory barrier in __hugepte_alloc() powerpc/modules: Never restore r2 for a mprofile-kernel style mcount() call powerpc/ftrace: Separate the heuristics for checking call sites powerpc: Merge 32-bit and 64-bit setup_arch() powerpc/64: Make a few boot functions __init powerpc: Re-order setup_panic() powerpc: Re-order the call to smp_setup_cpu_maps() powerpc/32: Move cache info inits to a separate function powerpc/64: Move the content of setup_system() to setup_arch() ...
This commit is contained in:
@@ -105,9 +105,7 @@ static void __init ep405_setup_arch(void)
|
||||
|
||||
static int __init ep405_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "ep405"))
|
||||
if (!of_machine_is_compatible("ep405"))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
@@ -63,7 +63,7 @@ static const char * const board[] __initconst = {
|
||||
|
||||
static int __init ppc40x_probe(void)
|
||||
{
|
||||
if (of_flat_dt_match(of_get_flat_dt_root(), board)) {
|
||||
if (of_device_compatible_match(of_root, board)) {
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -37,9 +37,7 @@ machine_device_initcall(virtex, virtex_device_probe);
|
||||
|
||||
static int __init virtex_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "xlnx,virtex"))
|
||||
if (!of_machine_is_compatible("xlnx,virtex"))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
@@ -46,9 +46,7 @@ machine_device_initcall(walnut, walnut_device_probe);
|
||||
|
||||
static int __init walnut_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "ibm,walnut"))
|
||||
if (!of_machine_is_compatible("ibm,walnut"))
|
||||
return 0;
|
||||
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC);
|
||||
|
@@ -53,11 +53,10 @@ machine_device_initcall(canyonlands, ppc460ex_device_probe);
|
||||
|
||||
static int __init ppc460ex_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
if (of_flat_dt_is_compatible(root, "amcc,canyonlands")) {
|
||||
if (of_machine_is_compatible("amcc,canyonlands")) {
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@@ -49,9 +49,7 @@ machine_device_initcall(ebony, ebony_device_probe);
|
||||
*/
|
||||
static int __init ebony_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "ibm,ebony"))
|
||||
if (!of_machine_is_compatible("ibm,ebony"))
|
||||
return 0;
|
||||
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC);
|
||||
|
@@ -149,9 +149,7 @@ static void __init iss4xx_setup_arch(void)
|
||||
*/
|
||||
static int __init iss4xx_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "ibm,iss-4xx"))
|
||||
if (!of_machine_is_compatible("ibm,iss-4xx"))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
@@ -67,11 +67,10 @@ static char *board[] __initdata = {
|
||||
|
||||
static int __init ppc44x_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
int i = 0;
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(board); i++) {
|
||||
if (of_flat_dt_is_compatible(root, board[i])) {
|
||||
if (of_machine_is_compatible(board[i])) {
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC);
|
||||
return 1;
|
||||
}
|
||||
|
@@ -68,7 +68,7 @@ DECLARE_PCI_FIXUP_HEADER(0x1033, 0x0035, quirk_ppc_currituck_usb_fixup);
|
||||
#define AVR_PWRCTL_RESET (0x02)
|
||||
|
||||
static struct i2c_client *avr_i2c_client;
|
||||
static void avr_halt_system(int pwrctl_flags)
|
||||
static void __noreturn avr_halt_system(int pwrctl_flags)
|
||||
{
|
||||
/* Request the AVR to reset the system */
|
||||
i2c_smbus_write_byte_data(avr_i2c_client,
|
||||
@@ -84,7 +84,7 @@ static void avr_power_off_system(void)
|
||||
avr_halt_system(AVR_PWRCTL_PWROFF);
|
||||
}
|
||||
|
||||
static void avr_reset_system(char *cmd)
|
||||
static void __noreturn avr_reset_system(char *cmd)
|
||||
{
|
||||
avr_halt_system(AVR_PWRCTL_RESET);
|
||||
}
|
||||
@@ -275,12 +275,10 @@ static void ppc47x_pci_irq_fixup(struct pci_dev *dev)
|
||||
*/
|
||||
static int __init ppc47x_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "ibm,akebono"))
|
||||
if (of_machine_is_compatible("ibm,akebono"))
|
||||
return 1;
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "ibm,currituck")) {
|
||||
if (of_machine_is_compatible("ibm,currituck")) {
|
||||
ppc_md.pci_irq_fixup = ppc47x_pci_irq_fixup;
|
||||
return 1;
|
||||
}
|
||||
|
@@ -46,9 +46,7 @@ machine_device_initcall(sam440ep, sam440ep_device_probe);
|
||||
|
||||
static int __init sam440ep_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "acube,sam440ep"))
|
||||
if (!of_machine_is_compatible("acube,sam440ep"))
|
||||
return 0;
|
||||
|
||||
pci_set_flags(PCI_REASSIGN_ALL_RSRC);
|
||||
|
@@ -43,9 +43,7 @@ machine_device_initcall(virtex, virtex_device_probe);
|
||||
|
||||
static int __init virtex_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "xlnx,virtex440"))
|
||||
if (!of_machine_is_compatible("xlnx,virtex440"))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
@@ -44,9 +44,7 @@ machine_device_initcall(warp, warp_device_probe);
|
||||
|
||||
static int __init warp_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "pika,warp"))
|
||||
if (!of_machine_is_compatible("pika,warp"))
|
||||
return 0;
|
||||
|
||||
/* For __dma_alloc_coherent */
|
||||
|
@@ -719,7 +719,7 @@ static void mpc512x_clk_setup_clock_tree(struct device_node *np, int busfreq)
|
||||
* most one of a mux, div, and gate each into one 'struct clk'
|
||||
* item
|
||||
* - PSC/MSCAN/SPDIF clock generation OTOH already is very
|
||||
* specific and cannot get mapped to componsites (at least not
|
||||
* specific and cannot get mapped to composites (at least not
|
||||
* a single one, maybe two of them, but then some of these
|
||||
* intermediate clock signals get referenced elsewhere (e.g.
|
||||
* in the clock frequency measurement, CFM) and thus need
|
||||
|
@@ -57,9 +57,12 @@ static void __init mpc5121_ads_init_IRQ(void)
|
||||
*/
|
||||
static int __init mpc5121_ads_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
if (!of_machine_is_compatible("fsl,mpc5121ads"))
|
||||
return 0;
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc5121ads");
|
||||
mpc512x_init_early();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
define_machine(mpc5121_ads) {
|
||||
@@ -67,7 +70,6 @@ define_machine(mpc5121_ads) {
|
||||
.probe = mpc5121_ads_probe,
|
||||
.setup_arch = mpc5121_ads_setup_arch,
|
||||
.init = mpc512x_init,
|
||||
.init_early = mpc512x_init_early,
|
||||
.init_IRQ = mpc5121_ads_init_IRQ,
|
||||
.get_irq = ipic_get_irq,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
|
@@ -18,6 +18,6 @@ extern void __init mpc512x_setup_arch(void);
|
||||
extern int __init mpc5121_clk_init(void);
|
||||
extern const char *mpc512x_select_psc_compat(void);
|
||||
extern const char *mpc512x_select_reset_compat(void);
|
||||
extern void mpc512x_restart(char *cmd);
|
||||
extern void __noreturn mpc512x_restart(char *cmd);
|
||||
|
||||
#endif /* __MPC512X_H__ */
|
||||
|
@@ -38,14 +38,18 @@ static const char * const board[] __initconst = {
|
||||
*/
|
||||
static int __init mpc512x_generic_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
if (!of_device_compatible_match(of_root, board))
|
||||
return 0;
|
||||
|
||||
mpc512x_init_early();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
define_machine(mpc512x_generic) {
|
||||
.name = "MPC512x generic",
|
||||
.probe = mpc512x_generic_probe,
|
||||
.init = mpc512x_init,
|
||||
.init_early = mpc512x_init_early,
|
||||
.setup_arch = mpc512x_setup_arch,
|
||||
.init_IRQ = mpc512x_init_IRQ,
|
||||
.get_irq = ipic_get_irq,
|
||||
|
@@ -47,7 +47,7 @@ static void __init mpc512x_restart_init(void)
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
void mpc512x_restart(char *cmd)
|
||||
void __noreturn mpc512x_restart(char *cmd)
|
||||
{
|
||||
if (reset_module_base) {
|
||||
/* Enable software reset "RSTE" */
|
||||
|
@@ -113,9 +113,12 @@ void __init pdm360ng_init(void)
|
||||
|
||||
static int __init pdm360ng_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
if (!of_machine_is_compatible("ifm,pdm360ng"))
|
||||
return 0;
|
||||
|
||||
return of_flat_dt_is_compatible(root, "ifm,pdm360ng");
|
||||
mpc512x_init_early();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
define_machine(pdm360ng) {
|
||||
@@ -123,7 +126,6 @@ define_machine(pdm360ng) {
|
||||
.probe = pdm360ng_probe,
|
||||
.setup_arch = mpc512x_setup_arch,
|
||||
.init = pdm360ng_init,
|
||||
.init_early = mpc512x_init_early,
|
||||
.init_IRQ = mpc512x_init_IRQ,
|
||||
.get_irq = ipic_get_irq,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
|
@@ -200,8 +200,7 @@ static void __init efika_setup_arch(void)
|
||||
|
||||
static int __init efika_probe(void)
|
||||
{
|
||||
const char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
|
||||
"model", NULL);
|
||||
const char *model = of_get_property(of_root, "model", NULL);
|
||||
|
||||
if (model == NULL)
|
||||
return 0;
|
||||
|
@@ -183,7 +183,7 @@ static const char * const board[] __initconst = {
|
||||
*/
|
||||
static int __init lite5200_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
define_machine(lite5200) {
|
||||
|
@@ -242,7 +242,7 @@ static const char * const board[] __initconst = {
|
||||
*/
|
||||
static int __init media5200_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
define_machine(media5200_platform) {
|
||||
|
@@ -70,7 +70,7 @@ static const char *board[] __initdata = {
|
||||
*/
|
||||
static int __init mpc5200_simple_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
define_machine(mpc5200_simple_platform) {
|
||||
|
@@ -243,8 +243,7 @@ EXPORT_SYMBOL(mpc52xx_get_xtal_freq);
|
||||
/**
|
||||
* mpc52xx_restart: ppc_md->restart hook for mpc5200 using the watchdog timer
|
||||
*/
|
||||
void
|
||||
mpc52xx_restart(char *cmd)
|
||||
void __noreturn mpc52xx_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
|
||||
|
@@ -309,8 +309,7 @@ machine_device_initcall(ep8248e, declare_of_platform_devices);
|
||||
*/
|
||||
static int __init ep8248e_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "fsl,ep8248e");
|
||||
return of_machine_is_compatible("fsl,ep8248e");
|
||||
}
|
||||
|
||||
define_machine(ep8248e)
|
||||
|
@@ -198,8 +198,7 @@ machine_device_initcall(km82xx, declare_of_platform_devices);
|
||||
*/
|
||||
static int __init km82xx_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "keymile,km82xx");
|
||||
return of_machine_is_compatible("keymile,km82xx");
|
||||
}
|
||||
|
||||
define_machine(km82xx)
|
||||
|
@@ -201,8 +201,7 @@ machine_device_initcall(mpc8272_ads, declare_of_platform_devices);
|
||||
*/
|
||||
static int __init mpc8272_ads_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc8272ads");
|
||||
return of_machine_is_compatible("fsl,mpc8272ads");
|
||||
}
|
||||
|
||||
define_machine(mpc8272_ads)
|
||||
|
@@ -22,7 +22,7 @@
|
||||
|
||||
#define RMR_CSRE 0x00000001
|
||||
|
||||
void pq2_restart(char *cmd)
|
||||
void __noreturn pq2_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
setbits32(&cpm2_immr->im_clkrst.car_rmr, RMR_CSRE);
|
||||
|
@@ -1,7 +1,7 @@
|
||||
#ifndef _PQ2_H
|
||||
#define _PQ2_H
|
||||
|
||||
void pq2_restart(char *cmd);
|
||||
void __noreturn pq2_restart(char *cmd);
|
||||
|
||||
#ifdef CONFIG_PCI
|
||||
int pq2ads_pci_init_irq(void);
|
||||
|
@@ -164,8 +164,7 @@ static void __init pq2fads_setup_arch(void)
|
||||
*/
|
||||
static int __init pq2fads_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "fsl,pq2fads");
|
||||
return of_machine_is_compatible("fsl,pq2fads");
|
||||
}
|
||||
|
||||
static const struct of_device_id of_bus_ids[] __initconst = {
|
||||
|
@@ -43,8 +43,7 @@ machine_device_initcall(asp834x, mpc83xx_declare_of_platform_devices);
|
||||
*/
|
||||
static int __init asp834x_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "analogue-and-micro,asp8347e");
|
||||
return of_machine_is_compatible("analogue-and-micro,asp8347e");
|
||||
}
|
||||
|
||||
define_machine(asp834x) {
|
||||
|
@@ -171,11 +171,10 @@ static char *board[] __initdata = {
|
||||
*/
|
||||
static int __init mpc83xx_km_probe(void)
|
||||
{
|
||||
unsigned long node = of_get_flat_dt_root();
|
||||
int i = 0;
|
||||
|
||||
while (board[i]) {
|
||||
if (of_flat_dt_is_compatible(node, board[i]))
|
||||
if (of_machine_is_compatible(board[i]))
|
||||
break;
|
||||
i++;
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ static int __init mpc83xx_restart_init(void)
|
||||
|
||||
arch_initcall(mpc83xx_restart_init);
|
||||
|
||||
void mpc83xx_restart(char *cmd)
|
||||
void __noreturn mpc83xx_restart(char *cmd)
|
||||
{
|
||||
#define RST_OFFSET 0x00000900
|
||||
#define RST_PROT_REG 0x00000018
|
||||
|
@@ -46,7 +46,7 @@ static const char *board[] __initdata = {
|
||||
*/
|
||||
static int __init mpc830x_rdb_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
machine_device_initcall(mpc830x_rdb, mpc83xx_declare_of_platform_devices);
|
||||
|
@@ -46,7 +46,7 @@ static const char *board[] __initdata = {
|
||||
*/
|
||||
static int __init mpc831x_rdb_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
machine_device_initcall(mpc831x_rdb, mpc83xx_declare_of_platform_devices);
|
||||
|
@@ -102,9 +102,7 @@ machine_device_initcall(mpc832x_mds, mpc83xx_declare_of_platform_devices);
|
||||
*/
|
||||
static int __init mpc832x_sys_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC832xMDS");
|
||||
return of_machine_is_compatible("MPC832xMDS");
|
||||
}
|
||||
|
||||
define_machine(mpc832x_mds) {
|
||||
|
@@ -220,9 +220,7 @@ machine_device_initcall(mpc832x_rdb, mpc83xx_declare_of_platform_devices);
|
||||
*/
|
||||
static int __init mpc832x_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC832xRDB");
|
||||
return of_machine_is_compatible("MPC832xRDB");
|
||||
}
|
||||
|
||||
define_machine(mpc832x_rdb) {
|
||||
|
@@ -70,9 +70,7 @@ static void __init mpc834x_itx_setup_arch(void)
|
||||
*/
|
||||
static int __init mpc834x_itx_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC834xMITX");
|
||||
return of_machine_is_compatible("MPC834xMITX");
|
||||
}
|
||||
|
||||
define_machine(mpc834x_itx) {
|
||||
|
@@ -91,9 +91,7 @@ machine_device_initcall(mpc834x_mds, mpc83xx_declare_of_platform_devices);
|
||||
*/
|
||||
static int __init mpc834x_mds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC834xMDS");
|
||||
return of_machine_is_compatible("MPC834xMDS");
|
||||
}
|
||||
|
||||
define_machine(mpc834x_mds) {
|
||||
|
@@ -209,9 +209,7 @@ machine_arch_initcall(mpc836x_mds, mpc836x_usb_cfg);
|
||||
*/
|
||||
static int __init mpc836x_mds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC836xMDS");
|
||||
return of_machine_is_compatible("MPC836xMDS");
|
||||
}
|
||||
|
||||
define_machine(mpc836x_mds) {
|
||||
|
@@ -42,9 +42,7 @@ static void __init mpc836x_rdk_setup_arch(void)
|
||||
*/
|
||||
static int __init mpc836x_rdk_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc8360rdk");
|
||||
return of_machine_is_compatible("fsl,mpc8360rdk");
|
||||
}
|
||||
|
||||
define_machine(mpc836x_rdk) {
|
||||
|
@@ -93,9 +93,7 @@ machine_device_initcall(mpc837x_mds, mpc83xx_declare_of_platform_devices);
|
||||
*/
|
||||
static int __init mpc837x_mds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc837xmds");
|
||||
return of_machine_is_compatible("fsl,mpc837xmds");
|
||||
}
|
||||
|
||||
define_machine(mpc837x_mds) {
|
||||
|
@@ -73,7 +73,7 @@ static const char * const board[] __initconst = {
|
||||
*/
|
||||
static int __init mpc837x_rdb_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
define_machine(mpc837x_rdb) {
|
||||
|
@@ -65,7 +65,7 @@
|
||||
* mpc83xx_* files. Mostly for use by mpc83xx_setup
|
||||
*/
|
||||
|
||||
extern void mpc83xx_restart(char *cmd);
|
||||
extern void __noreturn mpc83xx_restart(char *cmd);
|
||||
extern long mpc83xx_time_init(void);
|
||||
extern int mpc837x_usb_cfg(void);
|
||||
extern int mpc834x_usb_cfg(void);
|
||||
|
@@ -60,9 +60,7 @@ machine_device_initcall(sbc834x, mpc83xx_declare_of_platform_devices);
|
||||
*/
|
||||
static int __init sbc834x_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "SBC834xE");
|
||||
return of_machine_is_compatible("SBC834xE");
|
||||
}
|
||||
|
||||
define_machine(sbc834x) {
|
||||
|
@@ -60,9 +60,7 @@ machine_arch_initcall(bsc9132_qds, mpc85xx_common_publish_devices);
|
||||
|
||||
static int __init bsc9132_qds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,bsc9132qds");
|
||||
return of_machine_is_compatible("fsl,bsc9132qds");
|
||||
}
|
||||
|
||||
define_machine(bsc9132_qds) {
|
||||
|
@@ -50,9 +50,7 @@ machine_device_initcall(bsc9131_rdb, mpc85xx_common_publish_devices);
|
||||
|
||||
static int __init bsc9131_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,bsc9131rdb");
|
||||
return of_machine_is_compatible("fsl,bsc9131rdb");
|
||||
}
|
||||
|
||||
define_machine(bsc9131_rdb) {
|
||||
|
@@ -54,9 +54,7 @@ machine_arch_initcall(c293_pcie, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init c293_pcie_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,C293PCIE"))
|
||||
if (of_machine_is_compatible("fsl,C293PCIE"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -170,20 +170,19 @@ static const char * const boards[] __initconst = {
|
||||
*/
|
||||
static int __init corenet_generic_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
char hv_compat[24];
|
||||
int i;
|
||||
#ifdef CONFIG_SMP
|
||||
extern struct smp_ops_t smp_85xx_ops;
|
||||
#endif
|
||||
|
||||
if (of_flat_dt_match(root, boards))
|
||||
if (of_device_compatible_match(of_root, boards))
|
||||
return 1;
|
||||
|
||||
/* Check if we're running under the Freescale hypervisor */
|
||||
for (i = 0; boards[i]; i++) {
|
||||
snprintf(hv_compat, sizeof(hv_compat), "%s-hv", boards[i]);
|
||||
if (of_flat_dt_is_compatible(root, hv_compat)) {
|
||||
if (of_machine_is_compatible(hv_compat)) {
|
||||
ppc_md.init_IRQ = ehv_pic_init;
|
||||
|
||||
ppc_md.get_irq = ehv_pic_get_irq;
|
||||
|
@@ -47,9 +47,8 @@ void __init ge_imp3a_pic_init(void)
|
||||
struct mpic *mpic;
|
||||
struct device_node *np;
|
||||
struct device_node *cascade_node = NULL;
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) {
|
||||
if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) {
|
||||
mpic = mpic_alloc(NULL, 0,
|
||||
MPIC_NO_RESET |
|
||||
MPIC_BIG_ENDIAN |
|
||||
@@ -198,9 +197,7 @@ static void ge_imp3a_show_cpuinfo(struct seq_file *m)
|
||||
*/
|
||||
static int __init ge_imp3a_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "ge,IMP3A");
|
||||
return of_machine_is_compatible("ge,IMP3A");
|
||||
}
|
||||
|
||||
machine_arch_initcall(ge_imp3a, mpc85xx_common_publish_devices);
|
||||
|
@@ -44,7 +44,7 @@
|
||||
|
||||
static void __iomem *cpld_base = NULL;
|
||||
|
||||
static void machine_restart(char *cmd)
|
||||
static void __noreturn machine_restart(char *cmd)
|
||||
{
|
||||
if (cpld_base)
|
||||
out_8(cpld_base + KSI8560_CPLD_RCR1, KSI8560_CPLD_RCR1_CPUHR);
|
||||
@@ -176,9 +176,7 @@ machine_device_initcall(ksi8560, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init ksi8560_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "emerson,KSI8560");
|
||||
return of_machine_is_compatible("emerson,KSI8560");
|
||||
}
|
||||
|
||||
define_machine(ksi8560) {
|
||||
|
@@ -64,9 +64,7 @@ machine_arch_initcall(mpc8536_ds, swiotlb_setup_bus_notifier);
|
||||
*/
|
||||
static int __init mpc8536_ds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc8536ds");
|
||||
return of_machine_is_compatible("fsl,mpc8536ds");
|
||||
}
|
||||
|
||||
define_machine(mpc8536_ds) {
|
||||
|
@@ -160,9 +160,7 @@ machine_arch_initcall(mpc85xx_ads, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init mpc85xx_ads_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC85xxADS");
|
||||
return of_machine_is_compatible("MPC85xxADS");
|
||||
}
|
||||
|
||||
define_machine(mpc85xx_ads) {
|
||||
|
@@ -83,7 +83,7 @@ static int mpc85xx_exclude_device(struct pci_controller *hose,
|
||||
return PCIBIOS_SUCCESSFUL;
|
||||
}
|
||||
|
||||
static void mpc85xx_cds_restart(char *cmd)
|
||||
static void __noreturn mpc85xx_cds_restart(char *cmd)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
u_char tmp;
|
||||
@@ -367,9 +367,7 @@ static void mpc85xx_cds_show_cpuinfo(struct seq_file *m)
|
||||
*/
|
||||
static int __init mpc85xx_cds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC85xxCDS");
|
||||
return of_machine_is_compatible("MPC85xxCDS");
|
||||
}
|
||||
|
||||
machine_arch_initcall(mpc85xx_cds, mpc85xx_common_publish_devices);
|
||||
|
@@ -66,9 +66,7 @@ void __init mpc85xx_ds_pic_init(void)
|
||||
struct device_node *cascade_node = NULL;
|
||||
int cascade_irq;
|
||||
#endif
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,MPC8572DS-CAMP")) {
|
||||
if (of_machine_is_compatible("fsl,MPC8572DS-CAMP")) {
|
||||
mpic = mpic_alloc(NULL, 0,
|
||||
MPIC_NO_RESET |
|
||||
MPIC_BIG_ENDIAN |
|
||||
@@ -169,9 +167,7 @@ static void __init mpc85xx_ds_setup_arch(void)
|
||||
*/
|
||||
static int __init mpc8544_ds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return !!of_flat_dt_is_compatible(root, "MPC8544DS");
|
||||
return !!of_machine_is_compatible("MPC8544DS");
|
||||
}
|
||||
|
||||
machine_arch_initcall(mpc8544_ds, mpc85xx_common_publish_devices);
|
||||
@@ -187,9 +183,7 @@ machine_arch_initcall(p2020_ds, swiotlb_setup_bus_notifier);
|
||||
*/
|
||||
static int __init mpc8572_ds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return !!of_flat_dt_is_compatible(root, "fsl,MPC8572DS");
|
||||
return !!of_machine_is_compatible("fsl,MPC8572DS");
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -197,9 +191,7 @@ static int __init mpc8572_ds_probe(void)
|
||||
*/
|
||||
static int __init p2020_ds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return !!of_flat_dt_is_compatible(root, "fsl,P2020DS");
|
||||
return !!of_machine_is_compatible("fsl,P2020DS");
|
||||
}
|
||||
|
||||
define_machine(mpc8544_ds) {
|
||||
|
@@ -376,9 +376,7 @@ static void __init mpc85xx_mds_pic_init(void)
|
||||
|
||||
static int __init mpc85xx_mds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "MPC85xxMDS");
|
||||
return of_machine_is_compatible("MPC85xxMDS");
|
||||
}
|
||||
|
||||
define_machine(mpc8568_mds) {
|
||||
@@ -398,9 +396,7 @@ define_machine(mpc8568_mds) {
|
||||
|
||||
static int __init mpc8569_mds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,MPC8569EMDS");
|
||||
return of_machine_is_compatible("fsl,MPC8569EMDS");
|
||||
}
|
||||
|
||||
define_machine(mpc8569_mds) {
|
||||
@@ -420,9 +416,7 @@ define_machine(mpc8569_mds) {
|
||||
|
||||
static int __init p1021_mds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1021MDS");
|
||||
return of_machine_is_compatible("fsl,P1021MDS");
|
||||
|
||||
}
|
||||
|
||||
|
@@ -47,13 +47,12 @@
|
||||
void __init mpc85xx_rdb_pic_init(void)
|
||||
{
|
||||
struct mpic *mpic;
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
#ifdef CONFIG_QUICC_ENGINE
|
||||
struct device_node *np;
|
||||
#endif
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,MPC85XXRDB-CAMP")) {
|
||||
if (of_machine_is_compatible("fsl,MPC85XXRDB-CAMP")) {
|
||||
mpic = mpic_alloc(NULL, 0, MPIC_NO_RESET |
|
||||
MPIC_BIG_ENDIAN |
|
||||
MPIC_SINGLE_DEST_CPU,
|
||||
@@ -148,80 +147,60 @@ machine_arch_initcall(p1024_rdb, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init p2020_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,P2020RDB"))
|
||||
if (of_machine_is_compatible("fsl,P2020RDB"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init p1020_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,P1020RDB"))
|
||||
if (of_machine_is_compatible("fsl,P1020RDB"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init p1020_rdb_pc_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1020RDB-PC");
|
||||
return of_machine_is_compatible("fsl,P1020RDB-PC");
|
||||
}
|
||||
|
||||
static int __init p1020_rdb_pd_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1020RDB-PD");
|
||||
return of_machine_is_compatible("fsl,P1020RDB-PD");
|
||||
}
|
||||
|
||||
static int __init p1021_rdb_pc_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,P1021RDB-PC"))
|
||||
if (of_machine_is_compatible("fsl,P1021RDB-PC"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init p2020_rdb_pc_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,P2020RDB-PC"))
|
||||
if (of_machine_is_compatible("fsl,P2020RDB-PC"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __init p1025_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1025RDB");
|
||||
return of_machine_is_compatible("fsl,P1025RDB");
|
||||
}
|
||||
|
||||
static int __init p1020_mbg_pc_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1020MBG-PC");
|
||||
return of_machine_is_compatible("fsl,P1020MBG-PC");
|
||||
}
|
||||
|
||||
static int __init p1020_utm_pc_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1020UTM-PC");
|
||||
return of_machine_is_compatible("fsl,P1020UTM-PC");
|
||||
}
|
||||
|
||||
static int __init p1024_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1024RDB");
|
||||
return of_machine_is_compatible("fsl,P1024RDB");
|
||||
}
|
||||
|
||||
define_machine(p2020_rdb) {
|
||||
|
@@ -53,9 +53,7 @@ machine_arch_initcall(mvme2500, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init mvme2500_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "artesyn,MVME2500");
|
||||
return of_machine_is_compatible("artesyn,MVME2500");
|
||||
}
|
||||
|
||||
define_machine(mvme2500) {
|
||||
|
@@ -62,11 +62,9 @@ machine_arch_initcall(p1010_rdb, swiotlb_setup_bus_notifier);
|
||||
*/
|
||||
static int __init p1010_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,P1010RDB"))
|
||||
if (of_machine_is_compatible("fsl,P1010RDB"))
|
||||
return 1;
|
||||
if (of_flat_dt_is_compatible(root, "fsl,P1010RDB-PB"))
|
||||
if (of_machine_is_compatible("fsl,P1010RDB-PB"))
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -555,9 +555,7 @@ machine_arch_initcall(p1022_ds, swiotlb_setup_bus_notifier);
|
||||
*/
|
||||
static int __init p1022_ds_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,p1022ds");
|
||||
return of_machine_is_compatible("fsl,p1022ds");
|
||||
}
|
||||
|
||||
define_machine(p1022_ds) {
|
||||
|
@@ -135,9 +135,7 @@ machine_arch_initcall(p1022_rdk, swiotlb_setup_bus_notifier);
|
||||
*/
|
||||
static int __init p1022_rdk_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,p1022rdk");
|
||||
return of_machine_is_compatible("fsl,p1022rdk");
|
||||
}
|
||||
|
||||
define_machine(p1022_rdk) {
|
||||
|
@@ -100,9 +100,7 @@ static void __init mpc85xx_rdb_pic_init(void)
|
||||
|
||||
static int __init p1023_rdb_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,P1023RDB");
|
||||
return of_machine_is_compatible("fsl,P1023RDB");
|
||||
|
||||
}
|
||||
|
||||
|
@@ -81,9 +81,7 @@ machine_device_initcall(ppa8548, declare_of_platform_devices);
|
||||
*/
|
||||
static int __init ppa8548_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "ppa8548");
|
||||
return of_machine_is_compatible("ppa8548");
|
||||
}
|
||||
|
||||
define_machine(ppa8548) {
|
||||
|
@@ -62,9 +62,7 @@ static void __init qemu_e500_setup_arch(void)
|
||||
*/
|
||||
static int __init qemu_e500_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return !!of_flat_dt_is_compatible(root, "fsl,qemu-e500");
|
||||
return !!of_machine_is_compatible("fsl,qemu-e500");
|
||||
}
|
||||
|
||||
machine_arch_initcall(qemu_e500, mpc85xx_common_publish_devices);
|
||||
|
@@ -120,9 +120,7 @@ machine_arch_initcall(sbc8548, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init sbc8548_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "SBC8548");
|
||||
return of_machine_is_compatible("SBC8548");
|
||||
}
|
||||
|
||||
define_machine(sbc8548) {
|
||||
|
@@ -79,9 +79,7 @@ machine_arch_initcall(socrates, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init socrates_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "abb,socrates"))
|
||||
if (of_machine_is_compatible("abb,socrates"))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@@ -93,9 +93,7 @@ machine_arch_initcall(stx_gp3, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init stx_gp3_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "stx,gp3-8560");
|
||||
return of_machine_is_compatible("stx,gp3-8560");
|
||||
}
|
||||
|
||||
define_machine(stx_gp3) {
|
||||
|
@@ -122,7 +122,7 @@ static const char * const board[] __initconst = {
|
||||
*/
|
||||
static int __init tqm85xx_probe(void)
|
||||
{
|
||||
return of_flat_dt_match(of_get_flat_dt_root(), board);
|
||||
return of_device_compatible_match(of_root, board);
|
||||
}
|
||||
|
||||
define_machine(tqm85xx) {
|
||||
|
@@ -128,9 +128,7 @@ machine_arch_initcall(twr_p1025, mpc85xx_common_publish_devices);
|
||||
|
||||
static int __init twr_p1025_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "fsl,TWR-P1025");
|
||||
return of_machine_is_compatible("fsl,TWR-P1025");
|
||||
}
|
||||
|
||||
define_machine(twr_p1025) {
|
||||
|
@@ -144,23 +144,17 @@ machine_arch_initcall(xes_mpc8540, mpc85xx_common_publish_devices);
|
||||
*/
|
||||
static int __init xes_mpc8572_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "xes,MPC8572");
|
||||
return of_machine_is_compatible("xes,MPC8572");
|
||||
}
|
||||
|
||||
static int __init xes_mpc8548_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "xes,MPC8548");
|
||||
return of_machine_is_compatible("xes,MPC8548");
|
||||
}
|
||||
|
||||
static int __init xes_mpc8540_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "xes,MPC8540");
|
||||
return of_machine_is_compatible("xes,MPC8540");
|
||||
}
|
||||
|
||||
define_machine(xes_mpc8572) {
|
||||
|
@@ -60,6 +60,11 @@ config GEF_SBC610
|
||||
help
|
||||
This option enables support for the GE SBC610.
|
||||
|
||||
config MVME7100
|
||||
bool "Artesyn MVME7100"
|
||||
help
|
||||
This option enables support for the Emerson/Artesyn MVME7100 board.
|
||||
|
||||
endif
|
||||
|
||||
config MPC8641
|
||||
@@ -68,7 +73,8 @@ config MPC8641
|
||||
select FSL_PCI if PCI
|
||||
select PPC_UDBG_16550
|
||||
select MPIC
|
||||
default y if MPC8641_HPCN || SBC8641D || GEF_SBC610 || GEF_SBC310 || GEF_PPC9A
|
||||
default y if MPC8641_HPCN || SBC8641D || GEF_SBC610 || GEF_SBC310 || GEF_PPC9A \
|
||||
|| MVME7100
|
||||
|
||||
config MPC8610
|
||||
bool
|
||||
|
@@ -10,3 +10,4 @@ obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o
|
||||
obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o
|
||||
obj-$(CONFIG_GEF_SBC310) += gef_sbc310.o
|
||||
obj-$(CONFIG_GEF_PPC9A) += gef_ppc9a.o
|
||||
obj-$(CONFIG_MVME7100) += mvme7100.o
|
||||
|
@@ -189,9 +189,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
|
||||
*/
|
||||
static int __init gef_ppc9a_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "gef,ppc9a"))
|
||||
if (of_machine_is_compatible("gef,ppc9a"))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@@ -176,9 +176,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
|
||||
*/
|
||||
static int __init gef_sbc310_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "gef,sbc310"))
|
||||
if (of_machine_is_compatible("gef,sbc310"))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@@ -166,9 +166,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
|
||||
*/
|
||||
static int __init gef_sbc610_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "gef,sbc610"))
|
||||
if (of_machine_is_compatible("gef,sbc610"))
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
|
@@ -319,9 +319,7 @@ static void __init mpc86xx_hpcd_setup_arch(void)
|
||||
*/
|
||||
static int __init mpc86xx_hpcd_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,MPC8610HPCD"))
|
||||
if (of_machine_is_compatible("fsl,MPC8610HPCD"))
|
||||
return 1; /* Looks good */
|
||||
|
||||
return 0;
|
||||
|
@@ -96,13 +96,11 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m)
|
||||
*/
|
||||
static int __init mpc86xx_hpcn_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "fsl,mpc8641hpcn"))
|
||||
if (of_machine_is_compatible("fsl,mpc8641hpcn"))
|
||||
return 1; /* Looks good */
|
||||
|
||||
/* Be nice and don't give silent boot death. Delete this in 2.6.27 */
|
||||
if (of_flat_dt_is_compatible(root, "mpc86xx")) {
|
||||
if (of_machine_is_compatible("mpc86xx")) {
|
||||
pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n");
|
||||
return 1;
|
||||
}
|
||||
|
121
arch/powerpc/platforms/86xx/mvme7100.c
Normal file
121
arch/powerpc/platforms/86xx/mvme7100.c
Normal file
@@ -0,0 +1,121 @@
|
||||
/*
|
||||
* Board setup routines for the Emerson/Artesyn MVME7100
|
||||
*
|
||||
* Copyright 2016 Elettra-Sincrotrone Trieste S.C.p.A.
|
||||
*
|
||||
* Author: Alessio Igor Bogani <alessio.bogani@elettra.eu>
|
||||
*
|
||||
* Based on earlier code by:
|
||||
*
|
||||
* Ajit Prem <ajit.prem@emerson.com>
|
||||
* Copyright 2008 Emerson
|
||||
*
|
||||
* USB host fixup is borrowed by:
|
||||
*
|
||||
* Martyn Welch <martyn.welch@ge.com>
|
||||
* Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc.
|
||||
*
|
||||
* 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; either version 2 of the License, or (at your
|
||||
* option) any later version.
|
||||
*
|
||||
*/
|
||||
|
||||
#include <linux/pci.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/of_platform.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <asm/udbg.h>
|
||||
#include <asm/mpic.h>
|
||||
#include <sysdev/fsl_soc.h>
|
||||
#include <sysdev/fsl_pci.h>
|
||||
|
||||
#include "mpc86xx.h"
|
||||
|
||||
#define MVME7100_INTERRUPT_REG_2_OFFSET 0x05
|
||||
#define MVME7100_DS1375_MASK 0x40
|
||||
#define MVME7100_MAX6649_MASK 0x20
|
||||
#define MVME7100_ABORT_MASK 0x10
|
||||
|
||||
/*
|
||||
* Setup the architecture
|
||||
*/
|
||||
static void __init mvme7100_setup_arch(void)
|
||||
{
|
||||
struct device_node *bcsr_node;
|
||||
void __iomem *mvme7100_regs = NULL;
|
||||
u8 reg;
|
||||
|
||||
if (ppc_md.progress)
|
||||
ppc_md.progress("mvme7100_setup_arch()", 0);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
mpc86xx_smp_init();
|
||||
#endif
|
||||
|
||||
fsl_pci_assign_primary();
|
||||
|
||||
/* Remap BCSR registers */
|
||||
bcsr_node = of_find_compatible_node(NULL, NULL,
|
||||
"artesyn,mvme7100-bcsr");
|
||||
if (bcsr_node) {
|
||||
mvme7100_regs = of_iomap(bcsr_node, 0);
|
||||
of_node_put(bcsr_node);
|
||||
}
|
||||
|
||||
if (mvme7100_regs) {
|
||||
/* Disable ds1375, max6649, and abort interrupts */
|
||||
reg = readb(mvme7100_regs + MVME7100_INTERRUPT_REG_2_OFFSET);
|
||||
reg |= MVME7100_DS1375_MASK | MVME7100_MAX6649_MASK
|
||||
| MVME7100_ABORT_MASK;
|
||||
writeb(reg, mvme7100_regs + MVME7100_INTERRUPT_REG_2_OFFSET);
|
||||
} else
|
||||
pr_warn("Unable to map board registers\n");
|
||||
|
||||
pr_info("MVME7100 board from Artesyn\n");
|
||||
}
|
||||
|
||||
/*
|
||||
* Called very early, device-tree isn't unflattened
|
||||
*/
|
||||
static int __init mvme7100_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(root, "artesyn,MVME7100");
|
||||
}
|
||||
|
||||
static void mvme7100_usb_host_fixup(struct pci_dev *pdev)
|
||||
{
|
||||
unsigned int val;
|
||||
|
||||
if (!machine_is(mvme7100))
|
||||
return;
|
||||
|
||||
/* Ensure only ports 1 & 2 are enabled */
|
||||
pci_read_config_dword(pdev, 0xe0, &val);
|
||||
pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x2);
|
||||
|
||||
/* System clock is 48-MHz Oscillator and EHCI Enabled. */
|
||||
pci_write_config_dword(pdev, 0xe4, 1 << 5);
|
||||
}
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB,
|
||||
mvme7100_usb_host_fixup);
|
||||
|
||||
machine_arch_initcall(mvme7100, mpc86xx_common_publish_devices);
|
||||
|
||||
define_machine(mvme7100) {
|
||||
.name = "MVME7100",
|
||||
.probe = mvme7100_probe,
|
||||
.setup_arch = mvme7100_setup_arch,
|
||||
.init_IRQ = mpc86xx_init_irq,
|
||||
.get_irq = mpic_get_irq,
|
||||
.restart = fsl_rstcr_restart,
|
||||
.time_init = mpc86xx_time_init,
|
||||
.calibrate_decr = generic_calibrate_decr,
|
||||
.progress = udbg_progress,
|
||||
#ifdef CONFIG_PCI
|
||||
.pcibios_fixup_bus = fsl_pcibios_fixup_bus,
|
||||
#endif
|
||||
};
|
@@ -67,9 +67,7 @@ sbc8641_show_cpuinfo(struct seq_file *m)
|
||||
*/
|
||||
static int __init sbc8641_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "wind,sbc8641"))
|
||||
if (of_machine_is_compatible("wind,sbc8641"))
|
||||
return 1; /* Looks good */
|
||||
|
||||
return 0;
|
||||
|
@@ -88,8 +88,7 @@ static void __init adder875_setup(void)
|
||||
|
||||
static int __init adder875_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "analogue-and-micro,adder875");
|
||||
return of_machine_is_compatible("analogue-and-micro,adder875");
|
||||
}
|
||||
|
||||
static const struct of_device_id of_bus_ids[] __initconst = {
|
||||
|
@@ -143,8 +143,7 @@ static void __init ep88xc_setup_arch(void)
|
||||
|
||||
static int __init ep88xc_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "fsl,ep88xc");
|
||||
return of_machine_is_compatible("fsl,ep88xc");
|
||||
}
|
||||
|
||||
static const struct of_device_id of_bus_ids[] __initconst = {
|
||||
|
@@ -198,7 +198,7 @@ void mpc8xx_get_rtc_time(struct rtc_time *tm)
|
||||
return;
|
||||
}
|
||||
|
||||
void mpc8xx_restart(char *cmd)
|
||||
void __noreturn mpc8xx_restart(char *cmd)
|
||||
{
|
||||
car8xx_t __iomem *clk_r = immr_map(im_clkrst);
|
||||
|
||||
|
@@ -118,8 +118,7 @@ static void __init mpc86xads_setup_arch(void)
|
||||
|
||||
static int __init mpc86xads_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc866ads");
|
||||
return of_machine_is_compatible("fsl,mpc866ads");
|
||||
}
|
||||
|
||||
static const struct of_device_id of_bus_ids[] __initconst = {
|
||||
|
@@ -193,8 +193,7 @@ static void __init mpc885ads_setup_arch(void)
|
||||
|
||||
static int __init mpc885ads_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
return of_flat_dt_is_compatible(root, "fsl,mpc885ads");
|
||||
return of_machine_is_compatible("fsl,mpc885ads");
|
||||
}
|
||||
|
||||
static const struct of_device_id of_bus_ids[] __initconst = {
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#ifndef __MPC8xx_H
|
||||
#define __MPC8xx_H
|
||||
|
||||
extern void mpc8xx_restart(char *cmd);
|
||||
extern void __noreturn mpc8xx_restart(char *cmd);
|
||||
extern void mpc8xx_calibrate_decr(void);
|
||||
extern int mpc8xx_set_rtc_time(struct rtc_time *tm);
|
||||
extern void mpc8xx_get_rtc_time(struct rtc_time *tm);
|
||||
|
@@ -119,9 +119,7 @@ static void __init tqm8xx_setup_arch(void)
|
||||
|
||||
static int __init tqm8xx_probe(void)
|
||||
{
|
||||
unsigned long node = of_get_flat_dt_root();
|
||||
|
||||
return of_flat_dt_is_compatible(node, "tqc,tqm8xx");
|
||||
return of_machine_is_compatible("tqc,tqm8xx");
|
||||
}
|
||||
|
||||
static const struct of_device_id of_bus_ids[] __initconst = {
|
||||
|
@@ -1,7 +1,6 @@
|
||||
config PPC64
|
||||
bool "64-bit kernel"
|
||||
default n
|
||||
select HAVE_VIRT_CPU_ACCOUNTING
|
||||
select ZLIB_DEFLATE
|
||||
help
|
||||
This option selects whether a 32-bit or a 64-bit kernel
|
||||
|
@@ -123,7 +123,7 @@ static int __init request_isa_regions(void)
|
||||
}
|
||||
machine_device_initcall(amigaone, request_isa_regions);
|
||||
|
||||
void amigaone_restart(char *cmd)
|
||||
void __noreturn amigaone_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
|
||||
@@ -143,9 +143,7 @@ void amigaone_restart(char *cmd)
|
||||
|
||||
static int __init amigaone_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (of_flat_dt_is_compatible(root, "eyetech,amigaone")) {
|
||||
if (of_machine_is_compatible("eyetech,amigaone")) {
|
||||
/*
|
||||
* Coherent memory access cause complete system lockup! Thus
|
||||
* disable this CPU feature, even if the CPU needs it.
|
||||
|
@@ -178,7 +178,7 @@ static int tce_build_cell(struct iommu_table *tbl, long index, long npages,
|
||||
* default for now.*/
|
||||
#ifdef CELL_IOMMU_STRICT_PROTECTION
|
||||
/* to avoid referencing a global, we use a trick here to setup the
|
||||
* protection bit. "prot" is setup to be 3 fields of 4 bits apprended
|
||||
* protection bit. "prot" is setup to be 3 fields of 4 bits appended
|
||||
* together for each of the 3 supported direction values. It is then
|
||||
* shifted left so that the fields matching the desired direction
|
||||
* lands on the appropriate bits, and other bits are masked out.
|
||||
@@ -338,7 +338,7 @@ static unsigned long *cell_iommu_alloc_ptab(struct cbe_iommu *iommu,
|
||||
start_seg = base >> IO_SEGMENT_SHIFT;
|
||||
segments = size >> IO_SEGMENT_SHIFT;
|
||||
pages_per_segment = 1ull << IO_PAGENO_BITS(page_shift);
|
||||
/* PTEs for each segment must start on a 4K bounday */
|
||||
/* PTEs for each segment must start on a 4K boundary */
|
||||
pages_per_segment = max(pages_per_segment,
|
||||
(1 << 12) / sizeof(unsigned long));
|
||||
|
||||
|
@@ -255,13 +255,10 @@ static void __init cell_setup_arch(void)
|
||||
|
||||
static int __init cell_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "IBM,CBEA") &&
|
||||
!of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
|
||||
if (!of_machine_is_compatible("IBM,CBEA") &&
|
||||
!of_machine_is_compatible("IBM,CPBW-1.0"))
|
||||
return 0;
|
||||
|
||||
hpte_init_native();
|
||||
pm_power_off = rtas_power_off;
|
||||
|
||||
return 1;
|
||||
|
@@ -217,7 +217,7 @@ static void spider_irq_cascade(struct irq_desc *desc)
|
||||
chip->irq_eoi(&desc->irq_data);
|
||||
}
|
||||
|
||||
/* For hooking up the cascace we have a problem. Our device-tree is
|
||||
/* For hooking up the cascade we have a problem. Our device-tree is
|
||||
* crap and we don't know on which BE iic interrupt we are hooked on at
|
||||
* least not the "standard" way. We can reconstitute it based on two
|
||||
* informations though: which BE node we are connected to and whether
|
||||
|
@@ -69,7 +69,7 @@ static DEFINE_SPINLOCK(spu_lock);
|
||||
* spu_full_list_lock and spu_full_list_mutex held, while iterating
|
||||
* through it requires either of these locks.
|
||||
*
|
||||
* In addition spu_full_list_lock protects all assignmens to
|
||||
* In addition spu_full_list_lock protects all assignments to
|
||||
* spu->mm.
|
||||
*/
|
||||
static LIST_HEAD(spu_full_list);
|
||||
@@ -253,7 +253,7 @@ static inline int __slb_present(struct copro_slb *slbs, int nr_slbs,
|
||||
* Setup the SPU kernel SLBs, in preparation for a context save/restore. We
|
||||
* need to map both the context save area, and the save/restore code.
|
||||
*
|
||||
* Because the lscsa and code may cross segment boundaires, we check to see
|
||||
* Because the lscsa and code may cross segment boundaries, we check to see
|
||||
* if mappings are required for the start and end of each range. We currently
|
||||
* assume that the mappings are smaller that one segment - if not, something
|
||||
* is seriously wrong.
|
||||
|
@@ -535,8 +535,7 @@ static int __init init_affinity(void)
|
||||
if (of_has_vicinity()) {
|
||||
init_affinity_fw();
|
||||
} else {
|
||||
long root = of_get_flat_dt_root();
|
||||
if (of_flat_dt_is_compatible(root, "IBM,CPBW-1.0"))
|
||||
if (of_machine_is_compatible("IBM,CPBW-1.0"))
|
||||
init_affinity_qs20_harcoded();
|
||||
else
|
||||
printk("No affinity configuration found\n");
|
||||
|
@@ -866,7 +866,7 @@ void spufs_wbox_callback(struct spu *spu)
|
||||
* - end of the mapped area
|
||||
*
|
||||
* If the file is opened without O_NONBLOCK, we wait here until
|
||||
* space is availabyl, but return when we have been able to
|
||||
* space is available, but return when we have been able to
|
||||
* write something.
|
||||
*/
|
||||
static ssize_t spufs_wbox_write(struct file *file, const char __user *buf,
|
||||
|
@@ -435,7 +435,7 @@ long spufs_run_spu(struct spu_context *ctx, u32 *npc, u32 *event)
|
||||
|
||||
/* Note: we don't need to force_sig SIGTRAP on single-step
|
||||
* since we have TIF_SINGLESTEP set, thus the kernel will do
|
||||
* it upon return from the syscall anyawy
|
||||
* it upon return from the syscall anyway.
|
||||
*/
|
||||
if (unlikely(status & SPU_STATUS_SINGLE_STEP))
|
||||
ret = -ERESTARTSYS;
|
||||
|
@@ -622,7 +622,7 @@ static struct spu *spu_get_idle(struct spu_context *ctx)
|
||||
|
||||
/**
|
||||
* find_victim - find a lower priority context to preempt
|
||||
* @ctx: canidate context for running
|
||||
* @ctx: candidate context for running
|
||||
*
|
||||
* Returns the freed physical spu to run the new context on.
|
||||
*/
|
||||
|
@@ -239,7 +239,7 @@ out:
|
||||
of_node_put(np);
|
||||
}
|
||||
|
||||
static void briq_restart(char *cmd)
|
||||
static void __noreturn briq_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
if (briq_SPOR)
|
||||
@@ -253,7 +253,7 @@ static void briq_restart(char *cmd)
|
||||
* But unfortunately, the firmware does not connect /chosen/{stdin,stdout}
|
||||
* the the built-in serial node. Instead, a /failsafe node is created.
|
||||
*/
|
||||
static __init void chrp_init_early(void)
|
||||
static __init void chrp_init(void)
|
||||
{
|
||||
struct device_node *node;
|
||||
const char *property;
|
||||
@@ -587,6 +587,8 @@ static int __init chrp_probe(void)
|
||||
|
||||
pm_power_off = rtas_power_off;
|
||||
|
||||
chrp_init();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -595,7 +597,6 @@ define_machine(chrp) {
|
||||
.probe = chrp_probe,
|
||||
.setup_arch = chrp_setup_arch,
|
||||
.init = chrp_init2,
|
||||
.init_early = chrp_init_early,
|
||||
.show_cpuinfo = chrp_show_cpuinfo,
|
||||
.init_IRQ = chrp_init_IRQ,
|
||||
.restart = rtas_restart,
|
||||
|
@@ -99,7 +99,7 @@ static void c2k_reset_board(void)
|
||||
out_le32(mv64x60_gpp_reg_base + MV64x60_GPP_VALUE_SET, 0x00080004);
|
||||
}
|
||||
|
||||
static void c2k_restart(char *cmd)
|
||||
static void __noreturn c2k_restart(char *cmd)
|
||||
{
|
||||
c2k_reset_board();
|
||||
msleep(100);
|
||||
@@ -123,15 +123,16 @@ void c2k_show_cpuinfo(struct seq_file *m)
|
||||
*/
|
||||
static int __init c2k_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "GEFanuc,C2K"))
|
||||
if (!of_machine_is_compatible("GEFanuc,C2K"))
|
||||
return 0;
|
||||
|
||||
printk(KERN_INFO "Detected a GEFanuc C2K board\n");
|
||||
|
||||
_set_L2CR(0);
|
||||
_set_L2CR(L2CR_L2E | L2CR_L2PE | L2CR_L2I);
|
||||
|
||||
mv64x60_init_early();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -139,7 +140,6 @@ define_machine(c2k) {
|
||||
.name = "C2K",
|
||||
.probe = c2k_probe,
|
||||
.setup_arch = c2k_setup_arch,
|
||||
.init_early = mv64x60_init_early,
|
||||
.show_cpuinfo = c2k_show_cpuinfo,
|
||||
.init_IRQ = mv64x60_init_irq,
|
||||
.get_irq = mv64x60_get_irq,
|
||||
|
@@ -29,14 +29,14 @@
|
||||
#include "usbgecko_udbg.h"
|
||||
|
||||
|
||||
static void gamecube_spin(void)
|
||||
static void __noreturn gamecube_spin(void)
|
||||
{
|
||||
/* spin until power button pressed */
|
||||
for (;;)
|
||||
cpu_relax();
|
||||
}
|
||||
|
||||
static void gamecube_restart(char *cmd)
|
||||
static void __noreturn gamecube_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
flipper_platform_reset();
|
||||
@@ -49,26 +49,20 @@ static void gamecube_power_off(void)
|
||||
gamecube_spin();
|
||||
}
|
||||
|
||||
static void gamecube_halt(void)
|
||||
static void __noreturn gamecube_halt(void)
|
||||
{
|
||||
gamecube_restart(NULL);
|
||||
}
|
||||
|
||||
static void __init gamecube_init_early(void)
|
||||
{
|
||||
ug_udbg_init();
|
||||
}
|
||||
|
||||
static int __init gamecube_probe(void)
|
||||
{
|
||||
unsigned long dt_root;
|
||||
|
||||
dt_root = of_get_flat_dt_root();
|
||||
if (!of_flat_dt_is_compatible(dt_root, "nintendo,gamecube"))
|
||||
if (!of_machine_is_compatible("nintendo,gamecube"))
|
||||
return 0;
|
||||
|
||||
pm_power_off = gamecube_power_off;
|
||||
|
||||
ug_udbg_init();
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -80,7 +74,6 @@ static void gamecube_shutdown(void)
|
||||
define_machine(gamecube) {
|
||||
.name = "gamecube",
|
||||
.probe = gamecube_probe,
|
||||
.init_early = gamecube_init_early,
|
||||
.restart = gamecube_restart,
|
||||
.halt = gamecube_halt,
|
||||
.init_IRQ = flipper_pic_probe,
|
||||
|
@@ -193,7 +193,7 @@ void holly_show_cpuinfo(struct seq_file *m)
|
||||
seq_printf(m, "machine\t\t: PPC750 GX/CL\n");
|
||||
}
|
||||
|
||||
void holly_restart(char *cmd)
|
||||
void __noreturn holly_restart(char *cmd)
|
||||
{
|
||||
__be32 __iomem *ocn_bar1 = NULL;
|
||||
unsigned long bar;
|
||||
@@ -250,9 +250,7 @@ void holly_halt(void)
|
||||
*/
|
||||
static int __init holly_probe(void)
|
||||
{
|
||||
unsigned long root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "ibm,holly"))
|
||||
if (!of_machine_is_compatible("ibm,holly"))
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
@@ -100,7 +100,7 @@ static void __init linkstation_init_IRQ(void)
|
||||
extern void avr_uart_configure(void);
|
||||
extern void avr_uart_send(const char);
|
||||
|
||||
static void linkstation_restart(char *cmd)
|
||||
static void __noreturn linkstation_restart(char *cmd)
|
||||
{
|
||||
local_irq_disable();
|
||||
|
||||
@@ -113,7 +113,7 @@ static void linkstation_restart(char *cmd)
|
||||
avr_uart_send('G'); /* "kick" */
|
||||
}
|
||||
|
||||
static void linkstation_power_off(void)
|
||||
static void __noreturn linkstation_power_off(void)
|
||||
{
|
||||
local_irq_disable();
|
||||
|
||||
@@ -127,7 +127,7 @@ static void linkstation_power_off(void)
|
||||
/* NOTREACHED */
|
||||
}
|
||||
|
||||
static void linkstation_halt(void)
|
||||
static void __noreturn linkstation_halt(void)
|
||||
{
|
||||
linkstation_power_off();
|
||||
/* NOTREACHED */
|
||||
@@ -141,11 +141,7 @@ static void linkstation_show_cpuinfo(struct seq_file *m)
|
||||
|
||||
static int __init linkstation_probe(void)
|
||||
{
|
||||
unsigned long root;
|
||||
|
||||
root = of_get_flat_dt_root();
|
||||
|
||||
if (!of_flat_dt_is_compatible(root, "linkstation"))
|
||||
if (!of_machine_is_compatible("linkstation"))
|
||||
return 0;
|
||||
|
||||
pm_power_off = linkstation_power_off;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user