aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 02:38:43 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2015-11-06 02:38:43 -0500
commit2f4bf528eca5b2d9eef12b6d323c040254f8f67c (patch)
tree3642d6c1623be0ad1cc991343eb4e0845d77de7a
parent2e3078af2c67730c479f1d183af5b367f5d95337 (diff)
parent8bdf2023e238ce2262d0cf1aca78785dc46e15db (diff)
Merge tag 'powerpc-4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux
Pull powerpc updates from Michael Ellerman: - Kconfig: remove BE-only platforms from LE kernel build from Boqun Feng - Refresh ps3_defconfig from Geoff Levand - Emit GNU & SysV hashes for the vdso from Michael Ellerman - Define an enum for the bolted SLB indexes from Anshuman Khandual - Use a local to avoid multiple calls to get_slb_shadow() from Michael Ellerman - Add gettimeofday() benchmark from Michael Neuling - Avoid link stack corruption in __get_datapage() from Michael Neuling - Add virt_to_pfn and use this instead of opencoding from Aneesh Kumar K.V - Add ppc64le_defconfig from Michael Ellerman - pseries: extract of_helpers module from Andy Shevchenko - Correct string length in pseries_of_derive_parent() from Nathan Fontenot - Free the MSI bitmap if it was slab allocated from Denis Kirjanov - Shorten irq_chip name for the SIU from Christophe Leroy - Wait 1s for secondaries to enter OPAL during kexec from Samuel Mendoza-Jonas - Fix _ALIGN_* errors due to type difference, from Aneesh Kumar K.V - powerpc/pseries/hvcserver: don't memset pi_buff if it is null from Colin Ian King - Disable hugepd for 64K page size, from Aneesh Kumar K.V - Differentiate between hugetlb and THP during page walk from Aneesh Kumar K.V - Make PCI non-optional for pseries from Michael Ellerman - Individual System V IPC system calls from Sam bobroff - Add selftest of unmuxed IPC calls from Michael Ellerman - discard .exit.data at runtime from Stephen Rothwell - Delete old orphaned PrPMC 280/2800 DTS and boot file, from Paul Gortmaker - Use of_get_next_parent to simplify code from Christophe Jaillet - Paginate some xmon output from Sam bobroff - Add some more elements to the xmon PACA dump from Michael Ellerman - Allow the tm-syscall selftest to build with old headers from Michael Ellerman - Run EBB selftests only on POWER8 from Denis Kirjanov - Drop CONFIG_TUNE_CELL in favour of CONFIG_CELL_CPU from Michael Ellerman - Avoid reference to potentially freed memory in prom.c from Christophe Jaillet - Quieten boot wrapper output with run_cmd from Geoff Levand - EEH fixes and cleanups from Gavin Shan - Fix recursive fenced PHB on Broadcom shiner adapter from Gavin Shan - Use of_get_next_parent() in of_get_ibm_chip_id() from Michael Ellerman - Fix section mismatch warning in msi_bitmap_alloc() from Denis Kirjanov - Fix ps3-lpm white space from Rudhresh Kumar J - Fix ps3-vuart null dereference from Colin King - nvram: Add missing kfree in error path from Christophe Jaillet - nvram: Fix function name in some errors messages, from Christophe Jaillet - drivers/macintosh: adb: fix misleading Kconfig help text from Aaro Koskinen - agp/uninorth: fix a memleak in create_gatt_table from Denis Kirjanov - cxl: Free virtual PHB when removing from Andrew Donnellan - scripts/kconfig/Makefile: Allow KBUILD_DEFCONFIG to be a target from Michael Ellerman - scripts/kconfig/Makefile: Fix KBUILD_DEFCONFIG check when building with O= from Michael Ellerman - Freescale updates from Scott: Highlights include 64-bit book3e kexec/kdump support, a rework of the qoriq clock driver, device tree changes including qoriq fman nodes, support for a new 85xx board, and some fixes. - MPC5xxx updates from Anatolij: Highlights include a driver for MPC512x LocalPlus Bus FIFO with its device tree binding documentation, mpc512x device tree updates and some minor fixes. * tag 'powerpc-4.4-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (106 commits) powerpc/msi: Fix section mismatch warning in msi_bitmap_alloc() powerpc/prom: Use of_get_next_parent() in of_get_ibm_chip_id() powerpc/pseries: Correct string length in pseries_of_derive_parent() powerpc/e6500: hw tablewalk: make sure we invalidate and write to the same tlb entry powerpc/mpc85xx: Add FSL QorIQ DPAA FMan support to the SoC device tree(s) powerpc/mpc85xx: Create dts components for the FSL QorIQ DPAA FMan powerpc/fsl: Add #clock-cells and clockgen label to clockgen nodes powerpc: handle error case in cpm_muram_alloc() powerpc: mpic: use IRQCHIP_SKIP_SET_WAKE instead of redundant mpic_irq_set_wake powerpc/book3e-64: Enable kexec powerpc/book3e-64/kexec: Set "r4 = 0" when entering spinloop powerpc/booke: Only use VIRT_PHYS_OFFSET on booke32 powerpc/book3e-64/kexec: Enable SMP release powerpc/book3e-64/kexec: create an identity TLB mapping powerpc/book3e-64: Don't limit paca to 256 MiB powerpc/book3e/kdump: Enable crash_kexec_wait_realmode powerpc/book3e: support CONFIG_RELOCATABLE powerpc/booke64: Fix args to copy_and_flush powerpc/book3e-64: rename interrupt_end_book3e with __end_interrupts powerpc/e6500: kexec: Handle hardware threads ...
-rw-r--r--Documentation/devicetree/bindings/chosen.txt8
-rw-r--r--Documentation/devicetree/bindings/clock/qoriq-clock.txt61
-rw-r--r--Documentation/devicetree/bindings/net/maxim,ds26522.txt13
-rw-r--r--Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt21
-rw-r--r--arch/powerpc/Kconfig2
-rw-r--r--arch/powerpc/Makefile6
-rw-r--r--arch/powerpc/boot/Makefile3
-rw-r--r--arch/powerpc/boot/dts/fsl/b4420qds.dts (renamed from arch/powerpc/boot/dts/b4420qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/b4420si-post.dtsi4
-rw-r--r--arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi13
-rw-r--r--arch/powerpc/boot/dts/fsl/b4860qds.dts (renamed from arch/powerpc/boot/dts/b4860qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/b4860si-post.dtsi26
-rw-r--r--arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi20
-rw-r--r--arch/powerpc/boot/dts/fsl/b4qds.dtsi (renamed from arch/powerpc/boot/dts/b4qds.dtsi)2
-rw-r--r--arch/powerpc/boot/dts/fsl/b4si-post.dtsi33
-rw-r--r--arch/powerpc/boot/dts/fsl/bsc9131rdb.dts (renamed from arch/powerpc/boot/dts/bsc9131rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/bsc9131rdb.dtsi (renamed from arch/powerpc/boot/dts/bsc9131rdb.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/bsc9132qds.dts (renamed from arch/powerpc/boot/dts/bsc9132qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/bsc9132qds.dtsi (renamed from arch/powerpc/boot/dts/bsc9132qds.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/c293pcie.dts (renamed from arch/powerpc/boot/dts/c293pcie.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/cyrus_p5020.dts155
-rw-r--r--arch/powerpc/boot/dts/fsl/ge_imp3a.dts (renamed from arch/powerpc/boot/dts/ge_imp3a.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/kmcoge4.dts (renamed from arch/powerpc/boot/dts/kmcoge4.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8536ds.dts (renamed from arch/powerpc/boot/dts/mpc8536ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8536ds.dtsi (renamed from arch/powerpc/boot/dts/mpc8536ds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8536ds_36b.dts (renamed from arch/powerpc/boot/dts/mpc8536ds_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi2
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8540ads.dts (renamed from arch/powerpc/boot/dts/mpc8540ads.dts)2
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8541cds.dts (renamed from arch/powerpc/boot/dts/mpc8541cds.dts)2
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8544ds.dts (renamed from arch/powerpc/boot/dts/mpc8544ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8544ds.dtsi (renamed from arch/powerpc/boot/dts/mpc8544ds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8548cds.dtsi (renamed from arch/powerpc/boot/dts/mpc8548cds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8548cds_32b.dts (renamed from arch/powerpc/boot/dts/mpc8548cds_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8548cds_36b.dts (renamed from arch/powerpc/boot/dts/mpc8548cds_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8555cds.dts (renamed from arch/powerpc/boot/dts/mpc8555cds.dts)2
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8560ads.dts (renamed from arch/powerpc/boot/dts/mpc8560ads.dts)2
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8568mds.dts (renamed from arch/powerpc/boot/dts/mpc8568mds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8569mds.dts (renamed from arch/powerpc/boot/dts/mpc8569mds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8572ds.dts (renamed from arch/powerpc/boot/dts/mpc8572ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8572ds.dtsi (renamed from arch/powerpc/boot/dts/mpc8572ds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8572ds_36b.dts (renamed from arch/powerpc/boot/dts/mpc8572ds_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8572ds_camp_core0.dts (renamed from arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts)0
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8572ds_camp_core1.dts (renamed from arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts)0
-rw-r--r--arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi2
-rw-r--r--arch/powerpc/boot/dts/fsl/mvme2500.dts (renamed from arch/powerpc/boot/dts/mvme2500.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/oca4080.dts (renamed from arch/powerpc/boot/dts/oca4080.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb-pa.dts (renamed from arch/powerpc/boot/dts/p1010rdb-pa.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb-pa.dtsi (renamed from arch/powerpc/boot/dts/p1010rdb-pa.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb-pa_36b.dts (renamed from arch/powerpc/boot/dts/p1010rdb-pa_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb-pb.dts (renamed from arch/powerpc/boot/dts/p1010rdb-pb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb-pb_36b.dts (renamed from arch/powerpc/boot/dts/p1010rdb-pb_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb.dtsi (renamed from arch/powerpc/boot/dts/p1010rdb.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb_32b.dtsi (renamed from arch/powerpc/boot/dts/p1010rdb_32b.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1010rdb_36b.dtsi (renamed from arch/powerpc/boot/dts/p1010rdb_36b.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi (renamed from arch/powerpc/boot/dts/p1020mbg-pc.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020mbg-pc_32b.dts (renamed from arch/powerpc/boot/dts/p1020mbg-pc_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020mbg-pc_36b.dts (renamed from arch/powerpc/boot/dts/p1020mbg-pc_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb-pc.dtsi (renamed from arch/powerpc/boot/dts/p1020rdb-pc.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb-pc_32b.dts (renamed from arch/powerpc/boot/dts/p1020rdb-pc_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb-pc_36b.dts (renamed from arch/powerpc/boot/dts/p1020rdb-pc_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb-pc_camp_core0.dts (renamed from arch/powerpc/boot/dts/p1020rdb-pc_camp_core0.dts)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb-pc_camp_core1.dts (renamed from arch/powerpc/boot/dts/p1020rdb-pc_camp_core1.dts)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb-pd.dts (renamed from arch/powerpc/boot/dts/p1020rdb-pd.dts)16
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb.dts (renamed from arch/powerpc/boot/dts/p1020rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb.dtsi (renamed from arch/powerpc/boot/dts/p1020rdb.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020rdb_36b.dts (renamed from arch/powerpc/boot/dts/p1020rdb_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020utm-pc.dtsi (renamed from arch/powerpc/boot/dts/p1020utm-pc.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020utm-pc_32b.dts (renamed from arch/powerpc/boot/dts/p1020utm-pc_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1020utm-pc_36b.dts (renamed from arch/powerpc/boot/dts/p1020utm-pc_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1021mds.dts (renamed from arch/powerpc/boot/dts/p1021mds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1021rdb-pc.dtsi (renamed from arch/powerpc/boot/dts/p1021rdb-pc.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/p1021rdb-pc_32b.dts (renamed from arch/powerpc/boot/dts/p1021rdb-pc_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1021rdb-pc_36b.dts (renamed from arch/powerpc/boot/dts/p1021rdb-pc_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1022ds.dtsi (renamed from arch/powerpc/boot/dts/p1022ds.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/p1022ds_32b.dts (renamed from arch/powerpc/boot/dts/p1022ds_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1022ds_36b.dts (renamed from arch/powerpc/boot/dts/p1022ds_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1022rdk.dts (renamed from arch/powerpc/boot/dts/p1022rdk.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1023rdb.dts (renamed from arch/powerpc/boot/dts/p1023rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1024rdb.dtsi (renamed from arch/powerpc/boot/dts/p1024rdb.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1024rdb_32b.dts (renamed from arch/powerpc/boot/dts/p1024rdb_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1024rdb_36b.dts (renamed from arch/powerpc/boot/dts/p1024rdb_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1025rdb.dtsi (renamed from arch/powerpc/boot/dts/p1025rdb.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p1025rdb_32b.dts (renamed from arch/powerpc/boot/dts/p1025rdb_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1025rdb_36b.dts (renamed from arch/powerpc/boot/dts/p1025rdb_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1025twr.dts (renamed from arch/powerpc/boot/dts/p1025twr.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p1025twr.dtsi (renamed from arch/powerpc/boot/dts/p1025twr.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/p2020ds.dts (renamed from arch/powerpc/boot/dts/p2020ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p2020ds.dtsi (renamed from arch/powerpc/boot/dts/p2020ds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/p2020rdb-pc.dtsi (renamed from arch/powerpc/boot/dts/p2020rdb-pc.dtsi)12
-rw-r--r--arch/powerpc/boot/dts/fsl/p2020rdb-pc_32b.dts (renamed from arch/powerpc/boot/dts/p2020rdb-pc_32b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p2020rdb-pc_36b.dts (renamed from arch/powerpc/boot/dts/p2020rdb-pc_36b.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p2020rdb.dts (renamed from arch/powerpc/boot/dts/p2020rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p2041rdb.dts (renamed from arch/powerpc/boot/dts/p2041rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p2041si-post.dtsi29
-rw-r--r--arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi10
-rw-r--r--arch/powerpc/boot/dts/fsl/p3041ds.dts (renamed from arch/powerpc/boot/dts/p3041ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p3041si-post.dtsi29
-rw-r--r--arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi10
-rw-r--r--arch/powerpc/boot/dts/fsl/p4080ds.dts (renamed from arch/powerpc/boot/dts/p4080ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p4080si-post.dtsi48
-rw-r--r--arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi15
-rw-r--r--arch/powerpc/boot/dts/fsl/p5020ds.dts (renamed from arch/powerpc/boot/dts/p5020ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p5020si-post.dtsi29
-rw-r--r--arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi10
-rw-r--r--arch/powerpc/boot/dts/fsl/p5040ds.dts (renamed from arch/powerpc/boot/dts/p5040ds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/p5040si-post.dtsi56
-rw-r--r--arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi17
-rw-r--r--arch/powerpc/boot/dts/fsl/ppa8548.dts (renamed from arch/powerpc/boot/dts/ppa8548.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi3
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi3
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi69
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi101
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi61
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi68
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi101
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi66
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi63
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi66
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi63
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi106
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi63
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi63
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi62
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi106
-rw-r--r--arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi94
-rw-r--r--arch/powerpc/boot/dts/fsl/t1023rdb.dts (renamed from arch/powerpc/boot/dts/t1023rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1023si-post.dtsi19
-rw-r--r--arch/powerpc/boot/dts/fsl/t1024qds.dts (renamed from arch/powerpc/boot/dts/t1024qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1024rdb.dts (renamed from arch/powerpc/boot/dts/t1024rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi6
-rw-r--r--arch/powerpc/boot/dts/fsl/t1040d4rdb.dts (renamed from arch/powerpc/boot/dts/t1040d4rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1040qds.dts (renamed from arch/powerpc/boot/dts/t1040qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1040rdb.dts (renamed from arch/powerpc/boot/dts/t1040rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1040si-post.dtsi31
-rw-r--r--arch/powerpc/boot/dts/fsl/t1042d4rdb.dts (renamed from arch/powerpc/boot/dts/t1042d4rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1042qds.dts (renamed from arch/powerpc/boot/dts/t1042qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1042rdb.dts (renamed from arch/powerpc/boot/dts/t1042rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t1042rdb_pi.dts (renamed from arch/powerpc/boot/dts/t1042rdb_pi.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t104xd4rdb.dtsi (renamed from arch/powerpc/boot/dts/t104xd4rdb.dtsi)10
-rw-r--r--arch/powerpc/boot/dts/fsl/t104xqds.dtsi (renamed from arch/powerpc/boot/dts/t104xqds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/t104xrdb.dtsi (renamed from arch/powerpc/boot/dts/t104xrdb.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi9
-rw-r--r--arch/powerpc/boot/dts/fsl/t2080qds.dts (renamed from arch/powerpc/boot/dts/t2080qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t2080rdb.dts (renamed from arch/powerpc/boot/dts/t2080rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t2081qds.dts (renamed from arch/powerpc/boot/dts/t2081qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t2081si-post.dtsi43
-rw-r--r--arch/powerpc/boot/dts/fsl/t208xqds.dtsi (renamed from arch/powerpc/boot/dts/t208xqds.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/t208xrdb.dtsi (renamed from arch/powerpc/boot/dts/t208xrdb.dtsi)0
-rw-r--r--arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi11
-rw-r--r--arch/powerpc/boot/dts/fsl/t4240qds.dts (renamed from arch/powerpc/boot/dts/t4240qds.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t4240rdb.dts (renamed from arch/powerpc/boot/dts/t4240rdb.dts)4
-rw-r--r--arch/powerpc/boot/dts/fsl/t4240si-post.dtsi88
-rw-r--r--arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi22
-rw-r--r--arch/powerpc/boot/dts/mpc5121.dtsi11
-rw-r--r--arch/powerpc/boot/dts/mpc5125twr.dts11
-rw-r--r--arch/powerpc/boot/dts/prpmc2800.dts297
-rw-r--r--arch/powerpc/boot/page.h4
-rw-r--r--arch/powerpc/boot/prpmc2800.c571
-rwxr-xr-xarch/powerpc/boot/wrapper25
-rw-r--r--arch/powerpc/configs/cell_defconfig2
-rw-r--r--arch/powerpc/configs/mpc512x_defconfig1
-rw-r--r--arch/powerpc/configs/ps3_defconfig7
-rw-r--r--arch/powerpc/include/asm/exception-64e.h15
-rw-r--r--arch/powerpc/include/asm/mmu-hash64.h1
-rw-r--r--arch/powerpc/include/asm/mpc5121.h59
-rw-r--r--arch/powerpc/include/asm/mpc52xx_psc.h2
-rw-r--r--arch/powerpc/include/asm/msi_bitmap.h1
-rw-r--r--arch/powerpc/include/asm/page.h32
-rw-r--r--arch/powerpc/include/asm/pgtable-ppc64.h10
-rw-r--r--arch/powerpc/include/asm/pgtable.h6
-rw-r--r--arch/powerpc/include/asm/systbl.h12
-rw-r--r--arch/powerpc/include/asm/unistd.h2
-rw-r--r--arch/powerpc/include/uapi/asm/unistd.h12
-rw-r--r--arch/powerpc/kernel/crash.c6
-rw-r--r--arch/powerpc/kernel/eeh.c8
-rw-r--r--arch/powerpc/kernel/eeh_driver.c27
-rw-r--r--arch/powerpc/kernel/exceptions-64e.S17
-rw-r--r--arch/powerpc/kernel/head_64.S43
-rw-r--r--arch/powerpc/kernel/io-workarounds.c2
-rw-r--r--arch/powerpc/kernel/machine_kexec_64.c18
-rw-r--r--arch/powerpc/kernel/misc_64.S60
-rw-r--r--arch/powerpc/kernel/nvram_64.c15
-rw-r--r--arch/powerpc/kernel/paca.c9
-rw-r--r--arch/powerpc/kernel/pci-common.c1
-rw-r--r--arch/powerpc/kernel/prom.c18
-rw-r--r--arch/powerpc/kernel/setup_64.c25
-rw-r--r--arch/powerpc/kernel/vdso32/Makefile2
-rw-r--r--arch/powerpc/kernel/vdso32/datapage.S12
-rw-r--r--arch/powerpc/kernel/vdso64/Makefile2
-rw-r--r--arch/powerpc/kernel/vdso64/datapage.S12
-rw-r--r--arch/powerpc/kernel/vmlinux.lds.S6
-rw-r--r--arch/powerpc/kvm/book3s_64_mmu_hv.c2
-rw-r--r--arch/powerpc/kvm/book3s_hv_rm_mmu.c8
-rw-r--r--arch/powerpc/kvm/e500_mmu_host.c2
-rw-r--r--arch/powerpc/mm/fsl_booke_mmu.c26
-rw-r--r--arch/powerpc/mm/hash_utils_64.c7
-rw-r--r--arch/powerpc/mm/hugetlbpage.c40
-rw-r--r--arch/powerpc/mm/mmu_decl.h4
-rw-r--r--arch/powerpc/mm/numa.c5
-rw-r--r--arch/powerpc/mm/slb.c49
-rw-r--r--arch/powerpc/mm/tlb_hash64.c9
-rw-r--r--arch/powerpc/mm/tlb_low_64e.S25
-rw-r--r--arch/powerpc/mm/tlb_nohash.c41
-rw-r--r--arch/powerpc/mm/tlb_nohash_low.S63
-rw-r--r--arch/powerpc/perf/callchain.c2
-rw-r--r--arch/powerpc/platforms/512x/Kconfig6
-rw-r--r--arch/powerpc/platforms/512x/Makefile1
-rw-r--r--arch/powerpc/platforms/512x/mpc512x_lpbfifo.c540
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_gpt.c6
-rw-r--r--arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c1
-rw-r--r--arch/powerpc/platforms/85xx/corenet_generic.c11
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_mds.c2
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_rdb.c2
-rw-r--r--arch/powerpc/platforms/85xx/p1022_ds.c2
-rw-r--r--arch/powerpc/platforms/85xx/p1022_rdk.c2
-rw-r--r--arch/powerpc/platforms/85xx/smp.c88
-rw-r--r--arch/powerpc/platforms/85xx/twr_p102x.c2
-rw-r--r--arch/powerpc/platforms/86xx/mpc8610_hpcd.c2
-rw-r--r--arch/powerpc/platforms/Kconfig.cputype11
-rw-r--r--arch/powerpc/platforms/cell/Kconfig4
-rw-r--r--arch/powerpc/platforms/maple/Kconfig2
-rw-r--r--arch/powerpc/platforms/pasemi/Kconfig2
-rw-r--r--arch/powerpc/platforms/powermac/Kconfig2
-rw-r--r--arch/powerpc/platforms/powernv/eeh-powernv.c86
-rw-r--r--arch/powerpc/platforms/powernv/setup.c21
-rw-r--r--arch/powerpc/platforms/ps3/Kconfig2
-rw-r--r--arch/powerpc/platforms/pseries/Kconfig7
-rw-r--r--arch/powerpc/platforms/pseries/Makefile7
-rw-r--r--arch/powerpc/platforms/pseries/dlpar.c31
-rw-r--r--arch/powerpc/platforms/pseries/eeh_pseries.c60
-rw-r--r--arch/powerpc/platforms/pseries/hvcserver.c2
-rw-r--r--arch/powerpc/platforms/pseries/iommu.c10
-rw-r--r--arch/powerpc/platforms/pseries/of_helpers.c38
-rw-r--r--arch/powerpc/platforms/pseries/of_helpers.h8
-rw-r--r--arch/powerpc/platforms/pseries/reconfig.c34
-rw-r--r--arch/powerpc/platforms/pseries/setup.c4
-rw-r--r--arch/powerpc/sysdev/cpm_common.c3
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c86
-rw-r--r--arch/powerpc/sysdev/mpc5xxx_clocks.c5
-rw-r--r--arch/powerpc/sysdev/mpc8xx_pic.c2
-rw-r--r--arch/powerpc/sysdev/mpic.c23
-rw-r--r--arch/powerpc/sysdev/msi_bitmap.c18
-rw-r--r--arch/powerpc/xmon/nonstdio.c64
-rw-r--r--arch/powerpc/xmon/nonstdio.h3
-rw-r--r--arch/powerpc/xmon/xmon.c79
-rw-r--r--drivers/char/agp/uninorth-agp.c16
-rw-r--r--drivers/clk/Kconfig2
-rw-r--r--drivers/clk/clk-qoriq.c1354
-rw-r--r--drivers/iommu/fsl_pamu.c2
-rw-r--r--drivers/macintosh/Kconfig5
-rw-r--r--drivers/misc/cxl/vphb.c2
-rw-r--r--drivers/ps3/ps3-lpm.c2
-rw-r--r--drivers/ps3/ps3-vuart.c3
-rw-r--r--include/linux/fsl/guts.h (renamed from arch/powerpc/include/asm/fsl_guts.h)8
-rw-r--r--scripts/kconfig/Makefile5
-rw-r--r--sound/soc/fsl/mpc8610_hpcd.c2
-rw-r--r--sound/soc/fsl/p1022_ds.c2
-rw-r--r--sound/soc/fsl/p1022_rdk.c2
-rw-r--r--tools/testing/selftests/powerpc/Makefile12
-rw-r--r--tools/testing/selftests/powerpc/benchmarks/.gitignore1
-rw-r--r--tools/testing/selftests/powerpc/benchmarks/Makefile12
-rw-r--r--tools/testing/selftests/powerpc/benchmarks/gettimeofday.c31
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/back_to_back_ebbs_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/close_clears_pmcc_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/cycles_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/ebb.c11
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/ebb.h1
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/event_attributes_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/fork_cleanup_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/multi_counter_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/pmae_handling_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c2
-rw-r--r--tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c2
-rw-r--r--tools/testing/selftests/powerpc/syscalls/.gitignore1
-rw-r--r--tools/testing/selftests/powerpc/syscalls/Makefile12
-rw-r--r--tools/testing/selftests/powerpc/syscalls/ipc.h47
-rw-r--r--tools/testing/selftests/powerpc/syscalls/ipc_unmuxed.c61
-rw-r--r--tools/testing/selftests/powerpc/tm/tm-syscall.c14
311 files changed, 6522 insertions, 1741 deletions
diff --git a/Documentation/devicetree/bindings/chosen.txt b/Documentation/devicetree/bindings/chosen.txt
index ed838f453f7a..6ae9d82d4c37 100644
--- a/Documentation/devicetree/bindings/chosen.txt
+++ b/Documentation/devicetree/bindings/chosen.txt
@@ -44,3 +44,11 @@ Implementation note: Linux will look for the property "linux,stdout-path" or
44on PowerPC "stdout" if "stdout-path" is not found. However, the 44on PowerPC "stdout" if "stdout-path" is not found. However, the
45"linux,stdout-path" and "stdout" properties are deprecated. New platforms 45"linux,stdout-path" and "stdout" properties are deprecated. New platforms
46should only use the "stdout-path" property. 46should only use the "stdout-path" property.
47
48linux,booted-from-kexec
49-----------------------
50
51This property is set (currently only on PowerPC, and only needed on
52book3e) by some versions of kexec-tools to tell the new kernel that it
53is being booted by kexec, as the booting environment may differ (e.g.
54a different secondary CPU release mechanism)
diff --git a/Documentation/devicetree/bindings/clock/qoriq-clock.txt b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
index df4a259a6898..16a3ec433119 100644
--- a/Documentation/devicetree/bindings/clock/qoriq-clock.txt
+++ b/Documentation/devicetree/bindings/clock/qoriq-clock.txt
@@ -1,6 +1,6 @@
1* Clock Block on Freescale QorIQ Platforms 1* Clock Block on Freescale QorIQ Platforms
2 2
3Freescale qoriq chips take primary clocking input from the external 3Freescale QorIQ chips take primary clocking input from the external
4SYSCLK signal. The SYSCLK input (frequency) is multiplied using 4SYSCLK signal. The SYSCLK input (frequency) is multiplied using
5multiple phase locked loops (PLL) to create a variety of frequencies 5multiple phase locked loops (PLL) to create a variety of frequencies
6which can then be passed to a variety of internal logic, including 6which can then be passed to a variety of internal logic, including
@@ -13,14 +13,16 @@ which the chip complies.
13Chassis Version Example Chips 13Chassis Version Example Chips
14--------------- ------------- 14--------------- -------------
151.0 p4080, p5020, p5040 151.0 p4080, p5020, p5040
162.0 t4240, b4860, t1040 162.0 t4240, b4860
17 17
181. Clock Block Binding 181. Clock Block Binding
19 19
20Required properties: 20Required properties:
21- compatible: Should contain a specific clock block compatible string 21- compatible: Should contain a chip-specific clock block compatible
22 and a single chassis clock compatible string. 22 string and (if applicable) may contain a chassis-version clock
23 Clock block strings include, but not limited to, one of the: 23 compatible string.
24
25 Chip-specific strings are of the form "fsl,<chip>-clockgen", such as:
24 * "fsl,p2041-clockgen" 26 * "fsl,p2041-clockgen"
25 * "fsl,p3041-clockgen" 27 * "fsl,p3041-clockgen"
26 * "fsl,p4080-clockgen" 28 * "fsl,p4080-clockgen"
@@ -30,15 +32,14 @@ Required properties:
30 * "fsl,b4420-clockgen" 32 * "fsl,b4420-clockgen"
31 * "fsl,b4860-clockgen" 33 * "fsl,b4860-clockgen"
32 * "fsl,ls1021a-clockgen" 34 * "fsl,ls1021a-clockgen"
33 Chassis clock strings include: 35 Chassis-version clock strings include:
34 * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks 36 * "fsl,qoriq-clockgen-1.0": for chassis 1.0 clocks
35 * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks 37 * "fsl,qoriq-clockgen-2.0": for chassis 2.0 clocks
36- reg: Describes the address of the device's resources within the 38- reg: Describes the address of the device's resources within the
37 address space defined by its parent bus, and resource zero 39 address space defined by its parent bus, and resource zero
38 represents the clock register set 40 represents the clock register set
39- clock-frequency: Input system clock frequency
40 41
41Recommended properties: 42Optional properties:
42- ranges: Allows valid translation between child's address space and 43- ranges: Allows valid translation between child's address space and
43 parent's. Must be present if the device has sub-nodes. 44 parent's. Must be present if the device has sub-nodes.
44- #address-cells: Specifies the number of cells used to represent 45- #address-cells: Specifies the number of cells used to represent
@@ -47,8 +48,46 @@ Recommended properties:
47- #size-cells: Specifies the number of cells used to represent 48- #size-cells: Specifies the number of cells used to represent
48 the size of an address. Must be present if the device has 49 the size of an address. Must be present if the device has
49 sub-nodes and set to 1 if present 50 sub-nodes and set to 1 if present
51- clock-frequency: Input system clock frequency (SYSCLK)
52- clocks: If clock-frequency is not specified, sysclk may be provided
53 as an input clock. Either clock-frequency or clocks must be
54 provided.
55
562. Clock Provider
57
58The clockgen node should act as a clock provider, though in older device
59trees the children of the clockgen node are the clock providers.
60
61When the clockgen node is a clock provider, #clock-cells = <2>.
62The first cell of the clock specifier is the clock type, and the
63second cell is the clock index for the specified type.
64
65 Type# Name Index Cell
66 0 sysclk must be 0
67 1 cmux index (n in CLKCnCSR)
68 2 hwaccel index (n in CLKCGnHWACSR)
69 3 fman 0 for fm1, 1 for fm2
70 4 platform pll 0=pll, 1=pll/2, 2=pll/3, 3=pll/4
71
723. Example
73
74 clockgen: global-utilities@e1000 {
75 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
76 clock-frequency = <133333333>;
77 reg = <0xe1000 0x1000>;
78 #clock-cells = <2>;
79 };
80
81 fman@400000 {
82 ...
83 clocks = <&clockgen 3 0>;
84 ...
85 };
86}
874. Legacy Child Nodes
50 88
512. Clock Provider/Consumer Binding 89NOTE: These nodes are deprecated. Kernels should continue to support
90device trees with these nodes, but new device trees should not use them.
52 91
53Most of the bindings are from the common clock binding[1]. 92Most of the bindings are from the common clock binding[1].
54 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt 93 [1] Documentation/devicetree/bindings/clock/clock-bindings.txt
@@ -82,7 +121,7 @@ Recommended properties:
82- reg: Should be the offset and length of clock block base address. 121- reg: Should be the offset and length of clock block base address.
83 The length should be 4. 122 The length should be 4.
84 123
85Example for clock block and clock provider: 124Legacy Example:
86/ { 125/ {
87 clockgen: global-utilities@e1000 { 126 clockgen: global-utilities@e1000 {
88 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0"; 127 compatible = "fsl,p5020-clockgen", "fsl,qoriq-clockgen-1.0";
@@ -142,7 +181,7 @@ Example for clock block and clock provider:
142 }; 181 };
143}; 182};
144 183
145Example for clock consumer: 184Example for legacy clock consumer:
146 185
147/ { 186/ {
148 cpu0: PowerPC,e5500@0 { 187 cpu0: PowerPC,e5500@0 {
diff --git a/Documentation/devicetree/bindings/net/maxim,ds26522.txt b/Documentation/devicetree/bindings/net/maxim,ds26522.txt
new file mode 100644
index 000000000000..ee8bb725f245
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/maxim,ds26522.txt
@@ -0,0 +1,13 @@
1* Maxim (Dallas) DS26522 Dual T1/E1/J1 Transceiver
2
3Required properties:
4- compatible: Should contain "maxim,ds26522".
5- reg: SPI CS.
6- spi-max-frequency: SPI clock.
7
8Example:
9 slic@1 {
10 compatible = "maxim,ds26522";
11 reg = <1>;
12 spi-max-frequency = <2000000>; /* input clock */
13 };
diff --git a/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt b/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt
new file mode 100644
index 000000000000..b3b392fe1f61
--- /dev/null
+++ b/Documentation/devicetree/bindings/powerpc/fsl/mpc512x_lpbfifo.txt
@@ -0,0 +1,21 @@
1Freescale MPC512x LocalPlus Bus FIFO (called SCLPC in the Reference Manual)
2
3Required properties:
4- compatible: should be "fsl,mpc512x-lpbfifo";
5- reg: should contain the offset and length of SCLPC register set;
6- interrupts: should contain the interrupt specifier for SCLPC; syntax of an
7 interrupt client node is described in interrupt-controller/interrupts.txt;
8- dmas: should contain the DMA specifier for SCLPC as described at
9 dma/dma.txt and dma/mpc512x-dma.txt;
10- dma-names: should be "rx-tx";
11
12Example:
13
14 sclpc@10100 {
15 compatible = "fsl,mpc512x-lpbfifo";
16 reg = <0x10100 0x50>;
17 interrupts = <7 0x8>;
18 dmas = <&dma0 26>;
19 dma-names = "rx-tx";
20 };
21
diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
index 9a7057ec2154..db49e0d796b1 100644
--- a/arch/powerpc/Kconfig
+++ b/arch/powerpc/Kconfig
@@ -419,7 +419,7 @@ config PPC64_SUPPORTS_MEMORY_FAILURE
419 419
420config KEXEC 420config KEXEC
421 bool "kexec system call" 421 bool "kexec system call"
422 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) 422 depends on (PPC_BOOK3S || FSL_BOOKE || (44x && !SMP)) || PPC_BOOK3E
423 select KEXEC_CORE 423 select KEXEC_CORE
424 help 424 help
425 kexec is a system call that implements the ability to shutdown your 425 kexec is a system call that implements the ability to shutdown your
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index b9b4af2af9a5..96efd8213c1c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -157,8 +157,6 @@ CFLAGS-$(CONFIG_E500) += $(call cc-option,-mcpu=8540 -msoft-float,-mcpu=powerpc)
157endif 157endif
158endif 158endif
159 159
160CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
161
162asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) 160asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
163 161
164KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) 162KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr)
@@ -288,6 +286,10 @@ PHONY += pseries_le_defconfig
288pseries_le_defconfig: 286pseries_le_defconfig:
289 $(call merge_into_defconfig,pseries_defconfig,le) 287 $(call merge_into_defconfig,pseries_defconfig,le)
290 288
289PHONY += ppc64le_defconfig
290ppc64le_defconfig:
291 $(call merge_into_defconfig,ppc64_defconfig,le)
292
291PHONY += mpc85xx_defconfig 293PHONY += mpc85xx_defconfig
292mpc85xx_defconfig: 294mpc85xx_defconfig:
293 $(call merge_into_defconfig,mpc85xx_basic_defconfig,\ 295 $(call merge_into_defconfig,mpc85xx_basic_defconfig,\
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 4eec430d8fa8..99e4487248ff 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -364,6 +364,9 @@ $(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
364$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) 364$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits)
365 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb) 365 $(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb)
366 366
367$(obj)/cuImage.%: vmlinux $(obj)/fsl/%.dtb $(wrapperbits)
368 $(call if_changed,wrap,cuboot-$*,,$(obj)/fsl/$*.dtb)
369
367$(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) 370$(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits)
368 $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz) 371 $(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
369 372
diff --git a/arch/powerpc/boot/dts/b4420qds.dts b/arch/powerpc/boot/dts/fsl/b4420qds.dts
index 508dbdf33c81..cd9203ceedc0 100644
--- a/arch/powerpc/boot/dts/b4420qds.dts
+++ b/arch/powerpc/boot/dts/fsl/b4420qds.dts
@@ -32,7 +32,7 @@
32 * this software, even if advised of the possibility of such damage. 32 * this software, even if advised of the possibility of such damage.
33 */ 33 */
34 34
35/include/ "fsl/b4420si-pre.dtsi" 35/include/ "b4420si-pre.dtsi"
36/include/ "b4qds.dtsi" 36/include/ "b4qds.dtsi"
37 37
38/ { 38/ {
@@ -47,4 +47,4 @@
47 47
48}; 48};
49 49
50/include/ "fsl/b4420si-post.dtsi" 50/include/ "b4420si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi
index 1ea8602e4345..f996cced45e0 100644
--- a/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4420si-post.dtsi
@@ -89,7 +89,9 @@
89 compatible = "fsl,b4420-rcpm", "fsl,qoriq-rcpm-2.0"; 89 compatible = "fsl,b4420-rcpm", "fsl,qoriq-rcpm-2.0";
90 }; 90 };
91 91
92 L2: l2-cache-controller@c20000 { 92 L2_1: l2-cache-controller@c20000 {
93 compatible = "fsl,b4420-l2-cache-controller"; 93 compatible = "fsl,b4420-l2-cache-controller";
94 reg = <0xc20000 0x40000>;
95 next-level-cache = <&cpc>;
94 }; 96 };
95}; 97};
diff --git a/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi b/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi
index 338af7e39dd9..bc3bf9333dde 100644
--- a/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4420si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * B4420 Silicon/SoC Device Tree Source (pre include) 2 * B4420 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2012 Freescale Semiconductor, Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor, Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -54,8 +54,13 @@
54 dma0 = &dma0; 54 dma0 = &dma0;
55 dma1 = &dma1; 55 dma1 = &dma1;
56 sdhc = &sdhc; 56 sdhc = &sdhc;
57 };
58 57
58 fman0 = &fman0;
59 ethernet0 = &enet0;
60 ethernet1 = &enet1;
61 ethernet2 = &enet2;
62 ethernet3 = &enet3;
63 };
59 64
60 cpus { 65 cpus {
61 #address-cells = <1>; 66 #address-cells = <1>;
@@ -65,14 +70,14 @@
65 device_type = "cpu"; 70 device_type = "cpu";
66 reg = <0 1>; 71 reg = <0 1>;
67 clocks = <&mux0>; 72 clocks = <&mux0>;
68 next-level-cache = <&L2>; 73 next-level-cache = <&L2_1>;
69 fsl,portid-mapping = <0x80000000>; 74 fsl,portid-mapping = <0x80000000>;
70 }; 75 };
71 cpu1: PowerPC,e6500@2 { 76 cpu1: PowerPC,e6500@2 {
72 device_type = "cpu"; 77 device_type = "cpu";
73 reg = <2 3>; 78 reg = <2 3>;
74 clocks = <&mux0>; 79 clocks = <&mux0>;
75 next-level-cache = <&L2>; 80 next-level-cache = <&L2_1>;
76 fsl,portid-mapping = <0x80000000>; 81 fsl,portid-mapping = <0x80000000>;
77 }; 82 };
78 }; 83 };
diff --git a/arch/powerpc/boot/dts/b4860qds.dts b/arch/powerpc/boot/dts/fsl/b4860qds.dts
index 6bb3707ffe3d..ba8c9bea33ac 100644
--- a/arch/powerpc/boot/dts/b4860qds.dts
+++ b/arch/powerpc/boot/dts/fsl/b4860qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/b4860si-pre.dtsi" 35/include/ "b4860si-pre.dtsi"
36/include/ "b4qds.dtsi" 36/include/ "b4qds.dtsi"
37 37
38/ { 38/ {
@@ -58,4 +58,4 @@
58 58
59}; 59};
60 60
61/include/ "fsl/b4860si-post.dtsi" 61/include/ "b4860si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
index 9ba904be39ee..868719821106 100644
--- a/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4860si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * B4860 Silicon/SoC Device Tree Source (post include) 2 * B4860 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2012 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -51,14 +51,12 @@
51 #address-cells = <2>; 51 #address-cells = <2>;
52 #size-cells = <2>; 52 #size-cells = <2>;
53 cell-index = <1>; 53 cell-index = <1>;
54 fsl,liodn-reg = <&guts 0x510>; /* RIO1LIODNR */
55 }; 54 };
56 55
57 port2 { 56 port2 {
58 #address-cells = <2>; 57 #address-cells = <2>;
59 #size-cells = <2>; 58 #size-cells = <2>;
60 cell-index = <2>; 59 cell-index = <2>;
61 fsl,liodn-reg = <&guts 0x514>; /* RIO2LIODNR */
62 }; 60 };
63}; 61};
64 62
@@ -260,7 +258,27 @@
260 compatible = "fsl,b4860-rcpm", "fsl,qoriq-rcpm-2.0"; 258 compatible = "fsl,b4860-rcpm", "fsl,qoriq-rcpm-2.0";
261 }; 259 };
262 260
263 L2: l2-cache-controller@c20000 { 261/include/ "qoriq-fman3-0-1g-4.dtsi"
262/include/ "qoriq-fman3-0-1g-5.dtsi"
263/include/ "qoriq-fman3-0-10g-0.dtsi"
264/include/ "qoriq-fman3-0-10g-1.dtsi"
265 fman@400000 {
266 enet4: ethernet@e8000 {
267 };
268
269 enet5: ethernet@ea000 {
270 };
271
272 enet6: ethernet@f0000 {
273 };
274
275 enet7: ethernet@f2000 {
276 };
277 };
278
279 L2_1: l2-cache-controller@c20000 {
264 compatible = "fsl,b4860-l2-cache-controller"; 280 compatible = "fsl,b4860-l2-cache-controller";
281 reg = <0xc20000 0x40000>;
282 next-level-cache = <&cpc>;
265 }; 283 };
266}; 284};
diff --git a/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi b/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi
index 1948f73fd26b..8797ce146512 100644
--- a/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4860si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * B4860 Silicon/SoC Device Tree Source (pre include) 2 * B4860 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2012 Freescale Semiconductor Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -54,6 +54,16 @@
54 dma0 = &dma0; 54 dma0 = &dma0;
55 dma1 = &dma1; 55 dma1 = &dma1;
56 sdhc = &sdhc; 56 sdhc = &sdhc;
57
58 fman0 = &fman0;
59 ethernet0 = &enet0;
60 ethernet1 = &enet1;
61 ethernet2 = &enet2;
62 ethernet3 = &enet3;
63 ethernet4 = &enet4;
64 ethernet5 = &enet5;
65 ethernet6 = &enet6;
66 ethernet7 = &enet7;
57 }; 67 };
58 68
59 69
@@ -65,28 +75,28 @@
65 device_type = "cpu"; 75 device_type = "cpu";
66 reg = <0 1>; 76 reg = <0 1>;
67 clocks = <&mux0>; 77 clocks = <&mux0>;
68 next-level-cache = <&L2>; 78 next-level-cache = <&L2_1>;
69 fsl,portid-mapping = <0x80000000>; 79 fsl,portid-mapping = <0x80000000>;
70 }; 80 };
71 cpu1: PowerPC,e6500@2 { 81 cpu1: PowerPC,e6500@2 {
72 device_type = "cpu"; 82 device_type = "cpu";
73 reg = <2 3>; 83 reg = <2 3>;
74 clocks = <&mux0>; 84 clocks = <&mux0>;
75 next-level-cache = <&L2>; 85 next-level-cache = <&L2_1>;
76 fsl,portid-mapping = <0x80000000>; 86 fsl,portid-mapping = <0x80000000>;
77 }; 87 };
78 cpu2: PowerPC,e6500@4 { 88 cpu2: PowerPC,e6500@4 {
79 device_type = "cpu"; 89 device_type = "cpu";
80 reg = <4 5>; 90 reg = <4 5>;
81 clocks = <&mux0>; 91 clocks = <&mux0>;
82 next-level-cache = <&L2>; 92 next-level-cache = <&L2_1>;
83 fsl,portid-mapping = <0x80000000>; 93 fsl,portid-mapping = <0x80000000>;
84 }; 94 };
85 cpu3: PowerPC,e6500@6 { 95 cpu3: PowerPC,e6500@6 {
86 device_type = "cpu"; 96 device_type = "cpu";
87 reg = <6 7>; 97 reg = <6 7>;
88 clocks = <&mux0>; 98 clocks = <&mux0>;
89 next-level-cache = <&L2>; 99 next-level-cache = <&L2_1>;
90 fsl,portid-mapping = <0x80000000>; 100 fsl,portid-mapping = <0x80000000>;
91 }; 101 };
92 }; 102 };
diff --git a/arch/powerpc/boot/dts/b4qds.dtsi b/arch/powerpc/boot/dts/fsl/b4qds.dtsi
index 559d00657fb5..64557742fb99 100644
--- a/arch/powerpc/boot/dts/b4qds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4qds.dtsi
@@ -229,4 +229,4 @@
229 229
230}; 230};
231 231
232/include/ "fsl/b4si-post.dtsi" 232/include/ "b4si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/b4si-post.dtsi b/arch/powerpc/boot/dts/fsl/b4si-post.dtsi
index 603910ac1db0..74866ac52f39 100644
--- a/arch/powerpc/boot/dts/fsl/b4si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/b4si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * B4420 Silicon/SoC Device Tree Source (post include) 2 * B4420 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2012 - 2014 Freescale Semiconductor, Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor, Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -466,9 +466,32 @@
466 interrupts = <16 2 1 29>; 466 interrupts = <16 2 1 29>;
467 }; 467 };
468 468
469 L2: l2-cache-controller@c20000 { 469/include/ "qoriq-fman3-0.dtsi"
470 compatible = "fsl,b4-l2-cache-controller"; 470/include/ "qoriq-fman3-0-1g-0.dtsi"
471 reg = <0xc20000 0x1000>; 471/include/ "qoriq-fman3-0-1g-1.dtsi"
472 next-level-cache = <&cpc>; 472/include/ "qoriq-fman3-0-1g-2.dtsi"
473/include/ "qoriq-fman3-0-1g-3.dtsi"
474 fman@400000 {
475 interrupts = <96 2 0 0>, <16 2 1 30>;
476
477 enet0: ethernet@e0000 {
478 };
479
480 enet1: ethernet@e2000 {
481 };
482
483 enet2: ethernet@e4000 {
484 };
485
486 enet3: ethernet@e6000 {
487 };
488
489 mdio@fc000 {
490 interrupts = <100 1 0 0>;
491 };
492
493 mdio@fd000 {
494 interrupts = <101 1 0 0>;
495 };
473 }; 496 };
474}; 497};
diff --git a/arch/powerpc/boot/dts/bsc9131rdb.dts b/arch/powerpc/boot/dts/fsl/bsc9131rdb.dts
index e13d2d4877b0..26366e6ff657 100644
--- a/arch/powerpc/boot/dts/bsc9131rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/bsc9131rdb.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/bsc9131si-pre.dtsi" 12/include/ "bsc9131si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,bsc9131rdb"; 15 model = "fsl,bsc9131rdb";
@@ -31,4 +31,4 @@
31}; 31};
32 32
33/include/ "bsc9131rdb.dtsi" 33/include/ "bsc9131rdb.dtsi"
34/include/ "fsl/bsc9131si-post.dtsi" 34/include/ "bsc9131si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/bsc9131rdb.dtsi b/arch/powerpc/boot/dts/fsl/bsc9131rdb.dtsi
index 45efcbadb23c..f4d96d277ed5 100644
--- a/arch/powerpc/boot/dts/bsc9131rdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/bsc9131rdb.dtsi
@@ -80,6 +80,18 @@
80 status = "disabled"; 80 status = "disabled";
81 }; 81 };
82 82
83 ptp_clock@b0e00 {
84 compatible = "fsl,etsec-ptp";
85 reg = <0xb0e00 0xb0>;
86 interrupts = <68 2 0 0 69 2 0 0>;
87 fsl,tclk-period = <5>;
88 fsl,tmr-prsc = <2>;
89 fsl,tmr-add = <0xcccccccd>;
90 fsl,tmr-fiper1 = <999999995>;
91 fsl,tmr-fiper2 = <99990>;
92 fsl,max-adj = <249999999>;
93 };
94
83 enet0: ethernet@b0000 { 95 enet0: ethernet@b0000 {
84 phy-handle = <&phy0>; 96 phy-handle = <&phy0>;
85 phy-connection-type = "rgmii-id"; 97 phy-connection-type = "rgmii-id";
diff --git a/arch/powerpc/boot/dts/bsc9132qds.dts b/arch/powerpc/boot/dts/fsl/bsc9132qds.dts
index 6cab1062bc74..70882ade606d 100644
--- a/arch/powerpc/boot/dts/bsc9132qds.dts
+++ b/arch/powerpc/boot/dts/fsl/bsc9132qds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/bsc9132si-pre.dtsi" 12/include/ "bsc9132si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,bsc9132qds"; 15 model = "fsl,bsc9132qds";
@@ -32,4 +32,4 @@
32}; 32};
33 33
34/include/ "bsc9132qds.dtsi" 34/include/ "bsc9132qds.dtsi"
35/include/ "fsl/bsc9132si-post.dtsi" 35/include/ "bsc9132si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/bsc9132qds.dtsi b/arch/powerpc/boot/dts/fsl/bsc9132qds.dtsi
index af8e88830221..7a13bf2aa439 100644
--- a/arch/powerpc/boot/dts/bsc9132qds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/bsc9132qds.dtsi
@@ -87,6 +87,18 @@
87 }; 87 };
88 }; 88 };
89 89
90 ptp_clock@b0e00 {
91 compatible = "fsl,etsec-ptp";
92 reg = <0xb0e00 0xb0>;
93 interrupts = <68 2 0 0 69 2 0 0>;
94 fsl,tclk-period = <5>;
95 fsl,tmr-prsc = <2>;
96 fsl,tmr-add = <0xcccccccd>;
97 fsl,tmr-fiper1 = <999999995>;
98 fsl,tmr-fiper2 = <99990>;
99 fsl,max-adj = <249999999>;
100 };
101
90 enet0: ethernet@b0000 { 102 enet0: ethernet@b0000 {
91 phy-handle = <&phy0>; 103 phy-handle = <&phy0>;
92 tbi-handle = <&tbi0>; 104 tbi-handle = <&tbi0>;
diff --git a/arch/powerpc/boot/dts/c293pcie.dts b/arch/powerpc/boot/dts/fsl/c293pcie.dts
index 6681cc21030b..53ab4db9e79c 100644
--- a/arch/powerpc/boot/dts/c293pcie.dts
+++ b/arch/powerpc/boot/dts/fsl/c293pcie.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/c293si-pre.dtsi" 35/include/ "c293si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,C293PCIE"; 38 model = "fsl,C293PCIE";
@@ -221,4 +221,4 @@
221 phy-connection-type = "rgmii-id"; 221 phy-connection-type = "rgmii-id";
222 }; 222 };
223}; 223};
224/include/ "fsl/c293si-post.dtsi" 224/include/ "c293si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts b/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts
new file mode 100644
index 000000000000..c6033909db60
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/cyrus_p5020.dts
@@ -0,0 +1,155 @@
1/*
2 * Cyrus 5020 Device Tree Source, based on p5020ds.dts
3 *
4 * Copyright 2015 Andy Fleming
5 *
6 * p5020ds.dts copyright:
7 * Copyright 2010 - 2014 Freescale Semiconductor Inc.
8 *
9 * This program is free software; you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License as published by the
11 * Free Software Foundation; either version 2 of the License, or (at your
12 * option) any later version.
13 */
14
15/include/ "p5020si-pre.dtsi"
16
17/ {
18 model = "varisys,CYRUS";
19 compatible = "varisys,CYRUS";
20 #address-cells = <2>;
21 #size-cells = <2>;
22 interrupt-parent = <&mpic>;
23
24 memory {
25 device_type = "memory";
26 };
27
28 reserved-memory {
29 #address-cells = <2>;
30 #size-cells = <2>;
31 ranges;
32
33 bman_fbpr: bman-fbpr {
34 size = <0 0x1000000>;
35 alignment = <0 0x1000000>;
36 };
37 qman_fqd: qman-fqd {
38 size = <0 0x400000>;
39 alignment = <0 0x400000>;
40 };
41 qman_pfdr: qman-pfdr {
42 size = <0 0x2000000>;
43 alignment = <0 0x2000000>;
44 };
45 };
46
47 dcsr: dcsr@f00000000 {
48 ranges = <0x00000000 0xf 0x00000000 0x01008000>;
49 };
50
51 bportals: bman-portals@ff4000000 {
52 ranges = <0x0 0xf 0xf4000000 0x200000>;
53 };
54
55 qportals: qman-portals@ff4200000 {
56 ranges = <0x0 0xf 0xf4200000 0x200000>;
57 };
58
59 soc: soc@ffe000000 {
60 ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
61 reg = <0xf 0xfe000000 0 0x00001000>;
62 spi@110000 {
63 };
64
65 i2c@118100 {
66 };
67
68 i2c@119100 {
69 rtc@6f {
70 compatible = "microchip,mcp7941x";
71 reg = <0x6f>;
72 };
73 };
74 };
75
76 rio: rapidio@ffe0c0000 {
77 reg = <0xf 0xfe0c0000 0 0x11000>;
78
79 port1 {
80 ranges = <0 0 0xc 0x20000000 0 0x10000000>;
81 };
82 port2 {
83 ranges = <0 0 0xc 0x30000000 0 0x10000000>;
84 };
85 };
86
87 lbc: localbus@ffe124000 {
88 reg = <0xf 0xfe124000 0 0x1000>;
89 ranges = <0 0 0xf 0xe8000000 0x08000000
90 2 0 0xf 0xffa00000 0x00040000
91 3 0 0xf 0xffdf0000 0x00008000>;
92 };
93
94 pci0: pcie@ffe200000 {
95 reg = <0xf 0xfe200000 0 0x1000>;
96 ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
97 0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
98 pcie@0 {
99 ranges = <0x02000000 0 0xe0000000
100 0x02000000 0 0xe0000000
101 0 0x20000000
102
103 0x01000000 0 0x00000000
104 0x01000000 0 0x00000000
105 0 0x00010000>;
106 };
107 };
108
109 pci1: pcie@ffe201000 {
110 reg = <0xf 0xfe201000 0 0x1000>;
111 ranges = <0x02000000 0x0 0xe0000000 0xc 0x20000000 0x0 0x20000000
112 0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
113 pcie@0 {
114 ranges = <0x02000000 0 0xe0000000
115 0x02000000 0 0xe0000000
116 0 0x20000000
117
118 0x01000000 0 0x00000000
119 0x01000000 0 0x00000000
120 0 0x00010000>;
121 };
122 };
123
124 pci2: pcie@ffe202000 {
125 reg = <0xf 0xfe202000 0 0x1000>;
126 ranges = <0x02000000 0 0xe0000000 0xc 0x40000000 0 0x20000000
127 0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
128 pcie@0 {
129 ranges = <0x02000000 0 0xe0000000
130 0x02000000 0 0xe0000000
131 0 0x20000000
132
133 0x01000000 0 0x00000000
134 0x01000000 0 0x00000000
135 0 0x00010000>;
136 };
137 };
138
139 pci3: pcie@ffe203000 {
140 reg = <0xf 0xfe203000 0 0x1000>;
141 ranges = <0x02000000 0 0xe0000000 0xc 0x60000000 0 0x20000000
142 0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>;
143 pcie@0 {
144 ranges = <0x02000000 0 0xe0000000
145 0x02000000 0 0xe0000000
146 0 0x20000000
147
148 0x01000000 0 0x00000000
149 0x01000000 0 0x00000000
150 0 0x00010000>;
151 };
152 };
153};
154
155/include/ "p5020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/ge_imp3a.dts b/arch/powerpc/boot/dts/fsl/ge_imp3a.dts
index fefae416a097..a2bb47f4edbe 100644
--- a/arch/powerpc/boot/dts/ge_imp3a.dts
+++ b/arch/powerpc/boot/dts/fsl/ge_imp3a.dts
@@ -12,7 +12,7 @@
12 * Copyright 2009 Freescale Semiconductor Inc. 12 * Copyright 2009 Freescale Semiconductor Inc.
13 */ 13 */
14 14
15/include/ "fsl/p2020si-pre.dtsi" 15/include/ "p2020si-pre.dtsi"
16 16
17/ { 17/ {
18 model = "GE_IMP3A"; 18 model = "GE_IMP3A";
@@ -252,4 +252,4 @@
252 }; 252 };
253}; 253};
254 254
255/include/ "fsl/p2020si-post.dtsi" 255/include/ "p2020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/kmcoge4.dts b/arch/powerpc/boot/dts/fsl/kmcoge4.dts
index 48dab6a50437..6858ec9ef295 100644
--- a/arch/powerpc/boot/dts/kmcoge4.dts
+++ b/arch/powerpc/boot/dts/fsl/kmcoge4.dts
@@ -12,7 +12,7 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14 14
15/include/ "fsl/p2041si-pre.dtsi" 15/include/ "p2041si-pre.dtsi"
16 16
17/ { 17/ {
18 model = "keymile,kmcoge4"; 18 model = "keymile,kmcoge4";
@@ -176,4 +176,4 @@
176 }; 176 };
177}; 177};
178 178
179/include/ "fsl/p2041si-post.dtsi" 179/include/ "p2041si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dts b/arch/powerpc/boot/dts/fsl/mpc8536ds.dts
index 19736222a0b9..96cdce841205 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8536ds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8536si-pre.dtsi" 12/include/ "mpc8536si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,mpc8536ds"; 15 model = "fsl,mpc8536ds";
@@ -105,5 +105,5 @@
105 }; 105 };
106}; 106};
107 107
108/include/ "fsl/mpc8536si-post.dtsi" 108/include/ "mpc8536si-post.dtsi"
109/include/ "mpc8536ds.dtsi" 109/include/ "mpc8536ds.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8536ds.dtsi b/arch/powerpc/boot/dts/fsl/mpc8536ds.dtsi
index 937ad7e46119..937ad7e46119 100644
--- a/arch/powerpc/boot/dts/mpc8536ds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/mpc8536ds.dtsi
diff --git a/arch/powerpc/boot/dts/mpc8536ds_36b.dts b/arch/powerpc/boot/dts/fsl/mpc8536ds_36b.dts
index 6c723ee108cd..38d326ce92d8 100644
--- a/arch/powerpc/boot/dts/mpc8536ds_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8536ds_36b.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8536si-pre.dtsi" 12/include/ "mpc8536si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,mpc8536ds"; 15 model = "fsl,mpc8536ds";
@@ -105,5 +105,5 @@
105 }; 105 };
106}; 106};
107 107
108/include/ "fsl/mpc8536si-post.dtsi" 108/include/ "mpc8536si-post.dtsi"
109/include/ "mpc8536ds.dtsi" 109/include/ "mpc8536ds.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi
index c8b2daa40ac8..41935709ebe8 100644
--- a/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/mpc8536si-post.dtsi
@@ -172,7 +172,7 @@
172 172
173 /* mark compat w/8572 to get some erratum treatment */ 173 /* mark compat w/8572 to get some erratum treatment */
174 gpio-controller@f000 { 174 gpio-controller@f000 {
175 compatible = "fsl,mpc8572-gpio", "fsl,pq3-gpio"; 175 compatible = "fsl,mpc8572-gpio";
176 }; 176 };
177 177
178 sata@18000 { 178 sata@18000 {
diff --git a/arch/powerpc/boot/dts/mpc8540ads.dts b/arch/powerpc/boot/dts/fsl/mpc8540ads.dts
index 7ce274c9a2d5..e6d0b166d68d 100644
--- a/arch/powerpc/boot/dts/mpc8540ads.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8540ads.dts
@@ -11,7 +11,7 @@
11 11
12/dts-v1/; 12/dts-v1/;
13 13
14/include/ "fsl/e500v2_power_isa.dtsi" 14/include/ "e500v2_power_isa.dtsi"
15 15
16/ { 16/ {
17 model = "MPC8540ADS"; 17 model = "MPC8540ADS";
diff --git a/arch/powerpc/boot/dts/mpc8541cds.dts b/arch/powerpc/boot/dts/fsl/mpc8541cds.dts
index 4d35a3e0fb02..9fa2c734a988 100644
--- a/arch/powerpc/boot/dts/mpc8541cds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8541cds.dts
@@ -11,7 +11,7 @@
11 11
12/dts-v1/; 12/dts-v1/;
13 13
14/include/ "fsl/e500v2_power_isa.dtsi" 14/include/ "e500v2_power_isa.dtsi"
15 15
16/ { 16/ {
17 model = "MPC8541CDS"; 17 model = "MPC8541CDS";
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dts b/arch/powerpc/boot/dts/fsl/mpc8544ds.dts
index ed38874c3a36..5a6e46861ab5 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8544ds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8544si-pre.dtsi" 12/include/ "mpc8544si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "MPC8544DS"; 15 model = "MPC8544DS";
@@ -103,5 +103,5 @@
103 * for interrupt-map & interrupt-map-mask 103 * for interrupt-map & interrupt-map-mask
104 */ 104 */
105 105
106/include/ "fsl/mpc8544si-post.dtsi" 106/include/ "mpc8544si-post.dtsi"
107/include/ "mpc8544ds.dtsi" 107/include/ "mpc8544ds.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8544ds.dtsi b/arch/powerpc/boot/dts/fsl/mpc8544ds.dtsi
index 47d986b041f6..47d986b041f6 100644
--- a/arch/powerpc/boot/dts/mpc8544ds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/mpc8544ds.dtsi
diff --git a/arch/powerpc/boot/dts/mpc8548cds.dtsi b/arch/powerpc/boot/dts/fsl/mpc8548cds.dtsi
index 3bc7d4711220..3bc7d4711220 100644
--- a/arch/powerpc/boot/dts/mpc8548cds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/mpc8548cds.dtsi
diff --git a/arch/powerpc/boot/dts/mpc8548cds_32b.dts b/arch/powerpc/boot/dts/fsl/mpc8548cds_32b.dts
index 6fd63163fc6b..e4620bb192f4 100644
--- a/arch/powerpc/boot/dts/mpc8548cds_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8548cds_32b.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8548si-pre.dtsi" 12/include/ "mpc8548si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "MPC8548CDS"; 15 model = "MPC8548CDS";
@@ -82,5 +82,5 @@
82 * for interrupt-map & interrupt-map-mask. 82 * for interrupt-map & interrupt-map-mask.
83 */ 83 */
84 84
85/include/ "fsl/mpc8548si-post.dtsi" 85/include/ "mpc8548si-post.dtsi"
86/include/ "mpc8548cds.dtsi" 86/include/ "mpc8548cds.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8548cds_36b.dts b/arch/powerpc/boot/dts/fsl/mpc8548cds_36b.dts
index 10e551b11bd6..bca7c09d3edf 100644
--- a/arch/powerpc/boot/dts/mpc8548cds_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8548cds_36b.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8548si-pre.dtsi" 12/include/ "mpc8548si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "MPC8548CDS"; 15 model = "MPC8548CDS";
@@ -82,5 +82,5 @@
82 * for interrupt-map & interrupt-map-mask. 82 * for interrupt-map & interrupt-map-mask.
83 */ 83 */
84 84
85/include/ "fsl/mpc8548si-post.dtsi" 85/include/ "mpc8548si-post.dtsi"
86/include/ "mpc8548cds.dtsi" 86/include/ "mpc8548cds.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8555cds.dts b/arch/powerpc/boot/dts/fsl/mpc8555cds.dts
index f115f21cb0ae..272f08caea92 100644
--- a/arch/powerpc/boot/dts/mpc8555cds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8555cds.dts
@@ -11,7 +11,7 @@
11 11
12/dts-v1/; 12/dts-v1/;
13 13
14/include/ "fsl/e500v2_power_isa.dtsi" 14/include/ "e500v2_power_isa.dtsi"
15 15
16/ { 16/ {
17 model = "MPC8555CDS"; 17 model = "MPC8555CDS";
diff --git a/arch/powerpc/boot/dts/mpc8560ads.dts b/arch/powerpc/boot/dts/fsl/mpc8560ads.dts
index 0d70921d6125..7a822b08aa35 100644
--- a/arch/powerpc/boot/dts/mpc8560ads.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8560ads.dts
@@ -11,7 +11,7 @@
11 11
12/dts-v1/; 12/dts-v1/;
13 13
14/include/ "fsl/e500v2_power_isa.dtsi" 14/include/ "e500v2_power_isa.dtsi"
15 15
16/ { 16/ {
17 model = "MPC8560ADS"; 17 model = "MPC8560ADS";
diff --git a/arch/powerpc/boot/dts/mpc8568mds.dts b/arch/powerpc/boot/dts/fsl/mpc8568mds.dts
index bead2b655b9f..01706a339603 100644
--- a/arch/powerpc/boot/dts/mpc8568mds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8568mds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8568si-pre.dtsi" 12/include/ "mpc8568si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "MPC8568EMDS"; 15 model = "MPC8568EMDS";
@@ -311,4 +311,4 @@
311 }; 311 };
312}; 312};
313 313
314/include/ "fsl/mpc8568si-post.dtsi" 314/include/ "mpc8568si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8569mds.dts b/arch/powerpc/boot/dts/fsl/mpc8569mds.dts
index d0dcdafa5eb2..a95ff7d2392c 100644
--- a/arch/powerpc/boot/dts/mpc8569mds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8569mds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8569si-pre.dtsi" 12/include/ "mpc8569si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "MPC8569EMDS"; 15 model = "MPC8569EMDS";
@@ -444,4 +444,4 @@
444 }; 444 };
445}; 445};
446 446
447/include/ "fsl/mpc8569si-post.dtsi" 447/include/ "mpc8569si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dts b/arch/powerpc/boot/dts/fsl/mpc8572ds.dts
index 0c9f2955deb4..8ee5b24cc59e 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8572ds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8572si-pre.dtsi" 12/include/ "mpc8572si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,MPC8572DS"; 15 model = "fsl,MPC8572DS";
@@ -86,5 +86,5 @@
86 * for interrupt-map & interrupt-map-mask 86 * for interrupt-map & interrupt-map-mask
87 */ 87 */
88 88
89/include/ "fsl/mpc8572si-post.dtsi" 89/include/ "mpc8572si-post.dtsi"
90/include/ "mpc8572ds.dtsi" 90/include/ "mpc8572ds.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8572ds.dtsi b/arch/powerpc/boot/dts/fsl/mpc8572ds.dtsi
index 357490bb84da..357490bb84da 100644
--- a/arch/powerpc/boot/dts/mpc8572ds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/mpc8572ds.dtsi
diff --git a/arch/powerpc/boot/dts/mpc8572ds_36b.dts b/arch/powerpc/boot/dts/fsl/mpc8572ds_36b.dts
index 6c3d0b305e1b..5c48b464669b 100644
--- a/arch/powerpc/boot/dts/mpc8572ds_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8572ds_36b.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/mpc8572si-pre.dtsi" 12/include/ "mpc8572si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,MPC8572DS"; 15 model = "fsl,MPC8572DS";
@@ -86,5 +86,5 @@
86 * for interrupt-map & interrupt-map-mask 86 * for interrupt-map & interrupt-map-mask
87 */ 87 */
88 88
89/include/ "fsl/mpc8572si-post.dtsi" 89/include/ "mpc8572si-post.dtsi"
90/include/ "mpc8572ds.dtsi" 90/include/ "mpc8572ds.dtsi"
diff --git a/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts b/arch/powerpc/boot/dts/fsl/mpc8572ds_camp_core0.dts
index ef9ef56b3eeb..ef9ef56b3eeb 100644
--- a/arch/powerpc/boot/dts/mpc8572ds_camp_core0.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8572ds_camp_core0.dts
diff --git a/arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts b/arch/powerpc/boot/dts/fsl/mpc8572ds_camp_core1.dts
index 24564ee108e5..24564ee108e5 100644
--- a/arch/powerpc/boot/dts/mpc8572ds_camp_core1.dts
+++ b/arch/powerpc/boot/dts/fsl/mpc8572ds_camp_core1.dts
diff --git a/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi b/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi
index d44e25a48734..49294cf36b4e 100644
--- a/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/mpc8572si-post.dtsi
@@ -162,7 +162,7 @@
162/include/ "pq3-dma-1.dtsi" 162/include/ "pq3-dma-1.dtsi"
163/include/ "pq3-gpio-0.dtsi" 163/include/ "pq3-gpio-0.dtsi"
164 gpio-controller@f000 { 164 gpio-controller@f000 {
165 compatible = "fsl,mpc8572-gpio", "fsl,pq3-gpio"; 165 compatible = "fsl,mpc8572-gpio";
166 }; 166 };
167 167
168 L2: l2-cache-controller@20000 { 168 L2: l2-cache-controller@20000 {
diff --git a/arch/powerpc/boot/dts/mvme2500.dts b/arch/powerpc/boot/dts/fsl/mvme2500.dts
index 67714cf0f745..c7bc1a0c7194 100644
--- a/arch/powerpc/boot/dts/mvme2500.dts
+++ b/arch/powerpc/boot/dts/fsl/mvme2500.dts
@@ -12,7 +12,7 @@
12 * Copyright 2009 Freescale Semiconductor Inc. 12 * Copyright 2009 Freescale Semiconductor Inc.
13 */ 13 */
14 14
15/include/ "fsl/p2020si-pre.dtsi" 15/include/ "p2020si-pre.dtsi"
16 16
17/ { 17/ {
18 model = "MVME2500"; 18 model = "MVME2500";
@@ -258,7 +258,7 @@
258 }; 258 };
259}; 259};
260 260
261/include/ "fsl/p2020si-post.dtsi" 261/include/ "p2020si-post.dtsi"
262 262
263/ { 263/ {
264 soc@ffe00000 { 264 soc@ffe00000 {
diff --git a/arch/powerpc/boot/dts/oca4080.dts b/arch/powerpc/boot/dts/fsl/oca4080.dts
index 42796c5b0561..17bc6f391248 100644
--- a/arch/powerpc/boot/dts/oca4080.dts
+++ b/arch/powerpc/boot/dts/fsl/oca4080.dts
@@ -36,7 +36,7 @@
36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37 */ 37 */
38 38
39/include/ "fsl/p4080si-pre.dtsi" 39/include/ "p4080si-pre.dtsi"
40 40
41/ { 41/ {
42 model = "fsl,OCA4080"; 42 model = "fsl,OCA4080";
@@ -142,4 +142,4 @@
142 }; 142 };
143}; 143};
144 144
145/include/ "fsl/p4080si-post.dtsi" 145/include/ "p4080si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1010rdb-pa.dts b/arch/powerpc/boot/dts/fsl/p1010rdb-pa.dts
index 767d4c032857..e4ab53c4ab50 100644
--- a/arch/powerpc/boot/dts/p1010rdb-pa.dts
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb-pa.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p1010si-pre.dtsi" 12/include/ "p1010si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,P1010RDB"; 15 model = "fsl,P1010RDB";
@@ -20,4 +20,4 @@
20 20
21/include/ "p1010rdb.dtsi" 21/include/ "p1010rdb.dtsi"
22/include/ "p1010rdb-pa.dtsi" 22/include/ "p1010rdb-pa.dtsi"
23/include/ "fsl/p1010si-post.dtsi" 23/include/ "p1010si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1010rdb-pa.dtsi b/arch/powerpc/boot/dts/fsl/p1010rdb-pa.dtsi
index 434fb2d58575..434fb2d58575 100644
--- a/arch/powerpc/boot/dts/p1010rdb-pa.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb-pa.dtsi
diff --git a/arch/powerpc/boot/dts/p1010rdb-pa_36b.dts b/arch/powerpc/boot/dts/fsl/p1010rdb-pa_36b.dts
index 3033371bc007..03bd76ca8406 100644
--- a/arch/powerpc/boot/dts/p1010rdb-pa_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb-pa_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1010si-pre.dtsi" 35/include/ "p1010si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P1010RDB"; 38 model = "fsl,P1010RDB";
@@ -43,4 +43,4 @@
43 43
44/include/ "p1010rdb.dtsi" 44/include/ "p1010rdb.dtsi"
45/include/ "p1010rdb-pa.dtsi" 45/include/ "p1010rdb-pa.dtsi"
46/include/ "fsl/p1010si-post.dtsi" 46/include/ "p1010si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1010rdb-pb.dts b/arch/powerpc/boot/dts/fsl/p1010rdb-pb.dts
index 6eeb7d3185be..37681fda4b7d 100644
--- a/arch/powerpc/boot/dts/p1010rdb-pb.dts
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb-pb.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p1010si-pre.dtsi" 12/include/ "p1010si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,P1010RDB-PB"; 15 model = "fsl,P1010RDB-PB";
@@ -32,4 +32,4 @@
32 interrupts = <1 1 0 0>; 32 interrupts = <1 1 0 0>;
33}; 33};
34 34
35/include/ "fsl/p1010si-post.dtsi" 35/include/ "p1010si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1010rdb-pb_36b.dts b/arch/powerpc/boot/dts/fsl/p1010rdb-pb_36b.dts
index 7ab3c907b326..4cf255fedc96 100644
--- a/arch/powerpc/boot/dts/p1010rdb-pb_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb-pb_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1010si-pre.dtsi" 35/include/ "p1010si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P1010RDB-PB"; 38 model = "fsl,P1010RDB-PB";
@@ -55,4 +55,4 @@
55 interrupts = <1 1 0 0>; 55 interrupts = <1 1 0 0>;
56}; 56};
57 57
58/include/ "fsl/p1010si-post.dtsi" 58/include/ "p1010si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1010rdb.dtsi b/arch/powerpc/boot/dts/fsl/p1010rdb.dtsi
index ea534efa790d..0f0ced69835a 100644
--- a/arch/powerpc/boot/dts/p1010rdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb.dtsi
@@ -186,6 +186,18 @@
186 }; 186 };
187 }; 187 };
188 188
189 ptp_clock@b0e00 {
190 compatible = "fsl,etsec-ptp";
191 reg = <0xb0e00 0xb0>;
192 interrupts = <68 2 0 0 69 2 0 0>;
193 fsl,tclk-period = <10>;
194 fsl,tmr-prsc = <2>;
195 fsl,tmr-add = <0x80000016>;
196 fsl,tmr-fiper1 = <999999990>;
197 fsl,tmr-fiper2 = <99990>;
198 fsl,max-adj = <199999999>;
199 };
200
189 enet0: ethernet@b0000 { 201 enet0: ethernet@b0000 {
190 phy-handle = <&phy0>; 202 phy-handle = <&phy0>;
191 phy-connection-type = "rgmii-id"; 203 phy-connection-type = "rgmii-id";
diff --git a/arch/powerpc/boot/dts/p1010rdb_32b.dtsi b/arch/powerpc/boot/dts/fsl/p1010rdb_32b.dtsi
index fdc19aab2f70..fdc19aab2f70 100644
--- a/arch/powerpc/boot/dts/p1010rdb_32b.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb_32b.dtsi
diff --git a/arch/powerpc/boot/dts/p1010rdb_36b.dtsi b/arch/powerpc/boot/dts/fsl/p1010rdb_36b.dtsi
index de2fceed4f79..de2fceed4f79 100644
--- a/arch/powerpc/boot/dts/p1010rdb_36b.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1010rdb_36b.dtsi
diff --git a/arch/powerpc/boot/dts/p1020mbg-pc.dtsi b/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
index a24699cfea9c..a24699cfea9c 100644
--- a/arch/powerpc/boot/dts/p1020mbg-pc.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1020mbg-pc.dtsi
diff --git a/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts b/arch/powerpc/boot/dts/fsl/p1020mbg-pc_32b.dts
index ab8f076eae90..b29d1fcb5e6b 100644
--- a/arch/powerpc/boot/dts/p1020mbg-pc_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020mbg-pc_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020MBG-PC"; 37 model = "fsl,P1020MBG-PC";
38 compatible = "fsl,P1020MBG-PC"; 38 compatible = "fsl,P1020MBG-PC";
@@ -86,4 +86,4 @@
86}; 86};
87 87
88/include/ "p1020mbg-pc.dtsi" 88/include/ "p1020mbg-pc.dtsi"
89/include/ "fsl/p1020si-post.dtsi" 89/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020mbg-pc_36b.dts b/arch/powerpc/boot/dts/fsl/p1020mbg-pc_36b.dts
index 9e9f401419b1..678d0eec24e2 100644
--- a/arch/powerpc/boot/dts/p1020mbg-pc_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020mbg-pc_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020MBG-PC"; 37 model = "fsl,P1020MBG-PC";
38 compatible = "fsl,P1020MBG-PC"; 38 compatible = "fsl,P1020MBG-PC";
@@ -86,4 +86,4 @@
86}; 86};
87 87
88/include/ "p1020mbg-pc.dtsi" 88/include/ "p1020mbg-pc.dtsi"
89/include/ "fsl/p1020si-post.dtsi" 89/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020rdb-pc.dtsi b/arch/powerpc/boot/dts/fsl/p1020rdb-pc.dtsi
index c952cd37cf6d..c952cd37cf6d 100644
--- a/arch/powerpc/boot/dts/p1020rdb-pc.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb-pc.dtsi
diff --git a/arch/powerpc/boot/dts/p1020rdb-pc_32b.dts b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_32b.dts
index 4de69b726dc5..8175bf6f3e9c 100644
--- a/arch/powerpc/boot/dts/p1020rdb-pc_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020RDB-PC"; 37 model = "fsl,P1020RDB-PC";
38 compatible = "fsl,P1020RDB-PC"; 38 compatible = "fsl,P1020RDB-PC";
@@ -87,4 +87,4 @@
87}; 87};
88 88
89/include/ "p1020rdb-pc.dtsi" 89/include/ "p1020rdb-pc.dtsi"
90/include/ "fsl/p1020si-post.dtsi" 90/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020rdb-pc_36b.dts b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_36b.dts
index 5237da7441bc..01c305795163 100644
--- a/arch/powerpc/boot/dts/p1020rdb-pc_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020RDB-PC"; 37 model = "fsl,P1020RDB-PC";
38 compatible = "fsl,P1020RDB-PC"; 38 compatible = "fsl,P1020RDB-PC";
@@ -87,4 +87,4 @@
87}; 87};
88 88
89/include/ "p1020rdb-pc.dtsi" 89/include/ "p1020rdb-pc.dtsi"
90/include/ "fsl/p1020si-post.dtsi" 90/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020rdb-pc_camp_core0.dts b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_camp_core0.dts
index f411515937ec..f411515937ec 100644
--- a/arch/powerpc/boot/dts/p1020rdb-pc_camp_core0.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_camp_core0.dts
diff --git a/arch/powerpc/boot/dts/p1020rdb-pc_camp_core1.dts b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_camp_core1.dts
index a91335ad82c2..a91335ad82c2 100644
--- a/arch/powerpc/boot/dts/p1020rdb-pc_camp_core1.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb-pc_camp_core1.dts
diff --git a/arch/powerpc/boot/dts/p1020rdb-pd.dts b/arch/powerpc/boot/dts/fsl/p1020rdb-pd.dts
index 987017ea36b6..740553c090a3 100644
--- a/arch/powerpc/boot/dts/p1020rdb-pd.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb-pd.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020RDB-PD"; 37 model = "fsl,P1020RDB-PD";
38 compatible = "fsl,P1020RDB-PD"; 38 compatible = "fsl,P1020RDB-PD";
@@ -225,6 +225,18 @@
225 }; 225 };
226 }; 226 };
227 227
228 ptp_clock@b0e00 {
229 compatible = "fsl,etsec-ptp";
230 reg = <0xb0e00 0xb0>;
231 interrupts = <68 2 0 0 69 2 0 0>;
232 fsl,tclk-period = <10>;
233 fsl,tmr-prsc = <2>;
234 fsl,tmr-add = <0x80000016>;
235 fsl,tmr-fiper1 = <999999990>;
236 fsl,tmr-fiper2 = <99990>;
237 fsl,max-adj = <199999999>;
238 };
239
228 enet0: ethernet@b0000 { 240 enet0: ethernet@b0000 {
229 fixed-link = <1 1 1000 0 0>; 241 fixed-link = <1 1 1000 0 0>;
230 phy-connection-type = "rgmii-id"; 242 phy-connection-type = "rgmii-id";
@@ -277,4 +289,4 @@
277 }; 289 };
278}; 290};
279 291
280/include/ "fsl/p1020si-post.dtsi" 292/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020rdb.dts b/arch/powerpc/boot/dts/fsl/p1020rdb.dts
index 518bf99b1f50..81362252bc8c 100644
--- a/arch/powerpc/boot/dts/p1020rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p1020si-pre.dtsi" 12/include/ "p1020si-pre.dtsi"
13/ { 13/ {
14 model = "fsl,P1020RDB"; 14 model = "fsl,P1020RDB";
15 compatible = "fsl,P1020RDB"; 15 compatible = "fsl,P1020RDB";
@@ -63,4 +63,4 @@
63}; 63};
64 64
65/include/ "p1020rdb.dtsi" 65/include/ "p1020rdb.dtsi"
66/include/ "fsl/p1020si-post.dtsi" 66/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020rdb.dtsi b/arch/powerpc/boot/dts/fsl/p1020rdb.dtsi
index 1fb7e0e0940f..1fb7e0e0940f 100644
--- a/arch/powerpc/boot/dts/p1020rdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb.dtsi
diff --git a/arch/powerpc/boot/dts/p1020rdb_36b.dts b/arch/powerpc/boot/dts/fsl/p1020rdb_36b.dts
index bdbdb6097e57..74471e3ca136 100644
--- a/arch/powerpc/boot/dts/p1020rdb_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020rdb_36b.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p1020si-pre.dtsi" 12/include/ "p1020si-pre.dtsi"
13/ { 13/ {
14 model = "fsl,P1020RDB"; 14 model = "fsl,P1020RDB";
15 compatible = "fsl,P1020RDB"; 15 compatible = "fsl,P1020RDB";
@@ -63,4 +63,4 @@
63}; 63};
64 64
65/include/ "p1020rdb.dtsi" 65/include/ "p1020rdb.dtsi"
66/include/ "fsl/p1020si-post.dtsi" 66/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020utm-pc.dtsi b/arch/powerpc/boot/dts/fsl/p1020utm-pc.dtsi
index 7ea85eabcc5c..7ea85eabcc5c 100644
--- a/arch/powerpc/boot/dts/p1020utm-pc.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1020utm-pc.dtsi
diff --git a/arch/powerpc/boot/dts/p1020utm-pc_32b.dts b/arch/powerpc/boot/dts/fsl/p1020utm-pc_32b.dts
index 4bfdd8971cdb..bc03ef611f98 100644
--- a/arch/powerpc/boot/dts/p1020utm-pc_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020utm-pc_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020UTM-PC"; 37 model = "fsl,P1020UTM-PC";
38 compatible = "fsl,P1020UTM-PC"; 38 compatible = "fsl,P1020UTM-PC";
@@ -86,4 +86,4 @@
86}; 86};
87 87
88/include/ "p1020utm-pc.dtsi" 88/include/ "p1020utm-pc.dtsi"
89/include/ "fsl/p1020si-post.dtsi" 89/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1020utm-pc_36b.dts b/arch/powerpc/boot/dts/fsl/p1020utm-pc_36b.dts
index abec53557501..32766f6a475e 100644
--- a/arch/powerpc/boot/dts/p1020utm-pc_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1020utm-pc_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1020UTM-PC"; 37 model = "fsl,P1020UTM-PC";
38 compatible = "fsl,P1020UTM-PC"; 38 compatible = "fsl,P1020UTM-PC";
@@ -86,4 +86,4 @@
86}; 86};
87 87
88/include/ "p1020utm-pc.dtsi" 88/include/ "p1020utm-pc.dtsi"
89/include/ "fsl/p1020si-post.dtsi" 89/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1021mds.dts b/arch/powerpc/boot/dts/fsl/p1021mds.dts
index 76559044df41..27fdfd7dc7c7 100644
--- a/arch/powerpc/boot/dts/p1021mds.dts
+++ b/arch/powerpc/boot/dts/fsl/p1021mds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p1021si-pre.dtsi" 12/include/ "p1021si-pre.dtsi"
13/ { 13/ {
14 model = "fsl,P1021"; 14 model = "fsl,P1021";
15 compatible = "fsl,P1021MDS"; 15 compatible = "fsl,P1021MDS";
@@ -320,4 +320,4 @@
320 }; 320 };
321}; 321};
322 322
323/include/ "fsl/p1021si-post.dtsi" 323/include/ "p1021si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1021rdb-pc.dtsi b/arch/powerpc/boot/dts/fsl/p1021rdb-pc.dtsi
index d6274c58f496..e8a0f95fb24a 100644
--- a/arch/powerpc/boot/dts/p1021rdb-pc.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1021rdb-pc.dtsi
@@ -224,6 +224,18 @@
224 }; 224 };
225 }; 225 };
226 226
227 ptp_clock@b0e00 {
228 compatible = "fsl,etsec-ptp";
229 reg = <0xb0e00 0xb0>;
230 interrupts = <68 2 0 0 69 2 0 0>;
231 fsl,tclk-period = <10>;
232 fsl,tmr-prsc = <2>;
233 fsl,tmr-add = <0x80000016>;
234 fsl,tmr-fiper1 = <999999990>;
235 fsl,tmr-fiper2 = <99990>;
236 fsl,max-adj = <199999999>;
237 };
238
227 enet0: ethernet@b0000 { 239 enet0: ethernet@b0000 {
228 fixed-link = <1 1 1000 0 0>; 240 fixed-link = <1 1 1000 0 0>;
229 phy-connection-type = "rgmii-id"; 241 phy-connection-type = "rgmii-id";
diff --git a/arch/powerpc/boot/dts/p1021rdb-pc_32b.dts b/arch/powerpc/boot/dts/fsl/p1021rdb-pc_32b.dts
index 7cefa12b629a..d2b4710357ac 100644
--- a/arch/powerpc/boot/dts/p1021rdb-pc_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1021rdb-pc_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1021si-pre.dtsi" 35/include/ "p1021si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1021RDB"; 37 model = "fsl,P1021RDB";
38 compatible = "fsl,P1021RDB-PC"; 38 compatible = "fsl,P1021RDB-PC";
@@ -93,4 +93,4 @@
93}; 93};
94 94
95/include/ "p1021rdb-pc.dtsi" 95/include/ "p1021rdb-pc.dtsi"
96/include/ "fsl/p1021si-post.dtsi" 96/include/ "p1021si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1021rdb-pc_36b.dts b/arch/powerpc/boot/dts/fsl/p1021rdb-pc_36b.dts
index 53d0c889039c..e298c29e5606 100644
--- a/arch/powerpc/boot/dts/p1021rdb-pc_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1021rdb-pc_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1021si-pre.dtsi" 35/include/ "p1021si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1021RDB"; 37 model = "fsl,P1021RDB";
38 compatible = "fsl,P1021RDB-PC"; 38 compatible = "fsl,P1021RDB-PC";
@@ -93,4 +93,4 @@
93}; 93};
94 94
95/include/ "p1021rdb-pc.dtsi" 95/include/ "p1021rdb-pc.dtsi"
96/include/ "fsl/p1021si-post.dtsi" 96/include/ "p1021si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1022ds.dtsi b/arch/powerpc/boot/dts/fsl/p1022ds.dtsi
index 957e0dc1dc0f..149da0f123ee 100644
--- a/arch/powerpc/boot/dts/p1022ds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1022ds.dtsi
@@ -215,6 +215,18 @@
215 }; 215 };
216 }; 216 };
217 217
218 ptp_clock@b0e00 {
219 compatible = "fsl,etsec-ptp";
220 reg = <0xb0e00 0xb0>;
221 interrupts = <68 2 0 0 69 2 0 0>;
222 fsl,tclk-period = <5>;
223 fsl,tmr-prsc = <2>;
224 fsl,tmr-add = <0xc01ebd3d>;
225 fsl,tmr-fiper1 = <999999995>;
226 fsl,tmr-fiper2 = <99990>;
227 fsl,max-adj = <266499999>;
228 };
229
218 ethernet@b0000 { 230 ethernet@b0000 {
219 phy-handle = <&phy0>; 231 phy-handle = <&phy0>;
220 phy-connection-type = "rgmii-id"; 232 phy-connection-type = "rgmii-id";
diff --git a/arch/powerpc/boot/dts/p1022ds_32b.dts b/arch/powerpc/boot/dts/fsl/p1022ds_32b.dts
index d96cae00a9e3..5a7eaceb9e8e 100644
--- a/arch/powerpc/boot/dts/p1022ds_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1022ds_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1022si-pre.dtsi" 35/include/ "p1022si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1022DS"; 37 model = "fsl,P1022DS";
38 compatible = "fsl,P1022DS"; 38 compatible = "fsl,P1022DS";
@@ -99,5 +99,5 @@
99 }; 99 };
100}; 100};
101 101
102/include/ "fsl/p1022si-post.dtsi" 102/include/ "p1022si-post.dtsi"
103/include/ "p1022ds.dtsi" 103/include/ "p1022ds.dtsi"
diff --git a/arch/powerpc/boot/dts/p1022ds_36b.dts b/arch/powerpc/boot/dts/fsl/p1022ds_36b.dts
index f7aacce40bf6..88063cd9e20a 100644
--- a/arch/powerpc/boot/dts/p1022ds_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1022ds_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1022si-pre.dtsi" 35/include/ "p1022si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1022DS"; 37 model = "fsl,P1022DS";
38 compatible = "fsl,P1022DS"; 38 compatible = "fsl,P1022DS";
@@ -99,5 +99,5 @@
99 }; 99 };
100}; 100};
101 101
102/include/ "fsl/p1022si-post.dtsi" 102/include/ "p1022si-post.dtsi"
103/include/ "p1022ds.dtsi" 103/include/ "p1022ds.dtsi"
diff --git a/arch/powerpc/boot/dts/p1022rdk.dts b/arch/powerpc/boot/dts/fsl/p1022rdk.dts
index 51d82de223f3..04c16337268a 100644
--- a/arch/powerpc/boot/dts/p1022rdk.dts
+++ b/arch/powerpc/boot/dts/fsl/p1022rdk.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1022si-pre.dtsi" 35/include/ "p1022si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1022RDK"; 37 model = "fsl,P1022RDK";
38 compatible = "fsl,P1022RDK"; 38 compatible = "fsl,P1022RDK";
@@ -185,4 +185,4 @@
185 }; 185 };
186}; 186};
187 187
188/include/ "fsl/p1022si-post.dtsi" 188/include/ "p1022si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1023rdb.dts b/arch/powerpc/boot/dts/fsl/p1023rdb.dts
index 05a00a4d2861..9716ca64651c 100644
--- a/arch/powerpc/boot/dts/p1023rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/p1023rdb.dts
@@ -34,7 +34,7 @@
34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35 */ 35 */
36 36
37/include/ "fsl/p1023si-pre.dtsi" 37/include/ "p1023si-pre.dtsi"
38 38
39/ { 39/ {
40 model = "fsl,P1023"; 40 model = "fsl,P1023";
@@ -257,4 +257,4 @@
257 }; 257 };
258}; 258};
259 259
260/include/ "fsl/p1023si-post.dtsi" 260/include/ "p1023si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1024rdb.dtsi b/arch/powerpc/boot/dts/fsl/p1024rdb.dtsi
index b05dcb40f800..b05dcb40f800 100644
--- a/arch/powerpc/boot/dts/p1024rdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1024rdb.dtsi
diff --git a/arch/powerpc/boot/dts/p1024rdb_32b.dts b/arch/powerpc/boot/dts/fsl/p1024rdb_32b.dts
index 90e803e9ba5f..8b09b9d56ad1 100644
--- a/arch/powerpc/boot/dts/p1024rdb_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1024rdb_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1024RDB"; 37 model = "fsl,P1024RDB";
38 compatible = "fsl,P1024RDB"; 38 compatible = "fsl,P1024RDB";
@@ -84,4 +84,4 @@
84}; 84};
85 85
86/include/ "p1024rdb.dtsi" 86/include/ "p1024rdb.dtsi"
87/include/ "fsl/p1020si-post.dtsi" 87/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1024rdb_36b.dts b/arch/powerpc/boot/dts/fsl/p1024rdb_36b.dts
index 3656825b65a1..e7093aef28f1 100644
--- a/arch/powerpc/boot/dts/p1024rdb_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1024rdb_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1020si-pre.dtsi" 35/include/ "p1020si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1024RDB"; 37 model = "fsl,P1024RDB";
38 compatible = "fsl,P1024RDB"; 38 compatible = "fsl,P1024RDB";
@@ -84,4 +84,4 @@
84}; 84};
85 85
86/include/ "p1024rdb.dtsi" 86/include/ "p1024rdb.dtsi"
87/include/ "fsl/p1020si-post.dtsi" 87/include/ "p1020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1025rdb.dtsi b/arch/powerpc/boot/dts/fsl/p1025rdb.dtsi
index f50256482297..f50256482297 100644
--- a/arch/powerpc/boot/dts/p1025rdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1025rdb.dtsi
diff --git a/arch/powerpc/boot/dts/p1025rdb_32b.dts b/arch/powerpc/boot/dts/fsl/p1025rdb_32b.dts
index a2ed6280ba7a..b15acbaea34b 100644
--- a/arch/powerpc/boot/dts/p1025rdb_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1025rdb_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1021si-pre.dtsi" 35/include/ "p1021si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1025RDB"; 37 model = "fsl,P1025RDB";
38 compatible = "fsl,P1025RDB"; 38 compatible = "fsl,P1025RDB";
@@ -130,4 +130,4 @@
130}; 130};
131 131
132/include/ "p1025rdb.dtsi" 132/include/ "p1025rdb.dtsi"
133/include/ "fsl/p1021si-post.dtsi" 133/include/ "p1021si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1025rdb_36b.dts b/arch/powerpc/boot/dts/fsl/p1025rdb_36b.dts
index 06deb6f341ba..b0ded5e8bd0b 100644
--- a/arch/powerpc/boot/dts/p1025rdb_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p1025rdb_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1021si-pre.dtsi" 35/include/ "p1021si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1025RDB"; 37 model = "fsl,P1025RDB";
38 compatible = "fsl,P1025RDB"; 38 compatible = "fsl,P1025RDB";
@@ -90,4 +90,4 @@
90}; 90};
91 91
92/include/ "p1025rdb.dtsi" 92/include/ "p1025rdb.dtsi"
93/include/ "fsl/p1021si-post.dtsi" 93/include/ "p1021si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1025twr.dts b/arch/powerpc/boot/dts/fsl/p1025twr.dts
index 9036a4987905..9b8863b74b60 100644
--- a/arch/powerpc/boot/dts/p1025twr.dts
+++ b/arch/powerpc/boot/dts/fsl/p1025twr.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p1021si-pre.dtsi" 35/include/ "p1021si-pre.dtsi"
36/ { 36/ {
37 model = "fsl,P1025"; 37 model = "fsl,P1025";
38 compatible = "fsl,TWR-P1025"; 38 compatible = "fsl,TWR-P1025";
@@ -92,4 +92,4 @@
92}; 92};
93 93
94/include/ "p1025twr.dtsi" 94/include/ "p1025twr.dtsi"
95/include/ "fsl/p1021si-post.dtsi" 95/include/ "p1021si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p1025twr.dtsi b/arch/powerpc/boot/dts/fsl/p1025twr.dtsi
index 8453501c256e..08816fb474f5 100644
--- a/arch/powerpc/boot/dts/p1025twr.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p1025twr.dtsi
@@ -138,6 +138,18 @@
138 }; 138 };
139 }; 139 };
140 140
141 ptp_clock@b0e00 {
142 compatible = "fsl,etsec-ptp";
143 reg = <0xb0e00 0xb0>;
144 interrupts = <68 2 0 0 69 2 0 0>;
145 fsl,tclk-period = <10>;
146 fsl,tmr-prsc = <2>;
147 fsl,tmr-add = <0xc0000021>;
148 fsl,tmr-fiper1 = <999999990>;
149 fsl,tmr-fiper2 = <99990>;
150 fsl,max-adj = <133333332>;
151 };
152
141 enet0: ethernet@b0000 { 153 enet0: ethernet@b0000 {
142 phy-handle = <&phy0>; 154 phy-handle = <&phy0>;
143 phy-connection-type = "rgmii-id"; 155 phy-connection-type = "rgmii-id";
diff --git a/arch/powerpc/boot/dts/p2020ds.dts b/arch/powerpc/boot/dts/fsl/p2020ds.dts
index 237310cc7e6c..5ba06f753bc5 100644
--- a/arch/powerpc/boot/dts/p2020ds.dts
+++ b/arch/powerpc/boot/dts/fsl/p2020ds.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p2020si-pre.dtsi" 12/include/ "p2020si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,P2020DS"; 15 model = "fsl,P2020DS";
@@ -85,5 +85,5 @@
85 * for interrupt-map & interrupt-map-mask 85 * for interrupt-map & interrupt-map-mask
86 */ 86 */
87 87
88/include/ "fsl/p2020si-post.dtsi" 88/include/ "p2020si-post.dtsi"
89/include/ "p2020ds.dtsi" 89/include/ "p2020ds.dtsi"
diff --git a/arch/powerpc/boot/dts/p2020ds.dtsi b/arch/powerpc/boot/dts/fsl/p2020ds.dtsi
index e699cf95b063..e699cf95b063 100644
--- a/arch/powerpc/boot/dts/p2020ds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p2020ds.dtsi
diff --git a/arch/powerpc/boot/dts/p2020rdb-pc.dtsi b/arch/powerpc/boot/dts/fsl/p2020rdb-pc.dtsi
index c21d1c7d16cd..ad2e242365cc 100644
--- a/arch/powerpc/boot/dts/p2020rdb-pc.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p2020rdb-pc.dtsi
@@ -215,12 +215,12 @@
215 }; 215 };
216 216
217 ptp_clock@24e00 { 217 ptp_clock@24e00 {
218 fsl,tclk-period = <5>; 218 fsl,tclk-period = <5>;
219 fsl,tmr-prsc = <200>; 219 fsl,tmr-prsc = <2>;
220 fsl,tmr-add = <0xCCCCCCCD>; 220 fsl,tmr-add = <0xaaaaaaab>;
221 fsl,tmr-fiper1 = <0x3B9AC9FB>; 221 fsl,tmr-fiper1 = <999999995>;
222 fsl,tmr-fiper2 = <0x0001869B>; 222 fsl,tmr-fiper2 = <99990>;
223 fsl,max-adj = <249999999>; 223 fsl,max-adj = <299999999>;
224 }; 224 };
225 225
226 enet0: ethernet@24000 { 226 enet0: ethernet@24000 {
diff --git a/arch/powerpc/boot/dts/p2020rdb-pc_32b.dts b/arch/powerpc/boot/dts/fsl/p2020rdb-pc_32b.dts
index 57573bd52caa..d3295c204bbf 100644
--- a/arch/powerpc/boot/dts/p2020rdb-pc_32b.dts
+++ b/arch/powerpc/boot/dts/fsl/p2020rdb-pc_32b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p2020si-pre.dtsi" 35/include/ "p2020si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P2020RDB"; 38 model = "fsl,P2020RDB";
@@ -93,4 +93,4 @@
93}; 93};
94 94
95/include/ "p2020rdb-pc.dtsi" 95/include/ "p2020rdb-pc.dtsi"
96/include/ "fsl/p2020si-post.dtsi" 96/include/ "p2020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p2020rdb-pc_36b.dts b/arch/powerpc/boot/dts/fsl/p2020rdb-pc_36b.dts
index 470247ea68b4..9307a8f41ddb 100644
--- a/arch/powerpc/boot/dts/p2020rdb-pc_36b.dts
+++ b/arch/powerpc/boot/dts/fsl/p2020rdb-pc_36b.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p2020si-pre.dtsi" 35/include/ "p2020si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P2020RDB"; 38 model = "fsl,P2020RDB";
@@ -93,4 +93,4 @@
93}; 93};
94 94
95/include/ "p2020rdb-pc.dtsi" 95/include/ "p2020rdb-pc.dtsi"
96/include/ "fsl/p2020si-post.dtsi" 96/include/ "p2020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p2020rdb.dts b/arch/powerpc/boot/dts/fsl/p2020rdb.dts
index 4d52bce1d5b0..70cf09019ce5 100644
--- a/arch/powerpc/boot/dts/p2020rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/p2020rdb.dts
@@ -9,7 +9,7 @@
9 * option) any later version. 9 * option) any later version.
10 */ 10 */
11 11
12/include/ "fsl/p2020si-pre.dtsi" 12/include/ "p2020si-pre.dtsi"
13 13
14/ { 14/ {
15 model = "fsl,P2020RDB"; 15 model = "fsl,P2020RDB";
@@ -288,4 +288,4 @@
288 }; 288 };
289}; 289};
290 290
291/include/ "fsl/p2020si-post.dtsi" 291/include/ "p2020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/p2041rdb.dts b/arch/powerpc/boot/dts/fsl/p2041rdb.dts
index d2bb0765bd5a..e9bd89406c4c 100644
--- a/arch/powerpc/boot/dts/p2041rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/p2041rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p2041si-pre.dtsi" 35/include/ "p2041si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P2041RDB"; 38 model = "fsl,P2041RDB";
@@ -247,4 +247,4 @@
247 }; 247 };
248}; 248};
249 249
250/include/ "fsl/p2041si-post.dtsi" 250/include/ "p2041si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
index 04ad177b6a12..51e975d7631a 100644
--- a/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p2041si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P2041/P2040 Silicon/SoC Device Tree Source (post include) 2 * P2041/P2040 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2011 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -430,4 +430,31 @@ crypto: crypto@300000 {
430 430
431/include/ "qoriq-qman1.dtsi" 431/include/ "qoriq-qman1.dtsi"
432/include/ "qoriq-bman1.dtsi" 432/include/ "qoriq-bman1.dtsi"
433
434/include/ "qoriq-fman-0.dtsi"
435/include/ "qoriq-fman-0-1g-0.dtsi"
436/include/ "qoriq-fman-0-1g-1.dtsi"
437/include/ "qoriq-fman-0-1g-2.dtsi"
438/include/ "qoriq-fman-0-1g-3.dtsi"
439/include/ "qoriq-fman-0-1g-4.dtsi"
440/include/ "qoriq-fman-0-10g-0.dtsi"
441 fman@400000 {
442 enet0: ethernet@e0000 {
443 };
444
445 enet1: ethernet@e2000 {
446 };
447
448 enet2: ethernet@e4000 {
449 };
450
451 enet3: ethernet@e6000 {
452 };
453
454 enet4: ethernet@e8000 {
455 };
456
457 enet5: ethernet@f0000 {
458 };
459 };
433}; 460};
diff --git a/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
index b1ea147f2995..941274c41f21 100644
--- a/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p2041si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P2041 Silicon/SoC Device Tree Source (pre include) 2 * P2041 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2011 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -72,6 +72,14 @@
72 rtic_c = &rtic_c; 72 rtic_c = &rtic_c;
73 rtic_d = &rtic_d; 73 rtic_d = &rtic_d;
74 sec_mon = &sec_mon; 74 sec_mon = &sec_mon;
75
76 fman0 = &fman0;
77 ethernet0 = &enet0;
78 ethernet1 = &enet1;
79 ethernet2 = &enet2;
80 ethernet3 = &enet3;
81 ethernet4 = &enet4;
82 ethernet5 = &enet5;
75 }; 83 };
76 84
77 cpus { 85 cpus {
diff --git a/arch/powerpc/boot/dts/p3041ds.dts b/arch/powerpc/boot/dts/fsl/p3041ds.dts
index eca6c697cfd7..f2b1d40334d4 100644
--- a/arch/powerpc/boot/dts/p3041ds.dts
+++ b/arch/powerpc/boot/dts/fsl/p3041ds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p3041si-pre.dtsi" 35/include/ "p3041si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P3041DS"; 38 model = "fsl,P3041DS";
@@ -281,4 +281,4 @@
281 }; 281 };
282}; 282};
283 283
284/include/ "fsl/p3041si-post.dtsi" 284/include/ "p3041si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
index 2cab18af6df2..187676fa8d83 100644
--- a/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p3041si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P3041 Silicon/SoC Device Tree Source (post include) 2 * P3041 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2011 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -457,4 +457,31 @@ crypto: crypto@300000 {
457 457
458/include/ "qoriq-qman1.dtsi" 458/include/ "qoriq-qman1.dtsi"
459/include/ "qoriq-bman1.dtsi" 459/include/ "qoriq-bman1.dtsi"
460
461/include/ "qoriq-fman-0.dtsi"
462/include/ "qoriq-fman-0-1g-0.dtsi"
463/include/ "qoriq-fman-0-1g-1.dtsi"
464/include/ "qoriq-fman-0-1g-2.dtsi"
465/include/ "qoriq-fman-0-1g-3.dtsi"
466/include/ "qoriq-fman-0-1g-4.dtsi"
467/include/ "qoriq-fman-0-10g-0.dtsi"
468 fman@400000 {
469 enet0: ethernet@e0000 {
470 };
471
472 enet1: ethernet@e2000 {
473 };
474
475 enet2: ethernet@e4000 {
476 };
477
478 enet3: ethernet@e6000 {
479 };
480
481 enet4: ethernet@e8000 {
482 };
483
484 enet5: ethernet@f0000 {
485 };
486 };
460}; 487};
diff --git a/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
index dc5f4b362c24..50b73e8e638f 100644
--- a/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p3041si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P3041 Silicon/SoC Device Tree Source (pre include) 2 * P3041 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2011 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -73,6 +73,14 @@
73 rtic_c = &rtic_c; 73 rtic_c = &rtic_c;
74 rtic_d = &rtic_d; 74 rtic_d = &rtic_d;
75 sec_mon = &sec_mon; 75 sec_mon = &sec_mon;
76
77 fman0 = &fman0;
78 ethernet0 = &enet0;
79 ethernet1 = &enet1;
80 ethernet2 = &enet2;
81 ethernet3 = &enet3;
82 ethernet4 = &enet4;
83 ethernet5 = &enet5;
76 }; 84 };
77 85
78 cpus { 86 cpus {
diff --git a/arch/powerpc/boot/dts/p4080ds.dts b/arch/powerpc/boot/dts/fsl/p4080ds.dts
index 4f80c9d02c27..28a55c5e7099 100644
--- a/arch/powerpc/boot/dts/p4080ds.dts
+++ b/arch/powerpc/boot/dts/fsl/p4080ds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p4080si-pre.dtsi" 35/include/ "p4080si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P4080DS"; 38 model = "fsl,P4080DS";
@@ -215,4 +215,4 @@
215 215
216}; 216};
217 217
218/include/ "fsl/p4080si-post.dtsi" 218/include/ "p4080si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
index dfc76bc41cb2..a0252085f858 100644
--- a/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p4080si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P4080/P4040 Silicon/SoC Device Tree Source (post include) 2 * P4080/P4040 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2011 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -513,4 +513,50 @@ crypto: crypto@300000 {
513 513
514/include/ "qoriq-qman1.dtsi" 514/include/ "qoriq-qman1.dtsi"
515/include/ "qoriq-bman1.dtsi" 515/include/ "qoriq-bman1.dtsi"
516
517/include/ "qoriq-fman-0.dtsi"
518/include/ "qoriq-fman-0-1g-0.dtsi"
519/include/ "qoriq-fman-0-1g-1.dtsi"
520/include/ "qoriq-fman-0-1g-2.dtsi"
521/include/ "qoriq-fman-0-1g-3.dtsi"
522/include/ "qoriq-fman-0-10g-0.dtsi"
523 fman@400000 {
524 enet0: ethernet@e0000 {
525 };
526
527 enet1: ethernet@e2000 {
528 };
529
530 enet2: ethernet@e4000 {
531 };
532
533 enet3: ethernet@e6000 {
534 };
535
536 enet4: ethernet@f0000 {
537 };
538 };
539
540/include/ "qoriq-fman-1.dtsi"
541/include/ "qoriq-fman-1-1g-0.dtsi"
542/include/ "qoriq-fman-1-1g-1.dtsi"
543/include/ "qoriq-fman-1-1g-2.dtsi"
544/include/ "qoriq-fman-1-1g-3.dtsi"
545/include/ "qoriq-fman-1-10g-0.dtsi"
546 fman@500000 {
547 enet5: ethernet@e0000 {
548 };
549
550 enet6: ethernet@e2000 {
551 };
552
553 enet7: ethernet@e4000 {
554 };
555
556 enet8: ethernet@e6000 {
557 };
558
559 enet9: ethernet@f0000 {
560 };
561 };
516}; 562};
diff --git a/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
index 38bde0958672..d56a546b73e6 100644
--- a/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p4080si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P4080/P4040 Silicon/SoC Device Tree Source (pre include) 2 * P4080/P4040 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2011 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -72,6 +72,19 @@
72 rtic_c = &rtic_c; 72 rtic_c = &rtic_c;
73 rtic_d = &rtic_d; 73 rtic_d = &rtic_d;
74 sec_mon = &sec_mon; 74 sec_mon = &sec_mon;
75
76 fman0 = &fman0;
77 fman1 = &fman1;
78 ethernet0 = &enet0;
79 ethernet1 = &enet1;
80 ethernet2 = &enet2;
81 ethernet3 = &enet3;
82 ethernet4 = &enet4;
83 ethernet5 = &enet5;
84 ethernet6 = &enet6;
85 ethernet7 = &enet7;
86 ethernet8 = &enet8;
87 ethernet9 = &enet9;
75 }; 88 };
76 89
77 cpus { 90 cpus {
diff --git a/arch/powerpc/boot/dts/p5020ds.dts b/arch/powerpc/boot/dts/fsl/p5020ds.dts
index d0309a8b9749..920dc77b9c43 100644
--- a/arch/powerpc/boot/dts/p5020ds.dts
+++ b/arch/powerpc/boot/dts/fsl/p5020ds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/p5020si-pre.dtsi" 35/include/ "p5020si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P5020DS"; 38 model = "fsl,P5020DS";
@@ -281,4 +281,4 @@
281 }; 281 };
282}; 282};
283 283
284/include/ "fsl/p5020si-post.dtsi" 284/include/ "p5020si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
index b77923ad72cf..cd008cdd2889 100644
--- a/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5020si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P5020/5010 Silicon/SoC Device Tree Source (post include) 2 * P5020/5010 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2011 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -448,4 +448,31 @@
448 raideng@320000 { 448 raideng@320000 {
449 fsl,iommu-parent = <&pamu1>; 449 fsl,iommu-parent = <&pamu1>;
450 }; 450 };
451
452/include/ "qoriq-fman-0.dtsi"
453/include/ "qoriq-fman-0-1g-0.dtsi"
454/include/ "qoriq-fman-0-1g-1.dtsi"
455/include/ "qoriq-fman-0-1g-2.dtsi"
456/include/ "qoriq-fman-0-1g-3.dtsi"
457/include/ "qoriq-fman-0-1g-4.dtsi"
458/include/ "qoriq-fman-0-10g-0.dtsi"
459 fman@400000 {
460 enet0: ethernet@e0000 {
461 };
462
463 enet1: ethernet@e2000 {
464 };
465
466 enet2: ethernet@e4000 {
467 };
468
469 enet3: ethernet@e6000 {
470 };
471
472 enet4: ethernet@e8000 {
473 };
474
475 enet5: ethernet@f0000 {
476 };
477 };
451}; 478};
diff --git a/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
index 1cc61e126e4c..bfba0b4f1cbb 100644
--- a/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5020si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P5020/P5010 Silicon/SoC Device Tree Source (pre include) 2 * P5020/P5010 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2011 Freescale Semiconductor Inc. 4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -79,6 +79,14 @@
79 raideng_jr1 = &raideng_jr1; 79 raideng_jr1 = &raideng_jr1;
80 raideng_jr2 = &raideng_jr2; 80 raideng_jr2 = &raideng_jr2;
81 raideng_jr3 = &raideng_jr3; 81 raideng_jr3 = &raideng_jr3;
82
83 fman0 = &fman0;
84 ethernet0 = &enet0;
85 ethernet1 = &enet1;
86 ethernet2 = &enet2;
87 ethernet3 = &enet3;
88 ethernet4 = &enet4;
89 ethernet5 = &enet5;
82 }; 90 };
83 91
84 cpus { 92 cpus {
diff --git a/arch/powerpc/boot/dts/p5040ds.dts b/arch/powerpc/boot/dts/fsl/p5040ds.dts
index 05168236d3ab..e169cc297ea3 100644
--- a/arch/powerpc/boot/dts/p5040ds.dts
+++ b/arch/powerpc/boot/dts/fsl/p5040ds.dts
@@ -32,7 +32,7 @@
32 * software, even if advised of the possibility of such damage. 32 * software, even if advised of the possibility of such damage.
33 */ 33 */
34 34
35/include/ "fsl/p5040si-pre.dtsi" 35/include/ "p5040si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,P5040DS"; 38 model = "fsl,P5040DS";
@@ -251,4 +251,4 @@
251 }; 251 };
252}; 252};
253 253
254/include/ "fsl/p5040si-post.dtsi" 254/include/ "p5040si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
index 6d214526b81b..2f227b1345ad 100644
--- a/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5040si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P5040 Silicon/SoC Device Tree Source (post include) 2 * P5040 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2012 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -422,4 +422,58 @@
422 422
423/include/ "qoriq-qman1.dtsi" 423/include/ "qoriq-qman1.dtsi"
424/include/ "qoriq-bman1.dtsi" 424/include/ "qoriq-bman1.dtsi"
425
426/include/ "qoriq-fman-0.dtsi"
427/include/ "qoriq-fman-0-1g-0.dtsi"
428/include/ "qoriq-fman-0-1g-1.dtsi"
429/include/ "qoriq-fman-0-1g-2.dtsi"
430/include/ "qoriq-fman-0-1g-3.dtsi"
431/include/ "qoriq-fman-0-1g-4.dtsi"
432/include/ "qoriq-fman-0-10g-0.dtsi"
433 fman@400000 {
434 enet0: ethernet@e0000 {
435 };
436
437 enet1: ethernet@e2000 {
438 };
439
440 enet2: ethernet@e4000 {
441 };
442
443 enet3: ethernet@e6000 {
444 };
445
446 enet4: ethernet@e8000 {
447 };
448
449 enet5: ethernet@f0000 {
450 };
451 };
452
453/include/ "qoriq-fman-1.dtsi"
454/include/ "qoriq-fman-1-1g-0.dtsi"
455/include/ "qoriq-fman-1-1g-1.dtsi"
456/include/ "qoriq-fman-1-1g-2.dtsi"
457/include/ "qoriq-fman-1-1g-3.dtsi"
458/include/ "qoriq-fman-1-1g-4.dtsi"
459/include/ "qoriq-fman-1-10g-0.dtsi"
460 fman@500000 {
461 enet6: ethernet@e0000 {
462 };
463
464 enet7: ethernet@e2000 {
465 };
466
467 enet8: ethernet@e4000 {
468 };
469
470 enet9: ethernet@e6000 {
471 };
472
473 enet10: ethernet@e8000 {
474 };
475
476 enet11: ethernet@f0000 {
477 };
478 };
425}; 479};
diff --git a/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi b/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
index b048a2be05a8..0659d5bb69b8 100644
--- a/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/p5040si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * P5040 Silicon/SoC Device Tree Source (pre include) 2 * P5040 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2012 Freescale Semiconductor Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -72,6 +72,21 @@
72 rtic_c = &rtic_c; 72 rtic_c = &rtic_c;
73 rtic_d = &rtic_d; 73 rtic_d = &rtic_d;
74 sec_mon = &sec_mon; 74 sec_mon = &sec_mon;
75
76 fman0 = &fman0;
77 fman1 = &fman1;
78 ethernet0 = &enet0;
79 ethernet1 = &enet1;
80 ethernet2 = &enet2;
81 ethernet3 = &enet3;
82 ethernet4 = &enet4;
83 ethernet5 = &enet5;
84 ethernet6 = &enet6;
85 ethernet7 = &enet7;
86 ethernet8 = &enet8;
87 ethernet9 = &enet9;
88 ethernet10 = &enet10;
89 ethernet11 = &enet11;
75 }; 90 };
76 91
77 cpus { 92 cpus {
diff --git a/arch/powerpc/boot/dts/ppa8548.dts b/arch/powerpc/boot/dts/fsl/ppa8548.dts
index 27b0699ee923..8f9ffbe0e4f4 100644
--- a/arch/powerpc/boot/dts/ppa8548.dts
+++ b/arch/powerpc/boot/dts/fsl/ppa8548.dts
@@ -12,7 +12,7 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14 14
15/include/ "fsl/mpc8548si-pre.dtsi" 15/include/ "mpc8548si-pre.dtsi"
16 16
17/ { 17/ {
18 model = "ppa8548"; 18 model = "ppa8548";
@@ -161,4 +161,4 @@
161 }; 161 };
162}; 162};
163 163
164/include/ "fsl/mpc8548si-post.dtsi" 164/include/ "mpc8548si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi
index 4ece1edbff63..88cd70de4f86 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-clockgen1.dtsi
@@ -32,13 +32,14 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35global-utilities@e1000 { 35clockgen: global-utilities@e1000 {
36 compatible = "fsl,qoriq-clockgen-1.0"; 36 compatible = "fsl,qoriq-clockgen-1.0";
37 ranges = <0x0 0xe1000 0x1000>; 37 ranges = <0x0 0xe1000 0x1000>;
38 reg = <0xe1000 0x1000>; 38 reg = <0xe1000 0x1000>;
39 clock-frequency = <0>; 39 clock-frequency = <0>;
40 #address-cells = <1>; 40 #address-cells = <1>;
41 #size-cells = <1>; 41 #size-cells = <1>;
42 #clock-cells = <2>;
42 43
43 sysclk: sysclk { 44 sysclk: sysclk {
44 #clock-cells = <0>; 45 #clock-cells = <0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi
index 48e0b6e4ce33..6dfd7c5357ab 100644
--- a/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi
+++ b/arch/powerpc/boot/dts/fsl/qoriq-clockgen2.dtsi
@@ -32,12 +32,13 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35global-utilities@e1000 { 35clockgen: global-utilities@e1000 {
36 compatible = "fsl,qoriq-clockgen-2.0"; 36 compatible = "fsl,qoriq-clockgen-2.0";
37 ranges = <0x0 0xe1000 0x1000>; 37 ranges = <0x0 0xe1000 0x1000>;
38 reg = <0xe1000 0x1000>; 38 reg = <0xe1000 0x1000>;
39 #address-cells = <1>; 39 #address-cells = <1>;
40 #size-cells = <1>; 40 #size-cells = <1>;
41 #clock-cells = <2>;
41 42
42 sysclk: sysclk { 43 sysclk: sysclk {
43 #clock-cells = <0>; 44 #clock-cells = <0>;
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi
new file mode 100644
index 000000000000..eb77675c255a
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-10g-0.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan 10g port #0 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x10: port@90000 {
37 cell-index = <0x10>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x90000 0x1000>;
40 };
41
42 fman0_tx_0x30: port@b0000 {
43 cell-index = <0x30>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xb0000 0x1000>;
46 };
47
48 ethernet@f0000 {
49 cell-index = <0x8>;
50 compatible = "fsl,fman-xgec";
51 reg = <0xf0000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x10 &fman0_tx_0x30>;
53 };
54
55 xmdio0: mdio@f1000 {
56 #address-cells = <1>;
57 #size-cells = <0>;
58 compatible = "fsl,fman-xmdio";
59 reg = <0xf1000 0x1000>;
60 interrupts = <101 2 0 0>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi
new file mode 100644
index 000000000000..b965bc219bae
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-0.dtsi
@@ -0,0 +1,69 @@
1/*
2 * QorIQ FMan 1g port #0 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x08: port@88000 {
37 cell-index = <0x8>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x88000 0x1000>;
40 };
41
42 fman0_tx_0x28: port@a8000 {
43 cell-index = <0x28>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xa8000 0x1000>;
46 };
47
48 ethernet@e0000 {
49 cell-index = <0>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe0000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
53 tbi-handle = <&tbi0>;
54 ptp-timer = <&ptp_timer0>;
55 };
56
57 mdio0: mdio@e1120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe1120 0xee0>;
62 interrupts = <100 2 0 0>;
63
64 tbi0: tbi-phy@8 {
65 reg = <0x8>;
66 device_type = "tbi-phy";
67 };
68 };
69};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi
new file mode 100644
index 000000000000..9eb6e6dd7cf9
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-1.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #1 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x09: port@89000 {
37 cell-index = <0x9>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x89000 0x1000>;
40 };
41
42 fman0_tx_0x29: port@a9000 {
43 cell-index = <0x29>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xa9000 0x1000>;
46 };
47
48 ethernet@e2000 {
49 cell-index = <1>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe2000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
53 tbi-handle = <&tbi1>;
54 ptp-timer = <&ptp_timer0>;
55 };
56
57 mdio@e3120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe3120 0xee0>;
62
63 tbi1: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi
new file mode 100644
index 000000000000..092b89936743
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-2.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #2 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0a: port@8a000 {
37 cell-index = <0xa>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x8a000 0x1000>;
40 };
41
42 fman0_tx_0x2a: port@aa000 {
43 cell-index = <0x2a>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xaa000 0x1000>;
46 };
47
48 ethernet@e4000 {
49 cell-index = <2>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe4000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0a &fman0_tx_0x2a>;
53 tbi-handle = <&tbi2>;
54 ptp-timer = <&ptp_timer0>;
55 };
56
57 mdio@e5120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe5120 0xee0>;
62
63 tbi2: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi
new file mode 100644
index 000000000000..2df0dc876045
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-3.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #3 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0b: port@8b000 {
37 cell-index = <0xb>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x8b000 0x1000>;
40 };
41
42 fman0_tx_0x2b: port@ab000 {
43 cell-index = <0x2b>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xab000 0x1000>;
46 };
47
48 ethernet@e6000 {
49 cell-index = <3>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe6000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0b &fman0_tx_0x2b>;
53 tbi-handle = <&tbi3>;
54 ptp-timer = <&ptp_timer0>;
55 };
56
57 mdio@e7120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe7120 0xee0>;
62
63 tbi3: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi
new file mode 100644
index 000000000000..5fceb2438fdc
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0-1g-4.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #4 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0c: port@8c000 {
37 cell-index = <0xc>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x8c000 0x1000>;
40 };
41
42 fman0_tx_0x2c: port@ac000 {
43 cell-index = <0x2c>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xac000 0x1000>;
46 };
47
48 ethernet@e8000 {
49 cell-index = <4>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe8000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
53 tbi-handle = <&tbi4>;
54 ptp-timer = <&ptp_timer0>;
55 };
56
57 mdio@e9120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe9120 0xee0>;
62
63 tbi4: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi
new file mode 100644
index 000000000000..abd01d466de4
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-0.dtsi
@@ -0,0 +1,101 @@
1/*
2 * QorIQ FMan device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman0: fman@400000 {
36 #address-cells = <1>;
37 #size-cells = <1>;
38 cell-index = <0>;
39 compatible = "fsl,fman";
40 ranges = <0 0x400000 0x100000>;
41 reg = <0x400000 0x100000>;
42 interrupts = <96 2 0 0>, <16 2 1 1>;
43 clocks = <&clockgen 3 0>;
44 clock-names = "fmanclk";
45 fsl,qman-channel-range = <0x40 0xc>;
46
47 muram@0 {
48 compatible = "fsl,fman-muram";
49 reg = <0x0 0x28000>;
50 };
51
52 fman0_oh_0x1: port@81000 {
53 cell-index = <0x1>;
54 compatible = "fsl,fman-v2-port-oh";
55 reg = <0x81000 0x1000>;
56 };
57
58 fman0_oh_0x2: port@82000 {
59 cell-index = <0x2>;
60 compatible = "fsl,fman-v2-port-oh";
61 reg = <0x82000 0x1000>;
62 };
63
64 fman0_oh_0x3: port@83000 {
65 cell-index = <0x3>;
66 compatible = "fsl,fman-v2-port-oh";
67 reg = <0x83000 0x1000>;
68 };
69
70 fman0_oh_0x4: port@84000 {
71 cell-index = <0x4>;
72 compatible = "fsl,fman-v2-port-oh";
73 reg = <0x84000 0x1000>;
74 };
75
76 fman0_oh_0x5: port@85000 {
77 cell-index = <0x5>;
78 compatible = "fsl,fman-v2-port-oh";
79 reg = <0x85000 0x1000>;
80 status = "disabled";
81 };
82
83 fman0_oh_0x6: port@86000 {
84 cell-index = <0x6>;
85 compatible = "fsl,fman-v2-port-oh";
86 reg = <0x86000 0x1000>;
87 status = "disabled";
88 };
89
90 fman0_oh_0x7: port@87000 {
91 cell-index = <0x7>;
92 compatible = "fsl,fman-v2-port-oh";
93 reg = <0x87000 0x1000>;
94 status = "disabled";
95 };
96
97 ptp_timer0: ptp-timer@fe000 {
98 compatible = "fsl,fman-ptp-timer";
99 reg = <0xfe000 0x1000>;
100 };
101};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi
new file mode 100644
index 000000000000..83ae87b69d92
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-10g-0.dtsi
@@ -0,0 +1,61 @@
1/*
2 * QorIQ FMan 10g port #0 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x10: port@90000 {
37 cell-index = <0x10>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x90000 0x1000>;
40 };
41
42 fman1_tx_0x30: port@b0000 {
43 cell-index = <0x30>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xb0000 0x1000>;
46 };
47
48 ethernet@f0000 {
49 cell-index = <0x8>;
50 compatible = "fsl,fman-xgec";
51 reg = <0xf0000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
53 };
54
55 mdio@f1000 {
56 #address-cells = <1>;
57 #size-cells = <0>;
58 compatible = "fsl,fman-xmdio";
59 reg = <0xf1000 0x1000>;
60 };
61};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi
new file mode 100644
index 000000000000..b0f0e36a4eac
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-0.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #0 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x08: port@88000 {
37 cell-index = <0x8>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x88000 0x1000>;
40 };
41
42 fman1_tx_0x28: port@a8000 {
43 cell-index = <0x28>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xa8000 0x1000>;
46 };
47
48 ethernet@e0000 {
49 cell-index = <0>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe0000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x08 &fman1_tx_0x28>;
53 tbi-handle = <&tbi5>;
54 ptp-timer = <&ptp_timer1>;
55 };
56
57 mdio@e1120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe1120 0xee0>;
62
63 tbi5: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi
new file mode 100644
index 000000000000..a3a79f8552a3
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-1.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #1 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x09: port@89000 {
37 cell-index = <0x9>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x89000 0x1000>;
40 };
41
42 fman1_tx_0x29: port@a9000 {
43 cell-index = <0x29>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xa9000 0x1000>;
46 };
47
48 ethernet@e2000 {
49 cell-index = <1>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe2000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x09 &fman1_tx_0x29>;
53 tbi-handle = <&tbi6>;
54 ptp-timer = <&ptp_timer1>;
55 };
56
57 mdio@e3120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe3120 0xee0>;
62
63 tbi6: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi
new file mode 100644
index 000000000000..96a69a84b8a8
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-2.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #2 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0a: port@8a000 {
37 cell-index = <0xa>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x8a000 0x1000>;
40 };
41
42 fman1_tx_0x2a: port@aa000 {
43 cell-index = <0x2a>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xaa000 0x1000>;
46 };
47
48 ethernet@e4000 {
49 cell-index = <2>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe4000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0a &fman1_tx_0x2a>;
53 tbi-handle = <&tbi7>;
54 ptp-timer = <&ptp_timer1>;
55 };
56
57 mdio@e5120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe5120 0xee0>;
62
63 tbi7: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi
new file mode 100644
index 000000000000..7405d1940133
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-3.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #3 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0b: port@8b000 {
37 cell-index = <0xb>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x8b000 0x1000>;
40 };
41
42 fman1_tx_0x2b: port@ab000 {
43 cell-index = <0x2b>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xab000 0x1000>;
46 };
47
48 ethernet@e6000 {
49 cell-index = <3>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe6000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0b &fman1_tx_0x2b>;
53 tbi-handle = <&tbi8>;
54 ptp-timer = <&ptp_timer1>;
55 };
56
57 mdio@e7120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe7120 0xee0>;
62
63 tbi8: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi
new file mode 100644
index 000000000000..f49ad69e5212
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1-1g-4.dtsi
@@ -0,0 +1,68 @@
1/*
2 * QorIQ FMan 1g port #4 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0c: port@8c000 {
37 cell-index = <0xc>;
38 compatible = "fsl,fman-v2-port-rx";
39 reg = <0x8c000 0x1000>;
40 };
41
42 fman1_tx_0x2c: port@ac000 {
43 cell-index = <0x2c>;
44 compatible = "fsl,fman-v2-port-tx";
45 reg = <0xac000 0x1000>;
46 };
47
48 ethernet@e8000 {
49 cell-index = <4>;
50 compatible = "fsl,fman-dtsec";
51 reg = <0xe8000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0c &fman1_tx_0x2c>;
53 tbi-handle = <&tbi9>;
54 ptp-timer = <&ptp_timer1>;
55 };
56
57 mdio@e9120 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-mdio";
61 reg = <0xe9120 0xee0>;
62
63 tbi9: tbi-phy@8 {
64 reg = <0x8>;
65 device_type = "tbi-phy";
66 };
67 };
68};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi
new file mode 100644
index 000000000000..debea75fd3f0
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman-1.dtsi
@@ -0,0 +1,101 @@
1/*
2 * QorIQ FMan device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2011 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman1: fman@500000 {
36 #address-cells = <1>;
37 #size-cells = <1>;
38 cell-index = <1>;
39 compatible = "fsl,fman";
40 ranges = <0 0x500000 0x100000>;
41 reg = <0x500000 0x100000>;
42 interrupts = <97 2 0 0>, <16 2 1 0>;
43 clocks = <&clockgen 3 1>;
44 clock-names = "fmanclk";
45 fsl,qman-channel-range = <0x60 0xc>;
46
47 muram@0 {
48 compatible = "fsl,fman-muram";
49 reg = <0x0 0x28000>;
50 };
51
52 fman1_oh_0x1: port@81000 {
53 cell-index = <0x1>;
54 compatible = "fsl,fman-v2-port-oh";
55 reg = <0x81000 0x1000>;
56 };
57
58 fman1_oh_0x2: port@82000 {
59 cell-index = <0x2>;
60 compatible = "fsl,fman-v2-port-oh";
61 reg = <0x82000 0x1000>;
62 };
63
64 fman1_oh_0x3: port@83000 {
65 cell-index = <0x3>;
66 compatible = "fsl,fman-v2-port-oh";
67 reg = <0x83000 0x1000>;
68 };
69
70 fman1_oh_0x4: port@84000 {
71 cell-index = <0x4>;
72 compatible = "fsl,fman-v2-port-oh";
73 reg = <0x84000 0x1000>;
74 };
75
76 fman1_oh_0x5: port@85000 {
77 cell-index = <0x5>;
78 compatible = "fsl,fman-v2-port-oh";
79 reg = <0x85000 0x1000>;
80 status = "disabled";
81 };
82
83 fman1_oh_0x6: port@86000 {
84 cell-index = <0x6>;
85 compatible = "fsl,fman-v2-port-oh";
86 reg = <0x86000 0x1000>;
87 status = "disabled";
88 };
89
90 fman1_oh_0x7: port@87000 {
91 cell-index = <0x7>;
92 compatible = "fsl,fman-v2-port-oh";
93 reg = <0x87000 0x1000>;
94 status = "disabled";
95 };
96
97 ptp_timer1: ptp-timer@fe000 {
98 compatible = "fsl,fman-ptp-timer";
99 reg = <0xfe000 0x1000>;
100 };
101};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
new file mode 100644
index 000000000000..2e441fab6d8f
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0-best-effort.dtsi
@@ -0,0 +1,66 @@
1/*
2 * QorIQ FMan v3 1g port #0 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x08: port@88000 {
37 cell-index = <0x8>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x88000 0x1000>;
40 fsl,fman-10g-port;
41 fsl,fman-best-effort-port;
42 };
43
44 fman0_tx_0x28: port@a8000 {
45 cell-index = <0x28>;
46 compatible = "fsl,fman-v3-port-tx";
47 reg = <0xa8000 0x1000>;
48 fsl,fman-10g-port;
49 fsl,fman-best-effort-port;
50 };
51
52 ethernet@e0000 {
53 cell-index = <0>;
54 compatible = "fsl,fman-memac";
55 reg = <0xe0000 0x1000>;
56 fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
57 ptp-timer = <&ptp_timer0>;
58 };
59
60 mdio@e1000 {
61 #address-cells = <1>;
62 #size-cells = <0>;
63 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
64 reg = <0xe1000 0x1000>;
65 };
66};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
new file mode 100644
index 000000000000..0b8f87f79d15
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-0.dtsi
@@ -0,0 +1,63 @@
1/*
2 * QorIQ FMan v3 10g port #0 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x10: port@90000 {
37 cell-index = <0x10>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x90000 0x1000>;
40 fsl,fman-10g-port;
41 };
42
43 fman0_tx_0x30: port@b0000 {
44 cell-index = <0x30>;
45 compatible = "fsl,fman-v3-port-tx";
46 reg = <0xb0000 0x1000>;
47 fsl,fman-10g-port;
48 };
49
50 ethernet@f0000 {
51 cell-index = <0x8>;
52 compatible = "fsl,fman-memac";
53 reg = <0xf0000 0x1000>;
54 fsl,fman-ports = <&fman0_rx_0x10 &fman0_tx_0x30>;
55 };
56
57 mdio@f1000 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
61 reg = <0xf1000 0x1000>;
62 };
63};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
new file mode 100644
index 000000000000..ba6f2275d3f6
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1-best-effort.dtsi
@@ -0,0 +1,66 @@
1/*
2 * QorIQ FMan v3 1g port #1 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x09: port@89000 {
37 cell-index = <0x9>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x89000 0x1000>;
40 fsl,fman-10g-port;
41 fsl,fman-best-effort-port;
42 };
43
44 fman0_tx_0x29: port@a9000 {
45 cell-index = <0x29>;
46 compatible = "fsl,fman-v3-port-tx";
47 reg = <0xa9000 0x1000>;
48 fsl,fman-10g-port;
49 fsl,fman-best-effort-port;
50 };
51
52 ethernet@e2000 {
53 cell-index = <1>;
54 compatible = "fsl,fman-memac";
55 reg = <0xe2000 0x1000>;
56 fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
57 ptp-timer = <&ptp_timer0>;
58 };
59
60 mdio@e3000 {
61 #address-cells = <1>;
62 #size-cells = <0>;
63 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
64 reg = <0xe3000 0x1000>;
65 };
66};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
new file mode 100644
index 000000000000..886003805592
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-10g-1.dtsi
@@ -0,0 +1,63 @@
1/*
2 * QorIQ FMan v3 10g port #1 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x11: port@91000 {
37 cell-index = <0x11>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x91000 0x1000>;
40 fsl,fman-10g-port;
41 };
42
43 fman0_tx_0x31: port@b1000 {
44 cell-index = <0x31>;
45 compatible = "fsl,fman-v3-port-tx";
46 reg = <0xb1000 0x1000>;
47 fsl,fman-10g-port;
48 };
49
50 ethernet@f2000 {
51 cell-index = <0x9>;
52 compatible = "fsl,fman-memac";
53 reg = <0xf2000 0x1000>;
54 fsl,fman-ports = <&fman0_rx_0x11 &fman0_tx_0x31>;
55 };
56
57 mdio@f3000 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
61 reg = <0xf3000 0x1000>;
62 };
63};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
new file mode 100644
index 000000000000..ace9c13648ce
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-0.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #0 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x08: port@88000 {
37 cell-index = <0x8>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x88000 0x1000>;
40 };
41
42 fman0_tx_0x28: port@a8000 {
43 cell-index = <0x28>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xa8000 0x1000>;
46 };
47
48 ethernet@e0000 {
49 cell-index = <0>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe0000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x08 &fman0_tx_0x28>;
53 ptp-timer = <&ptp_timer0>;
54 };
55
56 mdio@e1000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe1000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
new file mode 100644
index 000000000000..a4fc28654b31
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-1.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #1 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x09: port@89000 {
37 cell-index = <0x9>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x89000 0x1000>;
40 };
41
42 fman0_tx_0x29: port@a9000 {
43 cell-index = <0x29>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xa9000 0x1000>;
46 };
47
48 ethernet@e2000 {
49 cell-index = <1>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe2000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x09 &fman0_tx_0x29>;
53 ptp-timer = <&ptp_timer0>;
54 };
55
56 mdio@e3000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe3000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
new file mode 100644
index 000000000000..78596faadf99
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-2.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #2 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0a: port@8a000 {
37 cell-index = <0xa>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8a000 0x1000>;
40 };
41
42 fman0_tx_0x2a: port@aa000 {
43 cell-index = <0x2a>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xaa000 0x1000>;
46 };
47
48 ethernet@e4000 {
49 cell-index = <2>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe4000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0a &fman0_tx_0x2a>;
53 ptp-timer = <&ptp_timer0>;
54 };
55
56 mdio@e5000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe5000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
new file mode 100644
index 000000000000..af93abd86d78
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-3.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #3 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0b: port@8b000 {
37 cell-index = <0xb>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8b000 0x1000>;
40 };
41
42 fman0_tx_0x2b: port@ab000 {
43 cell-index = <0x2b>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xab000 0x1000>;
46 };
47
48 ethernet@e6000 {
49 cell-index = <3>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe6000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0b &fman0_tx_0x2b>;
53 ptp-timer = <&ptp_timer0>;
54 };
55
56 mdio@e7000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe7000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
new file mode 100644
index 000000000000..97cffd74bf3d
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-4.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #4 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0c: port@8c000 {
37 cell-index = <0xc>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8c000 0x1000>;
40 };
41
42 fman0_tx_0x2c: port@ac000 {
43 cell-index = <0x2c>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xac000 0x1000>;
46 };
47
48 ethernet@e8000 {
49 cell-index = <4>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe8000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0c &fman0_tx_0x2c>;
53 ptp-timer = <&ptp_timer0>;
54 };
55
56 mdio@e9000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe9000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
new file mode 100644
index 000000000000..232c5c277bdb
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0-1g-5.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #5 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@400000 {
36 fman0_rx_0x0d: port@8d000 {
37 cell-index = <0xd>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8d000 0x1000>;
40 };
41
42 fman0_tx_0x2d: port@ad000 {
43 cell-index = <0x2d>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xad000 0x1000>;
46 };
47
48 ethernet@ea000 {
49 cell-index = <5>;
50 compatible = "fsl,fman-memac";
51 reg = <0xea000 0x1000>;
52 fsl,fman-ports = <&fman0_rx_0x0d &fman0_tx_0x2d>;
53 ptp-timer = <&ptp_timer0>;
54 };
55
56 mdio@eb000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xeb000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi
new file mode 100644
index 000000000000..3a20e0d1a6d2
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-0.dtsi
@@ -0,0 +1,106 @@
1/*
2 * QorIQ FMan v3 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman0: fman@400000 {
36 #address-cells = <1>;
37 #size-cells = <1>;
38 cell-index = <0>;
39 compatible = "fsl,fman";
40 ranges = <0 0x400000 0x100000>;
41 reg = <0x400000 0x100000>;
42 interrupts = <96 2 0 0>, <16 2 1 1>;
43 clocks = <&clockgen 3 0>;
44 clock-names = "fmanclk";
45 fsl,qman-channel-range = <0x800 0x10>;
46
47 muram@0 {
48 compatible = "fsl,fman-muram";
49 reg = <0x0 0x60000>;
50 };
51
52 fman0_oh_0x2: port@82000 {
53 cell-index = <0x2>;
54 compatible = "fsl,fman-v3-port-oh";
55 reg = <0x82000 0x1000>;
56 };
57
58 fman0_oh_0x3: port@83000 {
59 cell-index = <0x3>;
60 compatible = "fsl,fman-v3-port-oh";
61 reg = <0x83000 0x1000>;
62 };
63
64 fman0_oh_0x4: port@84000 {
65 cell-index = <0x4>;
66 compatible = "fsl,fman-v3-port-oh";
67 reg = <0x84000 0x1000>;
68 };
69
70 fman0_oh_0x5: port@85000 {
71 cell-index = <0x5>;
72 compatible = "fsl,fman-v3-port-oh";
73 reg = <0x85000 0x1000>;
74 };
75
76 fman0_oh_0x6: port@86000 {
77 cell-index = <0x6>;
78 compatible = "fsl,fman-v3-port-oh";
79 reg = <0x86000 0x1000>;
80 };
81
82 fman0_oh_0x7: port@87000 {
83 cell-index = <0x7>;
84 compatible = "fsl,fman-v3-port-oh";
85 reg = <0x87000 0x1000>;
86 };
87
88 mdio0: mdio@fc000 {
89 #address-cells = <1>;
90 #size-cells = <0>;
91 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
92 reg = <0xfc000 0x1000>;
93 };
94
95 xmdio0: mdio@fd000 {
96 #address-cells = <1>;
97 #size-cells = <0>;
98 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
99 reg = <0xfd000 0x1000>;
100 };
101
102 ptp_timer0: ptp-timer@fe000 {
103 compatible = "fsl,fman-ptp-timer";
104 reg = <0xfe000 0x1000>;
105 };
106};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
new file mode 100644
index 000000000000..89d64ee282b0
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-0.dtsi
@@ -0,0 +1,63 @@
1/*
2 * QorIQ FMan v3 10g port #0 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x10: port@90000 {
37 cell-index = <0x10>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x90000 0x1000>;
40 fsl,fman-10g-port;
41 };
42
43 fman1_tx_0x30: port@b0000 {
44 cell-index = <0x30>;
45 compatible = "fsl,fman-v3-port-tx";
46 reg = <0xb0000 0x1000>;
47 fsl,fman-10g-port;
48 };
49
50 ethernet@f0000 {
51 cell-index = <0x8>;
52 compatible = "fsl,fman-memac";
53 reg = <0xf0000 0x1000>;
54 fsl,fman-ports = <&fman1_rx_0x10 &fman1_tx_0x30>;
55 };
56
57 mdio@f1000 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
61 reg = <0xf1000 0x1000>;
62 };
63};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
new file mode 100644
index 000000000000..7fa9260889c6
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-10g-1.dtsi
@@ -0,0 +1,63 @@
1/*
2 * QorIQ FMan v3 10g port #1 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x11: port@91000 {
37 cell-index = <0x11>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x91000 0x1000>;
40 fsl,fman-10g-port;
41 };
42
43 fman1_tx_0x31: port@b1000 {
44 cell-index = <0x31>;
45 compatible = "fsl,fman-v3-port-tx";
46 reg = <0xb1000 0x1000>;
47 fsl,fman-10g-port;
48 };
49
50 ethernet@f2000 {
51 cell-index = <0x9>;
52 compatible = "fsl,fman-memac";
53 reg = <0xf2000 0x1000>;
54 fsl,fman-ports = <&fman1_rx_0x11 &fman1_tx_0x31>;
55 };
56
57 mdio@f3000 {
58 #address-cells = <1>;
59 #size-cells = <0>;
60 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
61 reg = <0xf3000 0x1000>;
62 };
63};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
new file mode 100644
index 000000000000..3d236662bf07
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-0.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #0 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x08: port@88000 {
37 cell-index = <0x8>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x88000 0x1000>;
40 };
41
42 fman1_tx_0x28: port@a8000 {
43 cell-index = <0x28>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xa8000 0x1000>;
46 };
47
48 ethernet@e0000 {
49 cell-index = <0>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe0000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x08 &fman1_tx_0x28>;
53 ptp-timer = <&ptp_timer1>;
54 };
55
56 mdio@e1000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe1000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
new file mode 100644
index 000000000000..97dc2eedd462
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-1.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #1 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x09: port@89000 {
37 cell-index = <0x9>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x89000 0x1000>;
40 };
41
42 fman1_tx_0x29: port@a9000 {
43 cell-index = <0x29>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xa9000 0x1000>;
46 };
47
48 ethernet@e2000 {
49 cell-index = <1>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe2000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x09 &fman1_tx_0x29>;
53 ptp-timer = <&ptp_timer1>;
54 };
55
56 mdio@e3000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe3000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
new file mode 100644
index 000000000000..f084dd2f0bec
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-2.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #2 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0a: port@8a000 {
37 cell-index = <0xa>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8a000 0x1000>;
40 };
41
42 fman1_tx_0x2a: port@aa000 {
43 cell-index = <0x2a>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xaa000 0x1000>;
46 };
47
48 ethernet@e4000 {
49 cell-index = <2>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe4000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0a &fman1_tx_0x2a>;
53 ptp-timer = <&ptp_timer1>;
54 };
55
56 mdio@e5000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe5000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
new file mode 100644
index 000000000000..bb627b3bf3db
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-3.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #3 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0b: port@8b000 {
37 cell-index = <0xb>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8b000 0x1000>;
40 };
41
42 fman1_tx_0x2b: port@ab000 {
43 cell-index = <0x2b>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xab000 0x1000>;
46 };
47
48 ethernet@e6000 {
49 cell-index = <3>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe6000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0b &fman1_tx_0x2b>;
53 ptp-timer = <&ptp_timer1>;
54 };
55
56 mdio@e7000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe7000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
new file mode 100644
index 000000000000..821ed12225d4
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-4.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #4 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0c: port@8c000 {
37 cell-index = <0xc>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8c000 0x1000>;
40 };
41
42 fman1_tx_0x2c: port@ac000 {
43 cell-index = <0x2c>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xac000 0x1000>;
46 };
47
48 ethernet@e8000 {
49 cell-index = <4>;
50 compatible = "fsl,fman-memac";
51 reg = <0xe8000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0c &fman1_tx_0x2c>;
53 ptp-timer = <&ptp_timer1>;
54 };
55
56 mdio@e9000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xe9000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
new file mode 100644
index 000000000000..e245f1a1e42a
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1-1g-5.dtsi
@@ -0,0 +1,62 @@
1/*
2 * QorIQ FMan v3 1g port #5 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman@500000 {
36 fman1_rx_0x0d: port@8d000 {
37 cell-index = <0xd>;
38 compatible = "fsl,fman-v3-port-rx";
39 reg = <0x8d000 0x1000>;
40 };
41
42 fman1_tx_0x2d: port@ad000 {
43 cell-index = <0x2d>;
44 compatible = "fsl,fman-v3-port-tx";
45 reg = <0xad000 0x1000>;
46 };
47
48 ethernet@ea000 {
49 cell-index = <5>;
50 compatible = "fsl,fman-memac";
51 reg = <0xea000 0x1000>;
52 fsl,fman-ports = <&fman1_rx_0x0d &fman1_tx_0x2d>;
53 ptp-timer = <&ptp_timer1>;
54 };
55
56 mdio@eb000 {
57 #address-cells = <1>;
58 #size-cells = <0>;
59 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
60 reg = <0xeb000 0x1000>;
61 };
62};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi
new file mode 100644
index 000000000000..82750ac944c7
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3-1.dtsi
@@ -0,0 +1,106 @@
1/*
2 * QorIQ FMan v3 device tree stub [ controller @ offset 0x500000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman1: fman@500000 {
36 #address-cells = <1>;
37 #size-cells = <1>;
38 cell-index = <1>;
39 compatible = "fsl,fman";
40 ranges = <0 0x500000 0x100000>;
41 reg = <0x500000 0x100000>;
42 interrupts = <97 2 0 0>, <16 2 1 0>;
43 clocks = <&clockgen 3 1>;
44 clock-names = "fmanclk";
45 fsl,qman-channel-range = <0x820 0x10>;
46
47 muram@0 {
48 compatible = "fsl,fman-muram";
49 reg = <0x0 0x60000>;
50 };
51
52 fman1_oh_0x2: port@82000 {
53 cell-index = <0x2>;
54 compatible = "fsl,fman-v3-port-oh";
55 reg = <0x82000 0x1000>;
56 };
57
58 fman1_oh_0x3: port@83000 {
59 cell-index = <0x3>;
60 compatible = "fsl,fman-v3-port-oh";
61 reg = <0x83000 0x1000>;
62 };
63
64 fman1_oh_0x4: port@84000 {
65 cell-index = <0x4>;
66 compatible = "fsl,fman-v3-port-oh";
67 reg = <0x84000 0x1000>;
68 };
69
70 fman1_oh_0x5: port@85000 {
71 cell-index = <0x5>;
72 compatible = "fsl,fman-v3-port-oh";
73 reg = <0x85000 0x1000>;
74 };
75
76 fman1_oh_0x6: port@86000 {
77 cell-index = <0x6>;
78 compatible = "fsl,fman-v3-port-oh";
79 reg = <0x86000 0x1000>;
80 };
81
82 fman1_oh_0x7: port@87000 {
83 cell-index = <0x7>;
84 compatible = "fsl,fman-v3-port-oh";
85 reg = <0x87000 0x1000>;
86 };
87
88 mdio1: mdio@fc000 {
89 #address-cells = <1>;
90 #size-cells = <0>;
91 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
92 reg = <0xfc000 0x1000>;
93 };
94
95 mdio@fd000 {
96 #address-cells = <1>;
97 #size-cells = <0>;
98 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
99 reg = <0xfd000 0x1000>;
100 };
101
102 ptp_timer1: ptp-timer@fe000 {
103 compatible = "fsl,fman-ptp-timer";
104 reg = <0xfe000 0x1000>;
105 };
106};
diff --git a/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
new file mode 100644
index 000000000000..7f60b6060176
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-fman3l-0.dtsi
@@ -0,0 +1,94 @@
1/*
2 * QorIQ FMan v3 device tree stub [ controller @ offset 0x400000 ]
3 *
4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of Freescale Semiconductor nor the
14 * names of its contributors may be used to endorse or promote products
15 * derived from this software without specific prior written permission.
16 *
17 *
18 * ALTERNATIVELY, this software may be distributed under the terms of the
19 * GNU General Public License ("GPL") as published by the Free Software
20 * Foundation, either version 2 of that License or (at your option) any
21 * later version.
22 *
23 * THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
24 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 * DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
27 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
30 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */
34
35fman0: fman@400000 {
36 #address-cells = <1>;
37 #size-cells = <1>;
38 cell-index = <0>;
39 compatible = "fsl,fman";
40 ranges = <0 0x400000 0x100000>;
41 reg = <0x400000 0x100000>;
42 interrupts = <96 2 0 0>, <16 2 1 1>;
43 clocks = <&clockgen 3 0>;
44 clock-names = "fmanclk";
45 fsl,qman-channel-range = <0x800 0x10>;
46
47 muram@0 {
48 compatible = "fsl,fman-muram";
49 reg = <0x0 0x30000>;
50 };
51
52 fman0_oh_0x2: port@82000 {
53 cell-index = <0x2>;
54 compatible = "fsl,fman-v3-port-oh";
55 reg = <0x82000 0x1000>;
56 };
57
58 fman0_oh_0x3: port@83000 {
59 cell-index = <0x3>;
60 compatible = "fsl,fman-v3-port-oh";
61 reg = <0x83000 0x1000>;
62 };
63
64 fman0_oh_0x4: port@84000 {
65 cell-index = <0x4>;
66 compatible = "fsl,fman-v3-port-oh";
67 reg = <0x84000 0x1000>;
68 };
69
70 fman0_oh_0x5: port@85000 {
71 cell-index = <0x5>;
72 compatible = "fsl,fman-v3-port-oh";
73 reg = <0x85000 0x1000>;
74 };
75
76 mdio0: mdio@fc000 {
77 #address-cells = <1>;
78 #size-cells = <0>;
79 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
80 reg = <0xfc000 0x1000>;
81 };
82
83 xmdio0: mdio@fd000 {
84 #address-cells = <1>;
85 #size-cells = <0>;
86 compatible = "fsl,fman-memac-mdio", "fsl,fman-xmdio";
87 reg = <0xfd000 0x1000>;
88 };
89
90 ptp_timer0: ptp-timer@fe000 {
91 compatible = "fsl,fman-ptp-timer";
92 reg = <0xfe000 0x1000>;
93 };
94};
diff --git a/arch/powerpc/boot/dts/t1023rdb.dts b/arch/powerpc/boot/dts/fsl/t1023rdb.dts
index d3fa8294cd49..2b2fff4a12a2 100644
--- a/arch/powerpc/boot/dts/t1023rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1023rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t102xsi-pre.dtsi" 35/include/ "t102xsi-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,T1023RDB"; 38 model = "fsl,T1023RDB";
@@ -159,4 +159,4 @@
159 }; 159 };
160}; 160};
161 161
162/include/ "fsl/t1023si-post.dtsi" 162/include/ "t1023si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi
index df1f068a5376..518ddaa8da2d 100644
--- a/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi
@@ -327,4 +327,23 @@
327 }; 327 };
328 328
329/include/ "qoriq-sec5.0-0.dtsi" 329/include/ "qoriq-sec5.0-0.dtsi"
330
331/include/ "qoriq-fman3l-0.dtsi"
332/include/ "qoriq-fman3-0-10g-0-best-effort.dtsi"
333/include/ "qoriq-fman3-0-1g-1.dtsi"
334/include/ "qoriq-fman3-0-1g-2.dtsi"
335/include/ "qoriq-fman3-0-1g-3.dtsi"
336 fman@400000 {
337 enet0: ethernet@e0000 {
338 };
339
340 enet1: ethernet@e2000 {
341 };
342
343 enet2: ethernet@e4000 {
344 };
345
346 enet3: ethernet@e6000 {
347 };
348 };
330}; 349};
diff --git a/arch/powerpc/boot/dts/t1024qds.dts b/arch/powerpc/boot/dts/fsl/t1024qds.dts
index f31fabb383b9..43cd5b50cd0a 100644
--- a/arch/powerpc/boot/dts/t1024qds.dts
+++ b/arch/powerpc/boot/dts/fsl/t1024qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t102xsi-pre.dtsi" 35/include/ "t102xsi-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,T1024QDS"; 38 model = "fsl,T1024QDS";
@@ -248,4 +248,4 @@
248 }; 248 };
249}; 249};
250 250
251/include/ "fsl/t1024si-post.dtsi" 251/include/ "t1024si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t1024rdb.dts b/arch/powerpc/boot/dts/fsl/t1024rdb.dts
index bf05e324fda2..429d8c73650a 100644
--- a/arch/powerpc/boot/dts/t1024rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1024rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t102xsi-pre.dtsi" 35/include/ "t102xsi-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,T1024RDB"; 38 model = "fsl,T1024RDB";
@@ -188,4 +188,4 @@
188 }; 188 };
189}; 189};
190 190
191/include/ "fsl/t1024si-post.dtsi" 191/include/ "t1024si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi b/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi
index 1f1a9f8474d5..3e1528abf3f4 100644
--- a/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi
@@ -59,6 +59,12 @@
59 sdhc = &sdhc; 59 sdhc = &sdhc;
60 60
61 crypto = &crypto; 61 crypto = &crypto;
62
63 fman0 = &fman0;
64 ethernet0 = &enet0;
65 ethernet1 = &enet1;
66 ethernet2 = &enet2;
67 ethernet3 = &enet3;
62 }; 68 };
63 69
64 cpus { 70 cpus {
diff --git a/arch/powerpc/boot/dts/t1040d4rdb.dts b/arch/powerpc/boot/dts/fsl/t1040d4rdb.dts
index 2d1315a1670e..681746efd31d 100644
--- a/arch/powerpc/boot/dts/t1040d4rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1040d4rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xd4rdb.dtsi" 36/include/ "t104xd4rdb.dtsi"
37 37
38/ { 38/ {
@@ -43,4 +43,4 @@
43 interrupt-parent = <&mpic>; 43 interrupt-parent = <&mpic>;
44}; 44};
45 45
46/include/ "fsl/t1040si-post.dtsi" 46/include/ "t1040si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t1040qds.dts b/arch/powerpc/boot/dts/fsl/t1040qds.dts
index 973c29c2f56e..4d298659468c 100644
--- a/arch/powerpc/boot/dts/t1040qds.dts
+++ b/arch/powerpc/boot/dts/fsl/t1040qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xqds.dtsi" 36/include/ "t104xqds.dtsi"
37 37
38/ { 38/ {
@@ -43,4 +43,4 @@
43 interrupt-parent = <&mpic>; 43 interrupt-parent = <&mpic>;
44}; 44};
45 45
46/include/ "fsl/t1040si-post.dtsi" 46/include/ "t1040si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t1040rdb.dts b/arch/powerpc/boot/dts/fsl/t1040rdb.dts
index 79a0bed04c1a..8f9e65b47515 100644
--- a/arch/powerpc/boot/dts/t1040rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1040rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xrdb.dtsi" 36/include/ "t104xrdb.dtsi"
37 37
38/ { 38/ {
@@ -45,4 +45,4 @@
45 }; 45 };
46}; 46};
47 47
48/include/ "fsl/t1040si-post.dtsi" 48/include/ "t1040si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
index 9770d0278493..d30b3de1cfc5 100644
--- a/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t1040si-post.dtsi
@@ -547,4 +547,35 @@
547/include/ "qoriq-sec5.0-0.dtsi" 547/include/ "qoriq-sec5.0-0.dtsi"
548/include/ "qoriq-qman3.dtsi" 548/include/ "qoriq-qman3.dtsi"
549/include/ "qoriq-bman1.dtsi" 549/include/ "qoriq-bman1.dtsi"
550
551/include/ "qoriq-fman3l-0.dtsi"
552/include/ "qoriq-fman3-0-1g-0.dtsi"
553/include/ "qoriq-fman3-0-1g-1.dtsi"
554/include/ "qoriq-fman3-0-1g-2.dtsi"
555/include/ "qoriq-fman3-0-1g-3.dtsi"
556/include/ "qoriq-fman3-0-1g-4.dtsi"
557 fman@400000 {
558 enet0: ethernet@e0000 {
559 };
560
561 enet1: ethernet@e2000 {
562 };
563
564 enet2: ethernet@e4000 {
565 };
566
567 enet3: ethernet@e6000 {
568 };
569
570 enet4: ethernet@e8000 {
571 };
572
573 mdio@fc000 {
574 interrupts = <100 1 0 0>;
575 };
576
577 mdio@fd000 {
578 status = "disabled";
579 };
580 };
550}; 581};
diff --git a/arch/powerpc/boot/dts/t1042d4rdb.dts b/arch/powerpc/boot/dts/fsl/t1042d4rdb.dts
index 846f8c87e85a..b245b31b8279 100644
--- a/arch/powerpc/boot/dts/t1042d4rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1042d4rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xd4rdb.dtsi" 36/include/ "t104xd4rdb.dtsi"
37 37
38/ { 38/ {
@@ -50,4 +50,4 @@
50 }; 50 };
51}; 51};
52 52
53/include/ "fsl/t1040si-post.dtsi" 53/include/ "t1040si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t1042qds.dts b/arch/powerpc/boot/dts/fsl/t1042qds.dts
index 45bd03752154..4ab9bbe7c5c5 100644
--- a/arch/powerpc/boot/dts/t1042qds.dts
+++ b/arch/powerpc/boot/dts/fsl/t1042qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xqds.dtsi" 36/include/ "t104xqds.dtsi"
37 37
38/ { 38/ {
@@ -43,4 +43,4 @@
43 interrupt-parent = <&mpic>; 43 interrupt-parent = <&mpic>;
44}; 44};
45 45
46/include/ "fsl/t1042si-post.dtsi" 46/include/ "t1042si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t1042rdb.dts b/arch/powerpc/boot/dts/fsl/t1042rdb.dts
index 738c23790e94..67af56bc5ee9 100644
--- a/arch/powerpc/boot/dts/t1042rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t1042rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xrdb.dtsi" 36/include/ "t104xrdb.dtsi"
37 37
38/ { 38/ {
@@ -45,4 +45,4 @@
45 }; 45 };
46}; 46};
47 47
48/include/ "fsl/t1042si-post.dtsi" 48/include/ "t1042si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t1042rdb_pi.dts b/arch/powerpc/boot/dts/fsl/t1042rdb_pi.dts
index 634f751fa6d3..2f67677530a4 100644
--- a/arch/powerpc/boot/dts/t1042rdb_pi.dts
+++ b/arch/powerpc/boot/dts/fsl/t1042rdb_pi.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t104xsi-pre.dtsi" 35/include/ "t104xsi-pre.dtsi"
36/include/ "t104xrdb.dtsi" 36/include/ "t104xrdb.dtsi"
37 37
38/ { 38/ {
@@ -54,4 +54,4 @@
54 }; 54 };
55}; 55};
56 56
57/include/ "fsl/t1042si-post.dtsi" 57/include/ "t1042si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t104xd4rdb.dtsi b/arch/powerpc/boot/dts/fsl/t104xd4rdb.dtsi
index 491367bd3883..3f6d7c6a106b 100644
--- a/arch/powerpc/boot/dts/t104xd4rdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t104xd4rdb.dtsi
@@ -109,6 +109,16 @@
109 /* input clock */ 109 /* input clock */
110 spi-max-frequency = <10000000>; 110 spi-max-frequency = <10000000>;
111 }; 111 };
112 slic@1 {
113 compatible = "maxim,ds26522";
114 reg = <1>;
115 spi-max-frequency = <2000000>; /* input clock */
116 };
117 slic@2 {
118 compatible = "maxim,ds26522";
119 reg = <2>;
120 spi-max-frequency = <2000000>; /* input clock */
121 };
112 }; 122 };
113 i2c@118000 { 123 i2c@118000 {
114 hwmon@4c { 124 hwmon@4c {
diff --git a/arch/powerpc/boot/dts/t104xqds.dtsi b/arch/powerpc/boot/dts/fsl/t104xqds.dtsi
index 1498d1e4aecf..1498d1e4aecf 100644
--- a/arch/powerpc/boot/dts/t104xqds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t104xqds.dtsi
diff --git a/arch/powerpc/boot/dts/t104xrdb.dtsi b/arch/powerpc/boot/dts/fsl/t104xrdb.dtsi
index 830ea484295b..830ea484295b 100644
--- a/arch/powerpc/boot/dts/t104xrdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t104xrdb.dtsi
diff --git a/arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi b/arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi
index bbb7025ca9c2..fcfa38ae5e02 100644
--- a/arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t104xsi-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * T1040/T1042 Silicon/SoC Device Tree Source (pre include) 2 * T1040/T1042 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2013 Freescale Semiconductor Inc. 4 * Copyright 2013-2014 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -58,6 +58,13 @@
58 sdhc = &sdhc; 58 sdhc = &sdhc;
59 59
60 crypto = &crypto; 60 crypto = &crypto;
61
62 fman0 = &fman0;
63 ethernet0 = &enet0;
64 ethernet1 = &enet1;
65 ethernet2 = &enet2;
66 ethernet3 = &enet3;
67 ethernet4 = &enet4;
61 }; 68 };
62 69
63 cpus { 70 cpus {
diff --git a/arch/powerpc/boot/dts/t2080qds.dts b/arch/powerpc/boot/dts/fsl/t2080qds.dts
index aa1d6d8c169b..9c8e10fe04cb 100644
--- a/arch/powerpc/boot/dts/t2080qds.dts
+++ b/arch/powerpc/boot/dts/fsl/t2080qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t208xsi-pre.dtsi" 35/include/ "t208xsi-pre.dtsi"
36/include/ "t208xqds.dtsi" 36/include/ "t208xqds.dtsi"
37 37
38/ { 38/ {
@@ -54,4 +54,4 @@
54 }; 54 };
55}; 55};
56 56
57/include/ "fsl/t2080si-post.dtsi" 57/include/ "t2080si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t2080rdb.dts b/arch/powerpc/boot/dts/fsl/t2080rdb.dts
index e8891047600c..33205bf08919 100644
--- a/arch/powerpc/boot/dts/t2080rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t2080rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t208xsi-pre.dtsi" 35/include/ "t208xsi-pre.dtsi"
36/include/ "t208xrdb.dtsi" 36/include/ "t208xrdb.dtsi"
37 37
38/ { 38/ {
@@ -54,4 +54,4 @@
54 }; 54 };
55}; 55};
56 56
57/include/ "fsl/t2080si-post.dtsi" 57/include/ "t2080si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t2081qds.dts b/arch/powerpc/boot/dts/fsl/t2081qds.dts
index 8ec80a71e102..b81213596dbf 100644
--- a/arch/powerpc/boot/dts/t2081qds.dts
+++ b/arch/powerpc/boot/dts/fsl/t2081qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t208xsi-pre.dtsi" 35/include/ "t208xsi-pre.dtsi"
36/include/ "t208xqds.dtsi" 36/include/ "t208xqds.dtsi"
37 37
38/ { 38/ {
@@ -43,4 +43,4 @@
43 interrupt-parent = <&mpic>; 43 interrupt-parent = <&mpic>;
44}; 44};
45 45
46/include/ "fsl/t2081si-post.dtsi" 46/include/ "t2081si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi b/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi
index 32c790ae7fde..c744569a20e1 100644
--- a/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t2081si-post.dtsi
@@ -630,6 +630,49 @@
630/include/ "qoriq-qman3.dtsi" 630/include/ "qoriq-qman3.dtsi"
631/include/ "qoriq-bman1.dtsi" 631/include/ "qoriq-bman1.dtsi"
632 632
633/include/ "qoriq-fman3-0.dtsi"
634/include/ "qoriq-fman3-0-1g-0.dtsi"
635/include/ "qoriq-fman3-0-1g-1.dtsi"
636/include/ "qoriq-fman3-0-1g-2.dtsi"
637/include/ "qoriq-fman3-0-1g-3.dtsi"
638/include/ "qoriq-fman3-0-1g-4.dtsi"
639/include/ "qoriq-fman3-0-1g-5.dtsi"
640/include/ "qoriq-fman3-0-10g-0.dtsi"
641/include/ "qoriq-fman3-0-10g-1.dtsi"
642 fman@400000 {
643 enet0: ethernet@e0000 {
644 };
645
646 enet1: ethernet@e2000 {
647 };
648
649 enet2: ethernet@e4000 {
650 };
651
652 enet3: ethernet@e6000 {
653 };
654
655 enet4: ethernet@e8000 {
656 };
657
658 enet5: ethernet@ea000 {
659 };
660
661 enet6: ethernet@f0000 {
662 };
663
664 enet7: ethernet@f2000 {
665 };
666
667 mdio@fc000 {
668 interrupts = <100 1 0 0>;
669 };
670
671 mdio@fd000 {
672 interrupts = <101 1 0 0>;
673 };
674 };
675
633 L2_1: l2-cache-controller@c20000 { 676 L2_1: l2-cache-controller@c20000 {
634 /* Cluster 0 L2 cache */ 677 /* Cluster 0 L2 cache */
635 compatible = "fsl,t2080-l2-cache-controller"; 678 compatible = "fsl,t2080-l2-cache-controller";
diff --git a/arch/powerpc/boot/dts/t208xqds.dtsi b/arch/powerpc/boot/dts/fsl/t208xqds.dtsi
index 869f9159b4d1..869f9159b4d1 100644
--- a/arch/powerpc/boot/dts/t208xqds.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t208xqds.dtsi
diff --git a/arch/powerpc/boot/dts/t208xrdb.dtsi b/arch/powerpc/boot/dts/fsl/t208xrdb.dtsi
index 693d2a8fa01c..693d2a8fa01c 100644
--- a/arch/powerpc/boot/dts/t208xrdb.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t208xrdb.dtsi
diff --git a/arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi b/arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi
index e71ceb0e1100..c2e57203910d 100644
--- a/arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t208xsi-pre.dtsi
@@ -51,6 +51,17 @@
51 serial3 = &serial3; 51 serial3 = &serial3;
52 52
53 crypto = &crypto; 53 crypto = &crypto;
54
55 fman0 = &fman0;
56 ethernet0 = &enet0;
57 ethernet1 = &enet1;
58 ethernet2 = &enet2;
59 ethernet3 = &enet3;
60 ethernet4 = &enet4;
61 ethernet5 = &enet5;
62 ethernet6 = &enet6;
63 ethernet7 = &enet7;
64
54 pci0 = &pci0; 65 pci0 = &pci0;
55 pci1 = &pci1; 66 pci1 = &pci1;
56 pci2 = &pci2; 67 pci2 = &pci2;
diff --git a/arch/powerpc/boot/dts/t4240qds.dts b/arch/powerpc/boot/dts/fsl/t4240qds.dts
index 93722da10e16..c067a6533809 100644
--- a/arch/powerpc/boot/dts/t4240qds.dts
+++ b/arch/powerpc/boot/dts/fsl/t4240qds.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t4240si-pre.dtsi" 35/include/ "t4240si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,T4240QDS"; 38 model = "fsl,T4240QDS";
@@ -307,4 +307,4 @@
307 }; 307 };
308}; 308};
309 309
310/include/ "fsl/t4240si-post.dtsi" 310/include/ "t4240si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/t4240rdb.dts b/arch/powerpc/boot/dts/fsl/t4240rdb.dts
index 993eb4b8a487..6e820a875621 100644
--- a/arch/powerpc/boot/dts/t4240rdb.dts
+++ b/arch/powerpc/boot/dts/fsl/t4240rdb.dts
@@ -32,7 +32,7 @@
32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34 34
35/include/ "fsl/t4240si-pre.dtsi" 35/include/ "t4240si-pre.dtsi"
36 36
37/ { 37/ {
38 model = "fsl,T4240RDB"; 38 model = "fsl,T4240RDB";
@@ -210,4 +210,4 @@
210 }; 210 };
211}; 211};
212 212
213/include/ "fsl/t4240si-post.dtsi" 213/include/ "t4240si-post.dtsi"
diff --git a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
index d806360d0f64..68c4eadc19e3 100644
--- a/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t4240si-post.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * T4240 Silicon/SoC Device Tree Source (post include) 2 * T4240 Silicon/SoC Device Tree Source (post include)
3 * 3 *
4 * Copyright 2012 - 2014 Freescale Semiconductor Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -1068,6 +1068,92 @@
1068/include/ "qoriq-qman3.dtsi" 1068/include/ "qoriq-qman3.dtsi"
1069/include/ "qoriq-bman1.dtsi" 1069/include/ "qoriq-bman1.dtsi"
1070 1070
1071/include/ "qoriq-fman3-0.dtsi"
1072/include/ "qoriq-fman3-0-1g-0.dtsi"
1073/include/ "qoriq-fman3-0-1g-1.dtsi"
1074/include/ "qoriq-fman3-0-1g-2.dtsi"
1075/include/ "qoriq-fman3-0-1g-3.dtsi"
1076/include/ "qoriq-fman3-0-1g-4.dtsi"
1077/include/ "qoriq-fman3-0-1g-5.dtsi"
1078/include/ "qoriq-fman3-0-10g-0.dtsi"
1079/include/ "qoriq-fman3-0-10g-1.dtsi"
1080 fman@400000 {
1081 enet0: ethernet@e0000 {
1082 };
1083
1084 enet1: ethernet@e2000 {
1085 };
1086
1087 enet2: ethernet@e4000 {
1088 };
1089
1090 enet3: ethernet@e6000 {
1091 };
1092
1093 enet4: ethernet@e8000 {
1094 };
1095
1096 enet5: ethernet@ea000 {
1097 };
1098
1099 enet6: ethernet@f0000 {
1100 };
1101
1102 enet7: ethernet@f2000 {
1103 };
1104
1105 mdio@fc000 {
1106 status = "disabled";
1107 };
1108
1109 mdio@fd000 {
1110 status = "disabled";
1111 };
1112 };
1113
1114/include/ "qoriq-fman3-1.dtsi"
1115/include/ "qoriq-fman3-1-1g-0.dtsi"
1116/include/ "qoriq-fman3-1-1g-1.dtsi"
1117/include/ "qoriq-fman3-1-1g-2.dtsi"
1118/include/ "qoriq-fman3-1-1g-3.dtsi"
1119/include/ "qoriq-fman3-1-1g-4.dtsi"
1120/include/ "qoriq-fman3-1-1g-5.dtsi"
1121/include/ "qoriq-fman3-1-10g-0.dtsi"
1122/include/ "qoriq-fman3-1-10g-1.dtsi"
1123 fman@500000 {
1124 enet8: ethernet@e0000 {
1125 };
1126
1127 enet9: ethernet@e2000 {
1128 };
1129
1130 enet10: ethernet@e4000 {
1131 };
1132
1133 enet11: ethernet@e6000 {
1134 };
1135
1136 enet12: ethernet@e8000 {
1137 };
1138
1139 enet13: ethernet@ea000 {
1140 };
1141
1142 enet14: ethernet@f0000 {
1143 };
1144
1145 enet15: ethernet@f2000 {
1146 };
1147
1148 mdio@fc000 {
1149 interrupts = <100 1 0 0>;
1150 };
1151
1152 mdio@fd000 {
1153 interrupts = <101 1 0 0>;
1154 };
1155 };
1156
1071 L2_1: l2-cache-controller@c20000 { 1157 L2_1: l2-cache-controller@c20000 {
1072 compatible = "fsl,t4240-l2-cache-controller"; 1158 compatible = "fsl,t4240-l2-cache-controller";
1073 reg = <0xc20000 0x40000>; 1159 reg = <0xc20000 0x40000>;
diff --git a/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi b/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi
index 261a3abb1a55..1184a746fcb1 100644
--- a/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t4240si-pre.dtsi
@@ -1,7 +1,7 @@
1/* 1/*
2 * T4240 Silicon/SoC Device Tree Source (pre include) 2 * T4240 Silicon/SoC Device Tree Source (pre include)
3 * 3 *
4 * Copyright 2012 Freescale Semiconductor Inc. 4 * Copyright 2012 - 2015 Freescale Semiconductor Inc.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met: 7 * modification, are permitted provided that the following conditions are met:
@@ -51,6 +51,7 @@
51 serial2 = &serial2; 51 serial2 = &serial2;
52 serial3 = &serial3; 52 serial3 = &serial3;
53 crypto = &crypto; 53 crypto = &crypto;
54
54 pci0 = &pci0; 55 pci0 = &pci0;
55 pci1 = &pci1; 56 pci1 = &pci1;
56 pci2 = &pci2; 57 pci2 = &pci2;
@@ -59,6 +60,25 @@
59 dma1 = &dma1; 60 dma1 = &dma1;
60 dma2 = &dma2; 61 dma2 = &dma2;
61 sdhc = &sdhc; 62 sdhc = &sdhc;
63
64 fman0 = &fman0;
65 fman1 = &fman1;
66 ethernet0 = &enet0;
67 ethernet1 = &enet1;
68 ethernet2 = &enet2;
69 ethernet3 = &enet3;
70 ethernet4 = &enet4;
71 ethernet5 = &enet5;
72 ethernet6 = &enet6;
73 ethernet7 = &enet7;
74 ethernet8 = &enet8;
75 ethernet9 = &enet9;
76 ethernet10 = &enet10;
77 ethernet11 = &enet11;
78 ethernet12 = &enet12;
79 ethernet13 = &enet13;
80 ethernet14 = &enet14;
81 ethernet15 = &enet15;
62 }; 82 };
63 83
64 cpus { 84 cpus {
diff --git a/arch/powerpc/boot/dts/mpc5121.dtsi b/arch/powerpc/boot/dts/mpc5121.dtsi
index 7f9d14f5c4da..a015e450437a 100644
--- a/arch/powerpc/boot/dts/mpc5121.dtsi
+++ b/arch/powerpc/boot/dts/mpc5121.dtsi
@@ -77,7 +77,6 @@
77 #address-cells = <2>; 77 #address-cells = <2>;
78 #size-cells = <1>; 78 #size-cells = <1>;
79 reg = <0x80000020 0x40>; 79 reg = <0x80000020 0x40>;
80 interrupts = <7 0x8>;
81 ranges = <0x0 0x0 0xfc000000 0x04000000>; 80 ranges = <0x0 0x0 0xfc000000 0x04000000>;
82 }; 81 };
83 82
@@ -329,7 +328,15 @@
329 /* LocalPlus controller */ 328 /* LocalPlus controller */
330 lpc@10000 { 329 lpc@10000 {
331 compatible = "fsl,mpc5121-lpc"; 330 compatible = "fsl,mpc5121-lpc";
332 reg = <0x10000 0x200>; 331 reg = <0x10000 0x100>;
332 };
333
334 sclpc@10100 {
335 compatible = "fsl,mpc512x-lpbfifo";
336 reg = <0x10100 0x50>;
337 interrupts = <7 0x8>;
338 dmas = <&dma0 26>;
339 dma-names = "rx-tx";
333 }; 340 };
334 341
335 pata@10200 { 342 pata@10200 {
diff --git a/arch/powerpc/boot/dts/mpc5125twr.dts b/arch/powerpc/boot/dts/mpc5125twr.dts
index e4f297471748..898eb58e49dd 100644
--- a/arch/powerpc/boot/dts/mpc5125twr.dts
+++ b/arch/powerpc/boot/dts/mpc5125twr.dts
@@ -246,6 +246,14 @@
246 status = "disabled"; 246 status = "disabled";
247 }; 247 };
248 248
249 sclpc@10100 {
250 compatible = "fsl,mpc512x-lpbfifo";
251 reg = <0x10100 0x50>;
252 interrupts = <7 0x8>;
253 dmas = <&dma0 26>;
254 dma-names = "rx-tx";
255 };
256
249 // 5125 PSCs are not 52xx or 5121 PSC compatible 257 // 5125 PSCs are not 52xx or 5121 PSC compatible
250 // PSC1 uart0 aka ttyPSC0 258 // PSC1 uart0 aka ttyPSC0
251 serial@11100 { 259 serial@11100 {
@@ -279,10 +287,11 @@
279 clock-names = "ipg"; 287 clock-names = "ipg";
280 }; 288 };
281 289
282 dma@14000 { 290 dma0: dma@14000 {
283 compatible = "fsl,mpc5121-dma"; // BSP name: "mpc512x-dma2" 291 compatible = "fsl,mpc5121-dma"; // BSP name: "mpc512x-dma2"
284 reg = <0x14000 0x1800>; 292 reg = <0x14000 0x1800>;
285 interrupts = <65 0x8>; 293 interrupts = <65 0x8>;
294 #dma-cells = <1>;
286 }; 295 };
287 }; 296 };
288}; 297};
diff --git a/arch/powerpc/boot/dts/prpmc2800.dts b/arch/powerpc/boot/dts/prpmc2800.dts
deleted file mode 100644
index 00afaacf8c8c..000000000000
--- a/arch/powerpc/boot/dts/prpmc2800.dts
+++ /dev/null
@@ -1,297 +0,0 @@
1/* Device Tree Source for Motorola PrPMC2800
2 *
3 * Author: Mark A. Greer <mgreer@mvista.com>
4 *
5 * 2007 (c) MontaVista, Software, Inc. This file is licensed under
6 * the terms of the GNU General Public License version 2. This program
7 * is licensed "as is" without any warranty of any kind, whether express
8 * or implied.
9 *
10 * Property values that are labeled as "Default" will be updated by bootwrapper
11 * if it can determine the exact PrPMC type.
12 */
13
14/dts-v1/;
15
16/ {
17 #address-cells = <1>;
18 #size-cells = <1>;
19 model = "PrPMC280/PrPMC2800"; /* Default */
20 compatible = "motorola,PrPMC2800";
21 coherency-off;
22
23 cpus {
24 #address-cells = <1>;
25 #size-cells = <0>;
26
27 PowerPC,7447 {
28 device_type = "cpu";
29 reg = <0>;
30 clock-frequency = <733333333>; /* Default */
31 bus-frequency = <133333333>;
32 timebase-frequency = <33333333>;
33 i-cache-line-size = <32>;
34 d-cache-line-size = <32>;
35 i-cache-size = <32768>;
36 d-cache-size = <32768>;
37 };
38 };
39
40 memory {
41 device_type = "memory";
42 reg = <0x0 0x20000000>; /* Default (512MB) */
43 };
44
45 system-controller@f1000000 { /* Marvell Discovery mv64360 */
46 #address-cells = <1>;
47 #size-cells = <1>;
48 model = "mv64360"; /* Default */
49 compatible = "marvell,mv64360";
50 clock-frequency = <133333333>;
51 reg = <0xf1000000 0x10000>;
52 virtual-reg = <0xf1000000>;
53 ranges = <0x88000000 0x88000000 0x1000000 /* PCI 0 I/O Space */
54 0x80000000 0x80000000 0x8000000 /* PCI 0 MEM Space */
55 0xa0000000 0xa0000000 0x4000000 /* User FLASH */
56 0x00000000 0xf1000000 0x0010000 /* Bridge's regs */
57 0xf2000000 0xf2000000 0x0040000>;/* Integrated SRAM */
58
59 flash@a0000000 {
60 device_type = "rom";
61 compatible = "direct-mapped";
62 reg = <0xa0000000 0x4000000>; /* Default (64MB) */
63 probe-type = "CFI";
64 bank-width = <4>;
65 partitions = <0x00000000 0x00100000 /* RO */
66 0x00100000 0x00040001 /* RW */
67 0x00140000 0x00400000 /* RO */
68 0x00540000 0x039c0000 /* RO */
69 0x03f00000 0x00100000>; /* RO */
70 partition-names = "FW Image A", "FW Config Data", "Kernel Image", "Filesystem", "FW Image B";
71 };
72
73 mdio {
74 #address-cells = <1>;
75 #size-cells = <0>;
76 compatible = "marvell,mv64360-mdio";
77 PHY0: ethernet-phy@1 {
78 compatible = "broadcom,bcm5421";
79 interrupts = <76>; /* GPP 12 */
80 interrupt-parent = <&PIC>;
81 reg = <1>;
82 };
83 PHY1: ethernet-phy@3 {
84 compatible = "broadcom,bcm5421";
85 interrupts = <76>; /* GPP 12 */
86 interrupt-parent = <&PIC>;
87 reg = <3>;
88 };
89 };
90
91 ethernet-group@2000 {
92 #address-cells = <1>;
93 #size-cells = <0>;
94 compatible = "marvell,mv64360-eth-group";
95 reg = <0x2000 0x2000>;
96 ethernet@0 {
97 device_type = "network";
98 compatible = "marvell,mv64360-eth";
99 reg = <0>;
100 interrupts = <32>;
101 interrupt-parent = <&PIC>;
102 phy = <&PHY0>;
103 local-mac-address = [ 00 00 00 00 00 00 ];
104 };
105 ethernet@1 {
106 device_type = "network";
107 compatible = "marvell,mv64360-eth";
108 reg = <1>;
109 interrupts = <33>;
110 interrupt-parent = <&PIC>;
111 phy = <&PHY1>;
112 local-mac-address = [ 00 00 00 00 00 00 ];
113 };
114 };
115
116 SDMA0: sdma@4000 {
117 compatible = "marvell,mv64360-sdma";
118 reg = <0x4000 0xc18>;
119 virtual-reg = <0xf1004000>;
120 interrupts = <36>;
121 interrupt-parent = <&PIC>;
122 };
123
124 SDMA1: sdma@6000 {
125 compatible = "marvell,mv64360-sdma";
126 reg = <0x6000 0xc18>;
127 virtual-reg = <0xf1006000>;
128 interrupts = <38>;
129 interrupt-parent = <&PIC>;
130 };
131
132 BRG0: brg@b200 {
133 compatible = "marvell,mv64360-brg";
134 reg = <0xb200 0x8>;
135 clock-src = <8>;
136 clock-frequency = <133333333>;
137 current-speed = <9600>;
138 };
139
140 BRG1: brg@b208 {
141 compatible = "marvell,mv64360-brg";
142 reg = <0xb208 0x8>;
143 clock-src = <8>;
144 clock-frequency = <133333333>;
145 current-speed = <9600>;
146 };
147
148 CUNIT: cunit@f200 {
149 reg = <0xf200 0x200>;
150 };
151
152 MPSCROUTING: mpscrouting@b400 {
153 reg = <0xb400 0xc>;
154 };
155
156 MPSCINTR: mpscintr@b800 {
157 reg = <0xb800 0x100>;
158 virtual-reg = <0xf100b800>;
159 };
160
161 MPSC0: mpsc@8000 {
162 compatible = "marvell,mv64360-mpsc";
163 reg = <0x8000 0x38>;
164 virtual-reg = <0xf1008000>;
165 sdma = <&SDMA0>;
166 brg = <&BRG0>;
167 cunit = <&CUNIT>;
168 mpscrouting = <&MPSCROUTING>;
169 mpscintr = <&MPSCINTR>;
170 cell-index = <0>;
171 interrupts = <40>;
172 interrupt-parent = <&PIC>;
173 };
174
175 MPSC1: mpsc@9000 {
176 compatible = "marvell,mv64360-mpsc";
177 reg = <0x9000 0x38>;
178 virtual-reg = <0xf1009000>;
179 sdma = <&SDMA1>;
180 brg = <&BRG1>;
181 cunit = <&CUNIT>;
182 mpscrouting = <&MPSCROUTING>;
183 mpscintr = <&MPSCINTR>;
184 cell-index = <1>;
185 interrupts = <42>;
186 interrupt-parent = <&PIC>;
187 };
188
189 wdt@b410 { /* watchdog timer */
190 compatible = "marvell,mv64360-wdt";
191 reg = <0xb410 0x8>;
192 };
193
194 i2c@c000 {
195 device_type = "i2c";
196 compatible = "marvell,mv64360-i2c";
197 reg = <0xc000 0x20>;
198 virtual-reg = <0xf100c000>;
199 interrupts = <37>;
200 interrupt-parent = <&PIC>;
201 };
202
203 PIC: pic {
204 #interrupt-cells = <1>;
205 #address-cells = <0>;
206 compatible = "marvell,mv64360-pic";
207 reg = <0x0 0x88>;
208 interrupt-controller;
209 };
210
211 mpp@f000 {
212 compatible = "marvell,mv64360-mpp";
213 reg = <0xf000 0x10>;
214 };
215
216 gpp@f100 {
217 compatible = "marvell,mv64360-gpp";
218 reg = <0xf100 0x20>;
219 };
220
221 pci@80000000 {
222 #address-cells = <3>;
223 #size-cells = <2>;
224 #interrupt-cells = <1>;
225 device_type = "pci";
226 compatible = "marvell,mv64360-pci";
227 reg = <0xcf8 0x8>;
228 ranges = <0x01000000 0x0 0x0
229 0x88000000 0x0 0x01000000
230 0x02000000 0x0 0x80000000
231 0x80000000 0x0 0x08000000>;
232 bus-range = <0 255>;
233 clock-frequency = <66000000>;
234 interrupt-pci-iack = <0xc34>;
235 interrupt-parent = <&PIC>;
236 interrupt-map-mask = <0xf800 0x0 0x0 0x7>;
237 interrupt-map = <
238 /* IDSEL 0x0a */
239 0x5000 0 0 1 &PIC 80
240 0x5000 0 0 2 &PIC 81
241 0x5000 0 0 3 &PIC 91
242 0x5000 0 0 4 &PIC 93
243
244 /* IDSEL 0x0b */
245 0x5800 0 0 1 &PIC 91
246 0x5800 0 0 2 &PIC 93
247 0x5800 0 0 3 &PIC 80
248 0x5800 0 0 4 &PIC 81
249
250 /* IDSEL 0x0c */
251 0x6000 0 0 1 &PIC 91
252 0x6000 0 0 2 &PIC 93
253 0x6000 0 0 3 &PIC 80
254 0x6000 0 0 4 &PIC 81
255
256 /* IDSEL 0x0d */
257 0x6800 0 0 1 &PIC 93
258 0x6800 0 0 2 &PIC 80
259 0x6800 0 0 3 &PIC 81
260 0x6800 0 0 4 &PIC 91
261 >;
262 };
263
264 cpu-error@0070 {
265 compatible = "marvell,mv64360-cpu-error";
266 reg = <0x70 0x10 0x128 0x28>;
267 interrupts = <3>;
268 interrupt-parent = <&PIC>;
269 };
270
271 sram-ctrl@0380 {
272 compatible = "marvell,mv64360-sram-ctrl";
273 reg = <0x380 0x80>;
274 interrupts = <13>;
275 interrupt-parent = <&PIC>;
276 };
277
278 pci-error@1d40 {
279 compatible = "marvell,mv64360-pci-error";
280 reg = <0x1d40 0x40 0xc28 0x4>;
281 interrupts = <12>;
282 interrupt-parent = <&PIC>;
283 };
284
285 mem-ctrl@1400 {
286 compatible = "marvell,mv64360-mem-ctrl";
287 reg = <0x1400 0x60>;
288 interrupts = <17>;
289 interrupt-parent = <&PIC>;
290 };
291 };
292
293 chosen {
294 bootargs = "ip=on";
295 linux,stdout-path = &MPSC0;
296 };
297};
diff --git a/arch/powerpc/boot/page.h b/arch/powerpc/boot/page.h
index 14eca30fef64..87c42d7d283d 100644
--- a/arch/powerpc/boot/page.h
+++ b/arch/powerpc/boot/page.h
@@ -22,8 +22,8 @@
22#define PAGE_MASK (~(PAGE_SIZE-1)) 22#define PAGE_MASK (~(PAGE_SIZE-1))
23 23
24/* align addr on a size boundary - adjust address up/down if needed */ 24/* align addr on a size boundary - adjust address up/down if needed */
25#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) 25#define _ALIGN_UP(addr, size) (((addr)+((size)-1))&(~((typeof(addr))(size)-1)))
26#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1))) 26#define _ALIGN_DOWN(addr, size) ((addr)&(~((typeof(addr))(size)-1)))
27 27
28/* align addr on a size boundary - adjust address up if needed */ 28/* align addr on a size boundary - adjust address up if needed */
29#define _ALIGN(addr,size) _ALIGN_UP(addr,size) 29#define _ALIGN(addr,size) _ALIGN_UP(addr,size)
diff --git a/arch/powerpc/boot/prpmc2800.c b/arch/powerpc/boot/prpmc2800.c
deleted file mode 100644
index da31d6030482..000000000000
--- a/arch/powerpc/boot/prpmc2800.c
+++ /dev/null
@@ -1,571 +0,0 @@
1/*
2 * Motorola ECC prpmc280/f101 & prpmc2800/f101e platform code.
3 *
4 * Author: Mark A. Greer <mgreer@mvista.com>
5 *
6 * 2007 (c) MontaVista, Software, Inc. This file is licensed under
7 * the terms of the GNU General Public License version 2. This program
8 * is licensed "as is" without any warranty of any kind, whether express
9 * or implied.
10 */
11
12#include <stdarg.h>
13#include <stddef.h>
14#include "types.h"
15#include "elf.h"
16#include "page.h"
17#include "string.h"
18#include "stdio.h"
19#include "io.h"
20#include "ops.h"
21#include "gunzip_util.h"
22#include "mv64x60.h"
23
24#define KB 1024U
25#define MB (KB*KB)
26#define GB (KB*MB)
27#define MHz (1000U*1000U)
28#define GHz (1000U*MHz)
29
30#define BOARD_MODEL "PrPMC2800"
31#define BOARD_MODEL_MAX 32 /* max strlen(BOARD_MODEL) + 1 */
32
33#define EEPROM2_ADDR 0xa4
34#define EEPROM3_ADDR 0xa8
35
36BSS_STACK(16*KB);
37
38static u8 *bridge_base;
39
40typedef enum {
41 BOARD_MODEL_PRPMC280,
42 BOARD_MODEL_PRPMC2800,
43} prpmc2800_board_model;
44
45typedef enum {
46 BRIDGE_TYPE_MV64360,
47 BRIDGE_TYPE_MV64362,
48} prpmc2800_bridge_type;
49
50struct prpmc2800_board_info {
51 prpmc2800_board_model model;
52 char variant;
53 prpmc2800_bridge_type bridge_type;
54 u8 subsys0;
55 u8 subsys1;
56 u8 vpd4;
57 u8 vpd4_mask;
58 u32 core_speed;
59 u32 mem_size;
60 u32 boot_flash;
61 u32 user_flash;
62};
63
64static struct prpmc2800_board_info prpmc2800_board_info[] = {
65 {
66 .model = BOARD_MODEL_PRPMC280,
67 .variant = 'a',
68 .bridge_type = BRIDGE_TYPE_MV64360,
69 .subsys0 = 0xff,
70 .subsys1 = 0xff,
71 .vpd4 = 0x00,
72 .vpd4_mask = 0x0f,
73 .core_speed = 1*GHz,
74 .mem_size = 512*MB,
75 .boot_flash = 1*MB,
76 .user_flash = 64*MB,
77 },
78 {
79 .model = BOARD_MODEL_PRPMC280,
80 .variant = 'b',
81 .bridge_type = BRIDGE_TYPE_MV64362,
82 .subsys0 = 0xff,
83 .subsys1 = 0xff,
84 .vpd4 = 0x01,
85 .vpd4_mask = 0x0f,
86 .core_speed = 1*GHz,
87 .mem_size = 512*MB,
88 .boot_flash = 0,
89 .user_flash = 0,
90 },
91 {
92 .model = BOARD_MODEL_PRPMC280,
93 .variant = 'c',
94 .bridge_type = BRIDGE_TYPE_MV64360,
95 .subsys0 = 0xff,
96 .subsys1 = 0xff,
97 .vpd4 = 0x02,
98 .vpd4_mask = 0x0f,
99 .core_speed = 733*MHz,
100 .mem_size = 512*MB,
101 .boot_flash = 1*MB,
102 .user_flash = 64*MB,
103 },
104 {
105 .model = BOARD_MODEL_PRPMC280,
106 .variant = 'd',
107 .bridge_type = BRIDGE_TYPE_MV64360,
108 .subsys0 = 0xff,
109 .subsys1 = 0xff,
110 .vpd4 = 0x03,
111 .vpd4_mask = 0x0f,
112 .core_speed = 1*GHz,
113 .mem_size = 1*GB,
114 .boot_flash = 1*MB,
115 .user_flash = 64*MB,
116 },
117 {
118 .model = BOARD_MODEL_PRPMC280,
119 .variant = 'e',
120 .bridge_type = BRIDGE_TYPE_MV64360,
121 .subsys0 = 0xff,
122 .subsys1 = 0xff,
123 .vpd4 = 0x04,
124 .vpd4_mask = 0x0f,
125 .core_speed = 1*GHz,
126 .mem_size = 512*MB,
127 .boot_flash = 1*MB,
128 .user_flash = 64*MB,
129 },
130 {
131 .model = BOARD_MODEL_PRPMC280,
132 .variant = 'f',
133 .bridge_type = BRIDGE_TYPE_MV64362,
134 .subsys0 = 0xff,
135 .subsys1 = 0xff,
136 .vpd4 = 0x05,
137 .vpd4_mask = 0x0f,
138 .core_speed = 733*MHz,
139 .mem_size = 128*MB,
140 .boot_flash = 1*MB,
141 .user_flash = 0,
142 },
143 {
144 .model = BOARD_MODEL_PRPMC280,
145 .variant = 'g',
146 .bridge_type = BRIDGE_TYPE_MV64360,
147 .subsys0 = 0xff,
148 .subsys1 = 0xff,
149 .vpd4 = 0x06,
150 .vpd4_mask = 0x0f,
151 .core_speed = 1*GHz,
152 .mem_size = 256*MB,
153 .boot_flash = 1*MB,
154 .user_flash = 0,
155 },
156 {
157 .model = BOARD_MODEL_PRPMC280,
158 .variant = 'h',
159 .bridge_type = BRIDGE_TYPE_MV64360,
160 .subsys0 = 0xff,
161 .subsys1 = 0xff,
162 .vpd4 = 0x07,
163 .vpd4_mask = 0x0f,
164 .core_speed = 1*GHz,
165 .mem_size = 1*GB,
166 .boot_flash = 1*MB,
167 .user_flash = 64*MB,
168 },
169 {
170 .model = BOARD_MODEL_PRPMC2800,
171 .variant = 'a',
172 .bridge_type = BRIDGE_TYPE_MV64360,
173 .subsys0 = 0xb2,
174 .subsys1 = 0x8c,
175 .vpd4 = 0x00,
176 .vpd4_mask = 0x00,
177 .core_speed = 1*GHz,
178 .mem_size = 512*MB,
179 .boot_flash = 2*MB,
180 .user_flash = 64*MB,
181 },
182 {
183 .model = BOARD_MODEL_PRPMC2800,
184 .variant = 'b',
185 .bridge_type = BRIDGE_TYPE_MV64362,
186 .subsys0 = 0xb2,
187 .subsys1 = 0x8d,
188 .vpd4 = 0x00,
189 .vpd4_mask = 0x00,
190 .core_speed = 1*GHz,
191 .mem_size = 512*MB,
192 .boot_flash = 0,
193 .user_flash = 0,
194 },
195 {
196 .model = BOARD_MODEL_PRPMC2800,
197 .variant = 'c',
198 .bridge_type = BRIDGE_TYPE_MV64360,
199 .subsys0 = 0xb2,
200 .subsys1 = 0x8e,
201 .vpd4 = 0x00,
202 .vpd4_mask = 0x00,
203 .core_speed = 733*MHz,
204 .mem_size = 512*MB,
205 .boot_flash = 2*MB,
206 .user_flash = 64*MB,
207 },
208 {
209 .model = BOARD_MODEL_PRPMC2800,
210 .variant = 'd',
211 .bridge_type = BRIDGE_TYPE_MV64360,
212 .subsys0 = 0xb2,
213 .subsys1 = 0x8f,
214 .vpd4 = 0x00,
215 .vpd4_mask = 0x00,
216 .core_speed = 1*GHz,
217 .mem_size = 1*GB,
218 .boot_flash = 2*MB,
219 .user_flash = 64*MB,
220 },
221 {
222 .model = BOARD_MODEL_PRPMC2800,
223 .variant = 'e',
224 .bridge_type = BRIDGE_TYPE_MV64360,
225 .subsys0 = 0xa2,
226 .subsys1 = 0x8a,
227 .vpd4 = 0x00,
228 .vpd4_mask = 0x00,
229 .core_speed = 1*GHz,
230 .mem_size = 512*MB,
231 .boot_flash = 2*MB,
232 .user_flash = 64*MB,
233 },
234 {
235 .model = BOARD_MODEL_PRPMC2800,
236 .variant = 'f',
237 .bridge_type = BRIDGE_TYPE_MV64362,
238 .subsys0 = 0xa2,
239 .subsys1 = 0x8b,
240 .vpd4 = 0x00,
241 .vpd4_mask = 0x00,
242 .core_speed = 733*MHz,
243 .mem_size = 128*MB,
244 .boot_flash = 2*MB,
245 .user_flash = 0,
246 },
247 {
248 .model = BOARD_MODEL_PRPMC2800,
249 .variant = 'g',
250 .bridge_type = BRIDGE_TYPE_MV64360,
251 .subsys0 = 0xa2,
252 .subsys1 = 0x8c,
253 .vpd4 = 0x00,
254 .vpd4_mask = 0x00,
255 .core_speed = 1*GHz,
256 .mem_size = 2*GB,
257 .boot_flash = 2*MB,
258 .user_flash = 64*MB,
259 },
260 {
261 .model = BOARD_MODEL_PRPMC2800,
262 .variant = 'h',
263 .bridge_type = BRIDGE_TYPE_MV64360,
264 .subsys0 = 0xa2,
265 .subsys1 = 0x8d,
266 .vpd4 = 0x00,
267 .vpd4_mask = 0x00,
268 .core_speed = 733*MHz,
269 .mem_size = 1*GB,
270 .boot_flash = 2*MB,
271 .user_flash = 64*MB,
272 },
273};
274
275static struct prpmc2800_board_info *prpmc2800_get_board_info(u8 *vpd)
276{
277 struct prpmc2800_board_info *bip;
278 int i;
279
280 for (i=0,bip=prpmc2800_board_info; i<ARRAY_SIZE(prpmc2800_board_info);
281 i++,bip++)
282 if ((vpd[0] == bip->subsys0) && (vpd[1] == bip->subsys1)
283 && ((vpd[4] & bip->vpd4_mask) == bip->vpd4))
284 return bip;
285
286 return NULL;
287}
288
289/* Get VPD from i2c eeprom 2, then match it to a board info entry */
290static struct prpmc2800_board_info *prpmc2800_get_bip(void)
291{
292 struct prpmc2800_board_info *bip;
293 u8 vpd[5];
294 int rc;
295
296 if (mv64x60_i2c_open())
297 fatal("Error: Can't open i2c device\n\r");
298
299 /* Get VPD from i2c eeprom-2 */
300 memset(vpd, 0, sizeof(vpd));
301 rc = mv64x60_i2c_read(EEPROM2_ADDR, vpd, 0x1fde, 2, sizeof(vpd));
302 if (rc < 0)
303 fatal("Error: Couldn't read eeprom2\n\r");
304 mv64x60_i2c_close();
305
306 /* Get board type & related info */
307 bip = prpmc2800_get_board_info(vpd);
308 if (bip == NULL) {
309 printf("Error: Unsupported board or corrupted VPD:\n\r");
310 printf(" 0x%x 0x%x 0x%x 0x%x 0x%x\n\r",
311 vpd[0], vpd[1], vpd[2], vpd[3], vpd[4]);
312 printf("Using device tree defaults...\n\r");
313 }
314
315 return bip;
316}
317
318static void prpmc2800_bridge_setup(u32 mem_size)
319{
320 u32 i, v[12], enables, acc_bits;
321 u32 pci_base_hi, pci_base_lo, size, buf[2];
322 unsigned long cpu_base;
323 int rc;
324 void *devp;
325 u8 *bridge_pbase, is_coherent;
326 struct mv64x60_cpu2pci_win *tbl;
327
328 bridge_pbase = mv64x60_get_bridge_pbase();
329 is_coherent = mv64x60_is_coherent();
330
331 if (is_coherent)
332 acc_bits = MV64x60_PCI_ACC_CNTL_SNOOP_WB
333 | MV64x60_PCI_ACC_CNTL_SWAP_NONE
334 | MV64x60_PCI_ACC_CNTL_MBURST_32_BYTES
335 | MV64x60_PCI_ACC_CNTL_RDSIZE_32_BYTES;
336 else
337 acc_bits = MV64x60_PCI_ACC_CNTL_SNOOP_NONE
338 | MV64x60_PCI_ACC_CNTL_SWAP_NONE
339 | MV64x60_PCI_ACC_CNTL_MBURST_128_BYTES
340 | MV64x60_PCI_ACC_CNTL_RDSIZE_256_BYTES;
341
342 mv64x60_config_ctlr_windows(bridge_base, bridge_pbase, is_coherent);
343 mv64x60_config_pci_windows(bridge_base, bridge_pbase, 0, 0, mem_size,
344 acc_bits);
345
346 /* Get the cpu -> pci i/o & mem mappings from the device tree */
347 devp = find_node_by_compatible(NULL, "marvell,mv64360-pci");
348 if (devp == NULL)
349 fatal("Error: Missing marvell,mv64360-pci"
350 " device tree node\n\r");
351
352 rc = getprop(devp, "ranges", v, sizeof(v));
353 if (rc != sizeof(v))
354 fatal("Error: Can't find marvell,mv64360-pci ranges"
355 " property\n\r");
356
357 /* Get the cpu -> pci i/o & mem mappings from the device tree */
358 devp = find_node_by_compatible(NULL, "marvell,mv64360");
359 if (devp == NULL)
360 fatal("Error: Missing marvell,mv64360 device tree node\n\r");
361
362 enables = in_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE));
363 enables |= 0x0007fe00; /* Disable all cpu->pci windows */
364 out_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE), enables);
365
366 for (i=0; i<12; i+=6) {
367 switch (v[i] & 0xff000000) {
368 case 0x01000000: /* PCI I/O Space */
369 tbl = mv64x60_cpu2pci_io;
370 break;
371 case 0x02000000: /* PCI MEM Space */
372 tbl = mv64x60_cpu2pci_mem;
373 break;
374 default:
375 continue;
376 }
377
378 pci_base_hi = v[i+1];
379 pci_base_lo = v[i+2];
380 cpu_base = v[i+3];
381 size = v[i+5];
382
383 buf[0] = cpu_base;
384 buf[1] = size;
385
386 if (!dt_xlate_addr(devp, buf, sizeof(buf), &cpu_base))
387 fatal("Error: Can't translate PCI address 0x%x\n\r",
388 (u32)cpu_base);
389
390 mv64x60_config_cpu2pci_window(bridge_base, 0, pci_base_hi,
391 pci_base_lo, cpu_base, size, tbl);
392 }
393
394 enables &= ~0x00000600; /* Enable cpu->pci0 i/o, cpu->pci0 mem0 */
395 out_le32((u32 *)(bridge_base + MV64x60_CPU_BAR_ENABLE), enables);
396}
397
398static void prpmc2800_fixups(void)
399{
400 u32 v[2], l, mem_size;
401 int rc;
402 void *devp;
403 char model[BOARD_MODEL_MAX];
404 struct prpmc2800_board_info *bip;
405
406 bip = prpmc2800_get_bip(); /* Get board info based on VPD */
407
408 mem_size = (bip) ? bip->mem_size : mv64x60_get_mem_size(bridge_base);
409 prpmc2800_bridge_setup(mem_size); /* Do necessary bridge setup */
410
411 /* If the VPD doesn't match what we know about, just use the
412 * defaults already in the device tree.
413 */
414 if (!bip)
415 return;
416
417 /* Know the board type so override device tree defaults */
418 /* Set /model appropriately */
419 devp = finddevice("/");
420 if (devp == NULL)
421 fatal("Error: Missing '/' device tree node\n\r");
422 memset(model, 0, BOARD_MODEL_MAX);
423 strncpy(model, BOARD_MODEL, BOARD_MODEL_MAX - 2);
424 l = strlen(model);
425 if (bip->model == BOARD_MODEL_PRPMC280)
426 l--;
427 model[l++] = bip->variant;
428 model[l++] = '\0';
429 setprop(devp, "model", model, l);
430
431 /* Set /cpus/PowerPC,7447/clock-frequency */
432 devp = find_node_by_prop_value_str(NULL, "device_type", "cpu");
433 if (devp == NULL)
434 fatal("Error: Missing proper cpu device tree node\n\r");
435 v[0] = bip->core_speed;
436 setprop(devp, "clock-frequency", &v[0], sizeof(v[0]));
437
438 /* Set /memory/reg size */
439 devp = finddevice("/memory");
440 if (devp == NULL)
441 fatal("Error: Missing /memory device tree node\n\r");
442 v[0] = 0;
443 v[1] = bip->mem_size;
444 setprop(devp, "reg", v, sizeof(v));
445
446 /* Update model, if this is a mv64362 */
447 if (bip->bridge_type == BRIDGE_TYPE_MV64362) {
448 devp = find_node_by_compatible(NULL, "marvell,mv64360");
449 if (devp == NULL)
450 fatal("Error: Missing marvell,mv64360"
451 " device tree node\n\r");
452 setprop(devp, "model", "mv64362", strlen("mv64362") + 1);
453 }
454
455 /* Set User FLASH size */
456 devp = find_node_by_compatible(NULL, "direct-mapped");
457 if (devp == NULL)
458 fatal("Error: Missing User FLASH device tree node\n\r");
459 rc = getprop(devp, "reg", v, sizeof(v));
460 if (rc != sizeof(v))
461 fatal("Error: Can't find User FLASH reg property\n\r");
462 v[1] = bip->user_flash;
463 setprop(devp, "reg", v, sizeof(v));
464}
465
466#define MV64x60_MPP_CNTL_0 0xf000
467#define MV64x60_MPP_CNTL_2 0xf008
468#define MV64x60_GPP_IO_CNTL 0xf100
469#define MV64x60_GPP_LEVEL_CNTL 0xf110
470#define MV64x60_GPP_VALUE_SET 0xf118
471
472static void prpmc2800_reset(void)
473{
474 u32 temp;
475
476 udelay(5000000);
477
478 if (bridge_base != 0) {
479 temp = in_le32((u32 *)(bridge_base + MV64x60_MPP_CNTL_0));
480 temp &= 0xFFFF0FFF;
481 out_le32((u32 *)(bridge_base + MV64x60_MPP_CNTL_0), temp);
482
483 temp = in_le32((u32 *)(bridge_base + MV64x60_GPP_LEVEL_CNTL));
484 temp |= 0x00000004;
485 out_le32((u32 *)(bridge_base + MV64x60_GPP_LEVEL_CNTL), temp);
486
487 temp = in_le32((u32 *)(bridge_base + MV64x60_GPP_IO_CNTL));
488 temp |= 0x00000004;
489 out_le32((u32 *)(bridge_base + MV64x60_GPP_IO_CNTL), temp);
490
491 temp = in_le32((u32 *)(bridge_base + MV64x60_MPP_CNTL_2));
492 temp &= 0xFFFF0FFF;
493 out_le32((u32 *)(bridge_base + MV64x60_MPP_CNTL_2), temp);
494
495 temp = in_le32((u32 *)(bridge_base + MV64x60_GPP_LEVEL_CNTL));
496 temp |= 0x00080000;
497 out_le32((u32 *)(bridge_base + MV64x60_GPP_LEVEL_CNTL), temp);
498
499 temp = in_le32((u32 *)(bridge_base + MV64x60_GPP_IO_CNTL));
500 temp |= 0x00080000;
501 out_le32((u32 *)(bridge_base + MV64x60_GPP_IO_CNTL), temp);
502
503 out_le32((u32 *)(bridge_base + MV64x60_GPP_VALUE_SET),
504 0x00080004);
505 }
506
507 for (;;);
508}
509
510#define HEAP_SIZE (16*MB)
511static struct gunzip_state gzstate;
512
513void platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
514 unsigned long r6, unsigned long r7)
515{
516 struct elf_info ei;
517 char *heap_start, *dtb;
518 int dt_size = _dtb_end - _dtb_start;
519 void *vmlinuz_addr = _vmlinux_start;
520 unsigned long vmlinuz_size = _vmlinux_end - _vmlinux_start;
521 char elfheader[256];
522
523 if (dt_size <= 0) /* No fdt */
524 exit();
525
526 /*
527 * Start heap after end of the kernel (after decompressed to
528 * address 0) or the end of the zImage, whichever is higher.
529 * That's so things allocated by simple_alloc won't overwrite
530 * any part of the zImage and the kernel won't overwrite the dtb
531 * when decompressed & relocated.
532 */
533 gunzip_start(&gzstate, vmlinuz_addr, vmlinuz_size);
534 gunzip_exactly(&gzstate, elfheader, sizeof(elfheader));
535
536 if (!parse_elf32(elfheader, &ei))
537 exit();
538
539 heap_start = (char *)(ei.memsize + ei.elfoffset); /* end of kernel*/
540 heap_start = max(heap_start, (char *)_end); /* end of zImage */
541
542 if ((unsigned)simple_alloc_init(heap_start, HEAP_SIZE, 2*KB, 16)
543 > (128*MB))
544 exit();
545
546 /* Relocate dtb to safe area past end of zImage & kernel */
547 dtb = malloc(dt_size);
548 if (!dtb)
549 exit();
550 memmove(dtb, _dtb_start, dt_size);
551 fdt_init(dtb);
552
553 bridge_base = mv64x60_get_bridge_base();
554
555 platform_ops.fixups = prpmc2800_fixups;
556 platform_ops.exit = prpmc2800_reset;
557
558 if (serial_console_init() < 0)
559 exit();
560}
561
562/* _zimage_start called very early--need to turn off external interrupts */
563asm (" .globl _zimage_start\n\
564 _zimage_start:\n\
565 mfmsr 10\n\
566 rlwinm 10,10,0,~(1<<15) /* Clear MSR_EE */\n\
567 sync\n\
568 mtmsr 10\n\
569 isync\n\
570 b _zimage_start_lib\n\
571");
diff --git a/arch/powerpc/boot/wrapper b/arch/powerpc/boot/wrapper
index 3f50c27ed8f8..ceaa75d5a684 100755
--- a/arch/powerpc/boot/wrapper
+++ b/arch/powerpc/boot/wrapper
@@ -63,6 +63,23 @@ usage() {
63 exit 1 63 exit 1
64} 64}
65 65
66run_cmd() {
67 if [ "$V" = 1 ]; then
68 $* 2>&1
69 else
70 local msg
71
72 set +e
73 msg=$($* 2>&1)
74
75 if [ $? -ne "0" ]; then
76 echo $msg
77 exit 1
78 fi
79 set -e
80 fi
81}
82
66while [ "$#" -gt 0 ]; do 83while [ "$#" -gt 0 ]; do
67 case "$1" in 84 case "$1" in
68 -o) 85 -o)
@@ -456,12 +473,12 @@ ps3)
456 473
457 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin" 474 ${CROSS}objcopy -O binary "$ofile" "$ofile.bin"
458 475
459 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ 476 run_cmd dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
460 skip=$overlay_dest seek=$system_reset_kernel \ 477 skip=$overlay_dest seek=$system_reset_kernel \
461 count=$overlay_size bs=1 478 count=$overlay_size bs=1
462 479
463 dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \ 480 run_cmd dd if="$ofile.bin" of="$ofile.bin" conv=notrunc \
464 skip=$system_reset_overlay seek=$overlay_dest \ 481 skip=$system_reset_overlay seek=$overlay_dest \
465 count=$overlay_size bs=1 482 count=$overlay_size bs=1
466 483
467 odir="$(dirname "$ofile.bin")" 484 odir="$(dirname "$ofile.bin")"
diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
index 9227b517560a..db328e618bb9 100644
--- a/arch/powerpc/configs/cell_defconfig
+++ b/arch/powerpc/configs/cell_defconfig
@@ -1,5 +1,5 @@
1CONFIG_PPC64=y 1CONFIG_PPC64=y
2CONFIG_TUNE_CELL=y 2CONFIG_CELL_CPU=y
3CONFIG_ALTIVEC=y 3CONFIG_ALTIVEC=y
4CONFIG_SMP=y 4CONFIG_SMP=y
5CONFIG_NR_CPUS=4 5CONFIG_NR_CPUS=4
diff --git a/arch/powerpc/configs/mpc512x_defconfig b/arch/powerpc/configs/mpc512x_defconfig
index 59b85cb95259..d16d6c5cb282 100644
--- a/arch/powerpc/configs/mpc512x_defconfig
+++ b/arch/powerpc/configs/mpc512x_defconfig
@@ -112,6 +112,7 @@ CONFIG_RTC_DRV_M41T80=y
112CONFIG_RTC_DRV_MPC5121=y 112CONFIG_RTC_DRV_MPC5121=y
113CONFIG_DMADEVICES=y 113CONFIG_DMADEVICES=y
114CONFIG_MPC512X_DMA=y 114CONFIG_MPC512X_DMA=y
115CONFIG_MPC512x_LPBFIFO=y
115CONFIG_EXT2_FS=y 116CONFIG_EXT2_FS=y
116CONFIG_EXT2_FS_XIP=y 117CONFIG_EXT2_FS_XIP=y
117CONFIG_EXT3_FS=y 118CONFIG_EXT3_FS=y
diff --git a/arch/powerpc/configs/ps3_defconfig b/arch/powerpc/configs/ps3_defconfig
index adc14e813a49..c40046074f8b 100644
--- a/arch/powerpc/configs/ps3_defconfig
+++ b/arch/powerpc/configs/ps3_defconfig
@@ -1,5 +1,5 @@
1CONFIG_PPC64=y 1CONFIG_PPC64=y
2CONFIG_TUNE_CELL=y 2CONFIG_CELL_CPU=y
3CONFIG_ALTIVEC=y 3CONFIG_ALTIVEC=y
4CONFIG_SMP=y 4CONFIG_SMP=y
5CONFIG_NR_CPUS=2 5CONFIG_NR_CPUS=2
@@ -53,7 +53,6 @@ CONFIG_IP_PNP_DHCP=y
53# CONFIG_INET_XFRM_MODE_BEET is not set 53# CONFIG_INET_XFRM_MODE_BEET is not set
54# CONFIG_INET_LRO is not set 54# CONFIG_INET_LRO is not set
55# CONFIG_INET_DIAG is not set 55# CONFIG_INET_DIAG is not set
56CONFIG_IPV6=y
57CONFIG_BT=m 56CONFIG_BT=m
58CONFIG_BT_RFCOMM=m 57CONFIG_BT_RFCOMM=m
59CONFIG_BT_RFCOMM_TTY=y 58CONFIG_BT_RFCOMM_TTY=y
@@ -141,8 +140,6 @@ CONFIG_RTC_CLASS=y
141CONFIG_RTC_DRV_PS3=y 140CONFIG_RTC_DRV_PS3=y
142# CONFIG_IOMMU_SUPPORT is not set 141# CONFIG_IOMMU_SUPPORT is not set
143CONFIG_EXT2_FS=m 142CONFIG_EXT2_FS=m
144CONFIG_EXT3_FS=m
145# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
146CONFIG_EXT4_FS=y 143CONFIG_EXT4_FS=y
147CONFIG_QUOTA=y 144CONFIG_QUOTA=y
148CONFIG_QFMT_V2=y 145CONFIG_QFMT_V2=y
@@ -175,9 +172,7 @@ CONFIG_DEBUG_LOCKDEP=y
175CONFIG_DEBUG_LIST=y 172CONFIG_DEBUG_LIST=y
176CONFIG_RCU_CPU_STALL_TIMEOUT=60 173CONFIG_RCU_CPU_STALL_TIMEOUT=60
177# CONFIG_FTRACE is not set 174# CONFIG_FTRACE is not set
178CONFIG_CRYPTO_GCM=m
179CONFIG_CRYPTO_PCBC=m 175CONFIG_CRYPTO_PCBC=m
180CONFIG_CRYPTO_MICHAEL_MIC=m 176CONFIG_CRYPTO_MICHAEL_MIC=m
181CONFIG_CRYPTO_SALSA20=m 177CONFIG_CRYPTO_SALSA20=m
182CONFIG_CRYPTO_LZO=m 178CONFIG_CRYPTO_LZO=m
183# CONFIG_CRYPTO_ANSI_CPRNG is not set
diff --git a/arch/powerpc/include/asm/exception-64e.h b/arch/powerpc/include/asm/exception-64e.h
index a8b52b61043f..a703452d67b6 100644
--- a/arch/powerpc/include/asm/exception-64e.h
+++ b/arch/powerpc/include/asm/exception-64e.h
@@ -69,13 +69,14 @@
69#define EX_TLB_ESR ( 9 * 8) /* Level 0 and 2 only */ 69#define EX_TLB_ESR ( 9 * 8) /* Level 0 and 2 only */
70#define EX_TLB_SRR0 (10 * 8) 70#define EX_TLB_SRR0 (10 * 8)
71#define EX_TLB_SRR1 (11 * 8) 71#define EX_TLB_SRR1 (11 * 8)
72#define EX_TLB_R7 (12 * 8)
72#ifdef CONFIG_BOOK3E_MMU_TLB_STATS 73#ifdef CONFIG_BOOK3E_MMU_TLB_STATS
73#define EX_TLB_R8 (12 * 8) 74#define EX_TLB_R8 (13 * 8)
74#define EX_TLB_R9 (13 * 8) 75#define EX_TLB_R9 (14 * 8)
75#define EX_TLB_LR (14 * 8) 76#define EX_TLB_LR (15 * 8)
76#define EX_TLB_SIZE (15 * 8) 77#define EX_TLB_SIZE (16 * 8)
77#else 78#else
78#define EX_TLB_SIZE (12 * 8) 79#define EX_TLB_SIZE (13 * 8)
79#endif 80#endif
80 81
81#define START_EXCEPTION(label) \ 82#define START_EXCEPTION(label) \
@@ -204,8 +205,8 @@ exc_##label##_book3e:
204#endif 205#endif
205 206
206#define SET_IVOR(vector_number, vector_offset) \ 207#define SET_IVOR(vector_number, vector_offset) \
207 li r3,vector_offset@l; \ 208 LOAD_REG_ADDR(r3,interrupt_base_book3e);\
208 ori r3,r3,interrupt_base_book3e@l; \ 209 ori r3,r3,vector_offset@l; \
209 mtspr SPRN_IVOR##vector_number,r3; 210 mtspr SPRN_IVOR##vector_number,r3;
210 211
211#endif /* _ASM_POWERPC_EXCEPTION_64E_H */ 212#endif /* _ASM_POWERPC_EXCEPTION_64E_H */
diff --git a/arch/powerpc/include/asm/mmu-hash64.h b/arch/powerpc/include/asm/mmu-hash64.h
index a82f5347540a..ba3342bbdbda 100644
--- a/arch/powerpc/include/asm/mmu-hash64.h
+++ b/arch/powerpc/include/asm/mmu-hash64.h
@@ -14,6 +14,7 @@
14 14
15#include <asm/asm-compat.h> 15#include <asm/asm-compat.h>
16#include <asm/page.h> 16#include <asm/page.h>
17#include <asm/bug.h>
17 18
18/* 19/*
19 * This is necessary to get the definition of PGTABLE_RANGE which we 20 * This is necessary to get the definition of PGTABLE_RANGE which we
diff --git a/arch/powerpc/include/asm/mpc5121.h b/arch/powerpc/include/asm/mpc5121.h
index 4a69cd1d5041..deaeb0b1f171 100644
--- a/arch/powerpc/include/asm/mpc5121.h
+++ b/arch/powerpc/include/asm/mpc5121.h
@@ -60,4 +60,63 @@ struct mpc512x_lpc {
60 60
61int mpc512x_cs_config(unsigned int cs, u32 val); 61int mpc512x_cs_config(unsigned int cs, u32 val);
62 62
63/*
64 * SCLPC Module (LPB FIFO)
65 */
66struct mpc512x_lpbfifo {
67 u32 pkt_size; /* SCLPC Packet Size Register */
68 u32 start_addr; /* SCLPC Start Address Register */
69 u32 ctrl; /* SCLPC Control Register */
70 u32 enable; /* SCLPC Enable Register */
71 u32 reserved1;
72 u32 status; /* SCLPC Status Register */
73 u32 bytes_done; /* SCLPC Bytes Done Register */
74 u32 emb_sc; /* EMB Share Counter Register */
75 u32 emb_pc; /* EMB Pause Control Register */
76 u32 reserved2[7];
77 u32 data_word; /* LPC RX/TX FIFO Data Word Register */
78 u32 fifo_status; /* LPC RX/TX FIFO Status Register */
79 u32 fifo_ctrl; /* LPC RX/TX FIFO Control Register */
80 u32 fifo_alarm; /* LPC RX/TX FIFO Alarm Register */
81};
82
83#define MPC512X_SCLPC_START (1 << 31)
84#define MPC512X_SCLPC_CS(x) (((x) & 0x7) << 24)
85#define MPC512X_SCLPC_FLUSH (1 << 17)
86#define MPC512X_SCLPC_READ (1 << 16)
87#define MPC512X_SCLPC_DAI (1 << 8)
88#define MPC512X_SCLPC_BPT(x) ((x) & 0x3f)
89#define MPC512X_SCLPC_RESET (1 << 24)
90#define MPC512X_SCLPC_FIFO_RESET (1 << 16)
91#define MPC512X_SCLPC_ABORT_INT_ENABLE (1 << 9)
92#define MPC512X_SCLPC_NORM_INT_ENABLE (1 << 8)
93#define MPC512X_SCLPC_ENABLE (1 << 0)
94#define MPC512X_SCLPC_SUCCESS (1 << 24)
95#define MPC512X_SCLPC_FIFO_CTRL(x) (((x) & 0x7) << 24)
96#define MPC512X_SCLPC_FIFO_ALARM(x) ((x) & 0x3ff)
97
98enum lpb_dev_portsize {
99 LPB_DEV_PORTSIZE_UNDEFINED = 0,
100 LPB_DEV_PORTSIZE_1_BYTE = 1,
101 LPB_DEV_PORTSIZE_2_BYTES = 2,
102 LPB_DEV_PORTSIZE_4_BYTES = 4,
103 LPB_DEV_PORTSIZE_8_BYTES = 8
104};
105
106enum mpc512x_lpbfifo_req_dir {
107 MPC512X_LPBFIFO_REQ_DIR_READ,
108 MPC512X_LPBFIFO_REQ_DIR_WRITE
109};
110
111struct mpc512x_lpbfifo_request {
112 phys_addr_t dev_phys_addr; /* physical address of some device on LPB */
113 void *ram_virt_addr; /* virtual address of some region in RAM */
114 u32 size;
115 enum lpb_dev_portsize portsize;
116 enum mpc512x_lpbfifo_req_dir dir;
117 void (*callback)(struct mpc512x_lpbfifo_request *);
118};
119
120int mpc512x_lpbfifo_submit(struct mpc512x_lpbfifo_request *req);
121
63#endif /* __ASM_POWERPC_MPC5121_H__ */ 122#endif /* __ASM_POWERPC_MPC5121_H__ */
diff --git a/arch/powerpc/include/asm/mpc52xx_psc.h b/arch/powerpc/include/asm/mpc52xx_psc.h
index 04c7e8fc24c2..ec995b289280 100644
--- a/arch/powerpc/include/asm/mpc52xx_psc.h
+++ b/arch/powerpc/include/asm/mpc52xx_psc.h
@@ -261,8 +261,6 @@ struct mpc52xx_psc_fifo {
261#define MPC512x_PSC_FIFO_FULL 0x2 261#define MPC512x_PSC_FIFO_FULL 0x2
262#define MPC512x_PSC_FIFO_ALARM 0x4 262#define MPC512x_PSC_FIFO_ALARM 0x4
263#define MPC512x_PSC_FIFO_URERR 0x8 263#define MPC512x_PSC_FIFO_URERR 0x8
264#define MPC512x_PSC_FIFO_ORERR 0x01
265#define MPC512x_PSC_FIFO_MEMERROR 0x02
266 264
267struct mpc512x_psc_fifo { 265struct mpc512x_psc_fifo {
268 u32 reserved1[10]; 266 u32 reserved1[10];
diff --git a/arch/powerpc/include/asm/msi_bitmap.h b/arch/powerpc/include/asm/msi_bitmap.h
index 97ac3f46ae0d..1ec7125551f1 100644
--- a/arch/powerpc/include/asm/msi_bitmap.h
+++ b/arch/powerpc/include/asm/msi_bitmap.h
@@ -19,6 +19,7 @@ struct msi_bitmap {
19 unsigned long *bitmap; 19 unsigned long *bitmap;
20 spinlock_t lock; 20 spinlock_t lock;
21 unsigned int irq_count; 21 unsigned int irq_count;
22 bool bitmap_from_slab;
22}; 23};
23 24
24int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num); 25int msi_bitmap_alloc_hwirqs(struct msi_bitmap *bmp, int num);
diff --git a/arch/powerpc/include/asm/page.h b/arch/powerpc/include/asm/page.h
index 71294a6e976e..3140c19c448c 100644
--- a/arch/powerpc/include/asm/page.h
+++ b/arch/powerpc/include/asm/page.h
@@ -12,6 +12,7 @@
12 12
13#ifndef __ASSEMBLY__ 13#ifndef __ASSEMBLY__
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/kernel.h>
15#else 16#else
16#include <asm/types.h> 17#include <asm/types.h>
17#endif 18#endif
@@ -107,12 +108,13 @@ extern long long virt_phys_offset;
107#endif 108#endif
108 109
109/* See Description below for VIRT_PHYS_OFFSET */ 110/* See Description below for VIRT_PHYS_OFFSET */
110#ifdef CONFIG_RELOCATABLE_PPC32 111#if defined(CONFIG_PPC32) && defined(CONFIG_BOOKE)
112#ifdef CONFIG_RELOCATABLE
111#define VIRT_PHYS_OFFSET virt_phys_offset 113#define VIRT_PHYS_OFFSET virt_phys_offset
112#else 114#else
113#define VIRT_PHYS_OFFSET (KERNELBASE - PHYSICAL_START) 115#define VIRT_PHYS_OFFSET (KERNELBASE - PHYSICAL_START)
114#endif 116#endif
115 117#endif
116 118
117#ifdef CONFIG_PPC64 119#ifdef CONFIG_PPC64
118#define MEMORY_START 0UL 120#define MEMORY_START 0UL
@@ -127,9 +129,10 @@ extern long long virt_phys_offset;
127#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr) 129#define pfn_valid(pfn) ((pfn) >= ARCH_PFN_OFFSET && (pfn) < max_mapnr)
128#endif 130#endif
129 131
130#define virt_to_page(kaddr) pfn_to_page(__pa(kaddr) >> PAGE_SHIFT) 132#define virt_to_pfn(kaddr) (__pa(kaddr) >> PAGE_SHIFT)
133#define virt_to_page(kaddr) pfn_to_page(virt_to_pfn(kaddr))
131#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT) 134#define pfn_to_kaddr(pfn) __va((pfn) << PAGE_SHIFT)
132#define virt_addr_valid(kaddr) pfn_valid(__pa(kaddr) >> PAGE_SHIFT) 135#define virt_addr_valid(kaddr) pfn_valid(virt_to_pfn(kaddr))
133 136
134/* 137/*
135 * On Book-E parts we need __va to parse the device tree and we can't 138 * On Book-E parts we need __va to parse the device tree and we can't
@@ -204,7 +207,7 @@ extern long long virt_phys_offset;
204 * On non-Book-E PPC64 PAGE_OFFSET and MEMORY_START are constants so use 207 * On non-Book-E PPC64 PAGE_OFFSET and MEMORY_START are constants so use
205 * the other definitions for __va & __pa. 208 * the other definitions for __va & __pa.
206 */ 209 */
207#ifdef CONFIG_BOOKE 210#if defined(CONFIG_PPC32) && defined(CONFIG_BOOKE)
208#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET)) 211#define __va(x) ((void *)(unsigned long)((phys_addr_t)(x) + VIRT_PHYS_OFFSET))
209#define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET) 212#define __pa(x) ((unsigned long)(x) - VIRT_PHYS_OFFSET)
210#else 213#else
@@ -240,8 +243,8 @@ extern long long virt_phys_offset;
240#endif 243#endif
241 244
242/* align addr on a size boundary - adjust address up/down if needed */ 245/* align addr on a size boundary - adjust address up/down if needed */
243#define _ALIGN_UP(addr,size) (((addr)+((size)-1))&(~((size)-1))) 246#define _ALIGN_UP(addr, size) __ALIGN_KERNEL(addr, size)
244#define _ALIGN_DOWN(addr,size) ((addr)&(~((size)-1))) 247#define _ALIGN_DOWN(addr, size) ((addr)&(~((typeof(addr))(size)-1)))
245 248
246/* align addr on a size boundary - adjust address up if needed */ 249/* align addr on a size boundary - adjust address up if needed */
247#define _ALIGN(addr,size) _ALIGN_UP(addr,size) 250#define _ALIGN(addr,size) _ALIGN_UP(addr,size)
@@ -362,6 +365,20 @@ typedef struct { signed long pd; } hugepd_t;
362 365
363#ifdef CONFIG_HUGETLB_PAGE 366#ifdef CONFIG_HUGETLB_PAGE
364#ifdef CONFIG_PPC_BOOK3S_64 367#ifdef CONFIG_PPC_BOOK3S_64
368#ifdef CONFIG_PPC_64K_PAGES
369/*
370 * With 64k page size, we have hugepage ptes in the pgd and pmd entries. We don't
371 * need to setup hugepage directory for them. Our pte and page directory format
372 * enable us to have this enabled. But to avoid errors when implementing new
373 * features disable hugepd for 64K. We enable a debug version here, So we catch
374 * wrong usage.
375 */
376#ifdef CONFIG_DEBUG_VM
377extern int hugepd_ok(hugepd_t hpd);
378#else
379#define hugepd_ok(x) (0)
380#endif
381#else
365static inline int hugepd_ok(hugepd_t hpd) 382static inline int hugepd_ok(hugepd_t hpd)
366{ 383{
367 /* 384 /*
@@ -370,6 +387,7 @@ static inline int hugepd_ok(hugepd_t hpd)
370 */ 387 */
371 return (((hpd.pd & 0x3) == 0x0) && ((hpd.pd & HUGEPD_SHIFT_MASK) != 0)); 388 return (((hpd.pd & 0x3) == 0x0) && ((hpd.pd & HUGEPD_SHIFT_MASK) != 0));
372} 389}
390#endif
373#else 391#else
374static inline int hugepd_ok(hugepd_t hpd) 392static inline int hugepd_ok(hugepd_t hpd)
375{ 393{
diff --git a/arch/powerpc/include/asm/pgtable-ppc64.h b/arch/powerpc/include/asm/pgtable-ppc64.h
index fa1dfb7f7b48..3245f2d96d4f 100644
--- a/arch/powerpc/include/asm/pgtable-ppc64.h
+++ b/arch/powerpc/include/asm/pgtable-ppc64.h
@@ -437,9 +437,9 @@ static inline char *get_hpte_slot_array(pmd_t *pmdp)
437 437
438} 438}
439 439
440#ifdef CONFIG_TRANSPARENT_HUGEPAGE
440extern void hpte_do_hugepage_flush(struct mm_struct *mm, unsigned long addr, 441extern void hpte_do_hugepage_flush(struct mm_struct *mm, unsigned long addr,
441 pmd_t *pmdp, unsigned long old_pmd); 442 pmd_t *pmdp, unsigned long old_pmd);
442#ifdef CONFIG_TRANSPARENT_HUGEPAGE
443extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot); 443extern pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot);
444extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot); 444extern pmd_t mk_pmd(struct page *page, pgprot_t pgprot);
445extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot); 445extern pmd_t pmd_modify(pmd_t pmd, pgprot_t newprot);
@@ -479,6 +479,14 @@ static inline int pmd_trans_splitting(pmd_t pmd)
479} 479}
480 480
481extern int has_transparent_hugepage(void); 481extern int has_transparent_hugepage(void);
482#else
483static inline void hpte_do_hugepage_flush(struct mm_struct *mm,
484 unsigned long addr, pmd_t *pmdp,
485 unsigned long old_pmd)
486{
487
488 WARN(1, "%s called with THP disabled\n", __func__);
489}
482#endif /* CONFIG_TRANSPARENT_HUGEPAGE */ 490#endif /* CONFIG_TRANSPARENT_HUGEPAGE */
483 491
484static inline int pmd_large(pmd_t pmd) 492static inline int pmd_large(pmd_t pmd)
diff --git a/arch/powerpc/include/asm/pgtable.h b/arch/powerpc/include/asm/pgtable.h
index 0717693c8428..b64b4212b71f 100644
--- a/arch/powerpc/include/asm/pgtable.h
+++ b/arch/powerpc/include/asm/pgtable.h
@@ -259,15 +259,15 @@ extern int gup_hugepte(pte_t *ptep, unsigned long sz, unsigned long addr,
259#define has_transparent_hugepage() 0 259#define has_transparent_hugepage() 0
260#endif 260#endif
261pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea, 261pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
262 unsigned *shift); 262 bool *is_thp, unsigned *shift);
263static inline pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea, 263static inline pte_t *find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
264 unsigned *shift) 264 bool *is_thp, unsigned *shift)
265{ 265{
266 if (!arch_irqs_disabled()) { 266 if (!arch_irqs_disabled()) {
267 pr_info("%s called with irq enabled\n", __func__); 267 pr_info("%s called with irq enabled\n", __func__);
268 dump_stack(); 268 dump_stack();
269 } 269 }
270 return __find_linux_pte_or_hugepte(pgdir, ea, shift); 270 return __find_linux_pte_or_hugepte(pgdir, ea, is_thp, shift);
271} 271}
272#endif /* __ASSEMBLY__ */ 272#endif /* __ASSEMBLY__ */
273 273
diff --git a/arch/powerpc/include/asm/systbl.h b/arch/powerpc/include/asm/systbl.h
index 126d0c4f9b7d..c9e26cb264f4 100644
--- a/arch/powerpc/include/asm/systbl.h
+++ b/arch/powerpc/include/asm/systbl.h
@@ -370,3 +370,15 @@ COMPAT_SYS(execveat)
370PPC64ONLY(switch_endian) 370PPC64ONLY(switch_endian)
371SYSCALL_SPU(userfaultfd) 371SYSCALL_SPU(userfaultfd)
372SYSCALL_SPU(membarrier) 372SYSCALL_SPU(membarrier)
373SYSCALL(semop)
374SYSCALL(semget)
375COMPAT_SYS(semctl)
376COMPAT_SYS(semtimedop)
377COMPAT_SYS(msgsnd)
378COMPAT_SYS(msgrcv)
379SYSCALL(msgget)
380COMPAT_SYS(msgctl)
381COMPAT_SYS(shmat)
382SYSCALL(shmdt)
383SYSCALL(shmget)
384COMPAT_SYS(shmctl)
diff --git a/arch/powerpc/include/asm/unistd.h b/arch/powerpc/include/asm/unistd.h
index 13411be86041..6d8f8023ac27 100644
--- a/arch/powerpc/include/asm/unistd.h
+++ b/arch/powerpc/include/asm/unistd.h
@@ -12,7 +12,7 @@
12#include <uapi/asm/unistd.h> 12#include <uapi/asm/unistd.h>
13 13
14 14
15#define __NR_syscalls 366 15#define __NR_syscalls 378
16 16
17#define __NR__exit __NR_exit 17#define __NR__exit __NR_exit
18#define NR_syscalls __NR_syscalls 18#define NR_syscalls __NR_syscalls
diff --git a/arch/powerpc/include/uapi/asm/unistd.h b/arch/powerpc/include/uapi/asm/unistd.h
index 6337738018aa..81579e93c659 100644
--- a/arch/powerpc/include/uapi/asm/unistd.h
+++ b/arch/powerpc/include/uapi/asm/unistd.h
@@ -388,5 +388,17 @@
388#define __NR_switch_endian 363 388#define __NR_switch_endian 363
389#define __NR_userfaultfd 364 389#define __NR_userfaultfd 364
390#define __NR_membarrier 365 390#define __NR_membarrier 365
391#define __NR_semop 366
392#define __NR_semget 367
393#define __NR_semctl 368
394#define __NR_semtimedop 369
395#define __NR_msgsnd 370
396#define __NR_msgrcv 371
397#define __NR_msgget 372
398#define __NR_msgctl 373
399#define __NR_shmat 374
400#define __NR_shmdt 375
401#define __NR_shmget 376
402#define __NR_shmctl 377
391 403
392#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */ 404#endif /* _UAPI_ASM_POWERPC_UNISTD_H_ */
diff --git a/arch/powerpc/kernel/crash.c b/arch/powerpc/kernel/crash.c
index 51dbace3269b..2bb252c01f07 100644
--- a/arch/powerpc/kernel/crash.c
+++ b/arch/powerpc/kernel/crash.c
@@ -221,8 +221,8 @@ void crash_kexec_secondary(struct pt_regs *regs)
221#endif /* CONFIG_SMP */ 221#endif /* CONFIG_SMP */
222 222
223/* wait for all the CPUs to hit real mode but timeout if they don't come in */ 223/* wait for all the CPUs to hit real mode but timeout if they don't come in */
224#if defined(CONFIG_SMP) && defined(CONFIG_PPC_STD_MMU_64) 224#if defined(CONFIG_SMP) && defined(CONFIG_PPC64)
225static void crash_kexec_wait_realmode(int cpu) 225static void __maybe_unused crash_kexec_wait_realmode(int cpu)
226{ 226{
227 unsigned int msecs; 227 unsigned int msecs;
228 int i; 228 int i;
@@ -244,7 +244,7 @@ static void crash_kexec_wait_realmode(int cpu)
244} 244}
245#else 245#else
246static inline void crash_kexec_wait_realmode(int cpu) {} 246static inline void crash_kexec_wait_realmode(int cpu) {}
247#endif /* CONFIG_SMP && CONFIG_PPC_STD_MMU_64 */ 247#endif /* CONFIG_SMP && CONFIG_PPC64 */
248 248
249/* 249/*
250 * Register a function to be called on shutdown. Only use this if you 250 * Register a function to be called on shutdown. Only use this if you
diff --git a/arch/powerpc/kernel/eeh.c b/arch/powerpc/kernel/eeh.c
index e968533e3e05..40e4d4a27663 100644
--- a/arch/powerpc/kernel/eeh.c
+++ b/arch/powerpc/kernel/eeh.c
@@ -351,7 +351,8 @@ static inline unsigned long eeh_token_to_phys(unsigned long token)
351 * worried about _PAGE_SPLITTING/collapse. Also we will not hit 351 * worried about _PAGE_SPLITTING/collapse. Also we will not hit
352 * page table free, because of init_mm. 352 * page table free, because of init_mm.
353 */ 353 */
354 ptep = __find_linux_pte_or_hugepte(init_mm.pgd, token, &hugepage_shift); 354 ptep = __find_linux_pte_or_hugepte(init_mm.pgd, token,
355 NULL, &hugepage_shift);
355 if (!ptep) 356 if (!ptep)
356 return token; 357 return token;
357 WARN_ON(hugepage_shift); 358 WARN_ON(hugepage_shift);
@@ -630,7 +631,7 @@ int eeh_pci_enable(struct eeh_pe *pe, int function)
630 */ 631 */
631 switch (function) { 632 switch (function) {
632 case EEH_OPT_THAW_MMIO: 633 case EEH_OPT_THAW_MMIO:
633 active_flag = EEH_STATE_MMIO_ACTIVE; 634 active_flag = EEH_STATE_MMIO_ACTIVE | EEH_STATE_MMIO_ENABLED;
634 break; 635 break;
635 case EEH_OPT_THAW_DMA: 636 case EEH_OPT_THAW_DMA:
636 active_flag = EEH_STATE_DMA_ACTIVE; 637 active_flag = EEH_STATE_DMA_ACTIVE;
@@ -1411,8 +1412,7 @@ void eeh_dev_release(struct pci_dev *pdev)
1411 goto out; 1412 goto out;
1412 1413
1413 /* Decrease PE's pass through count */ 1414 /* Decrease PE's pass through count */
1414 atomic_dec(&edev->pe->pass_dev_cnt); 1415 WARN_ON(atomic_dec_if_positive(&edev->pe->pass_dev_cnt) < 0);
1415 WARN_ON(atomic_read(&edev->pe->pass_dev_cnt) < 0);
1416 eeh_pe_change_owner(edev->pe); 1416 eeh_pe_change_owner(edev->pe);
1417out: 1417out:
1418 mutex_unlock(&eeh_dev_mutex); 1418 mutex_unlock(&eeh_dev_mutex);
diff --git a/arch/powerpc/kernel/eeh_driver.c b/arch/powerpc/kernel/eeh_driver.c
index 89eb4bc34d3a..80dfe8965df9 100644
--- a/arch/powerpc/kernel/eeh_driver.c
+++ b/arch/powerpc/kernel/eeh_driver.c
@@ -416,7 +416,10 @@ static void *eeh_rmv_device(void *data, void *userdata)
416 driver = eeh_pcid_get(dev); 416 driver = eeh_pcid_get(dev);
417 if (driver) { 417 if (driver) {
418 eeh_pcid_put(dev); 418 eeh_pcid_put(dev);
419 if (driver->err_handler) 419 if (driver->err_handler &&
420 driver->err_handler->error_detected &&
421 driver->err_handler->slot_reset &&
422 driver->err_handler->resume)
420 return NULL; 423 return NULL;
421 } 424 }
422 425
@@ -587,10 +590,16 @@ static int eeh_reset_device(struct eeh_pe *pe, struct pci_bus *bus)
587 eeh_ops->configure_bridge(pe); 590 eeh_ops->configure_bridge(pe);
588 eeh_pe_restore_bars(pe); 591 eeh_pe_restore_bars(pe);
589 592
590 /* Clear frozen state */ 593 /*
591 rc = eeh_clear_pe_frozen_state(pe, false); 594 * If it's PHB PE, the frozen state on all available PEs should have
592 if (rc) 595 * been cleared by the PHB reset. Otherwise, we unfreeze the PE and its
593 return rc; 596 * child PEs because they might be in frozen state.
597 */
598 if (!(pe->type & EEH_PE_PHB)) {
599 rc = eeh_clear_pe_frozen_state(pe, false);
600 if (rc)
601 return rc;
602 }
594 603
595 /* Give the system 5 seconds to finish running the user-space 604 /* Give the system 5 seconds to finish running the user-space
596 * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes, 605 * hotplug shutdown scripts, e.g. ifdown for ethernet. Yes,
@@ -655,9 +664,17 @@ static void eeh_handle_normal_event(struct eeh_pe *pe)
655 * to accomplish the reset. Each child gets a report of the 664 * to accomplish the reset. Each child gets a report of the
656 * status ... if any child can't handle the reset, then the entire 665 * status ... if any child can't handle the reset, then the entire
657 * slot is dlpar removed and added. 666 * slot is dlpar removed and added.
667 *
668 * When the PHB is fenced, we have to issue a reset to recover from
669 * the error. Override the result if necessary to have partially
670 * hotplug for this case.
658 */ 671 */
659 pr_info("EEH: Notify device drivers to shutdown\n"); 672 pr_info("EEH: Notify device drivers to shutdown\n");
660 eeh_pe_dev_traverse(pe, eeh_report_error, &result); 673 eeh_pe_dev_traverse(pe, eeh_report_error, &result);
674 if ((pe->type & EEH_PE_PHB) &&
675 result != PCI_ERS_RESULT_NONE &&
676 result != PCI_ERS_RESULT_NEED_RESET)
677 result = PCI_ERS_RESULT_NEED_RESET;
661 678
662 /* Get the current PCI slot state. This can take a long time, 679 /* Get the current PCI slot state. This can take a long time,
663 * sometimes over 300 seconds for certain systems. 680 * sometimes over 300 seconds for certain systems.
diff --git a/arch/powerpc/kernel/exceptions-64e.S b/arch/powerpc/kernel/exceptions-64e.S
index f3bd5e747ed8..488e6314f993 100644
--- a/arch/powerpc/kernel/exceptions-64e.S
+++ b/arch/powerpc/kernel/exceptions-64e.S
@@ -542,8 +542,8 @@ interrupt_base_book3e: /* fake trap */
542 EXCEPTION_STUB(0x320, ehpriv) 542 EXCEPTION_STUB(0x320, ehpriv)
543 EXCEPTION_STUB(0x340, lrat_error) 543 EXCEPTION_STUB(0x340, lrat_error)
544 544
545 .globl interrupt_end_book3e 545 .globl __end_interrupts
546interrupt_end_book3e: 546__end_interrupts:
547 547
548/* Critical Input Interrupt */ 548/* Critical Input Interrupt */
549 START_EXCEPTION(critical_input); 549 START_EXCEPTION(critical_input);
@@ -736,7 +736,7 @@ END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
736 beq+ 1f 736 beq+ 1f
737 737
738 LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) 738 LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e)
739 LOAD_REG_IMMEDIATE(r15,interrupt_end_book3e) 739 LOAD_REG_IMMEDIATE(r15,__end_interrupts)
740 cmpld cr0,r10,r14 740 cmpld cr0,r10,r14
741 cmpld cr1,r10,r15 741 cmpld cr1,r10,r15
742 blt+ cr0,1f 742 blt+ cr0,1f
@@ -800,7 +800,7 @@ kernel_dbg_exc:
800 beq+ 1f 800 beq+ 1f
801 801
802 LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e) 802 LOAD_REG_IMMEDIATE(r14,interrupt_base_book3e)
803 LOAD_REG_IMMEDIATE(r15,interrupt_end_book3e) 803 LOAD_REG_IMMEDIATE(r15,__end_interrupts)
804 cmpld cr0,r10,r14 804 cmpld cr0,r10,r14
805 cmpld cr1,r10,r15 805 cmpld cr1,r10,r15
806 blt+ cr0,1f 806 blt+ cr0,1f
@@ -1351,7 +1351,10 @@ skpinv: addi r6,r6,1 /* Increment */
1351 * r4 = MAS0 w/TLBSEL & ESEL for the temp mapping 1351 * r4 = MAS0 w/TLBSEL & ESEL for the temp mapping
1352 */ 1352 */
1353 /* Now we branch the new virtual address mapped by this entry */ 1353 /* Now we branch the new virtual address mapped by this entry */
1354 LOAD_REG_IMMEDIATE(r6,2f) 1354 bl 1f /* Find our address */
13551: mflr r6
1356 addi r6,r6,(2f - 1b)
1357 tovirt(r6,r6)
1355 lis r7,MSR_KERNEL@h 1358 lis r7,MSR_KERNEL@h
1356 ori r7,r7,MSR_KERNEL@l 1359 ori r7,r7,MSR_KERNEL@l
1357 mtspr SPRN_SRR0,r6 1360 mtspr SPRN_SRR0,r6
@@ -1583,9 +1586,11 @@ _GLOBAL(book3e_secondary_thread_init)
1583 mflr r28 1586 mflr r28
1584 b 3b 1587 b 3b
1585 1588
1589 .globl init_core_book3e
1586init_core_book3e: 1590init_core_book3e:
1587 /* Establish the interrupt vector base */ 1591 /* Establish the interrupt vector base */
1588 LOAD_REG_IMMEDIATE(r3, interrupt_base_book3e) 1592 tovirt(r2,r2)
1593 LOAD_REG_ADDR(r3, interrupt_base_book3e)
1589 mtspr SPRN_IVPR,r3 1594 mtspr SPRN_IVPR,r3
1590 sync 1595 sync
1591 blr 1596 blr
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index d48125d0c048..1b779560728f 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -182,6 +182,8 @@ exception_marker:
182 182
183#ifdef CONFIG_PPC_BOOK3E 183#ifdef CONFIG_PPC_BOOK3E
184_GLOBAL(fsl_secondary_thread_init) 184_GLOBAL(fsl_secondary_thread_init)
185 mfspr r4,SPRN_BUCSR
186
185 /* Enable branch prediction */ 187 /* Enable branch prediction */
186 lis r3,BUCSR_INIT@h 188 lis r3,BUCSR_INIT@h
187 ori r3,r3,BUCSR_INIT@l 189 ori r3,r3,BUCSR_INIT@l
@@ -196,10 +198,24 @@ _GLOBAL(fsl_secondary_thread_init)
196 * number. There are two threads per core, so shift everything 198 * number. There are two threads per core, so shift everything
197 * but the low bit right by two bits so that the cpu numbering is 199 * but the low bit right by two bits so that the cpu numbering is
198 * continuous. 200 * continuous.
201 *
202 * If the old value of BUCSR is non-zero, this thread has run
203 * before. Thus, we assume we are coming from kexec or a similar
204 * scenario, and PIR is already set to the correct value. This
205 * is a bit of a hack, but there are limited opportunities for
206 * getting information into the thread and the alternatives
207 * seemed like they'd be overkill. We can't tell just by looking
208 * at the old PIR value which state it's in, since the same value
209 * could be valid for one thread out of reset and for a different
210 * thread in Linux.
199 */ 211 */
212
200 mfspr r3, SPRN_PIR 213 mfspr r3, SPRN_PIR
214 cmpwi r4,0
215 bne 1f
201 rlwimi r3, r3, 30, 2, 30 216 rlwimi r3, r3, 30, 2, 30
202 mtspr SPRN_PIR, r3 217 mtspr SPRN_PIR, r3
2181:
203#endif 219#endif
204 220
205_GLOBAL(generic_secondary_thread_init) 221_GLOBAL(generic_secondary_thread_init)
@@ -441,12 +457,22 @@ __after_prom_start:
441 /* process relocations for the final address of the kernel */ 457 /* process relocations for the final address of the kernel */
442 lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */ 458 lis r25,PAGE_OFFSET@highest /* compute virtual base of kernel */
443 sldi r25,r25,32 459 sldi r25,r25,32
460#if defined(CONFIG_PPC_BOOK3E)
461 tovirt(r26,r26) /* on booke, we already run at PAGE_OFFSET */
462#endif
444 lwz r7,__run_at_load-_stext(r26) 463 lwz r7,__run_at_load-_stext(r26)
464#if defined(CONFIG_PPC_BOOK3E)
465 tophys(r26,r26)
466#endif
445 cmplwi cr0,r7,1 /* flagged to stay where we are ? */ 467 cmplwi cr0,r7,1 /* flagged to stay where we are ? */
446 bne 1f 468 bne 1f
447 add r25,r25,r26 469 add r25,r25,r26
4481: mr r3,r25 4701: mr r3,r25
449 bl relocate 471 bl relocate
472#if defined(CONFIG_PPC_BOOK3E)
473 /* IVPR needs to be set after relocation. */
474 bl init_core_book3e
475#endif
450#endif 476#endif
451 477
452/* 478/*
@@ -458,15 +484,15 @@ __after_prom_start:
458 */ 484 */
459 li r3,0 /* target addr */ 485 li r3,0 /* target addr */
460#ifdef CONFIG_PPC_BOOK3E 486#ifdef CONFIG_PPC_BOOK3E
461 tovirt(r3,r3) /* on booke, we already run at PAGE_OFFSET */ 487 tovirt(r3,r3) /* on booke, we already run at PAGE_OFFSET */
462#endif 488#endif
463 mr. r4,r26 /* In some cases the loader may */ 489 mr. r4,r26 /* In some cases the loader may */
490#if defined(CONFIG_PPC_BOOK3E)
491 tovirt(r4,r4)
492#endif
464 beq 9f /* have already put us at zero */ 493 beq 9f /* have already put us at zero */
465 li r6,0x100 /* Start offset, the first 0x100 */ 494 li r6,0x100 /* Start offset, the first 0x100 */
466 /* bytes were copied earlier. */ 495 /* bytes were copied earlier. */
467#ifdef CONFIG_PPC_BOOK3E
468 tovirt(r6,r6) /* on booke, we already run at PAGE_OFFSET */
469#endif
470 496
471#ifdef CONFIG_RELOCATABLE 497#ifdef CONFIG_RELOCATABLE
472/* 498/*
@@ -474,12 +500,21 @@ __after_prom_start:
474 * variable __run_at_load, if it is set the kernel is treated as relocatable 500 * variable __run_at_load, if it is set the kernel is treated as relocatable
475 * kernel, otherwise it will be moved to PHYSICAL_START 501 * kernel, otherwise it will be moved to PHYSICAL_START
476 */ 502 */
503#if defined(CONFIG_PPC_BOOK3E)
504 tovirt(r26,r26) /* on booke, we already run at PAGE_OFFSET */
505#endif
477 lwz r7,__run_at_load-_stext(r26) 506 lwz r7,__run_at_load-_stext(r26)
478 cmplwi cr0,r7,1 507 cmplwi cr0,r7,1
479 bne 3f 508 bne 3f
480 509
510#ifdef CONFIG_PPC_BOOK3E
511 LOAD_REG_ADDR(r5, __end_interrupts)
512 LOAD_REG_ADDR(r11, _stext)
513 sub r5,r5,r11
514#else
481 /* just copy interrupts */ 515 /* just copy interrupts */
482 LOAD_REG_IMMEDIATE(r5, __end_interrupts - _stext) 516 LOAD_REG_IMMEDIATE(r5, __end_interrupts - _stext)
517#endif
483 b 5f 518 b 5f
4843: 5193:
485#endif 520#endif
diff --git a/arch/powerpc/kernel/io-workarounds.c b/arch/powerpc/kernel/io-workarounds.c
index 63d9cc4d7366..5f8613ceb97f 100644
--- a/arch/powerpc/kernel/io-workarounds.c
+++ b/arch/powerpc/kernel/io-workarounds.c
@@ -76,7 +76,7 @@ struct iowa_bus *iowa_mem_find_bus(const PCI_IO_ADDR addr)
76 * a page table free due to init_mm 76 * a page table free due to init_mm
77 */ 77 */
78 ptep = __find_linux_pte_or_hugepte(init_mm.pgd, vaddr, 78 ptep = __find_linux_pte_or_hugepte(init_mm.pgd, vaddr,
79 &hugepage_shift); 79 NULL, &hugepage_shift);
80 if (ptep == NULL) 80 if (ptep == NULL)
81 paddr = 0; 81 paddr = 0;
82 else { 82 else {
diff --git a/arch/powerpc/kernel/machine_kexec_64.c b/arch/powerpc/kernel/machine_kexec_64.c
index 1a74446fd9e5..0fbd75d185d7 100644
--- a/arch/powerpc/kernel/machine_kexec_64.c
+++ b/arch/powerpc/kernel/machine_kexec_64.c
@@ -30,6 +30,21 @@
30#include <asm/smp.h> 30#include <asm/smp.h>
31#include <asm/hw_breakpoint.h> 31#include <asm/hw_breakpoint.h>
32 32
33#ifdef CONFIG_PPC_BOOK3E
34int default_machine_kexec_prepare(struct kimage *image)
35{
36 int i;
37 /*
38 * Since we use the kernel fault handlers and paging code to
39 * handle the virtual mode, we must make sure no destination
40 * overlaps kernel static data or bss.
41 */
42 for (i = 0; i < image->nr_segments; i++)
43 if (image->segment[i].mem < __pa(_end))
44 return -ETXTBSY;
45 return 0;
46}
47#else
33int default_machine_kexec_prepare(struct kimage *image) 48int default_machine_kexec_prepare(struct kimage *image)
34{ 49{
35 int i; 50 int i;
@@ -95,6 +110,7 @@ int default_machine_kexec_prepare(struct kimage *image)
95 110
96 return 0; 111 return 0;
97} 112}
113#endif /* !CONFIG_PPC_BOOK3E */
98 114
99static void copy_segments(unsigned long ind) 115static void copy_segments(unsigned long ind)
100{ 116{
@@ -365,6 +381,7 @@ void default_machine_kexec(struct kimage *image)
365 /* NOTREACHED */ 381 /* NOTREACHED */
366} 382}
367 383
384#ifndef CONFIG_PPC_BOOK3E
368/* Values we need to export to the second kernel via the device tree. */ 385/* Values we need to export to the second kernel via the device tree. */
369static unsigned long htab_base; 386static unsigned long htab_base;
370static unsigned long htab_size; 387static unsigned long htab_size;
@@ -411,3 +428,4 @@ static int __init export_htab_values(void)
411 return 0; 428 return 0;
412} 429}
413late_initcall(export_htab_values); 430late_initcall(export_htab_values);
431#endif /* !CONFIG_PPC_BOOK3E */
diff --git a/arch/powerpc/kernel/misc_64.S b/arch/powerpc/kernel/misc_64.S
index 6e4168cf4698..db475d41b57a 100644
--- a/arch/powerpc/kernel/misc_64.S
+++ b/arch/powerpc/kernel/misc_64.S
@@ -26,6 +26,7 @@
26#include <asm/thread_info.h> 26#include <asm/thread_info.h>
27#include <asm/kexec.h> 27#include <asm/kexec.h>
28#include <asm/ptrace.h> 28#include <asm/ptrace.h>
29#include <asm/mmu.h>
29 30
30 .text 31 .text
31 32
@@ -484,6 +485,8 @@ _GLOBAL(kexec_wait)
484 mtsrr1 r11 485 mtsrr1 r11
485 rfid 486 rfid
486#else 487#else
488 /* Create TLB entry in book3e_secondary_core_init */
489 li r4,0
487 ba 0x60 490 ba 0x60
488#endif 491#endif
489#endif 492#endif
@@ -496,6 +499,51 @@ kexec_flag:
496 499
497 500
498#ifdef CONFIG_KEXEC 501#ifdef CONFIG_KEXEC
502#ifdef CONFIG_PPC_BOOK3E
503/*
504 * BOOK3E has no real MMU mode, so we have to setup the initial TLB
505 * for a core to identity map v:0 to p:0. This current implementation
506 * assumes that 1G is enough for kexec.
507 */
508kexec_create_tlb:
509 /*
510 * Invalidate all non-IPROT TLB entries to avoid any TLB conflict.
511 * IPROT TLB entries should be >= PAGE_OFFSET and thus not conflict.
512 */
513 PPC_TLBILX_ALL(0,R0)
514 sync
515 isync
516
517 mfspr r10,SPRN_TLB1CFG
518 andi. r10,r10,TLBnCFG_N_ENTRY /* Extract # entries */
519 subi r10,r10,1 /* Last entry: no conflict with kernel text */
520 lis r9,MAS0_TLBSEL(1)@h
521 rlwimi r9,r10,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r9) */
522
523/* Set up a temp identity mapping v:0 to p:0 and return to it. */
524#if defined(CONFIG_SMP) || defined(CONFIG_PPC_E500MC)
525#define M_IF_NEEDED MAS2_M
526#else
527#define M_IF_NEEDED 0
528#endif
529 mtspr SPRN_MAS0,r9
530
531 lis r9,(MAS1_VALID|MAS1_IPROT)@h
532 ori r9,r9,(MAS1_TSIZE(BOOK3E_PAGESZ_1GB))@l
533 mtspr SPRN_MAS1,r9
534
535 LOAD_REG_IMMEDIATE(r9, 0x0 | M_IF_NEEDED)
536 mtspr SPRN_MAS2,r9
537
538 LOAD_REG_IMMEDIATE(r9, 0x0 | MAS3_SR | MAS3_SW | MAS3_SX)
539 mtspr SPRN_MAS3,r9
540 li r9,0
541 mtspr SPRN_MAS7,r9
542
543 tlbwe
544 isync
545 blr
546#endif
499 547
500/* kexec_smp_wait(void) 548/* kexec_smp_wait(void)
501 * 549 *
@@ -525,6 +573,10 @@ _GLOBAL(kexec_smp_wait)
525 * don't overwrite r3 here, it is live for kexec_wait above. 573 * don't overwrite r3 here, it is live for kexec_wait above.
526 */ 574 */
527real_mode: /* assume normal blr return */ 575real_mode: /* assume normal blr return */
576#ifdef CONFIG_PPC_BOOK3E
577 /* Create an identity mapping. */
578 b kexec_create_tlb
579#else
5281: li r9,MSR_RI 5801: li r9,MSR_RI
529 li r10,MSR_DR|MSR_IR 581 li r10,MSR_DR|MSR_IR
530 mflr r11 /* return address to SRR0 */ 582 mflr r11 /* return address to SRR0 */
@@ -536,7 +588,7 @@ real_mode: /* assume normal blr return */
536 mtspr SPRN_SRR1,r10 588 mtspr SPRN_SRR1,r10
537 mtspr SPRN_SRR0,r11 589 mtspr SPRN_SRR0,r11
538 rfid 590 rfid
539 591#endif
540 592
541/* 593/*
542 * kexec_sequence(newstack, start, image, control, clear_all()) 594 * kexec_sequence(newstack, start, image, control, clear_all())
@@ -579,9 +631,13 @@ _GLOBAL(kexec_sequence)
579 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */ 631 lhz r25,PACAHWCPUID(r13) /* get our phys cpu from paca */
580 632
581 /* disable interrupts, we are overwriting kernel data next */ 633 /* disable interrupts, we are overwriting kernel data next */
634#ifdef CONFIG_PPC_BOOK3E
635 wrteei 0
636#else
582 mfmsr r3 637 mfmsr r3
583 rlwinm r3,r3,0,17,15 638 rlwinm r3,r3,0,17,15
584 mtmsrd r3,1 639 mtmsrd r3,1
640#endif
585 641
586 /* copy dest pages, flush whole dest image */ 642 /* copy dest pages, flush whole dest image */
587 mr r3,r29 643 mr r3,r29
@@ -603,6 +659,7 @@ _GLOBAL(kexec_sequence)
603 li r6,1 659 li r6,1
604 stw r6,kexec_flag-1b(5) 660 stw r6,kexec_flag-1b(5)
605 661
662#ifndef CONFIG_PPC_BOOK3E
606 /* clear out hardware hash page table and tlb */ 663 /* clear out hardware hash page table and tlb */
607#if !defined(_CALL_ELF) || _CALL_ELF != 2 664#if !defined(_CALL_ELF) || _CALL_ELF != 2
608 ld r12,0(r27) /* deref function descriptor */ 665 ld r12,0(r27) /* deref function descriptor */
@@ -611,6 +668,7 @@ _GLOBAL(kexec_sequence)
611#endif 668#endif
612 mtctr r12 669 mtctr r12
613 bctrl /* ppc_md.hpte_clear_all(void); */ 670 bctrl /* ppc_md.hpte_clear_all(void); */
671#endif /* !CONFIG_PPC_BOOK3E */
614 672
615/* 673/*
616 * kexec image calling is: 674 * kexec image calling is:
diff --git a/arch/powerpc/kernel/nvram_64.c b/arch/powerpc/kernel/nvram_64.c
index 98ba106a59ef..32e26526f7e4 100644
--- a/arch/powerpc/kernel/nvram_64.c
+++ b/arch/powerpc/kernel/nvram_64.c
@@ -1065,7 +1065,7 @@ loff_t __init nvram_create_partition(const char *name, int sig,
1065 /* Create our OS partition */ 1065 /* Create our OS partition */
1066 new_part = kmalloc(sizeof(*new_part), GFP_KERNEL); 1066 new_part = kmalloc(sizeof(*new_part), GFP_KERNEL);
1067 if (!new_part) { 1067 if (!new_part) {
1068 pr_err("nvram_create_os_partition: kmalloc failed\n"); 1068 pr_err("%s: kmalloc failed\n", __func__);
1069 return -ENOMEM; 1069 return -ENOMEM;
1070 } 1070 }
1071 1071
@@ -1077,8 +1077,8 @@ loff_t __init nvram_create_partition(const char *name, int sig,
1077 1077
1078 rc = nvram_write_header(new_part); 1078 rc = nvram_write_header(new_part);
1079 if (rc <= 0) { 1079 if (rc <= 0) {
1080 pr_err("nvram_create_os_partition: nvram_write_header " 1080 pr_err("%s: nvram_write_header failed (%d)\n", __func__, rc);
1081 "failed (%d)\n", rc); 1081 kfree(new_part);
1082 return rc; 1082 return rc;
1083 } 1083 }
1084 list_add_tail(&new_part->partition, &free_part->partition); 1084 list_add_tail(&new_part->partition, &free_part->partition);
@@ -1090,8 +1090,8 @@ loff_t __init nvram_create_partition(const char *name, int sig,
1090 free_part->header.checksum = nvram_checksum(&free_part->header); 1090 free_part->header.checksum = nvram_checksum(&free_part->header);
1091 rc = nvram_write_header(free_part); 1091 rc = nvram_write_header(free_part);
1092 if (rc <= 0) { 1092 if (rc <= 0) {
1093 pr_err("nvram_create_os_partition: nvram_write_header " 1093 pr_err("%s: nvram_write_header failed (%d)\n",
1094 "failed (%d)\n", rc); 1094 __func__, rc);
1095 return rc; 1095 return rc;
1096 } 1096 }
1097 } else { 1097 } else {
@@ -1105,11 +1105,12 @@ loff_t __init nvram_create_partition(const char *name, int sig,
1105 tmp_index += NVRAM_BLOCK_LEN) { 1105 tmp_index += NVRAM_BLOCK_LEN) {
1106 rc = ppc_md.nvram_write(nv_init_vals, NVRAM_BLOCK_LEN, &tmp_index); 1106 rc = ppc_md.nvram_write(nv_init_vals, NVRAM_BLOCK_LEN, &tmp_index);
1107 if (rc <= 0) { 1107 if (rc <= 0) {
1108 pr_err("nvram_create_partition: nvram_write failed (%d)\n", rc); 1108 pr_err("%s: nvram_write failed (%d)\n",
1109 __func__, rc);
1109 return rc; 1110 return rc;
1110 } 1111 }
1111 } 1112 }
1112 1113
1113 return new_part->index + NVRAM_HEADER_LEN; 1114 return new_part->index + NVRAM_HEADER_LEN;
1114} 1115}
1115 1116
diff --git a/arch/powerpc/kernel/paca.c b/arch/powerpc/kernel/paca.c
index 5a23b69f8129..01ea0edf0579 100644
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -204,14 +204,19 @@ static int __initdata paca_size;
204 204
205void __init allocate_pacas(void) 205void __init allocate_pacas(void)
206{ 206{
207 int cpu, limit; 207 u64 limit;
208 int cpu;
208 209
210 limit = ppc64_rma_size;
211
212#ifdef CONFIG_PPC_BOOK3S_64
209 /* 213 /*
210 * We can't take SLB misses on the paca, and we want to access them 214 * We can't take SLB misses on the paca, and we want to access them
211 * in real mode, so allocate them within the RMA and also within 215 * in real mode, so allocate them within the RMA and also within
212 * the first segment. 216 * the first segment.
213 */ 217 */
214 limit = min(0x10000000ULL, ppc64_rma_size); 218 limit = min(0x10000000ULL, limit);
219#endif
215 220
216 paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids); 221 paca_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids);
217 222
diff --git a/arch/powerpc/kernel/pci-common.c b/arch/powerpc/kernel/pci-common.c
index 7587b2ae5f77..0f7a60f1e9f6 100644
--- a/arch/powerpc/kernel/pci-common.c
+++ b/arch/powerpc/kernel/pci-common.c
@@ -100,6 +100,7 @@ void pcibios_free_controller(struct pci_controller *phb)
100 if (phb->is_dynamic) 100 if (phb->is_dynamic)
101 kfree(phb); 101 kfree(phb);
102} 102}
103EXPORT_SYMBOL_GPL(pcibios_free_controller);
103 104
104/* 105/*
105 * The function is used to return the minimal alignment 106 * The function is used to return the minimal alignment
diff --git a/arch/powerpc/kernel/prom.c b/arch/powerpc/kernel/prom.c
index bef76c5033e4..7030b035905d 100644
--- a/arch/powerpc/kernel/prom.c
+++ b/arch/powerpc/kernel/prom.c
@@ -783,17 +783,19 @@ void __init early_get_first_memblock_info(void *params, phys_addr_t *size)
783int of_get_ibm_chip_id(struct device_node *np) 783int of_get_ibm_chip_id(struct device_node *np)
784{ 784{
785 of_node_get(np); 785 of_node_get(np);
786 while(np) { 786 while (np) {
787 struct device_node *old = np; 787 u32 chip_id;
788 const __be32 *prop;
789 788
790 prop = of_get_property(np, "ibm,chip-id", NULL); 789 /*
791 if (prop) { 790 * Skiboot may produce memory nodes that contain more than one
791 * cell in chip-id, we only read the first one here.
792 */
793 if (!of_property_read_u32(np, "ibm,chip-id", &chip_id)) {
792 of_node_put(np); 794 of_node_put(np);
793 return be32_to_cpup(prop); 795 return chip_id;
794 } 796 }
795 np = of_get_parent(np); 797
796 of_node_put(old); 798 np = of_get_next_parent(np);
797 } 799 }
798 return -1; 800 return -1;
799} 801}
diff --git a/arch/powerpc/kernel/setup_64.c b/arch/powerpc/kernel/setup_64.c
index bdcbb716f4d6..5c03a6a9b054 100644
--- a/arch/powerpc/kernel/setup_64.c
+++ b/arch/powerpc/kernel/setup_64.c
@@ -108,6 +108,14 @@ static void setup_tlb_core_data(void)
108 for_each_possible_cpu(cpu) { 108 for_each_possible_cpu(cpu) {
109 int first = cpu_first_thread_sibling(cpu); 109 int first = cpu_first_thread_sibling(cpu);
110 110
111 /*
112 * If we boot via kdump on a non-primary thread,
113 * make sure we point at the thread that actually
114 * set up this TLB.
115 */
116 if (cpu_first_thread_sibling(boot_cpuid) == first)
117 first = boot_cpuid;
118
111 paca[cpu].tcd_ptr = &paca[first].tcd; 119 paca[cpu].tcd_ptr = &paca[first].tcd;
112 120
113 /* 121 /*
@@ -332,11 +340,26 @@ void early_setup_secondary(void)
332#endif /* CONFIG_SMP */ 340#endif /* CONFIG_SMP */
333 341
334#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC) 342#if defined(CONFIG_SMP) || defined(CONFIG_KEXEC)
343static bool use_spinloop(void)
344{
345 if (!IS_ENABLED(CONFIG_PPC_BOOK3E))
346 return true;
347
348 /*
349 * When book3e boots from kexec, the ePAPR spin table does
350 * not get used.
351 */
352 return of_property_read_bool(of_chosen, "linux,booted-from-kexec");
353}
354
335void smp_release_cpus(void) 355void smp_release_cpus(void)
336{ 356{
337 unsigned long *ptr; 357 unsigned long *ptr;
338 int i; 358 int i;
339 359
360 if (!use_spinloop())
361 return;
362
340 DBG(" -> smp_release_cpus()\n"); 363 DBG(" -> smp_release_cpus()\n");
341 364
342 /* All secondary cpus are spinning on a common spinloop, release them 365 /* All secondary cpus are spinning on a common spinloop, release them
@@ -516,7 +539,7 @@ void __init setup_system(void)
516 * Freescale Book3e parts spin in a loop provided by firmware, 539 * Freescale Book3e parts spin in a loop provided by firmware,
517 * so smp_release_cpus() does nothing for them 540 * so smp_release_cpus() does nothing for them
518 */ 541 */
519#if defined(CONFIG_SMP) && !defined(CONFIG_PPC_FSL_BOOK3E) 542#if defined(CONFIG_SMP)
520 /* Release secondary cpus out of their spinloops at 0x60 now that 543 /* Release secondary cpus out of their spinloops at 0x60 now that
521 * we can map physical -> logical CPU ids 544 * we can map physical -> logical CPU ids
522 */ 545 */
diff --git a/arch/powerpc/kernel/vdso32/Makefile b/arch/powerpc/kernel/vdso32/Makefile
index 53e6c9b979ec..6abffb7a8cd9 100644
--- a/arch/powerpc/kernel/vdso32/Makefile
+++ b/arch/powerpc/kernel/vdso32/Makefile
@@ -18,7 +18,7 @@ GCOV_PROFILE := n
18 18
19ccflags-y := -shared -fno-common -fno-builtin 19ccflags-y := -shared -fno-common -fno-builtin
20ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \ 20ccflags-y += -nostdlib -Wl,-soname=linux-vdso32.so.1 \
21 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 21 $(call cc-ldoption, -Wl$(comma)--hash-style=both)
22asflags-y := -D__VDSO32__ -s 22asflags-y := -D__VDSO32__ -s
23 23
24obj-y += vdso32_wrapper.o 24obj-y += vdso32_wrapper.o
diff --git a/arch/powerpc/kernel/vdso32/datapage.S b/arch/powerpc/kernel/vdso32/datapage.S
index dc21e891d2e7..59cf5f452879 100644
--- a/arch/powerpc/kernel/vdso32/datapage.S
+++ b/arch/powerpc/kernel/vdso32/datapage.S
@@ -16,6 +16,10 @@
16#include <asm/vdso.h> 16#include <asm/vdso.h>
17 17
18 .text 18 .text
19 .global __kernel_datapage_offset;
20__kernel_datapage_offset:
21 .long 0
22
19V_FUNCTION_BEGIN(__get_datapage) 23V_FUNCTION_BEGIN(__get_datapage)
20 .cfi_startproc 24 .cfi_startproc
21 /* We don't want that exposed or overridable as we want other objects 25 /* We don't want that exposed or overridable as we want other objects
@@ -27,13 +31,11 @@ V_FUNCTION_BEGIN(__get_datapage)
27 mflr r0 31 mflr r0
28 .cfi_register lr,r0 32 .cfi_register lr,r0
29 33
30 bcl 20,31,1f 34 bcl 20,31,data_page_branch
31 .global __kernel_datapage_offset; 35data_page_branch:
32__kernel_datapage_offset:
33 .long 0
341:
35 mflr r3 36 mflr r3
36 mtlr r0 37 mtlr r0
38 addi r3, r3, __kernel_datapage_offset-data_page_branch
37 lwz r0,0(r3) 39 lwz r0,0(r3)
38 add r3,r0,r3 40 add r3,r0,r3
39 blr 41 blr
diff --git a/arch/powerpc/kernel/vdso64/Makefile b/arch/powerpc/kernel/vdso64/Makefile
index effca9404b17..8c8f2ae43935 100644
--- a/arch/powerpc/kernel/vdso64/Makefile
+++ b/arch/powerpc/kernel/vdso64/Makefile
@@ -11,7 +11,7 @@ GCOV_PROFILE := n
11 11
12ccflags-y := -shared -fno-common -fno-builtin 12ccflags-y := -shared -fno-common -fno-builtin
13ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \ 13ccflags-y += -nostdlib -Wl,-soname=linux-vdso64.so.1 \
14 $(call cc-ldoption, -Wl$(comma)--hash-style=sysv) 14 $(call cc-ldoption, -Wl$(comma)--hash-style=both)
15asflags-y := -D__VDSO64__ -s 15asflags-y := -D__VDSO64__ -s
16 16
17obj-y += vdso64_wrapper.o 17obj-y += vdso64_wrapper.o
diff --git a/arch/powerpc/kernel/vdso64/datapage.S b/arch/powerpc/kernel/vdso64/datapage.S
index 79796de11737..2f01c4a0d8a0 100644
--- a/arch/powerpc/kernel/vdso64/datapage.S
+++ b/arch/powerpc/kernel/vdso64/datapage.S
@@ -16,6 +16,10 @@
16#include <asm/vdso.h> 16#include <asm/vdso.h>
17 17
18 .text 18 .text
19.global __kernel_datapage_offset;
20__kernel_datapage_offset:
21 .long 0
22
19V_FUNCTION_BEGIN(__get_datapage) 23V_FUNCTION_BEGIN(__get_datapage)
20 .cfi_startproc 24 .cfi_startproc
21 /* We don't want that exposed or overridable as we want other objects 25 /* We don't want that exposed or overridable as we want other objects
@@ -27,13 +31,11 @@ V_FUNCTION_BEGIN(__get_datapage)
27 mflr r0 31 mflr r0
28 .cfi_register lr,r0 32 .cfi_register lr,r0
29 33
30 bcl 20,31,1f 34 bcl 20,31,data_page_branch
31 .global __kernel_datapage_offset; 35data_page_branch:
32__kernel_datapage_offset:
33 .long 0
341:
35 mflr r3 36 mflr r3
36 mtlr r0 37 mtlr r0
38 addi r3, r3, __kernel_datapage_offset-data_page_branch
37 lwz r0,0(r3) 39 lwz r0,0(r3)
38 add r3,r0,r3 40 add r3,r0,r3
39 blr 41 blr
diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index 1db685104ffc..d41fd0af8980 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -183,6 +183,12 @@ SECTIONS
183 *(.rela*) 183 *(.rela*)
184 } 184 }
185#endif 185#endif
186 /* .exit.data is discarded at runtime, not link time,
187 * to deal with references from .exit.text
188 */
189 .exit.data : AT(ADDR(.exit.data) - LOAD_OFFSET) {
190 EXIT_DATA
191 }
186 192
187 /* freed after init ends here */ 193 /* freed after init ends here */
188 . = ALIGN(PAGE_SIZE); 194 . = ALIGN(PAGE_SIZE);
diff --git a/arch/powerpc/kvm/book3s_64_mmu_hv.c b/arch/powerpc/kvm/book3s_64_mmu_hv.c
index 10722b1e38b5..fb37290a57b4 100644
--- a/arch/powerpc/kvm/book3s_64_mmu_hv.c
+++ b/arch/powerpc/kvm/book3s_64_mmu_hv.c
@@ -544,7 +544,7 @@ int kvmppc_book3s_hv_page_fault(struct kvm_run *run, struct kvm_vcpu *vcpu,
544 */ 544 */
545 local_irq_save(flags); 545 local_irq_save(flags);
546 ptep = find_linux_pte_or_hugepte(current->mm->pgd, 546 ptep = find_linux_pte_or_hugepte(current->mm->pgd,
547 hva, NULL); 547 hva, NULL, NULL);
548 if (ptep) { 548 if (ptep) {
549 pte = kvmppc_read_update_linux_pte(ptep, 1); 549 pte = kvmppc_read_update_linux_pte(ptep, 1);
550 if (pte_write(pte)) 550 if (pte_write(pte))
diff --git a/arch/powerpc/kvm/book3s_hv_rm_mmu.c b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
index 97e7f8c853d8..91700518bbf3 100644
--- a/arch/powerpc/kvm/book3s_hv_rm_mmu.c
+++ b/arch/powerpc/kvm/book3s_hv_rm_mmu.c
@@ -32,7 +32,7 @@ static void *real_vmalloc_addr(void *x)
32 * So don't worry about THP collapse/split. Called 32 * So don't worry about THP collapse/split. Called
33 * Only in realmode, hence won't need irq_save/restore. 33 * Only in realmode, hence won't need irq_save/restore.
34 */ 34 */
35 p = __find_linux_pte_or_hugepte(swapper_pg_dir, addr, NULL); 35 p = __find_linux_pte_or_hugepte(swapper_pg_dir, addr, NULL, NULL);
36 if (!p || !pte_present(*p)) 36 if (!p || !pte_present(*p))
37 return NULL; 37 return NULL;
38 addr = (pte_pfn(*p) << PAGE_SHIFT) | (addr & ~PAGE_MASK); 38 addr = (pte_pfn(*p) << PAGE_SHIFT) | (addr & ~PAGE_MASK);
@@ -221,10 +221,12 @@ long kvmppc_do_h_enter(struct kvm *kvm, unsigned long flags,
221 * retry via mmu_notifier_retry. 221 * retry via mmu_notifier_retry.
222 */ 222 */
223 if (realmode) 223 if (realmode)
224 ptep = __find_linux_pte_or_hugepte(pgdir, hva, &hpage_shift); 224 ptep = __find_linux_pte_or_hugepte(pgdir, hva, NULL,
225 &hpage_shift);
225 else { 226 else {
226 local_irq_save(irq_flags); 227 local_irq_save(irq_flags);
227 ptep = find_linux_pte_or_hugepte(pgdir, hva, &hpage_shift); 228 ptep = find_linux_pte_or_hugepte(pgdir, hva, NULL,
229 &hpage_shift);
228 } 230 }
229 if (ptep) { 231 if (ptep) {
230 pte_t pte; 232 pte_t pte;
diff --git a/arch/powerpc/kvm/e500_mmu_host.c b/arch/powerpc/kvm/e500_mmu_host.c
index 5e2102c19586..34c43fff4adb 100644
--- a/arch/powerpc/kvm/e500_mmu_host.c
+++ b/arch/powerpc/kvm/e500_mmu_host.c
@@ -476,7 +476,7 @@ static inline int kvmppc_e500_shadow_map(struct kvmppc_vcpu_e500 *vcpu_e500,
476 * can't run hence pfn won't change. 476 * can't run hence pfn won't change.
477 */ 477 */
478 local_irq_save(flags); 478 local_irq_save(flags);
479 ptep = find_linux_pte_or_hugepte(pgdir, hva, NULL); 479 ptep = find_linux_pte_or_hugepte(pgdir, hva, NULL, NULL);
480 if (ptep) { 480 if (ptep) {
481 pte_t pte = READ_ONCE(*ptep); 481 pte_t pte = READ_ONCE(*ptep);
482 482
diff --git a/arch/powerpc/mm/fsl_booke_mmu.c b/arch/powerpc/mm/fsl_booke_mmu.c
index 354ba3c09ef3..f3afe3d97f6b 100644
--- a/arch/powerpc/mm/fsl_booke_mmu.c
+++ b/arch/powerpc/mm/fsl_booke_mmu.c
@@ -141,8 +141,6 @@ static void settlbcam(int index, unsigned long virt, phys_addr_t phys,
141 tlbcam_addrs[index].start = virt; 141 tlbcam_addrs[index].start = virt;
142 tlbcam_addrs[index].limit = virt + size - 1; 142 tlbcam_addrs[index].limit = virt + size - 1;
143 tlbcam_addrs[index].phys = phys; 143 tlbcam_addrs[index].phys = phys;
144
145 loadcam_entry(index);
146} 144}
147 145
148unsigned long calc_cam_sz(unsigned long ram, unsigned long virt, 146unsigned long calc_cam_sz(unsigned long ram, unsigned long virt,
@@ -171,7 +169,8 @@ unsigned long calc_cam_sz(unsigned long ram, unsigned long virt,
171} 169}
172 170
173static unsigned long map_mem_in_cams_addr(phys_addr_t phys, unsigned long virt, 171static unsigned long map_mem_in_cams_addr(phys_addr_t phys, unsigned long virt,
174 unsigned long ram, int max_cam_idx) 172 unsigned long ram, int max_cam_idx,
173 bool dryrun)
175{ 174{
176 int i; 175 int i;
177 unsigned long amount_mapped = 0; 176 unsigned long amount_mapped = 0;
@@ -181,13 +180,20 @@ static unsigned long map_mem_in_cams_addr(phys_addr_t phys, unsigned long virt,
181 unsigned long cam_sz; 180 unsigned long cam_sz;
182 181
183 cam_sz = calc_cam_sz(ram, virt, phys); 182 cam_sz = calc_cam_sz(ram, virt, phys);
184 settlbcam(i, virt, phys, cam_sz, pgprot_val(PAGE_KERNEL_X), 0); 183 if (!dryrun)
184 settlbcam(i, virt, phys, cam_sz,
185 pgprot_val(PAGE_KERNEL_X), 0);
185 186
186 ram -= cam_sz; 187 ram -= cam_sz;
187 amount_mapped += cam_sz; 188 amount_mapped += cam_sz;
188 virt += cam_sz; 189 virt += cam_sz;
189 phys += cam_sz; 190 phys += cam_sz;
190 } 191 }
192
193 if (dryrun)
194 return amount_mapped;
195
196 loadcam_multi(0, i, max_cam_idx);
191 tlbcam_index = i; 197 tlbcam_index = i;
192 198
193#ifdef CONFIG_PPC64 199#ifdef CONFIG_PPC64
@@ -199,12 +205,12 @@ static unsigned long map_mem_in_cams_addr(phys_addr_t phys, unsigned long virt,
199 return amount_mapped; 205 return amount_mapped;
200} 206}
201 207
202unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx) 208unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx, bool dryrun)
203{ 209{
204 unsigned long virt = PAGE_OFFSET; 210 unsigned long virt = PAGE_OFFSET;
205 phys_addr_t phys = memstart_addr; 211 phys_addr_t phys = memstart_addr;
206 212
207 return map_mem_in_cams_addr(phys, virt, ram, max_cam_idx); 213 return map_mem_in_cams_addr(phys, virt, ram, max_cam_idx, dryrun);
208} 214}
209 215
210#ifdef CONFIG_PPC32 216#ifdef CONFIG_PPC32
@@ -235,7 +241,7 @@ void __init adjust_total_lowmem(void)
235 ram = min((phys_addr_t)__max_low_memory, (phys_addr_t)total_lowmem); 241 ram = min((phys_addr_t)__max_low_memory, (phys_addr_t)total_lowmem);
236 242
237 i = switch_to_as1(); 243 i = switch_to_as1();
238 __max_low_memory = map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM); 244 __max_low_memory = map_mem_in_cams(ram, CONFIG_LOWMEM_CAM_NUM, false);
239 restore_to_as0(i, 0, 0, 1); 245 restore_to_as0(i, 0, 0, 1);
240 246
241 pr_info("Memory CAM mapping: "); 247 pr_info("Memory CAM mapping: ");
@@ -303,10 +309,12 @@ notrace void __init relocate_init(u64 dt_ptr, phys_addr_t start)
303 n = switch_to_as1(); 309 n = switch_to_as1();
304 /* map a 64M area for the second relocation */ 310 /* map a 64M area for the second relocation */
305 if (memstart_addr > start) 311 if (memstart_addr > start)
306 map_mem_in_cams(0x4000000, CONFIG_LOWMEM_CAM_NUM); 312 map_mem_in_cams(0x4000000, CONFIG_LOWMEM_CAM_NUM,
313 false);
307 else 314 else
308 map_mem_in_cams_addr(start, PAGE_OFFSET + offset, 315 map_mem_in_cams_addr(start, PAGE_OFFSET + offset,
309 0x4000000, CONFIG_LOWMEM_CAM_NUM); 316 0x4000000, CONFIG_LOWMEM_CAM_NUM,
317 false);
310 restore_to_as0(n, offset, __va(dt_ptr), 1); 318 restore_to_as0(n, offset, __va(dt_ptr), 1);
311 /* We should never reach here */ 319 /* We should never reach here */
312 panic("Relocation error"); 320 panic("Relocation error");
diff --git a/arch/powerpc/mm/hash_utils_64.c b/arch/powerpc/mm/hash_utils_64.c
index aee70171355b..7f9616f7c479 100644
--- a/arch/powerpc/mm/hash_utils_64.c
+++ b/arch/powerpc/mm/hash_utils_64.c
@@ -994,6 +994,7 @@ int hash_page_mm(struct mm_struct *mm, unsigned long ea,
994 unsigned long access, unsigned long trap, 994 unsigned long access, unsigned long trap,
995 unsigned long flags) 995 unsigned long flags)
996{ 996{
997 bool is_thp;
997 enum ctx_state prev_state = exception_enter(); 998 enum ctx_state prev_state = exception_enter();
998 pgd_t *pgdir; 999 pgd_t *pgdir;
999 unsigned long vsid; 1000 unsigned long vsid;
@@ -1068,7 +1069,7 @@ int hash_page_mm(struct mm_struct *mm, unsigned long ea,
1068#endif /* CONFIG_PPC_64K_PAGES */ 1069#endif /* CONFIG_PPC_64K_PAGES */
1069 1070
1070 /* Get PTE and page size from page tables */ 1071 /* Get PTE and page size from page tables */
1071 ptep = __find_linux_pte_or_hugepte(pgdir, ea, &hugeshift); 1072 ptep = __find_linux_pte_or_hugepte(pgdir, ea, &is_thp, &hugeshift);
1072 if (ptep == NULL || !pte_present(*ptep)) { 1073 if (ptep == NULL || !pte_present(*ptep)) {
1073 DBG_LOW(" no PTE !\n"); 1074 DBG_LOW(" no PTE !\n");
1074 rc = 1; 1075 rc = 1;
@@ -1088,7 +1089,7 @@ int hash_page_mm(struct mm_struct *mm, unsigned long ea,
1088 } 1089 }
1089 1090
1090 if (hugeshift) { 1091 if (hugeshift) {
1091 if (pmd_trans_huge(*(pmd_t *)ptep)) 1092 if (is_thp)
1092 rc = __hash_page_thp(ea, access, vsid, (pmd_t *)ptep, 1093 rc = __hash_page_thp(ea, access, vsid, (pmd_t *)ptep,
1093 trap, flags, ssize, psize); 1094 trap, flags, ssize, psize);
1094#ifdef CONFIG_HUGETLB_PAGE 1095#ifdef CONFIG_HUGETLB_PAGE
@@ -1243,7 +1244,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,
1243 * THP pages use update_mmu_cache_pmd. We don't do 1244 * THP pages use update_mmu_cache_pmd. We don't do
1244 * hash preload there. Hence can ignore THP here 1245 * hash preload there. Hence can ignore THP here
1245 */ 1246 */
1246 ptep = find_linux_pte_or_hugepte(pgdir, ea, &hugepage_shift); 1247 ptep = find_linux_pte_or_hugepte(pgdir, ea, NULL, &hugepage_shift);
1247 if (!ptep) 1248 if (!ptep)
1248 goto out_exit; 1249 goto out_exit;
1249 1250
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 06c14523b787..9833fee493ec 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -89,6 +89,25 @@ int pgd_huge(pgd_t pgd)
89 */ 89 */
90 return ((pgd_val(pgd) & 0x3) != 0x0); 90 return ((pgd_val(pgd) & 0x3) != 0x0);
91} 91}
92
93#if defined(CONFIG_PPC_64K_PAGES) && defined(CONFIG_DEBUG_VM)
94/*
95 * This enables us to catch the wrong page directory format
96 * Moved here so that we can use WARN() in the call.
97 */
98int hugepd_ok(hugepd_t hpd)
99{
100 bool is_hugepd;
101
102 /*
103 * We should not find this format in page directory, warn otherwise.
104 */
105 is_hugepd = (((hpd.pd & 0x3) == 0x0) && ((hpd.pd & HUGEPD_SHIFT_MASK) != 0));
106 WARN(is_hugepd, "Found wrong page directory format\n");
107 return 0;
108}
109#endif
110
92#else 111#else
93int pmd_huge(pmd_t pmd) 112int pmd_huge(pmd_t pmd)
94{ 113{
@@ -109,7 +128,7 @@ int pgd_huge(pgd_t pgd)
109pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr) 128pte_t *huge_pte_offset(struct mm_struct *mm, unsigned long addr)
110{ 129{
111 /* Only called for hugetlbfs pages, hence can ignore THP */ 130 /* Only called for hugetlbfs pages, hence can ignore THP */
112 return __find_linux_pte_or_hugepte(mm->pgd, addr, NULL); 131 return __find_linux_pte_or_hugepte(mm->pgd, addr, NULL, NULL);
113} 132}
114 133
115static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp, 134static int __hugepte_alloc(struct mm_struct *mm, hugepd_t *hpdp,
@@ -684,13 +703,14 @@ void hugetlb_free_pgd_range(struct mmu_gather *tlb,
684struct page * 703struct page *
685follow_huge_addr(struct mm_struct *mm, unsigned long address, int write) 704follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
686{ 705{
706 bool is_thp;
687 pte_t *ptep, pte; 707 pte_t *ptep, pte;
688 unsigned shift; 708 unsigned shift;
689 unsigned long mask, flags; 709 unsigned long mask, flags;
690 struct page *page = ERR_PTR(-EINVAL); 710 struct page *page = ERR_PTR(-EINVAL);
691 711
692 local_irq_save(flags); 712 local_irq_save(flags);
693 ptep = find_linux_pte_or_hugepte(mm->pgd, address, &shift); 713 ptep = find_linux_pte_or_hugepte(mm->pgd, address, &is_thp, &shift);
694 if (!ptep) 714 if (!ptep)
695 goto no_page; 715 goto no_page;
696 pte = READ_ONCE(*ptep); 716 pte = READ_ONCE(*ptep);
@@ -699,7 +719,7 @@ follow_huge_addr(struct mm_struct *mm, unsigned long address, int write)
699 * Transparent hugepages are handled by generic code. We can skip them 719 * Transparent hugepages are handled by generic code. We can skip them
700 * here. 720 * here.
701 */ 721 */
702 if (!shift || pmd_trans_huge(__pmd(pte_val(pte)))) 722 if (!shift || is_thp)
703 goto no_page; 723 goto no_page;
704 724
705 if (!pte_present(pte)) { 725 if (!pte_present(pte)) {
@@ -956,7 +976,7 @@ void flush_dcache_icache_hugepage(struct page *page)
956 */ 976 */
957 977
958pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea, 978pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
959 unsigned *shift) 979 bool *is_thp, unsigned *shift)
960{ 980{
961 pgd_t pgd, *pgdp; 981 pgd_t pgd, *pgdp;
962 pud_t pud, *pudp; 982 pud_t pud, *pudp;
@@ -968,6 +988,9 @@ pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
968 if (shift) 988 if (shift)
969 *shift = 0; 989 *shift = 0;
970 990
991 if (is_thp)
992 *is_thp = false;
993
971 pgdp = pgdir + pgd_index(ea); 994 pgdp = pgdir + pgd_index(ea);
972 pgd = READ_ONCE(*pgdp); 995 pgd = READ_ONCE(*pgdp);
973 /* 996 /*
@@ -1015,7 +1038,14 @@ pte_t *__find_linux_pte_or_hugepte(pgd_t *pgdir, unsigned long ea,
1015 if (pmd_none(pmd)) 1038 if (pmd_none(pmd))
1016 return NULL; 1039 return NULL;
1017 1040
1018 if (pmd_huge(pmd) || pmd_large(pmd)) { 1041 if (pmd_trans_huge(pmd)) {
1042 if (is_thp)
1043 *is_thp = true;
1044 ret_pte = (pte_t *) pmdp;
1045 goto out;
1046 }
1047
1048 if (pmd_huge(pmd)) {
1019 ret_pte = (pte_t *) pmdp; 1049 ret_pte = (pte_t *) pmdp;
1020 goto out; 1050 goto out;
1021 } else if (is_hugepd(__hugepd(pmd_val(pmd)))) 1051 } else if (is_hugepd(__hugepd(pmd_val(pmd))))
diff --git a/arch/powerpc/mm/mmu_decl.h b/arch/powerpc/mm/mmu_decl.h
index 085b66b10891..9f58ff44a075 100644
--- a/arch/powerpc/mm/mmu_decl.h
+++ b/arch/powerpc/mm/mmu_decl.h
@@ -141,7 +141,8 @@ extern void MMU_init_hw(void);
141extern unsigned long mmu_mapin_ram(unsigned long top); 141extern unsigned long mmu_mapin_ram(unsigned long top);
142 142
143#elif defined(CONFIG_PPC_FSL_BOOK3E) 143#elif defined(CONFIG_PPC_FSL_BOOK3E)
144extern unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx); 144extern unsigned long map_mem_in_cams(unsigned long ram, int max_cam_idx,
145 bool dryrun);
145extern unsigned long calc_cam_sz(unsigned long ram, unsigned long virt, 146extern unsigned long calc_cam_sz(unsigned long ram, unsigned long virt,
146 phys_addr_t phys); 147 phys_addr_t phys);
147#ifdef CONFIG_PPC32 148#ifdef CONFIG_PPC32
@@ -152,6 +153,7 @@ extern int switch_to_as1(void);
152extern void restore_to_as0(int esel, int offset, void *dt_ptr, int bootcpu); 153extern void restore_to_as0(int esel, int offset, void *dt_ptr, int bootcpu);
153#endif 154#endif
154extern void loadcam_entry(unsigned int index); 155extern void loadcam_entry(unsigned int index);
156extern void loadcam_multi(int first_idx, int num, int tmp_idx);
155 157
156struct tlbcam { 158struct tlbcam {
157 u32 MAS0; 159 u32 MAS0;
diff --git a/arch/powerpc/mm/numa.c b/arch/powerpc/mm/numa.c
index 8d8a541211d0..669a15e7fa76 100644
--- a/arch/powerpc/mm/numa.c
+++ b/arch/powerpc/mm/numa.c
@@ -276,7 +276,6 @@ static int of_node_to_nid_single(struct device_node *device)
276/* Walk the device tree upwards, looking for an associativity id */ 276/* Walk the device tree upwards, looking for an associativity id */
277int of_node_to_nid(struct device_node *device) 277int of_node_to_nid(struct device_node *device)
278{ 278{
279 struct device_node *tmp;
280 int nid = -1; 279 int nid = -1;
281 280
282 of_node_get(device); 281 of_node_get(device);
@@ -285,9 +284,7 @@ int of_node_to_nid(struct device_node *device)
285 if (nid != -1) 284 if (nid != -1)
286 break; 285 break;
287 286
288 tmp = device; 287 device = of_get_next_parent(device);
289 device = of_get_parent(tmp);
290 of_node_put(tmp);
291 } 288 }
292 of_node_put(device); 289 of_node_put(device);
293 290
diff --git a/arch/powerpc/mm/slb.c b/arch/powerpc/mm/slb.c
index 8a32a2be3c53..515730e499fe 100644
--- a/arch/powerpc/mm/slb.c
+++ b/arch/powerpc/mm/slb.c
@@ -25,6 +25,11 @@
25#include <asm/udbg.h> 25#include <asm/udbg.h>
26#include <asm/code-patching.h> 26#include <asm/code-patching.h>
27 27
28enum slb_index {
29 LINEAR_INDEX = 0, /* Kernel linear map (0xc000000000000000) */
30 VMALLOC_INDEX = 1, /* Kernel virtual map (0xd000000000000000) */
31 KSTACK_INDEX = 2, /* Kernel stack map */
32};
28 33
29extern void slb_allocate_realmode(unsigned long ea); 34extern void slb_allocate_realmode(unsigned long ea);
30extern void slb_allocate_user(unsigned long ea); 35extern void slb_allocate_user(unsigned long ea);
@@ -41,9 +46,9 @@ static void slb_allocate(unsigned long ea)
41 (((ssize) == MMU_SEGSIZE_256M)? ESID_MASK: ESID_MASK_1T) 46 (((ssize) == MMU_SEGSIZE_256M)? ESID_MASK: ESID_MASK_1T)
42 47
43static inline unsigned long mk_esid_data(unsigned long ea, int ssize, 48static inline unsigned long mk_esid_data(unsigned long ea, int ssize,
44 unsigned long entry) 49 enum slb_index index)
45{ 50{
46 return (ea & slb_esid_mask(ssize)) | SLB_ESID_V | entry; 51 return (ea & slb_esid_mask(ssize)) | SLB_ESID_V | index;
47} 52}
48 53
49static inline unsigned long mk_vsid_data(unsigned long ea, int ssize, 54static inline unsigned long mk_vsid_data(unsigned long ea, int ssize,
@@ -55,39 +60,39 @@ static inline unsigned long mk_vsid_data(unsigned long ea, int ssize,
55 60
56static inline void slb_shadow_update(unsigned long ea, int ssize, 61static inline void slb_shadow_update(unsigned long ea, int ssize,
57 unsigned long flags, 62 unsigned long flags,
58 unsigned long entry) 63 enum slb_index index)
59{ 64{
65 struct slb_shadow *p = get_slb_shadow();
66
60 /* 67 /*
61 * Clear the ESID first so the entry is not valid while we are 68 * Clear the ESID first so the entry is not valid while we are
62 * updating it. No write barriers are needed here, provided 69 * updating it. No write barriers are needed here, provided
63 * we only update the current CPU's SLB shadow buffer. 70 * we only update the current CPU's SLB shadow buffer.
64 */ 71 */
65 get_slb_shadow()->save_area[entry].esid = 0; 72 p->save_area[index].esid = 0;
66 get_slb_shadow()->save_area[entry].vsid = 73 p->save_area[index].vsid = cpu_to_be64(mk_vsid_data(ea, ssize, flags));
67 cpu_to_be64(mk_vsid_data(ea, ssize, flags)); 74 p->save_area[index].esid = cpu_to_be64(mk_esid_data(ea, ssize, index));
68 get_slb_shadow()->save_area[entry].esid =
69 cpu_to_be64(mk_esid_data(ea, ssize, entry));
70} 75}
71 76
72static inline void slb_shadow_clear(unsigned long entry) 77static inline void slb_shadow_clear(enum slb_index index)
73{ 78{
74 get_slb_shadow()->save_area[entry].esid = 0; 79 get_slb_shadow()->save_area[index].esid = 0;
75} 80}
76 81
77static inline void create_shadowed_slbe(unsigned long ea, int ssize, 82static inline void create_shadowed_slbe(unsigned long ea, int ssize,
78 unsigned long flags, 83 unsigned long flags,
79 unsigned long entry) 84 enum slb_index index)
80{ 85{
81 /* 86 /*
82 * Updating the shadow buffer before writing the SLB ensures 87 * Updating the shadow buffer before writing the SLB ensures
83 * we don't get a stale entry here if we get preempted by PHYP 88 * we don't get a stale entry here if we get preempted by PHYP
84 * between these two statements. 89 * between these two statements.
85 */ 90 */
86 slb_shadow_update(ea, ssize, flags, entry); 91 slb_shadow_update(ea, ssize, flags, index);
87 92
88 asm volatile("slbmte %0,%1" : 93 asm volatile("slbmte %0,%1" :
89 : "r" (mk_vsid_data(ea, ssize, flags)), 94 : "r" (mk_vsid_data(ea, ssize, flags)),
90 "r" (mk_esid_data(ea, ssize, entry)) 95 "r" (mk_esid_data(ea, ssize, index))
91 : "memory" ); 96 : "memory" );
92} 97}
93 98
@@ -103,16 +108,16 @@ static void __slb_flush_and_rebolt(void)
103 lflags = SLB_VSID_KERNEL | linear_llp; 108 lflags = SLB_VSID_KERNEL | linear_llp;
104 vflags = SLB_VSID_KERNEL | vmalloc_llp; 109 vflags = SLB_VSID_KERNEL | vmalloc_llp;
105 110
106 ksp_esid_data = mk_esid_data(get_paca()->kstack, mmu_kernel_ssize, 2); 111 ksp_esid_data = mk_esid_data(get_paca()->kstack, mmu_kernel_ssize, KSTACK_INDEX);
107 if ((ksp_esid_data & ~0xfffffffUL) <= PAGE_OFFSET) { 112 if ((ksp_esid_data & ~0xfffffffUL) <= PAGE_OFFSET) {
108 ksp_esid_data &= ~SLB_ESID_V; 113 ksp_esid_data &= ~SLB_ESID_V;
109 ksp_vsid_data = 0; 114 ksp_vsid_data = 0;
110 slb_shadow_clear(2); 115 slb_shadow_clear(KSTACK_INDEX);
111 } else { 116 } else {
112 /* Update stack entry; others don't change */ 117 /* Update stack entry; others don't change */
113 slb_shadow_update(get_paca()->kstack, mmu_kernel_ssize, lflags, 2); 118 slb_shadow_update(get_paca()->kstack, mmu_kernel_ssize, lflags, KSTACK_INDEX);
114 ksp_vsid_data = 119 ksp_vsid_data =
115 be64_to_cpu(get_slb_shadow()->save_area[2].vsid); 120 be64_to_cpu(get_slb_shadow()->save_area[KSTACK_INDEX].vsid);
116 } 121 }
117 122
118 /* We need to do this all in asm, so we're sure we don't touch 123 /* We need to do this all in asm, so we're sure we don't touch
@@ -151,7 +156,7 @@ void slb_vmalloc_update(void)
151 unsigned long vflags; 156 unsigned long vflags;
152 157
153 vflags = SLB_VSID_KERNEL | mmu_psize_defs[mmu_vmalloc_psize].sllp; 158 vflags = SLB_VSID_KERNEL | mmu_psize_defs[mmu_vmalloc_psize].sllp;
154 slb_shadow_update(VMALLOC_START, mmu_kernel_ssize, vflags, 1); 159 slb_shadow_update(VMALLOC_START, mmu_kernel_ssize, vflags, VMALLOC_INDEX);
155 slb_flush_and_rebolt(); 160 slb_flush_and_rebolt();
156} 161}
157 162
@@ -326,19 +331,19 @@ void slb_initialize(void)
326 asm volatile("isync":::"memory"); 331 asm volatile("isync":::"memory");
327 asm volatile("slbmte %0,%0"::"r" (0) : "memory"); 332 asm volatile("slbmte %0,%0"::"r" (0) : "memory");
328 asm volatile("isync; slbia; isync":::"memory"); 333 asm volatile("isync; slbia; isync":::"memory");
329 create_shadowed_slbe(PAGE_OFFSET, mmu_kernel_ssize, lflags, 0); 334 create_shadowed_slbe(PAGE_OFFSET, mmu_kernel_ssize, lflags, LINEAR_INDEX);
330 create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, 1); 335 create_shadowed_slbe(VMALLOC_START, mmu_kernel_ssize, vflags, VMALLOC_INDEX);
331 336
332 /* For the boot cpu, we're running on the stack in init_thread_union, 337 /* For the boot cpu, we're running on the stack in init_thread_union,
333 * which is in the first segment of the linear mapping, and also 338 * which is in the first segment of the linear mapping, and also
334 * get_paca()->kstack hasn't been initialized yet. 339 * get_paca()->kstack hasn't been initialized yet.
335 * For secondary cpus, we need to bolt the kernel stack entry now. 340 * For secondary cpus, we need to bolt the kernel stack entry now.
336 */ 341 */
337 slb_shadow_clear(2); 342 slb_shadow_clear(KSTACK_INDEX);
338 if (raw_smp_processor_id() != boot_cpuid && 343 if (raw_smp_processor_id() != boot_cpuid &&
339 (get_paca()->kstack & slb_esid_mask(mmu_kernel_ssize)) > PAGE_OFFSET) 344 (get_paca()->kstack & slb_esid_mask(mmu_kernel_ssize)) > PAGE_OFFSET)
340 create_shadowed_slbe(get_paca()->kstack, 345 create_shadowed_slbe(get_paca()->kstack,
341 mmu_kernel_ssize, lflags, 2); 346 mmu_kernel_ssize, lflags, KSTACK_INDEX);
342 347
343 asm volatile("isync":::"memory"); 348 asm volatile("isync":::"memory");
344} 349}
diff --git a/arch/powerpc/mm/tlb_hash64.c b/arch/powerpc/mm/tlb_hash64.c
index c522969f012d..f7b80391bee7 100644
--- a/arch/powerpc/mm/tlb_hash64.c
+++ b/arch/powerpc/mm/tlb_hash64.c
@@ -190,6 +190,7 @@ void tlb_flush(struct mmu_gather *tlb)
190void __flush_hash_table_range(struct mm_struct *mm, unsigned long start, 190void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
191 unsigned long end) 191 unsigned long end)
192{ 192{
193 bool is_thp;
193 int hugepage_shift; 194 int hugepage_shift;
194 unsigned long flags; 195 unsigned long flags;
195 196
@@ -208,21 +209,21 @@ void __flush_hash_table_range(struct mm_struct *mm, unsigned long start,
208 local_irq_save(flags); 209 local_irq_save(flags);
209 arch_enter_lazy_mmu_mode(); 210 arch_enter_lazy_mmu_mode();
210 for (; start < end; start += PAGE_SIZE) { 211 for (; start < end; start += PAGE_SIZE) {
211 pte_t *ptep = find_linux_pte_or_hugepte(mm->pgd, start, 212 pte_t *ptep = find_linux_pte_or_hugepte(mm->pgd, start, &is_thp,
212 &hugepage_shift); 213 &hugepage_shift);
213 unsigned long pte; 214 unsigned long pte;
214 215
215 if (ptep == NULL) 216 if (ptep == NULL)
216 continue; 217 continue;
217 pte = pte_val(*ptep); 218 pte = pte_val(*ptep);
218 if (hugepage_shift) 219 if (is_thp)
219 trace_hugepage_invalidate(start, pte); 220 trace_hugepage_invalidate(start, pte);
220 if (!(pte & _PAGE_HASHPTE)) 221 if (!(pte & _PAGE_HASHPTE))
221 continue; 222 continue;
222 if (unlikely(hugepage_shift && pmd_trans_huge(*(pmd_t *)pte))) 223 if (unlikely(is_thp))
223 hpte_do_hugepage_flush(mm, start, (pmd_t *)ptep, pte); 224 hpte_do_hugepage_flush(mm, start, (pmd_t *)ptep, pte);
224 else 225 else
225 hpte_need_flush(mm, start, ptep, pte, 0); 226 hpte_need_flush(mm, start, ptep, pte, hugepage_shift);
226 } 227 }
227 arch_leave_lazy_mmu_mode(); 228 arch_leave_lazy_mmu_mode();
228 local_irq_restore(flags); 229 local_irq_restore(flags);
diff --git a/arch/powerpc/mm/tlb_low_64e.S b/arch/powerpc/mm/tlb_low_64e.S
index e4185581c5a7..29d6987c37ba 100644
--- a/arch/powerpc/mm/tlb_low_64e.S
+++ b/arch/powerpc/mm/tlb_low_64e.S
@@ -68,11 +68,17 @@ END_FTR_SECTION_IFSET(CPU_FTR_EMB_HV)
68 ld r14,PACAPGD(r13) 68 ld r14,PACAPGD(r13)
69 std r15,EX_TLB_R15(r12) 69 std r15,EX_TLB_R15(r12)
70 std r10,EX_TLB_CR(r12) 70 std r10,EX_TLB_CR(r12)
71#ifdef CONFIG_PPC_FSL_BOOK3E
72 std r7,EX_TLB_R7(r12)
73#endif
71 TLB_MISS_PROLOG_STATS 74 TLB_MISS_PROLOG_STATS
72.endm 75.endm
73 76
74.macro tlb_epilog_bolted 77.macro tlb_epilog_bolted
75 ld r14,EX_TLB_CR(r12) 78 ld r14,EX_TLB_CR(r12)
79#ifdef CONFIG_PPC_FSL_BOOK3E
80 ld r7,EX_TLB_R7(r12)
81#endif
76 ld r10,EX_TLB_R10(r12) 82 ld r10,EX_TLB_R10(r12)
77 ld r11,EX_TLB_R11(r12) 83 ld r11,EX_TLB_R11(r12)
78 ld r13,EX_TLB_R13(r12) 84 ld r13,EX_TLB_R13(r12)
@@ -297,6 +303,7 @@ itlb_miss_fault_bolted:
297 * r13 = PACA 303 * r13 = PACA
298 * r11 = tlb_per_core ptr 304 * r11 = tlb_per_core ptr
299 * r10 = crap (free to use) 305 * r10 = crap (free to use)
306 * r7 = esel_next
300 */ 307 */
301tlb_miss_common_e6500: 308tlb_miss_common_e6500:
302 crmove cr2*4+2,cr0*4+2 /* cr2.eq != 0 if kernel address */ 309 crmove cr2*4+2,cr0*4+2 /* cr2.eq != 0 if kernel address */
@@ -325,7 +332,11 @@ BEGIN_FTR_SECTION /* CPU_FTR_SMT */
325 bne 10b 332 bne 10b
326 b 1b 333 b 1b
327 .previous 334 .previous
335END_FTR_SECTION_IFSET(CPU_FTR_SMT)
336
337 lbz r7,TCD_ESEL_NEXT(r11)
328 338
339BEGIN_FTR_SECTION /* CPU_FTR_SMT */
329 /* 340 /*
330 * Erratum A-008139 says that we can't use tlbwe to change 341 * Erratum A-008139 says that we can't use tlbwe to change
331 * an indirect entry in any way (including replacing or 342 * an indirect entry in any way (including replacing or
@@ -334,8 +345,7 @@ BEGIN_FTR_SECTION /* CPU_FTR_SMT */
334 * with tlbilx before overwriting. 345 * with tlbilx before overwriting.
335 */ 346 */
336 347
337 lbz r15,TCD_ESEL_NEXT(r11) 348 rlwinm r10,r7,16,0xff0000
338 rlwinm r10,r15,16,0xff0000
339 oris r10,r10,MAS0_TLBSEL(1)@h 349 oris r10,r10,MAS0_TLBSEL(1)@h
340 mtspr SPRN_MAS0,r10 350 mtspr SPRN_MAS0,r10
341 isync 351 isync
@@ -429,15 +439,14 @@ ALT_FTR_SECTION_END_IFSET(CPU_FTR_SMT)
429 mtspr SPRN_MAS2,r15 439 mtspr SPRN_MAS2,r15
430 440
431tlb_miss_huge_done_e6500: 441tlb_miss_huge_done_e6500:
432 lbz r15,TCD_ESEL_NEXT(r11)
433 lbz r16,TCD_ESEL_MAX(r11) 442 lbz r16,TCD_ESEL_MAX(r11)
434 lbz r14,TCD_ESEL_FIRST(r11) 443 lbz r14,TCD_ESEL_FIRST(r11)
435 rlwimi r10,r15,16,0x00ff0000 /* insert esel_next into MAS0 */ 444 rlwimi r10,r7,16,0x00ff0000 /* insert esel_next into MAS0 */
436 addi r15,r15,1 /* increment esel_next */ 445 addi r7,r7,1 /* increment esel_next */
437 mtspr SPRN_MAS0,r10 446 mtspr SPRN_MAS0,r10
438 cmpw r15,r16 447 cmpw r7,r16
439 iseleq r15,r14,r15 /* if next == last use first */ 448 iseleq r7,r14,r7 /* if next == last use first */
440 stb r15,TCD_ESEL_NEXT(r11) 449 stb r7,TCD_ESEL_NEXT(r11)
441 450
442 tlbwe 451 tlbwe
443 452
diff --git a/arch/powerpc/mm/tlb_nohash.c b/arch/powerpc/mm/tlb_nohash.c
index 723a099f6be3..bb04e4df3100 100644
--- a/arch/powerpc/mm/tlb_nohash.c
+++ b/arch/powerpc/mm/tlb_nohash.c
@@ -42,6 +42,7 @@
42#include <asm/tlbflush.h> 42#include <asm/tlbflush.h>
43#include <asm/tlb.h> 43#include <asm/tlb.h>
44#include <asm/code-patching.h> 44#include <asm/code-patching.h>
45#include <asm/cputhreads.h>
45#include <asm/hugetlb.h> 46#include <asm/hugetlb.h>
46#include <asm/paca.h> 47#include <asm/paca.h>
47 48
@@ -628,10 +629,26 @@ static void early_init_this_mmu(void)
628#ifdef CONFIG_PPC_FSL_BOOK3E 629#ifdef CONFIG_PPC_FSL_BOOK3E
629 if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) { 630 if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
630 unsigned int num_cams; 631 unsigned int num_cams;
632 int __maybe_unused cpu = smp_processor_id();
633 bool map = true;
631 634
632 /* use a quarter of the TLBCAM for bolted linear map */ 635 /* use a quarter of the TLBCAM for bolted linear map */
633 num_cams = (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) / 4; 636 num_cams = (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) / 4;
634 linear_map_top = map_mem_in_cams(linear_map_top, num_cams); 637
638 /*
639 * Only do the mapping once per core, or else the
640 * transient mapping would cause problems.
641 */
642#ifdef CONFIG_SMP
643 if (cpu != boot_cpuid &&
644 (cpu != cpu_first_thread_sibling(cpu) ||
645 cpu == cpu_first_thread_sibling(boot_cpuid)))
646 map = false;
647#endif
648
649 if (map)
650 linear_map_top = map_mem_in_cams(linear_map_top,
651 num_cams, false);
635 } 652 }
636#endif 653#endif
637 654
@@ -729,10 +746,14 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
729 * entries are supported though that may eventually 746 * entries are supported though that may eventually
730 * change. 747 * change.
731 * 748 *
732 * on FSL Embedded 64-bit, we adjust the RMA size to match the 749 * on FSL Embedded 64-bit, usually all RAM is bolted, but with
733 * first bolted TLB entry size. We still limit max to 1G even if 750 * unusual memory sizes it's possible for some RAM to not be mapped
734 * the TLB could cover more. This is due to what the early init 751 * (such RAM is not used at all by Linux, since we don't support
735 * code is setup to do. 752 * highmem on 64-bit). We limit ppc64_rma_size to what would be
753 * mappable if this memblock is the only one. Additional memblocks
754 * can only increase, not decrease, the amount that ends up getting
755 * mapped. We still limit max to 1G even if we'll eventually map
756 * more. This is due to what the early init code is set up to do.
736 * 757 *
737 * We crop it to the size of the first MEMBLOCK to 758 * We crop it to the size of the first MEMBLOCK to
738 * avoid going over total available memory just in case... 759 * avoid going over total available memory just in case...
@@ -740,8 +761,14 @@ void setup_initial_memory_limit(phys_addr_t first_memblock_base,
740#ifdef CONFIG_PPC_FSL_BOOK3E 761#ifdef CONFIG_PPC_FSL_BOOK3E
741 if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) { 762 if (mmu_has_feature(MMU_FTR_TYPE_FSL_E)) {
742 unsigned long linear_sz; 763 unsigned long linear_sz;
743 linear_sz = calc_cam_sz(first_memblock_size, PAGE_OFFSET, 764 unsigned int num_cams;
744 first_memblock_base); 765
766 /* use a quarter of the TLBCAM for bolted linear map */
767 num_cams = (mfspr(SPRN_TLB1CFG) & TLBnCFG_N_ENTRY) / 4;
768
769 linear_sz = map_mem_in_cams(first_memblock_size, num_cams,
770 true);
771
745 ppc64_rma_size = min_t(u64, linear_sz, 0x40000000); 772 ppc64_rma_size = min_t(u64, linear_sz, 0x40000000);
746 } else 773 } else
747#endif 774#endif
diff --git a/arch/powerpc/mm/tlb_nohash_low.S b/arch/powerpc/mm/tlb_nohash_low.S
index 43ff3c797fbf..68c477592e43 100644
--- a/arch/powerpc/mm/tlb_nohash_low.S
+++ b/arch/powerpc/mm/tlb_nohash_low.S
@@ -400,6 +400,7 @@ _GLOBAL(set_context)
400 * extern void loadcam_entry(unsigned int index) 400 * extern void loadcam_entry(unsigned int index)
401 * 401 *
402 * Load TLBCAM[index] entry in to the L2 CAM MMU 402 * Load TLBCAM[index] entry in to the L2 CAM MMU
403 * Must preserve r7, r8, r9, and r10
403 */ 404 */
404_GLOBAL(loadcam_entry) 405_GLOBAL(loadcam_entry)
405 mflr r5 406 mflr r5
@@ -423,4 +424,66 @@ END_MMU_FTR_SECTION_IFSET(MMU_FTR_BIG_PHYS)
423 tlbwe 424 tlbwe
424 isync 425 isync
425 blr 426 blr
427
428/*
429 * Load multiple TLB entries at once, using an alternate-space
430 * trampoline so that we don't have to care about whether the same
431 * TLB entry maps us before and after.
432 *
433 * r3 = first entry to write
434 * r4 = number of entries to write
435 * r5 = temporary tlb entry
436 */
437_GLOBAL(loadcam_multi)
438 mflr r8
439
440 /*
441 * Set up temporary TLB entry that is the same as what we're
442 * running from, but in AS=1.
443 */
444 bl 1f
4451: mflr r6
446 tlbsx 0,r8
447 mfspr r6,SPRN_MAS1
448 ori r6,r6,MAS1_TS
449 mtspr SPRN_MAS1,r6
450 mfspr r6,SPRN_MAS0
451 rlwimi r6,r5,MAS0_ESEL_SHIFT,MAS0_ESEL_MASK
452 mr r7,r5
453 mtspr SPRN_MAS0,r6
454 isync
455 tlbwe
456 isync
457
458 /* Switch to AS=1 */
459 mfmsr r6
460 ori r6,r6,MSR_IS|MSR_DS
461 mtmsr r6
462 isync
463
464 mr r9,r3
465 add r10,r3,r4
4662: bl loadcam_entry
467 addi r9,r9,1
468 cmpw r9,r10
469 mr r3,r9
470 blt 2b
471
472 /* Return to AS=0 and clear the temporary entry */
473 mfmsr r6
474 rlwinm. r6,r6,0,~(MSR_IS|MSR_DS)
475 mtmsr r6
476 isync
477
478 li r6,0
479 mtspr SPRN_MAS1,r6
480 rlwinm r6,r7,MAS0_ESEL_SHIFT,MAS0_ESEL_MASK
481 oris r6,r6,MAS0_TLBSEL(1)@h
482 mtspr SPRN_MAS0,r6
483 isync
484 tlbwe
485 isync
486
487 mtlr r8
488 blr
426#endif 489#endif
diff --git a/arch/powerpc/perf/callchain.c b/arch/powerpc/perf/callchain.c
index ff09cde20cd2..e04a6752b399 100644
--- a/arch/powerpc/perf/callchain.c
+++ b/arch/powerpc/perf/callchain.c
@@ -127,7 +127,7 @@ static int read_user_stack_slow(void __user *ptr, void *buf, int nb)
127 return -EFAULT; 127 return -EFAULT;
128 128
129 local_irq_save(flags); 129 local_irq_save(flags);
130 ptep = find_linux_pte_or_hugepte(pgdir, addr, &shift); 130 ptep = find_linux_pte_or_hugepte(pgdir, addr, NULL, &shift);
131 if (!ptep) 131 if (!ptep)
132 goto err_out; 132 goto err_out;
133 if (!shift) 133 if (!shift)
diff --git a/arch/powerpc/platforms/512x/Kconfig b/arch/powerpc/platforms/512x/Kconfig
index 48bf38d0de35..f09016f6b3a6 100644
--- a/arch/powerpc/platforms/512x/Kconfig
+++ b/arch/powerpc/platforms/512x/Kconfig
@@ -10,6 +10,12 @@ config PPC_MPC512x
10 select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD 10 select USB_EHCI_BIG_ENDIAN_MMIO if USB_EHCI_HCD
11 select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD 11 select USB_EHCI_BIG_ENDIAN_DESC if USB_EHCI_HCD
12 12
13config MPC512x_LPBFIFO
14 tristate "MPC512x LocalPlus Bus FIFO driver"
15 depends on PPC_MPC512x && MPC512X_DMA
16 help
17 Enable support for Freescale MPC512x LocalPlus Bus FIFO (SCLPC).
18
13config MPC5121_ADS 19config MPC5121_ADS
14 bool "Freescale MPC5121E ADS" 20 bool "Freescale MPC5121E ADS"
15 depends on PPC_MPC512x 21 depends on PPC_MPC512x
diff --git a/arch/powerpc/platforms/512x/Makefile b/arch/powerpc/platforms/512x/Makefile
index 01693121a2b1..f47d422953df 100644
--- a/arch/powerpc/platforms/512x/Makefile
+++ b/arch/powerpc/platforms/512x/Makefile
@@ -5,4 +5,5 @@ obj-$(CONFIG_COMMON_CLK) += clock-commonclk.o
5obj-y += mpc512x_shared.o 5obj-y += mpc512x_shared.o
6obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o mpc5121_ads_cpld.o 6obj-$(CONFIG_MPC5121_ADS) += mpc5121_ads.o mpc5121_ads_cpld.o
7obj-$(CONFIG_MPC512x_GENERIC) += mpc512x_generic.o 7obj-$(CONFIG_MPC512x_GENERIC) += mpc512x_generic.o
8obj-$(CONFIG_MPC512x_LPBFIFO) += mpc512x_lpbfifo.o
8obj-$(CONFIG_PDM360NG) += pdm360ng.o 9obj-$(CONFIG_PDM360NG) += pdm360ng.o
diff --git a/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c b/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c
new file mode 100644
index 000000000000..8eb82b043dd8
--- /dev/null
+++ b/arch/powerpc/platforms/512x/mpc512x_lpbfifo.c
@@ -0,0 +1,540 @@
1/*
2 * The driver for Freescale MPC512x LocalPlus Bus FIFO
3 * (called SCLPC in the Reference Manual).
4 *
5 * Copyright (C) 2013-2015 Alexander Popov <alex.popov@linux.com>.
6 *
7 * This file is released under the GPLv2.
8 */
9
10#include <linux/interrupt.h>
11#include <linux/kernel.h>
12#include <linux/module.h>
13#include <linux/of.h>
14#include <linux/of_platform.h>
15#include <linux/of_address.h>
16#include <linux/of_irq.h>
17#include <asm/mpc5121.h>
18#include <asm/io.h>
19#include <linux/spinlock.h>
20#include <linux/slab.h>
21#include <linux/dmaengine.h>
22#include <linux/dma-direction.h>
23#include <linux/dma-mapping.h>
24
25#define DRV_NAME "mpc512x_lpbfifo"
26
27struct cs_range {
28 u32 csnum;
29 u32 base; /* must be zero */
30 u32 addr;
31 u32 size;
32};
33
34static struct lpbfifo_data {
35 spinlock_t lock; /* for protecting lpbfifo_data */
36 phys_addr_t regs_phys;
37 resource_size_t regs_size;
38 struct mpc512x_lpbfifo __iomem *regs;
39 int irq;
40 struct cs_range *cs_ranges;
41 size_t cs_n;
42 struct dma_chan *chan;
43 struct mpc512x_lpbfifo_request *req;
44 dma_addr_t ram_bus_addr;
45 bool wait_lpbfifo_irq;
46 bool wait_lpbfifo_callback;
47} lpbfifo;
48
49/*
50 * A data transfer from RAM to some device on LPB is finished
51 * when both mpc512x_lpbfifo_irq() and mpc512x_lpbfifo_callback()
52 * have been called. We execute the callback registered in
53 * mpc512x_lpbfifo_request just after that.
54 * But for a data transfer from some device on LPB to RAM we don't enable
55 * LPBFIFO interrupt because clearing MPC512X_SCLPC_SUCCESS interrupt flag
56 * automatically disables LPBFIFO reading request to the DMA controller
57 * and the data transfer hangs. So the callback registered in
58 * mpc512x_lpbfifo_request is executed at the end of mpc512x_lpbfifo_callback().
59 */
60
61/*
62 * mpc512x_lpbfifo_irq - IRQ handler for LPB FIFO
63 */
64static irqreturn_t mpc512x_lpbfifo_irq(int irq, void *param)
65{
66 struct device *dev = (struct device *)param;
67 struct mpc512x_lpbfifo_request *req = NULL;
68 unsigned long flags;
69 u32 status;
70
71 spin_lock_irqsave(&lpbfifo.lock, flags);
72
73 if (!lpbfifo.regs)
74 goto end;
75
76 req = lpbfifo.req;
77 if (!req || req->dir == MPC512X_LPBFIFO_REQ_DIR_READ) {
78 dev_err(dev, "bogus LPBFIFO IRQ\n");
79 goto end;
80 }
81
82 status = in_be32(&lpbfifo.regs->status);
83 if (status != MPC512X_SCLPC_SUCCESS) {
84 dev_err(dev, "DMA transfer from RAM to peripheral failed\n");
85 out_be32(&lpbfifo.regs->enable,
86 MPC512X_SCLPC_RESET | MPC512X_SCLPC_FIFO_RESET);
87 goto end;
88 }
89 /* Clear the interrupt flag */
90 out_be32(&lpbfifo.regs->status, MPC512X_SCLPC_SUCCESS);
91
92 lpbfifo.wait_lpbfifo_irq = false;
93
94 if (lpbfifo.wait_lpbfifo_callback)
95 goto end;
96
97 /* Transfer is finished, set the FIFO as idle */
98 lpbfifo.req = NULL;
99
100 spin_unlock_irqrestore(&lpbfifo.lock, flags);
101
102 if (req->callback)
103 req->callback(req);
104
105 return IRQ_HANDLED;
106
107 end:
108 spin_unlock_irqrestore(&lpbfifo.lock, flags);
109 return IRQ_HANDLED;
110}
111
112/*
113 * mpc512x_lpbfifo_callback is called by DMA driver when
114 * DMA transaction is finished.
115 */
116static void mpc512x_lpbfifo_callback(void *param)
117{
118 unsigned long flags;
119 struct mpc512x_lpbfifo_request *req = NULL;
120 enum dma_data_direction dir;
121
122 spin_lock_irqsave(&lpbfifo.lock, flags);
123
124 if (!lpbfifo.regs) {
125 spin_unlock_irqrestore(&lpbfifo.lock, flags);
126 return;
127 }
128
129 req = lpbfifo.req;
130 if (!req) {
131 pr_err("bogus LPBFIFO callback\n");
132 spin_unlock_irqrestore(&lpbfifo.lock, flags);
133 return;
134 }
135
136 /* Release the mapping */
137 if (req->dir == MPC512X_LPBFIFO_REQ_DIR_WRITE)
138 dir = DMA_TO_DEVICE;
139 else
140 dir = DMA_FROM_DEVICE;
141 dma_unmap_single(lpbfifo.chan->device->dev,
142 lpbfifo.ram_bus_addr, req->size, dir);
143
144 lpbfifo.wait_lpbfifo_callback = false;
145
146 if (!lpbfifo.wait_lpbfifo_irq) {
147 /* Transfer is finished, set the FIFO as idle */
148 lpbfifo.req = NULL;
149
150 spin_unlock_irqrestore(&lpbfifo.lock, flags);
151
152 if (req->callback)
153 req->callback(req);
154 } else {
155 spin_unlock_irqrestore(&lpbfifo.lock, flags);
156 }
157}
158
159static int mpc512x_lpbfifo_kick(void)
160{
161 u32 bits;
162 bool no_incr = false;
163 u32 bpt = 32; /* max bytes per LPBFIFO transaction involving DMA */
164 u32 cs = 0;
165 size_t i;
166 struct dma_device *dma_dev = NULL;
167 struct scatterlist sg;
168 enum dma_data_direction dir;
169 struct dma_slave_config dma_conf = {};
170 struct dma_async_tx_descriptor *dma_tx = NULL;
171 dma_cookie_t cookie;
172 int ret;
173
174 /*
175 * 1. Fit the requirements:
176 * - the packet size must be a multiple of 4 since FIFO Data Word
177 * Register allows only full-word access according the Reference
178 * Manual;
179 * - the physical address of the device on LPB and the packet size
180 * must be aligned on BPT (bytes per transaction) or 8-bytes
181 * boundary according the Reference Manual;
182 * - but we choose DMA maxburst equal (or very close to) BPT to prevent
183 * DMA controller from overtaking FIFO and causing FIFO underflow
184 * error. So we force the packet size to be aligned on BPT boundary
185 * not to confuse DMA driver which requires the packet size to be
186 * aligned on maxburst boundary;
187 * - BPT should be set to the LPB device port size for operation with
188 * disabled auto-incrementing according Reference Manual.
189 */
190 if (lpbfifo.req->size == 0 || !IS_ALIGNED(lpbfifo.req->size, 4))
191 return -EINVAL;
192
193 if (lpbfifo.req->portsize != LPB_DEV_PORTSIZE_UNDEFINED) {
194 bpt = lpbfifo.req->portsize;
195 no_incr = true;
196 }
197
198 while (bpt > 1) {
199 if (IS_ALIGNED(lpbfifo.req->dev_phys_addr, min(bpt, 0x8u)) &&
200 IS_ALIGNED(lpbfifo.req->size, bpt)) {
201 break;
202 }
203
204 if (no_incr)
205 return -EINVAL;
206
207 bpt >>= 1;
208 }
209 dma_conf.dst_maxburst = max(bpt, 0x4u) / 4;
210 dma_conf.src_maxburst = max(bpt, 0x4u) / 4;
211
212 for (i = 0; i < lpbfifo.cs_n; i++) {
213 phys_addr_t cs_start = lpbfifo.cs_ranges[i].addr;
214 phys_addr_t cs_end = cs_start + lpbfifo.cs_ranges[i].size;
215 phys_addr_t access_start = lpbfifo.req->dev_phys_addr;
216 phys_addr_t access_end = access_start + lpbfifo.req->size;
217
218 if (access_start >= cs_start && access_end <= cs_end) {
219 cs = lpbfifo.cs_ranges[i].csnum;
220 break;
221 }
222 }
223 if (i == lpbfifo.cs_n)
224 return -EFAULT;
225
226 /* 2. Prepare DMA */
227 dma_dev = lpbfifo.chan->device;
228
229 if (lpbfifo.req->dir == MPC512X_LPBFIFO_REQ_DIR_WRITE) {
230 dir = DMA_TO_DEVICE;
231 dma_conf.direction = DMA_MEM_TO_DEV;
232 dma_conf.dst_addr = lpbfifo.regs_phys +
233 offsetof(struct mpc512x_lpbfifo, data_word);
234 } else {
235 dir = DMA_FROM_DEVICE;
236 dma_conf.direction = DMA_DEV_TO_MEM;
237 dma_conf.src_addr = lpbfifo.regs_phys +
238 offsetof(struct mpc512x_lpbfifo, data_word);
239 }
240 dma_conf.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
241 dma_conf.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
242
243 /* Make DMA channel work with LPB FIFO data register */
244 if (dma_dev->device_config(lpbfifo.chan, &dma_conf)) {
245 ret = -EINVAL;
246 goto err_dma_prep;
247 }
248
249 sg_init_table(&sg, 1);
250
251 sg_dma_address(&sg) = dma_map_single(dma_dev->dev,
252 lpbfifo.req->ram_virt_addr, lpbfifo.req->size, dir);
253 if (dma_mapping_error(dma_dev->dev, sg_dma_address(&sg)))
254 return -EFAULT;
255
256 lpbfifo.ram_bus_addr = sg_dma_address(&sg); /* For freeing later */
257
258 sg_dma_len(&sg) = lpbfifo.req->size;
259
260 dma_tx = dmaengine_prep_slave_sg(lpbfifo.chan, &sg,
261 1, dma_conf.direction, 0);
262 if (!dma_tx) {
263 ret = -ENOSPC;
264 goto err_dma_prep;
265 }
266 dma_tx->callback = mpc512x_lpbfifo_callback;
267 dma_tx->callback_param = NULL;
268
269 /* 3. Prepare FIFO */
270 out_be32(&lpbfifo.regs->enable,
271 MPC512X_SCLPC_RESET | MPC512X_SCLPC_FIFO_RESET);
272 out_be32(&lpbfifo.regs->enable, 0x0);
273
274 /*
275 * Configure the watermarks for write operation (RAM->DMA->FIFO->dev):
276 * - high watermark 7 words according the Reference Manual,
277 * - low watermark 512 bytes (half of the FIFO).
278 * These watermarks don't work for read operation since the
279 * MPC512X_SCLPC_FLUSH bit is set (according the Reference Manual).
280 */
281 out_be32(&lpbfifo.regs->fifo_ctrl, MPC512X_SCLPC_FIFO_CTRL(0x7));
282 out_be32(&lpbfifo.regs->fifo_alarm, MPC512X_SCLPC_FIFO_ALARM(0x200));
283
284 /*
285 * Start address is a physical address of the region which belongs
286 * to the device on the LocalPlus Bus
287 */
288 out_be32(&lpbfifo.regs->start_addr, lpbfifo.req->dev_phys_addr);
289
290 /*
291 * Configure chip select, transfer direction, address increment option
292 * and bytes per transaction option
293 */
294 bits = MPC512X_SCLPC_CS(cs);
295 if (lpbfifo.req->dir == MPC512X_LPBFIFO_REQ_DIR_READ)
296 bits |= MPC512X_SCLPC_READ | MPC512X_SCLPC_FLUSH;
297 if (no_incr)
298 bits |= MPC512X_SCLPC_DAI;
299 bits |= MPC512X_SCLPC_BPT(bpt);
300 out_be32(&lpbfifo.regs->ctrl, bits);
301
302 /* Unmask irqs */
303 bits = MPC512X_SCLPC_ENABLE | MPC512X_SCLPC_ABORT_INT_ENABLE;
304 if (lpbfifo.req->dir == MPC512X_LPBFIFO_REQ_DIR_WRITE)
305 bits |= MPC512X_SCLPC_NORM_INT_ENABLE;
306 else
307 lpbfifo.wait_lpbfifo_irq = false;
308
309 out_be32(&lpbfifo.regs->enable, bits);
310
311 /* 4. Set packet size and kick FIFO off */
312 bits = lpbfifo.req->size | MPC512X_SCLPC_START;
313 out_be32(&lpbfifo.regs->pkt_size, bits);
314
315 /* 5. Finally kick DMA off */
316 cookie = dma_tx->tx_submit(dma_tx);
317 if (dma_submit_error(cookie)) {
318 ret = -ENOSPC;
319 goto err_dma_submit;
320 }
321
322 return 0;
323
324 err_dma_submit:
325 out_be32(&lpbfifo.regs->enable,
326 MPC512X_SCLPC_RESET | MPC512X_SCLPC_FIFO_RESET);
327 err_dma_prep:
328 dma_unmap_single(dma_dev->dev, sg_dma_address(&sg),
329 lpbfifo.req->size, dir);
330 return ret;
331}
332
333static int mpc512x_lpbfifo_submit_locked(struct mpc512x_lpbfifo_request *req)
334{
335 int ret = 0;
336
337 if (!lpbfifo.regs)
338 return -ENODEV;
339
340 /* Check whether a transfer is in progress */
341 if (lpbfifo.req)
342 return -EBUSY;
343
344 lpbfifo.wait_lpbfifo_irq = true;
345 lpbfifo.wait_lpbfifo_callback = true;
346 lpbfifo.req = req;
347
348 ret = mpc512x_lpbfifo_kick();
349 if (ret != 0)
350 lpbfifo.req = NULL; /* Set the FIFO as idle */
351
352 return ret;
353}
354
355int mpc512x_lpbfifo_submit(struct mpc512x_lpbfifo_request *req)
356{
357 unsigned long flags;
358 int ret = 0;
359
360 spin_lock_irqsave(&lpbfifo.lock, flags);
361 ret = mpc512x_lpbfifo_submit_locked(req);
362 spin_unlock_irqrestore(&lpbfifo.lock, flags);
363
364 return ret;
365}
366EXPORT_SYMBOL(mpc512x_lpbfifo_submit);
367
368/*
369 * LPBFIFO driver uses "ranges" property of "localbus" device tree node
370 * for being able to determine the chip select number of a client device
371 * ordering a DMA transfer.
372 */
373static int get_cs_ranges(struct device *dev)
374{
375 int ret = -ENODEV;
376 struct device_node *lb_node;
377 const u32 *addr_cells_p;
378 const u32 *size_cells_p;
379 int proplen;
380 size_t i;
381
382 lb_node = of_find_compatible_node(NULL, NULL, "fsl,mpc5121-localbus");
383 if (!lb_node)
384 return ret;
385
386 /*
387 * The node defined as compatible with 'fsl,mpc5121-localbus'
388 * should have two address cells and one size cell.
389 * Every item of its ranges property should consist of:
390 * - the first address cell which is the chipselect number;
391 * - the second address cell which is the offset in the chipselect,
392 * must be zero.
393 * - CPU address of the beginning of an access window;
394 * - the only size cell which is the size of an access window.
395 */
396 addr_cells_p = of_get_property(lb_node, "#address-cells", NULL);
397 size_cells_p = of_get_property(lb_node, "#size-cells", NULL);
398 if (addr_cells_p == NULL || *addr_cells_p != 2 ||
399 size_cells_p == NULL || *size_cells_p != 1) {
400 goto end;
401 }
402
403 proplen = of_property_count_u32_elems(lb_node, "ranges");
404 if (proplen <= 0 || proplen % 4 != 0)
405 goto end;
406
407 lpbfifo.cs_n = proplen / 4;
408 lpbfifo.cs_ranges = devm_kcalloc(dev, lpbfifo.cs_n,
409 sizeof(struct cs_range), GFP_KERNEL);
410 if (!lpbfifo.cs_ranges)
411 goto end;
412
413 if (of_property_read_u32_array(lb_node, "ranges",
414 (u32 *)lpbfifo.cs_ranges, proplen) != 0) {
415 goto end;
416 }
417
418 for (i = 0; i < lpbfifo.cs_n; i++) {
419 if (lpbfifo.cs_ranges[i].base != 0)
420 goto end;
421 }
422
423 ret = 0;
424
425 end:
426 of_node_put(lb_node);
427 return ret;
428}
429
430static int mpc512x_lpbfifo_probe(struct platform_device *pdev)
431{
432 struct resource r;
433 int ret = 0;
434
435 memset(&lpbfifo, 0, sizeof(struct lpbfifo_data));
436 spin_lock_init(&lpbfifo.lock);
437
438 lpbfifo.chan = dma_request_slave_channel(&pdev->dev, "rx-tx");
439 if (lpbfifo.chan == NULL)
440 return -EPROBE_DEFER;
441
442 if (of_address_to_resource(pdev->dev.of_node, 0, &r) != 0) {
443 dev_err(&pdev->dev, "bad 'reg' in 'sclpc' device tree node\n");
444 ret = -ENODEV;
445 goto err0;
446 }
447
448 lpbfifo.regs_phys = r.start;
449 lpbfifo.regs_size = resource_size(&r);
450
451 if (!devm_request_mem_region(&pdev->dev, lpbfifo.regs_phys,
452 lpbfifo.regs_size, DRV_NAME)) {
453 dev_err(&pdev->dev, "unable to request region\n");
454 ret = -EBUSY;
455 goto err0;
456 }
457
458 lpbfifo.regs = devm_ioremap(&pdev->dev,
459 lpbfifo.regs_phys, lpbfifo.regs_size);
460 if (!lpbfifo.regs) {
461 dev_err(&pdev->dev, "mapping registers failed\n");
462 ret = -ENOMEM;
463 goto err0;
464 }
465
466 out_be32(&lpbfifo.regs->enable,
467 MPC512X_SCLPC_RESET | MPC512X_SCLPC_FIFO_RESET);
468
469 if (get_cs_ranges(&pdev->dev) != 0) {
470 dev_err(&pdev->dev, "bad '/localbus' device tree node\n");
471 ret = -ENODEV;
472 goto err0;
473 }
474
475 lpbfifo.irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
476 if (lpbfifo.irq == NO_IRQ) {
477 dev_err(&pdev->dev, "mapping irq failed\n");
478 ret = -ENODEV;
479 goto err0;
480 }
481
482 if (request_irq(lpbfifo.irq, mpc512x_lpbfifo_irq, 0,
483 DRV_NAME, &pdev->dev) != 0) {
484 dev_err(&pdev->dev, "requesting irq failed\n");
485 ret = -ENODEV;
486 goto err1;
487 }
488
489 dev_info(&pdev->dev, "probe succeeded\n");
490 return 0;
491
492 err1:
493 irq_dispose_mapping(lpbfifo.irq);
494 err0:
495 dma_release_channel(lpbfifo.chan);
496 return ret;
497}
498
499static int mpc512x_lpbfifo_remove(struct platform_device *pdev)
500{
501 unsigned long flags;
502 struct dma_device *dma_dev = lpbfifo.chan->device;
503 struct mpc512x_lpbfifo __iomem *regs = NULL;
504
505 spin_lock_irqsave(&lpbfifo.lock, flags);
506 regs = lpbfifo.regs;
507 lpbfifo.regs = NULL;
508 spin_unlock_irqrestore(&lpbfifo.lock, flags);
509
510 dma_dev->device_terminate_all(lpbfifo.chan);
511 out_be32(&regs->enable, MPC512X_SCLPC_RESET | MPC512X_SCLPC_FIFO_RESET);
512
513 free_irq(lpbfifo.irq, &pdev->dev);
514 irq_dispose_mapping(lpbfifo.irq);
515 dma_release_channel(lpbfifo.chan);
516
517 return 0;
518}
519
520static const struct of_device_id mpc512x_lpbfifo_match[] = {
521 { .compatible = "fsl,mpc512x-lpbfifo", },
522 {},
523};
524MODULE_DEVICE_TABLE(of, mpc512x_lpbfifo_match);
525
526static struct platform_driver mpc512x_lpbfifo_driver = {
527 .probe = mpc512x_lpbfifo_probe,
528 .remove = mpc512x_lpbfifo_remove,
529 .driver = {
530 .name = DRV_NAME,
531 .owner = THIS_MODULE,
532 .of_match_table = mpc512x_lpbfifo_match,
533 },
534};
535
536module_platform_driver(mpc512x_lpbfifo_driver);
537
538MODULE_AUTHOR("Alexander Popov <alex.popov@linux.com>");
539MODULE_DESCRIPTION("MPC512x LocalPlus Bus FIFO device driver");
540MODULE_LICENSE("GPL v2");
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
index 78ac19aefa4d..3048e34db6d8 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_gpt.c
@@ -724,7 +724,7 @@ static int mpc52xx_gpt_probe(struct platform_device *ofdev)
724{ 724{
725 struct mpc52xx_gpt_priv *gpt; 725 struct mpc52xx_gpt_priv *gpt;
726 726
727 gpt = kzalloc(sizeof *gpt, GFP_KERNEL); 727 gpt = devm_kzalloc(&ofdev->dev, sizeof *gpt, GFP_KERNEL);
728 if (!gpt) 728 if (!gpt)
729 return -ENOMEM; 729 return -ENOMEM;
730 730
@@ -732,10 +732,8 @@ static int mpc52xx_gpt_probe(struct platform_device *ofdev)
732 gpt->dev = &ofdev->dev; 732 gpt->dev = &ofdev->dev;
733 gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node); 733 gpt->ipb_freq = mpc5xxx_get_bus_frequency(ofdev->dev.of_node);
734 gpt->regs = of_iomap(ofdev->dev.of_node, 0); 734 gpt->regs = of_iomap(ofdev->dev.of_node, 0);
735 if (!gpt->regs) { 735 if (!gpt->regs)
736 kfree(gpt);
737 return -ENOMEM; 736 return -ENOMEM;
738 }
739 737
740 dev_set_drvdata(&ofdev->dev, gpt); 738 dev_set_drvdata(&ofdev->dev, gpt);
741 739
diff --git a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
index 251dcb90ef34..7bb42a0100de 100644
--- a/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
+++ b/arch/powerpc/platforms/52xx/mpc52xx_lpbfifo.c
@@ -568,6 +568,7 @@ static const struct of_device_id mpc52xx_lpbfifo_match[] = {
568 { .compatible = "fsl,mpc5200-lpbfifo", }, 568 { .compatible = "fsl,mpc5200-lpbfifo", },
569 {}, 569 {},
570}; 570};
571MODULE_DEVICE_TABLE(of, mpc52xx_lpbfifo_match);
571 572
572static struct platform_driver mpc52xx_lpbfifo_driver = { 573static struct platform_driver mpc52xx_lpbfifo_driver = {
573 .driver = { 574 .driver = {
diff --git a/arch/powerpc/platforms/85xx/corenet_generic.c b/arch/powerpc/platforms/85xx/corenet_generic.c
index b39557120cbb..46d05c94add6 100644
--- a/arch/powerpc/platforms/85xx/corenet_generic.c
+++ b/arch/powerpc/platforms/85xx/corenet_generic.c
@@ -161,6 +161,7 @@ static const char * const boards[] __initconst = {
161 "fsl,T1042RDB", 161 "fsl,T1042RDB",
162 "fsl,T1042RDB_PI", 162 "fsl,T1042RDB_PI",
163 "keymile,kmcoge4", 163 "keymile,kmcoge4",
164 "varisys,CYRUS",
164 NULL 165 NULL
165}; 166};
166 167
@@ -214,7 +215,17 @@ define_machine(corenet_generic) {
214 .pcibios_fixup_bus = fsl_pcibios_fixup_bus, 215 .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
215 .pcibios_fixup_phb = fsl_pcibios_fixup_phb, 216 .pcibios_fixup_phb = fsl_pcibios_fixup_phb,
216#endif 217#endif
218/*
219 * Core reset may cause issues if using the proxy mode of MPIC.
220 * So, use the mixed mode of MPIC if enabling CPU hotplug.
221 *
222 * Likewise, problems have been seen with kexec when coreint is enabled.
223 */
224#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_KEXEC)
225 .get_irq = mpic_get_irq,
226#else
217 .get_irq = mpic_get_coreint_irq, 227 .get_irq = mpic_get_coreint_irq,
228#endif
218 .restart = fsl_rstcr_restart, 229 .restart = fsl_rstcr_restart,
219 .calibrate_decr = generic_calibrate_decr, 230 .calibrate_decr = generic_calibrate_decr,
220 .progress = udbg_progress, 231 .progress = udbg_progress,
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_mds.c b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
index a392e94a07fa..f0be439ceaaa 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_mds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_mds.c
@@ -34,6 +34,7 @@
34#include <linux/of_device.h> 34#include <linux/of_device.h>
35#include <linux/phy.h> 35#include <linux/phy.h>
36#include <linux/memblock.h> 36#include <linux/memblock.h>
37#include <linux/fsl/guts.h>
37 38
38#include <linux/atomic.h> 39#include <linux/atomic.h>
39#include <asm/time.h> 40#include <asm/time.h>
@@ -51,7 +52,6 @@
51#include <asm/qe_ic.h> 52#include <asm/qe_ic.h>
52#include <asm/mpic.h> 53#include <asm/mpic.h>
53#include <asm/swiotlb.h> 54#include <asm/swiotlb.h>
54#include <asm/fsl_guts.h>
55#include "smp.h" 55#include "smp.h"
56 56
57#include "mpc85xx.h" 57#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
index e358bed66d01..50dcc00a0f5a 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_rdb.c
@@ -17,6 +17,7 @@
17#include <linux/seq_file.h> 17#include <linux/seq_file.h>
18#include <linux/interrupt.h> 18#include <linux/interrupt.h>
19#include <linux/of_platform.h> 19#include <linux/of_platform.h>
20#include <linux/fsl/guts.h>
20 21
21#include <asm/time.h> 22#include <asm/time.h>
22#include <asm/machdep.h> 23#include <asm/machdep.h>
@@ -27,7 +28,6 @@
27#include <asm/mpic.h> 28#include <asm/mpic.h>
28#include <asm/qe.h> 29#include <asm/qe.h>
29#include <asm/qe_ic.h> 30#include <asm/qe_ic.h>
30#include <asm/fsl_guts.h>
31 31
32#include <sysdev/fsl_soc.h> 32#include <sysdev/fsl_soc.h>
33#include <sysdev/fsl_pci.h> 33#include <sysdev/fsl_pci.h>
diff --git a/arch/powerpc/platforms/85xx/p1022_ds.c b/arch/powerpc/platforms/85xx/p1022_ds.c
index 6ac986d3f8a3..371df822e88e 100644
--- a/arch/powerpc/platforms/85xx/p1022_ds.c
+++ b/arch/powerpc/platforms/85xx/p1022_ds.c
@@ -16,6 +16,7 @@
16 * kind, whether express or implied. 16 * kind, whether express or implied.
17 */ 17 */
18 18
19#include <linux/fsl/guts.h>
19#include <linux/pci.h> 20#include <linux/pci.h>
20#include <linux/of_platform.h> 21#include <linux/of_platform.h>
21#include <asm/div64.h> 22#include <asm/div64.h>
@@ -25,7 +26,6 @@
25#include <sysdev/fsl_soc.h> 26#include <sysdev/fsl_soc.h>
26#include <sysdev/fsl_pci.h> 27#include <sysdev/fsl_pci.h>
27#include <asm/udbg.h> 28#include <asm/udbg.h>
28#include <asm/fsl_guts.h>
29#include <asm/fsl_lbc.h> 29#include <asm/fsl_lbc.h>
30#include "smp.h" 30#include "smp.h"
31 31
diff --git a/arch/powerpc/platforms/85xx/p1022_rdk.c b/arch/powerpc/platforms/85xx/p1022_rdk.c
index 680232d6ba48..5087becaa8bc 100644
--- a/arch/powerpc/platforms/85xx/p1022_rdk.c
+++ b/arch/powerpc/platforms/85xx/p1022_rdk.c
@@ -12,6 +12,7 @@
12 * kind, whether express or implied. 12 * kind, whether express or implied.
13 */ 13 */
14 14
15#include <linux/fsl/guts.h>
15#include <linux/pci.h> 16#include <linux/pci.h>
16#include <linux/of_platform.h> 17#include <linux/of_platform.h>
17#include <asm/div64.h> 18#include <asm/div64.h>
@@ -21,7 +22,6 @@
21#include <sysdev/fsl_soc.h> 22#include <sysdev/fsl_soc.h>
22#include <sysdev/fsl_pci.h> 23#include <sysdev/fsl_pci.h>
23#include <asm/udbg.h> 24#include <asm/udbg.h>
24#include <asm/fsl_guts.h>
25#include "smp.h" 25#include "smp.h"
26 26
27#include "mpc85xx.h" 27#include "mpc85xx.h"
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index b8b821697910..6b107cea1c08 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -19,6 +19,7 @@
19#include <linux/kexec.h> 19#include <linux/kexec.h>
20#include <linux/highmem.h> 20#include <linux/highmem.h>
21#include <linux/cpu.h> 21#include <linux/cpu.h>
22#include <linux/fsl/guts.h>
22 23
23#include <asm/machdep.h> 24#include <asm/machdep.h>
24#include <asm/pgtable.h> 25#include <asm/pgtable.h>
@@ -26,7 +27,6 @@
26#include <asm/mpic.h> 27#include <asm/mpic.h>
27#include <asm/cacheflush.h> 28#include <asm/cacheflush.h>
28#include <asm/dbell.h> 29#include <asm/dbell.h>
29#include <asm/fsl_guts.h>
30#include <asm/code-patching.h> 30#include <asm/code-patching.h>
31#include <asm/cputhreads.h> 31#include <asm/cputhreads.h>
32 32
@@ -173,15 +173,22 @@ static inline u32 read_spin_table_addr_l(void *spin_table)
173static void wake_hw_thread(void *info) 173static void wake_hw_thread(void *info)
174{ 174{
175 void fsl_secondary_thread_init(void); 175 void fsl_secondary_thread_init(void);
176 unsigned long imsr1, inia1; 176 unsigned long imsr, inia;
177 int nr = *(const int *)info; 177 int nr = *(const int *)info;
178 178
179 imsr1 = MSR_KERNEL; 179 imsr = MSR_KERNEL;
180 inia1 = *(unsigned long *)fsl_secondary_thread_init; 180 inia = *(unsigned long *)fsl_secondary_thread_init;
181 181
182 mttmr(TMRN_IMSR1, imsr1); 182 if (cpu_thread_in_core(nr) == 0) {
183 mttmr(TMRN_INIA1, inia1); 183 /* For when we boot on a secondary thread with kdump */
184 mtspr(SPRN_TENS, TEN_THREAD(1)); 184 mttmr(TMRN_IMSR0, imsr);
185 mttmr(TMRN_INIA0, inia);
186 mtspr(SPRN_TENS, TEN_THREAD(0));
187 } else {
188 mttmr(TMRN_IMSR1, imsr);
189 mttmr(TMRN_INIA1, inia);
190 mtspr(SPRN_TENS, TEN_THREAD(1));
191 }
185 192
186 smp_generic_kick_cpu(nr); 193 smp_generic_kick_cpu(nr);
187} 194}
@@ -224,6 +231,12 @@ static int smp_85xx_kick_cpu(int nr)
224 231
225 smp_call_function_single(primary, wake_hw_thread, &nr, 0); 232 smp_call_function_single(primary, wake_hw_thread, &nr, 0);
226 return 0; 233 return 0;
234 } else if (cpu_thread_in_core(boot_cpuid) != 0 &&
235 cpu_first_thread_sibling(boot_cpuid) == nr) {
236 if (WARN_ON_ONCE(!cpu_has_feature(CPU_FTR_SMT)))
237 return -ENOENT;
238
239 smp_call_function_single(boot_cpuid, wake_hw_thread, &nr, 0);
227 } 240 }
228#endif 241#endif
229 242
@@ -331,13 +344,14 @@ struct smp_ops_t smp_85xx_ops = {
331 .cpu_disable = generic_cpu_disable, 344 .cpu_disable = generic_cpu_disable,
332 .cpu_die = generic_cpu_die, 345 .cpu_die = generic_cpu_die,
333#endif 346#endif
334#ifdef CONFIG_KEXEC 347#if defined(CONFIG_KEXEC) && !defined(CONFIG_PPC64)
335 .give_timebase = smp_generic_give_timebase, 348 .give_timebase = smp_generic_give_timebase,
336 .take_timebase = smp_generic_take_timebase, 349 .take_timebase = smp_generic_take_timebase,
337#endif 350#endif
338}; 351};
339 352
340#ifdef CONFIG_KEXEC 353#ifdef CONFIG_KEXEC
354#ifdef CONFIG_PPC32
341atomic_t kexec_down_cpus = ATOMIC_INIT(0); 355atomic_t kexec_down_cpus = ATOMIC_INIT(0);
342 356
343void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary) 357void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
@@ -357,9 +371,64 @@ static void mpc85xx_smp_kexec_down(void *arg)
357 if (ppc_md.kexec_cpu_down) 371 if (ppc_md.kexec_cpu_down)
358 ppc_md.kexec_cpu_down(0,1); 372 ppc_md.kexec_cpu_down(0,1);
359} 373}
374#else
375void mpc85xx_smp_kexec_cpu_down(int crash_shutdown, int secondary)
376{
377 int cpu = smp_processor_id();
378 int sibling = cpu_last_thread_sibling(cpu);
379 bool notified = false;
380 int disable_cpu;
381 int disable_threadbit = 0;
382 long start = mftb();
383 long now;
384
385 local_irq_disable();
386 hard_irq_disable();
387 mpic_teardown_this_cpu(secondary);
388
389 if (cpu == crashing_cpu && cpu_thread_in_core(cpu) != 0) {
390 /*
391 * We enter the crash kernel on whatever cpu crashed,
392 * even if it's a secondary thread. If that's the case,
393 * disable the corresponding primary thread.
394 */
395 disable_threadbit = 1;
396 disable_cpu = cpu_first_thread_sibling(cpu);
397 } else if (sibling != crashing_cpu &&
398 cpu_thread_in_core(cpu) == 0 &&
399 cpu_thread_in_core(sibling) != 0) {
400 disable_threadbit = 2;
401 disable_cpu = sibling;
402 }
403
404 if (disable_threadbit) {
405 while (paca[disable_cpu].kexec_state < KEXEC_STATE_REAL_MODE) {
406 barrier();
407 now = mftb();
408 if (!notified && now - start > 1000000) {
409 pr_info("%s/%d: waiting for cpu %d to enter KEXEC_STATE_REAL_MODE (%d)\n",
410 __func__, smp_processor_id(),
411 disable_cpu,
412 paca[disable_cpu].kexec_state);
413 notified = true;
414 }
415 }
416
417 if (notified) {
418 pr_info("%s: cpu %d done waiting\n",
419 __func__, disable_cpu);
420 }
421
422 mtspr(SPRN_TENC, disable_threadbit);
423 while (mfspr(SPRN_TENSR) & disable_threadbit)
424 cpu_relax();
425 }
426}
427#endif
360 428
361static void mpc85xx_smp_machine_kexec(struct kimage *image) 429static void mpc85xx_smp_machine_kexec(struct kimage *image)
362{ 430{
431#ifdef CONFIG_PPC32
363 int timeout = INT_MAX; 432 int timeout = INT_MAX;
364 int i, num_cpus = num_present_cpus(); 433 int i, num_cpus = num_present_cpus();
365 434
@@ -380,6 +449,7 @@ static void mpc85xx_smp_machine_kexec(struct kimage *image)
380 if ( i == smp_processor_id() ) continue; 449 if ( i == smp_processor_id() ) continue;
381 mpic_reset_core(i); 450 mpic_reset_core(i);
382 } 451 }
452#endif
383 453
384 default_machine_kexec(image); 454 default_machine_kexec(image);
385} 455}
diff --git a/arch/powerpc/platforms/85xx/twr_p102x.c b/arch/powerpc/platforms/85xx/twr_p102x.c
index 30e002f4648c..892e613519cc 100644
--- a/arch/powerpc/platforms/85xx/twr_p102x.c
+++ b/arch/powerpc/platforms/85xx/twr_p102x.c
@@ -15,6 +15,7 @@
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/errno.h> 17#include <linux/errno.h>
18#include <linux/fsl/guts.h>
18#include <linux/pci.h> 19#include <linux/pci.h>
19#include <linux/of_platform.h> 20#include <linux/of_platform.h>
20 21
@@ -23,7 +24,6 @@
23#include <asm/mpic.h> 24#include <asm/mpic.h>
24#include <asm/qe.h> 25#include <asm/qe.h>
25#include <asm/qe_ic.h> 26#include <asm/qe_ic.h>
26#include <asm/fsl_guts.h>
27 27
28#include <sysdev/fsl_soc.h> 28#include <sysdev/fsl_soc.h>
29#include <sysdev/fsl_pci.h> 29#include <sysdev/fsl_pci.h>
diff --git a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
index 55413a547ea8..437a9c372ae1 100644
--- a/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
+++ b/arch/powerpc/platforms/86xx/mpc8610_hpcd.c
@@ -24,6 +24,7 @@
24#include <linux/delay.h> 24#include <linux/delay.h>
25#include <linux/seq_file.h> 25#include <linux/seq_file.h>
26#include <linux/of.h> 26#include <linux/of.h>
27#include <linux/fsl/guts.h>
27 28
28#include <asm/time.h> 29#include <asm/time.h>
29#include <asm/machdep.h> 30#include <asm/machdep.h>
@@ -38,7 +39,6 @@
38#include <sysdev/fsl_pci.h> 39#include <sysdev/fsl_pci.h>
39#include <sysdev/fsl_soc.h> 40#include <sysdev/fsl_soc.h>
40#include <sysdev/simple_gpio.h> 41#include <sysdev/simple_gpio.h>
41#include <asm/fsl_guts.h>
42 42
43#include "mpc86xx.h" 43#include "mpc86xx.h"
44 44
diff --git a/arch/powerpc/platforms/Kconfig.cputype b/arch/powerpc/platforms/Kconfig.cputype
index c140e94c7c72..142dff5e96d6 100644
--- a/arch/powerpc/platforms/Kconfig.cputype
+++ b/arch/powerpc/platforms/Kconfig.cputype
@@ -147,17 +147,6 @@ config 6xx
147 depends on PPC32 && PPC_BOOK3S 147 depends on PPC32 && PPC_BOOK3S
148 select PPC_HAVE_PMU_SUPPORT 148 select PPC_HAVE_PMU_SUPPORT
149 149
150config TUNE_CELL
151 bool "Optimize for Cell Broadband Engine"
152 depends on PPC64 && PPC_BOOK3S
153 help
154 Cause the compiler to optimize for the PPE of the Cell Broadband
155 Engine. This will make the code run considerably faster on Cell
156 but somewhat slower on other machines. This option only changes
157 the scheduling of instructions, not the selection of instructions
158 itself, so the resulting kernel will keep running on all other
159 machines.
160
161# this is temp to handle compat with arch=ppc 150# this is temp to handle compat with arch=ppc
162config 8xx 151config 8xx
163 bool 152 bool
diff --git a/arch/powerpc/platforms/cell/Kconfig b/arch/powerpc/platforms/cell/Kconfig
index b0ac1773cea6..429fc59d2a47 100644
--- a/arch/powerpc/platforms/cell/Kconfig
+++ b/arch/powerpc/platforms/cell/Kconfig
@@ -25,7 +25,7 @@ config PPC_CELL_NATIVE
25 25
26config PPC_IBM_CELL_BLADE 26config PPC_IBM_CELL_BLADE
27 bool "IBM Cell Blade" 27 bool "IBM Cell Blade"
28 depends on PPC64 && PPC_BOOK3S 28 depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
29 select PPC_CELL_NATIVE 29 select PPC_CELL_NATIVE
30 select PPC_OF_PLATFORM_PCI 30 select PPC_OF_PLATFORM_PCI
31 select PCI 31 select PCI
@@ -35,7 +35,7 @@ config PPC_IBM_CELL_BLADE
35 35
36config PPC_CELL_QPACE 36config PPC_CELL_QPACE
37 bool "IBM Cell - QPACE" 37 bool "IBM Cell - QPACE"
38 depends on PPC64 && PPC_BOOK3S 38 depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
39 select PPC_CELL_COMMON 39 select PPC_CELL_COMMON
40 40
41config AXON_MSI 41config AXON_MSI
diff --git a/arch/powerpc/platforms/maple/Kconfig b/arch/powerpc/platforms/maple/Kconfig
index 1ea621a94c3b..e359d0db092c 100644
--- a/arch/powerpc/platforms/maple/Kconfig
+++ b/arch/powerpc/platforms/maple/Kconfig
@@ -1,5 +1,5 @@
1config PPC_MAPLE 1config PPC_MAPLE
2 depends on PPC64 && PPC_BOOK3S 2 depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
3 bool "Maple 970FX Evaluation Board" 3 bool "Maple 970FX Evaluation Board"
4 select PCI 4 select PCI
5 select MPIC 5 select MPIC
diff --git a/arch/powerpc/platforms/pasemi/Kconfig b/arch/powerpc/platforms/pasemi/Kconfig
index a2aeb327d185..00d4b28cbb60 100644
--- a/arch/powerpc/platforms/pasemi/Kconfig
+++ b/arch/powerpc/platforms/pasemi/Kconfig
@@ -1,5 +1,5 @@
1config PPC_PASEMI 1config PPC_PASEMI
2 depends on PPC64 && PPC_BOOK3S 2 depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
3 bool "PA Semi SoC-based platforms" 3 bool "PA Semi SoC-based platforms"
4 default n 4 default n
5 select MPIC 5 select MPIC
diff --git a/arch/powerpc/platforms/powermac/Kconfig b/arch/powerpc/platforms/powermac/Kconfig
index 607124bae2e7..43c606268baf 100644
--- a/arch/powerpc/platforms/powermac/Kconfig
+++ b/arch/powerpc/platforms/powermac/Kconfig
@@ -1,6 +1,6 @@
1config PPC_PMAC 1config PPC_PMAC
2 bool "Apple PowerMac based machines" 2 bool "Apple PowerMac based machines"
3 depends on PPC_BOOK3S 3 depends on PPC_BOOK3S && CPU_BIG_ENDIAN
4 select MPIC 4 select MPIC
5 select PCI 5 select PCI
6 select PPC_INDIRECT_PCI if PPC32 6 select PPC_INDIRECT_PCI if PPC32
diff --git a/arch/powerpc/platforms/powernv/eeh-powernv.c b/arch/powerpc/platforms/powernv/eeh-powernv.c
index 3bb6acb76339..e1c90725522a 100644
--- a/arch/powerpc/platforms/powernv/eeh-powernv.c
+++ b/arch/powerpc/platforms/powernv/eeh-powernv.c
@@ -43,17 +43,11 @@
43static bool pnv_eeh_nb_init = false; 43static bool pnv_eeh_nb_init = false;
44static int eeh_event_irq = -EINVAL; 44static int eeh_event_irq = -EINVAL;
45 45
46/**
47 * pnv_eeh_init - EEH platform dependent initialization
48 *
49 * EEH platform dependent initialization on powernv
50 */
51static int pnv_eeh_init(void) 46static int pnv_eeh_init(void)
52{ 47{
53 struct pci_controller *hose; 48 struct pci_controller *hose;
54 struct pnv_phb *phb; 49 struct pnv_phb *phb;
55 50
56 /* We require OPALv3 */
57 if (!firmware_has_feature(FW_FEATURE_OPALv3)) { 51 if (!firmware_has_feature(FW_FEATURE_OPALv3)) {
58 pr_warn("%s: OPALv3 is required !\n", 52 pr_warn("%s: OPALv3 is required !\n",
59 __func__); 53 __func__);
@@ -77,9 +71,9 @@ static int pnv_eeh_init(void)
77 /* 71 /*
78 * PE#0 should be regarded as valid by EEH core 72 * PE#0 should be regarded as valid by EEH core
79 * if it's not the reserved one. Currently, we 73 * if it's not the reserved one. Currently, we
80 * have the reserved PE#0 and PE#127 for PHB3 74 * have the reserved PE#255 and PE#127 for PHB3
81 * and P7IOC separately. So we should regard 75 * and P7IOC separately. So we should regard
82 * PE#0 as valid for P7IOC. 76 * PE#0 as valid for PHB3 and P7IOC.
83 */ 77 */
84 if (phb->ioda.reserved_pe != 0) 78 if (phb->ioda.reserved_pe != 0)
85 eeh_add_flag(EEH_VALID_PE_ZERO); 79 eeh_add_flag(EEH_VALID_PE_ZERO);
@@ -284,33 +278,23 @@ static int pnv_eeh_post_init(void)
284#endif /* CONFIG_DEBUG_FS */ 278#endif /* CONFIG_DEBUG_FS */
285 } 279 }
286 280
287
288 return ret; 281 return ret;
289} 282}
290 283
291static int pnv_eeh_cap_start(struct pci_dn *pdn) 284static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap)
292{ 285{
293 u32 status; 286 int pos = PCI_CAPABILITY_LIST;
287 int cnt = 48; /* Maximal number of capabilities */
288 u32 status, id;
294 289
295 if (!pdn) 290 if (!pdn)
296 return 0; 291 return 0;
297 292
293 /* Check if the device supports capabilities */
298 pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status); 294 pnv_pci_cfg_read(pdn, PCI_STATUS, 2, &status);
299 if (!(status & PCI_STATUS_CAP_LIST)) 295 if (!(status & PCI_STATUS_CAP_LIST))
300 return 0; 296 return 0;
301 297
302 return PCI_CAPABILITY_LIST;
303}
304
305static int pnv_eeh_find_cap(struct pci_dn *pdn, int cap)
306{
307 int pos = pnv_eeh_cap_start(pdn);
308 int cnt = 48; /* Maximal number of capabilities */
309 u32 id;
310
311 if (!pos)
312 return 0;
313
314 while (cnt--) { 298 while (cnt--) {
315 pnv_pci_cfg_read(pdn, pos, 1, &pos); 299 pnv_pci_cfg_read(pdn, pos, 1, &pos);
316 if (pos < 0x40) 300 if (pos < 0x40)
@@ -443,11 +427,14 @@ static void *pnv_eeh_probe(struct pci_dn *pdn, void *data)
443 * that PE to block its config space. 427 * that PE to block its config space.
444 * 428 *
445 * Broadcom Austin 4-ports NICs (14e4:1657) 429 * Broadcom Austin 4-ports NICs (14e4:1657)
430 * Broadcom Shiner 4-ports 1G NICs (14e4:168a)
446 * Broadcom Shiner 2-ports 10G NICs (14e4:168e) 431 * Broadcom Shiner 2-ports 10G NICs (14e4:168e)
447 */ 432 */
448 if ((pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && 433 if ((pdn->vendor_id == PCI_VENDOR_ID_BROADCOM &&
449 pdn->device_id == 0x1657) || 434 pdn->device_id == 0x1657) ||
450 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM && 435 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM &&
436 pdn->device_id == 0x168a) ||
437 (pdn->vendor_id == PCI_VENDOR_ID_BROADCOM &&
451 pdn->device_id == 0x168e)) 438 pdn->device_id == 0x168e))
452 edev->pe->state |= EEH_PE_CFG_RESTRICTED; 439 edev->pe->state |= EEH_PE_CFG_RESTRICTED;
453 440
@@ -487,10 +474,9 @@ static int pnv_eeh_set_option(struct eeh_pe *pe, int option)
487 struct pci_controller *hose = pe->phb; 474 struct pci_controller *hose = pe->phb;
488 struct pnv_phb *phb = hose->private_data; 475 struct pnv_phb *phb = hose->private_data;
489 bool freeze_pe = false; 476 bool freeze_pe = false;
490 int opt, ret = 0; 477 int opt;
491 s64 rc; 478 s64 rc;
492 479
493 /* Sanity check on option */
494 switch (option) { 480 switch (option) {
495 case EEH_OPT_DISABLE: 481 case EEH_OPT_DISABLE:
496 return -EPERM; 482 return -EPERM;
@@ -511,38 +497,37 @@ static int pnv_eeh_set_option(struct eeh_pe *pe, int option)
511 return -EINVAL; 497 return -EINVAL;
512 } 498 }
513 499
514 /* If PHB supports compound PE, to handle it */ 500 /* Freeze master and slave PEs if PHB supports compound PEs */
515 if (freeze_pe) { 501 if (freeze_pe) {
516 if (phb->freeze_pe) { 502 if (phb->freeze_pe) {
517 phb->freeze_pe(phb, pe->addr); 503 phb->freeze_pe(phb, pe->addr);
518 } else { 504 return 0;
519 rc = opal_pci_eeh_freeze_set(phb->opal_id,
520 pe->addr, opt);
521 if (rc != OPAL_SUCCESS) {
522 pr_warn("%s: Failure %lld freezing "
523 "PHB#%x-PE#%x\n",
524 __func__, rc,
525 phb->hose->global_number, pe->addr);
526 ret = -EIO;
527 }
528 } 505 }
529 } else { 506
530 if (phb->unfreeze_pe) { 507 rc = opal_pci_eeh_freeze_set(phb->opal_id, pe->addr, opt);
531 ret = phb->unfreeze_pe(phb, pe->addr, opt); 508 if (rc != OPAL_SUCCESS) {
532 } else { 509 pr_warn("%s: Failure %lld freezing PHB#%x-PE#%x\n",
533 rc = opal_pci_eeh_freeze_clear(phb->opal_id, 510 __func__, rc, phb->hose->global_number,
534 pe->addr, opt); 511 pe->addr);
535 if (rc != OPAL_SUCCESS) { 512 return -EIO;
536 pr_warn("%s: Failure %lld enable %d "
537 "for PHB#%x-PE#%x\n",
538 __func__, rc, option,
539 phb->hose->global_number, pe->addr);
540 ret = -EIO;
541 }
542 } 513 }
514
515 return 0;
543 } 516 }
544 517
545 return ret; 518 /* Unfreeze master and slave PEs if PHB supports */
519 if (phb->unfreeze_pe)
520 return phb->unfreeze_pe(phb, pe->addr, opt);
521
522 rc = opal_pci_eeh_freeze_clear(phb->opal_id, pe->addr, opt);
523 if (rc != OPAL_SUCCESS) {
524 pr_warn("%s: Failure %lld enable %d for PHB#%x-PE#%x\n",
525 __func__, rc, option, phb->hose->global_number,
526 pe->addr);
527 return -EIO;
528 }
529
530 return 0;
546} 531}
547 532
548/** 533/**
@@ -1065,7 +1050,6 @@ static int pnv_eeh_err_inject(struct eeh_pe *pe, int type, int func,
1065 struct pnv_phb *phb = hose->private_data; 1050 struct pnv_phb *phb = hose->private_data;
1066 s64 rc; 1051 s64 rc;
1067 1052
1068 /* Sanity check on error type */
1069 if (type != OPAL_ERR_INJECT_TYPE_IOA_BUS_ERR && 1053 if (type != OPAL_ERR_INJECT_TYPE_IOA_BUS_ERR &&
1070 type != OPAL_ERR_INJECT_TYPE_IOA_BUS_ERR64) { 1054 type != OPAL_ERR_INJECT_TYPE_IOA_BUS_ERR64) {
1071 pr_warn("%s: Invalid error type %d\n", 1055 pr_warn("%s: Invalid error type %d\n",
diff --git a/arch/powerpc/platforms/powernv/setup.c b/arch/powerpc/platforms/powernv/setup.c
index 685b3cbe1362..a9a8fa37a555 100644
--- a/arch/powerpc/platforms/powernv/setup.c
+++ b/arch/powerpc/platforms/powernv/setup.c
@@ -187,7 +187,7 @@ static void pnv_kexec_wait_secondaries_down(void)
187 187
188 for_each_online_cpu(i) { 188 for_each_online_cpu(i) {
189 uint8_t status; 189 uint8_t status;
190 int64_t rc; 190 int64_t rc, timeout = 1000;
191 191
192 if (i == my_cpu) 192 if (i == my_cpu)
193 continue; 193 continue;
@@ -204,6 +204,18 @@ static void pnv_kexec_wait_secondaries_down(void)
204 i, paca[i].hw_cpu_id); 204 i, paca[i].hw_cpu_id);
205 notified = i; 205 notified = i;
206 } 206 }
207
208 /*
209 * On crash secondaries might be unreachable or hung,
210 * so timeout if we've waited too long
211 * */
212 mdelay(1);
213 if (timeout-- == 0) {
214 printk(KERN_ERR "kexec: timed out waiting for "
215 "cpu %d (physical %d) to enter OPAL\n",
216 i, paca[i].hw_cpu_id);
217 break;
218 }
207 } 219 }
208 } 220 }
209} 221}
@@ -225,13 +237,6 @@ static void pnv_kexec_cpu_down(int crash_shutdown, int secondary)
225 237
226 /* Return the CPU to OPAL */ 238 /* Return the CPU to OPAL */
227 opal_return_cpu(); 239 opal_return_cpu();
228 } else if (crash_shutdown) {
229 /*
230 * On crash, we don't wait for secondaries to go
231 * down as they might be unreachable or hung, so
232 * instead we just wait a bit and move on.
233 */
234 mdelay(1);
235 } else { 240 } else {
236 /* Primary waits for the secondaries to have reached OPAL */ 241 /* Primary waits for the secondaries to have reached OPAL */
237 pnv_kexec_wait_secondaries_down(); 242 pnv_kexec_wait_secondaries_down();
diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
index 56f274064d6c..b27f40f26efc 100644
--- a/arch/powerpc/platforms/ps3/Kconfig
+++ b/arch/powerpc/platforms/ps3/Kconfig
@@ -1,6 +1,6 @@
1config PPC_PS3 1config PPC_PS3
2 bool "Sony PS3" 2 bool "Sony PS3"
3 depends on PPC64 && PPC_BOOK3S 3 depends on PPC64 && PPC_BOOK3S && CPU_BIG_ENDIAN
4 select PPC_CELL 4 select PPC_CELL
5 select USB_OHCI_LITTLE_ENDIAN 5 select USB_OHCI_LITTLE_ENDIAN
6 select USB_OHCI_BIG_ENDIAN_MMIO 6 select USB_OHCI_BIG_ENDIAN_MMIO
diff --git a/arch/powerpc/platforms/pseries/Kconfig b/arch/powerpc/platforms/pseries/Kconfig
index 54c87d5d349d..bec90fb30425 100644
--- a/arch/powerpc/platforms/pseries/Kconfig
+++ b/arch/powerpc/platforms/pseries/Kconfig
@@ -4,6 +4,7 @@ config PPC_PSERIES
4 select HAVE_PCSPKR_PLATFORM 4 select HAVE_PCSPKR_PLATFORM
5 select MPIC 5 select MPIC
6 select OF_DYNAMIC 6 select OF_DYNAMIC
7 select PCI
7 select PCI_MSI 8 select PCI_MSI
8 select PPC_XICS 9 select PPC_XICS
9 select PPC_ICP_NATIVE 10 select PPC_ICP_NATIVE
@@ -15,7 +16,6 @@ config PPC_PSERIES
15 select RTAS_ERROR_LOGGING 16 select RTAS_ERROR_LOGGING
16 select PPC_UDBG_16550 17 select PPC_UDBG_16550
17 select PPC_NATIVE 18 select PPC_NATIVE
18 select PPC_PCI_CHOICE if EXPERT
19 select PPC_DOORBELL 19 select PPC_DOORBELL
20 select HAVE_CONTEXT_TRACKING 20 select HAVE_CONTEXT_TRACKING
21 select HOTPLUG_CPU if SMP 21 select HOTPLUG_CPU if SMP
@@ -43,11 +43,6 @@ config DTL
43 43
44 Say N if you are unsure. 44 Say N if you are unsure.
45 45
46config PSERIES_MSI
47 bool
48 depends on PCI_MSI && PPC_PSERIES && EEH
49 default y
50
51config PSERIES_ENERGY 46config PSERIES_ENERGY
52 tristate "pSeries energy management capabilities driver" 47 tristate "pSeries energy management capabilities driver"
53 depends on PPC_PSERIES 48 depends on PPC_PSERIES
diff --git a/arch/powerpc/platforms/pseries/Makefile b/arch/powerpc/platforms/pseries/Makefile
index 03480796af9a..fedc2ccf029d 100644
--- a/arch/powerpc/platforms/pseries/Makefile
+++ b/arch/powerpc/platforms/pseries/Makefile
@@ -2,14 +2,13 @@ ccflags-$(CONFIG_PPC64) := $(NO_MINIMAL_TOC)
2ccflags-$(CONFIG_PPC_PSERIES_DEBUG) += -DDEBUG 2ccflags-$(CONFIG_PPC_PSERIES_DEBUG) += -DDEBUG
3 3
4obj-y := lpar.o hvCall.o nvram.o reconfig.o \ 4obj-y := lpar.o hvCall.o nvram.o reconfig.o \
5 of_helpers.o \
5 setup.o iommu.o event_sources.o ras.o \ 6 setup.o iommu.o event_sources.o ras.o \
6 firmware.o power.o dlpar.o mobility.o rng.o 7 firmware.o power.o dlpar.o mobility.o rng.o \
8 pci.o pci_dlpar.o eeh_pseries.o msi.o
7obj-$(CONFIG_SMP) += smp.o 9obj-$(CONFIG_SMP) += smp.o
8obj-$(CONFIG_SCANLOG) += scanlog.o 10obj-$(CONFIG_SCANLOG) += scanlog.o
9obj-$(CONFIG_EEH) += eeh_pseries.o
10obj-$(CONFIG_KEXEC) += kexec.o 11obj-$(CONFIG_KEXEC) += kexec.o
11obj-$(CONFIG_PCI) += pci.o pci_dlpar.o
12obj-$(CONFIG_PSERIES_MSI) += msi.o
13obj-$(CONFIG_PSERIES_ENERGY) += pseries_energy.o 12obj-$(CONFIG_PSERIES_ENERGY) += pseries_energy.o
14 13
15obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o 14obj-$(CONFIG_HOTPLUG_CPU) += hotplug-cpu.o
diff --git a/arch/powerpc/platforms/pseries/dlpar.c b/arch/powerpc/platforms/pseries/dlpar.c
index db17827eb746..f244dcb4f2cf 100644
--- a/arch/powerpc/platforms/pseries/dlpar.c
+++ b/arch/powerpc/platforms/pseries/dlpar.c
@@ -18,6 +18,8 @@
18#include <linux/cpu.h> 18#include <linux/cpu.h>
19#include <linux/slab.h> 19#include <linux/slab.h>
20#include <linux/of.h> 20#include <linux/of.h>
21
22#include "of_helpers.h"
21#include "offline_states.h" 23#include "offline_states.h"
22#include "pseries.h" 24#include "pseries.h"
23 25
@@ -244,36 +246,13 @@ cc_error:
244 return first_dn; 246 return first_dn;
245} 247}
246 248
247static struct device_node *derive_parent(const char *path)
248{
249 struct device_node *parent;
250 char *last_slash;
251
252 last_slash = strrchr(path, '/');
253 if (last_slash == path) {
254 parent = of_find_node_by_path("/");
255 } else {
256 char *parent_path;
257 int parent_path_len = last_slash - path + 1;
258 parent_path = kmalloc(parent_path_len, GFP_KERNEL);
259 if (!parent_path)
260 return NULL;
261
262 strlcpy(parent_path, path, parent_path_len);
263 parent = of_find_node_by_path(parent_path);
264 kfree(parent_path);
265 }
266
267 return parent;
268}
269
270int dlpar_attach_node(struct device_node *dn) 249int dlpar_attach_node(struct device_node *dn)
271{ 250{
272 int rc; 251 int rc;
273 252
274 dn->parent = derive_parent(dn->full_name); 253 dn->parent = pseries_of_derive_parent(dn->full_name);
275 if (!dn->parent) 254 if (IS_ERR(dn->parent))
276 return -ENOMEM; 255 return PTR_ERR(dn->parent);
277 256
278 rc = of_attach_node(dn); 257 rc = of_attach_node(dn);
279 if (rc) { 258 if (rc) {
diff --git a/arch/powerpc/platforms/pseries/eeh_pseries.c b/arch/powerpc/platforms/pseries/eeh_pseries.c
index 1ba55d0bb449..ac3ffd97e059 100644
--- a/arch/powerpc/platforms/pseries/eeh_pseries.c
+++ b/arch/powerpc/platforms/pseries/eeh_pseries.c
@@ -433,42 +433,34 @@ static int pseries_eeh_get_state(struct eeh_pe *pe, int *state)
433 return ret; 433 return ret;
434 434
435 /* Parse the result out */ 435 /* Parse the result out */
436 result = 0; 436 if (!rets[1])
437 if (rets[1]) { 437 return EEH_STATE_NOT_SUPPORT;
438 switch(rets[0]) { 438
439 case 0: 439 switch(rets[0]) {
440 result &= ~EEH_STATE_RESET_ACTIVE; 440 case 0:
441 result |= EEH_STATE_MMIO_ACTIVE; 441 result = EEH_STATE_MMIO_ACTIVE |
442 result |= EEH_STATE_DMA_ACTIVE; 442 EEH_STATE_DMA_ACTIVE;
443 break; 443 break;
444 case 1: 444 case 1:
445 result |= EEH_STATE_RESET_ACTIVE; 445 result = EEH_STATE_RESET_ACTIVE |
446 result |= EEH_STATE_MMIO_ACTIVE; 446 EEH_STATE_MMIO_ACTIVE |
447 result |= EEH_STATE_DMA_ACTIVE; 447 EEH_STATE_DMA_ACTIVE;
448 break; 448 break;
449 case 2: 449 case 2:
450 result &= ~EEH_STATE_RESET_ACTIVE; 450 result = 0;
451 result &= ~EEH_STATE_MMIO_ACTIVE; 451 break;
452 result &= ~EEH_STATE_DMA_ACTIVE; 452 case 4:
453 break; 453 result = EEH_STATE_MMIO_ENABLED;
454 case 4: 454 break;
455 result &= ~EEH_STATE_RESET_ACTIVE; 455 case 5:
456 result &= ~EEH_STATE_MMIO_ACTIVE; 456 if (rets[2]) {
457 result &= ~EEH_STATE_DMA_ACTIVE; 457 if (state) *state = rets[2];
458 result |= EEH_STATE_MMIO_ENABLED; 458 result = EEH_STATE_UNAVAILABLE;
459 break; 459 } else {
460 case 5:
461 if (rets[2]) {
462 if (state) *state = rets[2];
463 result = EEH_STATE_UNAVAILABLE;
464 } else {
465 result = EEH_STATE_NOT_SUPPORT;
466 }
467 break;
468 default:
469 result = EEH_STATE_NOT_SUPPORT; 460 result = EEH_STATE_NOT_SUPPORT;
470 } 461 }
471 } else { 462 break;
463 default:
472 result = EEH_STATE_NOT_SUPPORT; 464 result = EEH_STATE_NOT_SUPPORT;
473 } 465 }
474 466
diff --git a/arch/powerpc/platforms/pseries/hvcserver.c b/arch/powerpc/platforms/pseries/hvcserver.c
index eedb64594dc5..94a6e5612b0d 100644
--- a/arch/powerpc/platforms/pseries/hvcserver.c
+++ b/arch/powerpc/platforms/pseries/hvcserver.c
@@ -142,11 +142,11 @@ int hvcs_get_partner_info(uint32_t unit_address, struct list_head *head,
142 int more = 1; 142 int more = 1;
143 int retval; 143 int retval;
144 144
145 memset(pi_buff, 0x00, PAGE_SIZE);
146 /* invalid parameters */ 145 /* invalid parameters */
147 if (!head || !pi_buff) 146 if (!head || !pi_buff)
148 return -EINVAL; 147 return -EINVAL;
149 148
149 memset(pi_buff, 0x00, PAGE_SIZE);
150 last_p_partition_ID = last_p_unit_address = ~0UL; 150 last_p_partition_ID = last_p_unit_address = ~0UL;
151 INIT_LIST_HEAD(head); 151 INIT_LIST_HEAD(head);
152 152
diff --git a/arch/powerpc/platforms/pseries/iommu.c b/arch/powerpc/platforms/pseries/iommu.c
index 0946b98d75d4..bd98ce2be17b 100644
--- a/arch/powerpc/platforms/pseries/iommu.c
+++ b/arch/powerpc/platforms/pseries/iommu.c
@@ -532,7 +532,6 @@ static int tce_setrange_multi_pSeriesLP_walk(unsigned long start_pfn,
532 return tce_setrange_multi_pSeriesLP(start_pfn, num_pfn, arg); 532 return tce_setrange_multi_pSeriesLP(start_pfn, num_pfn, arg);
533} 533}
534 534
535#ifdef CONFIG_PCI
536static void iommu_table_setparms(struct pci_controller *phb, 535static void iommu_table_setparms(struct pci_controller *phb,
537 struct device_node *dn, 536 struct device_node *dn,
538 struct iommu_table *tbl) 537 struct iommu_table *tbl)
@@ -1292,15 +1291,6 @@ static u64 dma_get_required_mask_pSeriesLP(struct device *dev)
1292 return dma_iommu_ops.get_required_mask(dev); 1291 return dma_iommu_ops.get_required_mask(dev);
1293} 1292}
1294 1293
1295#else /* CONFIG_PCI */
1296#define pci_dma_bus_setup_pSeries NULL
1297#define pci_dma_dev_setup_pSeries NULL
1298#define pci_dma_bus_setup_pSeriesLP NULL
1299#define pci_dma_dev_setup_pSeriesLP NULL
1300#define dma_set_mask_pSeriesLP NULL
1301#define dma_get_required_mask_pSeriesLP NULL
1302#endif /* !CONFIG_PCI */
1303
1304static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action, 1294static int iommu_mem_notifier(struct notifier_block *nb, unsigned long action,
1305 void *data) 1295 void *data)
1306{ 1296{
diff --git a/arch/powerpc/platforms/pseries/of_helpers.c b/arch/powerpc/platforms/pseries/of_helpers.c
new file mode 100644
index 000000000000..2798933c0e38
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/of_helpers.c
@@ -0,0 +1,38 @@
1#include <linux/string.h>
2#include <linux/err.h>
3#include <linux/slab.h>
4#include <linux/of.h>
5
6#include "of_helpers.h"
7
8/**
9 * pseries_of_derive_parent - basically like dirname(1)
10 * @path: the full_name of a node to be added to the tree
11 *
12 * Returns the node which should be the parent of the node
13 * described by path. E.g., for path = "/foo/bar", returns
14 * the node with full_name = "/foo".
15 */
16struct device_node *pseries_of_derive_parent(const char *path)
17{
18 struct device_node *parent;
19 char *parent_path = "/";
20 const char *tail;
21
22 /* We do not want the trailing '/' character */
23 tail = kbasename(path) - 1;
24
25 /* reject if path is "/" */
26 if (!strcmp(path, "/"))
27 return ERR_PTR(-EINVAL);
28
29 if (tail > path) {
30 parent_path = kstrndup(path, tail - path, GFP_KERNEL);
31 if (!parent_path)
32 return ERR_PTR(-ENOMEM);
33 }
34 parent = of_find_node_by_path(parent_path);
35 if (strcmp(parent_path, "/"))
36 kfree(parent_path);
37 return parent ? parent : ERR_PTR(-EINVAL);
38}
diff --git a/arch/powerpc/platforms/pseries/of_helpers.h b/arch/powerpc/platforms/pseries/of_helpers.h
new file mode 100644
index 000000000000..bb83d39aef65
--- /dev/null
+++ b/arch/powerpc/platforms/pseries/of_helpers.h
@@ -0,0 +1,8 @@
1#ifndef _PSERIES_OF_HELPERS_H
2#define _PSERIES_OF_HELPERS_H
3
4#include <linux/of.h>
5
6struct device_node *pseries_of_derive_parent(const char *path);
7
8#endif /* _PSERIES_OF_HELPERS_H */
diff --git a/arch/powerpc/platforms/pseries/reconfig.c b/arch/powerpc/platforms/pseries/reconfig.c
index 0f319521e002..7c7fcc042549 100644
--- a/arch/powerpc/platforms/pseries/reconfig.c
+++ b/arch/powerpc/platforms/pseries/reconfig.c
@@ -22,37 +22,7 @@
22#include <asm/uaccess.h> 22#include <asm/uaccess.h>
23#include <asm/mmu.h> 23#include <asm/mmu.h>
24 24
25/** 25#include "of_helpers.h"
26 * derive_parent - basically like dirname(1)
27 * @path: the full_name of a node to be added to the tree
28 *
29 * Returns the node which should be the parent of the node
30 * described by path. E.g., for path = "/foo/bar", returns
31 * the node with full_name = "/foo".
32 */
33static struct device_node *derive_parent(const char *path)
34{
35 struct device_node *parent = NULL;
36 char *parent_path = "/";
37 size_t parent_path_len = strrchr(path, '/') - path + 1;
38
39 /* reject if path is "/" */
40 if (!strcmp(path, "/"))
41 return ERR_PTR(-EINVAL);
42
43 if (strrchr(path, '/') != path) {
44 parent_path = kmalloc(parent_path_len, GFP_KERNEL);
45 if (!parent_path)
46 return ERR_PTR(-ENOMEM);
47 strlcpy(parent_path, path, parent_path_len);
48 }
49 parent = of_find_node_by_path(parent_path);
50 if (!parent)
51 return ERR_PTR(-EINVAL);
52 if (strcmp(parent_path, "/"))
53 kfree(parent_path);
54 return parent;
55}
56 26
57static int pSeries_reconfig_add_node(const char *path, struct property *proplist) 27static int pSeries_reconfig_add_node(const char *path, struct property *proplist)
58{ 28{
@@ -71,7 +41,7 @@ static int pSeries_reconfig_add_node(const char *path, struct property *proplist
71 of_node_set_flag(np, OF_DYNAMIC); 41 of_node_set_flag(np, OF_DYNAMIC);
72 of_node_init(np); 42 of_node_init(np);
73 43
74 np->parent = derive_parent(path); 44 np->parent = pseries_of_derive_parent(path);
75 if (IS_ERR(np->parent)) { 45 if (IS_ERR(np->parent)) {
76 err = PTR_ERR(np->parent); 46 err = PTR_ERR(np->parent);
77 goto out_err; 47 goto out_err;
diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c
index 9a83eb71b030..9e524c26db14 100644
--- a/arch/powerpc/platforms/pseries/setup.c
+++ b/arch/powerpc/platforms/pseries/setup.c
@@ -837,10 +837,6 @@ static int pSeries_pci_probe_mode(struct pci_bus *bus)
837 return PCI_PROBE_NORMAL; 837 return PCI_PROBE_NORMAL;
838} 838}
839 839
840#ifndef CONFIG_PCI
841void pSeries_final_fixup(void) { }
842#endif
843
844struct pci_controller_ops pseries_pci_controller_ops = { 840struct pci_controller_ops pseries_pci_controller_ops = {
845 .probe_mode = pSeries_pci_probe_mode, 841 .probe_mode = pSeries_pci_probe_mode,
846}; 842};
diff --git a/arch/powerpc/sysdev/cpm_common.c b/arch/powerpc/sysdev/cpm_common.c
index e2ea51961979..e00a5ee58fd7 100644
--- a/arch/powerpc/sysdev/cpm_common.c
+++ b/arch/powerpc/sysdev/cpm_common.c
@@ -147,7 +147,8 @@ unsigned long cpm_muram_alloc(unsigned long size, unsigned long align)
147 spin_lock_irqsave(&cpm_muram_lock, flags); 147 spin_lock_irqsave(&cpm_muram_lock, flags);
148 cpm_muram_info.alignment = align; 148 cpm_muram_info.alignment = align;
149 start = rh_alloc(&cpm_muram_info, size, "commproc"); 149 start = rh_alloc(&cpm_muram_info, size, "commproc");
150 memset_io(cpm_muram_addr(start), 0, size); 150 if (!IS_ERR_VALUE(start))
151 memset_io(cpm_muram_addr(start), 0, size);
151 spin_unlock_irqrestore(&cpm_muram_lock, flags); 152 spin_unlock_irqrestore(&cpm_muram_lock, flags);
152 153
153 return start; 154 return start;
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 13b9bcf5485e..610f472f91d1 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -179,6 +179,19 @@ static int setup_one_atmu(struct ccsr_pci __iomem *pci,
179 return i; 179 return i;
180} 180}
181 181
182static bool is_kdump(void)
183{
184 struct device_node *node;
185
186 node = of_find_node_by_type(NULL, "memory");
187 if (!node) {
188 WARN_ON_ONCE(1);
189 return false;
190 }
191
192 return of_property_read_bool(node, "linux,usable-memory");
193}
194
182/* atmu setup for fsl pci/pcie controller */ 195/* atmu setup for fsl pci/pcie controller */
183static void setup_pci_atmu(struct pci_controller *hose) 196static void setup_pci_atmu(struct pci_controller *hose)
184{ 197{
@@ -192,6 +205,16 @@ static void setup_pci_atmu(struct pci_controller *hose)
192 const char *name = hose->dn->full_name; 205 const char *name = hose->dn->full_name;
193 const u64 *reg; 206 const u64 *reg;
194 int len; 207 int len;
208 bool setup_inbound;
209
210 /*
211 * If this is kdump, we don't want to trigger a bunch of PCI
212 * errors by closing the window on in-flight DMA.
213 *
214 * We still run most of the function's logic so that things like
215 * hose->dma_window_size still get set.
216 */
217 setup_inbound = !is_kdump();
195 218
196 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) { 219 if (early_find_capability(hose, 0, 0, PCI_CAP_ID_EXP)) {
197 if (in_be32(&pci->block_rev1) >= PCIE_IP_REV_2_2) { 220 if (in_be32(&pci->block_rev1) >= PCIE_IP_REV_2_2) {
@@ -204,8 +227,11 @@ static void setup_pci_atmu(struct pci_controller *hose)
204 /* Disable all windows (except powar0 since it's ignored) */ 227 /* Disable all windows (except powar0 since it's ignored) */
205 for(i = 1; i < 5; i++) 228 for(i = 1; i < 5; i++)
206 out_be32(&pci->pow[i].powar, 0); 229 out_be32(&pci->pow[i].powar, 0);
207 for (i = start_idx; i < end_idx; i++) 230
208 out_be32(&pci->piw[i].piwar, 0); 231 if (setup_inbound) {
232 for (i = start_idx; i < end_idx; i++)
233 out_be32(&pci->piw[i].piwar, 0);
234 }
209 235
210 /* Setup outbound MEM window */ 236 /* Setup outbound MEM window */
211 for(i = 0, j = 1; i < 3; i++) { 237 for(i = 0, j = 1; i < 3; i++) {
@@ -278,6 +304,7 @@ static void setup_pci_atmu(struct pci_controller *hose)
278 304
279 /* Setup inbound mem window */ 305 /* Setup inbound mem window */
280 mem = memblock_end_of_DRAM(); 306 mem = memblock_end_of_DRAM();
307 pr_info("%s: end of DRAM %llx\n", __func__, mem);
281 308
282 /* 309 /*
283 * The msi-address-64 property, if it exists, indicates the physical 310 * The msi-address-64 property, if it exists, indicates the physical
@@ -320,12 +347,14 @@ static void setup_pci_atmu(struct pci_controller *hose)
320 347
321 piwar |= ((mem_log - 1) & PIWAR_SZ_MASK); 348 piwar |= ((mem_log - 1) & PIWAR_SZ_MASK);
322 349
323 /* Setup inbound memory window */ 350 if (setup_inbound) {
324 out_be32(&pci->piw[win_idx].pitar, 0x00000000); 351 /* Setup inbound memory window */
325 out_be32(&pci->piw[win_idx].piwbar, 0x00000000); 352 out_be32(&pci->piw[win_idx].pitar, 0x00000000);
326 out_be32(&pci->piw[win_idx].piwar, piwar); 353 out_be32(&pci->piw[win_idx].piwbar, 0x00000000);
327 win_idx--; 354 out_be32(&pci->piw[win_idx].piwar, piwar);
355 }
328 356
357 win_idx--;
329 hose->dma_window_base_cur = 0x00000000; 358 hose->dma_window_base_cur = 0x00000000;
330 hose->dma_window_size = (resource_size_t)sz; 359 hose->dma_window_size = (resource_size_t)sz;
331 360
@@ -343,13 +372,15 @@ static void setup_pci_atmu(struct pci_controller *hose)
343 372
344 piwar = (piwar & ~PIWAR_SZ_MASK) | (mem_log - 1); 373 piwar = (piwar & ~PIWAR_SZ_MASK) | (mem_log - 1);
345 374
346 /* Setup inbound memory window */ 375 if (setup_inbound) {
347 out_be32(&pci->piw[win_idx].pitar, 0x00000000); 376 /* Setup inbound memory window */
348 out_be32(&pci->piw[win_idx].piwbear, 377 out_be32(&pci->piw[win_idx].pitar, 0x00000000);
349 pci64_dma_offset >> 44); 378 out_be32(&pci->piw[win_idx].piwbear,
350 out_be32(&pci->piw[win_idx].piwbar, 379 pci64_dma_offset >> 44);
351 pci64_dma_offset >> 12); 380 out_be32(&pci->piw[win_idx].piwbar,
352 out_be32(&pci->piw[win_idx].piwar, piwar); 381 pci64_dma_offset >> 12);
382 out_be32(&pci->piw[win_idx].piwar, piwar);
383 }
353 384
354 /* 385 /*
355 * install our own dma_set_mask handler to fixup dma_ops 386 * install our own dma_set_mask handler to fixup dma_ops
@@ -362,12 +393,15 @@ static void setup_pci_atmu(struct pci_controller *hose)
362 } else { 393 } else {
363 u64 paddr = 0; 394 u64 paddr = 0;
364 395
365 /* Setup inbound memory window */ 396 if (setup_inbound) {
366 out_be32(&pci->piw[win_idx].pitar, paddr >> 12); 397 /* Setup inbound memory window */
367 out_be32(&pci->piw[win_idx].piwbar, paddr >> 12); 398 out_be32(&pci->piw[win_idx].pitar, paddr >> 12);
368 out_be32(&pci->piw[win_idx].piwar, (piwar | (mem_log - 1))); 399 out_be32(&pci->piw[win_idx].piwbar, paddr >> 12);
369 win_idx--; 400 out_be32(&pci->piw[win_idx].piwar,
401 (piwar | (mem_log - 1)));
402 }
370 403
404 win_idx--;
371 paddr += 1ull << mem_log; 405 paddr += 1ull << mem_log;
372 sz -= 1ull << mem_log; 406 sz -= 1ull << mem_log;
373 407
@@ -375,11 +409,15 @@ static void setup_pci_atmu(struct pci_controller *hose)
375 mem_log = ilog2(sz); 409 mem_log = ilog2(sz);
376 piwar |= (mem_log - 1); 410 piwar |= (mem_log - 1);
377 411
378 out_be32(&pci->piw[win_idx].pitar, paddr >> 12); 412 if (setup_inbound) {
379 out_be32(&pci->piw[win_idx].piwbar, paddr >> 12); 413 out_be32(&pci->piw[win_idx].pitar,
380 out_be32(&pci->piw[win_idx].piwar, piwar); 414 paddr >> 12);
381 win_idx--; 415 out_be32(&pci->piw[win_idx].piwbar,
416 paddr >> 12);
417 out_be32(&pci->piw[win_idx].piwar, piwar);
418 }
382 419
420 win_idx--;
383 paddr += 1ull << mem_log; 421 paddr += 1ull << mem_log;
384 } 422 }
385 423
@@ -1002,7 +1040,7 @@ int fsl_pci_mcheck_exception(struct pt_regs *regs)
1002 ret = probe_kernel_address((void *)regs->nip, inst); 1040 ret = probe_kernel_address((void *)regs->nip, inst);
1003 } 1041 }
1004 1042
1005 if (mcheck_handle_load(regs, inst)) { 1043 if (!ret && mcheck_handle_load(regs, inst)) {
1006 regs->nip += 4; 1044 regs->nip += 4;
1007 return 1; 1045 return 1;
1008 } 1046 }
diff --git a/arch/powerpc/sysdev/mpc5xxx_clocks.c b/arch/powerpc/sysdev/mpc5xxx_clocks.c
index f4f0301b9a60..573292663cf2 100644
--- a/arch/powerpc/sysdev/mpc5xxx_clocks.c
+++ b/arch/powerpc/sysdev/mpc5xxx_clocks.c
@@ -13,7 +13,6 @@
13 13
14unsigned long mpc5xxx_get_bus_frequency(struct device_node *node) 14unsigned long mpc5xxx_get_bus_frequency(struct device_node *node)
15{ 15{
16 struct device_node *np;
17 const unsigned int *p_bus_freq = NULL; 16 const unsigned int *p_bus_freq = NULL;
18 17
19 of_node_get(node); 18 of_node_get(node);
@@ -22,9 +21,7 @@ unsigned long mpc5xxx_get_bus_frequency(struct device_node *node)
22 if (p_bus_freq) 21 if (p_bus_freq)
23 break; 22 break;
24 23
25 np = of_get_parent(node); 24 node = of_get_next_parent(node);
26 of_node_put(node);
27 node = np;
28 } 25 }
29 of_node_put(node); 26 of_node_put(node);
30 27
diff --git a/arch/powerpc/sysdev/mpc8xx_pic.c b/arch/powerpc/sysdev/mpc8xx_pic.c
index 9a423975853a..b7cf7abff2eb 100644
--- a/arch/powerpc/sysdev/mpc8xx_pic.c
+++ b/arch/powerpc/sysdev/mpc8xx_pic.c
@@ -61,7 +61,7 @@ static int mpc8xx_set_irq_type(struct irq_data *d, unsigned int flow_type)
61} 61}
62 62
63static struct irq_chip mpc8xx_pic = { 63static struct irq_chip mpc8xx_pic = {
64 .name = "MPC8XX SIU", 64 .name = "8XX SIU",
65 .irq_unmask = mpc8xx_unmask_irq, 65 .irq_unmask = mpc8xx_unmask_irq,
66 .irq_mask = mpc8xx_mask_irq, 66 .irq_mask = mpc8xx_mask_irq,
67 .irq_ack = mpc8xx_ack, 67 .irq_ack = mpc8xx_ack,
diff --git a/arch/powerpc/sysdev/mpic.c b/arch/powerpc/sysdev/mpic.c
index cecd1156c185..2a0452e364ba 100644
--- a/arch/powerpc/sysdev/mpic.c
+++ b/arch/powerpc/sysdev/mpic.c
@@ -924,22 +924,6 @@ int mpic_set_irq_type(struct irq_data *d, unsigned int flow_type)
924 return IRQ_SET_MASK_OK_NOCOPY; 924 return IRQ_SET_MASK_OK_NOCOPY;
925} 925}
926 926
927static int mpic_irq_set_wake(struct irq_data *d, unsigned int on)
928{
929 struct irq_desc *desc = container_of(d, struct irq_desc, irq_data);
930 struct mpic *mpic = mpic_from_irq_data(d);
931
932 if (!(mpic->flags & MPIC_FSL))
933 return -ENXIO;
934
935 if (on)
936 desc->action->flags |= IRQF_NO_SUSPEND;
937 else
938 desc->action->flags &= ~IRQF_NO_SUSPEND;
939
940 return 0;
941}
942
943void mpic_set_vector(unsigned int virq, unsigned int vector) 927void mpic_set_vector(unsigned int virq, unsigned int vector)
944{ 928{
945 struct mpic *mpic = mpic_from_irq(virq); 929 struct mpic *mpic = mpic_from_irq(virq);
@@ -977,7 +961,6 @@ static struct irq_chip mpic_irq_chip = {
977 .irq_unmask = mpic_unmask_irq, 961 .irq_unmask = mpic_unmask_irq,
978 .irq_eoi = mpic_end_irq, 962 .irq_eoi = mpic_end_irq,
979 .irq_set_type = mpic_set_irq_type, 963 .irq_set_type = mpic_set_irq_type,
980 .irq_set_wake = mpic_irq_set_wake,
981}; 964};
982 965
983#ifdef CONFIG_SMP 966#ifdef CONFIG_SMP
@@ -992,7 +975,6 @@ static struct irq_chip mpic_tm_chip = {
992 .irq_mask = mpic_mask_tm, 975 .irq_mask = mpic_mask_tm,
993 .irq_unmask = mpic_unmask_tm, 976 .irq_unmask = mpic_unmask_tm,
994 .irq_eoi = mpic_end_irq, 977 .irq_eoi = mpic_end_irq,
995 .irq_set_wake = mpic_irq_set_wake,
996}; 978};
997 979
998#ifdef CONFIG_MPIC_U3_HT_IRQS 980#ifdef CONFIG_MPIC_U3_HT_IRQS
@@ -1284,8 +1266,11 @@ struct mpic * __init mpic_alloc(struct device_node *node,
1284 flags |= MPIC_NO_RESET; 1266 flags |= MPIC_NO_RESET;
1285 if (of_get_property(node, "single-cpu-affinity", NULL)) 1267 if (of_get_property(node, "single-cpu-affinity", NULL))
1286 flags |= MPIC_SINGLE_DEST_CPU; 1268 flags |= MPIC_SINGLE_DEST_CPU;
1287 if (of_device_is_compatible(node, "fsl,mpic")) 1269 if (of_device_is_compatible(node, "fsl,mpic")) {
1288 flags |= MPIC_FSL | MPIC_LARGE_VECTORS; 1270 flags |= MPIC_FSL | MPIC_LARGE_VECTORS;
1271 mpic_irq_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
1272 mpic_tm_chip.flags |= IRQCHIP_SKIP_SET_WAKE;
1273 }
1289 1274
1290 mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL); 1275 mpic = kzalloc(sizeof(struct mpic), GFP_KERNEL);
1291 if (mpic == NULL) 1276 if (mpic == NULL)
diff --git a/arch/powerpc/sysdev/msi_bitmap.c b/arch/powerpc/sysdev/msi_bitmap.c
index 73b64c73505b..ed5234ed8d3f 100644
--- a/arch/powerpc/sysdev/msi_bitmap.c
+++ b/arch/powerpc/sysdev/msi_bitmap.c
@@ -11,6 +11,7 @@
11#include <linux/slab.h> 11#include <linux/slab.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/bitmap.h> 13#include <linux/bitmap.h>
14#include <linux/bootmem.h>
14#include <asm/msi_bitmap.h> 15#include <asm/msi_bitmap.h>
15#include <asm/setup.h> 16#include <asm/setup.h>
16 17
@@ -111,7 +112,7 @@ int msi_bitmap_reserve_dt_hwirqs(struct msi_bitmap *bmp)
111 return 0; 112 return 0;
112} 113}
113 114
114int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count, 115int __init_refok msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count,
115 struct device_node *of_node) 116 struct device_node *of_node)
116{ 117{
117 int size; 118 int size;
@@ -122,7 +123,15 @@ int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count,
122 size = BITS_TO_LONGS(irq_count) * sizeof(long); 123 size = BITS_TO_LONGS(irq_count) * sizeof(long);
123 pr_debug("msi_bitmap: allocator bitmap size is 0x%x bytes\n", size); 124 pr_debug("msi_bitmap: allocator bitmap size is 0x%x bytes\n", size);
124 125
125 bmp->bitmap = zalloc_maybe_bootmem(size, GFP_KERNEL); 126 bmp->bitmap_from_slab = slab_is_available();
127 if (bmp->bitmap_from_slab)
128 bmp->bitmap = kzalloc(size, GFP_KERNEL);
129 else {
130 bmp->bitmap = memblock_virt_alloc(size, 0);
131 /* the bitmap won't be freed from memblock allocator */
132 kmemleak_not_leak(bmp->bitmap);
133 }
134
126 if (!bmp->bitmap) { 135 if (!bmp->bitmap) {
127 pr_debug("msi_bitmap: ENOMEM allocating allocator bitmap!\n"); 136 pr_debug("msi_bitmap: ENOMEM allocating allocator bitmap!\n");
128 return -ENOMEM; 137 return -ENOMEM;
@@ -138,7 +147,8 @@ int msi_bitmap_alloc(struct msi_bitmap *bmp, unsigned int irq_count,
138 147
139void msi_bitmap_free(struct msi_bitmap *bmp) 148void msi_bitmap_free(struct msi_bitmap *bmp)
140{ 149{
141 /* we can't free the bitmap we don't know if it's bootmem etc. */ 150 if (bmp->bitmap_from_slab)
151 kfree(bmp->bitmap);
142 of_node_put(bmp->of_node); 152 of_node_put(bmp->of_node);
143 bmp->bitmap = NULL; 153 bmp->bitmap = NULL;
144} 154}
@@ -203,8 +213,6 @@ static void __init test_basics(void)
203 213
204 /* Clients may WARN_ON bitmap == NULL for "not-allocated" */ 214 /* Clients may WARN_ON bitmap == NULL for "not-allocated" */
205 WARN_ON(bmp.bitmap != NULL); 215 WARN_ON(bmp.bitmap != NULL);
206
207 kfree(bmp.bitmap);
208} 216}
209 217
210static void __init test_of_node(void) 218static void __init test_of_node(void)
diff --git a/arch/powerpc/xmon/nonstdio.c b/arch/powerpc/xmon/nonstdio.c
index c98748617896..d00123421e00 100644
--- a/arch/powerpc/xmon/nonstdio.c
+++ b/arch/powerpc/xmon/nonstdio.c
@@ -11,10 +11,25 @@
11#include <asm/time.h> 11#include <asm/time.h>
12#include "nonstdio.h" 12#include "nonstdio.h"
13 13
14static bool paginating, paginate_skipping;
15static unsigned long paginate_lpp; /* Lines Per Page */
16static unsigned long paginate_pos;
14 17
15static int xmon_write(const void *ptr, int nb) 18void xmon_start_pagination(void)
16{ 19{
17 return udbg_write(ptr, nb); 20 paginating = true;
21 paginate_skipping = false;
22 paginate_pos = 0;
23}
24
25void xmon_end_pagination(void)
26{
27 paginating = false;
28}
29
30void xmon_set_pagination_lpp(unsigned long lpp)
31{
32 paginate_lpp = lpp;
18} 33}
19 34
20static int xmon_readchar(void) 35static int xmon_readchar(void)
@@ -24,6 +39,51 @@ static int xmon_readchar(void)
24 return -1; 39 return -1;
25} 40}
26 41
42static int xmon_write(const char *ptr, int nb)
43{
44 int rv = 0;
45 const char *p = ptr, *q;
46 const char msg[] = "[Hit a key (a:all, q:truncate, any:next page)]";
47
48 if (nb <= 0)
49 return rv;
50
51 if (paginating && paginate_skipping)
52 return nb;
53
54 if (paginate_lpp) {
55 while (paginating && (q = strchr(p, '\n'))) {
56 rv += udbg_write(p, q - p + 1);
57 p = q + 1;
58 paginate_pos++;
59
60 if (paginate_pos >= paginate_lpp) {
61 udbg_write(msg, strlen(msg));
62
63 switch (xmon_readchar()) {
64 case 'a':
65 paginating = false;
66 break;
67 case 'q':
68 paginate_skipping = true;
69 break;
70 default:
71 /* nothing */
72 break;
73 }
74
75 paginate_pos = 0;
76 udbg_write("\r\n", 2);
77
78 if (paginate_skipping)
79 return nb;
80 }
81 }
82 }
83
84 return rv + udbg_write(p, nb - (p - ptr));
85}
86
27int xmon_putchar(int c) 87int xmon_putchar(int c)
28{ 88{
29 char ch = c; 89 char ch = c;
diff --git a/arch/powerpc/xmon/nonstdio.h b/arch/powerpc/xmon/nonstdio.h
index 18a51ded4ffd..f8653365667e 100644
--- a/arch/powerpc/xmon/nonstdio.h
+++ b/arch/powerpc/xmon/nonstdio.h
@@ -3,6 +3,9 @@
3#define printf xmon_printf 3#define printf xmon_printf
4#define putchar xmon_putchar 4#define putchar xmon_putchar
5 5
6extern void xmon_set_pagination_lpp(unsigned long lpp);
7extern void xmon_start_pagination(void);
8extern void xmon_end_pagination(void);
6extern int xmon_putchar(int c); 9extern int xmon_putchar(int c);
7extern void xmon_puts(const char *); 10extern void xmon_puts(const char *);
8extern char *xmon_gets(char *, int); 11extern char *xmon_gets(char *, int);
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index 6ef1231c6e9c..786bf01691c9 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -242,6 +242,7 @@ Commands:\n\
242" u dump TLB\n" 242" u dump TLB\n"
243#endif 243#endif
244" ? help\n" 244" ? help\n"
245" # n limit output to n lines per page (for dp, dpa, dl)\n"
245" zr reboot\n\ 246" zr reboot\n\
246 zh halt\n" 247 zh halt\n"
247; 248;
@@ -833,6 +834,16 @@ static void remove_cpu_bpts(void)
833 write_ciabr(0); 834 write_ciabr(0);
834} 835}
835 836
837static void set_lpp_cmd(void)
838{
839 unsigned long lpp;
840
841 if (!scanhex(&lpp)) {
842 printf("Invalid number.\n");
843 lpp = 0;
844 }
845 xmon_set_pagination_lpp(lpp);
846}
836/* Command interpreting routine */ 847/* Command interpreting routine */
837static char *last_cmd; 848static char *last_cmd;
838 849
@@ -924,6 +935,9 @@ cmds(struct pt_regs *excp)
924 case '?': 935 case '?':
925 xmon_puts(help_string); 936 xmon_puts(help_string);
926 break; 937 break;
938 case '#':
939 set_lpp_cmd();
940 break;
927 case 'b': 941 case 'b':
928 bpt_cmds(); 942 bpt_cmds();
929 break; 943 break;
@@ -2072,6 +2086,9 @@ static void xmon_rawdump (unsigned long adrs, long ndump)
2072static void dump_one_paca(int cpu) 2086static void dump_one_paca(int cpu)
2073{ 2087{
2074 struct paca_struct *p; 2088 struct paca_struct *p;
2089#ifdef CONFIG_PPC_STD_MMU_64
2090 int i = 0;
2091#endif
2075 2092
2076 if (setjmp(bus_error_jmp) != 0) { 2093 if (setjmp(bus_error_jmp) != 0) {
2077 printf("*** Error dumping paca for cpu 0x%x!\n", cpu); 2094 printf("*** Error dumping paca for cpu 0x%x!\n", cpu);
@@ -2085,12 +2102,12 @@ static void dump_one_paca(int cpu)
2085 2102
2086 printf("paca for cpu 0x%x @ %p:\n", cpu, p); 2103 printf("paca for cpu 0x%x @ %p:\n", cpu, p);
2087 2104
2088 printf(" %-*s = %s\n", 16, "possible", cpu_possible(cpu) ? "yes" : "no"); 2105 printf(" %-*s = %s\n", 20, "possible", cpu_possible(cpu) ? "yes" : "no");
2089 printf(" %-*s = %s\n", 16, "present", cpu_present(cpu) ? "yes" : "no"); 2106 printf(" %-*s = %s\n", 20, "present", cpu_present(cpu) ? "yes" : "no");
2090 printf(" %-*s = %s\n", 16, "online", cpu_online(cpu) ? "yes" : "no"); 2107 printf(" %-*s = %s\n", 20, "online", cpu_online(cpu) ? "yes" : "no");
2091 2108
2092#define DUMP(paca, name, format) \ 2109#define DUMP(paca, name, format) \
2093 printf(" %-*s = %#-*"format"\t(0x%lx)\n", 16, #name, 18, paca->name, \ 2110 printf(" %-*s = %#-*"format"\t(0x%lx)\n", 20, #name, 18, paca->name, \
2094 offsetof(struct paca_struct, name)); 2111 offsetof(struct paca_struct, name));
2095 2112
2096 DUMP(p, lock_token, "x"); 2113 DUMP(p, lock_token, "x");
@@ -2102,11 +2119,41 @@ static void dump_one_paca(int cpu)
2102#ifdef CONFIG_PPC_BOOK3S_64 2119#ifdef CONFIG_PPC_BOOK3S_64
2103 DUMP(p, mc_emergency_sp, "p"); 2120 DUMP(p, mc_emergency_sp, "p");
2104 DUMP(p, in_mce, "x"); 2121 DUMP(p, in_mce, "x");
2122 DUMP(p, hmi_event_available, "x");
2105#endif 2123#endif
2106 DUMP(p, data_offset, "lx"); 2124 DUMP(p, data_offset, "lx");
2107 DUMP(p, hw_cpu_id, "x"); 2125 DUMP(p, hw_cpu_id, "x");
2108 DUMP(p, cpu_start, "x"); 2126 DUMP(p, cpu_start, "x");
2109 DUMP(p, kexec_state, "x"); 2127 DUMP(p, kexec_state, "x");
2128#ifdef CONFIG_PPC_STD_MMU_64
2129 for (i = 0; i < SLB_NUM_BOLTED; i++) {
2130 u64 esid, vsid;
2131
2132 if (!p->slb_shadow_ptr)
2133 continue;
2134
2135 esid = be64_to_cpu(p->slb_shadow_ptr->save_area[i].esid);
2136 vsid = be64_to_cpu(p->slb_shadow_ptr->save_area[i].vsid);
2137
2138 if (esid || vsid) {
2139 printf(" slb_shadow[%d]: = 0x%016lx 0x%016lx\n",
2140 i, esid, vsid);
2141 }
2142 }
2143 DUMP(p, vmalloc_sllp, "x");
2144 DUMP(p, slb_cache_ptr, "x");
2145 for (i = 0; i < SLB_CACHE_ENTRIES; i++)
2146 printf(" slb_cache[%d]: = 0x%016lx\n", i, p->slb_cache[i]);
2147#endif
2148 DUMP(p, dscr_default, "llx");
2149#ifdef CONFIG_PPC_BOOK3E
2150 DUMP(p, pgd, "p");
2151 DUMP(p, kernel_pgd, "p");
2152 DUMP(p, tcd_ptr, "p");
2153 DUMP(p, mc_kstack, "p");
2154 DUMP(p, crit_kstack, "p");
2155 DUMP(p, dbg_kstack, "p");
2156#endif
2110 DUMP(p, __current, "p"); 2157 DUMP(p, __current, "p");
2111 DUMP(p, kstack, "lx"); 2158 DUMP(p, kstack, "lx");
2112 DUMP(p, stab_rr, "lx"); 2159 DUMP(p, stab_rr, "lx");
@@ -2117,7 +2164,27 @@ static void dump_one_paca(int cpu)
2117 DUMP(p, io_sync, "x"); 2164 DUMP(p, io_sync, "x");
2118 DUMP(p, irq_work_pending, "x"); 2165 DUMP(p, irq_work_pending, "x");
2119 DUMP(p, nap_state_lost, "x"); 2166 DUMP(p, nap_state_lost, "x");
2167 DUMP(p, sprg_vdso, "llx");
2168
2169#ifdef CONFIG_PPC_TRANSACTIONAL_MEM
2170 DUMP(p, tm_scratch, "llx");
2171#endif
2172
2173#ifdef CONFIG_PPC_POWERNV
2174 DUMP(p, core_idle_state_ptr, "p");
2175 DUMP(p, thread_idle_state, "x");
2176 DUMP(p, thread_mask, "x");
2177 DUMP(p, subcore_sibling_mask, "x");
2178#endif
2120 2179
2180 DUMP(p, user_time, "llx");
2181 DUMP(p, system_time, "llx");
2182 DUMP(p, user_time_scaled, "llx");
2183 DUMP(p, starttime, "llx");
2184 DUMP(p, starttime_user, "llx");
2185 DUMP(p, startspurr, "llx");
2186 DUMP(p, utime_sspurr, "llx");
2187 DUMP(p, stolen_time, "llx");
2121#undef DUMP 2188#undef DUMP
2122 2189
2123 catch_memory_errors = 0; 2190 catch_memory_errors = 0;
@@ -2166,7 +2233,9 @@ dump(void)
2166 2233
2167#ifdef CONFIG_PPC64 2234#ifdef CONFIG_PPC64
2168 if (c == 'p') { 2235 if (c == 'p') {
2236 xmon_start_pagination();
2169 dump_pacas(); 2237 dump_pacas();
2238 xmon_end_pagination();
2170 return; 2239 return;
2171 } 2240 }
2172#endif 2241#endif
@@ -2315,10 +2384,12 @@ dump_log_buf(void)
2315 sync(); 2384 sync();
2316 2385
2317 kmsg_dump_rewind_nolock(&dumper); 2386 kmsg_dump_rewind_nolock(&dumper);
2387 xmon_start_pagination();
2318 while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) { 2388 while (kmsg_dump_get_line_nolock(&dumper, false, buf, sizeof(buf), &len)) {
2319 buf[len] = '\0'; 2389 buf[len] = '\0';
2320 printf("%s", buf); 2390 printf("%s", buf);
2321 } 2391 }
2392 xmon_end_pagination();
2322 2393
2323 sync(); 2394 sync();
2324 /* wait a little while to see if we get a machine check */ 2395 /* wait a little while to see if we get a machine check */
diff --git a/drivers/char/agp/uninorth-agp.c b/drivers/char/agp/uninorth-agp.c
index a56ee9bedd11..05755441250c 100644
--- a/drivers/char/agp/uninorth-agp.c
+++ b/drivers/char/agp/uninorth-agp.c
@@ -361,6 +361,10 @@ static int agp_uninorth_resume(struct pci_dev *pdev)
361} 361}
362#endif /* CONFIG_PM */ 362#endif /* CONFIG_PM */
363 363
364static struct {
365 struct page **pages_arr;
366} uninorth_priv;
367
364static int uninorth_create_gatt_table(struct agp_bridge_data *bridge) 368static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
365{ 369{
366 char *table; 370 char *table;
@@ -371,7 +375,6 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
371 int i; 375 int i;
372 void *temp; 376 void *temp;
373 struct page *page; 377 struct page *page;
374 struct page **pages;
375 378
376 /* We can't handle 2 level gatt's */ 379 /* We can't handle 2 level gatt's */
377 if (bridge->driver->size_type == LVL2_APER_SIZE) 380 if (bridge->driver->size_type == LVL2_APER_SIZE)
@@ -400,8 +403,8 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
400 if (table == NULL) 403 if (table == NULL)
401 return -ENOMEM; 404 return -ENOMEM;
402 405
403 pages = kmalloc((1 << page_order) * sizeof(struct page*), GFP_KERNEL); 406 uninorth_priv.pages_arr = kmalloc((1 << page_order) * sizeof(struct page*), GFP_KERNEL);
404 if (pages == NULL) 407 if (uninorth_priv.pages_arr == NULL)
405 goto enomem; 408 goto enomem;
406 409
407 table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); 410 table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
@@ -409,14 +412,14 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
409 for (page = virt_to_page(table), i = 0; page <= virt_to_page(table_end); 412 for (page = virt_to_page(table), i = 0; page <= virt_to_page(table_end);
410 page++, i++) { 413 page++, i++) {
411 SetPageReserved(page); 414 SetPageReserved(page);
412 pages[i] = page; 415 uninorth_priv.pages_arr[i] = page;
413 } 416 }
414 417
415 bridge->gatt_table_real = (u32 *) table; 418 bridge->gatt_table_real = (u32 *) table;
416 /* Need to clear out any dirty data still sitting in caches */ 419 /* Need to clear out any dirty data still sitting in caches */
417 flush_dcache_range((unsigned long)table, 420 flush_dcache_range((unsigned long)table,
418 (unsigned long)table_end + 1); 421 (unsigned long)table_end + 1);
419 bridge->gatt_table = vmap(pages, (1 << page_order), 0, PAGE_KERNEL_NCG); 422 bridge->gatt_table = vmap(uninorth_priv.pages_arr, (1 << page_order), 0, PAGE_KERNEL_NCG);
420 423
421 if (bridge->gatt_table == NULL) 424 if (bridge->gatt_table == NULL)
422 goto enomem; 425 goto enomem;
@@ -434,7 +437,7 @@ static int uninorth_create_gatt_table(struct agp_bridge_data *bridge)
434 return 0; 437 return 0;
435 438
436enomem: 439enomem:
437 kfree(pages); 440 kfree(uninorth_priv.pages_arr);
438 if (table) 441 if (table)
439 free_pages((unsigned long)table, page_order); 442 free_pages((unsigned long)table, page_order);
440 return -ENOMEM; 443 return -ENOMEM;
@@ -456,6 +459,7 @@ static int uninorth_free_gatt_table(struct agp_bridge_data *bridge)
456 */ 459 */
457 460
458 vunmap(bridge->gatt_table); 461 vunmap(bridge->gatt_table);
462 kfree(uninorth_priv.pages_arr);
459 table = (char *) bridge->gatt_table_real; 463 table = (char *) bridge->gatt_table_real;
460 table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1); 464 table_end = table + ((PAGE_SIZE * (1 << page_order)) - 1);
461 465
diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig
index 57316528e924..7a1ab24052b8 100644
--- a/drivers/clk/Kconfig
+++ b/drivers/clk/Kconfig
@@ -132,7 +132,7 @@ config COMMON_CLK_AXI_CLKGEN
132 132
133config CLK_QORIQ 133config CLK_QORIQ
134 bool "Clock driver for Freescale QorIQ platforms" 134 bool "Clock driver for Freescale QorIQ platforms"
135 depends on (PPC_E500MC || ARM || COMPILE_TEST) && OF 135 depends on (PPC_E500MC || ARM || ARM64 || COMPILE_TEST) && OF
136 ---help--- 136 ---help---
137 This adds the clock driver support for Freescale QorIQ platforms 137 This adds the clock driver support for Freescale QorIQ platforms
138 using common clock framework. 138 using common clock framework.
diff --git a/drivers/clk/clk-qoriq.c b/drivers/clk/clk-qoriq.c
index cda90a971e39..1ab0fb81c6a0 100644
--- a/drivers/clk/clk-qoriq.c
+++ b/drivers/clk/clk-qoriq.c
@@ -10,7 +10,9 @@
10 10
11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt 11#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
12 12
13#include <linux/clk.h>
13#include <linux/clk-provider.h> 14#include <linux/clk-provider.h>
15#include <linux/fsl/guts.h>
14#include <linux/io.h> 16#include <linux/io.h>
15#include <linux/kernel.h> 17#include <linux/kernel.h>
16#include <linux/module.h> 18#include <linux/module.h>
@@ -19,213 +21,1029 @@
19#include <linux/of.h> 21#include <linux/of.h>
20#include <linux/slab.h> 22#include <linux/slab.h>
21 23
22struct cmux_clk { 24#define PLL_DIV1 0
25#define PLL_DIV2 1
26#define PLL_DIV3 2
27#define PLL_DIV4 3
28
29#define PLATFORM_PLL 0
30#define CGA_PLL1 1
31#define CGA_PLL2 2
32#define CGA_PLL3 3
33#define CGA_PLL4 4 /* only on clockgen-1.0, which lacks CGB */
34#define CGB_PLL1 4
35#define CGB_PLL2 5
36
37struct clockgen_pll_div {
38 struct clk *clk;
39 char name[32];
40};
41
42struct clockgen_pll {
43 struct clockgen_pll_div div[4];
44};
45
46#define CLKSEL_VALID 1
47#define CLKSEL_80PCT 2 /* Only allowed if PLL <= 80% of max cpu freq */
48
49struct clockgen_sourceinfo {
50 u32 flags; /* CLKSEL_xxx */
51 int pll; /* CGx_PLLn */
52 int div; /* PLL_DIVn */
53};
54
55#define NUM_MUX_PARENTS 16
56
57struct clockgen_muxinfo {
58 struct clockgen_sourceinfo clksel[NUM_MUX_PARENTS];
59};
60
61#define NUM_HWACCEL 5
62#define NUM_CMUX 8
63
64struct clockgen;
65
66/*
67 * cmux freq must be >= platform pll.
68 * If not set, cmux freq must be >= platform pll/2
69 */
70#define CG_CMUX_GE_PLAT 1
71
72#define CG_PLL_8BIT 2 /* PLLCnGSR[CFG] is 8 bits, not 6 */
73#define CG_VER3 4 /* version 3 cg: reg layout different */
74#define CG_LITTLE_ENDIAN 8
75
76struct clockgen_chipinfo {
77 const char *compat, *guts_compat;
78 const struct clockgen_muxinfo *cmux_groups[2];
79 const struct clockgen_muxinfo *hwaccel[NUM_HWACCEL];
80 void (*init_periph)(struct clockgen *cg);
81 int cmux_to_group[NUM_CMUX]; /* -1 terminates if fewer than NUM_CMUX */
82 u32 pll_mask; /* 1 << n bit set if PLL n is valid */
83 u32 flags; /* CG_xxx */
84};
85
86struct clockgen {
87 struct device_node *node;
88 void __iomem *regs;
89 struct clockgen_chipinfo info; /* mutable copy */
90 struct clk *sysclk;
91 struct clockgen_pll pll[6];
92 struct clk *cmux[NUM_CMUX];
93 struct clk *hwaccel[NUM_HWACCEL];
94 struct clk *fman[2];
95 struct ccsr_guts __iomem *guts;
96};
97
98static struct clockgen clockgen;
99
100static void cg_out(struct clockgen *cg, u32 val, u32 __iomem *reg)
101{
102 if (cg->info.flags & CG_LITTLE_ENDIAN)
103 iowrite32(val, reg);
104 else
105 iowrite32be(val, reg);
106}
107
108static u32 cg_in(struct clockgen *cg, u32 __iomem *reg)
109{
110 u32 val;
111
112 if (cg->info.flags & CG_LITTLE_ENDIAN)
113 val = ioread32(reg);
114 else
115 val = ioread32be(reg);
116
117 return val;
118}
119
120static const struct clockgen_muxinfo p2041_cmux_grp1 = {
121 {
122 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
123 [1] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
124 [4] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
125 }
126};
127
128static const struct clockgen_muxinfo p2041_cmux_grp2 = {
129 {
130 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
131 [4] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
132 [5] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
133 }
134};
135
136static const struct clockgen_muxinfo p5020_cmux_grp1 = {
137 {
138 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
139 [1] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
140 [4] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL2, PLL_DIV1 },
141 }
142};
143
144static const struct clockgen_muxinfo p5020_cmux_grp2 = {
145 {
146 [0] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL1, PLL_DIV1 },
147 [4] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
148 [5] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
149 }
150};
151
152static const struct clockgen_muxinfo p5040_cmux_grp1 = {
153 {
154 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
155 [1] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
156 [4] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL2, PLL_DIV1 },
157 [5] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL2, PLL_DIV2 },
158 }
159};
160
161static const struct clockgen_muxinfo p5040_cmux_grp2 = {
162 {
163 [0] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL1, PLL_DIV1 },
164 [1] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL1, PLL_DIV2 },
165 [4] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
166 [5] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
167 }
168};
169
170static const struct clockgen_muxinfo p4080_cmux_grp1 = {
171 {
172 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
173 [1] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
174 [4] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
175 [5] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
176 [8] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL3, PLL_DIV1 },
177 }
178};
179
180static const struct clockgen_muxinfo p4080_cmux_grp2 = {
181 {
182 [0] = { CLKSEL_VALID | CLKSEL_80PCT, CGA_PLL1, PLL_DIV1 },
183 [8] = { CLKSEL_VALID, CGA_PLL3, PLL_DIV1 },
184 [9] = { CLKSEL_VALID, CGA_PLL3, PLL_DIV2 },
185 [12] = { CLKSEL_VALID, CGA_PLL4, PLL_DIV1 },
186 [13] = { CLKSEL_VALID, CGA_PLL4, PLL_DIV2 },
187 }
188};
189
190static const struct clockgen_muxinfo t1023_cmux = {
191 {
192 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
193 [1] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
194 }
195};
196
197static const struct clockgen_muxinfo t1040_cmux = {
198 {
199 [0] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
200 [1] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
201 [4] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
202 [5] = { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
203 }
204};
205
206
207static const struct clockgen_muxinfo clockgen2_cmux_cga = {
208 {
209 { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
210 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
211 { CLKSEL_VALID, CGA_PLL1, PLL_DIV4 },
212 {},
213 { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
214 { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
215 { CLKSEL_VALID, CGA_PLL2, PLL_DIV4 },
216 {},
217 { CLKSEL_VALID, CGA_PLL3, PLL_DIV1 },
218 { CLKSEL_VALID, CGA_PLL3, PLL_DIV2 },
219 { CLKSEL_VALID, CGA_PLL3, PLL_DIV4 },
220 },
221};
222
223static const struct clockgen_muxinfo clockgen2_cmux_cga12 = {
224 {
225 { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
226 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
227 { CLKSEL_VALID, CGA_PLL1, PLL_DIV4 },
228 {},
229 { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
230 { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
231 { CLKSEL_VALID, CGA_PLL2, PLL_DIV4 },
232 },
233};
234
235static const struct clockgen_muxinfo clockgen2_cmux_cgb = {
236 {
237 { CLKSEL_VALID, CGB_PLL1, PLL_DIV1 },
238 { CLKSEL_VALID, CGB_PLL1, PLL_DIV2 },
239 { CLKSEL_VALID, CGB_PLL1, PLL_DIV4 },
240 {},
241 { CLKSEL_VALID, CGB_PLL2, PLL_DIV1 },
242 { CLKSEL_VALID, CGB_PLL2, PLL_DIV2 },
243 { CLKSEL_VALID, CGB_PLL2, PLL_DIV4 },
244 },
245};
246
247static const struct clockgen_muxinfo ls1043a_hwa1 = {
248 {
249 {},
250 {},
251 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
252 { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 },
253 {},
254 {},
255 { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
256 { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 },
257 },
258};
259
260static const struct clockgen_muxinfo ls1043a_hwa2 = {
261 {
262 {},
263 { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
264 {},
265 { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 },
266 },
267};
268
269static const struct clockgen_muxinfo t1023_hwa1 = {
270 {
271 {},
272 { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
273 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
274 { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 },
275 },
276};
277
278static const struct clockgen_muxinfo t1023_hwa2 = {
279 {
280 [6] = { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
281 },
282};
283
284static const struct clockgen_muxinfo t2080_hwa1 = {
285 {
286 {},
287 { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
288 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
289 { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 },
290 { CLKSEL_VALID, CGA_PLL1, PLL_DIV4 },
291 { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 },
292 { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
293 { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 },
294 },
295};
296
297static const struct clockgen_muxinfo t2080_hwa2 = {
298 {
299 {},
300 { CLKSEL_VALID, CGA_PLL2, PLL_DIV1 },
301 { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
302 { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 },
303 { CLKSEL_VALID, CGA_PLL2, PLL_DIV4 },
304 { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 },
305 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
306 { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 },
307 },
308};
309
310static const struct clockgen_muxinfo t4240_hwa1 = {
311 {
312 { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV2 },
313 { CLKSEL_VALID, CGA_PLL1, PLL_DIV1 },
314 { CLKSEL_VALID, CGA_PLL1, PLL_DIV2 },
315 { CLKSEL_VALID, CGA_PLL1, PLL_DIV3 },
316 { CLKSEL_VALID, CGA_PLL1, PLL_DIV4 },
317 {},
318 { CLKSEL_VALID, CGA_PLL2, PLL_DIV2 },
319 { CLKSEL_VALID, CGA_PLL2, PLL_DIV3 },
320 },
321};
322
323static const struct clockgen_muxinfo t4240_hwa4 = {
324 {
325 [2] = { CLKSEL_VALID, CGB_PLL1, PLL_DIV2 },
326 [3] = { CLKSEL_VALID, CGB_PLL1, PLL_DIV3 },
327 [4] = { CLKSEL_VALID, CGB_PLL1, PLL_DIV4 },
328 [5] = { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 },
329 [6] = { CLKSEL_VALID, CGB_PLL2, PLL_DIV2 },
330 },
331};
332
333static const struct clockgen_muxinfo t4240_hwa5 = {
334 {
335 [2] = { CLKSEL_VALID, CGB_PLL2, PLL_DIV2 },
336 [3] = { CLKSEL_VALID, CGB_PLL2, PLL_DIV3 },
337 [4] = { CLKSEL_VALID, CGB_PLL2, PLL_DIV4 },
338 [5] = { CLKSEL_VALID, PLATFORM_PLL, PLL_DIV1 },
339 [6] = { CLKSEL_VALID, CGB_PLL1, PLL_DIV2 },
340 [7] = { CLKSEL_VALID, CGB_PLL1, PLL_DIV3 },
341 },
342};
343
344#define RCWSR7_FM1_CLK_SEL 0x40000000
345#define RCWSR7_FM2_CLK_SEL 0x20000000
346#define RCWSR7_HWA_ASYNC_DIV 0x04000000
347
348static void __init p2041_init_periph(struct clockgen *cg)
349{
350 u32 reg;
351
352 reg = ioread32be(&cg->guts->rcwsr[7]);
353
354 if (reg & RCWSR7_FM1_CLK_SEL)
355 cg->fman[0] = cg->pll[CGA_PLL2].div[PLL_DIV2].clk;
356 else
357 cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
358}
359
360static void __init p4080_init_periph(struct clockgen *cg)
361{
362 u32 reg;
363
364 reg = ioread32be(&cg->guts->rcwsr[7]);
365
366 if (reg & RCWSR7_FM1_CLK_SEL)
367 cg->fman[0] = cg->pll[CGA_PLL3].div[PLL_DIV2].clk;
368 else
369 cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
370
371 if (reg & RCWSR7_FM2_CLK_SEL)
372 cg->fman[1] = cg->pll[CGA_PLL3].div[PLL_DIV2].clk;
373 else
374 cg->fman[1] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
375}
376
377static void __init p5020_init_periph(struct clockgen *cg)
378{
379 u32 reg;
380 int div = PLL_DIV2;
381
382 reg = ioread32be(&cg->guts->rcwsr[7]);
383 if (reg & RCWSR7_HWA_ASYNC_DIV)
384 div = PLL_DIV4;
385
386 if (reg & RCWSR7_FM1_CLK_SEL)
387 cg->fman[0] = cg->pll[CGA_PLL2].div[div].clk;
388 else
389 cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
390}
391
392static void __init p5040_init_periph(struct clockgen *cg)
393{
394 u32 reg;
395 int div = PLL_DIV2;
396
397 reg = ioread32be(&cg->guts->rcwsr[7]);
398 if (reg & RCWSR7_HWA_ASYNC_DIV)
399 div = PLL_DIV4;
400
401 if (reg & RCWSR7_FM1_CLK_SEL)
402 cg->fman[0] = cg->pll[CGA_PLL3].div[div].clk;
403 else
404 cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
405
406 if (reg & RCWSR7_FM2_CLK_SEL)
407 cg->fman[1] = cg->pll[CGA_PLL3].div[div].clk;
408 else
409 cg->fman[1] = cg->pll[PLATFORM_PLL].div[PLL_DIV2].clk;
410}
411
412static void __init t1023_init_periph(struct clockgen *cg)
413{
414 cg->fman[0] = cg->hwaccel[1];
415}
416
417static void __init t1040_init_periph(struct clockgen *cg)
418{
419 cg->fman[0] = cg->pll[PLATFORM_PLL].div[PLL_DIV1].clk;
420}
421
422static void __init t2080_init_periph(struct clockgen *cg)
423{
424 cg->fman[0] = cg->hwaccel[0];
425}
426
427static void __init t4240_init_periph(struct clockgen *cg)
428{
429 cg->fman[0] = cg->hwaccel[3];
430 cg->fman[1] = cg->hwaccel[4];
431}
432
433static const struct clockgen_chipinfo chipinfo[] = {
434 {
435 .compat = "fsl,b4420-clockgen",
436 .guts_compat = "fsl,b4860-device-config",
437 .init_periph = t2080_init_periph,
438 .cmux_groups = {
439 &clockgen2_cmux_cga12, &clockgen2_cmux_cgb
440 },
441 .hwaccel = {
442 &t2080_hwa1
443 },
444 .cmux_to_group = {
445 0, 1, 1, 1, -1
446 },
447 .pll_mask = 0x3f,
448 .flags = CG_PLL_8BIT,
449 },
450 {
451 .compat = "fsl,b4860-clockgen",
452 .guts_compat = "fsl,b4860-device-config",
453 .init_periph = t2080_init_periph,
454 .cmux_groups = {
455 &clockgen2_cmux_cga12, &clockgen2_cmux_cgb
456 },
457 .hwaccel = {
458 &t2080_hwa1
459 },
460 .cmux_to_group = {
461 0, 1, 1, 1, -1
462 },
463 .pll_mask = 0x3f,
464 .flags = CG_PLL_8BIT,
465 },
466 {
467 .compat = "fsl,ls1021a-clockgen",
468 .cmux_groups = {
469 &t1023_cmux
470 },
471 .cmux_to_group = {
472 0, -1
473 },
474 .pll_mask = 0x03,
475 },
476 {
477 .compat = "fsl,ls1043a-clockgen",
478 .init_periph = t2080_init_periph,
479 .cmux_groups = {
480 &t1040_cmux
481 },
482 .hwaccel = {
483 &ls1043a_hwa1, &ls1043a_hwa2
484 },
485 .cmux_to_group = {
486 0, -1
487 },
488 .pll_mask = 0x07,
489 .flags = CG_PLL_8BIT,
490 },
491 {
492 .compat = "fsl,ls2080a-clockgen",
493 .cmux_groups = {
494 &clockgen2_cmux_cga12, &clockgen2_cmux_cgb
495 },
496 .cmux_to_group = {
497 0, 0, 1, 1, -1
498 },
499 .pll_mask = 0x37,
500 .flags = CG_VER3 | CG_LITTLE_ENDIAN,
501 },
502 {
503 .compat = "fsl,p2041-clockgen",
504 .guts_compat = "fsl,qoriq-device-config-1.0",
505 .init_periph = p2041_init_periph,
506 .cmux_groups = {
507 &p2041_cmux_grp1, &p2041_cmux_grp2
508 },
509 .cmux_to_group = {
510 0, 0, 1, 1, -1
511 },
512 .pll_mask = 0x07,
513 },
514 {
515 .compat = "fsl,p3041-clockgen",
516 .guts_compat = "fsl,qoriq-device-config-1.0",
517 .init_periph = p2041_init_periph,
518 .cmux_groups = {
519 &p2041_cmux_grp1, &p2041_cmux_grp2
520 },
521 .cmux_to_group = {
522 0, 0, 1, 1, -1
523 },
524 .pll_mask = 0x07,
525 },
526 {
527 .compat = "fsl,p4080-clockgen",
528 .guts_compat = "fsl,qoriq-device-config-1.0",
529 .init_periph = p4080_init_periph,
530 .cmux_groups = {
531 &p4080_cmux_grp1, &p4080_cmux_grp2
532 },
533 .cmux_to_group = {
534 0, 0, 0, 0, 1, 1, 1, 1
535 },
536 .pll_mask = 0x1f,
537 },
538 {
539 .compat = "fsl,p5020-clockgen",
540 .guts_compat = "fsl,qoriq-device-config-1.0",
541 .init_periph = p5020_init_periph,
542 .cmux_groups = {
543 &p2041_cmux_grp1, &p2041_cmux_grp2
544 },
545 .cmux_to_group = {
546 0, 1, -1
547 },
548 .pll_mask = 0x07,
549 },
550 {
551 .compat = "fsl,p5040-clockgen",
552 .guts_compat = "fsl,p5040-device-config",
553 .init_periph = p5040_init_periph,
554 .cmux_groups = {
555 &p5040_cmux_grp1, &p5040_cmux_grp2
556 },
557 .cmux_to_group = {
558 0, 0, 1, 1, -1
559 },
560 .pll_mask = 0x0f,
561 },
562 {
563 .compat = "fsl,t1023-clockgen",
564 .guts_compat = "fsl,t1023-device-config",
565 .init_periph = t1023_init_periph,
566 .cmux_groups = {
567 &t1023_cmux
568 },
569 .hwaccel = {
570 &t1023_hwa1, &t1023_hwa2
571 },
572 .cmux_to_group = {
573 0, 0, -1
574 },
575 .pll_mask = 0x03,
576 .flags = CG_PLL_8BIT,
577 },
578 {
579 .compat = "fsl,t1040-clockgen",
580 .guts_compat = "fsl,t1040-device-config",
581 .init_periph = t1040_init_periph,
582 .cmux_groups = {
583 &t1040_cmux
584 },
585 .cmux_to_group = {
586 0, 0, 0, 0, -1
587 },
588 .pll_mask = 0x07,
589 .flags = CG_PLL_8BIT,
590 },
591 {
592 .compat = "fsl,t2080-clockgen",
593 .guts_compat = "fsl,t2080-device-config",
594 .init_periph = t2080_init_periph,
595 .cmux_groups = {
596 &clockgen2_cmux_cga12
597 },
598 .hwaccel = {
599 &t2080_hwa1, &t2080_hwa2
600 },
601 .cmux_to_group = {
602 0, -1
603 },
604 .pll_mask = 0x07,
605 .flags = CG_PLL_8BIT,
606 },
607 {
608 .compat = "fsl,t4240-clockgen",
609 .guts_compat = "fsl,t4240-device-config",
610 .init_periph = t4240_init_periph,
611 .cmux_groups = {
612 &clockgen2_cmux_cga, &clockgen2_cmux_cgb
613 },
614 .hwaccel = {
615 &t4240_hwa1, NULL, NULL, &t4240_hwa4, &t4240_hwa5
616 },
617 .cmux_to_group = {
618 0, 0, 1, -1
619 },
620 .pll_mask = 0x3f,
621 .flags = CG_PLL_8BIT,
622 },
623 {},
624};
625
626struct mux_hwclock {
23 struct clk_hw hw; 627 struct clk_hw hw;
24 void __iomem *reg; 628 struct clockgen *cg;
25 unsigned int clk_per_pll; 629 const struct clockgen_muxinfo *info;
26 u32 flags; 630 u32 __iomem *reg;
631 u8 parent_to_clksel[NUM_MUX_PARENTS];
632 s8 clksel_to_parent[NUM_MUX_PARENTS];
633 int num_parents;
27}; 634};
28 635
29#define PLL_KILL BIT(31) 636#define to_mux_hwclock(p) container_of(p, struct mux_hwclock, hw)
637#define CLKSEL_MASK 0x78000000
30#define CLKSEL_SHIFT 27 638#define CLKSEL_SHIFT 27
31#define CLKSEL_ADJUST BIT(0)
32#define to_cmux_clk(p) container_of(p, struct cmux_clk, hw)
33 639
34static int cmux_set_parent(struct clk_hw *hw, u8 idx) 640static int mux_set_parent(struct clk_hw *hw, u8 idx)
35{ 641{
36 struct cmux_clk *clk = to_cmux_clk(hw); 642 struct mux_hwclock *hwc = to_mux_hwclock(hw);
37 u32 clksel; 643 u32 clksel;
38 644
39 clksel = ((idx / clk->clk_per_pll) << 2) + idx % clk->clk_per_pll; 645 if (idx >= hwc->num_parents)
40 if (clk->flags & CLKSEL_ADJUST) 646 return -EINVAL;
41 clksel += 8; 647
42 clksel = (clksel & 0xf) << CLKSEL_SHIFT; 648 clksel = hwc->parent_to_clksel[idx];
43 iowrite32be(clksel, clk->reg); 649 cg_out(hwc->cg, (clksel << CLKSEL_SHIFT) & CLKSEL_MASK, hwc->reg);
44 650
45 return 0; 651 return 0;
46} 652}
47 653
48static u8 cmux_get_parent(struct clk_hw *hw) 654static u8 mux_get_parent(struct clk_hw *hw)
49{ 655{
50 struct cmux_clk *clk = to_cmux_clk(hw); 656 struct mux_hwclock *hwc = to_mux_hwclock(hw);
51 u32 clksel; 657 u32 clksel;
658 s8 ret;
52 659
53 clksel = ioread32be(clk->reg); 660 clksel = (cg_in(hwc->cg, hwc->reg) & CLKSEL_MASK) >> CLKSEL_SHIFT;
54 clksel = (clksel >> CLKSEL_SHIFT) & 0xf;
55 if (clk->flags & CLKSEL_ADJUST)
56 clksel -= 8;
57 clksel = (clksel >> 2) * clk->clk_per_pll + clksel % 4;
58 661
59 return clksel; 662 ret = hwc->clksel_to_parent[clksel];
663 if (ret < 0) {
664 pr_err("%s: mux at %p has bad clksel\n", __func__, hwc->reg);
665 return 0;
666 }
667
668 return ret;
60} 669}
61 670
62static const struct clk_ops cmux_ops = { 671static const struct clk_ops cmux_ops = {
63 .get_parent = cmux_get_parent, 672 .get_parent = mux_get_parent,
64 .set_parent = cmux_set_parent, 673 .set_parent = mux_set_parent,
65}; 674};
66 675
67static void __init core_mux_init(struct device_node *np) 676/*
677 * Don't allow setting for now, as the clock options haven't been
678 * sanitized for additional restrictions.
679 */
680static const struct clk_ops hwaccel_ops = {
681 .get_parent = mux_get_parent,
682};
683
684static const struct clockgen_pll_div *get_pll_div(struct clockgen *cg,
685 struct mux_hwclock *hwc,
686 int idx)
68{ 687{
69 struct clk *clk; 688 int pll, div;
70 struct clk_init_data init;
71 struct cmux_clk *cmux_clk;
72 struct device_node *node;
73 int rc, count, i;
74 u32 offset;
75 const char *clk_name;
76 const char **parent_names;
77 struct of_phandle_args clkspec;
78 689
79 rc = of_property_read_u32(np, "reg", &offset); 690 if (!(hwc->info->clksel[idx].flags & CLKSEL_VALID))
80 if (rc) { 691 return NULL;
81 pr_err("%s: could not get reg property\n", np->name);
82 return;
83 }
84 692
85 /* get the input clock source count */ 693 pll = hwc->info->clksel[idx].pll;
86 count = of_property_count_strings(np, "clock-names"); 694 div = hwc->info->clksel[idx].div;
87 if (count < 0) {
88 pr_err("%s: get clock count error\n", np->name);
89 return;
90 }
91 parent_names = kcalloc(count, sizeof(char *), GFP_KERNEL);
92 if (!parent_names)
93 return;
94 695
95 for (i = 0; i < count; i++) 696 return &cg->pll[pll].div[div];
96 parent_names[i] = of_clk_get_parent_name(np, i); 697}
97 698
98 cmux_clk = kzalloc(sizeof(*cmux_clk), GFP_KERNEL); 699static struct clk * __init create_mux_common(struct clockgen *cg,
99 if (!cmux_clk) 700 struct mux_hwclock *hwc,
100 goto err_name; 701 const struct clk_ops *ops,
702 unsigned long min_rate,
703 unsigned long pct80_rate,
704 const char *fmt, int idx)
705{
706 struct clk_init_data init = {};
707 struct clk *clk;
708 const struct clockgen_pll_div *div;
709 const char *parent_names[NUM_MUX_PARENTS];
710 char name[32];
711 int i, j;
101 712
102 cmux_clk->reg = of_iomap(np, 0); 713 snprintf(name, sizeof(name), fmt, idx);
103 if (!cmux_clk->reg) {
104 pr_err("%s: could not map register\n", __func__);
105 goto err_clk;
106 }
107 714
108 rc = of_parse_phandle_with_args(np, "clocks", "#clock-cells", 0, 715 for (i = 0, j = 0; i < NUM_MUX_PARENTS; i++) {
109 &clkspec); 716 unsigned long rate;
110 if (rc) {
111 pr_err("%s: parse clock node error\n", __func__);
112 goto err_clk;
113 }
114 717
115 cmux_clk->clk_per_pll = of_property_count_strings(clkspec.np, 718 hwc->clksel_to_parent[i] = -1;
116 "clock-output-names");
117 of_node_put(clkspec.np);
118 719
119 node = of_find_compatible_node(NULL, NULL, "fsl,p4080-clockgen"); 720 div = get_pll_div(cg, hwc, i);
120 if (node && (offset >= 0x80)) 721 if (!div)
121 cmux_clk->flags = CLKSEL_ADJUST; 722 continue;
122 723
123 rc = of_property_read_string_index(np, "clock-output-names", 724 rate = clk_get_rate(div->clk);
124 0, &clk_name); 725
125 if (rc) { 726 if (hwc->info->clksel[i].flags & CLKSEL_80PCT &&
126 pr_err("%s: read clock names error\n", np->name); 727 rate > pct80_rate)
127 goto err_clk; 728 continue;
729 if (rate < min_rate)
730 continue;
731
732 parent_names[j] = div->name;
733 hwc->parent_to_clksel[j] = i;
734 hwc->clksel_to_parent[i] = j;
735 j++;
128 } 736 }
129 737
130 init.name = clk_name; 738 init.name = name;
131 init.ops = &cmux_ops; 739 init.ops = ops;
132 init.parent_names = parent_names; 740 init.parent_names = parent_names;
133 init.num_parents = count; 741 init.num_parents = hwc->num_parents = j;
134 init.flags = 0; 742 init.flags = 0;
135 cmux_clk->hw.init = &init; 743 hwc->hw.init = &init;
744 hwc->cg = cg;
136 745
137 clk = clk_register(NULL, &cmux_clk->hw); 746 clk = clk_register(NULL, &hwc->hw);
138 if (IS_ERR(clk)) { 747 if (IS_ERR(clk)) {
139 pr_err("%s: could not register clock\n", clk_name); 748 pr_err("%s: Couldn't register %s: %ld\n", __func__, name,
140 goto err_clk; 749 PTR_ERR(clk));
750 kfree(hwc);
751 return NULL;
752 }
753
754 return clk;
755}
756
757static struct clk * __init create_one_cmux(struct clockgen *cg, int idx)
758{
759 struct mux_hwclock *hwc;
760 const struct clockgen_pll_div *div;
761 unsigned long plat_rate, min_rate;
762 u64 pct80_rate;
763 u32 clksel;
764
765 hwc = kzalloc(sizeof(*hwc), GFP_KERNEL);
766 if (!hwc)
767 return NULL;
768
769 hwc->reg = cg->regs + 0x20 * idx;
770 hwc->info = cg->info.cmux_groups[cg->info.cmux_to_group[idx]];
771
772 /*
773 * Find the rate for the default clksel, and treat it as the
774 * maximum rated core frequency. If this is an incorrect
775 * assumption, certain clock options (possibly including the
776 * default clksel) may be inappropriately excluded on certain
777 * chips.
778 */
779 clksel = (cg_in(cg, hwc->reg) & CLKSEL_MASK) >> CLKSEL_SHIFT;
780 div = get_pll_div(cg, hwc, clksel);
781 if (!div)
782 return NULL;
783
784 pct80_rate = clk_get_rate(div->clk);
785 pct80_rate *= 8;
786 do_div(pct80_rate, 10);
787
788 plat_rate = clk_get_rate(cg->pll[PLATFORM_PLL].div[PLL_DIV1].clk);
789
790 if (cg->info.flags & CG_CMUX_GE_PLAT)
791 min_rate = plat_rate;
792 else
793 min_rate = plat_rate / 2;
794
795 return create_mux_common(cg, hwc, &cmux_ops, min_rate,
796 pct80_rate, "cg-cmux%d", idx);
797}
798
799static struct clk * __init create_one_hwaccel(struct clockgen *cg, int idx)
800{
801 struct mux_hwclock *hwc;
802
803 hwc = kzalloc(sizeof(*hwc), GFP_KERNEL);
804 if (!hwc)
805 return NULL;
806
807 hwc->reg = cg->regs + 0x20 * idx + 0x10;
808 hwc->info = cg->info.hwaccel[idx];
809
810 return create_mux_common(cg, hwc, &hwaccel_ops, 0, 0,
811 "cg-hwaccel%d", idx);
812}
813
814static void __init create_muxes(struct clockgen *cg)
815{
816 int i;
817
818 for (i = 0; i < ARRAY_SIZE(cg->cmux); i++) {
819 if (cg->info.cmux_to_group[i] < 0)
820 break;
821 if (cg->info.cmux_to_group[i] >=
822 ARRAY_SIZE(cg->info.cmux_groups)) {
823 WARN_ON_ONCE(1);
824 continue;
825 }
826
827 cg->cmux[i] = create_one_cmux(cg, i);
828 }
829
830 for (i = 0; i < ARRAY_SIZE(cg->hwaccel); i++) {
831 if (!cg->info.hwaccel[i])
832 continue;
833
834 cg->hwaccel[i] = create_one_hwaccel(cg, i);
141 } 835 }
836}
837
838static void __init clockgen_init(struct device_node *np);
839
840/* Legacy nodes may get probed before the parent clockgen node */
841static void __init legacy_init_clockgen(struct device_node *np)
842{
843 if (!clockgen.node)
844 clockgen_init(of_get_parent(np));
845}
846
847/* Legacy node */
848static void __init core_mux_init(struct device_node *np)
849{
850 struct clk *clk;
851 struct resource res;
852 int idx, rc;
853
854 legacy_init_clockgen(np);
855
856 if (of_address_to_resource(np, 0, &res))
857 return;
858
859 idx = (res.start & 0xf0) >> 5;
860 clk = clockgen.cmux[idx];
142 861
143 rc = of_clk_add_provider(np, of_clk_src_simple_get, clk); 862 rc = of_clk_add_provider(np, of_clk_src_simple_get, clk);
144 if (rc) { 863 if (rc) {
145 pr_err("Could not register clock provider for node:%s\n", 864 pr_err("%s: Couldn't register clk provider for node %s: %d\n",
146 np->name); 865 __func__, np->name, rc);
147 goto err_clk; 866 return;
148 } 867 }
149 goto err_name; 868}
869
870static struct clk *sysclk_from_fixed(struct device_node *node, const char *name)
871{
872 u32 rate;
873
874 if (of_property_read_u32(node, "clock-frequency", &rate))
875 return ERR_PTR(-ENODEV);
150 876
151err_clk: 877 return clk_register_fixed_rate(NULL, name, NULL, CLK_IS_ROOT, rate);
152 kfree(cmux_clk);
153err_name:
154 /* free *_names because they are reallocated when registered */
155 kfree(parent_names);
156} 878}
157 879
158static void __init core_pll_init(struct device_node *np) 880static struct clk *sysclk_from_parent(const char *name)
881{
882 struct clk *clk;
883 const char *parent_name;
884
885 clk = of_clk_get(clockgen.node, 0);
886 if (IS_ERR(clk))
887 return clk;
888
889 /* Register the input clock under the desired name. */
890 parent_name = __clk_get_name(clk);
891 clk = clk_register_fixed_factor(NULL, name, parent_name,
892 0, 1, 1);
893 if (IS_ERR(clk))
894 pr_err("%s: Couldn't register %s: %ld\n", __func__, name,
895 PTR_ERR(clk));
896
897 return clk;
898}
899
900static struct clk * __init create_sysclk(const char *name)
901{
902 struct device_node *sysclk;
903 struct clk *clk;
904
905 clk = sysclk_from_fixed(clockgen.node, name);
906 if (!IS_ERR(clk))
907 return clk;
908
909 clk = sysclk_from_parent(name);
910 if (!IS_ERR(clk))
911 return clk;
912
913 sysclk = of_get_child_by_name(clockgen.node, "sysclk");
914 if (sysclk) {
915 clk = sysclk_from_fixed(sysclk, name);
916 if (!IS_ERR(clk))
917 return clk;
918 }
919
920 pr_err("%s: No input clock\n", __func__);
921 return NULL;
922}
923
924/* Legacy node */
925static void __init sysclk_init(struct device_node *node)
159{ 926{
927 struct clk *clk;
928
929 legacy_init_clockgen(node);
930
931 clk = clockgen.sysclk;
932 if (clk)
933 of_clk_add_provider(node, of_clk_src_simple_get, clk);
934}
935
936#define PLL_KILL BIT(31)
937
938static void __init create_one_pll(struct clockgen *cg, int idx)
939{
940 u32 __iomem *reg;
160 u32 mult; 941 u32 mult;
161 int i, rc, count; 942 struct clockgen_pll *pll = &cg->pll[idx];
162 const char *clk_name, *parent_name; 943 int i;
163 struct clk_onecell_data *onecell_data;
164 struct clk **subclks;
165 void __iomem *base;
166 944
167 base = of_iomap(np, 0); 945 if (!(cg->info.pll_mask & (1 << idx)))
168 if (!base) {
169 pr_err("iomap error\n");
170 return; 946 return;
947
948 if (cg->info.flags & CG_VER3) {
949 switch (idx) {
950 case PLATFORM_PLL:
951 reg = cg->regs + 0x60080;
952 break;
953 case CGA_PLL1:
954 reg = cg->regs + 0x80;
955 break;
956 case CGA_PLL2:
957 reg = cg->regs + 0xa0;
958 break;
959 case CGB_PLL1:
960 reg = cg->regs + 0x10080;
961 break;
962 case CGB_PLL2:
963 reg = cg->regs + 0x100a0;
964 break;
965 default:
966 WARN_ONCE(1, "index %d\n", idx);
967 return;
968 }
969 } else {
970 if (idx == PLATFORM_PLL)
971 reg = cg->regs + 0xc00;
972 else
973 reg = cg->regs + 0x800 + 0x20 * (idx - 1);
171 } 974 }
172 975
173 /* get the multiple of PLL */ 976 /* Get the multiple of PLL */
174 mult = ioread32be(base); 977 mult = cg_in(cg, reg);
175 978
176 /* check if this PLL is disabled */ 979 /* Check if this PLL is disabled */
177 if (mult & PLL_KILL) { 980 if (mult & PLL_KILL) {
178 pr_debug("PLL:%s is disabled\n", np->name); 981 pr_debug("%s(): pll %p disabled\n", __func__, reg);
179 goto err_map; 982 return;
180 } 983 }
181 mult = (mult >> 1) & 0x3f;
182 984
183 parent_name = of_clk_get_parent_name(np, 0); 985 if ((cg->info.flags & CG_VER3) ||
184 if (!parent_name) { 986 ((cg->info.flags & CG_PLL_8BIT) && idx != PLATFORM_PLL))
185 pr_err("PLL: %s must have a parent\n", np->name); 987 mult = (mult & GENMASK(8, 1)) >> 1;
186 goto err_map; 988 else
989 mult = (mult & GENMASK(6, 1)) >> 1;
990
991 for (i = 0; i < ARRAY_SIZE(pll->div); i++) {
992 struct clk *clk;
993
994 snprintf(pll->div[i].name, sizeof(pll->div[i].name),
995 "cg-pll%d-div%d", idx, i + 1);
996
997 clk = clk_register_fixed_factor(NULL,
998 pll->div[i].name, "cg-sysclk", 0, mult, i + 1);
999 if (IS_ERR(clk)) {
1000 pr_err("%s: %s: register failed %ld\n",
1001 __func__, pll->div[i].name, PTR_ERR(clk));
1002 continue;
1003 }
1004
1005 pll->div[i].clk = clk;
187 } 1006 }
1007}
188 1008
1009static void __init create_plls(struct clockgen *cg)
1010{
1011 int i;
1012
1013 for (i = 0; i < ARRAY_SIZE(cg->pll); i++)
1014 create_one_pll(cg, i);
1015}
1016
1017static void __init legacy_pll_init(struct device_node *np, int idx)
1018{
1019 struct clockgen_pll *pll;
1020 struct clk_onecell_data *onecell_data;
1021 struct clk **subclks;
1022 int count, rc;
1023
1024 legacy_init_clockgen(np);
1025
1026 pll = &clockgen.pll[idx];
189 count = of_property_count_strings(np, "clock-output-names"); 1027 count = of_property_count_strings(np, "clock-output-names");
190 if (count < 0 || count > 4) {
191 pr_err("%s: clock is not supported\n", np->name);
192 goto err_map;
193 }
194 1028
195 subclks = kcalloc(count, sizeof(struct clk *), GFP_KERNEL); 1029 BUILD_BUG_ON(ARRAY_SIZE(pll->div) < 4);
1030 subclks = kcalloc(4, sizeof(struct clk *), GFP_KERNEL);
196 if (!subclks) 1031 if (!subclks)
197 goto err_map; 1032 return;
198 1033
199 onecell_data = kmalloc(sizeof(*onecell_data), GFP_KERNEL); 1034 onecell_data = kmalloc(sizeof(*onecell_data), GFP_KERNEL);
200 if (!onecell_data) 1035 if (!onecell_data)
201 goto err_clks; 1036 goto err_clks;
202 1037
203 for (i = 0; i < count; i++) { 1038 if (count <= 3) {
204 rc = of_property_read_string_index(np, "clock-output-names", 1039 subclks[0] = pll->div[0].clk;
205 i, &clk_name); 1040 subclks[1] = pll->div[1].clk;
206 if (rc) { 1041 subclks[2] = pll->div[3].clk;
207 pr_err("%s: could not get clock names\n", np->name); 1042 } else {
208 goto err_cell; 1043 subclks[0] = pll->div[0].clk;
209 } 1044 subclks[1] = pll->div[1].clk;
210 1045 subclks[2] = pll->div[2].clk;
211 /* 1046 subclks[3] = pll->div[3].clk;
212 * when count == 4, there are 4 output clocks:
213 * /1, /2, /3, /4 respectively
214 * when count < 4, there are at least 2 output clocks:
215 * /1, /2, (/4, if count == 3) respectively.
216 */
217 if (count == 4)
218 subclks[i] = clk_register_fixed_factor(NULL, clk_name,
219 parent_name, 0, mult, 1 + i);
220 else
221
222 subclks[i] = clk_register_fixed_factor(NULL, clk_name,
223 parent_name, 0, mult, 1 << i);
224
225 if (IS_ERR(subclks[i])) {
226 pr_err("%s: could not register clock\n", clk_name);
227 goto err_cell;
228 }
229 } 1047 }
230 1048
231 onecell_data->clks = subclks; 1049 onecell_data->clks = subclks;
@@ -233,125 +1051,223 @@ static void __init core_pll_init(struct device_node *np)
233 1051
234 rc = of_clk_add_provider(np, of_clk_src_onecell_get, onecell_data); 1052 rc = of_clk_add_provider(np, of_clk_src_onecell_get, onecell_data);
235 if (rc) { 1053 if (rc) {
236 pr_err("Could not register clk provider for node:%s\n", 1054 pr_err("%s: Couldn't register clk provider for node %s: %d\n",
237 np->name); 1055 __func__, np->name, rc);
238 goto err_cell; 1056 goto err_cell;
239 } 1057 }
240 1058
241 iounmap(base);
242 return; 1059 return;
243err_cell: 1060err_cell:
244 kfree(onecell_data); 1061 kfree(onecell_data);
245err_clks: 1062err_clks:
246 kfree(subclks); 1063 kfree(subclks);
247err_map:
248 iounmap(base);
249} 1064}
250 1065
251static void __init sysclk_init(struct device_node *node) 1066/* Legacy node */
1067static void __init pltfrm_pll_init(struct device_node *np)
252{ 1068{
253 struct clk *clk; 1069 legacy_pll_init(np, PLATFORM_PLL);
254 const char *clk_name = node->name; 1070}
255 struct device_node *np = of_get_parent(node);
256 u32 rate;
257 1071
258 if (!np) { 1072/* Legacy node */
259 pr_err("could not get parent node\n"); 1073static void __init core_pll_init(struct device_node *np)
1074{
1075 struct resource res;
1076 int idx;
1077
1078 if (of_address_to_resource(np, 0, &res))
260 return; 1079 return;
1080
1081 if ((res.start & 0xfff) == 0xc00) {
1082 /*
1083 * ls1021a devtree labels the platform PLL
1084 * with the core PLL compatible
1085 */
1086 pltfrm_pll_init(np);
1087 } else {
1088 idx = (res.start & 0xf0) >> 5;
1089 legacy_pll_init(np, CGA_PLL1 + idx);
261 } 1090 }
1091}
262 1092
263 if (of_property_read_u32(np, "clock-frequency", &rate)) { 1093static struct clk *clockgen_clk_get(struct of_phandle_args *clkspec, void *data)
264 of_node_put(node); 1094{
265 return; 1095 struct clockgen *cg = data;
1096 struct clk *clk;
1097 struct clockgen_pll *pll;
1098 u32 type, idx;
1099
1100 if (clkspec->args_count < 2) {
1101 pr_err("%s: insufficient phandle args\n", __func__);
1102 return ERR_PTR(-EINVAL);
266 } 1103 }
267 1104
268 of_property_read_string(np, "clock-output-names", &clk_name); 1105 type = clkspec->args[0];
1106 idx = clkspec->args[1];
269 1107
270 clk = clk_register_fixed_rate(NULL, clk_name, NULL, CLK_IS_ROOT, rate); 1108 switch (type) {
271 if (!IS_ERR(clk)) 1109 case 0:
272 of_clk_add_provider(np, of_clk_src_simple_get, clk); 1110 if (idx != 0)
1111 goto bad_args;
1112 clk = cg->sysclk;
1113 break;
1114 case 1:
1115 if (idx >= ARRAY_SIZE(cg->cmux))
1116 goto bad_args;
1117 clk = cg->cmux[idx];
1118 break;
1119 case 2:
1120 if (idx >= ARRAY_SIZE(cg->hwaccel))
1121 goto bad_args;
1122 clk = cg->hwaccel[idx];
1123 break;
1124 case 3:
1125 if (idx >= ARRAY_SIZE(cg->fman))
1126 goto bad_args;
1127 clk = cg->fman[idx];
1128 break;
1129 case 4:
1130 pll = &cg->pll[PLATFORM_PLL];
1131 if (idx >= ARRAY_SIZE(pll->div))
1132 goto bad_args;
1133 clk = pll->div[idx].clk;
1134 break;
1135 default:
1136 goto bad_args;
1137 }
1138
1139 if (!clk)
1140 return ERR_PTR(-ENOENT);
1141 return clk;
1142
1143bad_args:
1144 pr_err("%s: Bad phandle args %u %u\n", __func__, type, idx);
1145 return ERR_PTR(-EINVAL);
273} 1146}
274 1147
275static void __init pltfrm_pll_init(struct device_node *np) 1148#ifdef CONFIG_PPC
1149#include <asm/mpc85xx.h>
1150
1151static const u32 a4510_svrs[] __initconst = {
1152 (SVR_P2040 << 8) | 0x10, /* P2040 1.0 */
1153 (SVR_P2040 << 8) | 0x11, /* P2040 1.1 */
1154 (SVR_P2041 << 8) | 0x10, /* P2041 1.0 */
1155 (SVR_P2041 << 8) | 0x11, /* P2041 1.1 */
1156 (SVR_P3041 << 8) | 0x10, /* P3041 1.0 */
1157 (SVR_P3041 << 8) | 0x11, /* P3041 1.1 */
1158 (SVR_P4040 << 8) | 0x20, /* P4040 2.0 */
1159 (SVR_P4080 << 8) | 0x20, /* P4080 2.0 */
1160 (SVR_P5010 << 8) | 0x10, /* P5010 1.0 */
1161 (SVR_P5010 << 8) | 0x20, /* P5010 2.0 */
1162 (SVR_P5020 << 8) | 0x10, /* P5020 1.0 */
1163 (SVR_P5021 << 8) | 0x10, /* P5021 1.0 */
1164 (SVR_P5040 << 8) | 0x10, /* P5040 1.0 */
1165};
1166
1167#define SVR_SECURITY 0x80000 /* The Security (E) bit */
1168
1169static bool __init has_erratum_a4510(void)
276{ 1170{
277 void __iomem *base; 1171 u32 svr = mfspr(SPRN_SVR);
278 uint32_t mult; 1172 int i;
279 const char *parent_name, *clk_name;
280 int i, _errno;
281 struct clk_onecell_data *cod;
282 1173
283 base = of_iomap(np, 0); 1174 svr &= ~SVR_SECURITY;
284 if (!base) { 1175
285 pr_err("%s(): %s: of_iomap() failed\n", __func__, np->name); 1176 for (i = 0; i < ARRAY_SIZE(a4510_svrs); i++) {
286 return; 1177 if (svr == a4510_svrs[i])
1178 return true;
287 } 1179 }
288 1180
289 /* Get the multiple of PLL */ 1181 return false;
290 mult = ioread32be(base); 1182}
1183#else
1184static bool __init has_erratum_a4510(void)
1185{
1186 return false;
1187}
1188#endif
291 1189
292 iounmap(base); 1190static void __init clockgen_init(struct device_node *np)
1191{
1192 int i, ret;
1193 bool is_old_ls1021a = false;
293 1194
294 /* Check if this PLL is disabled */ 1195 /* May have already been called by a legacy probe */
295 if (mult & PLL_KILL) { 1196 if (clockgen.node)
296 pr_debug("%s(): %s: Disabled\n", __func__, np->name);
297 return; 1197 return;
298 }
299 mult = (mult & GENMASK(6, 1)) >> 1;
300 1198
301 parent_name = of_clk_get_parent_name(np, 0); 1199 clockgen.node = np;
302 if (!parent_name) { 1200 clockgen.regs = of_iomap(np, 0);
303 pr_err("%s(): %s: of_clk_get_parent_name() failed\n", 1201 if (!clockgen.regs &&
304 __func__, np->name); 1202 of_device_is_compatible(of_root, "fsl,ls1021a")) {
1203 /* Compatibility hack for old, broken device trees */
1204 clockgen.regs = ioremap(0x1ee1000, 0x1000);
1205 is_old_ls1021a = true;
1206 }
1207 if (!clockgen.regs) {
1208 pr_err("%s(): %s: of_iomap() failed\n", __func__, np->name);
305 return; 1209 return;
306 } 1210 }
307 1211
308 i = of_property_count_strings(np, "clock-output-names"); 1212 for (i = 0; i < ARRAY_SIZE(chipinfo); i++) {
309 if (i < 0) { 1213 if (of_device_is_compatible(np, chipinfo[i].compat))
310 pr_err("%s(): %s: of_property_count_strings(clock-output-names) = %d\n", 1214 break;
311 __func__, np->name, i); 1215 if (is_old_ls1021a &&
312 return; 1216 !strcmp(chipinfo[i].compat, "fsl,ls1021a-clockgen"))
1217 break;
313 } 1218 }
314 1219
315 cod = kmalloc(sizeof(*cod) + i * sizeof(struct clk *), GFP_KERNEL); 1220 if (i == ARRAY_SIZE(chipinfo)) {
316 if (!cod) 1221 pr_err("%s: unknown clockgen node %s\n", __func__,
317 return; 1222 np->full_name);
318 cod->clks = (struct clk **)(cod + 1); 1223 goto err;
319 cod->clk_num = i; 1224 }
320 1225 clockgen.info = chipinfo[i];
321 for (i = 0; i < cod->clk_num; i++) { 1226
322 _errno = of_property_read_string_index(np, "clock-output-names", 1227 if (clockgen.info.guts_compat) {
323 i, &clk_name); 1228 struct device_node *guts;
324 if (_errno < 0) {
325 pr_err("%s(): %s: of_property_read_string_index(clock-output-names) = %d\n",
326 __func__, np->name, _errno);
327 goto return_clk_unregister;
328 }
329 1229
330 cod->clks[i] = clk_register_fixed_factor(NULL, clk_name, 1230 guts = of_find_compatible_node(NULL, NULL,
331 parent_name, 0, mult, 1 + i); 1231 clockgen.info.guts_compat);
332 if (IS_ERR(cod->clks[i])) { 1232 if (guts) {
333 pr_err("%s(): %s: clk_register_fixed_factor(%s) = %ld\n", 1233 clockgen.guts = of_iomap(guts, 0);
334 __func__, np->name, 1234 if (!clockgen.guts) {
335 clk_name, PTR_ERR(cod->clks[i])); 1235 pr_err("%s: Couldn't map %s regs\n", __func__,
336 goto return_clk_unregister; 1236 guts->full_name);
1237 }
337 } 1238 }
1239
338 } 1240 }
339 1241
340 _errno = of_clk_add_provider(np, of_clk_src_onecell_get, cod); 1242 if (has_erratum_a4510())
341 if (_errno < 0) { 1243 clockgen.info.flags |= CG_CMUX_GE_PLAT;
342 pr_err("%s(): %s: of_clk_add_provider() = %d\n", 1244
343 __func__, np->name, _errno); 1245 clockgen.sysclk = create_sysclk("cg-sysclk");
344 goto return_clk_unregister; 1246 create_plls(&clockgen);
1247 create_muxes(&clockgen);
1248
1249 if (clockgen.info.init_periph)
1250 clockgen.info.init_periph(&clockgen);
1251
1252 ret = of_clk_add_provider(np, clockgen_clk_get, &clockgen);
1253 if (ret) {
1254 pr_err("%s: Couldn't register clk provider for node %s: %d\n",
1255 __func__, np->name, ret);
345 } 1256 }
346 1257
347 return; 1258 return;
348 1259err:
349return_clk_unregister: 1260 iounmap(clockgen.regs);
350 while (--i >= 0) 1261 clockgen.regs = NULL;
351 clk_unregister(cod->clks[i]);
352 kfree(cod);
353} 1262}
354 1263
1264CLK_OF_DECLARE(qoriq_clockgen_1, "fsl,qoriq-clockgen-1.0", clockgen_init);
1265CLK_OF_DECLARE(qoriq_clockgen_2, "fsl,qoriq-clockgen-2.0", clockgen_init);
1266CLK_OF_DECLARE(qoriq_clockgen_ls1021a, "fsl,ls1021a-clockgen", clockgen_init);
1267CLK_OF_DECLARE(qoriq_clockgen_ls1043a, "fsl,ls1043a-clockgen", clockgen_init);
1268CLK_OF_DECLARE(qoriq_clockgen_ls2080a, "fsl,ls2080a-clockgen", clockgen_init);
1269
1270/* Legacy nodes */
355CLK_OF_DECLARE(qoriq_sysclk_1, "fsl,qoriq-sysclk-1.0", sysclk_init); 1271CLK_OF_DECLARE(qoriq_sysclk_1, "fsl,qoriq-sysclk-1.0", sysclk_init);
356CLK_OF_DECLARE(qoriq_sysclk_2, "fsl,qoriq-sysclk-2.0", sysclk_init); 1272CLK_OF_DECLARE(qoriq_sysclk_2, "fsl,qoriq-sysclk-2.0", sysclk_init);
357CLK_OF_DECLARE(qoriq_core_pll_1, "fsl,qoriq-core-pll-1.0", core_pll_init); 1273CLK_OF_DECLARE(qoriq_core_pll_1, "fsl,qoriq-core-pll-1.0", core_pll_init);
diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c
index 2570f2a25dc4..a34355fca37a 100644
--- a/drivers/iommu/fsl_pamu.c
+++ b/drivers/iommu/fsl_pamu.c
@@ -20,11 +20,11 @@
20 20
21#include "fsl_pamu.h" 21#include "fsl_pamu.h"
22 22
23#include <linux/fsl/guts.h>
23#include <linux/interrupt.h> 24#include <linux/interrupt.h>
24#include <linux/genalloc.h> 25#include <linux/genalloc.h>
25 26
26#include <asm/mpc85xx.h> 27#include <asm/mpc85xx.h>
27#include <asm/fsl_guts.h>
28 28
29/* define indexes for each operation mapping scenario */ 29/* define indexes for each operation mapping scenario */
30#define OMI_QMAN 0x00 30#define OMI_QMAN 0x00
diff --git a/drivers/macintosh/Kconfig b/drivers/macintosh/Kconfig
index 5844b80bd90e..3e8b29e41420 100644
--- a/drivers/macintosh/Kconfig
+++ b/drivers/macintosh/Kconfig
@@ -166,9 +166,8 @@ config INPUT_ADBHID
166 Say Y here if you want to have ADB (Apple Desktop Bus) HID devices 166 Say Y here if you want to have ADB (Apple Desktop Bus) HID devices
167 such as keyboards, mice, joysticks, trackpads or graphic tablets 167 such as keyboards, mice, joysticks, trackpads or graphic tablets
168 handled by the input layer. If you say Y here, make sure to say Y to 168 handled by the input layer. If you say Y here, make sure to say Y to
169 the corresponding drivers "Keyboard support" (CONFIG_INPUT_KEYBDEV), 169 the corresponding drivers "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and
170 "Mouse Support" (CONFIG_INPUT_MOUSEDEV) and "Event interface 170 "Event interface support" (CONFIG_INPUT_EVDEV) as well.
171 support" (CONFIG_INPUT_EVDEV) as well.
172 171
173 If unsure, say Y. 172 If unsure, say Y.
174 173
diff --git a/drivers/misc/cxl/vphb.c b/drivers/misc/cxl/vphb.c
index 94b520896b18..c241e15cacb1 100644
--- a/drivers/misc/cxl/vphb.c
+++ b/drivers/misc/cxl/vphb.c
@@ -290,8 +290,10 @@ void cxl_pci_vphb_remove(struct cxl_afu *afu)
290 return; 290 return;
291 291
292 phb = afu->phb; 292 phb = afu->phb;
293 afu->phb = NULL;
293 294
294 pci_remove_root_bus(phb->bus); 295 pci_remove_root_bus(phb->bus);
296 pcibios_free_controller(phb);
295} 297}
296 298
297struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev) 299struct cxl_afu *cxl_pci_to_afu(struct pci_dev *dev)
diff --git a/drivers/ps3/ps3-lpm.c b/drivers/ps3/ps3-lpm.c
index cb7d3a67380d..e34de9a7d517 100644
--- a/drivers/ps3/ps3-lpm.c
+++ b/drivers/ps3/ps3-lpm.c
@@ -901,7 +901,7 @@ void ps3_disable_pm(u32 cpu)
901 result = lv1_stop_lpm(lpm_priv->lpm_id, &tmp); 901 result = lv1_stop_lpm(lpm_priv->lpm_id, &tmp);
902 902
903 if (result) { 903 if (result) {
904 if(result != LV1_WRONG_STATE) 904 if (result != LV1_WRONG_STATE)
905 dev_err(sbd_core(), "%s:%u: lv1_stop_lpm failed: %s\n", 905 dev_err(sbd_core(), "%s:%u: lv1_stop_lpm failed: %s\n",
906 __func__, __LINE__, ps3_result(result)); 906 __func__, __LINE__, ps3_result(result));
907 return; 907 return;
diff --git a/drivers/ps3/ps3-vuart.c b/drivers/ps3/ps3-vuart.c
index d6db822bef84..632701a1d993 100644
--- a/drivers/ps3/ps3-vuart.c
+++ b/drivers/ps3/ps3-vuart.c
@@ -1000,12 +1000,11 @@ static int ps3_vuart_probe(struct ps3_system_bus_device *dev)
1000 dev_dbg(&dev->core, "%s:%d\n", __func__, __LINE__); 1000 dev_dbg(&dev->core, "%s:%d\n", __func__, __LINE__);
1001 1001
1002 drv = ps3_system_bus_dev_to_vuart_drv(dev); 1002 drv = ps3_system_bus_dev_to_vuart_drv(dev);
1003 BUG_ON(!drv);
1003 1004
1004 dev_dbg(&dev->core, "%s:%d: (%s)\n", __func__, __LINE__, 1005 dev_dbg(&dev->core, "%s:%d: (%s)\n", __func__, __LINE__,
1005 drv->core.core.name); 1006 drv->core.core.name);
1006 1007
1007 BUG_ON(!drv);
1008
1009 if (dev->port_number >= PORT_COUNT) { 1008 if (dev->port_number >= PORT_COUNT) {
1010 BUG(); 1009 BUG();
1011 return -EINVAL; 1010 return -EINVAL;
diff --git a/arch/powerpc/include/asm/fsl_guts.h b/include/linux/fsl/guts.h
index 43b6bb1a4a9c..84d971ff3fba 100644
--- a/arch/powerpc/include/asm/fsl_guts.h
+++ b/include/linux/fsl/guts.h
@@ -12,9 +12,10 @@
12 * option) any later version. 12 * option) any later version.
13 */ 13 */
14 14
15#ifndef __ASM_POWERPC_FSL_GUTS_H__ 15#ifndef __FSL_GUTS_H__
16#define __ASM_POWERPC_FSL_GUTS_H__ 16#define __FSL_GUTS_H__
17#ifdef __KERNEL__ 17
18#include <linux/types.h>
18 19
19/** 20/**
20 * Global Utility Registers. 21 * Global Utility Registers.
@@ -189,4 +190,3 @@ static inline void guts_set_pmuxcr_dma(struct ccsr_guts __iomem *guts,
189#endif 190#endif
190 191
191#endif 192#endif
192#endif
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index aceaaed09811..3043d6b0b51d 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -96,9 +96,12 @@ savedefconfig: $(obj)/conf
96defconfig: $(obj)/conf 96defconfig: $(obj)/conf
97ifeq ($(KBUILD_DEFCONFIG),) 97ifeq ($(KBUILD_DEFCONFIG),)
98 $< $(silent) --defconfig $(Kconfig) 98 $< $(silent) --defconfig $(Kconfig)
99else 99else ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)),)
100 @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'" 100 @$(kecho) "*** Default configuration is based on '$(KBUILD_DEFCONFIG)'"
101 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig) 101 $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG) $(Kconfig)
102else
103 @$(kecho) "*** Default configuration is based on target '$(KBUILD_DEFCONFIG)'"
104 $(Q)$(MAKE) -f $(srctree)/Makefile $(KBUILD_DEFCONFIG)
102endif 105endif
103 106
104%_defconfig: $(obj)/conf 107%_defconfig: $(obj)/conf
diff --git a/sound/soc/fsl/mpc8610_hpcd.c b/sound/soc/fsl/mpc8610_hpcd.c
index 9621b9140df6..6f236f170cf5 100644
--- a/sound/soc/fsl/mpc8610_hpcd.c
+++ b/sound/soc/fsl/mpc8610_hpcd.c
@@ -12,11 +12,11 @@
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/interrupt.h> 14#include <linux/interrupt.h>
15#include <linux/fsl/guts.h>
15#include <linux/of_address.h> 16#include <linux/of_address.h>
16#include <linux/of_device.h> 17#include <linux/of_device.h>
17#include <linux/slab.h> 18#include <linux/slab.h>
18#include <sound/soc.h> 19#include <sound/soc.h>
19#include <asm/fsl_guts.h>
20 20
21#include "fsl_dma.h" 21#include "fsl_dma.h"
22#include "fsl_ssi.h" 22#include "fsl_ssi.h"
diff --git a/sound/soc/fsl/p1022_ds.c b/sound/soc/fsl/p1022_ds.c
index 71c1a7dc3aeb..747aab0602bd 100644
--- a/sound/soc/fsl/p1022_ds.c
+++ b/sound/soc/fsl/p1022_ds.c
@@ -11,12 +11,12 @@
11 */ 11 */
12 12
13#include <linux/module.h> 13#include <linux/module.h>
14#include <linux/fsl/guts.h>
14#include <linux/interrupt.h> 15#include <linux/interrupt.h>
15#include <linux/of_address.h> 16#include <linux/of_address.h>
16#include <linux/of_device.h> 17#include <linux/of_device.h>
17#include <linux/slab.h> 18#include <linux/slab.h>
18#include <sound/soc.h> 19#include <sound/soc.h>
19#include <asm/fsl_guts.h>
20 20
21#include "fsl_dma.h" 21#include "fsl_dma.h"
22#include "fsl_ssi.h" 22#include "fsl_ssi.h"
diff --git a/sound/soc/fsl/p1022_rdk.c b/sound/soc/fsl/p1022_rdk.c
index ee29048424be..1dd49e5f9675 100644
--- a/sound/soc/fsl/p1022_rdk.c
+++ b/sound/soc/fsl/p1022_rdk.c
@@ -18,12 +18,12 @@
18 */ 18 */
19 19
20#include <linux/module.h> 20#include <linux/module.h>
21#include <linux/fsl/guts.h>
21#include <linux/interrupt.h> 22#include <linux/interrupt.h>
22#include <linux/of_address.h> 23#include <linux/of_address.h>
23#include <linux/of_device.h> 24#include <linux/of_device.h>
24#include <linux/slab.h> 25#include <linux/slab.h>
25#include <sound/soc.h> 26#include <sound/soc.h>
26#include <asm/fsl_guts.h>
27 27
28#include "fsl_dma.h" 28#include "fsl_dma.h"
29#include "fsl_ssi.h" 29#include "fsl_ssi.h"
diff --git a/tools/testing/selftests/powerpc/Makefile b/tools/testing/selftests/powerpc/Makefile
index 03ca2e64b3fc..0c2706bda330 100644
--- a/tools/testing/selftests/powerpc/Makefile
+++ b/tools/testing/selftests/powerpc/Makefile
@@ -12,7 +12,17 @@ CFLAGS := -Wall -O2 -flto -Wall -Werror -DGIT_VERSION='"$(GIT_VERSION)"' -I$(CUR
12 12
13export CFLAGS 13export CFLAGS
14 14
15SUB_DIRS = pmu copyloops mm tm primitives stringloops vphn switch_endian dscr 15SUB_DIRS = benchmarks \
16 copyloops \
17 dscr \
18 mm \
19 pmu \
20 primitives \
21 stringloops \
22 switch_endian \
23 syscalls \
24 tm \
25 vphn
16 26
17endif 27endif
18 28
diff --git a/tools/testing/selftests/powerpc/benchmarks/.gitignore b/tools/testing/selftests/powerpc/benchmarks/.gitignore
new file mode 100644
index 000000000000..b4709ea588c1
--- /dev/null
+++ b/tools/testing/selftests/powerpc/benchmarks/.gitignore
@@ -0,0 +1 @@
gettimeofday
diff --git a/tools/testing/selftests/powerpc/benchmarks/Makefile b/tools/testing/selftests/powerpc/benchmarks/Makefile
new file mode 100644
index 000000000000..5fa48702070d
--- /dev/null
+++ b/tools/testing/selftests/powerpc/benchmarks/Makefile
@@ -0,0 +1,12 @@
1TEST_PROGS := gettimeofday
2
3CFLAGS += -O2
4
5all: $(TEST_PROGS)
6
7$(TEST_PROGS): ../harness.c
8
9include ../../lib.mk
10
11clean:
12 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c b/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c
new file mode 100644
index 000000000000..3af3c21e8036
--- /dev/null
+++ b/tools/testing/selftests/powerpc/benchmarks/gettimeofday.c
@@ -0,0 +1,31 @@
1/*
2 * Copyright 2015, Anton Blanchard, IBM Corp.
3 * Licensed under GPLv2.
4 */
5
6#include <sys/time.h>
7#include <stdio.h>
8
9#include "utils.h"
10
11static int test_gettimeofday(void)
12{
13 int i;
14
15 struct timeval tv_start, tv_end;
16
17 gettimeofday(&tv_start, NULL);
18
19 for(i = 0; i < 100000000; i++) {
20 gettimeofday(&tv_end, NULL);
21 }
22
23 printf("time = %.6f\n", tv_end.tv_sec - tv_start.tv_sec + (tv_end.tv_usec - tv_start.tv_usec) * 1e-6);
24
25 return 0;
26}
27
28int main(void)
29{
30 return test_harness(test_gettimeofday, "gettimeofday");
31}
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/back_to_back_ebbs_test.c b/tools/testing/selftests/powerpc/pmu/ebb/back_to_back_ebbs_test.c
index 66ea765c0e72..94110b1dcd3d 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/back_to_back_ebbs_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/back_to_back_ebbs_test.c
@@ -63,6 +63,8 @@ int back_to_back_ebbs(void)
63{ 63{
64 struct event event; 64 struct event event;
65 65
66 SKIP_IF(!ebb_is_supported());
67
66 event_init_named(&event, 0x1001e, "cycles"); 68 event_init_named(&event, 0x1001e, "cycles");
67 event_leader_ebb_init(&event); 69 event_leader_ebb_init(&event);
68 70
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/close_clears_pmcc_test.c b/tools/testing/selftests/powerpc/pmu/ebb/close_clears_pmcc_test.c
index 0f0423dba18b..ac18cf617dd6 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/close_clears_pmcc_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/close_clears_pmcc_test.c
@@ -20,6 +20,8 @@ int close_clears_pmcc(void)
20{ 20{
21 struct event event; 21 struct event event;
22 22
23 SKIP_IF(!ebb_is_supported());
24
23 event_init_named(&event, 0x1001e, "cycles"); 25 event_init_named(&event, 0x1001e, "cycles");
24 event_leader_ebb_init(&event); 26 event_leader_ebb_init(&event);
25 27
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c b/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c
index d3ed64d5d6c0..f0632e7fdf29 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_pinned_vs_ebb_test.c
@@ -43,6 +43,8 @@ int cpu_event_pinned_vs_ebb(void)
43 int cpu, rc; 43 int cpu, rc;
44 pid_t pid; 44 pid_t pid;
45 45
46 SKIP_IF(!ebb_is_supported());
47
46 cpu = pick_online_cpu(); 48 cpu = pick_online_cpu();
47 FAIL_IF(cpu < 0); 49 FAIL_IF(cpu < 0);
48 FAIL_IF(bind_to_cpu(cpu)); 50 FAIL_IF(bind_to_cpu(cpu));
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c b/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c
index 8b972c2aa392..33e56a2342e5 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/cpu_event_vs_ebb_test.c
@@ -41,6 +41,8 @@ int cpu_event_vs_ebb(void)
41 int cpu, rc; 41 int cpu, rc;
42 pid_t pid; 42 pid_t pid;
43 43
44 SKIP_IF(!ebb_is_supported());
45
44 cpu = pick_online_cpu(); 46 cpu = pick_online_cpu();
45 FAIL_IF(cpu < 0); 47 FAIL_IF(cpu < 0);
46 FAIL_IF(bind_to_cpu(cpu)); 48 FAIL_IF(bind_to_cpu(cpu));
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/cycles_test.c b/tools/testing/selftests/powerpc/pmu/ebb/cycles_test.c
index 8590fc1bfc0d..7c57a8d79535 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/cycles_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/cycles_test.c
@@ -16,6 +16,8 @@ int cycles(void)
16{ 16{
17 struct event event; 17 struct event event;
18 18
19 SKIP_IF(!ebb_is_supported());
20
19 event_init_named(&event, 0x1001e, "cycles"); 21 event_init_named(&event, 0x1001e, "cycles");
20 event_leader_ebb_init(&event); 22 event_leader_ebb_init(&event);
21 23
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c b/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
index 754b3f2008d3..ecf5ee3283a3 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_freeze_test.c
@@ -56,6 +56,8 @@ int cycles_with_freeze(void)
56 uint64_t val; 56 uint64_t val;
57 bool fc_cleared; 57 bool fc_cleared;
58 58
59 SKIP_IF(!ebb_is_supported());
60
59 event_init_named(&event, 0x1001e, "cycles"); 61 event_init_named(&event, 0x1001e, "cycles");
60 event_leader_ebb_init(&event); 62 event_leader_ebb_init(&event);
61 63
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c b/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c
index d43029b0800c..c0faba520b35 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/cycles_with_mmcr2_test.c
@@ -26,6 +26,8 @@ int cycles_with_mmcr2(void)
26 int i; 26 int i;
27 bool bad_mmcr2; 27 bool bad_mmcr2;
28 28
29 SKIP_IF(!ebb_is_supported());
30
29 event_init_named(&event, 0x1001e, "cycles"); 31 event_init_named(&event, 0x1001e, "cycles");
30 event_leader_ebb_init(&event); 32 event_leader_ebb_init(&event);
31 33
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/ebb.c b/tools/testing/selftests/powerpc/pmu/ebb/ebb.c
index d7a72ce696b5..9729d9f90218 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/ebb.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/ebb.c
@@ -13,6 +13,7 @@
13#include <stdlib.h> 13#include <stdlib.h>
14#include <string.h> 14#include <string.h>
15#include <sys/ioctl.h> 15#include <sys/ioctl.h>
16#include <linux/auxvec.h>
16 17
17#include "trace.h" 18#include "trace.h"
18#include "reg.h" 19#include "reg.h"
@@ -319,6 +320,16 @@ void ebb_global_disable(void)
319 mb(); 320 mb();
320} 321}
321 322
323bool ebb_is_supported(void)
324{
325#ifdef PPC_FEATURE2_EBB
326 /* EBB requires at least POWER8 */
327 return ((long)get_auxv_entry(AT_HWCAP2) & PPC_FEATURE2_EBB);
328#else
329 return false;
330#endif
331}
332
322void event_ebb_init(struct event *e) 333void event_ebb_init(struct event *e)
323{ 334{
324 e->attr.config |= (1ull << 63); 335 e->attr.config |= (1ull << 63);
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/ebb.h b/tools/testing/selftests/powerpc/pmu/ebb/ebb.h
index e44eee5d97ca..f87e761f82d0 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/ebb.h
+++ b/tools/testing/selftests/powerpc/pmu/ebb/ebb.h
@@ -52,6 +52,7 @@ void standard_ebb_callee(void);
52int ebb_event_enable(struct event *e); 52int ebb_event_enable(struct event *e);
53void ebb_global_enable(void); 53void ebb_global_enable(void);
54void ebb_global_disable(void); 54void ebb_global_disable(void);
55bool ebb_is_supported(void);
55void ebb_freeze_pmcs(void); 56void ebb_freeze_pmcs(void);
56void ebb_unfreeze_pmcs(void); 57void ebb_unfreeze_pmcs(void);
57void event_ebb_init(struct event *e); 58void event_ebb_init(struct event *e);
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c b/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c
index c45f948148e1..1e7b7fe2396b 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_child_test.c
@@ -47,6 +47,8 @@ int ebb_on_child(void)
47 struct event event; 47 struct event event;
48 pid_t pid; 48 pid_t pid;
49 49
50 SKIP_IF(!ebb_is_supported());
51
50 FAIL_IF(pipe(read_pipe.fds) == -1); 52 FAIL_IF(pipe(read_pipe.fds) == -1);
51 FAIL_IF(pipe(write_pipe.fds) == -1); 53 FAIL_IF(pipe(write_pipe.fds) == -1);
52 54
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c b/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c
index 11acf1d55f8d..a991d2ea8d0a 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/ebb_on_willing_child_test.c
@@ -54,6 +54,8 @@ int ebb_on_willing_child(void)
54 struct event event; 54 struct event event;
55 pid_t pid; 55 pid_t pid;
56 56
57 SKIP_IF(!ebb_is_supported());
58
57 FAIL_IF(pipe(read_pipe.fds) == -1); 59 FAIL_IF(pipe(read_pipe.fds) == -1);
58 FAIL_IF(pipe(write_pipe.fds) == -1); 60 FAIL_IF(pipe(write_pipe.fds) == -1);
59 61
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c b/tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c
index be4dd5a4e98e..af20a2b363aa 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/ebb_vs_cpu_event_test.c
@@ -41,6 +41,8 @@ int ebb_vs_cpu_event(void)
41 int cpu, rc; 41 int cpu, rc;
42 pid_t pid; 42 pid_t pid;
43 43
44 SKIP_IF(!ebb_is_supported());
45
44 cpu = pick_online_cpu(); 46 cpu = pick_online_cpu();
45 FAIL_IF(cpu < 0); 47 FAIL_IF(cpu < 0);
46 FAIL_IF(bind_to_cpu(cpu)); 48 FAIL_IF(bind_to_cpu(cpu));
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/event_attributes_test.c b/tools/testing/selftests/powerpc/pmu/ebb/event_attributes_test.c
index 7e78153f08eb..7762ab26e5ac 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/event_attributes_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/event_attributes_test.c
@@ -16,6 +16,8 @@ int event_attributes(void)
16{ 16{
17 struct event event, leader; 17 struct event event, leader;
18 18
19 SKIP_IF(!ebb_is_supported());
20
19 event_init(&event, 0x1001e); 21 event_init(&event, 0x1001e);
20 event_leader_ebb_init(&event); 22 event_leader_ebb_init(&event);
21 /* Expected to succeed */ 23 /* Expected to succeed */
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/fork_cleanup_test.c b/tools/testing/selftests/powerpc/pmu/ebb/fork_cleanup_test.c
index 9e7af6e76622..167135bd92a8 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/fork_cleanup_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/fork_cleanup_test.c
@@ -44,6 +44,8 @@ int fork_cleanup(void)
44{ 44{
45 pid_t pid; 45 pid_t pid;
46 46
47 SKIP_IF(!ebb_is_supported());
48
47 event_init_named(&event, 0x1001e, "cycles"); 49 event_init_named(&event, 0x1001e, "cycles");
48 event_leader_ebb_init(&event); 50 event_leader_ebb_init(&event);
49 51
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c b/tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c
index f8190fa29592..5da355135df2 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/instruction_count_test.c
@@ -111,6 +111,8 @@ int instruction_count(void)
111 struct event event; 111 struct event event;
112 uint64_t overhead; 112 uint64_t overhead;
113 113
114 SKIP_IF(!ebb_is_supported());
115
114 event_init_named(&event, 0x400FA, "PM_RUN_INST_CMPL"); 116 event_init_named(&event, 0x400FA, "PM_RUN_INST_CMPL");
115 event_leader_ebb_init(&event); 117 event_leader_ebb_init(&event);
116 event.attr.exclude_kernel = 1; 118 event.attr.exclude_kernel = 1;
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c b/tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c
index 0c9dd9b2e39d..eb8acb78bc6c 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/lost_exception_test.c
@@ -23,6 +23,8 @@ static int test_body(void)
23 int i, orig_period, max_period; 23 int i, orig_period, max_period;
24 struct event event; 24 struct event event;
25 25
26 SKIP_IF(!ebb_is_supported());
27
26 /* We use PMC4 to make sure the kernel switches all counters correctly */ 28 /* We use PMC4 to make sure the kernel switches all counters correctly */
27 event_init_named(&event, 0x40002, "instructions"); 29 event_init_named(&event, 0x40002, "instructions");
28 event_leader_ebb_init(&event); 30 event_leader_ebb_init(&event);
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/multi_counter_test.c b/tools/testing/selftests/powerpc/pmu/ebb/multi_counter_test.c
index 67d78af3284c..6ff8c8ff27d6 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/multi_counter_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/multi_counter_test.c
@@ -18,6 +18,8 @@ int multi_counter(void)
18 struct event events[6]; 18 struct event events[6];
19 int i, group_fd; 19 int i, group_fd;
20 20
21 SKIP_IF(!ebb_is_supported());
22
21 event_init_named(&events[0], 0x1001C, "PM_CMPLU_STALL_THRD"); 23 event_init_named(&events[0], 0x1001C, "PM_CMPLU_STALL_THRD");
22 event_init_named(&events[1], 0x2D016, "PM_CMPLU_STALL_FXU"); 24 event_init_named(&events[1], 0x2D016, "PM_CMPLU_STALL_FXU");
23 event_init_named(&events[2], 0x30006, "PM_CMPLU_STALL_OTHER_CMPL"); 25 event_init_named(&events[2], 0x30006, "PM_CMPLU_STALL_OTHER_CMPL");
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c b/tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c
index b8dc371f9338..037cb6154f36 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/multi_ebb_procs_test.c
@@ -79,6 +79,8 @@ int multi_ebb_procs(void)
79 pid_t pids[NR_CHILDREN]; 79 pid_t pids[NR_CHILDREN];
80 int cpu, rc, i; 80 int cpu, rc, i;
81 81
82 SKIP_IF(!ebb_is_supported());
83
82 cpu = pick_online_cpu(); 84 cpu = pick_online_cpu();
83 FAIL_IF(cpu < 0); 85 FAIL_IF(cpu < 0);
84 FAIL_IF(bind_to_cpu(cpu)); 86 FAIL_IF(bind_to_cpu(cpu));
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c b/tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c
index 2f9bf8edfa60..8341d7778d5e 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/no_handler_test.c
@@ -19,6 +19,8 @@ static int no_handler_test(void)
19 u64 val; 19 u64 val;
20 int i; 20 int i;
21 21
22 SKIP_IF(!ebb_is_supported());
23
22 event_init_named(&event, 0x1001e, "cycles"); 24 event_init_named(&event, 0x1001e, "cycles");
23 event_leader_ebb_init(&event); 25 event_leader_ebb_init(&event);
24 26
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/pmae_handling_test.c b/tools/testing/selftests/powerpc/pmu/ebb/pmae_handling_test.c
index 986500fd2131..c5fa64790c22 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/pmae_handling_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/pmae_handling_test.c
@@ -58,6 +58,8 @@ static int test_body(void)
58{ 58{
59 struct event event; 59 struct event event;
60 60
61 SKIP_IF(!ebb_is_supported());
62
61 event_init_named(&event, 0x1001e, "cycles"); 63 event_init_named(&event, 0x1001e, "cycles");
62 event_leader_ebb_init(&event); 64 event_leader_ebb_init(&event);
63 65
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c b/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c
index a503fa70c950..c22860ab9733 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/pmc56_overflow_test.c
@@ -49,6 +49,8 @@ int pmc56_overflow(void)
49{ 49{
50 struct event event; 50 struct event event;
51 51
52 SKIP_IF(!ebb_is_supported());
53
52 /* Use PMC2 so we set PMCjCE, which enables PMC5/6 */ 54 /* Use PMC2 so we set PMCjCE, which enables PMC5/6 */
53 event_init(&event, 0x2001e); 55 event_init(&event, 0x2001e);
54 event_leader_ebb_init(&event); 56 event_leader_ebb_init(&event);
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c b/tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c
index 0cae66f659a3..5b1188f10c15 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/reg_access_test.c
@@ -18,6 +18,8 @@ int reg_access(void)
18{ 18{
19 uint64_t val, expected; 19 uint64_t val, expected;
20 20
21 SKIP_IF(!ebb_is_supported());
22
21 expected = 0x8000000100000000ull; 23 expected = 0x8000000100000000ull;
22 mtspr(SPRN_BESCR, expected); 24 mtspr(SPRN_BESCR, expected);
23 val = mfspr(SPRN_BESCR); 25 val = mfspr(SPRN_BESCR);
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c b/tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c
index d56607e4ffab..1846f4e84635 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/task_event_pinned_vs_ebb_test.c
@@ -42,6 +42,8 @@ int task_event_pinned_vs_ebb(void)
42 pid_t pid; 42 pid_t pid;
43 int rc; 43 int rc;
44 44
45 SKIP_IF(!ebb_is_supported());
46
45 FAIL_IF(pipe(read_pipe.fds) == -1); 47 FAIL_IF(pipe(read_pipe.fds) == -1);
46 FAIL_IF(pipe(write_pipe.fds) == -1); 48 FAIL_IF(pipe(write_pipe.fds) == -1);
47 49
diff --git a/tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c b/tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c
index eba32196dbbf..e3bc6e92a6a5 100644
--- a/tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c
+++ b/tools/testing/selftests/powerpc/pmu/ebb/task_event_vs_ebb_test.c
@@ -40,6 +40,8 @@ int task_event_vs_ebb(void)
40 pid_t pid; 40 pid_t pid;
41 int rc; 41 int rc;
42 42
43 SKIP_IF(!ebb_is_supported());
44
43 FAIL_IF(pipe(read_pipe.fds) == -1); 45 FAIL_IF(pipe(read_pipe.fds) == -1);
44 FAIL_IF(pipe(write_pipe.fds) == -1); 46 FAIL_IF(pipe(write_pipe.fds) == -1);
45 47
diff --git a/tools/testing/selftests/powerpc/syscalls/.gitignore b/tools/testing/selftests/powerpc/syscalls/.gitignore
new file mode 100644
index 000000000000..f0f3fcc9d802
--- /dev/null
+++ b/tools/testing/selftests/powerpc/syscalls/.gitignore
@@ -0,0 +1 @@
ipc_unmuxed
diff --git a/tools/testing/selftests/powerpc/syscalls/Makefile b/tools/testing/selftests/powerpc/syscalls/Makefile
new file mode 100644
index 000000000000..b35c7945bec5
--- /dev/null
+++ b/tools/testing/selftests/powerpc/syscalls/Makefile
@@ -0,0 +1,12 @@
1TEST_PROGS := ipc_unmuxed
2
3CFLAGS += -I../../../../../usr/include
4
5all: $(TEST_PROGS)
6
7$(TEST_PROGS): ../harness.c
8
9include ../../lib.mk
10
11clean:
12 rm -f $(TEST_PROGS) *.o
diff --git a/tools/testing/selftests/powerpc/syscalls/ipc.h b/tools/testing/selftests/powerpc/syscalls/ipc.h
new file mode 100644
index 000000000000..fbebc022edf6
--- /dev/null
+++ b/tools/testing/selftests/powerpc/syscalls/ipc.h
@@ -0,0 +1,47 @@
1#ifdef __NR_semop
2DO_TEST(semop, __NR_semop)
3#endif
4
5#ifdef __NR_semget
6DO_TEST(semget, __NR_semget)
7#endif
8
9#ifdef __NR_semctl
10DO_TEST(semctl, __NR_semctl)
11#endif
12
13#ifdef __NR_semtimedop
14DO_TEST(semtimedop, __NR_semtimedop)
15#endif
16
17#ifdef __NR_msgsnd
18DO_TEST(msgsnd, __NR_msgsnd)
19#endif
20
21#ifdef __NR_msgrcv
22DO_TEST(msgrcv, __NR_msgrcv)
23#endif
24
25#ifdef __NR_msgget
26DO_TEST(msgget, __NR_msgget)
27#endif
28
29#ifdef __NR_msgctl
30DO_TEST(msgctl, __NR_msgctl)
31#endif
32
33#ifdef __NR_shmat
34DO_TEST(shmat, __NR_shmat)
35#endif
36
37#ifdef __NR_shmdt
38DO_TEST(shmdt, __NR_shmdt)
39#endif
40
41#ifdef __NR_shmget
42DO_TEST(shmget, __NR_shmget)
43#endif
44
45#ifdef __NR_shmctl
46DO_TEST(shmctl, __NR_shmctl)
47#endif
diff --git a/tools/testing/selftests/powerpc/syscalls/ipc_unmuxed.c b/tools/testing/selftests/powerpc/syscalls/ipc_unmuxed.c
new file mode 100644
index 000000000000..2ac02706f8c8
--- /dev/null
+++ b/tools/testing/selftests/powerpc/syscalls/ipc_unmuxed.c
@@ -0,0 +1,61 @@
1/*
2 * Copyright 2015, Michael Ellerman, IBM Corp.
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
8 *
9 * This test simply tests that certain syscalls are implemented. It doesn't
10 * actually exercise their logic in any way.
11 */
12
13#define _GNU_SOURCE
14#include <errno.h>
15#include <stdio.h>
16#include <unistd.h>
17#include <sys/syscall.h>
18
19#include "utils.h"
20
21
22#define DO_TEST(_name, _num) \
23static int test_##_name(void) \
24{ \
25 int rc; \
26 printf("Testing " #_name); \
27 errno = 0; \
28 rc = syscall(_num, -1, 0, 0, 0, 0, 0); \
29 printf("\treturned %d, errno %d\n", rc, errno); \
30 return errno == ENOSYS; \
31}
32
33#include "ipc.h"
34#undef DO_TEST
35
36static int ipc_unmuxed(void)
37{
38 int tests_done = 0;
39
40#define DO_TEST(_name, _num) \
41 FAIL_IF(test_##_name()); \
42 tests_done++;
43
44#include "ipc.h"
45#undef DO_TEST
46
47 /*
48 * If we ran no tests then it means none of the syscall numbers were
49 * defined, possibly because we were built against old headers. But it
50 * means we didn't really test anything, so instead of passing mark it
51 * as a skip to give the user a clue.
52 */
53 SKIP_IF(tests_done == 0);
54
55 return 0;
56}
57
58int main(void)
59{
60 return test_harness(ipc_unmuxed, "ipc_unmuxed");
61}
diff --git a/tools/testing/selftests/powerpc/tm/tm-syscall.c b/tools/testing/selftests/powerpc/tm/tm-syscall.c
index 1276e23da63b..e835bf7ec7ae 100644
--- a/tools/testing/selftests/powerpc/tm/tm-syscall.c
+++ b/tools/testing/selftests/powerpc/tm/tm-syscall.c
@@ -77,13 +77,23 @@ pid_t getppid_tm(bool suspend)
77 exit(-1); 77 exit(-1);
78} 78}
79 79
80static inline bool have_htm_nosc(void)
81{
82#ifdef PPC_FEATURE2_HTM_NOSC
83 return ((long)get_auxv_entry(AT_HWCAP2) & PPC_FEATURE2_HTM_NOSC);
84#else
85 printf("PPC_FEATURE2_HTM_NOSC not defined, can't check AT_HWCAP2\n");
86 return false;
87#endif
88}
89
80int tm_syscall(void) 90int tm_syscall(void)
81{ 91{
82 unsigned count = 0; 92 unsigned count = 0;
83 struct timeval end, now; 93 struct timeval end, now;
84 94
85 SKIP_IF(!((long)get_auxv_entry(AT_HWCAP2) 95 SKIP_IF(!have_htm_nosc());
86 & PPC_FEATURE2_HTM_NOSC)); 96
87 setbuf(stdout, NULL); 97 setbuf(stdout, NULL);
88 98
89 printf("Testing transactional syscalls for %d seconds...\n", TEST_DURATION); 99 printf("Testing transactional syscalls for %d seconds...\n", TEST_DURATION);