diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-31 00:01:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-07-31 00:01:36 -0400 |
commit | bad60e6f259a01cf9f29a1ef8d435ab6c60b2de9 (patch) | |
tree | c9aaa8166735659761239c117af2b11b022bc6cb /arch/powerpc/platforms/86xx | |
parent | dd0f0cf58af70dc9267409f113bea772d57f675c (diff) | |
parent | 719dbb2df78fc9a40e28392b07cd715bfc5a665c (diff) |
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()
...
Diffstat (limited to 'arch/powerpc/platforms/86xx')
-rw-r--r-- | arch/powerpc/platforms/86xx/Kconfig | 8 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/Makefile | 1 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_ppc9a.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc310.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/gef_sbc610.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc8610_hpcd.c | 4 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | 6 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/mvme7100.c | 121 | ||||
-rw-r--r-- | arch/powerpc/platforms/86xx/sbc8641d.c | 4 |
9 files changed, 136 insertions, 20 deletions
diff --git a/arch/powerpc/platforms/86xx/Kconfig b/arch/powerpc/platforms/86xx/Kconfig index 3988f16e46c1..ce619bd1f82d 100644 --- a/arch/powerpc/platforms/86xx/Kconfig +++ b/arch/powerpc/platforms/86xx/Kconfig | |||
@@ -60,6 +60,11 @@ config GEF_SBC610 | |||
60 | help | 60 | help |
61 | This option enables support for the GE SBC610. | 61 | This option enables support for the GE SBC610. |
62 | 62 | ||
63 | config MVME7100 | ||
64 | bool "Artesyn MVME7100" | ||
65 | help | ||
66 | This option enables support for the Emerson/Artesyn MVME7100 board. | ||
67 | |||
63 | endif | 68 | endif |
64 | 69 | ||
65 | config MPC8641 | 70 | config MPC8641 |
@@ -68,7 +73,8 @@ config MPC8641 | |||
68 | select FSL_PCI if PCI | 73 | select FSL_PCI if PCI |
69 | select PPC_UDBG_16550 | 74 | select PPC_UDBG_16550 |
70 | select MPIC | 75 | select MPIC |
71 | default y if MPC8641_HPCN || SBC8641D || GEF_SBC610 || GEF_SBC310 || GEF_PPC9A | 76 | default y if MPC8641_HPCN || SBC8641D || GEF_SBC610 || GEF_SBC310 || GEF_PPC9A \ |
77 | || MVME7100 | ||
72 | 78 | ||
73 | config MPC8610 | 79 | config MPC8610 |
74 | bool | 80 | bool |
diff --git a/arch/powerpc/platforms/86xx/Makefile b/arch/powerpc/platforms/86xx/Makefile index 2d889ad7dc89..01958fedc3f2 100644 --- a/arch/powerpc/platforms/86xx/Makefile +++ b/arch/powerpc/platforms/86xx/Makefile | |||
@@ -10,3 +10,4 @@ obj-$(CONFIG_MPC8610_HPCD) += mpc8610_hpcd.o | |||
10 | obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o | 10 | obj-$(CONFIG_GEF_SBC610) += gef_sbc610.o |
11 | obj-$(CONFIG_GEF_SBC310) += gef_sbc310.o | 11 | obj-$(CONFIG_GEF_SBC310) += gef_sbc310.o |
12 | obj-$(CONFIG_GEF_PPC9A) += gef_ppc9a.o | 12 | obj-$(CONFIG_GEF_PPC9A) += gef_ppc9a.o |
13 | obj-$(CONFIG_MVME7100) += mvme7100.o | ||
diff --git a/arch/powerpc/platforms/86xx/gef_ppc9a.c b/arch/powerpc/platforms/86xx/gef_ppc9a.c index 8e63b752712c..ef684afb63c6 100644 --- a/arch/powerpc/platforms/86xx/gef_ppc9a.c +++ b/arch/powerpc/platforms/86xx/gef_ppc9a.c | |||
@@ -189,9 +189,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
189 | */ | 189 | */ |
190 | static int __init gef_ppc9a_probe(void) | 190 | static int __init gef_ppc9a_probe(void) |
191 | { | 191 | { |
192 | unsigned long root = of_get_flat_dt_root(); | 192 | if (of_machine_is_compatible("gef,ppc9a")) |
193 | |||
194 | if (of_flat_dt_is_compatible(root, "gef,ppc9a")) | ||
195 | return 1; | 193 | return 1; |
196 | 194 | ||
197 | return 0; | 195 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc310.c b/arch/powerpc/platforms/86xx/gef_sbc310.c index 0e0be94f551f..67dd0c231646 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc310.c +++ b/arch/powerpc/platforms/86xx/gef_sbc310.c | |||
@@ -176,9 +176,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
176 | */ | 176 | */ |
177 | static int __init gef_sbc310_probe(void) | 177 | static int __init gef_sbc310_probe(void) |
178 | { | 178 | { |
179 | unsigned long root = of_get_flat_dt_root(); | 179 | if (of_machine_is_compatible("gef,sbc310")) |
180 | |||
181 | if (of_flat_dt_is_compatible(root, "gef,sbc310")) | ||
182 | return 1; | 180 | return 1; |
183 | 181 | ||
184 | return 0; | 182 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/gef_sbc610.c b/arch/powerpc/platforms/86xx/gef_sbc610.c index e8292b492d7e..805026976cac 100644 --- a/arch/powerpc/platforms/86xx/gef_sbc610.c +++ b/arch/powerpc/platforms/86xx/gef_sbc610.c | |||
@@ -166,9 +166,7 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | |||
166 | */ | 166 | */ |
167 | static int __init gef_sbc610_probe(void) | 167 | static int __init gef_sbc610_probe(void) |
168 | { | 168 | { |
169 | unsigned long root = of_get_flat_dt_root(); | 169 | if (of_machine_is_compatible("gef,sbc610")) |
170 | |||
171 | if (of_flat_dt_is_compatible(root, "gef,sbc610")) | ||
172 | return 1; | 170 | return 1; |
173 | 171 | ||
174 | return 0; | 172 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c index 957473e5c8e5..fef0582eddf1 100644 --- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c +++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c | |||
@@ -319,9 +319,7 @@ static void __init mpc86xx_hpcd_setup_arch(void) | |||
319 | */ | 319 | */ |
320 | static int __init mpc86xx_hpcd_probe(void) | 320 | static int __init mpc86xx_hpcd_probe(void) |
321 | { | 321 | { |
322 | unsigned long root = of_get_flat_dt_root(); | 322 | if (of_machine_is_compatible("fsl,MPC8610HPCD")) |
323 | |||
324 | if (of_flat_dt_is_compatible(root, "fsl,MPC8610HPCD")) | ||
325 | return 1; /* Looks good */ | 323 | return 1; /* Looks good */ |
326 | 324 | ||
327 | return 0; | 325 | return 0; |
diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c index e5084811b9c6..5ae42a037065 100644 --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c | |||
@@ -96,13 +96,11 @@ mpc86xx_hpcn_show_cpuinfo(struct seq_file *m) | |||
96 | */ | 96 | */ |
97 | static int __init mpc86xx_hpcn_probe(void) | 97 | static int __init mpc86xx_hpcn_probe(void) |
98 | { | 98 | { |
99 | unsigned long root = of_get_flat_dt_root(); | 99 | if (of_machine_is_compatible("fsl,mpc8641hpcn")) |
100 | |||
101 | if (of_flat_dt_is_compatible(root, "fsl,mpc8641hpcn")) | ||
102 | return 1; /* Looks good */ | 100 | return 1; /* Looks good */ |
103 | 101 | ||
104 | /* Be nice and don't give silent boot death. Delete this in 2.6.27 */ | 102 | /* Be nice and don't give silent boot death. Delete this in 2.6.27 */ |
105 | if (of_flat_dt_is_compatible(root, "mpc86xx")) { | 103 | if (of_machine_is_compatible("mpc86xx")) { |
106 | pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n"); | 104 | pr_warning("WARNING: your dts/dtb is old. You must update before the next kernel release\n"); |
107 | return 1; | 105 | return 1; |
108 | } | 106 | } |
diff --git a/arch/powerpc/platforms/86xx/mvme7100.c b/arch/powerpc/platforms/86xx/mvme7100.c new file mode 100644 index 000000000000..addb41e7cd14 --- /dev/null +++ b/arch/powerpc/platforms/86xx/mvme7100.c | |||
@@ -0,0 +1,121 @@ | |||
1 | /* | ||
2 | * Board setup routines for the Emerson/Artesyn MVME7100 | ||
3 | * | ||
4 | * Copyright 2016 Elettra-Sincrotrone Trieste S.C.p.A. | ||
5 | * | ||
6 | * Author: Alessio Igor Bogani <alessio.bogani@elettra.eu> | ||
7 | * | ||
8 | * Based on earlier code by: | ||
9 | * | ||
10 | * Ajit Prem <ajit.prem@emerson.com> | ||
11 | * Copyright 2008 Emerson | ||
12 | * | ||
13 | * USB host fixup is borrowed by: | ||
14 | * | ||
15 | * Martyn Welch <martyn.welch@ge.com> | ||
16 | * Copyright 2008 GE Intelligent Platforms Embedded Systems, Inc. | ||
17 | * | ||
18 | * This program is free software; you can redistribute it and/or modify it | ||
19 | * under the terms of the GNU General Public License as published by the | ||
20 | * Free Software Foundation; either version 2 of the License, or (at your | ||
21 | * option) any later version. | ||
22 | * | ||
23 | */ | ||
24 | |||
25 | #include <linux/pci.h> | ||
26 | #include <linux/of.h> | ||
27 | #include <linux/of_platform.h> | ||
28 | #include <linux/of_address.h> | ||
29 | #include <asm/udbg.h> | ||
30 | #include <asm/mpic.h> | ||
31 | #include <sysdev/fsl_soc.h> | ||
32 | #include <sysdev/fsl_pci.h> | ||
33 | |||
34 | #include "mpc86xx.h" | ||
35 | |||
36 | #define MVME7100_INTERRUPT_REG_2_OFFSET 0x05 | ||
37 | #define MVME7100_DS1375_MASK 0x40 | ||
38 | #define MVME7100_MAX6649_MASK 0x20 | ||
39 | #define MVME7100_ABORT_MASK 0x10 | ||
40 | |||
41 | /* | ||
42 | * Setup the architecture | ||
43 | */ | ||
44 | static void __init mvme7100_setup_arch(void) | ||
45 | { | ||
46 | struct device_node *bcsr_node; | ||
47 | void __iomem *mvme7100_regs = NULL; | ||
48 | u8 reg; | ||
49 | |||
50 | if (ppc_md.progress) | ||
51 | ppc_md.progress("mvme7100_setup_arch()", 0); | ||
52 | |||
53 | #ifdef CONFIG_SMP | ||
54 | mpc86xx_smp_init(); | ||
55 | #endif | ||
56 | |||
57 | fsl_pci_assign_primary(); | ||
58 | |||
59 | /* Remap BCSR registers */ | ||
60 | bcsr_node = of_find_compatible_node(NULL, NULL, | ||
61 | "artesyn,mvme7100-bcsr"); | ||
62 | if (bcsr_node) { | ||
63 | mvme7100_regs = of_iomap(bcsr_node, 0); | ||
64 | of_node_put(bcsr_node); | ||
65 | } | ||
66 | |||
67 | if (mvme7100_regs) { | ||
68 | /* Disable ds1375, max6649, and abort interrupts */ | ||
69 | reg = readb(mvme7100_regs + MVME7100_INTERRUPT_REG_2_OFFSET); | ||
70 | reg |= MVME7100_DS1375_MASK | MVME7100_MAX6649_MASK | ||
71 | | MVME7100_ABORT_MASK; | ||
72 | writeb(reg, mvme7100_regs + MVME7100_INTERRUPT_REG_2_OFFSET); | ||
73 | } else | ||
74 | pr_warn("Unable to map board registers\n"); | ||
75 | |||
76 | pr_info("MVME7100 board from Artesyn\n"); | ||
77 | } | ||
78 | |||
79 | /* | ||
80 | * Called very early, device-tree isn't unflattened | ||
81 | */ | ||
82 | static int __init mvme7100_probe(void) | ||
83 | { | ||
84 | unsigned long root = of_get_flat_dt_root(); | ||
85 | |||
86 | return of_flat_dt_is_compatible(root, "artesyn,MVME7100"); | ||
87 | } | ||
88 | |||
89 | static void mvme7100_usb_host_fixup(struct pci_dev *pdev) | ||
90 | { | ||
91 | unsigned int val; | ||
92 | |||
93 | if (!machine_is(mvme7100)) | ||
94 | return; | ||
95 | |||
96 | /* Ensure only ports 1 & 2 are enabled */ | ||
97 | pci_read_config_dword(pdev, 0xe0, &val); | ||
98 | pci_write_config_dword(pdev, 0xe0, (val & ~7) | 0x2); | ||
99 | |||
100 | /* System clock is 48-MHz Oscillator and EHCI Enabled. */ | ||
101 | pci_write_config_dword(pdev, 0xe4, 1 << 5); | ||
102 | } | ||
103 | DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_USB, | ||
104 | mvme7100_usb_host_fixup); | ||
105 | |||
106 | machine_arch_initcall(mvme7100, mpc86xx_common_publish_devices); | ||
107 | |||
108 | define_machine(mvme7100) { | ||
109 | .name = "MVME7100", | ||
110 | .probe = mvme7100_probe, | ||
111 | .setup_arch = mvme7100_setup_arch, | ||
112 | .init_IRQ = mpc86xx_init_irq, | ||
113 | .get_irq = mpic_get_irq, | ||
114 | .restart = fsl_rstcr_restart, | ||
115 | .time_init = mpc86xx_time_init, | ||
116 | .calibrate_decr = generic_calibrate_decr, | ||
117 | .progress = udbg_progress, | ||
118 | #ifdef CONFIG_PCI | ||
119 | .pcibios_fixup_bus = fsl_pcibios_fixup_bus, | ||
120 | #endif | ||
121 | }; | ||
diff --git a/arch/powerpc/platforms/86xx/sbc8641d.c b/arch/powerpc/platforms/86xx/sbc8641d.c index 2a9cf278c12a..52af5735742e 100644 --- a/arch/powerpc/platforms/86xx/sbc8641d.c +++ b/arch/powerpc/platforms/86xx/sbc8641d.c | |||
@@ -67,9 +67,7 @@ sbc8641_show_cpuinfo(struct seq_file *m) | |||
67 | */ | 67 | */ |
68 | static int __init sbc8641_probe(void) | 68 | static int __init sbc8641_probe(void) |
69 | { | 69 | { |
70 | unsigned long root = of_get_flat_dt_root(); | 70 | if (of_machine_is_compatible("wind,sbc8641")) |
71 | |||
72 | if (of_flat_dt_is_compatible(root, "wind,sbc8641")) | ||
73 | return 1; /* Looks good */ | 71 | return 1; /* Looks good */ |
74 | 72 | ||
75 | return 0; | 73 | return 0; |