Commit c5aec4c7 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc

Pull powerpc updates from Ben Herrenschmidt:
 "Here is the bulk of the powerpc changes for this merge window.  It got
  a bit delayed in part because I wasn't paying attention, and in part
  because I discovered I had a core PCI change without a PCI maintainer
  ack in it.  Bjorn eventually agreed it was ok to merge it though we'll
  probably improve it later and I didn't want to rebase to add his ack.

  There is going to be a bit more next week, essentially fixes that I
  still want to sort through and test.

  The biggest item this time is the support to build the ppc64 LE kernel
  with our new v2 ABI.  We previously supported v2 userspace but the
  kernel itself was a tougher nut to crack.  This is now sorted mostly
  thanks to Anton and Rusty.

  We also have a fairly big series from Cedric that add support for
  64-bit LE zImage boot wrapper.  This was made harder by the fact that
  traditionally our zImage wrapper was always 32-bit, but our new LE
  toolchains don't really support 32-bit anymore (it's somewhat there
  but not really "supported") so we didn't want to rely on it.  This
  meant more churn that just endian fixes.

  This brings some more LE bits as well, such as the ability to run in
  LE mode without a hypervisor (ie. under OPAL firmware) by doing the
  right OPAL call to reinitialize the CPU to take HV interrupts in the
  right mode and the usual pile of endian fixes.

  There's another series from Gavin adding EEH improvements (one day we
  *will* have a release with less than 20 EEH patches, I promise!).

  Another highlight is the support for the "Split core" functionality on
  P8 by Michael.  This allows a P8 core to be split into "sub cores" of
  4 threads which allows the subcores to run different guests under KVM
  (the HW still doesn't support a partition per thread).

  And then the usual misc bits and fixes ..."

[ Further delayed by gmail deciding that BenH is a dirty spammer.
  Google knows.  ]

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (155 commits)
  powerpc/powernv: Add missing include to LPC code
  selftests/powerpc: Test the THP bug we fixed in the previous commit
  powerpc/mm: Check paca psize is up to date for huge mappings
  powerpc/powernv: Pass buffer size to OPAL validate flash call
  powerpc/pseries: hcall functions are exported to modules, need _GLOBAL_TOC()
  powerpc: Exported functions __clear_user and copy_page use r2 so need _GLOBAL_TOC()
  powerpc/powernv: Set memory_block_size_bytes to 256MB
  powerpc: Allow ppc_md platform hook to override memory_block_size_bytes
  powerpc/powernv: Fix endian issues in memory error handling code
  powerpc/eeh: Skip eeh sysfs when eeh is disabled
  powerpc: 64bit sendfile is capped at 2GB
  powerpc/powernv: Provide debugfs access to the LPC bus via OPAL
  powerpc/serial: Use saner flags when creating legacy ports
  powerpc: Add cpu family documentation
  powerpc/xmon: Fix up xmon format strings
  powerpc/powernv: Add calls to support little endian host
  powerpc: Document sysfs DSCR interface
  powerpc: Fix regression of per-CPU DSCR setting
  powerpc: Split __SYSFS_SPRSETUP macro
  arch: powerpc/fadump: Cleaning up inconsistent NULL checks
  ...
parents 2937f5ef 0c0a3e5a
What: /sys/devices/system/cpu/dscr_default
Date: 13-May-2014
KernelVersion: v3.15.0
Contact:
Description: Writes are equivalent to writing to
/sys/devices/system/cpu/cpuN/dscr on all CPUs.
Reads return the last written value or 0.
This value is not a global default: it is a way to set
all per-CPU defaults at the same time.
Values: 64 bit unsigned integer (bit field)
What: /sys/devices/system/cpu/cpu[0-9]+/dscr
Date: 13-May-2014
KernelVersion: v3.15.0
Contact:
Description: Default value for the Data Stream Control Register (DSCR) on
a CPU.
This default value is used when the kernel is executing and
for any process that has not set the DSCR itself.
If a process ever sets the DSCR (via direct access to the
SPR) that value will be persisted for that process and used
on any CPU where it executes (overriding the value described
here).
If set by a process it will be inherited by child processes.
Values: 64 bit unsigned integer (bit field)
...@@ -7,6 +7,14 @@ which can then be passed to a variety of internal logic, including ...@@ -7,6 +7,14 @@ which can then be passed to a variety of internal logic, including
cores and peripheral IP blocks. cores and peripheral IP blocks.
Please refer to the Reference Manual for details. Please refer to the Reference Manual for details.
All references to "1.0" and "2.0" refer to the QorIQ chassis version to
which the chip complies.
Chassis Version Example Chips
--------------- -------------
1.0 p4080, p5020, p5040
2.0 t4240, b4860, t1040
1. Clock Block Binding 1. Clock Block Binding
Required properties: Required properties:
...@@ -85,7 +93,7 @@ Example for clock block and clock provider: ...@@ -85,7 +93,7 @@ Example for clock block and clock provider:
#clock-cells = <0>; #clock-cells = <0>;
compatible = "fsl,qoriq-sysclk-1.0"; compatible = "fsl,qoriq-sysclk-1.0";
clock-output-names = "sysclk"; clock-output-names = "sysclk";
} };
pll0: pll0@800 { pll0: pll0@800 {
#clock-cells = <1>; #clock-cells = <1>;
......
KEYMILE bfticu Chassis Management FPGA
The bfticu is a multifunction device that manages the whole chassis.
Its main functionality is to collect IRQs from the whole chassis and signals
them to a single controller.
Required properties:
- compatible: "keymile,bfticu"
- interrupt-controller: the bfticu FPGA is an interrupt controller
- interrupts: the main IRQ line to signal the collected IRQs
- #interrupt-cells : is 2 and their usage is compliant to the 2 cells variant
of Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
- interrupt-parent: the parent IRQ ctrl the main IRQ is connected to
- reg: access on the parent local bus (chip select, offset in chip select, size)
Example:
chassis-mgmt@3,0 {
compatible = "keymile,bfticu";
interrupt-controller;
#interrupt-cells = <2>;
reg = <3 0 0x100>;
interrupt-parent = <&mpic>;
interrupts = <6 1 0 0>;
};
KEYMILE qrio Board Control CPLD
The qrio is a multifunction device that controls the KEYMILE boards based on
the kmp204x design.
It is consists of a reset controller, watchdog timer, LEDs, and 2 IRQ capable
GPIO blocks.
Required properties:
- compatible: "keymile,qriox"
- reg: access on the parent local bus (chip select, offset in chip select, size)
Example:
board-control@1,0 {
compatible = "keymile,qriox";
reg = <1 0 0x80>;
};
IBM Akebono board device tree
=============================
The IBM Akebono board is a development board for the PPC476GTR SoC.
0) The root node
Required properties:
- model : "ibm,akebono".
- compatible : "ibm,akebono" , "ibm,476gtr".
1.a) The Secure Digital Host Controller Interface (SDHCI) node
Represent the Secure Digital Host Controller Interfaces.
Required properties:
- compatible : should be "ibm,476gtr-sdhci","generic-sdhci".
- reg : should contain the SDHCI registers location and length.
- interrupt-parent : a phandle for the interrupt controller.
- interrupts : should contain the SDHCI interrupt.
1.b) The Advanced Host Controller Interface (AHCI) SATA node
Represents the advanced host controller SATA interface.
Required properties:
- compatible : should be "ibm,476gtr-ahci".
- reg : should contain the AHCI registers location and length.
- interrupt-parent : a phandle for the interrupt controller.
- interrupts : should contain the AHCI interrupt.
1.c) The FPGA node
The Akebono board stores some board information such as the revision
number in an FPGA which is represented by this node.
Required properties:
- compatible : should be "ibm,akebono-fpga".
- reg : should contain the FPGA registers location and length.
1.d) The AVR node
The Akebono board has an Atmel AVR microprocessor attached to the I2C
bus as a power controller for the board.
Required properties:
- compatible : should be "ibm,akebono-avr".
- reg : should contain the I2C bus address for the AVR.
ppc476gtr High Speed Serial Assist (HSTA) node
==============================================
The 476gtr SoC contains a high speed serial assist module attached
between the plb4 and plb6 system buses to provide high speed data
transfer between memory and system peripherals as well as support for
PCI message signalled interrupts.
Currently only the MSI support is used by Linux using the following
device tree entries:
Require properties:
- compatible : "ibm,476gtr-hsta-msi", "ibm,hsta-msi"
- reg : register mapping for the HSTA MSI space
- interrupt-parent : parent controller for mapping interrupts
- interrupts : ordered interrupt mapping for each MSI in the register
space. The first interrupt should be associated with a
register offset of 0x00, the second to 0x10, etc.
...@@ -67,3 +67,20 @@ Example: ...@@ -67,3 +67,20 @@ Example:
gpio-controller; gpio-controller;
}; };
}; };
* Freescale on-board FPGA connected on I2C bus
Some Freescale boards like BSC9132QDS have on board FPGA connected on
the i2c bus.
Required properties:
- compatible: Should be a board-specific string followed by a string
indicating the type of FPGA. Example:
"fsl,<board>-fpga", "fsl,fpga-qixis-i2c"
- reg: Should contain the address of the FPGA
Example:
fpga: fpga@66 {
compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c";
reg = <0x66>;
};
Freescale CoreNet Coherency Fabric(CCF) Device Tree Binding
DESCRIPTION
The CoreNet coherency fabric is a fabric-oriented, connectivity infrastructure
that enables the implementation of coherent, multicore systems.
Required properties:
- compatible: <string list>
fsl,corenet1-cf - CoreNet coherency fabric version 1.
Example chips: T4240, B4860
fsl,corenet2-cf - CoreNet coherency fabric version 2.
Example chips: P5040, P5020, P4080, P3041, P2041
fsl,corenet-cf - Used to represent the common registers
between CCF version 1 and CCF version 2. This compatible
is retained for compatibility reasons, as it was already
used for both CCF version 1 chips and CCF version 2
chips. It should be specified after either
"fsl,corenet1-cf" or "fsl,corenet2-cf".
- reg: <prop-encoded-array>
A standard property. Represents the CCF registers.
- interrupts: <prop-encoded-array>
Interrupt mapping for CCF error interrupt.
- fsl,ccf-num-csdids: <u32>
Specifies the number of Coherency Subdomain ID Port Mapping
Registers that are supported by the CCF.
- fsl,ccf-num-snoopids: <u32>
Specifies the number of Snoop ID Port Mapping Registers that
are supported by CCF.
Example:
corenet-cf@18000 {
compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>;
fsl,ccf-num-snoopids = <32>;
};
...@@ -20,3 +20,14 @@ PROPERTIES ...@@ -20,3 +20,14 @@ PROPERTIES
a property named fsl,eref-[CAT], where [CAT] is the abbreviated category a property named fsl,eref-[CAT], where [CAT] is the abbreviated category
name with all uppercase letters converted to lowercase, indicates that name with all uppercase letters converted to lowercase, indicates that
the category is supported by the implementation. the category is supported by the implementation.
- fsl,portid-mapping
Usage: optional
Value type: <u32>
Definition: The Coherency Subdomain ID Port Mapping Registers and
Snoop ID Port Mapping registers, which are part of the CoreNet
Coherency fabric (CCF), provide a CoreNet Coherency Subdomain
ID/CoreNet Snoop ID to cpu mapping functions. Certain bits from
these registers should be set if the coresponding CPU should be
snooped. This property defines a bitmask which selects the bit
that should be set if this cpu should be snooped.
...@@ -34,6 +34,15 @@ Optional properties: ...@@ -34,6 +34,15 @@ Optional properties:
for legacy drivers. for legacy drivers.
- interrupt-parent : <phandle> - interrupt-parent : <phandle>
Phandle to interrupt controller Phandle to interrupt controller
- fsl,portid-mapping : <u32>
The Coherency Subdomain ID Port Mapping Registers and
Snoop ID Port Mapping registers, which are part of the
CoreNet Coherency fabric (CCF), provide a CoreNet
Coherency Subdomain ID/CoreNet Snoop ID to pamu mapping
functions. Certain bits from these registers should be
set if PAMUs should be snooped. This property defines
a bitmask which selects the bits that should be set if
PAMUs should be snooped.
Child nodes: Child nodes:
...@@ -88,6 +97,7 @@ Example: ...@@ -88,6 +97,7 @@ Example:
compatible = "fsl,pamu-v1.0", "fsl,pamu"; compatible = "fsl,pamu-v1.0", "fsl,pamu";
reg = <0x20000 0x5000>; reg = <0x20000 0x5000>;
ranges = <0 0x20000 0x5000>; ranges = <0 0x20000 0x5000>;
fsl,portid-mapping = <0xf80000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
interrupts = < interrupts = <
......
...@@ -142,3 +142,4 @@ wm Wondermedia Technologies, Inc. ...@@ -142,3 +142,4 @@ wm Wondermedia Technologies, Inc.
xes Extreme Engineering Solutions (X-ES) xes Extreme Engineering Solutions (X-ES)
xlnx Xilinx xlnx Xilinx
zyxel ZyXEL Communications Corp. zyxel ZyXEL Communications Corp.
zarlink Zarlink Semiconductor
CPU Families
============
This document tries to summarise some of the different cpu families that exist
and are supported by arch/powerpc.
Book3S (aka sPAPR)
------------------
- Hash MMU
- Mix of 32 & 64 bit
+--------------+ +----------------+
| Old POWER | --------------> | RS64 (threads) |
+--------------+ +----------------+
|
|
v
+--------------+ +----------------+ +------+
| 601 | --------------> | 603 | ---> | e300 |
+--------------+ +----------------+ +------+
| |
| |
v v
+--------------+ +----------------+ +-------+
| 604 | | 750 (G3) | ---> | 750CX |
+--------------+ +----------------+ +-------+
| | |
| | |
v v v
+--------------+ +----------------+ +-------+
| 620 (64 bit) | | 7400 | | 750CL |
+--------------+ +----------------+ +-------+
| | |
| | |
v v v
+--------------+ +----------------+ +-------+
| POWER3/630 | | 7410 | | 750FX |
+--------------+ +----------------+ +-------+
| |
| |
v v
+--------------+ +----------------+
| POWER3+ | | 7450 |
+--------------+ +----------------+
| |
| |
v v
+--------------+ +----------------+
| POWER4 | | 7455 |
+--------------+ +----------------+
| |
| |
v v
+--------------+ +-------+ +----------------+
| POWER4+ | --> | 970 | | 7447 |
+--------------+ +-------+ +----------------+
| | |
| | |
v v v
+--------------+ +-------+ +----------------+
| POWER5 | | 970FX | | 7448 |
+--------------+ +-------+ +----------------+
| | |
| | |
v v v
+--------------+ +-------+ +----------------+
| POWER5+ | | 970MP | | e600 |
+--------------+ +-------+ +----------------+
|
|
v
+--------------+
| POWER5++ |
+--------------+
|
|
v
+--------------+ +-------+
| POWER6 | <-?-> | Cell |
+--------------+ +-------+
|
|
v
+--------------+
| POWER7 |
+--------------+
|
|
v
+--------------+
| POWER7+ |
+--------------+
|
|
v
+--------------+
| POWER8 |
+--------------+
+---------------+
| PA6T (64 bit) |
+---------------+
IBM BookE
---------
- Software loaded TLB.
- All 32 bit
+--------------+
| 401 |
+--------------+
|
|
v
+--------------+
| 403 |
+--------------+
|
|
v
+--------------+
| 405 |
+--------------+
|
|
v
+--------------+
| 440 |
+--------------+
|
|
v
+--------------+ +----------------+
| 450 | --> | BG/P |
+--------------+ +----------------+
|
|
v
+--------------+
| 460 |
+--------------+
|
|
v
+--------------+
| 476 |
+--------------+
Motorola/Freescale 8xx
----------------------
- Software loaded with hardware assist.
- All 32 bit
+-------------+
| MPC8xx Core |
+-------------+
Freescale BookE
---------------
- Software loaded TLB.
- e6500 adds HW loaded indirect TLB entries.
- Mix of 32 & 64 bit
+--------------+
| e200 |
+--------------+
+--------------------------------+
| e500 |
+--------------------------------+
|
|
v
+--------------------------------+
| e500v2 |
+--------------------------------+
|
|
v
+--------------------------------+
| e500mc (Book3e) |
+--------------------------------+
|
|
v
+--------------------------------+
| e5500 (64 bit) |
+--------------------------------+
|
|
v
+--------------------------------+
| e6500 (HW TLB) (Multithreaded) |
+--------------------------------+
IBM A2 core
-----------
- Book3E, software loaded TLB + HW loaded indirect TLB entries.
- 64 bit
+--------------+ +----------------+
| A2 core | --> | WSP |
+--------------+ +----------------+
|
|
v
+--------------+
| BG/Q |
+--------------+
...@@ -453,6 +453,14 @@ config NODES_SHIFT ...@@ -453,6 +453,14 @@ config NODES_SHIFT
default "4" default "4"
depends on NEED_MULTIPLE_NODES depends on NEED_MULTIPLE_NODES
config USE_PERCPU_NUMA_NODE_ID
def_bool y
depends on NUMA
config HAVE_MEMORYLESS_NODES
def_bool y
depends on NUMA
config ARCH_SELECT_MEMORY_MODEL config ARCH_SELECT_MEMORY_MODEL
def_bool y def_bool y
depends on PPC64 depends on PPC64
......
...@@ -113,8 +113,13 @@ else ...@@ -113,8 +113,13 @@ else
endif endif
endif endif
CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc CFLAGS-$(CONFIG_PPC64) := -mtraceback=no
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2,-mcall-aixdesc)
AFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv2)
else
CFLAGS-$(CONFIG_PPC64) += -mcall-aixdesc
endif
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc)
CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions)
CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
...@@ -153,7 +158,7 @@ CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell) ...@@ -153,7 +158,7 @@ CFLAGS-$(CONFIG_TUNE_CELL) += $(call cc-option,-mtune=cell)
asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1) asinstr := $(call as-instr,lis 9$(comma)foo@high,-DHAVE_AS_ATHIGH=1)
KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr) KBUILD_CPPFLAGS += -Iarch/$(ARCH) $(asinstr)
KBUILD_AFLAGS += -Iarch/$(ARCH) KBUILD_AFLAGS += -Iarch/$(ARCH) $(AFLAGS-y)
KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y) KBUILD_CFLAGS += -msoft-float -pipe -Iarch/$(ARCH) $(CFLAGS-y)
CPP = $(CC) -E $(KBUILD_CFLAGS) CPP = $(CC) -E $(KBUILD_CFLAGS)
...@@ -161,6 +166,11 @@ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE) ...@@ -161,6 +166,11 @@ CHECKFLAGS += -m$(CONFIG_WORD_SIZE) -D__powerpc__ -D__powerpc$(CONFIG_WORD_SIZE)
KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o KBUILD_LDFLAGS_MODULE += arch/powerpc/lib/crtsavres.o
ifeq ($(CONFIG_476FPE_ERR46),y)
KBUILD_LDFLAGS_MODULE += --ppc476-workaround \
-T $(srctree)/arch/powerpc/platforms/44x/ppc476_modules.lds
endif
# No AltiVec or VSX instructions when building kernel # No AltiVec or VSX instructions when building kernel
KBUILD_CFLAGS += $(call cc-option,-mno-altivec) KBUILD_CFLAGS += $(call cc-option,-mno-altivec)
KBUILD_CFLAGS += $(call cc-option,-mno-vsx) KBUILD_CFLAGS += $(call cc-option,-mno-vsx)
......
...@@ -22,8 +22,14 @@ all: $(obj)/zImage ...@@ -22,8 +22,14 @@ all: $(obj)/zImage
BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \ BOOTCFLAGS := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-fno-strict-aliasing -Os -msoft-float -pipe \ -fno-strict-aliasing -Os -msoft-float -pipe \
-fomit-frame-pointer -fno-builtin -fPIC -nostdinc \ -fomit-frame-pointer -fno-builtin -fPIC -nostdinc \
-isystem $(shell $(CROSS32CC) -print-file-name=include) \ -isystem $(shell $(CROSS32CC) -print-file-name=include)
-mbig-endian ifdef CONFIG_PPC64_BOOT_WRAPPER
BOOTCFLAGS += -m64
endif
ifdef CONFIG_CPU_BIG_ENDIAN
BOOTCFLAGS += -mbig-endian
endif
BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc BOOTAFLAGS := -D__ASSEMBLY__ $(BOOTCFLAGS) -traditional -nostdinc
ifdef CONFIG_DEBUG_INFO ifdef CONFIG_DEBUG_INFO
...@@ -47,6 +53,7 @@ $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405 ...@@ -47,6 +53,7 @@ $(obj)/cuboot-acadia.o: BOOTCFLAGS += -mcpu=405
$(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-walnut.o: BOOTCFLAGS += -mcpu=405
$(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-iss4xx.o: BOOTCFLAGS += -mcpu=405
$(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405 $(obj)/treeboot-currituck.o: BOOTCFLAGS += -mcpu=405
$(obj)/treeboot-akebono.o: BOOTCFLAGS += -mcpu=405
$(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405 $(obj)/virtex405-head.o: BOOTAFLAGS += -mcpu=405
...@@ -86,6 +93,7 @@ src-plat-$(CONFIG_44x) += treeboot-ebony.c cuboot-ebony.c treeboot-bamboo.c \ ...@@ -86,6 +93,7 @@ src-plat-$(CONFIG_44x) += treeboot-ebony.c cuboot-ebony.c treeboot-bamboo.c \
cuboot-taishan.c cuboot-katmai.c \ cuboot-taishan.c cuboot-katmai.c \
cuboot-warp.c cuboot-yosemite.c \ cuboot-warp.c cuboot-yosemite.c \
treeboot-iss4xx.c treeboot-currituck.c \ treeboot-iss4xx.c treeboot-currituck.c \
treeboot-akebono.c \
simpleboot.c fixed-head.S virtex.c simpleboot.c fixed-head.S virtex.c
src-plat-$(CONFIG_8xx) += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c src-plat-$(CONFIG_8xx) += cuboot-8xx.c fixed-head.S ep88xc.c redboot-8xx.c
src-plat-$(CONFIG_PPC_MPC52xx) += cuboot-52xx.c src-plat-$(CONFIG_PPC_MPC52xx) += cuboot-52xx.c
...@@ -99,6 +107,11 @@ src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \ ...@@ -99,6 +107,11 @@ src-plat-$(CONFIG_EMBEDDED6xx) += cuboot-pq2.c cuboot-mpc7448hpc2.c \
src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c src-plat-$(CONFIG_AMIGAONE) += cuboot-amigaone.c
src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c src-plat-$(CONFIG_PPC_PS3) += ps3-head.S ps3-hvcall.S ps3.c
src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c epapr-wrapper.c src-plat-$(CONFIG_EPAPR_BOOT) += epapr.c epapr-wrapper.c
src-plat-$(CONFIG_PPC_PSERIES) += pseries-head.S
src-plat-$(CONFIG_PPC_POWERNV) += pseries-head.S
src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) += pseries-head.S
src-plat-$(CONFIG_PPC_CELLEB) += pseries-head.S
src-plat-$(CONFIG_PPC_CELL_QPACE) += pseries-head.S
src-wlib := $(sort $(src-wlib-y)) src-wlib := $(sort $(src-wlib-y))
src-plat := $(sort $(src-plat-y)) src-plat := $(sort $(src-plat-y))
...@@ -137,7 +150,11 @@ $(addprefix $(obj)/,$(libfdt) $(libfdtheader)): $(obj)/%: $(srctree)/scripts/dtc ...@@ -137,7 +150,11 @@ $(addprefix $(obj)/,$(libfdt) $(libfdtheader)): $(obj)/%: $(srctree)/scripts/dtc
$(obj)/empty.c: $(obj)/empty.c:
@touch $@ @touch $@
$(obj)/zImage.lds $(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds: $(obj)/%: $(srctree)/$(src)/%.S $(obj)/zImage.lds: $(obj)/%: $(srctree)/$(src)/%.S
$(CROSS32CC) $(cpp_flags) -E -Wp,-MD,$(depfile) -P -Upowerpc \
-D__ASSEMBLY__ -DLINKER_SCRIPT -o $@ $<
$(obj)/zImage.coff.lds $(obj)/zImage.ps3.lds : $(obj)/%: $(srctree)/$(src)/%.S
@cp $< $@ @cp $< $@
clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \ clean-files := $(zlib) $(zlibheader) $(zliblinuxheader) \
...@@ -235,6 +252,7 @@ image-$(CONFIG_YOSEMITE) += cuImage.yosemite ...@@ -235,6 +252,7 @@ image-$(CONFIG_YOSEMITE) += cuImage.yosemite
image-$(CONFIG_ISS4xx) += treeImage.iss4xx \ image-$(CONFIG_ISS4xx) += treeImage.iss4xx \
treeImage.iss4xx-mpic treeImage.iss4xx-mpic
image-$(CONFIG_CURRITUCK) += treeImage.currituck image-$(CONFIG_CURRITUCK) += treeImage.currituck
image-$(CONFIG_AKEBONO) += treeImage.akebono
# Board ports in arch/powerpc/platform/8xx/Kconfig # Board ports in arch/powerpc/platform/8xx/Kconfig
image-$(CONFIG_MPC86XADS) += cuImage.mpc866ads image-$(CONFIG_MPC86XADS) += cuImage.mpc866ads
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* *
* Copyright 2000 Paul Mackerras. * Copyright 2000 Paul Mackerras.
* *
* Adapted for 64 bit little endian images by Andrew Tauferner.
*
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
...@@ -55,36 +57,61 @@ unsigned int rpanote[N_RPA_DESCR] = { ...@@ -55,36 +57,61 @@ unsigned int rpanote[N_RPA_DESCR] = {
#define ROUNDUP(len) (((len) + 3) & ~3) #define ROUNDUP(len) (((len) + 3) & ~3)
unsigned char buf[512]; unsigned char buf[1024];
#define ELFDATA2LSB 1
#define ELFDATA2MSB 2
static int e_data = ELFDATA2MSB;
#define ELFCLASS32 1
#define ELFCLASS64 2
static int e_class = ELFCLASS32;
#define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1])) #define GET_16BE(off) ((buf[off] << 8) + (buf[(off)+1]))
#define GET_32BE(off) ((GET_16BE(off) << 16) + GET_16BE((off)+2)) #define GET_32BE(off) ((GET_16BE(off) << 16U) + GET_16BE((off)+2U))
#define GET_64BE(off) ((((unsigned long long)GET_32BE(off)) << 32ULL) + \
#define PUT_16BE(off, v) (buf[off] = ((v) >> 8) & 0xff, \ ((unsigned long long)GET_32BE((off)+4ULL)))
#define PUT_16BE(off, v)(buf[off] = ((v) >> 8) & 0xff, \
buf[(off) + 1] = (v) & 0xff) buf[(off) + 1] = (v) & 0xff)
#define PUT_32BE(off, v) (PUT_16BE((off), (v) >> 16), \ #define PUT_32BE(off, v)(PUT_16BE((off), (v) >> 16L), PUT_16BE((off) + 2, (v)))
PUT_16BE((off) + 2, (v))) #define PUT_64BE(off, v)((PUT_32BE((off), (v) >> 32L), \
PUT_32BE((off) + 4, (v))))
#define GET_16LE(off) ((buf[off]) + (buf[(off)+1] << 8))
#define GET_32LE(off) (GET_16LE(off) + (GET_16LE((off)+2U) << 16U))
#define GET_64LE(off) ((unsigned long long)GET_32LE(off) + \
(((unsigned long long)GET_32LE((off)+4ULL)) << 32ULL))
#define PUT_16LE(off, v) (buf[off] = (v) & 0xff, \
buf[(off) + 1] = ((v) >> 8) & 0xff)
#define PUT_32LE(off, v) (PUT_16LE((off), (v)), PUT_16LE((off) + 2, (v) >> 16L))
#define PUT_64LE(off, v) (PUT_32LE((off), (v)), PUT_32LE((off) + 4, (v) >> 32L))
#define GET_16(off) (e_data == ELFDATA2MSB ? GET_16BE(off) : GET_16LE(off))
#define GET_32(off) (e_data == ELFDATA2MSB ? GET_32BE(off) : GET_32LE(off))
#define GET_64(off) (e_data == ELFDATA2MSB ? GET_64BE(off) : GET_64LE(off))
#define PUT_16(off, v) (e_data == ELFDATA2MSB ? PUT_16BE(off, v) : \
PUT_16LE(off, v))
#define PUT_32(off, v) (e_data == ELFDATA2MSB ? PUT_32BE(off, v) : \
PUT_32LE(off, v))
#define PUT_64(off, v) (e_data == ELFDATA2MSB ? PUT_64BE(off, v) : \
PUT_64LE(off, v))
/* Structure of an ELF file */ /* Structure of an ELF file */
#define E_IDENT 0 /* ELF header */ #define E_IDENT 0 /* ELF header */
#define E_PHOFF 28 #define E_PHOFF (e_class == ELFCLASS32 ? 28 : 32)
#define E_PHENTSIZE 42 #define E_PHENTSIZE (e_class == ELFCLASS32 ? 42 : 54)
#define E_PHNUM 44 #define E_PHNUM (e_class == ELFCLASS32 ? 44 : 56)
#define E_HSIZE 52 /* size of ELF header */ #define E_HSIZE (e_class == ELFCLASS32 ? 52 : 64)
#define EI_MAGIC 0 /* offsets in E_IDENT area */ #define EI_MAGIC 0 /* offsets in E_IDENT area */
#define EI_CLASS 4 #define EI_CLASS 4
#define EI_DATA 5 #define EI_DATA 5
#define PH_TYPE 0 /* ELF program header */ #define PH_TYPE 0 /* ELF program header */
#define PH_OFFSET 4 #define PH_OFFSET (e_class == ELFCLASS32 ? 4 : 8)
#define PH_FILESZ 16 #define PH_FILESZ (e_class == ELFCLASS32 ? 16 : 32)
#define PH_HSIZE 32 /* size of program header */ #define PH_HSIZE (e_class == ELFCLASS32 ? 32 : 56)
#define PT_NOTE 4 /* Program header type = note */ #define PT_NOTE 4 /* Program header type = note */
#define ELFCLASS32 1
#define ELFDATA2MSB 2
unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' }; unsigned char elf_magic[4] = { 0x7f, 'E', 'L', 'F' };
...@@ -92,8 +119,8 @@ int ...@@ -92,8 +119,8 @@ int
main(int ac, char **av) main(int ac, char **av)
{ {
int fd, n, i; int fd, n, i;
int ph, ps, np; unsigned long ph, ps, np;
int nnote, nnote2, ns; long nnote, nnote2, ns;
if (ac != 2) { if (ac != 2) {
fprintf(stderr, "Usage: %s elf-file\n", av[0]); fprintf(stderr, "Usage: %s elf-file\n", av[0]);
...@@ -114,26 +141,27 @@ main(int ac, char **av) ...@@ -114,26 +141,27 @@ main(int ac, char **av)
exit(1); exit(1);
} }
if (n < E_HSIZE || memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0) if (memcmp(&buf[E_IDENT+EI_MAGIC], elf_magic, 4) != 0)
goto notelf;
e_class = buf[E_IDENT+EI_CLASS];
if (e_class != ELFCLASS32 && e_class != ELFCLASS64)
goto notelf;
e_data = buf[E_IDENT+EI_DATA];
if (e_data != ELFDATA2MSB && e_data != ELFDATA2LSB)
goto notelf;
if (n < E_HSIZE)
goto notelf; goto notelf;
if (buf[E_IDENT+EI_CLASS] != ELFCLASS32 ph = (e_class == ELFCLASS32 ? GET_32(E_PHOFF) : GET_64(E_PHOFF));
|| buf[E_IDENT+EI_DATA] != ELFDATA2MSB) { ps = GET_16(E_PHENTSIZE);
fprintf(stderr, "%s is not a big-endian 32-bit ELF image\n", np = GET_16(E_PHNUM);
av[1]);
exit(1);
}
ph = GET_32BE(E_PHOFF);
ps = GET_16BE(E_PHENTSIZE);
np = GET_16BE(E_PHNUM);
if (ph < E_HSIZE || ps < PH_HSIZE || np < 1) if (ph < E_HSIZE || ps < PH_HSIZE || np < 1)
goto notelf; goto notelf;
if (ph + (np + 2) * ps + nnote + nnote2 > n) if (ph + (np + 2) * ps + nnote + nnote2 > n)
goto nospace; goto nospace;
for (i = 0; i < np; ++i) { for (i = 0; i < np; ++i) {
if (GET_32BE(ph + PH_TYPE) == PT_NOTE) { if (GET_32(ph + PH_TYPE) == PT_NOTE) {
fprintf(stderr, "%s already has a note entry\n", fprintf(stderr, "%s already has a note entry\n",
av[1]); av[1]);
exit(0); exit(0);
...@@ -148,15 +176,22 @@ main(int ac, char **av) ...@@ -148,15 +176,22 @@ main(int ac, char **av)
/* fill in the program header entry */ /* fill in the program header entry */
ns = ph + 2 * ps; ns = ph + 2 * ps;
PUT_32BE(ph + PH_TYPE, PT_NOTE); PUT_32(ph + PH_TYPE, PT_NOTE);
PUT_32BE(ph + PH_OFFSET, ns); if (e_class == ELFCLASS32)
PUT_32BE(ph + PH_FILESZ, nnote); PUT_32(ph + PH_OFFSET, ns);
else
PUT_64(ph + PH_OFFSET, ns);
if (e_class == ELFCLASS32)
PUT_32(ph + PH_FILESZ, nnote);
else
PUT_64(ph + PH_FILESZ, nnote);
/* fill in the note area we point to */ /* fill in the note area we point to */
/* XXX we should probably make this a proper section */ /* XXX we should probably make this a proper section */
PUT_32BE(ns, strlen(arch) + 1); PUT_32(ns, strlen(arch) + 1);
PUT_32BE(ns + 4, N_DESCR * 4); PUT_32(ns + 4, N_DESCR * 4);
PUT_32BE(ns + 8, 0x1275); PUT_32(ns + 8, 0x1275);
strcpy((char *) &buf[ns + 12], arch); strcpy((char *) &buf[ns + 12], arch);
ns += 12 + strlen(arch) + 1; ns += 12 + strlen(arch) + 1;
for (i = 0; i < N_DESCR; ++i, ns += 4) for (i = 0; i < N_DESCR; ++i, ns += 4)
...@@ -164,21 +199,28 @@ main(int ac, char **av) ...@@ -164,21 +199,28 @@ main(int ac, char **av)
/* fill in the second program header entry and the RPA note area */ /* fill in the second program header entry and the RPA note area */
ph += ps; ph += ps;
PUT_32BE(ph + PH_TYPE, PT_NOTE); PUT_32(ph + PH_TYPE, PT_NOTE);
PUT_32BE(ph + PH_OFFSET, ns); if (e_class == ELFCLASS32)
PUT_32BE(ph + PH_FILESZ, nnote2); PUT_32(ph + PH_OFFSET, ns);
else
PUT_64(ph + PH_OFFSET, ns);
if (e_class == ELFCLASS32)
PUT_32(ph + PH_FILESZ, nnote);
else
PUT_64(ph + PH_FILESZ, nnote2);
/* fill in the note area we point to */ /* fill in the note area we point to */
PUT_32BE(ns, strlen(rpaname) + 1); PUT_32(ns, strlen(rpaname) + 1);
PUT_32BE(ns + 4, sizeof(rpanote)); PUT_32(ns + 4, sizeof(rpanote));
PUT_32BE(ns + 8, 0x12759999); PUT_32(ns + 8, 0x12759999);
strcpy((char *) &buf[ns + 12], rpaname); strcpy((char *) &buf[ns + 12], rpaname);
ns += 12 + ROUNDUP(strlen(rpaname) + 1); ns += 12 + ROUNDUP(strlen(rpaname) + 1);
for (i = 0; i < N_RPA_DESCR; ++i, ns += 4) for (i = 0; i < N_RPA_DESCR; ++i, ns += 4)
PUT_32BE(ns, rpanote[i]); PUT_32BE(ns, rpanote[i]);
/* Update the number of program headers */ /* Update the number of program headers */
PUT_16BE(E_PHNUM, np + 2); PUT_16(E_PHNUM, np + 2);
/* write back */ /* write back */
lseek(fd, (long) 0, SEEK_SET); lseek(fd, (long) 0, SEEK_SET);
......
/* /*
* Copyright (C) Paul Mackerras 1997. * Copyright (C) Paul Mackerras 1997.
* *
* Adapted for 64 bit LE PowerPC by Andrew Tauferner
*
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version * as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version. * 2 of the License, or (at your option) any later version.
* *
* NOTE: this code runs in 32 bit mode, is position-independent,
* and is packaged as ELF32.
*/ */
#include "ppc_asm.h" #include "ppc_asm.h"
RELA = 7
RELACOUNT = 0x6ffffff9
.text .text
/* A procedure descriptor used when booting this as a COFF file. /* A procedure descriptor used when booting this as a COFF file.
* When making COFF, this comes first in the link and we're * When making COFF, this comes first in the link and we're
...@@ -21,6 +24,20 @@ ...@@ -21,6 +24,20 @@
_zimage_start_opd: _zimage_start_opd:
.long 0x500000, 0, 0, 0 .long 0x500000, 0, 0, 0
#ifdef __powerpc64__
.balign 8
p_start: .llong _start
p_etext: .llong _etext
p_bss_start: .llong __bss_start
p_end: .llong _end
p_toc: .llong __toc_start + 0x8000 - p_base
p_dyn: .llong __dynamic_start - p_base
p_rela: .llong __rela_dyn_start - p_base
p_prom: .llong 0
.weak _platform_stack_top
p_pstack: .llong _platform_stack_top
#else
p_start: .long _start p_start: .long _start
p_etext: .long _etext p_etext: .long _etext
p_bss_start: .long __bss_start p_bss_start: .long __bss_start
...@@ -28,6 +45,7 @@ p_end: .long _end ...@@ -28,6 +45,7 @@ p_end: .long _end
.weak _platform_stack_top .weak _platform_stack_top
p_pstack: .long _platform_stack_top p_pstack: .long _platform_stack_top
#endif
.weak _zimage_start .weak _zimage_start
.globl _zimage_start .globl _zimage_start
...@@ -38,6 +56,7 @@ _zimage_start_lib: ...@@ -38,6 +56,7 @@ _zimage_start_lib:
and the address where we're running. */ and the address where we're running. */
bl .+4 bl .+4
p_base: mflr r10 /* r10 now points to runtime addr of p_base */ p_base: mflr r10 /* r10 now points to runtime addr of p_base */
#ifndef __powerpc64__
/* grab the link address of the dynamic section in r11 */ /* grab the link address of the dynamic section in r11 */
addis r11,r10,(_GLOBAL_OFFSET_TABLE_-p_base)@ha addis r11,r10,(_GLOBAL_OFFSET_TABLE_-p_base)@ha
lwz r11,(_GLOBAL_OFFSET_TABLE_-p_base)@l(r11) lwz r11,(_GLOBAL_OFFSET_TABLE_-p_base)@l(r11)
...@@ -51,8 +70,6 @@ p_base: mflr r10 /* r10 now points to runtime addr of p_base */ ...@@ -51,8 +70,6 @@ p_base: mflr r10 /* r10 now points to runtime addr of p_base */
/* The dynamic section contains a series of tagged entries. /* The dynamic section contains a series of tagged entries.
* We need the RELA and RELACOUNT entries. */ * We need the RELA and RELACOUNT entries. */
RELA = 7
RELACOUNT = 0x6ffffff9
li r9,0 li r9,0
li r0,0 li r0,0
9: lwz r8,0(r12) /* get tag */ 9: lwz r8,0(r12) /* get tag */
...@@ -120,9 +137,164 @@ RELACOUNT = 0x6ffffff9 ...@@ -120,9 +137,164 @@ RELACOUNT = 0x6ffffff9
li r0,0 li r0,0
stwu r0,-16(r1) /* establish a stack frame */ stwu r0,-16(r1) /* establish a stack frame */
6: 6:
#else /* __powerpc64__ */
/* Save the prom pointer at p_prom. */
std r5,(p_prom-p_base)(r10)
/* Set r2 to the TOC. */
ld r2,(p_toc-p_base)(r10)
add r2,r2,r10
/* Grab the link address of the dynamic section in r11. */
ld r11,-32768(r2)
cmpwi r11,0
beq 3f /* if not linked -pie then no dynamic section */
ld r11,(p_dyn-p_base)(r10)
add r11,r11,r10
ld r9,(p_rela-p_base)(r10)
add r9,r9,r10
li r7,0
li r8,0
9: ld r6,0(r11) /* get tag */
cmpdi r6,0
beq 12f /* end of list */
cmpdi r6,RELA
bne 10f
ld r7,8(r11) /* get RELA pointer in r7 */
b 11f
10: addis r6,r6,(-RELACOUNT)@ha
cmpdi r6,RELACOUNT@l
bne 11f
ld r8,8(r11) /* get RELACOUNT value in r8 */
11: addi r11,r11,16
b 9b
12:
cmpdi r7,0 /* check we have both RELA and RELACOUNT */
cmpdi cr1,r8,0
beq 3f
beq cr1,3f
/* Calcuate the runtime offset. */
subf r7,r7,r9
/* Run through the list of relocations and process the
* R_PPC64_RELATIVE ones. */
mtctr r8
13: ld r0,8(r9) /* ELF64_R_TYPE(reloc->r_info) */
cmpdi r0,22 /* R_PPC64_RELATIVE */
bne 3f
ld r6,0(r9) /* reloc->r_offset */
ld r0,16(r9) /* reloc->r_addend */
add r0,r0,r7
stdx r0,r7,r6
addi r9,r9,24
bdnz 13b
/* Do a cache flush for our text, in case the loader didn't */
3: ld r9,p_start-p_base(r10) /* note: these are relocated now */
ld r8,p_etext-p_base(r10)
4: dcbf r0,r9
icbi r0,r9
addi r9,r9,0x20
cmpld cr0,r9,r8
blt 4b
sync
isync
/* Clear the BSS */
ld r9,p_bss_start-p_base(r10)
ld r8,p_end-p_base(r10)
li r0,0
5: std r0,0(r9)
addi r9,r9,8
cmpld cr0,r9,r8
blt 5b
/* Possibly set up a custom stack */
ld r8,p_pstack-p_base(r10)
cmpdi r8,0
beq 6f
ld r1,0(r8)
li r0,0
stdu r0,-16(r1) /* establish a stack frame */
6:
#endif /* __powerpc64__ */
/* Call platform_init() */ /* Call platform_init() */
bl platform_init bl platform_init
/* Call start */ /* Call start */
b start b start
#ifdef __powerpc64__
#define PROM_FRAME_SIZE 512
#define SAVE_GPR(n, base) std n,8*(n)(base)
#define REST_GPR(n, base) ld n,8*(n)(base)
#define SAVE_2GPRS(n, base) SAVE_GPR(n, base); SAVE_GPR(n+1, base)
#define SAVE_4GPRS(n, base) SAVE_2GPRS(n, base); SAVE_2GPRS(n+2, base)
#define SAVE_8GPRS(n, base) SAVE_4GPRS(n, base); SAVE_4GPRS(n+4, base)
#define SAVE_10GPRS(n, base) SAVE_8GPRS(n, base); SAVE_2GPRS(n+8, base)
#define REST_2GPRS(n, base) REST_GPR(n, base); REST_GPR(n+1, base)
#define REST_4GPRS(n, base) REST_2GPRS(n, base); REST_2GPRS(n+2, base)
#define REST_8GPRS(n, base) REST_4GPRS(n, base); REST_4GPRS(n+4, base)
#define REST_10GPRS(n, base) REST_8GPRS(n, base); REST_2GPRS(n+8, base)
/* prom handles the jump into and return from firmware. The prom args pointer
is loaded in r3. */
.globl prom
prom:
mflr r0
std r0,16(r1)
stdu r1,-PROM_FRAME_SIZE(r1) /* Save SP and create stack space */
SAVE_GPR(2, r1)
SAVE_GPR(13, r1)
SAVE_8GPRS(14, r1)
SAVE_10GPRS(22, r1)
mfcr r10
std r10,8*32(r1)
mfmsr r10
std r10,8*33(r1)
/* remove MSR_LE from msr but keep MSR_SF */
mfmsr r10
rldicr r10,r10,0,62
mtsrr1 r10
/* Load FW address, set LR to label 1, and jump to FW */
bl 0f
0: mflr r10
addi r11,r10,(1f-0b)
mtlr r11
ld r10,(p_prom-0b)(r10)
mtsrr0 r10
rfid
1: /* Return from OF */
FIXUP_ENDIAN
/* Restore registers and return. */
rldicl r1,r1,0,32
/* Restore the MSR (back to 64 bits) */
ld r10,8*(33)(r1)
mtmsr r10
isync
/* Restore other registers */
REST_GPR(2, r1)
REST_GPR(13, r1)
REST_8GPRS(14, r1)
REST_10GPRS(22, r1)
ld r10,8*32(r1)
mtcr r10
addi r1,r1,PROM_FRAME_SIZE
ld r0,16(r1)
mtlr r0
blr
#endif
...@@ -15,6 +15,10 @@ ...@@ -15,6 +15,10 @@
asm volatile("mfdcrx %0,%1" : "=r"(rval) : "r"(rn)); \ asm volatile("mfdcrx %0,%1" : "=r"(rval) : "r"(rn)); \
rval; \ rval; \
}) })
#define mtdcrx(rn, val) \
({ \
asm volatile("mtdcrx %0,%1" : : "r"(rn), "r" (val)); \
})
/* 440GP/440GX SDRAM controller DCRs */ /* 440GP/440GX SDRAM controller DCRs */
#define DCRN_SDRAM0_CFGADDR 0x010 #define DCRN_SDRAM0_CFGADDR 0x010
......
This diff is collapsed.
...@@ -61,21 +61,25 @@ cpu0: PowerPC,e6500@0 { ...@@ -61,21 +61,25 @@ cpu0: PowerPC,e6500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0 1>; reg = <0 1>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
}; };
}; };
...@@ -157,7 +161,7 @@ cpc: l3-cache-controller@10000 { ...@@ -157,7 +161,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,b4-corenet-cf"; compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 0>; interrupts = <16 2 1 0>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -167,6 +171,7 @@ corenet-cf@18000 { ...@@ -167,6 +171,7 @@ corenet-cf@18000 {
iommu@20000 { iommu@20000 {
compatible = "fsl,pamu-v1.0", "fsl,pamu"; compatible = "fsl,pamu-v1.0", "fsl,pamu";
reg = <0x20000 0x4000>; reg = <0x20000 0x4000>;
fsl,portid-mapping = <0x8000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
interrupts = < interrupts = <
......
/*
* BSC9132 QDS Device Tree Source
*
* Copyright 2014 Freescale Semiconductor Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
/include/ "fsl/bsc9132si-pre.dtsi"
/ {
model = "fsl,bsc9132qds";
compatible = "fsl,bsc9132qds";
memory {
device_type = "memory";
};
ifc: ifc@ff71e000 {
/* NOR, NAND Flash on board */
ranges = <0x0 0x0 0x0 0x88000000 0x08000000
0x1 0x0 0x0 0xff800000 0x00010000>;
reg = <0x0 0xff71e000 0x0 0x2000>;
};
soc: soc@ff700000 {
ranges = <0x0 0x0 0xff700000 0x100000>;
};
};
/include/ "bsc9132qds.dtsi"
/include/ "fsl/bsc9132si-post.dtsi"
/*
* BSC9132 QDS Device Tree Source stub (no addresses or top-level ranges)
*
* Copyright 2014 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
&ifc {
nor@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x8000000>;
bank-width = <2>;
device-width = <1>;
};
nand@1,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,ifc-nand";
reg = <0x1 0x0 0x4000>;
};
};
&soc {
spi@7000 {
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,s25sl12801";
reg = <0>;
spi-max-frequency = <30000000>;
};
};
i2c@3000 {
fpga: fpga@66 {
compatible = "fsl,bsc9132qds-fpga", "fsl,fpga-qixis-i2c";
reg = <0x66>;
};
};
usb@22000 {
phy_type = "ulpi";
};
mdio@24000 {
phy0: ethernet-phy@0 {
reg = <0x0>;
};
phy1: ethernet-phy@1 {
reg = <0x1>;
};
tbi0: tbi-phy@11 {
reg = <0x1f>;
device_type = "tbi-phy";
};
};
enet0: ethernet@b0000 {
phy-handle = <&phy0>;
tbi-handle = <&tbi0>;
phy-connection-type = "sgmii";
};
enet1: ethernet@b1000 {
phy-handle = <&phy1>;
tbi-handle = <&tbi0>;
phy-connection-type = "sgmii";
};
};
...@@ -76,10 +76,6 @@ cpc: l3-cache-controller@10000 { ...@@ -76,10 +76,6 @@ cpc: l3-cache-controller@10000 {
compatible = "fsl,b4420-l3-cache-controller", "cache"; compatible = "fsl,b4420-l3-cache-controller", "cache";
}; };
corenet-cf@18000 {
compatible = "fsl,b4420-corenet-cf";
};
guts: global-utilities@e0000 { guts: global-utilities@e0000 {
compatible = "fsl,b4420-device-config", "fsl,qoriq-device-config-2.0"; compatible = "fsl,b4420-device-config", "fsl,qoriq-device-config-2.0";
}; };
......
...@@ -66,12 +66,14 @@ cpu0: PowerPC,e6500@0 { ...@@ -66,12 +66,14 @@ cpu0: PowerPC,e6500@0 {
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
}; };
}; };
...@@ -120,10 +120,6 @@ cpc: l3-cache-controller@10000 { ...@@ -120,10 +120,6 @@ cpc: l3-cache-controller@10000 {
compatible = "fsl,b4860-l3-cache-controller", "cache"; compatible = "fsl,b4860-l3-cache-controller", "cache";
}; };
corenet-cf@18000 {
compatible = "fsl,b4860-corenet-cf";
};
guts: global-utilities@e0000 { guts: global-utilities@e0000 {
compatible = "fsl,b4860-device-config", "fsl,qoriq-device-config-2.0"; compatible = "fsl,b4860-device-config", "fsl,qoriq-device-config-2.0";
}; };
......
...@@ -66,24 +66,28 @@ cpu0: PowerPC,e6500@0 { ...@@ -66,24 +66,28 @@ cpu0: PowerPC,e6500@0 {
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2>; next-level-cache = <&L2>;
fsl,portid-mapping = <0x80000000>;
}; };
}; };
}; };
...@@ -158,7 +158,7 @@ cpc: l3-cache-controller@10000 { ...@@ -158,7 +158,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,b4-corenet-cf"; compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 0>; interrupts = <16 2 1 0>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -168,6 +168,7 @@ corenet-cf@18000 { ...@@ -168,6 +168,7 @@ corenet-cf@18000 {
iommu@20000 { iommu@20000 {
compatible = "fsl,pamu-v1.0", "fsl,pamu"; compatible = "fsl,pamu-v1.0", "fsl,pamu";
reg = <0x20000 0x4000>; reg = <0x20000 0x4000>;
fsl,portid-mapping = <0x8000>;
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
interrupts = < interrupts = <
......
/*
* BSC9132 Silicon/SoC Device Tree Source (post include)
*
* Copyright 2014 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
&ifc {
#address-cells = <2>;
#size-cells = <1>;
compatible = "fsl,ifc", "simple-bus";
/* FIXME: Test whether interrupts are split */
interrupts = <16 2 0 0 20 2 0 0>;
};
&soc {
#address-cells = <1>;
#size-cells = <1>;
device_type = "soc";
compatible = "fsl,bsc9132-immr", "simple-bus";
bus-frequency = <0>; // Filled out by uboot.
ecm-law@0 {
compatible = "fsl,ecm-law";
reg = <0x0 0x1000>;
fsl,num-laws = <12>;
};
ecm@1000 {
compatible = "fsl,bsc9132-ecm", "fsl,ecm";
reg = <0x1000 0x1000>;
interrupts = <16 2 0 0>;
};
memory-controller@2000 {
compatible = "fsl,bsc9132-memory-controller";
reg = <0x2000 0x1000>;
interrupts = <16 2 1 8>;
};
/include/ "pq3-i2c-0.dtsi"
i2c@3000 {
interrupts = <17 2 0 0>;
};
/include/ "pq3-i2c-1.dtsi"
i2c@3100 {
interrupts = <17 2 0 0>;
};
/include/ "pq3-duart-0.dtsi"
serial0: serial@4500 {
interrupts = <18 2 0 0>;
};
serial1: serial@4600 {
interrupts = <18 2 0 0 >;
};
/include/ "pq3-espi-0.dtsi"
spi0: spi@7000 {
fsl,espi-num-chipselects = <1>;
interrupts = <22 0x2 0 0>;
};
/include/ "pq3-gpio-0.dtsi"
gpio-controller@f000 {
interrupts = <19 0x2 0 0>;
};
L2: l2-cache-controller@20000 {
compatible = "fsl,bsc9132-l2-cache-controller";
reg = <0x20000 0x1000>;
cache-line-size = <32>; // 32 bytes
cache-size = <0x40000>; // L2,256K
interrupts = <16 2 1 0>;
};
/include/ "pq3-dma-0.dtsi"
dma@21300 {
dma-channel@0 {
interrupts = <62 2 0 0>;
};
dma-channel@80 {
interrupts = <63 2 0 0>;
};
dma-channel@100 {
interrupts = <64 2 0 0>;
};
dma-channel@180 {
interrupts = <65 2 0 0>;
};
};
/include/ "pq3-usb2-dr-0.dtsi"
usb@22000 {
compatible = "fsl-usb2-dr","fsl-usb2-dr-v2.2";
interrupts = <40 0x2 0 0>;
};
/include/ "pq3-esdhc-0.dtsi"
sdhc@2e000 {
fsl,sdhci-auto-cmd12;
interrupts = <41 0x2 0 0>;
};
/include/ "pq3-sec4.4-0.dtsi"
crypto@30000 {
interrupts = <57 2 0 0>;
sec_jr0: jr@1000 {
interrupts = <58 2 0 0>;
};
sec_jr1: jr@2000 {
interrupts = <59 2 0 0>;
};
sec_jr2: jr@3000 {
interrupts = <60 2 0 0>;
};
sec_jr3: jr@4000 {
interrupts = <61 2 0 0>;
};
};
/include/ "pq3-mpic.dtsi"
/include/ "pq3-mpic-timer-B.dtsi"
/include/ "pq3-etsec2-0.dtsi"
enet0: ethernet@b0000 {
queue-group@b0000 {
fsl,rx-bit-map = <0xff>;
fsl,tx-bit-map = <0xff>;
interrupts = <26 2 0 0 27 2 0 0 28 2 0 0>;
};
};
/include/ "pq3-etsec2-1.dtsi"
enet1: ethernet@b1000 {
queue-group@b1000 {
fsl,rx-bit-map = <0xff>;
fsl,tx-bit-map = <0xff>;
interrupts = <33 2 0 0 34 2 0 0 35 2 0 0>;
};
};
global-utilities@e0000 {
compatible = "fsl,bsc9132-guts";
reg = <0xe0000 0x1000>;
fsl,has-rstcr;
};
};
/*
* BSC9132 Silicon/SoC Device Tree Source (pre include)
*
* Copyright 2014 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/dts-v1/;
/include/ "e500v2_power_isa.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&mpic>;
aliases {
serial0 = &serial0;
ethernet0 = &enet0;
ethernet1 = &enet1;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu0: PowerPC,e500v2@0 {
device_type = "cpu";
reg = <0x0>;
next-level-cache = <&L2>;
};
cpu1: PowerPC,e500v2@1 {
device_type = "cpu";
reg = <0x1>;
next-level-cache = <&L2>;
};
};
};
...@@ -246,7 +246,7 @@ cpc: l3-cache-controller@10000 { ...@@ -246,7 +246,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet1-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -262,6 +262,7 @@ iommu@20000 { ...@@ -262,6 +262,7 @@ iommu@20000 {
interrupts = < interrupts = <
24 2 0 0 24 2 0 0
16 2 1 30>; 16 2 1 30>;
fsl,portid-mapping = <0x0f000000>;
pamu0: pamu@0 { pamu0: pamu@0 {
reg = <0 0x1000>; reg = <0 0x1000>;
......
...@@ -83,6 +83,7 @@ cpu0: PowerPC,e500mc@0 { ...@@ -83,6 +83,7 @@ cpu0: PowerPC,e500mc@0 {
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -92,6 +93,7 @@ cpu1: PowerPC,e500mc@1 { ...@@ -92,6 +93,7 @@ cpu1: PowerPC,e500mc@1 {
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -101,6 +103,7 @@ cpu2: PowerPC,e500mc@2 { ...@@ -101,6 +103,7 @@ cpu2: PowerPC,e500mc@2 {
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -110,6 +113,7 @@ cpu3: PowerPC,e500mc@3 { ...@@ -110,6 +113,7 @@ cpu3: PowerPC,e500mc@3 {
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&mux3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
......
...@@ -273,7 +273,7 @@ cpc: l3-cache-controller@10000 { ...@@ -273,7 +273,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet1-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -289,6 +289,7 @@ iommu@20000 { ...@@ -289,6 +289,7 @@ iommu@20000 {
interrupts = < interrupts = <
24 2 0 0 24 2 0 0
16 2 1 30>; 16 2 1 30>;
fsl,portid-mapping = <0x0f000000>;
pamu0: pamu@0 { pamu0: pamu@0 {
reg = <0 0x1000>; reg = <0 0x1000>;
......
...@@ -84,6 +84,7 @@ cpu0: PowerPC,e500mc@0 { ...@@ -84,6 +84,7 @@ cpu0: PowerPC,e500mc@0 {
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -93,6 +94,7 @@ cpu1: PowerPC,e500mc@1 { ...@@ -93,6 +94,7 @@ cpu1: PowerPC,e500mc@1 {
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -102,6 +104,7 @@ cpu2: PowerPC,e500mc@2 { ...@@ -102,6 +104,7 @@ cpu2: PowerPC,e500mc@2 {
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -111,6 +114,7 @@ cpu3: PowerPC,e500mc@3 { ...@@ -111,6 +114,7 @@ cpu3: PowerPC,e500mc@3 {
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&mux3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
......
...@@ -281,7 +281,7 @@ cpc: l3-cache-controller@10000 { ...@@ -281,7 +281,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet1-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -297,6 +297,7 @@ iommu@20000 { ...@@ -297,6 +297,7 @@ iommu@20000 {
interrupts = < interrupts = <
24 2 0 0 24 2 0 0
16 2 1 30>; 16 2 1 30>;
fsl,portid-mapping = <0x00f80000>;
pamu0: pamu@0 { pamu0: pamu@0 {
reg = <0 0x1000>; reg = <0 0x1000>;
......
...@@ -83,6 +83,7 @@ cpu0: PowerPC,e500mc@0 { ...@@ -83,6 +83,7 @@ cpu0: PowerPC,e500mc@0 {
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -92,6 +93,7 @@ cpu1: PowerPC,e500mc@1 { ...@@ -92,6 +93,7 @@ cpu1: PowerPC,e500mc@1 {
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -101,6 +103,7 @@ cpu2: PowerPC,e500mc@2 { ...@@ -101,6 +103,7 @@ cpu2: PowerPC,e500mc@2 {
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -110,6 +113,7 @@ cpu3: PowerPC,e500mc@3 { ...@@ -110,6 +113,7 @@ cpu3: PowerPC,e500mc@3 {
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&mux3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -119,6 +123,7 @@ cpu4: PowerPC,e500mc@4 { ...@@ -119,6 +123,7 @@ cpu4: PowerPC,e500mc@4 {
reg = <4>; reg = <4>;
clocks = <&mux4>; clocks = <&mux4>;
next-level-cache = <&L2_4>; next-level-cache = <&L2_4>;
fsl,portid-mapping = <0x08000000>;
L2_4: l2-cache { L2_4: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -128,6 +133,7 @@ cpu5: PowerPC,e500mc@5 { ...@@ -128,6 +133,7 @@ cpu5: PowerPC,e500mc@5 {
reg = <5>; reg = <5>;
clocks = <&mux5>; clocks = <&mux5>;
next-level-cache = <&L2_5>; next-level-cache = <&L2_5>;
fsl,portid-mapping = <0x04000000>;
L2_5: l2-cache { L2_5: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -137,6 +143,7 @@ cpu6: PowerPC,e500mc@6 { ...@@ -137,6 +143,7 @@ cpu6: PowerPC,e500mc@6 {
reg = <6>; reg = <6>;
clocks = <&mux6>; clocks = <&mux6>;
next-level-cache = <&L2_6>; next-level-cache = <&L2_6>;
fsl,portid-mapping = <0x02000000>;
L2_6: l2-cache { L2_6: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -146,6 +153,7 @@ cpu7: PowerPC,e500mc@7 { ...@@ -146,6 +153,7 @@ cpu7: PowerPC,e500mc@7 {
reg = <7>; reg = <7>;
clocks = <&mux7>; clocks = <&mux7>;
next-level-cache = <&L2_7>; next-level-cache = <&L2_7>;
fsl,portid-mapping = <0x01000000>;
L2_7: l2-cache { L2_7: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
......
...@@ -278,7 +278,7 @@ cpc: l3-cache-controller@10000 { ...@@ -278,7 +278,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet1-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -294,6 +294,7 @@ iommu@20000 { ...@@ -294,6 +294,7 @@ iommu@20000 {
interrupts = < interrupts = <
24 2 0 0 24 2 0 0
16 2 1 30>; 16 2 1 30>;
fsl,portid-mapping = <0x3c000000>;
pamu0: pamu@0 { pamu0: pamu@0 {
reg = <0 0x1000>; reg = <0 0x1000>;
......
...@@ -90,6 +90,7 @@ cpu0: PowerPC,e5500@0 { ...@@ -90,6 +90,7 @@ cpu0: PowerPC,e5500@0 {
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -99,6 +100,7 @@ cpu1: PowerPC,e5500@1 { ...@@ -99,6 +100,7 @@ cpu1: PowerPC,e5500@1 {
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
......
...@@ -233,7 +233,7 @@ cpc: l3-cache-controller@10000 { ...@@ -233,7 +233,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet1-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -248,6 +248,7 @@ iommu@20000 { ...@@ -248,6 +248,7 @@ iommu@20000 {
#size-cells = <1>; #size-cells = <1>;
interrupts = <24 2 0 0 interrupts = <24 2 0 0
16 2 1 30>; 16 2 1 30>;
fsl,portid-mapping = <0x0f800000>;
pamu0: pamu@0 { pamu0: pamu@0 {
reg = <0 0x1000>; reg = <0 0x1000>;
......
...@@ -83,6 +83,7 @@ cpu0: PowerPC,e5500@0 { ...@@ -83,6 +83,7 @@ cpu0: PowerPC,e5500@0 {
reg = <0>; reg = <0>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_0>; next-level-cache = <&L2_0>;
fsl,portid-mapping = <0x80000000>;
L2_0: l2-cache { L2_0: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -92,6 +93,7 @@ cpu1: PowerPC,e5500@1 { ...@@ -92,6 +93,7 @@ cpu1: PowerPC,e5500@1 {
reg = <1>; reg = <1>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x40000000>;
L2_1: l2-cache { L2_1: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -101,6 +103,7 @@ cpu2: PowerPC,e5500@2 { ...@@ -101,6 +103,7 @@ cpu2: PowerPC,e5500@2 {
reg = <2>; reg = <2>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x20000000>;
L2_2: l2-cache { L2_2: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
...@@ -110,6 +113,7 @@ cpu3: PowerPC,e5500@3 { ...@@ -110,6 +113,7 @@ cpu3: PowerPC,e5500@3 {
reg = <3>; reg = <3>;
clocks = <&mux3>; clocks = <&mux3>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x10000000>;
L2_3: l2-cache { L2_3: l2-cache {
next-level-cache = <&cpc>; next-level-cache = <&cpc>;
}; };
......
This diff is collapsed.
/*
* T1042 Silicon/SoC Device Tree Source (post include)
*
* Copyright 2013 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/include/ "t1040si-post.dtsi"
/* Place holder for ethernet related device tree nodes */
/*
* T1040/T1042 Silicon/SoC Device Tree Source (pre include)
*
* Copyright 2013 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/dts-v1/;
/include/ "e5500_power_isa.dtsi"
/ {
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&mpic>;
aliases {
ccsr = &soc;
dcsr = &dcsr;
serial0 = &serial0;
serial1 = &serial1;
serial2 = &serial2;
serial3 = &serial3;
pci0 = &pci0;
pci1 = &pci1;
pci2 = &pci2;
pci3 = &pci3;
usb0 = &usb0;
usb1 = &usb1;
sdhc = &sdhc;
crypto = &crypto;
};
cpus {
#address-cells = <1>;
#size-cells = <0>;
cpu0: PowerPC,e5500@0 {
device_type = "cpu";
reg = <0>;
clocks = <&mux0>;
next-level-cache = <&L2_1>;
L2_1: l2-cache {
next-level-cache = <&cpc>;
};
};
cpu1: PowerPC,e5500@1 {
device_type = "cpu";
reg = <1>;
clocks = <&mux1>;
next-level-cache = <&L2_2>;
L2_2: l2-cache {
next-level-cache = <&cpc>;
};
};
cpu2: PowerPC,e5500@2 {
device_type = "cpu";
reg = <2>;
clocks = <&mux2>;
next-level-cache = <&L2_3>;
L2_3: l2-cache {
next-level-cache = <&cpc>;
};
};
cpu3: PowerPC,e5500@3 {
device_type = "cpu";
reg = <3>;
clocks = <&mux3>;
next-level-cache = <&L2_4>;
L2_4: l2-cache {
next-level-cache = <&cpc>;
};
};
};
};
...@@ -343,7 +343,7 @@ cpc: l3-cache-controller@10000 { ...@@ -343,7 +343,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -353,6 +353,7 @@ corenet-cf@18000 { ...@@ -353,6 +353,7 @@ corenet-cf@18000 {
iommu@20000 { iommu@20000 {
compatible = "fsl,pamu-v1.0", "fsl,pamu"; compatible = "fsl,pamu-v1.0", "fsl,pamu";
reg = <0x20000 0x6000>; reg = <0x20000 0x6000>;
fsl,portid-mapping = <0x8000>;
interrupts = < interrupts = <
24 2 0 0 24 2 0 0
16 2 1 30>; 16 2 1 30>;
......
...@@ -69,72 +69,84 @@ cpu0: PowerPC,e6500@0 { ...@@ -69,72 +69,84 @@ cpu0: PowerPC,e6500@0 {
reg = <0 1>; reg = <0 1>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
clocks = <&mux0>; clocks = <&mux0>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu4: PowerPC,e6500@8 { cpu4: PowerPC,e6500@8 {
device_type = "cpu"; device_type = "cpu";
reg = <8 9>; reg = <8 9>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu5: PowerPC,e6500@10 { cpu5: PowerPC,e6500@10 {
device_type = "cpu"; device_type = "cpu";
reg = <10 11>; reg = <10 11>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu6: PowerPC,e6500@12 { cpu6: PowerPC,e6500@12 {
device_type = "cpu"; device_type = "cpu";
reg = <12 13>; reg = <12 13>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu7: PowerPC,e6500@14 { cpu7: PowerPC,e6500@14 {
device_type = "cpu"; device_type = "cpu";
reg = <14 15>; reg = <14 15>;
clocks = <&mux1>; clocks = <&mux1>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu8: PowerPC,e6500@16 { cpu8: PowerPC,e6500@16 {
device_type = "cpu"; device_type = "cpu";
reg = <16 17>; reg = <16 17>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
cpu9: PowerPC,e6500@18 { cpu9: PowerPC,e6500@18 {
device_type = "cpu"; device_type = "cpu";
reg = <18 19>; reg = <18 19>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
cpu10: PowerPC,e6500@20 { cpu10: PowerPC,e6500@20 {
device_type = "cpu"; device_type = "cpu";
reg = <20 21>; reg = <20 21>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
cpu11: PowerPC,e6500@22 { cpu11: PowerPC,e6500@22 {
device_type = "cpu"; device_type = "cpu";
reg = <22 23>; reg = <22 23>;
clocks = <&mux2>; clocks = <&mux2>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
}; };
}; };
/*
* Keymile kmcoge4 Device Tree Source, based on the P2041RDB DTS
*
* (C) Copyright 2014
* Valentin Longchamp, Keymile AG, valentin.longchamp@keymile.com
*
* Copyright 2011 Freescale Semiconductor Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
/include/ "fsl/p2041si-pre.dtsi"
/ {
model = "keymile,kmcoge4";
compatible = "keymile,kmcoge4", "keymile,kmp204x";
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&mpic>;
memory {
device_type = "memory";
};
dcsr: dcsr@f00000000 {
ranges = <0x00000000 0xf 0x00000000 0x01008000>;
};
soc: soc@ffe000000 {
ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
reg = <0xf 0xfe000000 0 0x00001000>;
spi@110000 {
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "spansion,s25fl256s1";
reg = <0>;
spi-max-frequency = <20000000>; /* input clock */
};
network_clock@1 {
compatible = "zarlink,zl30343";
reg = <1>;
spi-max-frequency = <8000000>;
};
flash@2 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "micron,m25p32";
reg = <2>;
spi-max-frequency = <15000000>;
};
};
i2c@119000 {
status = "disabled";
};
i2c@119100 {
status = "disabled";
};
usb0: usb@210000 {
status = "disabled";
};
usb1: usb@211000 {
status = "disabled";
};
sata@220000 {
status = "disabled";
};
sata@221000 {
status = "disabled";
};
};
rio: rapidio@ffe0c0000 {
status = "disabled";
};
lbc: localbus@ffe124000 {
reg = <0xf 0xfe124000 0 0x1000>;
ranges = <0 0 0xf 0xffa00000 0x00040000 /* LB 0 */
1 0 0xf 0xfb000000 0x00010000 /* LB 1 */
2 0 0xf 0xd0000000 0x10000000 /* LB 2 */
3 0 0xf 0xe0000000 0x10000000>; /* LB 3 */
nand@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,elbc-fcm-nand";
reg = <0 0 0x40000>;
};
board-control@1,0 {
compatible = "keymile,qriox";
reg = <1 0 0x80>;
};
chassis-mgmt@3,0 {
compatible = "keymile,bfticu";
interrupt-controller;
#interrupt-cells = <2>;
reg = <3 0 0x100>;
interrupt-parent = <&mpic>;
interrupts = <6 1 0 0>;
};
};
pci0: pcie@ffe200000 {
reg = <0xf 0xfe200000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x20000000
0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};
pci1: pcie@ffe201000 {
status = "disabled";
};
pci2: pcie@ffe202000 {
reg = <0xf 0xfe202000 0 0x1000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x20000000 0 0x20000000
0x01000000 0 0x00000000 0xf 0xf8010000 0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x20000000
0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};
};
/include/ "fsl/p2041si-post.dtsi"
/* /*
* P1023 RDS Device Tree Source * OCA4080 Device Tree Source
* *
* Copyright 2010-2011 Freescale Semiconductor Inc. * Copyright 2014 Prodrive Technologies B.V.
* *
* Author: Roy Zang <tie-fei.zang@freescale.com> * Based on:
* P4080DS Device Tree Source
* Copyright 2009-2011 Freescale Semiconductor Inc.
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
...@@ -34,11 +36,11 @@ ...@@ -34,11 +36,11 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/ */
/include/ "fsl/p1023si-pre.dtsi" /include/ "fsl/p4080si-pre.dtsi"
/ { / {
model = "fsl,P1023"; model = "fsl,OCA4080";
compatible = "fsl,P1023RDS"; compatible = "fsl,OCA4080";
#address-cells = <2>; #address-cells = <2>;
#size-cells = <2>; #size-cells = <2>;
interrupt-parent = <&mpic>; interrupt-parent = <&mpic>;
...@@ -47,173 +49,70 @@ memory { ...@@ -47,173 +49,70 @@ memory {
device_type = "memory"; device_type = "memory";
}; };
soc: soc@ff600000 { dcsr: dcsr@f00000000 {
ranges = <0x0 0x0 0xff600000 0x200000>; ranges = <0x00000000 0xf 0x00000000 0x01008000>;
i2c@3000 {
rtc@68 {
compatible = "dallas,ds1374";
reg = <0x68>;
}; };
soc: soc@ffe000000 {
ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
reg = <0xf 0xfe000000 0 0x00001000>;
i2c@118000 {
status = "disabled";
}; };
spi@7000 { i2c@118100 {
fsl_dataflash@0 { status = "disabled";
#address-cells = <1>;
#size-cells = <1>;
compatible = "atmel,at45db081d";
reg = <0>;
spi-max-frequency = <40000000>; /* input clock */
partition@u-boot {
/* 512KB for u-boot Bootloader Image */
label = "u-boot-spi";
reg = <0x00000000 0x00080000>;
read-only;
}; };
partition@dtb {
/* 512KB for DTB Image */ i2c@119000 {
label = "dtb-spi"; status = "disabled";
reg = <0x00080000 0x00080000>;
read-only;
}; };
i2c@119100 {
status = "disabled";
}; };
usb0: usb@210000 {
status = "disabled";
}; };
usb@22000 { usb1: usb@211000 {
dr_mode = "host"; status = "disabled";
phy_type = "ulpi";
}; };
}; };
lbc: localbus@ff605000 { rio: rapidio@ffe0c0000 {
reg = <0 0xff605000 0 0x1000>; reg = <0xf 0xfe0c0000 0 0x11000>;
port1 {
ranges = <0 0 0xc 0x20000000 0 0x10000000>;
};
};
/* NOR Flash, BCSR */ lbc: localbus@ffe124000 {
ranges = <0x0 0x0 0x0 0xee000000 0x02000000 reg = <0xf 0xfe124000 0 0x1000>;
0x1 0x0 0x0 0xe0000000 0x00008000>; ranges = <0 0 0xf 0xef800000 0x800000>;
nor@0,0 { flash@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash"; compatible = "cfi-flash";
reg = <0x0 0x0 0x02000000>; reg = <0 0 0x00800000>;
bank-width = <2>; bank-width = <2>;
device-width = <1>; device-width = <2>;
partition@0 { };
label = "ramdisk"; };
reg = <0x00000000 0x01c00000>;
}; pci0: pcie@ffe200000 {
partition@1c00000 { status = "disabled";
label = "kernel"; };
reg = <0x01c00000 0x002e0000>;
}; pci1: pcie@ffe201000 {
partiton@1ee0000 { status = "disabled";
label = "dtb";
reg = <0x01ee0000 0x00020000>;
};
partition@1f00000 {
label = "firmware";
reg = <0x01f00000 0x00080000>;
read-only;
};
partition@1f80000 {
label = "u-boot";
reg = <0x01f80000 0x00080000>;
read-only;
};
};
fpga@1,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,p1023rds-fpga";
reg = <1 0 0x8000>;
ranges = <0 1 0 0x8000>;
bcsr@20 {
compatible = "fsl,p1023rds-bcsr";
reg = <0x20 0x20>;
};
};
};
pci0: pcie@ff60a000 {
reg = <0 0xff60a000 0 0x1000>;
ranges = <0x2000000 0x0 0xc0000000 0 0xc0000000 0x0 0x20000000
0x1000000 0x0 0x00000000 0 0xffc20000 0x0 0x10000>;
pcie@0 {
/* IRQ[0:3] are pulled up on board, set to active-low */
interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map = <
/* IDSEL 0x0 */
0000 0 0 1 &mpic 0 1 0 0
0000 0 0 2 &mpic 1 1 0 0
0000 0 0 3 &mpic 2 1 0 0
0000 0 0 4 &mpic 3 1 0 0
>;
ranges = <0x2000000 0x0 0xc0000000
0x2000000 0x0 0xc0000000
0x0 0x20000000
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
};
};
board_pci1: pci1: pcie@ff609000 {
reg = <0 0xff609000 0 0x1000>;
ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
pcie@0 {
/*
* IRQ[4:6] only for PCIe, set to active-high,
* IRQ[7] is pulled up on board, set to active-low
*/
interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map = <
/* IDSEL 0x0 */
0000 0 0 1 &mpic 4 2 0 0
0000 0 0 2 &mpic 5 2 0 0
0000 0 0 3 &mpic 6 2 0 0
0000 0 0 4 &mpic 7 1 0 0
>;
ranges = <0x2000000 0x0 0xa0000000
0x2000000 0x0 0xa0000000
0x0 0x20000000
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
};
};
pci2: pcie@ff60b000 {
reg = <0 0xff60b000 0 0x1000>;
ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
pcie@0 {
/*
* IRQ[8:10] are pulled up on board, set to active-low
* IRQ[11] only for PCIe, set to active-high,
*/
interrupt-map-mask = <0xf800 0 0 7>;
interrupt-map = <
/* IDSEL 0x0 */
0000 0 0 1 &mpic 8 1 0 0
0000 0 0 2 &mpic 9 1 0 0
0000 0 0 3 &mpic 10 1 0 0
0000 0 0 4 &mpic 11 2 0 0
>;
ranges = <0x2000000 0x0 0x80000000
0x2000000 0x0 0x80000000
0x0 0x20000000
0x1000000 0x0 0x0
0x1000000 0x0 0x0
0x0 0x100000>;
}; };
pci2: pcie@ffe202000 {
status = "disabled";
}; };
}; };
/include/ "fsl/p1023si-post.dtsi" /include/ "fsl/p4080si-post.dtsi"
/*
* T1040QDS Device Tree Source
*
* Copyright 2013 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/include/ "fsl/t104xsi-pre.dtsi"
/include/ "t104xqds.dtsi"
/ {
model = "fsl,T1040QDS";
compatible = "fsl,T1040QDS";
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&mpic>;
};
/include/ "fsl/t1040si-post.dtsi"
/*
* T1042QDS Device Tree Source
*
* Copyright 2013 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/include/ "fsl/t104xsi-pre.dtsi"
/include/ "t104xqds.dtsi"
/ {
model = "fsl,T1042QDS";
compatible = "fsl,T1042QDS";
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&mpic>;
};
/include/ "fsl/t1042si-post.dtsi"
/*
* T104xQDS Device Tree Source
*
* Copyright 2013 Freescale Semiconductor Inc.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* * Neither the name of Freescale Semiconductor nor the
* names of its contributors may be used to endorse or promote products
* derived from this software without specific prior written permission.
*
*
* ALTERNATIVELY, this software may be distributed under the terms of the
* GNU General Public License ("GPL") as published by the Free Software
* Foundation, either version 2 of that License or (at your option) any
* later version.
*
* THIS SOFTWARE IS PROVIDED BY Freescale Semiconductor "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL Freescale Semiconductor BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
/ {
model = "fsl,T1040QDS";
#address-cells = <2>;
#size-cells = <2>;
interrupt-parent = <&mpic>;
ifc: localbus@ffe124000 {
reg = <0xf 0xfe124000 0 0x2000>;
ranges = <0 0 0xf 0xe8000000 0x08000000
2 0 0xf 0xff800000 0x00010000
3 0 0xf 0xffdf0000 0x00008000>;
nor@0,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "cfi-flash";
reg = <0x0 0x0 0x8000000>;
bank-width = <2>;
device-width = <1>;
};
nand@2,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,ifc-nand";
reg = <0x2 0x0 0x10000>;
};
board-control@3,0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fsl,fpga-qixis";
reg = <3 0 0x300>;
};
};
memory {
device_type = "memory";
};
dcsr: dcsr@f00000000 {
ranges = <0x00000000 0xf 0x00000000 0x01072000>;
};
soc: soc@ffe000000 {
ranges = <0x00000000 0xf 0xfe000000 0x1000000>;
reg = <0xf 0xfe000000 0 0x00001000>;
spi@110000 {
flash@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "micron,n25q128a11";
reg = <0>;
spi-max-frequency = <10000000>; /* input clock */
};
};
i2c@118000 {
pca9547@77 {
compatible = "philips,pca9547";
reg = <0x77>;
};
rtc@68 {
compatible = "dallas,ds3232";
reg = <0x68>;
interrupts = <0x1 0x1 0 0>;
};
};
};
pci0: pcie@ffe240000 {
reg = <0xf 0xfe240000 0 0x10000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x00000000 0x0 0x10000000
0x01000000 0 0x00000000 0xf 0xf8000000 0x0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x10000000
0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};
pci1: pcie@ffe250000 {
reg = <0xf 0xfe250000 0 0x10000>;
ranges = <0x02000000 0x0 0xe0000000 0xc 0x10000000 0x0 0x10000000
0x01000000 0x0 0x00000000 0xf 0xf8010000 0x0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x10000000
0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};
pci2: pcie@ffe260000 {
reg = <0xf 0xfe260000 0 0x10000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x20000000 0 0x10000000
0x01000000 0 0x00000000 0xf 0xf8020000 0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x10000000
0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};
pci3: pcie@ffe270000 {
reg = <0xf 0xfe270000 0 0x10000>;
ranges = <0x02000000 0 0xe0000000 0xc 0x30000000 0 0x10000000
0x01000000 0 0x00000000 0xf 0xf8030000 0 0x00010000>;
pcie@0 {
ranges = <0x02000000 0 0xe0000000
0x02000000 0 0xe0000000
0 0x10000000
0x01000000 0 0x00000000
0x01000000 0 0x00000000
0 0x00010000>;
};
};
};
...@@ -60,63 +60,75 @@ cpu0: PowerPC,e6500@0 { ...@@ -60,63 +60,75 @@ cpu0: PowerPC,e6500@0 {
device_type = "cpu"; device_type = "cpu";
reg = <0 1>; reg = <0 1>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu1: PowerPC,e6500@2 { cpu1: PowerPC,e6500@2 {
device_type = "cpu"; device_type = "cpu";
reg = <2 3>; reg = <2 3>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu2: PowerPC,e6500@4 { cpu2: PowerPC,e6500@4 {
device_type = "cpu"; device_type = "cpu";
reg = <4 5>; reg = <4 5>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu3: PowerPC,e6500@6 { cpu3: PowerPC,e6500@6 {
device_type = "cpu"; device_type = "cpu";
reg = <6 7>; reg = <6 7>;
next-level-cache = <&L2_1>; next-level-cache = <&L2_1>;
fsl,portid-mapping = <0x80000000>;
}; };
cpu4: PowerPC,e6500@8 { cpu4: PowerPC,e6500@8 {
device_type = "cpu"; device_type = "cpu";
reg = <8 9>; reg = <8 9>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu5: PowerPC,e6500@10 { cpu5: PowerPC,e6500@10 {
device_type = "cpu"; device_type = "cpu";
reg = <10 11>; reg = <10 11>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu6: PowerPC,e6500@12 { cpu6: PowerPC,e6500@12 {
device_type = "cpu"; device_type = "cpu";
reg = <12 13>; reg = <12 13>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu7: PowerPC,e6500@14 { cpu7: PowerPC,e6500@14 {
device_type = "cpu"; device_type = "cpu";
reg = <14 15>; reg = <14 15>;
next-level-cache = <&L2_2>; next-level-cache = <&L2_2>;
fsl,portid-mapping = <0x40000000>;
}; };
cpu8: PowerPC,e6500@16 { cpu8: PowerPC,e6500@16 {
device_type = "cpu"; device_type = "cpu";
reg = <16 17>; reg = <16 17>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
cpu9: PowerPC,e6500@18 { cpu9: PowerPC,e6500@18 {
device_type = "cpu"; device_type = "cpu";
reg = <18 19>; reg = <18 19>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
cpu10: PowerPC,e6500@20 { cpu10: PowerPC,e6500@20 {
device_type = "cpu"; device_type = "cpu";
reg = <20 21>; reg = <20 21>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
cpu11: PowerPC,e6500@22 { cpu11: PowerPC,e6500@22 {
device_type = "cpu"; device_type = "cpu";
reg = <22 23>; reg = <22 23>;
next-level-cache = <&L2_3>; next-level-cache = <&L2_3>;
fsl,portid-mapping = <0x20000000>;
}; };
}; };
}; };
...@@ -213,7 +225,7 @@ cpc: l3-cache-controller@10000 { ...@@ -213,7 +225,7 @@ cpc: l3-cache-controller@10000 {
}; };
corenet-cf@18000 { corenet-cf@18000 {
compatible = "fsl,corenet-cf"; compatible = "fsl,corenet2-cf", "fsl,corenet-cf";
reg = <0x18000 0x1000>; reg = <0x18000 0x1000>;
interrupts = <16 2 1 31>; interrupts = <16 2 1 31>;
fsl,ccf-num-csdids = <32>; fsl,ccf-num-csdids = <32>;
...@@ -223,6 +235,7 @@ corenet-cf@18000 { ...@@ -223,6 +235,7 @@ corenet-cf@18000 {
iommu@20000 { iommu@20000 {
compatible = "fsl,pamu-v1.0", "fsl,pamu"; compatible = "fsl,pamu-v1.0", "fsl,pamu";
reg = <0x20000 0x6000>; reg = <0x20000 0x6000>;
fsl,portid-mapping = <0x8000>;
interrupts = < interrupts = <
24 2 0 0 24 2 0 0
16 2 1 30>; 16 2 1 30>;
......
...@@ -26,7 +26,11 @@ int parse_elf64(void *hdr, struct elf_info *info) ...@@ -26,7 +26,11 @@ int parse_elf64(void *hdr, struct elf_info *info)
elf64->e_ident[EI_MAG2] == ELFMAG2 && elf64->e_ident[EI_MAG2] == ELFMAG2 &&
elf64->e_ident[EI_MAG3] == ELFMAG3 && elf64->e_ident[EI_MAG3] == ELFMAG3 &&
elf64->e_ident[EI_CLASS] == ELFCLASS64 && elf64->e_ident[EI_CLASS] == ELFCLASS64 &&
#ifdef __LITTLE_ENDIAN__
elf64->e_ident[EI_DATA] == ELFDATA2LSB &&
#else
elf64->e_ident[EI_DATA] == ELFDATA2MSB && elf64->e_ident[EI_DATA] == ELFDATA2MSB &&
#endif
(elf64->e_type == ET_EXEC || (elf64->e_type == ET_EXEC ||
elf64->e_type == ET_DYN) && elf64->e_type == ET_DYN) &&
elf64->e_machine == EM_PPC64)) elf64->e_machine == EM_PPC64))
......
...@@ -40,8 +40,8 @@ static void *of_try_claim(unsigned long size) ...@@ -40,8 +40,8 @@ static void *of_try_claim(unsigned long size)
#ifdef DEBUG #ifdef DEBUG
printf(" trying: 0x%08lx\n\r", claim_base); printf(" trying: 0x%08lx\n\r", claim_base);
#endif #endif
addr = (unsigned long)of_claim(claim_base, size, 0); addr = (unsigned long) of_claim(claim_base, size, 0);
if ((void *)addr != (void *)-1) if (addr != PROM_ERROR)
break; break;
} }
if (addr == 0) if (addr == 0)
......
#ifndef _PPC_BOOT_OF_H_ #ifndef _PPC_BOOT_OF_H_
#define _PPC_BOOT_OF_H_ #define _PPC_BOOT_OF_H_
#include "swab.h"
typedef void *phandle; typedef void *phandle;
typedef void *ihandle; typedef u32 ihandle;
void of_init(void *promptr); void of_init(void *promptr);
int of_call_prom(const char *service, int nargs, int nret, ...); int of_call_prom(const char *service, int nargs, int nret, ...);
void *of_claim(unsigned long virt, unsigned long size, unsigned long align); unsigned int of_claim(unsigned long virt, unsigned long size,
unsigned long align);
void *of_vmlinux_alloc(unsigned long size); void *of_vmlinux_alloc(unsigned long size);
void of_exit(void); void of_exit(void);
void *of_finddevice(const char *name); void *of_finddevice(const char *name);
...@@ -18,4 +21,16 @@ int of_setprop(const void *phandle, const char *name, const void *buf, ...@@ -18,4 +21,16 @@ int of_setprop(const void *phandle, const char *name, const void *buf,
/* Console functions */ /* Console functions */
void of_console_init(void); void of_console_init(void);
typedef u32 __be32;
#ifdef __LITTLE_ENDIAN__
#define cpu_to_be32(x) swab32(x)
#define be32_to_cpu(x) swab32(x)
#else
#define cpu_to_be32(x) (x)
#define be32_to_cpu(x) (x)
#endif
#define PROM_ERROR (-1u)
#endif /* _PPC_BOOT_OF_H_ */ #endif /* _PPC_BOOT_OF_H_ */
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
#include "of.h" #include "of.h"
static void *of_stdout_handle; static unsigned int of_stdout_handle;
static int of_console_open(void) static int of_console_open(void)
{ {
...@@ -27,8 +27,10 @@ static int of_console_open(void) ...@@ -27,8 +27,10 @@ static int of_console_open(void)
if (((devp = of_finddevice("/chosen")) != NULL) if (((devp = of_finddevice("/chosen")) != NULL)
&& (of_getprop(devp, "stdout", &of_stdout_handle, && (of_getprop(devp, "stdout", &of_stdout_handle,
sizeof(of_stdout_handle)) sizeof(of_stdout_handle))
== sizeof(of_stdout_handle))) == sizeof(of_stdout_handle))) {
of_stdout_handle = be32_to_cpu(of_stdout_handle);
return 0; return 0;
}
return -1; return -1;
} }
......
...@@ -16,74 +16,83 @@ ...@@ -16,74 +16,83 @@
#include "of.h" #include "of.h"
typedef u32 prom_arg_t;
/* The following structure is used to communicate with open firmware.
* All arguments in and out are in big endian format. */
struct prom_args {
__be32 service; /* Address of service name string. */
__be32 nargs; /* Number of input arguments. */
__be32 nret; /* Number of output arguments. */
__be32 args[10]; /* Input/output arguments. */
};
#ifdef __powerpc64__
extern int prom(void *);
#else
static int (*prom) (void *); static int (*prom) (void *);
#endif
void of_init(void *promptr) void of_init(void *promptr)
{ {
#ifndef __powerpc64__
prom = (int (*)(void *))promptr; prom = (int (*)(void *))promptr;
#endif
} }
#define ADDR(x) (u32)(unsigned long)(x)
int of_call_prom(const char *service, int nargs, int nret, ...) int of_call_prom(const char *service, int nargs, int nret, ...)
{ {
int i; int i;
struct prom_args { struct prom_args args;
const char *service;
int nargs;
int nret;
unsigned int args[12];
} args;
va_list list; va_list list;
args.service = service; args.service = cpu_to_be32(ADDR(service));
args.nargs = nargs; args.nargs = cpu_to_be32(nargs);
args.nret = nret; args.nret = cpu_to_be32(nret);
va_start(list, nret); va_start(list, nret);
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
args.args[i] = va_arg(list, unsigned int); args.args[i] = cpu_to_be32(va_arg(list, prom_arg_t));
va_end(list); va_end(list);
for (i = 0; i < nret; i++) for (i = 0; i < nret; i++)
args.args[nargs+i] = 0; args.args[nargs+i] = 0;
if (prom(&args) < 0) if (prom(&args) < 0)
return -1; return PROM_ERROR;
return (nret > 0)? args.args[nargs]: 0; return (nret > 0) ? be32_to_cpu(args.args[nargs]) : 0;
} }
static int of_call_prom_ret(const char *service, int nargs, int nret, static int of_call_prom_ret(const char *service, int nargs, int nret,
unsigned int *rets, ...) prom_arg_t *rets, ...)
{ {
int i; int i;
struct prom_args { struct prom_args args;
const char *service;
int nargs;
int nret;
unsigned int args[12];
} args;
va_list list; va_list list;
args.service = service; args.service = cpu_to_be32(ADDR(service));
args.nargs = nargs; args.nargs = cpu_to_be32(nargs);
args.nret = nret; args.nret = cpu_to_be32(nret);
va_start(list, rets); va_start(list, rets);
for (i = 0; i < nargs; i++) for (i = 0; i < nargs; i++)
args.args[i] = va_arg(list, unsigned int); args.args[i] = cpu_to_be32(va_arg(list, prom_arg_t));
va_end(list); va_end(list);
for (i = 0; i < nret; i++) for (i = 0; i < nret; i++)
args.args[nargs+i] = 0; args.args[nargs+i] = 0;
if (prom(&args) < 0) if (prom(&args) < 0)
return -1; return PROM_ERROR;
if (rets != (void *) 0) if (rets != NULL)
for (i = 1; i < nret; ++i) for (i = 1; i < nret; ++i)
rets[i-1] = args.args[nargs+i]; rets[i-1] = be32_to_cpu(args.args[nargs+i]);
return (nret > 0)? args.args[nargs]: 0; return (nret > 0) ? be32_to_cpu(args.args[nargs]) : 0;
} }
/* returns true if s2 is a prefix of s1 */ /* returns true if s2 is a prefix of s1 */
...@@ -103,7 +112,7 @@ static int string_match(const char *s1, const char *s2) ...@@ -103,7 +112,7 @@ static int string_match(const char *s1, const char *s2)
*/ */
static int need_map = -1; static int need_map = -1;
static ihandle chosen_mmu; static ihandle chosen_mmu;
static phandle memory; static ihandle memory;
static int check_of_version(void) static int check_of_version(void)
{ {
...@@ -132,10 +141,10 @@ static int check_of_version(void) ...@@ -132,10 +141,10 @@ static int check_of_version(void)
printf("no mmu\n"); printf("no mmu\n");
return 0; return 0;
} }
memory = (ihandle) of_call_prom("open", 1, 1, "/memory"); memory = of_call_prom("open", 1, 1, "/memory");
if (memory == (ihandle) -1) { if (memory == PROM_ERROR) {
memory = (ihandle) of_call_prom("open", 1, 1, "/memory@0"); memory = of_call_prom("open", 1, 1, "/memory@0");
if (memory == (ihandle) -1) { if (memory == PROM_ERROR) {
printf("no memory node\n"); printf("no memory node\n");
return 0; return 0;
} }
...@@ -144,40 +153,41 @@ static int check_of_version(void) ...@@ -144,40 +153,41 @@ static int check_of_version(void)
return 1; return 1;
} }
void *of_claim(unsigned long virt, unsigned long size, unsigned long align) unsigned int of_claim(unsigned long virt, unsigned long size,
unsigned long align)
{ {
int ret; int ret;
unsigned int result; prom_arg_t result;
if (need_map < 0) if (need_map < 0)
need_map = check_of_version(); need_map = check_of_version();
if (align || !need_map) if (align || !need_map)
return (void *) of_call_prom("claim", 3, 1, virt, size, align); return of_call_prom("claim", 3, 1, virt, size, align);
ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", memory, ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", memory,
align, size, virt); align, size, virt);
if (ret != 0 || result == -1) if (ret != 0 || result == -1)
return (void *) -1; return -1;
ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu, ret = of_call_prom_ret("call-method", 5, 2, &result, "claim", chosen_mmu,
align, size, virt); align, size, virt);
/* 0x12 == coherent + read/write */ /* 0x12 == coherent + read/write */
ret = of_call_prom("call-method", 6, 1, "map", chosen_mmu, ret = of_call_prom("call-method", 6, 1, "map", chosen_mmu,
0x12, size, virt, virt); 0x12, size, virt, virt);
return (void *) virt; return virt;
} }
void *of_vmlinux_alloc(unsigned long size) void *of_vmlinux_alloc(unsigned long size)
{ {
unsigned long start = (unsigned long)_start, end = (unsigned long)_end; unsigned long start = (unsigned long)_start, end = (unsigned long)_end;
void *addr; unsigned long addr;
void *p; void *p;
/* With some older POWER4 firmware we need to claim the area the kernel /* With some older POWER4 firmware we need to claim the area the kernel
* will reside in. Newer firmwares don't need this so we just ignore * will reside in. Newer firmwares don't need this so we just ignore
* the return value. * the return value.
*/ */
addr = of_claim(start, end - start, 0); addr = (unsigned long) of_claim(start, end - start, 0);
printf("Trying to claim from 0x%lx to 0x%lx (0x%lx) got %p\r\n", printf("Trying to claim from 0x%lx to 0x%lx (0x%lx) got %lx\r\n",
start, end, end - start, addr); start, end, end - start, addr);
p = malloc(size); p = malloc(size);
...@@ -197,7 +207,7 @@ void of_exit(void) ...@@ -197,7 +207,7 @@ void of_exit(void)
*/ */
void *of_finddevice(const char *name) void *of_finddevice(const char *name)
{ {
return (phandle) of_call_prom("finddevice", 1, 1, name); return (void *) (unsigned long) of_call_prom("finddevice", 1, 1, name);
} }
int of_getprop(const void *phandle, const char *name, void *buf, int of_getprop(const void *phandle, const char *name, void *buf,
......
...@@ -62,4 +62,16 @@ ...@@ -62,4 +62,16 @@
#define SPRN_TBRL 268 #define SPRN_TBRL 268
#define SPRN_TBRU 269 #define SPRN_TBRU 269
#define FIXUP_ENDIAN \
tdi 0, 0, 0x48; /* Reverse endian of b . + 8 */ \
b $+36; /* Skip trampoline if endian is good */ \
.long 0x05009f42; /* bcl 20,31,$+4 */ \
.long 0xa602487d; /* mflr r10 */ \
.long 0x1c004a39; /* addi r10,r10,28 */ \
.long 0xa600607d; /* mfmsr r11 */ \
.long 0x01006b69; /* xori r11,r11,1 */ \
.long 0xa6035a7d; /* mtsrr0 r10 */ \
.long 0xa6037b7d; /* mtsrr1 r11 */ \
.long 0x2400004c /* rfid */
#endif /* _PPC64_PPC_ASM_H */ #endif /* _PPC64_PPC_ASM_H */
#include "ppc_asm.h"
.text
.globl _zimage_start
_zimage_start:
FIXUP_ENDIAN
b _zimage_start_lib
...@@ -21,6 +21,18 @@ size_t strnlen(const char * s, size_t count) ...@@ -21,6 +21,18 @@ size_t strnlen(const char * s, size_t count)
return sc - s; return sc - s;
} }
#ifdef __powerpc64__
# define do_div(n, base) ({ \
unsigned int __base = (base); \
unsigned int __rem; \
__rem = ((unsigned long long)(n)) % __base; \
(n) = ((unsigned long long)(n)) / __base; \
__rem; \
})
#else
extern unsigned int __div64_32(unsigned long long *dividend, extern unsigned int __div64_32(unsigned long long *dividend,
unsigned int divisor); unsigned int divisor);
...@@ -39,6 +51,8 @@ extern unsigned int __div64_32(unsigned long long *dividend, ...@@ -39,6 +51,8 @@ extern unsigned int __div64_32(unsigned long long *dividend,
__rem; \ __rem; \
}) })
#endif /* __powerpc64__ */
static int skip_atoi(const char **s) static int skip_atoi(const char **s)
{ {
int i, c; int i, c;
......
#ifndef _PPC_BOOT_SWAB_H_
#define _PPC_BOOT_SWAB_H_
static inline u16 swab16(u16 x)
{
return ((x & (u16)0x00ffU) << 8) |
((x & (u16)0xff00U) >> 8);
}
static inline u32 swab32(u32 x)
{
return ((x & (u32)0x000000ffUL) << 24) |
((x & (u32)0x0000ff00UL) << 8) |
((x & (u32)0x00ff0000UL) >> 8) |
((x & (u32)0xff000000UL) >> 24);
}
static inline u64 swab64(u64 x)
{
return (u64)((x & (u64)0x00000000000000ffULL) << 56) |
(u64)((x & (u64)0x000000000000ff00ULL) << 40) |
(u64)((x & (u64)0x0000000000ff0000ULL) << 24) |
(u64)((x & (u64)0x00000000ff000000ULL) << 8) |
(u64)((x & (u64)0x000000ff00000000ULL) >> 8) |
(u64)((x & (u64)0x0000ff0000000000ULL) >> 24) |
(u64)((x & (u64)0x00ff000000000000ULL) >> 40) |
(u64)((x & (u64)0xff00000000000000ULL) >> 56);
}
#endif /* _PPC_BOOT_SWAB_H_ */
/*
* Copyright © 2013 Tony Breeds IBM Corporation
* Copyright © 2013 Alistair Popple IBM Corporation
*
* Based on earlier code:
* Copyright (C) Paul Mackerras 1997.
*
* Matt Porter <mporter@kernel.crashing.org>
* Copyright 2002-2005 MontaVista Software Inc.
*
* Eugene Surovegin <eugene.surovegin@zultys.com> or <ebs@ebshome.net>
* Copyright (c) 2003, 2004 Zultys Technologies
*
* Copyright 2007 David Gibson, IBM Corporation.
* Copyright 2010 Ben. Herrenschmidt, IBM Corporation.
* Copyright © 2011 David Kleikamp IBM Corporation
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version
* 2 of the License, or (at your option) any later version.
*/
#include <stdarg.h>
#include <stddef.h>
#include "types.h"
#include "elf.h"
#include "string.h"
#include "stdlib.h"
#include "stdio.h"
#include "page.h"
#include "ops.h"
#include "reg.h"
#include "io.h"
#include "dcr.h"
#include "4xx.h"
#include "44x.h"
#include "libfdt.h"
BSS_STACK(4096);
#define SPRN_PIR 0x11E /* Processor Indentification Register */
#define USERDATA_LEN 256 /* Length of userdata passed in by PIBS */
#define MAX_RANKS 0x4
#define DDR3_MR0CF 0x80010011U
#define CCTL0_MCO2 0x8000080FU
#define CCTL0_MCO3 0x80000810U
#define CCTL0_MCO4 0x80000811U
#define CCTL0_MCO5 0x80000812U
#define CCTL0_MCO6 0x80000813U
static unsigned long long ibm_akebono_memsize;
static long long unsigned mac_addr;
static unsigned long long ibm_akebono_detect_memsize(void)
{
u32 reg;
unsigned i;
unsigned long long memsize = 0;
for (i = 0; i < MAX_RANKS; i++) {
reg = mfdcrx(DDR3_MR0CF + i);
if (!(reg & 1))
continue;
reg &= 0x0000f000;
reg >>= 12;
memsize += (0x800000ULL << reg);
}
return memsize;
}
static void ibm_akebono_fixups(void)
{
void *emac;
u32 reg;
dt_fixup_memory(0x0ULL, ibm_akebono_memsize);
/* Fixup the SD timeout frequency */
mtdcrx(CCTL0_MCO4, 0x1);
/* Disable SD high-speed mode (which seems to be broken) */
reg = mfdcrx(CCTL0_MCO2) & ~0x2;
mtdcrx(CCTL0_MCO2, reg);
/* Set the MAC address */
emac = finddevice("/plb/opb/ethernet");
if (emac > 0) {
if (mac_addr)
setprop(emac, "local-mac-address",
((u8 *) &mac_addr) + 2 , 6);
}
}
void platform_init(char *userdata)
{
unsigned long end_of_ram, avail_ram;
u32 pir_reg;
int node, size;
const u32 *timebase;
int len, i, userdata_len;
char *end;
userdata[USERDATA_LEN - 1] = '\0';
userdata_len = strlen(userdata);
for (i = 0; i < userdata_len - 15; i++) {
if (strncmp(&userdata[i], "local-mac-addr=", 15) == 0) {
if (i > 0 && userdata[i - 1] != ' ') {
/* We've only found a substring ending
* with local-mac-addr so this isn't
* our mac address. */
continue;
}
mac_addr = strtoull(&userdata[i + 15], &end, 16);
/* Remove the "local-mac-addr=<...>" from the kernel
* command line, including the tailing space if
* present. */
if (*end == ' ')
end++;
len = ((int) end) - ((int) &userdata[i]);
memmove(&userdata[i], end,
userdata_len - (len + i) + 1);
break;
}
}
loader_info.cmdline = userdata;
loader_info.cmdline_len = 256;
ibm_akebono_memsize = ibm_akebono_detect_memsize();
if (ibm_akebono_memsize >> 32)
end_of_ram = ~0UL;
else
end_of_ram = ibm_akebono_memsize;
avail_ram = end_of_ram - (unsigned long)_end;
simple_alloc_init(_end, avail_ram, 128, 64);
platform_ops.fixups = ibm_akebono_fixups;
platform_ops.exit = ibm44x_dbcr_reset;
pir_reg = mfspr(SPRN_PIR);
/* Make sure FDT blob is sane */
if (fdt_check_header(_dtb_start) != 0)
fatal("Invalid device tree blob\n");
node = fdt_node_offset_by_prop_value(_dtb_start, -1, "device_type",
"cpu", sizeof("cpu"));
if (!node)
fatal("Cannot find cpu node\n");
timebase = fdt_getprop(_dtb_start, node, "timebase-frequency", &size);
if (timebase && (size == 4))
timebase_period_ns = 1000000000 / *timebase;
fdt_set_boot_cpuid_phys(_dtb_start, pir_reg);
fdt_init(_dtb_start);
serial_console_init();
}
...@@ -45,7 +45,7 @@ udelay: ...@@ -45,7 +45,7 @@ udelay:
mfspr r4,SPRN_PVR mfspr r4,SPRN_PVR
srwi r4,r4,16 srwi r4,r4,16
cmpwi 0,r4,1 /* 601 ? */ cmpwi 0,r4,1 /* 601 ? */
bne .udelay_not_601 bne .Ludelay_not_601
00: li r0,86 /* Instructions / microsecond? */ 00: li r0,86 /* Instructions / microsecond? */
mtctr r0 mtctr r0
10: addi r0,r0,0 /* NOP */ 10: addi r0,r0,0 /* NOP */
...@@ -54,7 +54,7 @@ udelay: ...@@ -54,7 +54,7 @@ udelay:
bne 00b bne 00b
blr blr
.udelay_not_601: .Ludelay_not_601:
mulli r4,r3,1000 /* nanoseconds */ mulli r4,r3,1000 /* nanoseconds */
/* Change r4 to be the number of ticks using: /* Change r4 to be the number of ticks using:
* (nanoseconds + (timebase_period_ns - 1 )) / timebase_period_ns * (nanoseconds + (timebase_period_ns - 1 )) / timebase_period_ns
......
...@@ -40,6 +40,7 @@ cacheit= ...@@ -40,6 +40,7 @@ cacheit=
binary= binary=
gzip=.gz gzip=.gz
pie= pie=
format=
# cross-compilation prefix # cross-compilation prefix
CROSS= CROSS=
...@@ -136,6 +137,14 @@ if [ -z "$kernel" ]; then ...@@ -136,6 +137,14 @@ if [ -z "$kernel" ]; then
kernel=vmlinux kernel=vmlinux
fi fi
elfformat="`${CROSS}objdump -p "$kernel" | grep 'file format' | awk '{print $4}'`"
case "$elfformat" in
elf64-powerpcle) format=elf64lppc ;;
elf64-powerpc) format=elf32ppc ;;
elf32-powerpc) format=elf32ppc ;;
esac
platformo=$object/"$platform".o platformo=$object/"$platform".o
lds=$object/zImage.lds lds=$object/zImage.lds
ext=strip ext=strip
...@@ -152,8 +161,12 @@ of) ...@@ -152,8 +161,12 @@ of)
make_space=n make_space=n
;; ;;
pseries) pseries)
platformo="$object/of.o $object/epapr.o" platformo="$object/pseries-head.o $object/of.o $object/epapr.o"
link_address='0x4000000' link_address='0x4000000'
if [ "$format" != "elf32ppc" ]; then
link_address=
pie=-pie
fi
make_space=n make_space=n
;; ;;
maple) maple)
...@@ -257,6 +270,9 @@ gamecube|wii) ...@@ -257,6 +270,9 @@ gamecube|wii)
treeboot-currituck) treeboot-currituck)
link_address='0x1000000' link_address='0x1000000'
;; ;;
treeboot-akebono)
link_address='0x1000000'
;;
treeboot-iss4xx-mpic) treeboot-iss4xx-mpic)
platformo="$object/treeboot-iss4xx.o" platformo="$object/treeboot-iss4xx.o"
;; ;;
...@@ -379,7 +395,7 @@ if [ "$platform" != "miboot" ]; then ...@@ -379,7 +395,7 @@ if [ "$platform" != "miboot" ]; then
if [ -n "$link_address" ] ; then if [ -n "$link_address" ] ; then
text_start="-Ttext $link_address" text_start="-Ttext $link_address"
fi fi
${CROSS}ld -m elf32ppc -T $lds $text_start $pie -o "$ofile" \ ${CROSS}ld -m $format -T $lds $text_start $pie -o "$ofile" \
$platformo $tmp $object/wrapper.a $platformo $tmp $object/wrapper.a
rm $tmp rm $tmp
fi fi
......
#include <asm-generic/vmlinux.lds.h>
#ifdef CONFIG_PPC64_BOOT_WRAPPER
OUTPUT_ARCH(powerpc:common64)
#else
OUTPUT_ARCH(powerpc:common) OUTPUT_ARCH(powerpc:common)
#endif
ENTRY(_zimage_start) ENTRY(_zimage_start)
EXTERN(_zimage_start) EXTERN(_zimage_start)
SECTIONS SECTIONS
...@@ -16,7 +22,9 @@ SECTIONS ...@@ -16,7 +22,9 @@ SECTIONS
*(.rodata*) *(.rodata*)
*(.data*) *(.data*)
*(.sdata*) *(.sdata*)
#ifndef CONFIG_PPC64_BOOT_WRAPPER
*(.got2) *(.got2)
#endif
} }
.dynsym : { *(.dynsym) } .dynsym : { *(.dynsym) }
.dynstr : { *(.dynstr) } .dynstr : { *(.dynstr) }
...@@ -27,7 +35,13 @@ SECTIONS ...@@ -27,7 +35,13 @@ SECTIONS
} }
.hash : { *(.hash) } .hash : { *(.hash) }
.interp : { *(.interp) } .interp : { *(.interp) }
.rela.dyn : { *(.rela*) } .rela.dyn :
{
#ifdef CONFIG_PPC64_BOOT_WRAPPER
__rela_dyn_start = .;
#endif
*(.rela*)
}
. = ALIGN(8); . = ALIGN(8);
.kernel:dtb : .kernel:dtb :
...@@ -53,6 +67,15 @@ SECTIONS ...@@ -53,6 +67,15 @@ SECTIONS
_initrd_end = .; _initrd_end = .;
} }
#ifdef CONFIG_PPC64_BOOT_WRAPPER
.got :
{
__toc_start = .;
*(.got)
*(.toc)
}
#endif
. = ALIGN(4096); . = ALIGN(4096);
.bss : .bss :
{ {
......
CONFIG_44x=y
CONFIG_SMP=y
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_BLK_DEV_INITRD=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_EXPERT=y
CONFIG_KALLSYMS_ALL=y
# CONFIG_SLUB_CPU_PARTIAL is not set
CONFIG_PROFILING=y
CONFIG_OPROFILE=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
# CONFIG_BLK_DEV_BSG is not set
# CONFIG_POWERNV_MSI is not set
CONFIG_PPC_47x=y
# CONFIG_EBONY is not set
CONFIG_AKEBONO=y
CONFIG_HIGHMEM=y
CONFIG_HZ_100=y
CONFIG_IRQ_ALL_CPUS=y
# CONFIG_COMPACTION is not set
CONFIG_CMDLINE_BOOL=y
CONFIG_CMDLINE=""
# CONFIG_SUSPEND is not set
CONFIG_PCI_MSI=y
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_INET=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_IPV6 is not set
CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
CONFIG_DEVTMPFS=y
CONFIG_DEVTMPFS_MOUNT=y
CONFIG_CONNECTOR=y
CONFIG_MTD=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_JEDECPROBE=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_PHYSMAP_OF=y
CONFIG_PROC_DEVICETREE=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=35000
# CONFIG_SCSI_PROC_FS is not set
CONFIG_BLK_DEV_SD=y
# CONFIG_SCSI_LOWLEVEL is not set
# CONFIG_SATA_PMP is not set
# CONFIG_ATA_SFF is not set
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_ALTEON is not set
# CONFIG_NET_VENDOR_AMD is not set
# CONFIG_NET_VENDOR_ARC is not set
# CONFIG_NET_VENDOR_ATHEROS is not set
# CONFIG_NET_CADENCE is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_BROCADE is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CISCO is not set
# CONFIG_NET_VENDOR_DEC is not set
# CONFIG_NET_VENDOR_DLINK is not set
# CONFIG_NET_VENDOR_EMULEX is not set
# CONFIG_NET_VENDOR_EXAR is not set
# CONFIG_NET_VENDOR_HP is not set
CONFIG_IBM_EMAC=y
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MELLANOX is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_REALTEK is not set
# CONFIG_NET_VENDOR_RDC is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
# CONFIG_NET_VENDOR_VIA is not set
# CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_NET_VENDOR_XILINX is not set
# CONFIG_KEYBOARD_ATKBD is not set
# CONFIG_MOUSE_PS2 is not set
# CONFIG_SERIO is not set
# CONFIG_VT is not set
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
CONFIG_SERIAL_OF_PLATFORM=y
# CONFIG_HW_RANDOM is not set
CONFIG_I2C_CHARDEV=y
# CONFIG_HWMON is not set
CONFIG_THERMAL=y
# CONFIG_USB_DEFAULT_PERSIST is not set
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_OHCI_HCD=y
# CONFIG_USB_OHCI_HCD_PCI is not set
CONFIG_USB_STORAGE=y
CONFIG_MMC=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_M41T80=y
CONFIG_EXT2_FS=y
CONFIG_EXT3_FS=y
# CONFIG_EXT3_DEFAULTS_TO_ORDERED is not set
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
# CONFIG_DNOTIFY is not set
# CONFIG_INOTIFY_USER is not set
CONFIG_VFAT_FS=y
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
CONFIG_CRAMFS=y
# CONFIG_NETWORK_FILESYSTEMS is not set
CONFIG_NLS_DEFAULT="n"
CONFIG_NLS_CODEPAGE_437=y
CONFIG_NLS_ISO8859_1=y
CONFIG_DEBUG_INFO=y
CONFIG_DEBUG_FS=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_XMON=y
CONFIG_XMON_DEFAULT=y
CONFIG_PPC_EARLY_DEBUG=y
CONFIG_PPC_EARLY_DEBUG_44x_PHYSLOW=0x00010000
CONFIG_PPC_EARLY_DEBUG_44x_PHYSHIGH=0x33f
CONFIG_CRYPTO_PCBC=y
CONFIG_CRYPTO_MD5=y
CONFIG_CRYPTO_SHA1_PPC=y
CONFIG_CRYPTO_DES=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_HW is not set
CONFIG_PPC_85xx=y
CONFIG_SMP=y
CONFIG_NR_CPUS=8
CONFIG_SYSVIPC=y
CONFIG_POSIX_MQUEUE=y
CONFIG_AUDIT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_IKCONFIG=y
CONFIG_IKCONFIG_PROC=y
CONFIG_LOG_BUF_SHIFT=14
CONFIG_CGROUPS=y
CONFIG_CGROUP_SCHED=y
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_KALLSYMS_ALL=y
CONFIG_EMBEDDED=y
CONFIG_PERF_EVENTS=y
CONFIG_SLAB=y
CONFIG_MODULES=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_BLK_DEV_BSG is not set
CONFIG_PARTITION_ADVANCED=y
CONFIG_MAC_PARTITION=y
CONFIG_CORENET_GENERIC=y
CONFIG_MPIC_MSGR=y
CONFIG_HIGHMEM=y
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
CONFIG_BINFMT_MISC=m
CONFIG_KEXEC=y
CONFIG_FORCE_MAX_ZONEORDER=13
CONFIG_PCI=y
CONFIG_PCIEPORTBUS=y
# CONFIG_PCIEASPM is not set
CONFIG_PCI_MSI=y
CONFIG_ADVANCED_OPTIONS=y
CONFIG_LOWMEM_SIZE_BOOL=y
CONFIG_LOWMEM_SIZE=0x20000000
CONFIG_NET=y
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM_USER=y
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_STATISTICS=y
CONFIG_NET_KEY=y
CONFIG_NET_KEY_MIGRATE=y
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
CONFIG_IP_PNP=y
CONFIG_IP_PNP_DHCP=y
CONFIG_IP_PNP_BOOTP=y
CONFIG_IP_PNP_RARP=y
CONFIG_NET_IPIP=y
CONFIG_IP_MROUTE=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
CONFIG_INET_AH=y
CONFIG_INET_ESP=y
CONFIG_INET_IPCOMP=y
# CONFIG_INET_LRO is not set
CONFIG_IPV6=y
CONFIG_IP_SCTP=m
CONFIG_TIPC=y
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CBQ=y
CONFIG_NET_SCH_HTB=y
CONFIG_NET_SCH_HFSC=y
CONFIG_NET_SCH_PRIO=y
CONFIG_NET_SCH_MULTIQ=y
CONFIG_NET_SCH_RED=y
CONFIG_NET_SCH_SFQ=y
CONFIG_NET_SCH_TEQL=y
CONFIG_NET_SCH_TBF=y
CONFIG_NET_SCH_GRED=y
CONFIG_NET_CLS_BASIC=y
CONFIG_NET_CLS_TCINDEX=y
CONFIG_NET_CLS_U32=y
CONFIG_CLS_U32_PERF=y
CONFIG_CLS_U32_MARK=y
CONFIG_NET_CLS_FLOW=y
CONFIG_NET_CLS_CGROUP=y
CONFIG_UEVENT_HELPER_PATH="/sbin/mdev"
CONFIG_DEVTMPFS=y
CONFIG_MTD=y
CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_M25P80=y
CONFIG_MTD_PHRAM=y
CONFIG_MTD_NAND=y
CONFIG_MTD_NAND_ECC_BCH=y
CONFIG_MTD_NAND_FSL_ELBC=y
CONFIG_MTD_UBI=y
CONFIG_MTD_UBI_GLUEBI=y
CONFIG_BLK_DEV_LOOP=y
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_COUNT=2
CONFIG_BLK_DEV_RAM_SIZE=2048
CONFIG_EEPROM_AT24=y
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
CONFIG_CHR_DEV_ST=y
CONFIG_BLK_DEV_SR=y
CONFIG_CHR_DEV_SG=y
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SYM53C8XX_2=y
CONFIG_NETDEVICES=y
# CONFIG_NET_VENDOR_3COM is not set
# CONFIG_NET_VENDOR_ADAPTEC is not set
# CONFIG_NET_VENDOR_ALTEON is not set
# CONFIG_NET_VENDOR_AMD is not set
# CONFIG_NET_VENDOR_ATHEROS is not set
# CONFIG_NET_CADENCE is not set
# CONFIG_NET_VENDOR_BROADCOM is not set
# CONFIG_NET_VENDOR_BROCADE is not set
# CONFIG_NET_VENDOR_CHELSIO is not set
# CONFIG_NET_VENDOR_CISCO is not set
# CONFIG_NET_VENDOR_DEC is not set
# CONFIG_NET_VENDOR_DLINK is not set
# CONFIG_NET_VENDOR_EMULEX is not set
# CONFIG_NET_VENDOR_EXAR is not set
CONFIG_FSL_PQ_MDIO=y
CONFIG_FSL_XGMAC_MDIO=y
# CONFIG_NET_VENDOR_HP is not set
# CONFIG_NET_VENDOR_INTEL is not set
# CONFIG_NET_VENDOR_MARVELL is not set
# CONFIG_NET_VENDOR_MELLANOX is not set
# CONFIG_NET_VENDOR_MICREL is not set
# CONFIG_NET_VENDOR_MICROCHIP is not set
# CONFIG_NET_VENDOR_MYRI is not set
# CONFIG_NET_VENDOR_NATSEMI is not set
# CONFIG_NET_VENDOR_NVIDIA is not set
# CONFIG_NET_VENDOR_OKI is not set
# CONFIG_NET_PACKET_ENGINE is not set
# CONFIG_NET_VENDOR_QLOGIC is not set
# CONFIG_NET_VENDOR_REALTEK is not set
# CONFIG_NET_VENDOR_RDC is not set
# CONFIG_NET_VENDOR_SEEQ is not set
# CONFIG_NET_VENDOR_SILAN is not set
# CONFIG_NET_VENDOR_SIS is not set
# CONFIG_NET_VENDOR_SMSC is not set
# CONFIG_NET_VENDOR_STMICRO is not set
# CONFIG_NET_VENDOR_SUN is not set
# CONFIG_NET_VENDOR_TEHUTI is not set
# CONFIG_NET_VENDOR_TI is not set
# CONFIG_NET_VENDOR_VIA is not set
# CONFIG_NET_VENDOR_WIZNET is not set
# CONFIG_NET_VENDOR_XILINX is not set
CONFIG_MARVELL_PHY=y
CONFIG_VITESSE_PHY=y
CONFIG_FIXED_PHY=y
# CONFIG_WLAN is not set
# CONFIG_INPUT_MOUSEDEV is not set
# CONFIG_INPUT_KEYBOARD is not set
# CONFIG_INPUT_MOUSE is not set
CONFIG_SERIO_LIBPS2=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_PPC_EPAPR_HV_BYTECHAN=y
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_DETECT_IRQ=y
CONFIG_SERIAL_8250_RSA=y
CONFIG_NVRAM=y
CONFIG_I2C=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_MUX=y
CONFIG_I2C_MUX_PCA954x=y
CONFIG_I2C_MPC=y
CONFIG_SPI=y
CONFIG_SPI_FSL_SPI=y
CONFIG_SPI_FSL_ESPI=y
CONFIG_SPI_SPIDEV=m
CONFIG_PTP_1588_CLOCK=y
# CONFIG_HWMON is not set
# CONFIG_USB_SUPPORT is not set
CONFIG_EDAC=y
CONFIG_EDAC_MM_EDAC=y
CONFIG_EDAC_MPC85XX=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_DRV_DS3232=y
CONFIG_RTC_DRV_CMOS=y
CONFIG_UIO=y
CONFIG_STAGING=y
# CONFIG_NET_VENDOR_SILICOM is not set
CONFIG_CLK_PPC_CORENET=y
CONFIG_EXT2_FS=y
CONFIG_NTFS_FS=y
CONFIG_PROC_KCORE=y
CONFIG_TMPFS=y
CONFIG_JFFS2_FS=y
CONFIG_UBIFS_FS=y
CONFIG_CRAMFS=y
CONFIG_SQUASHFS=y
CONFIG_SQUASHFS_XZ=y
CONFIG_NFS_FS=y
CONFIG_NFS_V4=y
CONFIG_ROOT_NFS=y
CONFIG_NLS_ISO8859_1=y
CONFIG_NLS_UTF8=m
CONFIG_CRC_ITU_T=m
CONFIG_DEBUG_INFO=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_DEBUG_SHIRQ=y
CONFIG_DETECT_HUNG_TASK=y
CONFIG_SCHEDSTATS=y
CONFIG_RCU_TRACE=y
CONFIG_UPROBE_EVENT=y
CONFIG_CRYPTO_NULL=y
CONFIG_CRYPTO_PCBC=m
CONFIG_CRYPTO_MD4=y
CONFIG_CRYPTO_SHA256=y
CONFIG_CRYPTO_SHA512=y
# CONFIG_CRYPTO_ANSI_CPRNG is not set
CONFIG_CRYPTO_DEV_FSL_CAAM=y
...@@ -72,6 +72,7 @@ CONFIG_MTD_CMDLINE_PARTS=y ...@@ -72,6 +72,7 @@ CONFIG_MTD_CMDLINE_PARTS=y
CONFIG_MTD_CHAR=y CONFIG_MTD_CHAR=y
CONFIG_MTD_BLOCK=y CONFIG_MTD_BLOCK=y
CONFIG_MTD_CFI=y CONFIG_MTD_CFI=y
CONFIG_MTD_CFI_INTELEXT=y
CONFIG_MTD_CFI_AMDSTD=y CONFIG_MTD_CFI_AMDSTD=y
CONFIG_MTD_PHYSMAP_OF=y CONFIG_MTD_PHYSMAP_OF=y
CONFIG_MTD_M25P80=y CONFIG_MTD_M25P80=y
......
...@@ -32,7 +32,6 @@ CONFIG_P1010_RDB=y ...@@ -32,7 +32,6 @@ CONFIG_P1010_RDB=y
CONFIG_P1022_DS=y CONFIG_P1022_DS=y
CONFIG_P1022_RDK=y CONFIG_P1022_RDK=y
CONFIG_P1023_RDB=y CONFIG_P1023_RDB=y
CONFIG_P1023_RDS=y
CONFIG_SOCRATES=y CONFIG_SOCRATES=y
CONFIG_KSI8560=y CONFIG_KSI8560=y
CONFIG_XES_MPC85xx=y CONFIG_XES_MPC85xx=y
......
...@@ -35,7 +35,6 @@ CONFIG_P1010_RDB=y ...@@ -35,7 +35,6 @@ CONFIG_P1010_RDB=y
CONFIG_P1022_DS=y CONFIG_P1022_DS=y
CONFIG_P1022_RDK=y CONFIG_P1022_RDK=y
CONFIG_P1023_RDB=y CONFIG_P1023_RDB=y
CONFIG_P1023_RDS=y
CONFIG_SOCRATES=y CONFIG_SOCRATES=y
CONFIG_KSI8560=y CONFIG_KSI8560=y
CONFIG_XES_MPC85xx=y CONFIG_XES_MPC85xx=y
......
...@@ -42,15 +42,47 @@ void __patch_exception(int exc, unsigned long addr); ...@@ -42,15 +42,47 @@ void __patch_exception(int exc, unsigned long addr);
} while (0) } while (0)
#endif #endif
#define OP_RT_RA_MASK 0xffff0000UL
#define LIS_R2 0x3c020000UL
#define ADDIS_R2_R12 0x3c4c0000UL
#define ADDI_R2_R2 0x38420000UL
static inline unsigned long ppc_function_entry(void *func) static inline unsigned long ppc_function_entry(void *func)
{ {
#ifdef CONFIG_PPC64 #if defined(CONFIG_PPC64)
#if defined(_CALL_ELF) && _CALL_ELF == 2
u32 *insn = func;
/* /*
* On PPC64 the function pointer actually points to the function's * A PPC64 ABIv2 function may have a local and a global entry
* descriptor. The first entry in the descriptor is the address * point. We need to use the local entry point when patching
* of the function text. * functions, so identify and step over the global entry point
* sequence.
*
* The global entry point sequence is always of the form:
*
* addis r2,r12,XXXX
* addi r2,r2,XXXX
*
* A linker optimisation may convert the addis to lis:
*
* lis r2,XXXX
* addi r2,r2,XXXX
*/
if ((((*insn & OP_RT_RA_MASK) == ADDIS_R2_R12) ||
((*insn & OP_RT_RA_MASK) == LIS_R2)) &&
((*(insn+1) & OP_RT_RA_MASK) == ADDI_R2_R2))
return (unsigned long)(insn + 2);
else
return (unsigned long)func;
#else
/*
* On PPC64 ABIv1 the function pointer actually points to the
* function's descriptor. The first entry in the descriptor is the
* address of the function text.
*/ */
return ((func_descr_t *)func)->entry; return ((func_descr_t *)func)->entry;
#endif
#else #else
return (unsigned long)func; return (unsigned long)func;
#endif #endif
......
...@@ -2,9 +2,9 @@ ...@@ -2,9 +2,9 @@
#define _ASM_POWERPC_CONTEXT_TRACKING_H #define _ASM_POWERPC_CONTEXT_TRACKING_H
#ifdef CONFIG_CONTEXT_TRACKING #ifdef CONFIG_CONTEXT_TRACKING
#define SCHEDULE_USER bl .schedule_user #define SCHEDULE_USER bl schedule_user
#else #else
#define SCHEDULE_USER bl .schedule #define SCHEDULE_USER bl schedule
#endif #endif
#endif #endif
...@@ -18,10 +18,12 @@ ...@@ -18,10 +18,12 @@
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
extern int threads_per_core; extern int threads_per_core;
extern int threads_per_subcore;
extern int threads_shift; extern int threads_shift;
extern cpumask_t threads_core_mask; extern cpumask_t threads_core_mask;
#else #else
#define threads_per_core 1 #define threads_per_core 1
#define threads_per_subcore 1
#define threads_shift 0 #define threads_shift 0
#define threads_core_mask (CPU_MASK_CPU0) #define threads_core_mask (CPU_MASK_CPU0)
#endif #endif
...@@ -74,6 +76,11 @@ static inline int cpu_thread_in_core(int cpu) ...@@ -74,6 +76,11 @@ static inline int cpu_thread_in_core(int cpu)
return cpu & (threads_per_core - 1); return cpu & (threads_per_core - 1);
} }
static inline int cpu_thread_in_subcore(int cpu)
{
return cpu & (threads_per_subcore - 1);
}
static inline int cpu_first_thread_sibling(int cpu) static inline int cpu_first_thread_sibling(int cpu)
{ {
return cpu & ~(threads_per_core - 1); return cpu & ~(threads_per_core - 1);
......
...@@ -46,7 +46,8 @@ static inline int debugger_break_match(struct pt_regs *regs) { return 0; } ...@@ -46,7 +46,8 @@ static inline int debugger_break_match(struct pt_regs *regs) { return 0; }
static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; } static inline int debugger_fault_handler(struct pt_regs *regs) { return 0; }
#endif #endif
int set_breakpoint(struct arch_hw_breakpoint *brk); void set_breakpoint(struct arch_hw_breakpoint *brk);
void __set_breakpoint(struct arch_hw_breakpoint *brk);
#ifdef CONFIG_PPC_ADV_DEBUG_REGS #ifdef CONFIG_PPC_ADV_DEBUG_REGS
extern void do_send_trap(struct pt_regs *regs, unsigned long address, extern void do_send_trap(struct pt_regs *regs, unsigned long address,
unsigned long error_code, int signal_code, int brkpt); unsigned long error_code, int signal_code, int brkpt);
......
...@@ -32,6 +32,22 @@ struct device_node; ...@@ -32,6 +32,22 @@ struct device_node;
#ifdef CONFIG_EEH #ifdef CONFIG_EEH
/* EEH subsystem flags */
#define EEH_ENABLED 0x1 /* EEH enabled */
#define EEH_FORCE_DISABLED 0x2 /* EEH disabled */
#define EEH_PROBE_MODE_DEV 0x4 /* From PCI device */
#define EEH_PROBE_MODE_DEVTREE 0x8 /* From device tree */
/*
* Delay for PE reset, all in ms
*
* PCI specification has reset hold time of 100 milliseconds.
* We have 250 milliseconds here. The PCI bus settlement time
* is specified as 1.5 seconds and we have 1.8 seconds.
*/
#define EEH_PE_RST_HOLD_TIME 250
#define EEH_PE_RST_SETTLE_TIME 1800
/* /*
* The struct is used to trace PE related EEH functionality. * The struct is used to trace PE related EEH functionality.
* In theory, there will have one instance of the struct to * In theory, there will have one instance of the struct to
...@@ -53,7 +69,7 @@ struct device_node; ...@@ -53,7 +69,7 @@ struct device_node;
#define EEH_PE_ISOLATED (1 << 0) /* Isolated PE */ #define EEH_PE_ISOLATED (1 << 0) /* Isolated PE */
#define EEH_PE_RECOVERING (1 << 1) /* Recovering PE */ #define EEH_PE_RECOVERING (1 << 1) /* Recovering PE */
#define EEH_PE_PHB_DEAD (1 << 2) /* Dead PHB */ #define EEH_PE_RESET (1 << 2) /* PE reset in progress */
#define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */ #define EEH_PE_KEEP (1 << 8) /* Keep PE on hotplug */
...@@ -92,6 +108,7 @@ struct eeh_pe { ...@@ -92,6 +108,7 @@ struct eeh_pe {
#define EEH_DEV_NO_HANDLER (1 << 8) /* No error handler */ #define EEH_DEV_NO_HANDLER (1 << 8) /* No error handler */
#define EEH_DEV_SYSFS (1 << 9) /* Sysfs created */ #define EEH_DEV_SYSFS (1 << 9) /* Sysfs created */
#define EEH_DEV_REMOVED (1 << 10) /* Removed permanently */
struct eeh_dev { struct eeh_dev {
int mode; /* EEH mode */ int mode; /* EEH mode */
...@@ -99,7 +116,9 @@ struct eeh_dev { ...@@ -99,7 +116,9 @@ struct eeh_dev {
int config_addr; /* Config address */ int config_addr; /* Config address */
int pe_config_addr; /* PE config address */ int pe_config_addr; /* PE config address */
u32 config_space[16]; /* Saved PCI config space */ u32 config_space[16]; /* Saved PCI config space */
u8 pcie_cap; /* Saved PCIe capability */ int pcix_cap; /* Saved PCIx capability */
int pcie_cap; /* Saved PCIe capability */
int aer_cap; /* Saved AER capability */
struct eeh_pe *pe; /* Associated PE */ struct eeh_pe *pe; /* Associated PE */
struct list_head list; /* Form link list in the PE */ struct list_head list; /* Form link list in the PE */
struct pci_controller *phb; /* Associated PHB */ struct pci_controller *phb; /* Associated PHB */
...@@ -171,37 +190,40 @@ struct eeh_ops { ...@@ -171,37 +190,40 @@ struct eeh_ops {
int (*restore_config)(struct device_node *dn); int (*restore_config)(struct device_node *dn);
}; };
extern int eeh_subsystem_flags;
extern struct eeh_ops *eeh_ops; extern struct eeh_ops *eeh_ops;
extern bool eeh_subsystem_enabled;
extern raw_spinlock_t confirm_error_lock; extern raw_spinlock_t confirm_error_lock;
extern int eeh_probe_mode;
static inline bool eeh_enabled(void) static inline bool eeh_enabled(void)
{ {
return eeh_subsystem_enabled; if ((eeh_subsystem_flags & EEH_FORCE_DISABLED) ||
!(eeh_subsystem_flags & EEH_ENABLED))
return false;
return true;
} }
static inline void eeh_set_enable(bool mode) static inline void eeh_set_enable(bool mode)
{ {
eeh_subsystem_enabled = mode; if (mode)
eeh_subsystem_flags |= EEH_ENABLED;
else
eeh_subsystem_flags &= ~EEH_ENABLED;
} }
#define EEH_PROBE_MODE_DEV (1<<0) /* From PCI device */
#define EEH_PROBE_MODE_DEVTREE (1<<1) /* From device tree */
static inline void eeh_probe_mode_set(int flag) static inline void eeh_probe_mode_set(int flag)
{ {
eeh_probe_mode = flag; eeh_subsystem_flags |= flag;
} }
static inline int eeh_probe_mode_devtree(void) static inline int eeh_probe_mode_devtree(void)
{ {
return (eeh_probe_mode == EEH_PROBE_MODE_DEVTREE); return (eeh_subsystem_flags & EEH_PROBE_MODE_DEVTREE);
} }
static inline int eeh_probe_mode_dev(void) static inline int eeh_probe_mode_dev(void)
{ {
return (eeh_probe_mode == EEH_PROBE_MODE_DEV); return (eeh_subsystem_flags & EEH_PROBE_MODE_DEV);
} }
static inline void eeh_serialize_lock(unsigned long *flags) static inline void eeh_serialize_lock(unsigned long *flags)
......
...@@ -90,6 +90,8 @@ typedef elf_vrregset_t elf_fpxregset_t; ...@@ -90,6 +90,8 @@ typedef elf_vrregset_t elf_fpxregset_t;
do { \ do { \
if (((ex).e_flags & 0x3) == 2) \ if (((ex).e_flags & 0x3) == 2) \
set_thread_flag(TIF_ELF2ABI); \ set_thread_flag(TIF_ELF2ABI); \
else \
clear_thread_flag(TIF_ELF2ABI); \
if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \ if ((ex).e_ident[EI_CLASS] == ELFCLASS32) \
set_thread_flag(TIF_32BIT); \ set_thread_flag(TIF_32BIT); \
else \ else \
......
...@@ -174,10 +174,10 @@ exc_##label##_book3e: ...@@ -174,10 +174,10 @@ exc_##label##_book3e:
mtlr r16; mtlr r16;
#define TLB_MISS_STATS_D(name) \ #define TLB_MISS_STATS_D(name) \
addi r9,r13,MMSTAT_DSTATS+name; \ addi r9,r13,MMSTAT_DSTATS+name; \
bl .tlb_stat_inc; bl tlb_stat_inc;
#define TLB_MISS_STATS_I(name) \ #define TLB_MISS_STATS_I(name) \
addi r9,r13,MMSTAT_ISTATS+name; \ addi r9,r13,MMSTAT_ISTATS+name; \
bl .tlb_stat_inc; bl tlb_stat_inc;
#define TLB_MISS_STATS_X(name) \ #define TLB_MISS_STATS_X(name) \
ld r8,PACA_EXTLB+EX_TLB_ESR(r13); \ ld r8,PACA_EXTLB+EX_TLB_ESR(r13); \
cmpdi cr2,r8,-1; \ cmpdi cr2,r8,-1; \
...@@ -185,7 +185,7 @@ exc_##label##_book3e: ...@@ -185,7 +185,7 @@ exc_##label##_book3e:
addi r9,r13,MMSTAT_DSTATS+name; \ addi r9,r13,MMSTAT_DSTATS+name; \
b 62f; \ b 62f; \
61: addi r9,r13,MMSTAT_ISTATS+name; \ 61: addi r9,r13,MMSTAT_ISTATS+name; \
62: bl .tlb_stat_inc; 62: bl tlb_stat_inc;
#define TLB_MISS_STATS_SAVE_INFO \ #define TLB_MISS_STATS_SAVE_INFO \
std r14,EX_TLB_ESR(r12); /* save ESR */ std r14,EX_TLB_ESR(r12); /* save ESR */
#define TLB_MISS_STATS_SAVE_INFO_BOLTED \ #define TLB_MISS_STATS_SAVE_INFO_BOLTED \
......
...@@ -517,7 +517,7 @@ label##_relon_hv: \ ...@@ -517,7 +517,7 @@ label##_relon_hv: \
#define DISABLE_INTS RECONCILE_IRQ_STATE(r10,r11) #define DISABLE_INTS RECONCILE_IRQ_STATE(r10,r11)
#define ADD_NVGPRS \ #define ADD_NVGPRS \
bl .save_nvgprs bl save_nvgprs
#define RUNLATCH_ON \ #define RUNLATCH_ON \
BEGIN_FTR_SECTION \ BEGIN_FTR_SECTION \
......
...@@ -61,6 +61,7 @@ struct dyn_arch_ftrace { ...@@ -61,6 +61,7 @@ struct dyn_arch_ftrace {
#endif #endif
#if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__) #if defined(CONFIG_FTRACE_SYSCALLS) && defined(CONFIG_PPC64) && !defined(__ASSEMBLY__)
#if !defined(_CALL_ELF) || _CALL_ELF != 2
#define ARCH_HAS_SYSCALL_MATCH_SYM_NAME #define ARCH_HAS_SYSCALL_MATCH_SYM_NAME
static inline bool arch_syscall_match_sym_name(const char *sym, const char *name) static inline bool arch_syscall_match_sym_name(const char *sym, const char *name)
{ {
...@@ -72,6 +73,7 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name ...@@ -72,6 +73,7 @@ static inline bool arch_syscall_match_sym_name(const char *sym, const char *name
*/ */
return !strcmp(sym + 4, name + 3); return !strcmp(sym + 4, name + 3);
} }
#endif
#endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */ #endif /* CONFIG_FTRACE_SYSCALLS && CONFIG_PPC64 && !__ASSEMBLY__ */
#endif /* _ASM_POWERPC_FTRACE */ #endif /* _ASM_POWERPC_FTRACE */
...@@ -79,7 +79,7 @@ static inline void hw_breakpoint_disable(void) ...@@ -79,7 +79,7 @@ static inline void hw_breakpoint_disable(void)
brk.address = 0; brk.address = 0;
brk.type = 0; brk.type = 0;
brk.len = 0; brk.len = 0;
set_breakpoint(&brk); __set_breakpoint(&brk);
} }
extern void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs); extern void thread_change_pc(struct task_struct *tsk, struct pt_regs *regs);
......
...@@ -20,9 +20,9 @@ ...@@ -20,9 +20,9 @@
*/ */
#define TRACE_WITH_FRAME_BUFFER(func) \ #define TRACE_WITH_FRAME_BUFFER(func) \
mflr r0; \ mflr r0; \
stdu r1, -32(r1); \ stdu r1, -STACK_FRAME_OVERHEAD(r1); \
std r0, 16(r1); \ std r0, 16(r1); \
stdu r1, -32(r1); \ stdu r1, -STACK_FRAME_OVERHEAD(r1); \
bl func; \ bl func; \
ld r1, 0(r1); \ ld r1, 0(r1); \
ld r1, 0(r1); ld r1, 0(r1);
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
* have to call a C function so call a wrapper that saves all the * have to call a C function so call a wrapper that saves all the
* C-clobbered registers. * C-clobbered registers.
*/ */
#define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_on) #define TRACE_ENABLE_INTS TRACE_WITH_FRAME_BUFFER(trace_hardirqs_on)
#define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(.trace_hardirqs_off) #define TRACE_DISABLE_INTS TRACE_WITH_FRAME_BUFFER(trace_hardirqs_off)
/* /*
* This is used by assembly code to soft-disable interrupts first and * This is used by assembly code to soft-disable interrupts first and
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
#include <linux/ptrace.h> #include <linux/ptrace.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#include <asm/probes.h> #include <asm/probes.h>
#include <asm/code-patching.h>
#define __ARCH_WANT_KPROBES_INSN_SLOT #define __ARCH_WANT_KPROBES_INSN_SLOT
...@@ -56,9 +57,9 @@ typedef ppc_opcode_t kprobe_opcode_t; ...@@ -56,9 +57,9 @@ typedef ppc_opcode_t kprobe_opcode_t;
if ((colon = strchr(name, ':')) != NULL) { \ if ((colon = strchr(name, ':')) != NULL) { \
colon++; \ colon++; \
if (*colon != '\0' && *colon != '.') \ if (*colon != '\0' && *colon != '.') \
addr = *(kprobe_opcode_t **)addr; \ addr = (kprobe_opcode_t *)ppc_function_entry(addr); \
} else if (name[0] != '.') \ } else if (name[0] != '.') \
addr = *(kprobe_opcode_t **)addr; \ addr = (kprobe_opcode_t *)ppc_function_entry(addr); \
} else { \ } else { \
char dot_name[KSYM_NAME_LEN]; \ char dot_name[KSYM_NAME_LEN]; \
dot_name[0] = '.'; \ dot_name[0] = '.'; \
......
...@@ -337,6 +337,10 @@ static inline void kvmppc_fast_vcpu_kick(struct kvm_vcpu *vcpu) ...@@ -337,6 +337,10 @@ static inline void kvmppc_fast_vcpu_kick(struct kvm_vcpu *vcpu)
vcpu->kvm->arch.kvm_ops->fast_vcpu_kick(vcpu); vcpu->kvm->arch.kvm_ops->fast_vcpu_kick(vcpu);
} }
extern void kvm_hv_vm_activated(void);
extern void kvm_hv_vm_deactivated(void);
extern bool kvm_hv_mode_active(void);
#else #else
static inline void __init kvm_cma_reserve(void) static inline void __init kvm_cma_reserve(void)
{} {}
...@@ -356,6 +360,9 @@ static inline void kvmppc_fast_vcpu_kick(struct kvm_vcpu *vcpu) ...@@ -356,6 +360,9 @@ static inline void kvmppc_fast_vcpu_kick(struct kvm_vcpu *vcpu)
{ {
kvm_vcpu_kick(vcpu); kvm_vcpu_kick(vcpu);
} }
static inline bool kvm_hv_mode_active(void) { return false; }
#endif #endif
#ifdef CONFIG_KVM_XICS #ifdef CONFIG_KVM_XICS
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
#define _ASM_POWERPC_LINKAGE_H #define _ASM_POWERPC_LINKAGE_H
#ifdef CONFIG_PPC64 #ifdef CONFIG_PPC64
#if !defined(_CALL_ELF) || _CALL_ELF != 2
#define cond_syscall(x) \ #define cond_syscall(x) \
asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \ asm ("\t.weak " #x "\n\t.set " #x ", sys_ni_syscall\n" \
"\t.weak ." #x "\n\t.set ." #x ", .sys_ni_syscall\n") "\t.weak ." #x "\n\t.set ." #x ", .sys_ni_syscall\n")
...@@ -9,5 +10,6 @@ ...@@ -9,5 +10,6 @@
asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \ asm ("\t.globl " #alias "\n\t.set " #alias ", " #name "\n" \
"\t.globl ." #alias "\n\t.set ." #alias ", ." #name) "\t.globl ." #alias "\n\t.set ." #alias ", ." #name)
#endif #endif
#endif
#endif /* _ASM_POWERPC_LINKAGE_H */ #endif /* _ASM_POWERPC_LINKAGE_H */
...@@ -98,6 +98,9 @@ struct machdep_calls { ...@@ -98,6 +98,9 @@ struct machdep_calls {
void (*iommu_save)(void); void (*iommu_save)(void);
void (*iommu_restore)(void); void (*iommu_restore)(void);
#endif #endif
#ifdef CONFIG_MEMORY_HOTPLUG_SPARSE
unsigned long (*memory_block_size)(void);
#endif
#endif /* CONFIG_PPC64 */ #endif /* CONFIG_PPC64 */
void (*pci_dma_dev_setup)(struct pci_dev *dev); void (*pci_dma_dev_setup)(struct pci_dev *dev);
...@@ -113,6 +116,8 @@ struct machdep_calls { ...@@ -113,6 +116,8 @@ struct machdep_calls {
/* Optional, may be NULL. */ /* Optional, may be NULL. */
void (*show_cpuinfo)(struct seq_file *m); void (*show_cpuinfo)(struct seq_file *m);
void (*show_percpuinfo)(struct seq_file *m, int i); void (*show_percpuinfo)(struct seq_file *m, int i);
/* Returns the current operating frequency of "cpu" in Hz */
unsigned long (*get_proc_freq)(unsigned int cpu);
void (*init_IRQ)(void); void (*init_IRQ)(void);
...@@ -241,6 +246,9 @@ struct machdep_calls { ...@@ -241,6 +246,9 @@ struct machdep_calls {
/* Called during PCI resource reassignment */ /* Called during PCI resource reassignment */
resource_size_t (*pcibios_window_alignment)(struct pci_bus *, unsigned long type); resource_size_t (*pcibios_window_alignment)(struct pci_bus *, unsigned long type);
/* Reset the secondary bus of bridge */
void (*pcibios_reset_secondary_bus)(struct pci_dev *dev);
/* Called to shutdown machine specific hardware not already controlled /* Called to shutdown machine specific hardware not already controlled
* by other drivers. * by other drivers.
*/ */
......
...@@ -35,6 +35,7 @@ struct mod_arch_specific { ...@@ -35,6 +35,7 @@ struct mod_arch_specific {
#ifdef __powerpc64__ #ifdef __powerpc64__
unsigned int stubs_section; /* Index of stubs section in module */ unsigned int stubs_section; /* Index of stubs section in module */
unsigned int toc_section; /* What section is the TOC? */ unsigned int toc_section; /* What section is the TOC? */
bool toc_fixed; /* Have we fixed up .TOC.? */
#ifdef CONFIG_DYNAMIC_FTRACE #ifdef CONFIG_DYNAMIC_FTRACE
unsigned long toc; unsigned long toc;
unsigned long tramp; unsigned long tramp;
...@@ -77,6 +78,9 @@ struct mod_arch_specific { ...@@ -77,6 +78,9 @@ struct mod_arch_specific {
# endif /* MODULE */ # endif /* MODULE */
#endif #endif
bool is_module_trampoline(u32 *insns);
int module_trampoline_target(struct module *mod, u32 *trampoline,
unsigned long *target);
struct exception_table_entry; struct exception_table_entry;
void sort_ex_table(struct exception_table_entry *start, void sort_ex_table(struct exception_table_entry *start,
......
This diff is collapsed.
...@@ -92,7 +92,10 @@ struct paca_struct { ...@@ -92,7 +92,10 @@ struct paca_struct {
struct slb_shadow *slb_shadow_ptr; struct slb_shadow *slb_shadow_ptr;
struct dtl_entry *dispatch_log; struct dtl_entry *dispatch_log;
struct dtl_entry *dispatch_log_end; struct dtl_entry *dispatch_log_end;
#endif /* CONFIG_PPC_STD_MMU_64 */
u64 dscr_default; /* per-CPU default DSCR */
#ifdef CONFIG_PPC_STD_MMU_64
/* /*
* Now, starting in cacheline 2, the exception save areas * Now, starting in cacheline 2, the exception save areas
*/ */
......
...@@ -58,6 +58,7 @@ int rtas_write_config(struct pci_dn *, int where, int size, u32 val); ...@@ -58,6 +58,7 @@ int rtas_write_config(struct pci_dn *, int where, int size, u32 val);
int rtas_read_config(struct pci_dn *, int where, int size, u32 *val); int rtas_read_config(struct pci_dn *, int where, int size, u32 *val);
void eeh_pe_state_mark(struct eeh_pe *pe, int state); void eeh_pe_state_mark(struct eeh_pe *pe, int state);
void eeh_pe_state_clear(struct eeh_pe *pe, int state); void eeh_pe_state_clear(struct eeh_pe *pe, int state);
void eeh_pe_dev_mode_mark(struct eeh_pe *pe, int mode);
void eeh_sysfs_add_device(struct pci_dev *pdev); void eeh_sysfs_add_device(struct pci_dev *pdev);
void eeh_sysfs_remove_device(struct pci_dev *pdev); void eeh_sysfs_remove_device(struct pci_dev *pdev);
......
This diff is collapsed.
...@@ -449,7 +449,7 @@ extern unsigned long cpuidle_disable; ...@@ -449,7 +449,7 @@ extern unsigned long cpuidle_disable;
enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF}; enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
extern int powersave_nap; /* set if nap mode can be used in idle loop */ extern int powersave_nap; /* set if nap mode can be used in idle loop */
extern void power7_nap(void); extern void power7_nap(int check_irq);
extern void power7_sleep(void); extern void power7_sleep(void);
extern void flush_instruction_cache(void); extern void flush_instruction_cache(void);
extern void hard_reset_now(void); extern void hard_reset_now(void);
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment