Devicetree updates for 4.20:
- Sync dtc with upstream version v1.4.7-14-gc86da84d30e4 - Work to get rid of direct accesses to struct device_node name and type pointers in preparation for removing them. New helpers for parsing DT cpu nodes and conversions to use the helpers. printk conversions to %pOFn for printing DT node names. Most went thru subystem trees, so this is the remainder. - Fixes to DT child node lookups to actually be restricted to child nodes instead of treewide. - Refactoring of dtb targets out of arch code. This makes the support more uniform and enables building all dtbs on c6x, microblaze, and powerpc. - Various DT binding updates for Renesas r8a7744 SoC - Vendor prefixes for Facebook, OLPC - Restructuring of some ARM binding docs moving some peripheral bindings out of board/SoC binding files - New "secure-chosen" binding for secure world settings on ARM - Dual licensing of 2 DT IRQ binding headers -----BEGIN PGP SIGNATURE----- iQJEBAABCgAuFiEEktVUI4SxYhzZyEuo+vtdtY28YcMFAlvTKWYQHHJvYmhAa2Vy bmVsLm9yZwAKCRD6+121jbxhw8J5EACMAnrTxWQmXfQXOZEVxztcFavH6LP8mh2e 7FZIZ38jzHXXvl81tAg1nBhzFUU/qtvqW8NDCZ9OBxKvp6PFDNhWu241ZodSB1Kw MZWy2A9QC+qbHYCC+SB5gOT0+Py3v7LNCBa5/TxhbFd35THJM8X0FP7gmcCGX593 9Ml1rqawT4mK5XmCpczT0cXxyC4TgVtpfDWZH2KgJTR/kwXVQlOQOGZ8a1y/wrt7 8TLIe7Qy4SFRzjhwbSta1PUehyYfe4uTSsXIJ84kMvNMxinLXQtvd7t9TfsK8p/R WjYUneJskVjtxVrMQfdV4MxyFL1YEt2mYcr0PMKIWxMCgGDAZsHPoUZmjyh/PrCI uiZtEHn3fXpUZAV/xEHHNirJxYyQfHGiksAT+lPrUXYYLCcZ3ZmqiTEYhGoQAfH5 CQPMuxA6yXxp6bov6zJwZSTZtkXciju8aQRhUhlxIfHTqezmGYeql/bnWd+InNuR upANLZBh6D2jTWzDyobconkCCLlVkSqDoqOx725mMl6hIcdH9d2jVX7hwRf077VI 5i3CyPSJOkSOLSdB8bAPYfBoaDtH2bthxieUrkkSbIjbwHO1H6a2lxPeG/zah0a3 ePMGhi7J84UM4VpJEi000cP+bhPumJtJrG7zxP7ldXdfAF436sQ6KRptlcpLpj5i IwMhUQNH+g== =335v -----END PGP SIGNATURE----- Merge tag 'devicetree-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull Devicetree updates from Rob Herring: "A bit bigger than normal as I've been busy this cycle. There's a few things with dependencies and a few things subsystem maintainers didn't pick up, so I'm taking them thru my tree. The fixes from Johan didn't get into linux-next, but they've been waiting for some time now and they are what's left of what subsystem maintainers didn't pick up. Summary: - Sync dtc with upstream version v1.4.7-14-gc86da84d30e4 - Work to get rid of direct accesses to struct device_node name and type pointers in preparation for removing them. New helpers for parsing DT cpu nodes and conversions to use the helpers. printk conversions to %pOFn for printing DT node names. Most went thru subystem trees, so this is the remainder. - Fixes to DT child node lookups to actually be restricted to child nodes instead of treewide. - Refactoring of dtb targets out of arch code. This makes the support more uniform and enables building all dtbs on c6x, microblaze, and powerpc. - Various DT binding updates for Renesas r8a7744 SoC - Vendor prefixes for Facebook, OLPC - Restructuring of some ARM binding docs moving some peripheral bindings out of board/SoC binding files - New "secure-chosen" binding for secure world settings on ARM - Dual licensing of 2 DT IRQ binding headers" * tag 'devicetree-for-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (78 commits) ARM: dt: relicense two DT binding IRQ headers power: supply: twl4030-charger: fix OF sibling-node lookup NFC: nfcmrvl_uart: fix OF child-node lookup net: stmmac: dwmac-sun8i: fix OF child-node lookup net: bcmgenet: fix OF child-node lookup drm/msm: fix OF child-node lookup drm/mediatek: fix OF sibling-node lookup of: Add missing exports of node name compare functions dt-bindings: Add OLPC vendor prefix dt-bindings: misc: bk4: Add device tree binding for Liebherr's BK4 SPI bus dt-bindings: thermal: samsung: Add SPDX license identifier dt-bindings: clock: samsung: Add SPDX license identifiers dt-bindings: timer: ostm: Add R7S9210 support dt-bindings: phy: rcar-gen2: Add r8a7744 support dt-bindings: can: rcar_can: Add r8a7744 support dt-bindings: timer: renesas, cmt: Document r8a7744 CMT support dt-bindings: watchdog: renesas-wdt: Document r8a7744 support dt-bindings: thermal: rcar: Add device tree support for r8a7744 Documentation: dt: Add binding for /secure-chosen/stdout-path dt-bindings: arm: zte: Move sysctrl bindings to their own doc ...
This commit is contained in:
commit
b27186abb3
|
@ -14,75 +14,3 @@ compatible: must contain "al,alpine"
|
|||
|
||||
...
|
||||
}
|
||||
|
||||
* CPU node:
|
||||
|
||||
The Alpine platform includes cortex-a15 cores.
|
||||
enable-method: must be "al,alpine-smp" to allow smp [1]
|
||||
|
||||
Example:
|
||||
|
||||
cpus {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
enable-method = "al,alpine-smp";
|
||||
|
||||
cpu@0 {
|
||||
compatible = "arm,cortex-a15";
|
||||
device_type = "cpu";
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
cpu@1 {
|
||||
compatible = "arm,cortex-a15";
|
||||
device_type = "cpu";
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
cpu@2 {
|
||||
compatible = "arm,cortex-a15";
|
||||
device_type = "cpu";
|
||||
reg = <2>;
|
||||
};
|
||||
|
||||
cpu@3 {
|
||||
compatible = "arm,cortex-a15";
|
||||
device_type = "cpu";
|
||||
reg = <3>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
* Alpine CPU resume registers
|
||||
|
||||
The CPU resume register are used to define required resume address after
|
||||
reset.
|
||||
|
||||
Properties:
|
||||
- compatible : Should contain "al,alpine-cpu-resume".
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
||||
Example:
|
||||
|
||||
cpu_resume {
|
||||
compatible = "al,alpine-cpu-resume";
|
||||
reg = <0xfbff5ed0 0x30>;
|
||||
};
|
||||
|
||||
* Alpine System-Fabric Service Registers
|
||||
|
||||
The System-Fabric Service Registers allow various operation on CPU and
|
||||
system fabric, like powering CPUs off.
|
||||
|
||||
Properties:
|
||||
- compatible : Should contain "al,alpine-sysfabric-service" and "syscon".
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
||||
Example:
|
||||
|
||||
nb_service {
|
||||
compatible = "al,alpine-sysfabric-service", "syscon";
|
||||
reg = <0xfb070000 0x10000>;
|
||||
};
|
||||
|
||||
[1] arm/cpu-enable-method/al,alpine-smp
|
||||
|
|
|
@ -70,173 +70,3 @@ compatible: must be one of:
|
|||
- "atmel,samv71q19"
|
||||
- "atmel,samv71q20"
|
||||
- "atmel,samv71q21"
|
||||
|
||||
Chipid required properties:
|
||||
- compatible: Should be "atmel,sama5d2-chipid"
|
||||
- reg : Should contain registers location and length
|
||||
|
||||
PIT Timer required properties:
|
||||
- compatible: Should be "atmel,at91sam9260-pit"
|
||||
- reg: Should contain registers location and length
|
||||
- interrupts: Should contain interrupt for the PIT which is the IRQ line
|
||||
shared across all System Controller members.
|
||||
|
||||
System Timer (ST) required properties:
|
||||
- compatible: Should be "atmel,at91rm9200-st", "syscon", "simple-mfd"
|
||||
- reg: Should contain registers location and length
|
||||
- interrupts: Should contain interrupt for the ST which is the IRQ line
|
||||
shared across all System Controller members.
|
||||
- clocks: phandle to input clock.
|
||||
Its subnodes can be:
|
||||
- watchdog: compatible should be "atmel,at91rm9200-wdt"
|
||||
|
||||
RSTC Reset Controller required properties:
|
||||
- compatible: Should be "atmel,<chip>-rstc".
|
||||
<chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
|
||||
- reg: Should contain registers location and length
|
||||
- clocks: phandle to input clock.
|
||||
|
||||
Example:
|
||||
|
||||
rstc@fffffd00 {
|
||||
compatible = "atmel,at91sam9260-rstc";
|
||||
reg = <0xfffffd00 0x10>;
|
||||
clocks = <&clk32k>;
|
||||
};
|
||||
|
||||
RAMC SDRAM/DDR Controller required properties:
|
||||
- compatible: Should be "atmel,at91rm9200-sdramc", "syscon"
|
||||
"atmel,at91sam9260-sdramc",
|
||||
"atmel,at91sam9g45-ddramc",
|
||||
"atmel,sama5d3-ddramc",
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
Examples:
|
||||
|
||||
ramc0: ramc@ffffe800 {
|
||||
compatible = "atmel,at91sam9g45-ddramc";
|
||||
reg = <0xffffe800 0x200>;
|
||||
};
|
||||
|
||||
SHDWC Shutdown Controller
|
||||
|
||||
required properties:
|
||||
- compatible: Should be "atmel,<chip>-shdwc".
|
||||
<chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
|
||||
- reg: Should contain registers location and length
|
||||
- clocks: phandle to input clock.
|
||||
|
||||
optional properties:
|
||||
- atmel,wakeup-mode: String, operation mode of the wakeup mode.
|
||||
Supported values are: "none", "high", "low", "any".
|
||||
- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).
|
||||
|
||||
optional at91sam9260 properties:
|
||||
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
|
||||
|
||||
optional at91sam9rl properties:
|
||||
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
|
||||
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
|
||||
|
||||
optional at91sam9x5 properties:
|
||||
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
|
||||
|
||||
Example:
|
||||
|
||||
shdwc@fffffd10 {
|
||||
compatible = "atmel,at91sam9260-shdwc";
|
||||
reg = <0xfffffd10 0x10>;
|
||||
clocks = <&clk32k>;
|
||||
};
|
||||
|
||||
SHDWC SAMA5D2-Compatible Shutdown Controller
|
||||
|
||||
1) shdwc node
|
||||
|
||||
required properties:
|
||||
- compatible: should be "atmel,sama5d2-shdwc".
|
||||
- reg: should contain registers location and length
|
||||
- clocks: phandle to input clock.
|
||||
- #address-cells: should be one. The cell is the wake-up input index.
|
||||
- #size-cells: should be zero.
|
||||
|
||||
optional properties:
|
||||
|
||||
- debounce-delay-us: minimum wake-up inputs debouncer period in
|
||||
microseconds. It's usually a board-related property.
|
||||
- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up.
|
||||
|
||||
The node contains child nodes for each wake-up input that the platform uses.
|
||||
|
||||
2) input nodes
|
||||
|
||||
Wake-up input nodes are usually described in the "board" part of the Device
|
||||
Tree. Note also that input 0 is linked to the wake-up pin and is frequently
|
||||
used.
|
||||
|
||||
Required properties:
|
||||
- reg: should contain the wake-up input index [0 - 15].
|
||||
|
||||
Optional properties:
|
||||
- atmel,wakeup-active-high: boolean, the corresponding wake-up input described
|
||||
by the child, forces the wake-up of the core power supply on a high level.
|
||||
The default is to be active low.
|
||||
|
||||
Example:
|
||||
|
||||
On the SoC side:
|
||||
shdwc@f8048010 {
|
||||
compatible = "atmel,sama5d2-shdwc";
|
||||
reg = <0xf8048010 0x10>;
|
||||
clocks = <&clk32k>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
atmel,wakeup-rtc-timer;
|
||||
};
|
||||
|
||||
On the board side:
|
||||
shdwc@f8048010 {
|
||||
debounce-delay-us = <976>;
|
||||
|
||||
input@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
input@1 {
|
||||
reg = <1>;
|
||||
atmel,wakeup-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
Special Function Registers (SFR)
|
||||
|
||||
Special Function Registers (SFR) manage specific aspects of the integrated
|
||||
memory, bridge implementations, processor and other functionality not controlled
|
||||
elsewhere.
|
||||
|
||||
required properties:
|
||||
- compatible: Should be "atmel,<chip>-sfr", "syscon" or
|
||||
"atmel,<chip>-sfrbu", "syscon"
|
||||
<chip> can be "sama5d3", "sama5d4" or "sama5d2".
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
sfr@f0038000 {
|
||||
compatible = "atmel,sama5d3-sfr", "syscon";
|
||||
reg = <0xf0038000 0x60>;
|
||||
};
|
||||
|
||||
Security Module (SECUMOD)
|
||||
|
||||
The Security Module macrocell provides all necessary secure functions to avoid
|
||||
voltage, temperature, frequency and mechanical attacks on the chip. It also
|
||||
embeds secure memories that can be scrambled
|
||||
|
||||
required properties:
|
||||
- compatible: Should be "atmel,<chip>-secumod", "syscon".
|
||||
<chip> can be "sama5d2".
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
secumod@fc040000 {
|
||||
compatible = "atmel,sama5d2-secumod", "syscon";
|
||||
reg = <0xfc040000 0x100>;
|
||||
};
|
||||
|
|
|
@ -0,0 +1,171 @@
|
|||
Atmel system registers
|
||||
|
||||
Chipid required properties:
|
||||
- compatible: Should be "atmel,sama5d2-chipid"
|
||||
- reg : Should contain registers location and length
|
||||
|
||||
PIT Timer required properties:
|
||||
- compatible: Should be "atmel,at91sam9260-pit"
|
||||
- reg: Should contain registers location and length
|
||||
- interrupts: Should contain interrupt for the PIT which is the IRQ line
|
||||
shared across all System Controller members.
|
||||
|
||||
System Timer (ST) required properties:
|
||||
- compatible: Should be "atmel,at91rm9200-st", "syscon", "simple-mfd"
|
||||
- reg: Should contain registers location and length
|
||||
- interrupts: Should contain interrupt for the ST which is the IRQ line
|
||||
shared across all System Controller members.
|
||||
- clocks: phandle to input clock.
|
||||
Its subnodes can be:
|
||||
- watchdog: compatible should be "atmel,at91rm9200-wdt"
|
||||
|
||||
RSTC Reset Controller required properties:
|
||||
- compatible: Should be "atmel,<chip>-rstc".
|
||||
<chip> can be "at91sam9260" or "at91sam9g45" or "sama5d3"
|
||||
- reg: Should contain registers location and length
|
||||
- clocks: phandle to input clock.
|
||||
|
||||
Example:
|
||||
|
||||
rstc@fffffd00 {
|
||||
compatible = "atmel,at91sam9260-rstc";
|
||||
reg = <0xfffffd00 0x10>;
|
||||
clocks = <&clk32k>;
|
||||
};
|
||||
|
||||
RAMC SDRAM/DDR Controller required properties:
|
||||
- compatible: Should be "atmel,at91rm9200-sdramc", "syscon"
|
||||
"atmel,at91sam9260-sdramc",
|
||||
"atmel,at91sam9g45-ddramc",
|
||||
"atmel,sama5d3-ddramc",
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
Examples:
|
||||
|
||||
ramc0: ramc@ffffe800 {
|
||||
compatible = "atmel,at91sam9g45-ddramc";
|
||||
reg = <0xffffe800 0x200>;
|
||||
};
|
||||
|
||||
SHDWC Shutdown Controller
|
||||
|
||||
required properties:
|
||||
- compatible: Should be "atmel,<chip>-shdwc".
|
||||
<chip> can be "at91sam9260", "at91sam9rl" or "at91sam9x5".
|
||||
- reg: Should contain registers location and length
|
||||
- clocks: phandle to input clock.
|
||||
|
||||
optional properties:
|
||||
- atmel,wakeup-mode: String, operation mode of the wakeup mode.
|
||||
Supported values are: "none", "high", "low", "any".
|
||||
- atmel,wakeup-counter: Counter on Wake-up 0 (between 0x0 and 0xf).
|
||||
|
||||
optional at91sam9260 properties:
|
||||
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
|
||||
|
||||
optional at91sam9rl properties:
|
||||
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
|
||||
- atmel,wakeup-rtt-timer: boolean to enable Real-time Timer Wake-up.
|
||||
|
||||
optional at91sam9x5 properties:
|
||||
- atmel,wakeup-rtc-timer: boolean to enable Real-time Clock Wake-up.
|
||||
|
||||
Example:
|
||||
|
||||
shdwc@fffffd10 {
|
||||
compatible = "atmel,at91sam9260-shdwc";
|
||||
reg = <0xfffffd10 0x10>;
|
||||
clocks = <&clk32k>;
|
||||
};
|
||||
|
||||
SHDWC SAMA5D2-Compatible Shutdown Controller
|
||||
|
||||
1) shdwc node
|
||||
|
||||
required properties:
|
||||
- compatible: should be "atmel,sama5d2-shdwc".
|
||||
- reg: should contain registers location and length
|
||||
- clocks: phandle to input clock.
|
||||
- #address-cells: should be one. The cell is the wake-up input index.
|
||||
- #size-cells: should be zero.
|
||||
|
||||
optional properties:
|
||||
|
||||
- debounce-delay-us: minimum wake-up inputs debouncer period in
|
||||
microseconds. It's usually a board-related property.
|
||||
- atmel,wakeup-rtc-timer: boolean to enable Real-Time Clock wake-up.
|
||||
|
||||
The node contains child nodes for each wake-up input that the platform uses.
|
||||
|
||||
2) input nodes
|
||||
|
||||
Wake-up input nodes are usually described in the "board" part of the Device
|
||||
Tree. Note also that input 0 is linked to the wake-up pin and is frequently
|
||||
used.
|
||||
|
||||
Required properties:
|
||||
- reg: should contain the wake-up input index [0 - 15].
|
||||
|
||||
Optional properties:
|
||||
- atmel,wakeup-active-high: boolean, the corresponding wake-up input described
|
||||
by the child, forces the wake-up of the core power supply on a high level.
|
||||
The default is to be active low.
|
||||
|
||||
Example:
|
||||
|
||||
On the SoC side:
|
||||
shdwc@f8048010 {
|
||||
compatible = "atmel,sama5d2-shdwc";
|
||||
reg = <0xf8048010 0x10>;
|
||||
clocks = <&clk32k>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
atmel,wakeup-rtc-timer;
|
||||
};
|
||||
|
||||
On the board side:
|
||||
shdwc@f8048010 {
|
||||
debounce-delay-us = <976>;
|
||||
|
||||
input@0 {
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
input@1 {
|
||||
reg = <1>;
|
||||
atmel,wakeup-active-high;
|
||||
};
|
||||
};
|
||||
|
||||
Special Function Registers (SFR)
|
||||
|
||||
Special Function Registers (SFR) manage specific aspects of the integrated
|
||||
memory, bridge implementations, processor and other functionality not controlled
|
||||
elsewhere.
|
||||
|
||||
required properties:
|
||||
- compatible: Should be "atmel,<chip>-sfr", "syscon" or
|
||||
"atmel,<chip>-sfrbu", "syscon"
|
||||
<chip> can be "sama5d3", "sama5d4" or "sama5d2".
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
sfr@f0038000 {
|
||||
compatible = "atmel,sama5d3-sfr", "syscon";
|
||||
reg = <0xf0038000 0x60>;
|
||||
};
|
||||
|
||||
Security Module (SECUMOD)
|
||||
|
||||
The Security Module macrocell provides all necessary secure functions to avoid
|
||||
voltage, temperature, frequency and mechanical attacks on the chip. It also
|
||||
embeds secure memories that can be scrambled
|
||||
|
||||
required properties:
|
||||
- compatible: Should be "atmel,<chip>-secumod", "syscon".
|
||||
<chip> can be "sama5d2".
|
||||
- reg: Should contain registers location and length
|
||||
|
||||
secumod@fc040000 {
|
||||
compatible = "atmel,sama5d2-secumod", "syscon";
|
||||
reg = <0xfc040000 0x100>;
|
||||
};
|
|
@ -14,7 +14,28 @@ Related properties: (none)
|
|||
|
||||
Note:
|
||||
This enable method requires valid nodes compatible with
|
||||
"al,alpine-cpu-resume" and "al,alpine-nb-service"[1].
|
||||
"al,alpine-cpu-resume" and "al,alpine-nb-service".
|
||||
|
||||
|
||||
* Alpine CPU resume registers
|
||||
|
||||
The CPU resume register are used to define required resume address after
|
||||
reset.
|
||||
|
||||
Properties:
|
||||
- compatible : Should contain "al,alpine-cpu-resume".
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
||||
|
||||
* Alpine System-Fabric Service Registers
|
||||
|
||||
The System-Fabric Service Registers allow various operation on CPU and
|
||||
system fabric, like powering CPUs off.
|
||||
|
||||
Properties:
|
||||
- compatible : Should contain "al,alpine-sysfabric-service" and "syscon".
|
||||
- reg : Offset and length of the register set for the device
|
||||
|
||||
|
||||
Example:
|
||||
|
||||
|
@ -48,5 +69,12 @@ cpus {
|
|||
};
|
||||
};
|
||||
|
||||
--
|
||||
[1] arm/al,alpine.txt
|
||||
cpu_resume {
|
||||
compatible = "al,alpine-cpu-resume";
|
||||
reg = <0xfbff5ed0 0x30>;
|
||||
};
|
||||
|
||||
nb_service {
|
||||
compatible = "al,alpine-sysfabric-service", "syscon";
|
||||
reg = <0xfb070000 0x10000>;
|
||||
};
|
||||
|
|
|
@ -276,7 +276,7 @@ described below.
|
|||
Usage: optional
|
||||
Value type: <prop-encoded-array>
|
||||
Definition: A u32 value that represents the running time dynamic
|
||||
power coefficient in units of mW/MHz/uV^2. The
|
||||
power coefficient in units of uW/MHz/V^2. The
|
||||
coefficient can either be calculated from power
|
||||
measurements or derived by analysis.
|
||||
|
||||
|
@ -287,7 +287,7 @@ described below.
|
|||
|
||||
Pdyn = dynamic-power-coefficient * V^2 * f
|
||||
|
||||
where voltage is in uV, frequency is in MHz.
|
||||
where voltage is in V, frequency is in MHz.
|
||||
|
||||
Example 1 (dual-cluster big.LITTLE system 32-bit):
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
Freescale DCFG
|
||||
|
||||
DCFG is the device configuration unit, that provides general purpose
|
||||
configuration and status for the device. Such as setting the secondary
|
||||
core start address and release the secondary core from holdoff and startup.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should contain a chip-specific compatible string,
|
||||
Chip-specific strings are of the form "fsl,<chip>-dcfg",
|
||||
The following <chip>s are known to be supported:
|
||||
ls1012a, ls1021a, ls1043a, ls1046a, ls2080a.
|
||||
|
||||
- reg : should contain base address and length of DCFG memory-mapped registers
|
||||
|
||||
Example:
|
||||
dcfg: dcfg@1ee0000 {
|
||||
compatible = "fsl,ls1021a-dcfg";
|
||||
reg = <0x0 0x1ee0000 0x0 0x10000>;
|
||||
};
|
|
@ -0,0 +1,19 @@
|
|||
Freescale SCFG
|
||||
|
||||
SCFG is the supplemental configuration unit, that provides SoC specific
|
||||
configuration and status registers for the chip. Such as getting PEX port
|
||||
status.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should contain a chip-specific compatible string,
|
||||
Chip-specific strings are of the form "fsl,<chip>-scfg",
|
||||
The following <chip>s are known to be supported:
|
||||
ls1012a, ls1021a, ls1043a, ls1046a, ls2080a.
|
||||
|
||||
- reg: should contain base address and length of SCFG memory-mapped registers
|
||||
|
||||
Example:
|
||||
scfg: scfg@1570000 {
|
||||
compatible = "fsl,ls1021a-scfg";
|
||||
reg = <0x0 0x1570000 0x0 0x10000>;
|
||||
};
|
|
@ -101,45 +101,6 @@ Freescale LS1021A Platform Device Tree Bindings
|
|||
Required root node compatible properties:
|
||||
- compatible = "fsl,ls1021a";
|
||||
|
||||
Freescale SoC-specific Device Tree Bindings
|
||||
-------------------------------------------
|
||||
|
||||
Freescale SCFG
|
||||
SCFG is the supplemental configuration unit, that provides SoC specific
|
||||
configuration and status registers for the chip. Such as getting PEX port
|
||||
status.
|
||||
Required properties:
|
||||
- compatible: Should contain a chip-specific compatible string,
|
||||
Chip-specific strings are of the form "fsl,<chip>-scfg",
|
||||
The following <chip>s are known to be supported:
|
||||
ls1012a, ls1021a, ls1043a, ls1046a, ls2080a.
|
||||
|
||||
- reg: should contain base address and length of SCFG memory-mapped registers
|
||||
|
||||
Example:
|
||||
scfg: scfg@1570000 {
|
||||
compatible = "fsl,ls1021a-scfg";
|
||||
reg = <0x0 0x1570000 0x0 0x10000>;
|
||||
};
|
||||
|
||||
Freescale DCFG
|
||||
DCFG is the device configuration unit, that provides general purpose
|
||||
configuration and status for the device. Such as setting the secondary
|
||||
core start address and release the secondary core from holdoff and startup.
|
||||
Required properties:
|
||||
- compatible: Should contain a chip-specific compatible string,
|
||||
Chip-specific strings are of the form "fsl,<chip>-dcfg",
|
||||
The following <chip>s are known to be supported:
|
||||
ls1012a, ls1021a, ls1043a, ls1046a, ls2080a.
|
||||
|
||||
- reg : should contain base address and length of DCFG memory-mapped registers
|
||||
|
||||
Example:
|
||||
dcfg: dcfg@1ee0000 {
|
||||
compatible = "fsl,ls1021a-dcfg";
|
||||
reg = <0x0 0x1ee0000 0x0 0x10000>;
|
||||
};
|
||||
|
||||
Freescale ARMv8 based Layerscape SoC family Device Tree Bindings
|
||||
----------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -32,7 +32,8 @@ describe the view of Secure world using the standard bindings. These
|
|||
secure- bindings only need to be used where both the Secure and Normal
|
||||
world views need to be described in a single device tree.
|
||||
|
||||
Valid Secure world properties:
|
||||
Valid Secure world properties
|
||||
-----------------------------
|
||||
|
||||
- secure-status : specifies whether the device is present and usable
|
||||
in the secure world. The combination of this with "status" allows
|
||||
|
@ -51,3 +52,19 @@ Valid Secure world properties:
|
|||
status = "disabled"; secure-status = "okay"; /* S-only */
|
||||
status = "disabled"; /* disabled in both */
|
||||
status = "disabled"; secure-status = "disabled"; /* disabled in both */
|
||||
|
||||
The secure-chosen node
|
||||
----------------------
|
||||
|
||||
Similar to the /chosen node which serves as a place for passing data
|
||||
between firmware and the operating system, the /secure-chosen node may
|
||||
be used to pass data to the Secure OS. Only the properties defined
|
||||
below may appear in the /secure-chosen node.
|
||||
|
||||
- stdout-path : specifies the device to be used by the Secure OS for
|
||||
its console output. The syntax is the same as for /chosen/stdout-path.
|
||||
If the /secure-chosen node exists but the stdout-path property is not
|
||||
present, the Secure OS should not perform any console output. If
|
||||
/secure-chosen does not exist, the Secure OS should use the value of
|
||||
/chosen/stdout-path instead (that is, use the same device as the
|
||||
Normal world OS).
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
ZTE sysctrl Registers
|
||||
|
||||
Registers for 'zte,zx296702' SoC:
|
||||
|
||||
System management required properties:
|
||||
- compatible = "zte,sysctrl"
|
||||
|
||||
Low power management required properties:
|
||||
- compatible = "zte,zx296702-pcu"
|
||||
|
||||
Bus matrix required properties:
|
||||
- compatible = "zte,zx-bus-matrix"
|
||||
|
||||
|
||||
Registers for 'zte,zx296718' SoC:
|
||||
|
||||
System management required properties:
|
||||
- compatible = "zte,zx296718-aon-sysctrl"
|
||||
- compatible = "zte,zx296718-sysctrl"
|
||||
|
||||
Example:
|
||||
aon_sysctrl: aon-sysctrl@116000 {
|
||||
compatible = "zte,zx296718-aon-sysctrl", "syscon";
|
||||
reg = <0x116000 0x1000>;
|
||||
};
|
||||
|
||||
sysctrl: sysctrl@1463000 {
|
||||
compatible = "zte,zx296718-sysctrl", "syscon";
|
||||
reg = <0x1463000 0x1000>;
|
||||
};
|
|
@ -1,20 +1,10 @@
|
|||
ZTE platforms device tree bindings
|
||||
---------------------------------------
|
||||
|
||||
---------------------------------------
|
||||
- ZX296702 board:
|
||||
Required root node properties:
|
||||
- compatible = "zte,zx296702-ad1", "zte,zx296702"
|
||||
|
||||
System management required properties:
|
||||
- compatible = "zte,sysctrl"
|
||||
|
||||
Low power management required properties:
|
||||
- compatible = "zte,zx296702-pcu"
|
||||
|
||||
Bus matrix required properties:
|
||||
- compatible = "zte,zx-bus-matrix"
|
||||
|
||||
|
||||
---------------------------------------
|
||||
- ZX296718 SoC:
|
||||
Required root node properties:
|
||||
|
@ -22,18 +12,3 @@ Bus matrix required properties:
|
|||
|
||||
ZX296718 EVB board:
|
||||
- "zte,zx296718-evb"
|
||||
|
||||
System management required properties:
|
||||
- compatible = "zte,zx296718-aon-sysctrl"
|
||||
- compatible = "zte,zx296718-sysctrl"
|
||||
|
||||
Example:
|
||||
aon_sysctrl: aon-sysctrl@116000 {
|
||||
compatible = "zte,zx296718-aon-sysctrl", "syscon";
|
||||
reg = <0x116000 0x1000>;
|
||||
};
|
||||
|
||||
sysctrl: sysctrl@1463000 {
|
||||
compatible = "zte,zx296718-sysctrl", "syscon";
|
||||
reg = <0x1463000 0x1000>;
|
||||
};
|
||||
|
|
|
@ -24,7 +24,7 @@ Optional properties:
|
|||
|
||||
Example:
|
||||
|
||||
p1_sec_a: crypto@400,d2000000 {
|
||||
p1_sec_a: crypto@400d2000000 {
|
||||
compatible = "hisilicon,hip07-sec";
|
||||
reg = <0x400 0xd0000000 0x0 0x10000
|
||||
0x400 0xd2000000 0x0 0x10000
|
||||
|
|
|
@ -415,7 +415,7 @@ DT Overlay contains:
|
|||
firmware-name = "base.rbf";
|
||||
|
||||
fpga-bridge@4400 {
|
||||
compatible = "altr,freeze-bridge";
|
||||
compatible = "altr,freeze-bridge-controller";
|
||||
reg = <0x4400 0x10>;
|
||||
|
||||
fpga_region1: fpga-region1 {
|
||||
|
@ -427,7 +427,7 @@ DT Overlay contains:
|
|||
};
|
||||
|
||||
fpga-bridge@4420 {
|
||||
compatible = "altr,freeze-bridge";
|
||||
compatible = "altr,freeze-bridge-controller";
|
||||
reg = <0x4420 0x10>;
|
||||
|
||||
fpga_region2: fpga-region2 {
|
||||
|
|
|
@ -84,7 +84,7 @@ Binding may contain optional "interrupts" property, describing interrupts
|
|||
used by the device. I2C core will assign "irq" interrupt (or the very first
|
||||
interrupt if not using interrupt names) as primary interrupt for the slave.
|
||||
|
||||
Alternatively, devices supporting SMbus Host Notify, and connected to
|
||||
Alternatively, devices supporting SMBus Host Notify, and connected to
|
||||
adapters that support this feature, may use "host-notify" property. I2C
|
||||
core will create a virtual interrupt for Host Notify and assign it as
|
||||
primary interrupt for the slave.
|
||||
|
|
|
@ -76,7 +76,7 @@ Deprecated properties:
|
|||
Also see child specific device properties:
|
||||
Regulator - ../regulator/arizona-regulator.txt
|
||||
Extcon - ../extcon/extcon-arizona.txt
|
||||
Sound - ../sound/arizona.txt
|
||||
Sound - ../sound/wlf,arizona.txt
|
||||
|
||||
Example:
|
||||
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
* Liebherr's BK4 controller external SPI
|
||||
|
||||
A device which handles data acquisition from compatible industrial
|
||||
peripherals.
|
||||
The SPI is used for data and management purposes in both master and
|
||||
slave modes.
|
||||
|
||||
Required properties:
|
||||
|
||||
- compatible : Should be "lwn,bk4"
|
||||
|
||||
Required SPI properties:
|
||||
|
||||
- reg : Should be address of the device chip select within
|
||||
the controller.
|
||||
|
||||
- spi-max-frequency : Maximum SPI clocking speed of device in Hz, should be
|
||||
30MHz at most for the Liebherr's BK4 external bus.
|
||||
|
||||
Example:
|
||||
|
||||
spidev0: spi@0 {
|
||||
compatible = "lwn,bk4";
|
||||
spi-max-frequency = <30000000>;
|
||||
reg = <0>;
|
||||
};
|
|
@ -3,6 +3,7 @@ Renesas R-Car CAN controller Device Tree Bindings
|
|||
|
||||
Required properties:
|
||||
- compatible: "renesas,can-r8a7743" if CAN controller is a part of R8A7743 SoC.
|
||||
"renesas,can-r8a7744" if CAN controller is a part of R8A7744 SoC.
|
||||
"renesas,can-r8a7745" if CAN controller is a part of R8A7745 SoC.
|
||||
"renesas,can-r8a7778" if CAN controller is a part of R8A7778 SoC.
|
||||
"renesas,can-r8a7779" if CAN controller is a part of R8A7779 SoC.
|
||||
|
|
|
@ -5,6 +5,7 @@ This file provides information on what the device node for the R-Car generation
|
|||
|
||||
Required properties:
|
||||
- compatible: "renesas,usb-phy-r8a7743" if the device is a part of R8A7743 SoC.
|
||||
"renesas,usb-phy-r8a7744" if the device is a part of R8A7744 SoC.
|
||||
"renesas,usb-phy-r8a7745" if the device is a part of R8A7745 SoC.
|
||||
"renesas,usb-phy-r8a7790" if the device is a part of R8A7790 SoC.
|
||||
"renesas,usb-phy-r8a7791" if the device is a part of R8A7791 SoC.
|
||||
|
|
|
@ -5,7 +5,7 @@ Please also refer to reset.txt in this directory for common reset
|
|||
controller binding usage.
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "fsl,imx7-src", "syscon"
|
||||
- compatible: Should be "fsl,imx7d-src", "syscon"
|
||||
- reg: should be register base and length as documented in the
|
||||
datasheet
|
||||
- interrupts: Should contain SRC interrupt
|
||||
|
|
|
@ -24,6 +24,8 @@ Required Properties:
|
|||
- "renesas,r8a73a4-cmt1" for the 48-bit CMT1 device included in r8a73a4.
|
||||
- "renesas,r8a7743-cmt0" for the 32-bit CMT0 device included in r8a7743.
|
||||
- "renesas,r8a7743-cmt1" for the 48-bit CMT1 device included in r8a7743.
|
||||
- "renesas,r8a7744-cmt0" for the 32-bit CMT0 device included in r8a7744.
|
||||
- "renesas,r8a7744-cmt1" for the 48-bit CMT1 device included in r8a7744.
|
||||
- "renesas,r8a7745-cmt0" for the 32-bit CMT0 device included in r8a7745.
|
||||
- "renesas,r8a7745-cmt1" for the 48-bit CMT1 device included in r8a7745.
|
||||
- "renesas,r8a7790-cmt0" for the 32-bit CMT0 device included in r8a7790.
|
||||
|
|
|
@ -9,7 +9,8 @@ Channels are independent from each other.
|
|||
Required Properties:
|
||||
|
||||
- compatible: must be one or more of the following:
|
||||
- "renesas,r7s72100-ostm" for the r7s72100 OSTM
|
||||
- "renesas,r7s72100-ostm" for the R7S72100 (RZ/A1) OSTM
|
||||
- "renesas,r7s9210-ostm" for the R7S9210 (RZ/A2) OSTM
|
||||
- "renesas,ostm" for any OSTM
|
||||
This is a fallback for the above renesas,*-ostm entries
|
||||
|
||||
|
|
|
@ -127,6 +127,7 @@ everspin Everspin Technologies, Inc.
|
|||
exar Exar Corporation
|
||||
excito Excito
|
||||
ezchip EZchip Semiconductor
|
||||
facebook Facebook
|
||||
fairphone Fairphone B.V.
|
||||
faraday Faraday Technology Corporation
|
||||
fastrax Fastrax Oy
|
||||
|
@ -275,6 +276,7 @@ nxp NXP Semiconductors
|
|||
okaya Okaya Electric America, Inc.
|
||||
oki Oki Electric Industry Co., Ltd.
|
||||
olimex OLIMEX Ltd.
|
||||
olpc One Laptop Per Child
|
||||
onion Onion Corporation
|
||||
onnn ON Semiconductor Corp.
|
||||
ontat On Tat Industrial Company
|
||||
|
|
|
@ -6,6 +6,7 @@ Required properties:
|
|||
version.
|
||||
Examples with soctypes are:
|
||||
- "renesas,r8a7743-wdt" (RZ/G1M)
|
||||
- "renesas,r8a7744-wdt" (RZ/G1N)
|
||||
- "renesas,r8a7745-wdt" (RZ/G1E)
|
||||
- "renesas,r8a774a1-wdt" (RZ/G2M)
|
||||
- "renesas,r8a7790-wdt" (R-Car H2)
|
||||
|
|
37
Makefile
37
Makefile
|
@ -1063,7 +1063,7 @@ include/config/kernel.release: $(srctree)/Makefile FORCE
|
|||
# Carefully list dependencies so we do not try to build scripts twice
|
||||
# in parallel
|
||||
PHONY += scripts
|
||||
scripts: scripts_basic asm-generic gcc-plugins $(autoksyms_h)
|
||||
scripts: scripts_basic scripts_dtc asm-generic gcc-plugins $(autoksyms_h)
|
||||
$(Q)$(MAKE) $(build)=$(@)
|
||||
|
||||
# Things we need to do before we recursively start building the kernel
|
||||
|
@ -1212,6 +1212,35 @@ kselftest-merge:
|
|||
$(srctree)/tools/testing/selftests/*/config
|
||||
+$(Q)$(MAKE) -f $(srctree)/Makefile olddefconfig
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Devicetree files
|
||||
|
||||
ifneq ($(wildcard $(srctree)/arch/$(SRCARCH)/boot/dts/),)
|
||||
dtstree := arch/$(SRCARCH)/boot/dts
|
||||
endif
|
||||
|
||||
ifneq ($(dtstree),)
|
||||
|
||||
%.dtb: prepare3 scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree) $(dtstree)/$@
|
||||
|
||||
PHONY += dtbs dtbs_install
|
||||
dtbs: prepare3 scripts_dtc
|
||||
$(Q)$(MAKE) $(build)=$(dtstree)
|
||||
|
||||
dtbs_install:
|
||||
$(Q)$(MAKE) $(dtbinst)=$(dtstree)
|
||||
|
||||
ifdef CONFIG_OF_EARLY_FLATTREE
|
||||
all: dtbs
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
PHONY += scripts_dtc
|
||||
scripts_dtc: scripts_basic
|
||||
$(Q)$(MAKE) $(build)=scripts/dtc
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Modules
|
||||
|
||||
|
@ -1421,6 +1450,12 @@ help:
|
|||
@echo ' kselftest-merge - Merge all the config dependencies of kselftest to existing'
|
||||
@echo ' .config.'
|
||||
@echo ''
|
||||
@$(if $(dtstree), \
|
||||
echo 'Devicetree:'; \
|
||||
echo '* dtbs - Build device tree blobs for enabled boards'; \
|
||||
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'; \
|
||||
echo '')
|
||||
|
||||
@echo 'Userspace tools targets:'
|
||||
@echo ' use "make tools/help"'
|
||||
@echo ' or "cd tools; make help"'
|
||||
|
|
|
@ -102,11 +102,5 @@ boot_targets += uImage uImage.bin uImage.gz
|
|||
$(boot_targets): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(boot)/$@
|
||||
|
||||
%.dtb %.dtb.S %.dtb.o: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
|
||||
|
||||
dtbs: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
|
|
|
@ -303,12 +303,7 @@ else
|
|||
KBUILD_IMAGE := $(boot)/zImage
|
||||
endif
|
||||
|
||||
# Build the DT binary blobs if we have OF configured
|
||||
ifeq ($(CONFIG_USE_OF),y)
|
||||
KBUILD_DTBS := dtbs
|
||||
endif
|
||||
|
||||
all: $(notdir $(KBUILD_IMAGE)) $(KBUILD_DTBS)
|
||||
all: $(notdir $(KBUILD_IMAGE))
|
||||
|
||||
|
||||
archheaders:
|
||||
|
@ -335,17 +330,6 @@ $(BOOT_TARGETS): vmlinux
|
|||
$(INSTALL_TARGETS):
|
||||
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $@
|
||||
|
||||
%.dtb: | scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts MACHINE=$(MACHINE) $(boot)/dts/$@
|
||||
|
||||
PHONY += dtbs dtbs_install
|
||||
|
||||
dtbs: prepare scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts
|
||||
|
||||
dtbs_install:
|
||||
$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
|
||||
|
||||
PHONY += vdso_install
|
||||
vdso_install:
|
||||
ifeq ($(CONFIG_VDSO),y)
|
||||
|
@ -367,8 +351,6 @@ define archhelp
|
|||
echo ' uImage - U-Boot wrapped zImage'
|
||||
echo ' bootpImage - Combined zImage and initial RAM disk'
|
||||
echo ' (supply initrd image via make variable INITRD=<path>)'
|
||||
echo '* dtbs - Build device tree blobs for enabled boards'
|
||||
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
|
||||
echo ' install - Install uncompressed kernel'
|
||||
echo ' zinstall - Install compressed kernel'
|
||||
echo ' uinstall - Install U-Boot wrapped compressed kernel'
|
||||
|
|
|
@ -6,6 +6,8 @@
|
|||
#include <linux/string.h>
|
||||
#include <asm/byteorder.h>
|
||||
|
||||
#define INT_MAX ((int)(~0U>>1))
|
||||
|
||||
typedef __be16 fdt16_t;
|
||||
typedef __be32 fdt32_t;
|
||||
typedef __be64 fdt64_t;
|
||||
|
|
|
@ -87,14 +87,11 @@ void __init arm_dt_init_cpu_maps(void)
|
|||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, cpu) {
|
||||
for_each_of_cpu_node(cpu) {
|
||||
const __be32 *cell;
|
||||
int prop_bytes;
|
||||
u32 hwid;
|
||||
|
||||
if (of_node_cmp(cpu->type, "cpu"))
|
||||
continue;
|
||||
|
||||
pr_debug(" * %pOF...\n", cpu);
|
||||
/*
|
||||
* A device tree containing CPU nodes with missing "reg"
|
||||
|
|
|
@ -94,12 +94,6 @@ static void __init parse_dt_topology(void)
|
|||
__cpu_capacity = kcalloc(nr_cpu_ids, sizeof(*__cpu_capacity),
|
||||
GFP_NOWAIT);
|
||||
|
||||
cn = of_find_node_by_path("/cpus");
|
||||
if (!cn) {
|
||||
pr_err("No CPU information found in DT\n");
|
||||
return;
|
||||
}
|
||||
|
||||
for_each_possible_cpu(cpu) {
|
||||
const u32 *rate;
|
||||
int len;
|
||||
|
|
|
@ -50,7 +50,7 @@ void __init rcar_gen2_pm_init(void)
|
|||
void __iomem *p;
|
||||
u32 bar;
|
||||
static int once;
|
||||
struct device_node *np, *cpus;
|
||||
struct device_node *np;
|
||||
bool has_a7 = false;
|
||||
bool has_a15 = false;
|
||||
struct resource res;
|
||||
|
@ -59,11 +59,7 @@ void __init rcar_gen2_pm_init(void)
|
|||
if (once++)
|
||||
return;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, np) {
|
||||
for_each_of_cpu_node(np) {
|
||||
if (of_device_is_compatible(np, "arm,cortex-a15"))
|
||||
has_a15 = true;
|
||||
else if (of_device_is_compatible(np, "arm,cortex-a7"))
|
||||
|
|
|
@ -202,7 +202,7 @@ static void __init get_special_pds(void)
|
|||
const struct of_device_id *id;
|
||||
|
||||
/* PM domains containing CPUs */
|
||||
for_each_node_by_type(np, "cpu")
|
||||
for_each_of_cpu_node(np)
|
||||
add_special_pd(np, PD_CPU);
|
||||
|
||||
/* PM domain containing console */
|
||||
|
|
|
@ -22,22 +22,16 @@
|
|||
|
||||
void __init shmobile_init_delay(void)
|
||||
{
|
||||
struct device_node *np, *cpus;
|
||||
struct device_node *np;
|
||||
u32 max_freq = 0;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, np) {
|
||||
for_each_of_cpu_node(np) {
|
||||
u32 freq;
|
||||
|
||||
if (!of_property_read_u32(np, "clock-frequency", &freq))
|
||||
max_freq = max(max_freq, freq);
|
||||
}
|
||||
|
||||
of_node_put(cpus);
|
||||
|
||||
if (!max_freq)
|
||||
return;
|
||||
|
||||
|
|
|
@ -113,9 +113,8 @@ core-$(CONFIG_EFI_STUB) += $(objtree)/drivers/firmware/efi/libstub/lib.a
|
|||
# Default target when executing plain make
|
||||
boot := arch/arm64/boot
|
||||
KBUILD_IMAGE := $(boot)/Image.gz
|
||||
KBUILD_DTBS := dtbs
|
||||
|
||||
all: Image.gz $(KBUILD_DTBS)
|
||||
all: Image.gz
|
||||
|
||||
|
||||
Image: vmlinux
|
||||
|
@ -127,17 +126,6 @@ Image.%: Image
|
|||
zinstall install:
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
%.dtb: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
|
||||
|
||||
PHONY += dtbs dtbs_install
|
||||
|
||||
dtbs: prepare scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts
|
||||
|
||||
dtbs_install:
|
||||
$(Q)$(MAKE) $(dtbinst)=$(boot)/dts
|
||||
|
||||
PHONY += vdso_install
|
||||
vdso_install:
|
||||
$(Q)$(MAKE) $(build)=arch/arm64/kernel/vdso $@
|
||||
|
@ -145,7 +133,6 @@ vdso_install:
|
|||
# We use MRPROPER_FILES and CLEAN_FILES now
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(boot)
|
||||
$(Q)$(MAKE) $(clean)=$(boot)/dts
|
||||
|
||||
# We need to generate vdso-offsets.h before compiling certain files in kernel/.
|
||||
# In order to do that, we should use the archprepare target, but we can't since
|
||||
|
@ -160,8 +147,6 @@ vdso_prepare: prepare0
|
|||
define archhelp
|
||||
echo '* Image.gz - Compressed kernel image (arch/$(ARCH)/boot/Image.gz)'
|
||||
echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
|
||||
echo '* dtbs - Build device tree blobs for enabled boards'
|
||||
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
|
||||
echo ' install - Install uncompressed kernel'
|
||||
echo ' zinstall - Install compressed kernel'
|
||||
echo ' Install using (your) ~/bin/installkernel or'
|
||||
|
|
|
@ -602,7 +602,7 @@ static void __init of_parse_and_init_cpus(void)
|
|||
{
|
||||
struct device_node *dn;
|
||||
|
||||
for_each_node_by_type(dn, "cpu") {
|
||||
for_each_of_cpu_node(dn) {
|
||||
u64 hwid = of_get_cpu_mpidr(dn);
|
||||
|
||||
if (hwid == INVALID_HWID)
|
||||
|
|
|
@ -40,9 +40,7 @@ boot := arch/$(ARCH)/boot
|
|||
DTB:=$(subst dtbImage.,,$(filter dtbImage.%, $(MAKECMDGOALS)))
|
||||
export DTB
|
||||
|
||||
ifneq ($(DTB),)
|
||||
core-y += $(boot)/dts/
|
||||
endif
|
||||
|
||||
# With make 3.82 we cannot mix normal and wildcard targets
|
||||
|
||||
|
|
|
@ -5,15 +5,12 @@
|
|||
|
||||
DTC_FLAGS ?= -p 1024
|
||||
|
||||
dtb-$(CONFIG_SOC_TMS320C6455) += dsk6455.dtb
|
||||
dtb-$(CONFIG_SOC_TMS320C6457) += evmc6457.dtb
|
||||
dtb-$(CONFIG_SOC_TMS320C6472) += evmc6472.dtb
|
||||
dtb-$(CONFIG_SOC_TMS320C6474) += evmc6474.dtb
|
||||
dtb-$(CONFIG_SOC_TMS320C6678) += evmc6678.dtb
|
||||
|
||||
ifneq ($(DTB),)
|
||||
obj-y += linked_dtb.o
|
||||
obj-y += $(DTB).dtb.o
|
||||
endif
|
||||
|
||||
quiet_cmd_cp = CP $< $@$2
|
||||
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
|
||||
|
||||
# Generate builtin.dtb from $(DTB).dtb
|
||||
$(obj)/builtin.dtb: $(obj)/$(DTB).dtb
|
||||
$(call if_changed,cp)
|
||||
|
||||
$(obj)/linked_dtb.o: $(obj)/builtin.dtb
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
.section __fdt_blob,"a"
|
||||
.incbin "arch/c6x/boot/dts/builtin.dtb"
|
|
@ -8,6 +8,5 @@ extern char _vectors_start[];
|
|||
extern char _vectors_end[];
|
||||
|
||||
extern char _data_lma[];
|
||||
extern char _fdt_start[], _fdt_end[];
|
||||
|
||||
#endif /* _ASM_C6X_SECTIONS_H */
|
||||
|
|
|
@ -96,7 +96,7 @@ static void __init get_cpuinfo(void)
|
|||
unsigned long core_khz;
|
||||
u64 tmp;
|
||||
struct cpuinfo_c6x *p;
|
||||
struct device_node *node, *np;
|
||||
struct device_node *node;
|
||||
|
||||
p = &per_cpu(cpu_data, smp_processor_id());
|
||||
|
||||
|
@ -190,13 +190,8 @@ static void __init get_cpuinfo(void)
|
|||
|
||||
p->core_id = get_coreid();
|
||||
|
||||
node = of_find_node_by_name(NULL, "cpus");
|
||||
if (node) {
|
||||
for_each_child_of_node(node, np)
|
||||
if (!strcmp("cpu", np->name))
|
||||
++c6x_num_cores;
|
||||
of_node_put(node);
|
||||
}
|
||||
for_each_of_cpu_node(node)
|
||||
++c6x_num_cores;
|
||||
|
||||
node = of_find_node_by_name(NULL, "soc");
|
||||
if (node) {
|
||||
|
@ -270,7 +265,7 @@ int __init c6x_add_memory(phys_addr_t start, unsigned long size)
|
|||
notrace void __init machine_init(unsigned long dt_ptr)
|
||||
{
|
||||
void *dtb = __va(dt_ptr);
|
||||
void *fdt = _fdt_start;
|
||||
void *fdt = __dtb_start;
|
||||
|
||||
/* interrupts must be masked */
|
||||
set_creg(IER, 2);
|
||||
|
@ -363,7 +358,7 @@ void __init setup_arch(char **cmdline_p)
|
|||
memory_end >> PAGE_SHIFT);
|
||||
memblock_reserve(memory_start, bootmap_size);
|
||||
|
||||
unflatten_device_tree();
|
||||
unflatten_and_copy_device_tree();
|
||||
|
||||
c6x_cache_init();
|
||||
|
||||
|
|
|
@ -90,16 +90,6 @@ SECTIONS
|
|||
*(.switch)
|
||||
}
|
||||
|
||||
. = ALIGN (8) ;
|
||||
__fdt_blob : AT(ADDR(__fdt_blob) - LOAD_OFFSET)
|
||||
{
|
||||
_fdt_start = . ; /* place for fdt blob */
|
||||
*(__fdt_blob) ; /* Any link-placed DTB */
|
||||
BYTE(0); /* section always has contents */
|
||||
. = _fdt_start + 0x4000; /* Pad up to 16kbyte */
|
||||
_fdt_end = . ;
|
||||
}
|
||||
|
||||
_etext = .;
|
||||
|
||||
/*
|
||||
|
|
|
@ -31,21 +31,12 @@ CROSS_COMPILE := h8300-unknown-linux-
|
|||
endif
|
||||
|
||||
core-y += arch/$(ARCH)/kernel/ arch/$(ARCH)/mm/
|
||||
ifneq '$(CONFIG_H8300_BUILTIN_DTB)' '""'
|
||||
core-y += arch/h8300/boot/dts/
|
||||
endif
|
||||
core-y += arch/$(ARCH)/boot/dts/
|
||||
|
||||
libs-y += arch/$(ARCH)/lib/
|
||||
|
||||
boot := arch/h8300/boot
|
||||
|
||||
%.dtb %.dtb.S %.dtb.o: | scripts
|
||||
$(Q)$(MAKE) $(build)=arch/h8300/boot/dts arch/h8300/boot/dts/$@
|
||||
|
||||
PHONY += dtbs
|
||||
dtbs: scripts
|
||||
$(Q)$(MAKE) $(build)=arch/h8300/boot/dts
|
||||
|
||||
archmrproper:
|
||||
|
||||
archclean:
|
||||
|
|
|
@ -65,9 +65,7 @@ boot := arch/microblaze/boot
|
|||
# Are we making a simpleImage.<boardname> target? If so, crack out the boardname
|
||||
DTB:=$(subst simpleImage.,,$(filter simpleImage.%, $(MAKECMDGOALS)))
|
||||
|
||||
ifneq ($(DTB),)
|
||||
core-y += $(boot)/dts/
|
||||
endif
|
||||
core-y += $(boot)/dts/
|
||||
|
||||
# defines filename extension depending memory management type
|
||||
ifeq ($(CONFIG_MMU),)
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
#
|
||||
|
||||
dtb-y := system.dtb
|
||||
|
||||
ifneq ($(DTB),)
|
||||
obj-y += linked_dtb.o
|
||||
|
||||
# Ensure system.dtb exists
|
||||
|
@ -11,6 +14,7 @@ ifneq ($(DTB),system)
|
|||
$(obj)/system.dtb: $(obj)/$(DTB).dtb
|
||||
$(call if_changed,cp)
|
||||
endif
|
||||
endif
|
||||
|
||||
quiet_cmd_cp = CP $< $@$2
|
||||
cmd_cp = cat $< >$@$2 || (rm -f $@ && echo false)
|
||||
|
|
|
@ -89,9 +89,9 @@ static struct device_node *cpu;
|
|||
|
||||
void __init setup_cpuinfo(void)
|
||||
{
|
||||
cpu = (struct device_node *) of_find_node_by_type(NULL, "cpu");
|
||||
cpu = of_get_cpu_node(0, NULL);
|
||||
if (!cpu)
|
||||
pr_err("You don't have cpu!!!\n");
|
||||
pr_err("You don't have cpu or are missing cpu reg property!!!\n");
|
||||
|
||||
pr_info("%s: initialising\n", __func__);
|
||||
|
||||
|
@ -117,6 +117,8 @@ void __init setup_cpuinfo(void)
|
|||
if (cpuinfo.mmu_privins)
|
||||
pr_warn("%s: Stream instructions enabled"
|
||||
" - USERSPACE CAN LOCK THIS KERNEL!\n", __func__);
|
||||
|
||||
of_node_put(cpu);
|
||||
}
|
||||
|
||||
void __init setup_cpuinfo_clk(void)
|
||||
|
|
|
@ -407,18 +407,7 @@ endif
|
|||
CLEAN_FILES += vmlinux.32 vmlinux.64
|
||||
|
||||
# device-trees
|
||||
core-$(CONFIG_BUILTIN_DTB) += arch/mips/boot/dts/
|
||||
|
||||
%.dtb %.dtb.S %.dtb.o: | scripts
|
||||
$(Q)$(MAKE) $(build)=arch/mips/boot/dts arch/mips/boot/dts/$@
|
||||
|
||||
PHONY += dtbs
|
||||
dtbs: scripts
|
||||
$(Q)$(MAKE) $(build)=arch/mips/boot/dts
|
||||
|
||||
PHONY += dtbs_install
|
||||
dtbs_install:
|
||||
$(Q)$(MAKE) $(dtbinst)=arch/mips/boot/dts
|
||||
core-y += arch/mips/boot/dts/
|
||||
|
||||
archprepare:
|
||||
ifdef CONFIG_MIPS32_N32
|
||||
|
@ -461,8 +450,6 @@ define archhelp
|
|||
echo ' uImage.lzma - U-Boot image (lzma)'
|
||||
echo ' uImage.lzo - U-Boot image (lzo)'
|
||||
echo ' uzImage.bin - U-Boot image (self-extracting)'
|
||||
echo ' dtbs - Device-tree blobs for enabled boards'
|
||||
echo ' dtbs_install - Install dtbs to $(INSTALL_DTBS_PATH)'
|
||||
echo
|
||||
echo ' These will be default as appropriate for a configured platform.'
|
||||
echo
|
||||
|
|
|
@ -47,7 +47,7 @@ CHECKFLAGS += -D__NDS32_EB__
|
|||
endif
|
||||
|
||||
boot := arch/nds32/boot
|
||||
core-$(BUILTIN_DTB) += $(boot)/dts/
|
||||
core-y += $(boot)/dts/
|
||||
|
||||
.PHONY: FORCE
|
||||
|
||||
|
|
|
@ -49,21 +49,13 @@ BOOT_TARGETS = vmImage zImage
|
|||
PHONY += $(BOOT_TARGETS) install
|
||||
KBUILD_IMAGE := $(nios2-boot)/vmImage
|
||||
|
||||
ifneq ($(CONFIG_NIOS2_DTB_SOURCE),"")
|
||||
core-y += $(nios2-boot)/
|
||||
endif
|
||||
core-y += $(nios2-boot)/dts/
|
||||
|
||||
all: vmImage
|
||||
|
||||
archclean:
|
||||
$(Q)$(MAKE) $(clean)=$(nios2-boot)
|
||||
|
||||
%.dtb: | scripts
|
||||
$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
|
||||
|
||||
dtbs:
|
||||
$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
|
||||
|
||||
$(BOOT_TARGETS): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(nios2-boot) $(nios2-boot)/$@
|
||||
|
||||
|
@ -76,5 +68,4 @@ define archhelp
|
|||
echo ' (your) ~/bin/$(INSTALLKERNEL) or'
|
||||
echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
|
||||
echo ' install to $$(INSTALL_PATH)'
|
||||
echo ' dtbs - Build device tree blobs for enabled boards'
|
||||
endef
|
||||
|
|
|
@ -31,27 +31,5 @@ $(obj)/zImage: $(obj)/compressed/vmlinux FORCE
|
|||
$(obj)/compressed/vmlinux: $(obj)/vmlinux.gz FORCE
|
||||
$(Q)$(MAKE) $(build)=$(obj)/compressed $@
|
||||
|
||||
# Rule to build device tree blobs
|
||||
DTB_SRC := $(patsubst "%",%,$(CONFIG_NIOS2_DTB_SOURCE))
|
||||
|
||||
# Make sure the generated dtb gets removed during clean
|
||||
extra-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) += system.dtb
|
||||
|
||||
$(obj)/system.dtb: $(DTB_SRC) FORCE
|
||||
$(call cmd,dtc)
|
||||
|
||||
# Ensure system.dtb exists
|
||||
$(obj)/linked_dtb.o: $(obj)/system.dtb
|
||||
|
||||
obj-$(CONFIG_NIOS2_DTB_SOURCE_BOOL) += linked_dtb.o
|
||||
|
||||
targets += $(dtb-y)
|
||||
|
||||
# Rule to build device tree blobs with make command
|
||||
$(obj)/%.dtb: $(src)/dts/%.dts FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
$(obj)/dtbs: $(addprefix $(obj)/, $(dtb-y))
|
||||
|
||||
install:
|
||||
sh $(srctree)/$(src)/install.sh $(KERNELRELEASE) $(BOOTIMAGE) System.map "$(INSTALL_PATH)"
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
obj-y := $(patsubst "%.dts",%.dtb.o,$(CONFIG_NIOS2_DTB_SOURCE))
|
||||
|
||||
dtstree := $(srctree)/$(src)
|
||||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 2011 Thomas Chou <thomas@wytron.com.tw>
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
*/
|
||||
.section .dtb.init.rodata,"a"
|
||||
.incbin "arch/nios2/boot/system.dtb"
|
|
@ -47,7 +47,7 @@ void __init setup_cpuinfo(void)
|
|||
const char *str;
|
||||
int len;
|
||||
|
||||
cpu = of_find_node_by_type(NULL, "cpu");
|
||||
cpu = of_get_cpu_node(0, NULL);
|
||||
if (!cpu)
|
||||
panic("%s: No CPU found in devicetree!\n", __func__);
|
||||
|
||||
|
@ -120,6 +120,8 @@ void __init setup_cpuinfo(void)
|
|||
cpuinfo.reset_addr = fcpu(cpu, "altr,reset-addr");
|
||||
cpuinfo.exception_addr = fcpu(cpu, "altr,exception-addr");
|
||||
cpuinfo.fast_tlb_miss_exc_addr = fcpu(cpu, "altr,fast-tlb-miss-addr");
|
||||
|
||||
of_node_put(cpu);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
|
|
|
@ -214,12 +214,12 @@ static int __init nios2_timer_get_base_and_freq(struct device_node *np,
|
|||
{
|
||||
*base = of_iomap(np, 0);
|
||||
if (!*base) {
|
||||
pr_crit("Unable to map reg for %s\n", np->name);
|
||||
pr_crit("Unable to map reg for %pOFn\n", np);
|
||||
return -ENXIO;
|
||||
}
|
||||
|
||||
if (of_property_read_u32(np, "clock-frequency", freq)) {
|
||||
pr_crit("Unable to get %s clock frequency\n", np->name);
|
||||
pr_crit("Unable to get %pOFn clock frequency\n", np);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,9 +158,8 @@ static struct device_node *setup_find_cpu_node(int cpu)
|
|||
{
|
||||
u32 hwid;
|
||||
struct device_node *cpun;
|
||||
struct device_node *cpus = of_find_node_by_path("/cpus");
|
||||
|
||||
for_each_available_child_of_node(cpus, cpun) {
|
||||
for_each_of_cpu_node(cpun) {
|
||||
if (of_property_read_u32(cpun, "reg", &hwid))
|
||||
continue;
|
||||
if (hwid == cpu)
|
||||
|
|
|
@ -293,9 +293,6 @@ $(BOOT_TARGETS2): vmlinux
|
|||
bootwrapper_install:
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
|
||||
|
||||
%.dtb: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot) $(patsubst %,$(boot)/%,$@)
|
||||
|
||||
# Used to create 'merged defconfigs'
|
||||
# To use it $(call) it with the first argument as the base defconfig
|
||||
# and the second argument as a space separated list of .config files to merge,
|
||||
|
|
|
@ -304,9 +304,9 @@ image-$(CONFIG_PPC_ADDER875) += cuImage.adder875-uboot \
|
|||
dtbImage.adder875-redboot
|
||||
|
||||
# Board ports in arch/powerpc/platform/52xx/Kconfig
|
||||
image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200 lite5200.dtb
|
||||
image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200b lite5200b.dtb
|
||||
image-$(CONFIG_PPC_MEDIA5200) += cuImage.media5200 media5200.dtb
|
||||
image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200
|
||||
image-$(CONFIG_PPC_LITE5200) += cuImage.lite5200b
|
||||
image-$(CONFIG_PPC_MEDIA5200) += cuImage.media5200
|
||||
|
||||
# Board ports in arch/powerpc/platform/82xx/Kconfig
|
||||
image-$(CONFIG_MPC8272_ADS) += cuImage.mpc8272ads
|
||||
|
@ -381,11 +381,11 @@ $(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperb
|
|||
$(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
|
||||
|
||||
# dtbImage% - a dtbImage is a zImage with an embedded device tree blob
|
||||
$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb FORCE
|
||||
$(call if_changed,wrap,$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/dts/%.dtb FORCE
|
||||
$(call if_changed,wrap,$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
|
||||
$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/%.dtb FORCE
|
||||
$(call if_changed,wrap,$*,,$(obj)/$*.dtb)
|
||||
$(obj)/dtbImage.%: vmlinux $(wrapperbits) $(obj)/dts/%.dtb FORCE
|
||||
$(call if_changed,wrap,$*,,$(obj)/dts/$*.dtb)
|
||||
|
||||
# This cannot be in the root of $(src) as the zImage rule always adds a $(obj)
|
||||
# prefix
|
||||
|
@ -395,36 +395,33 @@ $(obj)/vmlinux.strip: vmlinux
|
|||
$(obj)/uImage: vmlinux $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,uboot)
|
||||
|
||||
$(obj)/uImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
$(obj)/uImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,uboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
|
||||
$(obj)/uImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,uboot-$*,,$(obj)/$*.dtb)
|
||||
$(obj)/uImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,uboot-$*,,$(obj)/dts/$*.dtb)
|
||||
|
||||
$(obj)/cuImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
$(obj)/cuImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,cuboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
|
||||
$(obj)/cuImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,cuboot-$*,,$(obj)/$*.dtb)
|
||||
$(obj)/cuImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,cuboot-$*,,$(obj)/dts/$*.dtb)
|
||||
|
||||
$(obj)/simpleImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
$(obj)/simpleImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,simpleboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
|
||||
$(obj)/simpleImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,simpleboot-$*,,$(obj)/$*.dtb)
|
||||
$(obj)/simpleImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,simpleboot-$*,,$(obj)/dts/$*.dtb)
|
||||
|
||||
$(obj)/treeImage.initrd.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
$(obj)/treeImage.initrd.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,treeboot-$*,,$(obj)/dts/$*.dtb,$(obj)/ramdisk.image.gz)
|
||||
|
||||
$(obj)/treeImage.%: vmlinux $(obj)/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,treeboot-$*,,$(obj)/$*.dtb)
|
||||
$(obj)/treeImage.%: vmlinux $(obj)/dts/%.dtb $(wrapperbits) FORCE
|
||||
$(call if_changed,wrap,treeboot-$*,,$(obj)/dts/$*.dtb)
|
||||
|
||||
# Rule to build device tree blobs
|
||||
$(obj)/%.dtb: $(src)/dts/%.dts FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
|
||||
$(obj)/%.dtb: $(src)/dts/fsl/%.dts FORCE
|
||||
$(call if_changed_dep,dtc)
|
||||
# Needed for the above targets to work with dts/fsl/ files
|
||||
$(obj)/dts/%.dtb: $(obj)/dts/fsl/%.dtb
|
||||
@cp $< $@
|
||||
|
||||
# If there isn't a platform selected then just strip the vmlinux.
|
||||
ifeq (,$(image-y))
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
subdir-y += fsl
|
||||
|
||||
dtstree := $(srctree)/$(src)
|
||||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
|
@ -0,0 +1,4 @@
|
|||
# SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
dtstree := $(srctree)/$(src)
|
||||
dtb-$(CONFIG_OF_ALL_DTBS) := $(patsubst $(dtstree)/%.dts,%.dtb, $(wildcard $(dtstree)/*.dts))
|
|
@ -5,6 +5,8 @@
|
|||
#include <types.h>
|
||||
#include <string.h>
|
||||
|
||||
#define INT_MAX ((int)(~0U>>1))
|
||||
|
||||
#include "of.h"
|
||||
|
||||
typedef unsigned long uintptr_t;
|
||||
|
|
|
@ -200,7 +200,7 @@ void ppc4xx_reset_system(char *cmd)
|
|||
u32 reset_type = DBCR0_RST_SYSTEM;
|
||||
const u32 *prop;
|
||||
|
||||
np = of_find_node_by_type(NULL, "cpu");
|
||||
np = of_get_cpu_node(0, NULL);
|
||||
if (np) {
|
||||
prop = of_get_property(np, "reset-type", NULL);
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ static int __init get_freq(char *name, unsigned long *val)
|
|||
int found = 0;
|
||||
|
||||
/* The cpu node should have timebase and clock frequency properties */
|
||||
cpu = of_find_node_by_type(NULL, "cpu");
|
||||
cpu = of_get_cpu_node(0, NULL);
|
||||
|
||||
if (cpu) {
|
||||
fp = of_get_property(cpu, name, NULL);
|
||||
|
@ -147,8 +147,9 @@ void __init mpc8xx_calibrate_decr(void)
|
|||
* we have to enable the timebase). The decrementer interrupt
|
||||
* is wired into the vector table, nothing to do here for that.
|
||||
*/
|
||||
cpu = of_find_node_by_type(NULL, "cpu");
|
||||
cpu = of_get_cpu_node(0, NULL);
|
||||
virq= irq_of_parse_and_map(cpu, 0);
|
||||
of_node_put(cpu);
|
||||
irq = virq_to_hw(virq);
|
||||
|
||||
sys_tmr2 = immr_map(im_sit);
|
||||
|
|
|
@ -1049,7 +1049,6 @@ core99_reset_cpu(struct device_node *node, long param, long value)
|
|||
unsigned long flags;
|
||||
struct macio_chip *macio;
|
||||
struct device_node *np;
|
||||
struct device_node *cpus;
|
||||
const int dflt_reset_lines[] = { KL_GPIO_RESET_CPU0,
|
||||
KL_GPIO_RESET_CPU1,
|
||||
KL_GPIO_RESET_CPU2,
|
||||
|
@ -1059,10 +1058,7 @@ core99_reset_cpu(struct device_node *node, long param, long value)
|
|||
if (macio->type != macio_keylargo)
|
||||
return -ENODEV;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (cpus == NULL)
|
||||
return -ENODEV;
|
||||
for (np = cpus->child; np != NULL; np = np->sibling) {
|
||||
for_each_of_cpu_node(np) {
|
||||
const u32 *num = of_get_property(np, "reg", NULL);
|
||||
const u32 *rst = of_get_property(np, "soft-reset", NULL);
|
||||
if (num == NULL || rst == NULL)
|
||||
|
@ -1072,7 +1068,6 @@ core99_reset_cpu(struct device_node *node, long param, long value)
|
|||
break;
|
||||
}
|
||||
}
|
||||
of_node_put(cpus);
|
||||
if (np == NULL || reset_io == 0)
|
||||
reset_io = dflt_reset_lines[param];
|
||||
|
||||
|
@ -1504,16 +1499,12 @@ static long g5_reset_cpu(struct device_node *node, long param, long value)
|
|||
unsigned long flags;
|
||||
struct macio_chip *macio;
|
||||
struct device_node *np;
|
||||
struct device_node *cpus;
|
||||
|
||||
macio = &macio_chips[0];
|
||||
if (macio->type != macio_keylargo2 && macio->type != macio_shasta)
|
||||
return -ENODEV;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (cpus == NULL)
|
||||
return -ENODEV;
|
||||
for (np = cpus->child; np != NULL; np = np->sibling) {
|
||||
for_each_of_cpu_node(np) {
|
||||
const u32 *num = of_get_property(np, "reg", NULL);
|
||||
const u32 *rst = of_get_property(np, "soft-reset", NULL);
|
||||
if (num == NULL || rst == NULL)
|
||||
|
@ -1523,7 +1514,6 @@ static long g5_reset_cpu(struct device_node *node, long param, long value)
|
|||
break;
|
||||
}
|
||||
}
|
||||
of_node_put(cpus);
|
||||
if (np == NULL || reset_io == 0)
|
||||
return -ENODEV;
|
||||
|
||||
|
@ -2515,31 +2505,26 @@ found:
|
|||
* supposed to be set when not supported, but I'm not very confident
|
||||
* that all Apple OF revs did it properly, I do it the paranoid way.
|
||||
*/
|
||||
while (uninorth_base && uninorth_rev > 3) {
|
||||
struct device_node *cpus = of_find_node_by_path("/cpus");
|
||||
if (uninorth_base && uninorth_rev > 3) {
|
||||
struct device_node *np;
|
||||
|
||||
if (!cpus || !cpus->child) {
|
||||
printk(KERN_WARNING "Can't find CPU(s) in device tree !\n");
|
||||
of_node_put(cpus);
|
||||
break;
|
||||
for_each_of_cpu_node(np) {
|
||||
int cpu_count = 1;
|
||||
|
||||
/* Nap mode not supported on SMP */
|
||||
if (of_get_property(np, "flush-on-lock", NULL) ||
|
||||
(cpu_count > 1)) {
|
||||
powersave_nap = 0;
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
|
||||
cpu_count++;
|
||||
powersave_nap = 1;
|
||||
}
|
||||
np = cpus->child;
|
||||
/* Nap mode not supported on SMP */
|
||||
if (np->sibling) {
|
||||
of_node_put(cpus);
|
||||
break;
|
||||
}
|
||||
/* Nap mode not supported if flush-on-lock property is present */
|
||||
if (of_get_property(np, "flush-on-lock", NULL)) {
|
||||
of_node_put(cpus);
|
||||
break;
|
||||
}
|
||||
of_node_put(cpus);
|
||||
powersave_nap = 1;
|
||||
printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n");
|
||||
break;
|
||||
}
|
||||
if (powersave_nap)
|
||||
printk(KERN_DEBUG "Processor NAP mode on idle enabled.\n");
|
||||
|
||||
/* On CPUs that support it (750FX), lowspeed by default during
|
||||
* NAP mode
|
||||
|
|
|
@ -243,10 +243,9 @@ static void __init l2cr_init(void)
|
|||
{
|
||||
/* Checks "l2cr-value" property in the registry */
|
||||
if (cpu_has_feature(CPU_FTR_L2CR)) {
|
||||
struct device_node *np = of_find_node_by_name(NULL, "cpus");
|
||||
if (!np)
|
||||
np = of_find_node_by_type(NULL, "cpu");
|
||||
if (np) {
|
||||
struct device_node *np;
|
||||
|
||||
for_each_of_cpu_node(np) {
|
||||
const unsigned int *l2cr =
|
||||
of_get_property(np, "l2cr-value", NULL);
|
||||
if (l2cr) {
|
||||
|
@ -256,6 +255,7 @@ static void __init l2cr_init(void)
|
|||
_set_L2CR(ppc_override_l2cr_value);
|
||||
}
|
||||
of_node_put(np);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -279,8 +279,8 @@ static void __init pmac_setup_arch(void)
|
|||
/* Set loops_per_jiffy to a half-way reasonable value,
|
||||
for use until calibrate_delay gets called. */
|
||||
loops_per_jiffy = 50000000 / HZ;
|
||||
cpu = of_find_node_by_type(NULL, "cpu");
|
||||
if (cpu != NULL) {
|
||||
|
||||
for_each_of_cpu_node(cpu) {
|
||||
fp = of_get_property(cpu, "clock-frequency", NULL);
|
||||
if (fp != NULL) {
|
||||
if (pvr >= 0x30 && pvr < 0x80)
|
||||
|
@ -292,8 +292,9 @@ static void __init pmac_setup_arch(void)
|
|||
else
|
||||
/* 601, 603, etc. */
|
||||
loops_per_jiffy = *fp / (2 * HZ);
|
||||
of_node_put(cpu);
|
||||
break;
|
||||
}
|
||||
of_node_put(cpu);
|
||||
}
|
||||
|
||||
/* See if newworld or oldworld */
|
||||
|
|
|
@ -64,7 +64,7 @@ static void sh_of_smp_probe(void)
|
|||
|
||||
init_cpu_possible(cpumask_of(0));
|
||||
|
||||
for_each_node_by_type(np, "cpu") {
|
||||
for_each_of_cpu_node(np) {
|
||||
const __be32 *cell = of_get_property(np, "reg", NULL);
|
||||
u64 id = -1;
|
||||
if (cell) id = of_read_number(cell, of_n_addr_cells(np));
|
||||
|
|
|
@ -24,9 +24,6 @@
|
|||
#include <linux/atomic.h>
|
||||
#include <linux/irqdomain.h>
|
||||
|
||||
#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
|
||||
#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
|
||||
|
||||
#define of_compat_cmp(s1, s2, l) strncmp((s1), (s2), (l))
|
||||
#define of_prop_cmp(s1, s2) strcasecmp((s1), (s2))
|
||||
#define of_node_cmp(s1, s2) strcmp((s1), (s2))
|
||||
|
|
|
@ -140,7 +140,7 @@ static void __init dtb_cpu_setup(void)
|
|||
int ret;
|
||||
|
||||
version = GET_APIC_VERSION(apic_read(APIC_LVR));
|
||||
for_each_node_by_type(dn, "cpu") {
|
||||
for_each_of_cpu_node(dn) {
|
||||
ret = of_property_read_u32(dn, "reg", &apic_id);
|
||||
if (ret < 0) {
|
||||
pr_warn("%pOF: missing local APIC ID\n", dn);
|
||||
|
|
|
@ -80,28 +80,18 @@ LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name)
|
|||
head-y := arch/xtensa/kernel/head.o
|
||||
core-y += arch/xtensa/kernel/ arch/xtensa/mm/
|
||||
core-y += $(buildvar) $(buildplf)
|
||||
core-y += arch/xtensa/boot/dts/
|
||||
|
||||
libs-y += arch/xtensa/lib/ $(LIBGCC)
|
||||
drivers-$(CONFIG_OPROFILE) += arch/xtensa/oprofile/
|
||||
|
||||
ifneq ($(CONFIG_BUILTIN_DTB),"")
|
||||
core-$(CONFIG_OF) += arch/xtensa/boot/dts/
|
||||
endif
|
||||
|
||||
boot := arch/xtensa/boot
|
||||
|
||||
all Image zImage uImage: vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
%.dtb:
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts $(boot)/dts/$@
|
||||
|
||||
dtbs: scripts
|
||||
$(Q)$(MAKE) $(build)=$(boot)/dts
|
||||
|
||||
define archhelp
|
||||
@echo '* Image - Kernel ELF image with reset vector'
|
||||
@echo '* zImage - Compressed kernel image (arch/xtensa/boot/images/zImage.*)'
|
||||
@echo '* uImage - U-Boot wrapped image'
|
||||
@echo ' dtbs - Build device tree blobs for enabled boards'
|
||||
endef
|
||||
|
|
|
@ -94,7 +94,7 @@ static void __init xtfpga_clk_setup(struct device_node *np)
|
|||
u32 freq;
|
||||
|
||||
if (!base) {
|
||||
pr_err("%s: invalid address\n", np->name);
|
||||
pr_err("%pOFn: invalid address\n", np);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -103,12 +103,12 @@ static void __init xtfpga_clk_setup(struct device_node *np)
|
|||
clk = clk_register_fixed_rate(NULL, np->name, NULL, 0, freq);
|
||||
|
||||
if (IS_ERR(clk)) {
|
||||
pr_err("%s: clk registration failed\n", np->name);
|
||||
pr_err("%pOFn: clk registration failed\n", np);
|
||||
return;
|
||||
}
|
||||
|
||||
if (of_clk_add_provider(np, of_clk_src_simple_get, clk)) {
|
||||
pr_err("%s: clk provider registration failed\n", np->name);
|
||||
pr_err("%pOFn: clk provider registration failed\n", np);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -706,8 +706,8 @@ static int parse_mc_ranges(struct device *dev,
|
|||
*ranges_start = of_get_property(mc_node, "ranges", &ranges_len);
|
||||
if (!(*ranges_start) || !ranges_len) {
|
||||
dev_warn(dev,
|
||||
"missing or empty ranges property for device tree node '%s'\n",
|
||||
mc_node->name);
|
||||
"missing or empty ranges property for device tree node '%pOFn'\n",
|
||||
mc_node);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -730,7 +730,7 @@ static int parse_mc_ranges(struct device *dev,
|
|||
|
||||
tuple_len = range_tuple_cell_count * sizeof(__be32);
|
||||
if (ranges_len % tuple_len != 0) {
|
||||
dev_err(dev, "malformed ranges property '%s'\n", mc_node->name);
|
||||
dev_err(dev, "malformed ranges property '%pOFn'\n", mc_node);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
|
|
@ -1229,7 +1229,7 @@ mbus_parse_ranges(struct device_node *node,
|
|||
tuple_len = (*cell_count) * sizeof(__be32);
|
||||
|
||||
if (ranges_len % tuple_len) {
|
||||
pr_warn("malformed ranges entry '%s'\n", node->name);
|
||||
pr_warn("malformed ranges entry '%pOFn'\n", node);
|
||||
return -EINVAL;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -183,7 +183,7 @@ static void __init of_cpu_clk_setup(struct device_node *node)
|
|||
pr_warn("%s: pmu-dfs base register not set, dynamic frequency scaling not available\n",
|
||||
__func__);
|
||||
|
||||
for_each_node_by_type(dn, "cpu")
|
||||
for_each_of_cpu_node(dn)
|
||||
ncpus++;
|
||||
|
||||
cpuclk = kcalloc(ncpus, sizeof(*cpuclk), GFP_KERNEL);
|
||||
|
@ -194,7 +194,7 @@ static void __init of_cpu_clk_setup(struct device_node *node)
|
|||
if (WARN_ON(!clks))
|
||||
goto clks_out;
|
||||
|
||||
for_each_node_by_type(dn, "cpu") {
|
||||
for_each_of_cpu_node(dn) {
|
||||
struct clk_init_data init;
|
||||
struct clk *clk;
|
||||
char *clk_name = kzalloc(5, GFP_KERNEL);
|
||||
|
|
|
@ -593,8 +593,7 @@ static void cpc925_mc_check(struct mem_ctl_info *mci)
|
|||
/******************** CPU err device********************************/
|
||||
static u32 cpc925_cpu_mask_disabled(void)
|
||||
{
|
||||
struct device_node *cpus;
|
||||
struct device_node *cpunode = NULL;
|
||||
struct device_node *cpunode;
|
||||
static u32 mask = 0;
|
||||
|
||||
/* use cached value if available */
|
||||
|
@ -603,20 +602,8 @@ static u32 cpc925_cpu_mask_disabled(void)
|
|||
|
||||
mask = APIMASK_ADI0 | APIMASK_ADI1;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (cpus == NULL) {
|
||||
cpc925_printk(KERN_DEBUG, "No /cpus node !\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
while ((cpunode = of_get_next_child(cpus, cpunode)) != NULL) {
|
||||
for_each_of_cpu_node(cpunode) {
|
||||
const u32 *reg = of_get_property(cpunode, "reg", NULL);
|
||||
|
||||
if (strcmp(cpunode->type, "cpu")) {
|
||||
cpc925_printk(KERN_ERR, "Not a cpu node in /cpus: %s\n", cpunode->name);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (reg == NULL || *reg > 2) {
|
||||
cpc925_printk(KERN_ERR, "Bad reg value at %pOF\n", cpunode);
|
||||
continue;
|
||||
|
@ -633,9 +620,6 @@ static u32 cpc925_cpu_mask_disabled(void)
|
|||
"Assuming PI id is equal to CPU MPIC id!\n");
|
||||
}
|
||||
|
||||
of_node_put(cpunode);
|
||||
of_node_put(cpus);
|
||||
|
||||
return mask;
|
||||
}
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ static int scpi_pm_domain_probe(struct platform_device *pdev)
|
|||
|
||||
scpi_pd->domain = i;
|
||||
scpi_pd->ops = scpi_ops;
|
||||
sprintf(scpi_pd->name, "%s.%d", np->name, i);
|
||||
sprintf(scpi_pd->name, "%pOFn.%d", np, i);
|
||||
scpi_pd->genpd.name = scpi_pd->name;
|
||||
scpi_pd->genpd.power_off = scpi_pd_power_off;
|
||||
scpi_pd->genpd.power_on = scpi_pd_power_on;
|
||||
|
|
|
@ -1446,8 +1446,7 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
|
|||
}
|
||||
|
||||
/* The CEC module handles HDMI hotplug detection */
|
||||
cec_np = of_find_compatible_node(np->parent, NULL,
|
||||
"mediatek,mt8173-cec");
|
||||
cec_np = of_get_compatible_child(np->parent, "mediatek,mt8173-cec");
|
||||
if (!cec_np) {
|
||||
dev_err(dev, "Failed to find CEC node\n");
|
||||
return -EINVAL;
|
||||
|
@ -1457,8 +1456,10 @@ static int mtk_hdmi_dt_parse_pdata(struct mtk_hdmi *hdmi,
|
|||
if (!cec_pdev) {
|
||||
dev_err(hdmi->dev, "Waiting for CEC device %pOF\n",
|
||||
cec_np);
|
||||
of_node_put(cec_np);
|
||||
return -EPROBE_DEFER;
|
||||
}
|
||||
of_node_put(cec_np);
|
||||
hdmi->cec_dev = &cec_pdev->dev;
|
||||
|
||||
/*
|
||||
|
|
|
@ -633,8 +633,7 @@ static int adreno_get_legacy_pwrlevels(struct device *dev)
|
|||
struct device_node *child, *node;
|
||||
int ret;
|
||||
|
||||
node = of_find_compatible_node(dev->of_node, NULL,
|
||||
"qcom,gpu-pwrlevels");
|
||||
node = of_get_compatible_child(dev->of_node, "qcom,gpu-pwrlevels");
|
||||
if (!node) {
|
||||
dev_err(dev, "Could not find the GPU powerlevels\n");
|
||||
return -ENXIO;
|
||||
|
@ -655,6 +654,8 @@ static int adreno_get_legacy_pwrlevels(struct device *dev)
|
|||
dev_pm_opp_add(dev, val, 0);
|
||||
}
|
||||
|
||||
of_node_put(node);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -543,7 +543,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu)
|
|||
return ~(u32)0;
|
||||
}
|
||||
|
||||
for_each_node_by_type(node, "cpu") {
|
||||
for_each_of_cpu_node(node) {
|
||||
prop = of_get_property(node, "reg", &len);
|
||||
for (i = 0; i < len / sizeof(u32); i++) {
|
||||
if (be32_to_cpup(&prop[i]) == vcpu) {
|
||||
|
|
|
@ -341,7 +341,7 @@ static struct device_node *bcmgenet_mii_of_find_mdio(struct bcmgenet_priv *priv)
|
|||
if (!compat)
|
||||
return NULL;
|
||||
|
||||
priv->mdio_dn = of_find_compatible_node(dn, NULL, compat);
|
||||
priv->mdio_dn = of_get_compatible_child(dn, compat);
|
||||
kfree(compat);
|
||||
if (!priv->mdio_dn) {
|
||||
dev_err(kdev, "unable to find MDIO bus node\n");
|
||||
|
|
|
@ -714,8 +714,9 @@ static int get_ephy_nodes(struct stmmac_priv *priv)
|
|||
return -ENODEV;
|
||||
}
|
||||
|
||||
mdio_internal = of_find_compatible_node(mdio_mux, NULL,
|
||||
mdio_internal = of_get_compatible_child(mdio_mux,
|
||||
"allwinner,sun8i-h3-mdio-internal");
|
||||
of_node_put(mdio_mux);
|
||||
if (!mdio_internal) {
|
||||
dev_err(priv->device, "Cannot get internal_mdio node\n");
|
||||
return -ENODEV;
|
||||
|
@ -729,13 +730,20 @@ static int get_ephy_nodes(struct stmmac_priv *priv)
|
|||
gmac->rst_ephy = of_reset_control_get_exclusive(iphynode, NULL);
|
||||
if (IS_ERR(gmac->rst_ephy)) {
|
||||
ret = PTR_ERR(gmac->rst_ephy);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
if (ret == -EPROBE_DEFER) {
|
||||
of_node_put(iphynode);
|
||||
of_node_put(mdio_internal);
|
||||
return ret;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
dev_info(priv->device, "Found internal PHY node\n");
|
||||
of_node_put(iphynode);
|
||||
of_node_put(mdio_internal);
|
||||
return 0;
|
||||
}
|
||||
|
||||
of_node_put(mdio_internal);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,10 +73,9 @@ static int nfcmrvl_uart_parse_dt(struct device_node *node,
|
|||
struct device_node *matched_node;
|
||||
int ret;
|
||||
|
||||
matched_node = of_find_compatible_node(node, NULL, "marvell,nfc-uart");
|
||||
matched_node = of_get_compatible_child(node, "marvell,nfc-uart");
|
||||
if (!matched_node) {
|
||||
matched_node = of_find_compatible_node(node, NULL,
|
||||
"mrvl,nfc-uart");
|
||||
matched_node = of_get_compatible_child(node, "mrvl,nfc-uart");
|
||||
if (!matched_node)
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
|
@ -67,6 +67,7 @@ bool of_node_name_eq(const struct device_node *np, const char *name)
|
|||
|
||||
return (strlen(name) == len) && (strncmp(node_name, name, len) == 0);
|
||||
}
|
||||
EXPORT_SYMBOL(of_node_name_eq);
|
||||
|
||||
bool of_node_name_prefix(const struct device_node *np, const char *prefix)
|
||||
{
|
||||
|
@ -75,6 +76,7 @@ bool of_node_name_prefix(const struct device_node *np, const char *prefix)
|
|||
|
||||
return strncmp(kbasename(np->full_name), prefix, strlen(prefix)) == 0;
|
||||
}
|
||||
EXPORT_SYMBOL(of_node_name_prefix);
|
||||
|
||||
int of_n_addr_cells(struct device_node *np)
|
||||
{
|
||||
|
@ -330,6 +332,8 @@ static bool __of_find_n_match_cpu_property(struct device_node *cpun,
|
|||
|
||||
ac = of_n_addr_cells(cpun);
|
||||
cell = of_get_property(cpun, prop_name, &prop_len);
|
||||
if (!cell && !ac && arch_match_cpu_phys_id(cpu, 0))
|
||||
return true;
|
||||
if (!cell || !ac)
|
||||
return false;
|
||||
prop_len /= sizeof(*cell) * ac;
|
||||
|
@ -390,7 +394,7 @@ struct device_node *of_get_cpu_node(int cpu, unsigned int *thread)
|
|||
{
|
||||
struct device_node *cpun;
|
||||
|
||||
for_each_node_by_type(cpun, "cpu") {
|
||||
for_each_of_cpu_node(cpun) {
|
||||
if (arch_find_n_match_cpu_physical_id(cpun, cpu, thread))
|
||||
return cpun;
|
||||
}
|
||||
|
@ -744,6 +748,45 @@ struct device_node *of_get_next_available_child(const struct device_node *node,
|
|||
}
|
||||
EXPORT_SYMBOL(of_get_next_available_child);
|
||||
|
||||
/**
|
||||
* of_get_next_cpu_node - Iterate on cpu nodes
|
||||
* @prev: previous child of the /cpus node, or NULL to get first
|
||||
*
|
||||
* Returns a cpu node pointer with refcount incremented, use of_node_put()
|
||||
* on it when done. Returns NULL when prev is the last child. Decrements
|
||||
* the refcount of prev.
|
||||
*/
|
||||
struct device_node *of_get_next_cpu_node(struct device_node *prev)
|
||||
{
|
||||
struct device_node *next = NULL;
|
||||
unsigned long flags;
|
||||
struct device_node *node;
|
||||
|
||||
if (!prev)
|
||||
node = of_find_node_by_path("/cpus");
|
||||
|
||||
raw_spin_lock_irqsave(&devtree_lock, flags);
|
||||
if (prev)
|
||||
next = prev->sibling;
|
||||
else if (node) {
|
||||
next = node->child;
|
||||
of_node_put(node);
|
||||
}
|
||||
for (; next; next = next->sibling) {
|
||||
if (!(of_node_name_eq(next, "cpu") ||
|
||||
(next->type && !of_node_cmp(next->type, "cpu"))))
|
||||
continue;
|
||||
if (!__of_device_is_available(next))
|
||||
continue;
|
||||
if (of_node_get(next))
|
||||
break;
|
||||
}
|
||||
of_node_put(prev);
|
||||
raw_spin_unlock_irqrestore(&devtree_lock, flags);
|
||||
return next;
|
||||
}
|
||||
EXPORT_SYMBOL(of_get_next_cpu_node);
|
||||
|
||||
/**
|
||||
* of_get_compatible_child - Find compatible child node
|
||||
* @parent: parent node
|
||||
|
@ -2013,7 +2056,7 @@ struct device_node *of_find_next_cache_node(const struct device_node *np)
|
|||
/* OF on pmac has nodes instead of properties named "l2-cache"
|
||||
* beneath CPU nodes.
|
||||
*/
|
||||
if (!strcmp(np->type, "cpu"))
|
||||
if (IS_ENABLED(CONFIG_PPC_PMAC) && !strcmp(np->type, "cpu"))
|
||||
for_each_child_of_node(np, child)
|
||||
if (!strcmp(child->type, "cache"))
|
||||
return child;
|
||||
|
|
|
@ -207,7 +207,8 @@ static ssize_t of_device_get_modalias(struct device *dev, char *str, ssize_t len
|
|||
return -ENODEV;
|
||||
|
||||
/* Name & Type */
|
||||
csize = snprintf(str, len, "of:N%sT%s", dev->of_node->name,
|
||||
/* %p eats all alphanum characters, so %c must be used here */
|
||||
csize = snprintf(str, len, "of:N%pOFn%c%s", dev->of_node, 'T',
|
||||
dev->of_node->type);
|
||||
tsize = csize;
|
||||
len -= csize;
|
||||
|
@ -286,7 +287,7 @@ void of_device_uevent(struct device *dev, struct kobj_uevent_env *env)
|
|||
if ((!dev) || (!dev->of_node))
|
||||
return;
|
||||
|
||||
add_uevent_var(env, "OF_NAME=%s", dev->of_node->name);
|
||||
add_uevent_var(env, "OF_NAME=%pOFn", dev->of_node);
|
||||
add_uevent_var(env, "OF_FULLNAME=%pOF", dev->of_node);
|
||||
if (dev->of_node->type && strcmp("<NULL>", dev->of_node->type) != 0)
|
||||
add_uevent_var(env, "OF_TYPE=%s", dev->of_node->type);
|
||||
|
|
|
@ -97,8 +97,8 @@ static int of_mdiobus_register_phy(struct mii_bus *mdio,
|
|||
return rc;
|
||||
}
|
||||
|
||||
dev_dbg(&mdio->dev, "registered phy %s at address %i\n",
|
||||
child->name, addr);
|
||||
dev_dbg(&mdio->dev, "registered phy %pOFn at address %i\n",
|
||||
child, addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -127,8 +127,8 @@ static int of_mdiobus_register_device(struct mii_bus *mdio,
|
|||
return rc;
|
||||
}
|
||||
|
||||
dev_dbg(&mdio->dev, "registered mdio device %s at address %i\n",
|
||||
child->name, addr);
|
||||
dev_dbg(&mdio->dev, "registered mdio device %pOFn at address %i\n",
|
||||
child, addr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -263,8 +263,8 @@ int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
|
|||
continue;
|
||||
|
||||
/* be noisy to encourage people to set reg property */
|
||||
dev_info(&mdio->dev, "scan phy %s at address %i\n",
|
||||
child->name, addr);
|
||||
dev_info(&mdio->dev, "scan phy %pOFn at address %i\n",
|
||||
child, addr);
|
||||
|
||||
if (of_mdiobus_child_is_phy(child)) {
|
||||
rc = of_mdiobus_register_phy(mdio, child, addr);
|
||||
|
|
|
@ -24,18 +24,9 @@ static void __init of_numa_parse_cpu_nodes(void)
|
|||
{
|
||||
u32 nid;
|
||||
int r;
|
||||
struct device_node *cpus;
|
||||
struct device_node *np = NULL;
|
||||
|
||||
cpus = of_find_node_by_path("/cpus");
|
||||
if (!cpus)
|
||||
return;
|
||||
|
||||
for_each_child_of_node(cpus, np) {
|
||||
/* Skip things that are not CPUs */
|
||||
if (of_node_cmp(np->type, "cpu") != 0)
|
||||
continue;
|
||||
struct device_node *np;
|
||||
|
||||
for_each_of_cpu_node(np) {
|
||||
r = of_property_read_u32(np, "numa-node-id", &nid);
|
||||
if (r)
|
||||
continue;
|
||||
|
@ -46,8 +37,6 @@ static void __init of_numa_parse_cpu_nodes(void)
|
|||
else
|
||||
node_set(nid, numa_nodes_parsed);
|
||||
}
|
||||
|
||||
of_node_put(cpus);
|
||||
}
|
||||
|
||||
static int __init of_numa_parse_memory_nodes(void)
|
||||
|
@ -163,8 +152,8 @@ int of_node_to_nid(struct device_node *device)
|
|||
np = of_get_next_parent(np);
|
||||
}
|
||||
if (np && r)
|
||||
pr_warn("Invalid \"numa-node-id\" property in node %s\n",
|
||||
np->name);
|
||||
pr_warn("Invalid \"numa-node-id\" property in node %pOFn\n",
|
||||
np);
|
||||
of_node_put(np);
|
||||
|
||||
/*
|
||||
|
|
|
@ -27,6 +27,14 @@ struct alias_prop {
|
|||
char stem[0];
|
||||
};
|
||||
|
||||
#if defined(CONFIG_SPARC)
|
||||
#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 2
|
||||
#else
|
||||
#define OF_ROOT_NODE_ADDR_CELLS_DEFAULT 1
|
||||
#endif
|
||||
|
||||
#define OF_ROOT_NODE_SIZE_CELLS_DEFAULT 1
|
||||
|
||||
extern struct mutex of_mutex;
|
||||
extern struct list_head aliases_lookup;
|
||||
extern struct kset *of_kset;
|
||||
|
|
|
@ -425,8 +425,8 @@ static int build_changeset_next_level(struct overlay_changeset *ovcs,
|
|||
for_each_child_of_node(overlay_node, child) {
|
||||
ret = add_changeset_node(ovcs, target_node, child);
|
||||
if (ret) {
|
||||
pr_debug("Failed to apply node @%pOF/%s, err=%d\n",
|
||||
target_node, child->name, ret);
|
||||
pr_debug("Failed to apply node @%pOF/%pOFn, err=%d\n",
|
||||
target_node, child, ret);
|
||||
of_node_put(child);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ static void of_device_make_bus_id(struct device *dev)
|
|||
*/
|
||||
reg = of_get_property(node, "reg", NULL);
|
||||
if (reg && (addr = of_translate_address(node, reg)) != OF_BAD_ADDR) {
|
||||
dev_set_name(dev, dev_name(dev) ? "%llx.%s:%s" : "%llx.%s",
|
||||
(unsigned long long)addr, node->name,
|
||||
dev_set_name(dev, dev_name(dev) ? "%llx.%pOFn:%s" : "%llx.%pOFn",
|
||||
(unsigned long long)addr, node,
|
||||
dev_name(dev));
|
||||
return;
|
||||
}
|
||||
|
@ -142,8 +142,8 @@ struct platform_device *of_device_alloc(struct device_node *np,
|
|||
WARN_ON(rc);
|
||||
}
|
||||
if (of_irq_to_resource_table(np, res, num_irq) != num_irq)
|
||||
pr_debug("not all legacy IRQ resources mapped for %s\n",
|
||||
np->name);
|
||||
pr_debug("not all legacy IRQ resources mapped for %pOFn\n",
|
||||
np);
|
||||
}
|
||||
|
||||
dev->dev.of_node = of_node_get(np);
|
||||
|
|
|
@ -20,8 +20,8 @@
|
|||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
test-mux-dev {
|
||||
reg = <32>;
|
||||
test-mux-dev@20 {
|
||||
reg = <0x20>;
|
||||
compatible = "unittest-i2c-dev";
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -103,8 +103,8 @@
|
|||
#size-cells = <0>;
|
||||
reg = <0>;
|
||||
|
||||
test-mux-dev {
|
||||
reg = <32>;
|
||||
test-mux-dev@20 {
|
||||
reg = <0x20>;
|
||||
compatible = "unittest-i2c-dev";
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -212,8 +212,8 @@ static int __init of_unittest_check_node_linkage(struct device_node *np)
|
|||
|
||||
for_each_child_of_node(np, child) {
|
||||
if (child->parent != np) {
|
||||
pr_err("Child node %s links to wrong parent %s\n",
|
||||
child->name, np->name);
|
||||
pr_err("Child node %pOFn links to wrong parent %pOFn\n",
|
||||
child, np);
|
||||
rc = -EINVAL;
|
||||
goto put_child;
|
||||
}
|
||||
|
@ -299,6 +299,10 @@ static void __init of_unittest_printf(void)
|
|||
|
||||
of_unittest_printf_one(np, "%pOF", full_name);
|
||||
of_unittest_printf_one(np, "%pOFf", full_name);
|
||||
of_unittest_printf_one(np, "%pOFn", "dev");
|
||||
of_unittest_printf_one(np, "%2pOFn", "dev");
|
||||
of_unittest_printf_one(np, "%5pOFn", " dev");
|
||||
of_unittest_printf_one(np, "%pOFnc", "dev:test-sub-device");
|
||||
of_unittest_printf_one(np, "%pOFp", phandle_str);
|
||||
of_unittest_printf_one(np, "%pOFP", "dev@100");
|
||||
of_unittest_printf_one(np, "ABC %pOFP ABC", "ABC dev@100 ABC");
|
||||
|
@ -1046,16 +1050,16 @@ static void __init of_unittest_platform_populate(void)
|
|||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node(child, grandchild)
|
||||
unittest(of_find_device_by_node(grandchild),
|
||||
"Could not create device for node '%s'\n",
|
||||
grandchild->name);
|
||||
"Could not create device for node '%pOFn'\n",
|
||||
grandchild);
|
||||
}
|
||||
|
||||
of_platform_depopulate(&test_bus->dev);
|
||||
for_each_child_of_node(np, child) {
|
||||
for_each_child_of_node(child, grandchild)
|
||||
unittest(!of_find_device_by_node(grandchild),
|
||||
"device didn't get destroyed '%s'\n",
|
||||
grandchild->name);
|
||||
"device didn't get destroyed '%pOFn'\n",
|
||||
grandchild);
|
||||
}
|
||||
|
||||
platform_device_unregister(test_bus);
|
||||
|
@ -2357,11 +2361,14 @@ static __init void of_unittest_overlay_high_level(void)
|
|||
}
|
||||
}
|
||||
|
||||
for (np = overlay_base_root->child; np; np = np->sibling) {
|
||||
if (of_get_child_by_name(of_root, np->name)) {
|
||||
unittest(0, "illegal node name in overlay_base %s",
|
||||
np->name);
|
||||
return;
|
||||
for_each_child_of_node(overlay_base_root, np) {
|
||||
struct device_node *base_child;
|
||||
for_each_child_of_node(of_root, base_child) {
|
||||
if (!strcmp(np->full_name, base_child->full_name)) {
|
||||
unittest(0, "illegal node name in overlay_base %pOFn",
|
||||
np);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1022,12 +1022,13 @@ static int twl4030_bci_probe(struct platform_device *pdev)
|
|||
if (bci->dev->of_node) {
|
||||
struct device_node *phynode;
|
||||
|
||||
phynode = of_find_compatible_node(bci->dev->of_node->parent,
|
||||
NULL, "ti,twl4030-usb");
|
||||
phynode = of_get_compatible_child(bci->dev->of_node->parent,
|
||||
"ti,twl4030-usb");
|
||||
if (phynode) {
|
||||
bci->usb_nb.notifier_call = twl4030_bci_usb_ncb;
|
||||
bci->transceiver = devm_usb_get_phy_by_node(
|
||||
bci->dev, phynode, &bci->usb_nb);
|
||||
of_node_put(phynode);
|
||||
if (IS_ERR(bci->transceiver)) {
|
||||
ret = PTR_ERR(bci->transceiver);
|
||||
if (ret == -EPROBE_DEFER)
|
||||
|
|
|
@ -383,7 +383,7 @@ int __init dove_init_pmu(void)
|
|||
|
||||
domains_node = of_get_child_by_name(np_pmu, "domains");
|
||||
if (!domains_node) {
|
||||
pr_err("%s: failed to find domains sub-node\n", np_pmu->name);
|
||||
pr_err("%pOFn: failed to find domains sub-node\n", np_pmu);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -396,7 +396,7 @@ int __init dove_init_pmu(void)
|
|||
pmu->pmc_base = of_iomap(pmu->of_node, 0);
|
||||
pmu->pmu_base = of_iomap(pmu->of_node, 1);
|
||||
if (!pmu->pmc_base || !pmu->pmu_base) {
|
||||
pr_err("%s: failed to map PMU\n", np_pmu->name);
|
||||
pr_err("%pOFn: failed to map PMU\n", np_pmu);
|
||||
iounmap(pmu->pmu_base);
|
||||
iounmap(pmu->pmc_base);
|
||||
kfree(pmu);
|
||||
|
@ -414,7 +414,7 @@ int __init dove_init_pmu(void)
|
|||
break;
|
||||
|
||||
domain->pmu = pmu;
|
||||
domain->base.name = kstrdup(np->name, GFP_KERNEL);
|
||||
domain->base.name = kasprintf(GFP_KERNEL, "%pOFn", np);
|
||||
if (!domain->base.name) {
|
||||
kfree(domain);
|
||||
break;
|
||||
|
@ -444,7 +444,7 @@ int __init dove_init_pmu(void)
|
|||
/* Loss of the interrupt controller is not a fatal error. */
|
||||
parent_irq = irq_of_parse_and_map(pmu->of_node, 0);
|
||||
if (!parent_irq) {
|
||||
pr_err("%s: no interrupt specified\n", np_pmu->name);
|
||||
pr_err("%pOFn: no interrupt specified\n", np_pmu);
|
||||
} else {
|
||||
ret = dove_init_pmu_irq(pmu, parent_irq);
|
||||
if (ret)
|
||||
|
|
|
@ -131,7 +131,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
|
|||
|
||||
pdev = of_find_device_by_node(np2);
|
||||
if (!pdev) {
|
||||
pr_err("%s: failed to lookup pdev\n", np2->name);
|
||||
pr_err("%pOFn: failed to lookup pdev\n", np2);
|
||||
of_node_put(np2);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
@ -153,7 +153,7 @@ int ucc_of_parse_tdm(struct device_node *np, struct ucc_tdm *utdm,
|
|||
pdev = of_find_device_by_node(np2);
|
||||
if (!pdev) {
|
||||
ret = -EINVAL;
|
||||
pr_err("%s: failed to lookup pdev\n", np2->name);
|
||||
pr_err("%pOFn: failed to lookup pdev\n", np2);
|
||||
of_node_put(np2);
|
||||
goto err_miss_siram_property;
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ static int apr_add_device(struct device *dev, struct device_node *np,
|
|||
adev->domain_id = id->domain_id;
|
||||
adev->version = id->svc_version;
|
||||
if (np)
|
||||
strncpy(adev->name, np->name, APR_NAME_SIZE);
|
||||
snprintf(adev->name, APR_NAME_SIZE, "%pOFn", np);
|
||||
else
|
||||
strncpy(adev->name, id->name, APR_NAME_SIZE);
|
||||
|
||||
|
|
|
@ -392,21 +392,21 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
|||
error = of_property_read_u32(node, "reg", &id);
|
||||
if (error) {
|
||||
dev_err(pmu->dev,
|
||||
"%s: failed to retrieve domain id (reg): %d\n",
|
||||
node->name, error);
|
||||
"%pOFn: failed to retrieve domain id (reg): %d\n",
|
||||
node, error);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (id >= pmu->info->num_domains) {
|
||||
dev_err(pmu->dev, "%s: invalid domain id %d\n",
|
||||
node->name, id);
|
||||
dev_err(pmu->dev, "%pOFn: invalid domain id %d\n",
|
||||
node, id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
pd_info = &pmu->info->domain_info[id];
|
||||
if (!pd_info) {
|
||||
dev_err(pmu->dev, "%s: undefined domain id %d\n",
|
||||
node->name, id);
|
||||
dev_err(pmu->dev, "%pOFn: undefined domain id %d\n",
|
||||
node, id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
@ -424,8 +424,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
|||
if (!pd->clks)
|
||||
return -ENOMEM;
|
||||
} else {
|
||||
dev_dbg(pmu->dev, "%s: doesn't have clocks: %d\n",
|
||||
node->name, pd->num_clks);
|
||||
dev_dbg(pmu->dev, "%pOFn: doesn't have clocks: %d\n",
|
||||
node, pd->num_clks);
|
||||
pd->num_clks = 0;
|
||||
}
|
||||
|
||||
|
@ -434,8 +434,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
|||
if (IS_ERR(pd->clks[i].clk)) {
|
||||
error = PTR_ERR(pd->clks[i].clk);
|
||||
dev_err(pmu->dev,
|
||||
"%s: failed to get clk at index %d: %d\n",
|
||||
node->name, i, error);
|
||||
"%pOFn: failed to get clk at index %d: %d\n",
|
||||
node, i, error);
|
||||
return error;
|
||||
}
|
||||
}
|
||||
|
@ -486,8 +486,8 @@ static int rockchip_pm_add_one_domain(struct rockchip_pmu *pmu,
|
|||
error = rockchip_pd_power(pd, true);
|
||||
if (error) {
|
||||
dev_err(pmu->dev,
|
||||
"failed to power on domain '%s': %d\n",
|
||||
node->name, error);
|
||||
"failed to power on domain '%pOFn': %d\n",
|
||||
node, error);
|
||||
goto err_unprepare_clocks;
|
||||
}
|
||||
|
||||
|
@ -575,24 +575,24 @@ static int rockchip_pm_add_subdomain(struct rockchip_pmu *pmu,
|
|||
error = of_property_read_u32(parent, "reg", &idx);
|
||||
if (error) {
|
||||
dev_err(pmu->dev,
|
||||
"%s: failed to retrieve domain id (reg): %d\n",
|
||||
parent->name, error);
|
||||
"%pOFn: failed to retrieve domain id (reg): %d\n",
|
||||
parent, error);
|
||||
goto err_out;
|
||||
}
|
||||
parent_domain = pmu->genpd_data.domains[idx];
|
||||
|
||||
error = rockchip_pm_add_one_domain(pmu, np);
|
||||
if (error) {
|
||||
dev_err(pmu->dev, "failed to handle node %s: %d\n",
|
||||
np->name, error);
|
||||
dev_err(pmu->dev, "failed to handle node %pOFn: %d\n",
|
||||
np, error);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
error = of_property_read_u32(np, "reg", &idx);
|
||||
if (error) {
|
||||
dev_err(pmu->dev,
|
||||
"%s: failed to retrieve domain id (reg): %d\n",
|
||||
np->name, error);
|
||||
"%pOFn: failed to retrieve domain id (reg): %d\n",
|
||||
np, error);
|
||||
goto err_out;
|
||||
}
|
||||
child_domain = pmu->genpd_data.domains[idx];
|
||||
|
@ -683,16 +683,16 @@ static int rockchip_pm_domain_probe(struct platform_device *pdev)
|
|||
for_each_available_child_of_node(np, node) {
|
||||
error = rockchip_pm_add_one_domain(pmu, node);
|
||||
if (error) {
|
||||
dev_err(dev, "failed to handle node %s: %d\n",
|
||||
node->name, error);
|
||||
dev_err(dev, "failed to handle node %pOFn: %d\n",
|
||||
node, error);
|
||||
of_node_put(node);
|
||||
goto err_out;
|
||||
}
|
||||
|
||||
error = rockchip_pm_add_subdomain(pmu, node);
|
||||
if (error < 0) {
|
||||
dev_err(dev, "failed to handle subdomain node %s: %d\n",
|
||||
node->name, error);
|
||||
dev_err(dev, "failed to handle subdomain node %pOFn: %d\n",
|
||||
node, error);
|
||||
of_node_put(node);
|
||||
goto err_out;
|
||||
}
|
||||
|
|
|
@ -796,7 +796,7 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np)
|
|||
|
||||
id = tegra_powergate_lookup(pmc, np->name);
|
||||
if (id < 0) {
|
||||
pr_err("powergate lookup failed for %s: %d\n", np->name, id);
|
||||
pr_err("powergate lookup failed for %pOFn: %d\n", np, id);
|
||||
goto free_mem;
|
||||
}
|
||||
|
||||
|
@ -816,13 +816,13 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np)
|
|||
|
||||
err = tegra_powergate_of_get_clks(pg, np);
|
||||
if (err < 0) {
|
||||
pr_err("failed to get clocks for %s: %d\n", np->name, err);
|
||||
pr_err("failed to get clocks for %pOFn: %d\n", np, err);
|
||||
goto set_available;
|
||||
}
|
||||
|
||||
err = tegra_powergate_of_get_resets(pg, np, off);
|
||||
if (err < 0) {
|
||||
pr_err("failed to get resets for %s: %d\n", np->name, err);
|
||||
pr_err("failed to get resets for %pOFn: %d\n", np, err);
|
||||
goto remove_clks;
|
||||
}
|
||||
|
||||
|
@ -851,15 +851,15 @@ static void tegra_powergate_add(struct tegra_pmc *pmc, struct device_node *np)
|
|||
|
||||
err = pm_genpd_init(&pg->genpd, NULL, off);
|
||||
if (err < 0) {
|
||||
pr_err("failed to initialise PM domain %s: %d\n", np->name,
|
||||
pr_err("failed to initialise PM domain %pOFn: %d\n", np,
|
||||
err);
|
||||
goto remove_resets;
|
||||
}
|
||||
|
||||
err = of_genpd_add_provider_simple(np, &pg->genpd);
|
||||
if (err < 0) {
|
||||
pr_err("failed to add PM domain provider for %s: %d\n",
|
||||
np->name, err);
|
||||
pr_err("failed to add PM domain provider for %pOFn: %d\n",
|
||||
np, err);
|
||||
goto remove_genpd;
|
||||
}
|
||||
|
||||
|
|
|
@ -544,15 +544,15 @@ static void __iomem *pktdma_get_regs(struct knav_dma_device *dma,
|
|||
|
||||
ret = of_address_to_resource(node, index, &res);
|
||||
if (ret) {
|
||||
dev_err(dev, "Can't translate of node(%s) address for index(%d)\n",
|
||||
node->name, index);
|
||||
dev_err(dev, "Can't translate of node(%pOFn) address for index(%d)\n",
|
||||
node, index);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
regs = devm_ioremap_resource(kdev->dev, &res);
|
||||
if (IS_ERR(regs))
|
||||
dev_err(dev, "Failed to map register base for index(%d) node(%s)\n",
|
||||
index, node->name);
|
||||
dev_err(dev, "Failed to map register base for index(%d) node(%pOFn)\n",
|
||||
index, node);
|
||||
if (_size)
|
||||
*_size = resource_size(&res);
|
||||
|
||||
|
|
|
@ -1382,15 +1382,15 @@ static void __iomem *knav_queue_map_reg(struct knav_device *kdev,
|
|||
|
||||
ret = of_address_to_resource(node, index, &res);
|
||||
if (ret) {
|
||||
dev_err(kdev->dev, "Can't translate of node(%s) address for index(%d)\n",
|
||||
node->name, index);
|
||||
dev_err(kdev->dev, "Can't translate of node(%pOFn) address for index(%d)\n",
|
||||
node, index);
|
||||
return ERR_PTR(ret);
|
||||
}
|
||||
|
||||
regs = devm_ioremap_resource(kdev->dev, &res);
|
||||
if (IS_ERR(regs))
|
||||
dev_err(kdev->dev, "Failed to map register base for index(%d) node(%s)\n",
|
||||
index, node->name);
|
||||
dev_err(kdev->dev, "Failed to map register base for index(%d) node(%pOFn)\n",
|
||||
index, node);
|
||||
return regs;
|
||||
}
|
||||
|
||||
|
|
|
@ -1925,7 +1925,7 @@ static int __init fsl_diu_init(void)
|
|||
pr_info("Freescale Display Interface Unit (DIU) framebuffer driver\n");
|
||||
|
||||
#ifdef CONFIG_NOT_COHERENT_CACHE
|
||||
np = of_find_node_by_type(NULL, "cpu");
|
||||
np = of_get_cpu_node(0, NULL);
|
||||
if (!np) {
|
||||
pr_err("fsl-diu-fb: can't find 'cpu' device node\n");
|
||||
return -ENODEV;
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2014 Samsung Electronics Co., Ltd.
|
||||
* Author: Tomasz Figa <t.figa@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Device Tree binding constants for Samsung Exynos3250 clock controllers.
|
||||
*/
|
||||
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2013 Samsung Electronics Co., Ltd.
|
||||
* Author: Andrzej Hajda <a.hajda@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Device Tree binding constants for Exynos4 clock controller.
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_EXYNOS_4_H
|
||||
#define _DT_BINDINGS_CLOCK_EXYNOS_4_H
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0 */
|
||||
/*
|
||||
* Copyright (c) 2013 Samsung Electronics Co., Ltd.
|
||||
* Author: Andrzej Hajda <a.hajda@samsung.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 as
|
||||
* published by the Free Software Foundation.
|
||||
*
|
||||
* Device Tree binding constants for Exynos5250 clock controller.
|
||||
*/
|
||||
*/
|
||||
|
||||
#ifndef _DT_BINDINGS_CLOCK_EXYNOS_5250_H
|
||||
#define _DT_BINDINGS_CLOCK_EXYNOS_5250_H
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue