-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'dt-for-linus' of git://git.secretlab.ca/git/linux
Pull devicetree changes from Grant Likely: "Updates to devicetree core code. This branch contains the following notable changes: - add reserved memory binding - make struct device_node a kobject and remove legacy /proc/device-tree - ePAPR conformance fixes - update in-kernel DTC copy to version v1.4.0 - preparatory changes for dynamic device tree overlays - minor bug fixes and documentation changes The most significant change in this branch is the conversion of struct device_node to be a kobject that is exposed via sysfs and removal of the old /proc/device-tree code. This simplifies the device tree handling code and tightens up the lifecycle on device tree nodes. [updated: added fix for dangling select PROC_DEVICETREE]" * tag 'dt-for-linus' of git://git.secretlab.ca/git/linux: (29 commits) dt: Remove dangling "select PROC_DEVICETREE" of: Add support for ePAPR "stdout-path" property of: device_node kobject lifecycle fixes of: only scan for reserved mem when fdt present powerpc: add support for reserved memory defined by device tree arm64: add support for reserved memory defined by device tree of: add missing major vendors of: add vendor prefix for SMSC of: remove /proc/device-tree of/selftest: Add self tests for manipulation of properties of: Make device nodes kobjects so they show up in sysfs arm: add support for reserved memory defined by device tree drivers: of: add support for custom reserved memory drivers drivers: of: add initialization code for dynamic reserved memory drivers: of: add initialization code for static reserved memory of: document bindings for reserved-memory nodes Revert "of: fix of_update_property()" kbuild: dtbs_install: new make target ARM: mvebu: Allows to get the SoC ID even without PCI enabled of: Allows to use the PCI translator without the PCI core ...
- Loading branch information
Showing
45 changed files
with
1,555 additions
and
728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
What: /sys/firmware/devicetree/* | ||
Date: November 2013 | ||
Contact: Grant Likely <grant.likely@linaro.org> | ||
Description: | ||
When using OpenFirmware or a Flattened Device Tree to enumerate | ||
hardware, the device tree structure will be exposed in this | ||
directory. | ||
|
||
It is possible for multiple device-tree directories to exist. | ||
Some device drivers use a separate detached device tree which | ||
have no attachment to the system tree and will appear in a | ||
different subdirectory under /sys/firmware/devicetree. | ||
|
||
Userspace must not use the /sys/firmware/devicetree/base | ||
path directly, but instead should follow /proc/device-tree | ||
symlink. It is possible that the absolute path will change | ||
in the future, but the symlink is the stable ABI. | ||
|
||
The /proc/device-tree symlink replaces the devicetree /proc | ||
filesystem support, and has largely the same semantics and | ||
should be compatible with existing userspace. | ||
|
||
The contents of /sys/firmware/devicetree/ is a | ||
hierarchy of directories, one per device tree node. The | ||
directory name is the resolved path component name (node | ||
name plus address). Properties are represented as files | ||
in the directory. The contents of each file is the exact | ||
binary data from the device tree. |
133 changes: 133 additions & 0 deletions
133
Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
*** Reserved memory regions *** | ||
|
||
Reserved memory is specified as a node under the /reserved-memory node. | ||
The operating system shall exclude reserved memory from normal usage | ||
one can create child nodes describing particular reserved (excluded from | ||
normal use) memory regions. Such memory regions are usually designed for | ||
the special usage by various device drivers. | ||
|
||
Parameters for each memory region can be encoded into the device tree | ||
with the following nodes: | ||
|
||
/reserved-memory node | ||
--------------------- | ||
#address-cells, #size-cells (required) - standard definition | ||
- Should use the same values as the root node | ||
ranges (required) - standard definition | ||
- Should be empty | ||
|
||
/reserved-memory/ child nodes | ||
----------------------------- | ||
Each child of the reserved-memory node specifies one or more regions of | ||
reserved memory. Each child node may either use a 'reg' property to | ||
specify a specific range of reserved memory, or a 'size' property with | ||
optional constraints to request a dynamically allocated block of memory. | ||
|
||
Following the generic-names recommended practice, node names should | ||
reflect the purpose of the node (ie. "framebuffer" or "dma-pool"). Unit | ||
address (@<address>) should be appended to the name if the node is a | ||
static allocation. | ||
|
||
Properties: | ||
Requires either a) or b) below. | ||
a) static allocation | ||
reg (required) - standard definition | ||
b) dynamic allocation | ||
size (required) - length based on parent's #size-cells | ||
- Size in bytes of memory to reserve. | ||
alignment (optional) - length based on parent's #size-cells | ||
- Address boundary for alignment of allocation. | ||
alloc-ranges (optional) - prop-encoded-array (address, length pairs). | ||
- Specifies regions of memory that are | ||
acceptable to allocate from. | ||
|
||
If both reg and size are present, then the reg property takes precedence | ||
and size is ignored. | ||
|
||
Additional properties: | ||
compatible (optional) - standard definition | ||
- may contain the following strings: | ||
- shared-dma-pool: This indicates a region of memory meant to be | ||
used as a shared pool of DMA buffers for a set of devices. It can | ||
be used by an operating system to instanciate the necessary pool | ||
management subsystem if necessary. | ||
- vendor specific string in the form <vendor>,[<device>-]<usage> | ||
no-map (optional) - empty property | ||
- Indicates the operating system must not create a virtual mapping | ||
of the region as part of its standard mapping of system memory, | ||
nor permit speculative access to it under any circumstances other | ||
than under the control of the device driver using the region. | ||
reusable (optional) - empty property | ||
- The operating system can use the memory in this region with the | ||
limitation that the device driver(s) owning the region need to be | ||
able to reclaim it back. Typically that means that the operating | ||
system can use that region to store volatile or cached data that | ||
can be otherwise regenerated or migrated elsewhere. | ||
|
||
Linux implementation note: | ||
- If a "linux,cma-default" property is present, then Linux will use the | ||
region for the default pool of the contiguous memory allocator. | ||
|
||
Device node references to reserved memory | ||
----------------------------------------- | ||
Regions in the /reserved-memory node may be referenced by other device | ||
nodes by adding a memory-region property to the device node. | ||
|
||
memory-region (optional) - phandle, specifier pairs to children of /reserved-memory | ||
|
||
Example | ||
------- | ||
This example defines 3 contiguous regions are defined for Linux kernel: | ||
one default of all device drivers (named linux,cma@72000000 and 64MiB in size), | ||
one dedicated to the framebuffer device (named framebuffer@78000000, 8MiB), and | ||
one for multimedia processing (named multimedia-memory@77000000, 64MiB). | ||
|
||
/ { | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
|
||
memory { | ||
reg = <0x40000000 0x40000000>; | ||
}; | ||
|
||
reserved-memory { | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
ranges; | ||
|
||
/* global autoconfigured region for contiguous allocations */ | ||
linux,cma { | ||
compatible = "shared-dma-pool"; | ||
reusable; | ||
size = <0x4000000>; | ||
alignment = <0x2000>; | ||
linux,cma-default; | ||
}; | ||
|
||
display_reserved: framebuffer@78000000 { | ||
reg = <0x78000000 0x800000>; | ||
}; | ||
|
||
multimedia_reserved: multimedia@77000000 { | ||
compatible = "acme,multimedia-memory"; | ||
reg = <0x77000000 0x4000000>; | ||
}; | ||
}; | ||
|
||
/* ... */ | ||
|
||
fb0: video@12300000 { | ||
memory-region = <&display_reserved>; | ||
/* ... */ | ||
}; | ||
|
||
scaler: scaler@12500000 { | ||
memory-region = <&multimedia_reserved>; | ||
/* ... */ | ||
}; | ||
|
||
codec: codec@12600000 { | ||
memory-region = <&multimedia_reserved>; | ||
/* ... */ | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.