提交 3f17ea6d 编写于 作者: L Linus Torvalds

Merge branch 'next' (accumulated 3.16 merge window patches) into master

Now that 3.15 is released, this merges the 'next' branch into 'master',
bringing us to the normal situation where my 'master' branch is the
merge window.

* accumulated work in next: (6809 commits)
  ufs: sb mutex merge + mutex_destroy
  powerpc: update comments for generic idle conversion
  cris: update comments for generic idle conversion
  idle: remove cpu_idle() forward declarations
  nbd: zero from and len fields in NBD_CMD_DISCONNECT.
  mm: convert some level-less printks to pr_*
  MAINTAINERS: adi-buildroot-devel is moderated
  MAINTAINERS: add linux-api for review of API/ABI changes
  mm/kmemleak-test.c: use pr_fmt for logging
  fs/dlm/debug_fs.c: replace seq_printf by seq_puts
  fs/dlm/lockspace.c: convert simple_str to kstr
  fs/dlm/config.c: convert simple_str to kstr
  mm: mark remap_file_pages() syscall as deprecated
  mm: memcontrol: remove unnecessary memcg argument from soft limit functions
  mm: memcontrol: clean up memcg zoneinfo lookup
  mm/memblock.c: call kmemleak directly from memblock_(alloc|free)
  mm/mempool.c: update the kmemleak stack trace for mempool allocations
  lib/radix-tree.c: update the kmemleak stack trace for radix tree allocations
  mm: introduce kmemleak_update_trace()
  mm/kmemleak.c: use %u to print ->checksum
  ...

要显示的变更太多。

To preserve performance only 1000 of 1000+ files are displayed.
...@@ -62,6 +62,40 @@ KernelVersion: 3.11 ...@@ -62,6 +62,40 @@ KernelVersion: 3.11
Description: Description:
This group contains functions available to this USB gadget. This group contains functions available to this USB gadget.
What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>
Date: May 2014
KernelVersion: 3.16
Description:
This group contains "Feature Descriptors" specific for one
gadget's USB interface or one interface group described
by an IAD.
The attributes:
compatible_id - 8-byte string for "Compatible ID"
sub_compatible_id - 8-byte string for "Sub Compatible ID"
What: /config/usb-gadget/gadget/functions/<func>.<inst>/interface.<n>/<property>
Date: May 2014
KernelVersion: 3.16
Description:
This group contains "Extended Property Descriptors" specific for one
gadget's USB interface or one interface group described
by an IAD.
The attributes:
type - value 1..7 for interpreting the data
1: unicode string
2: unicode string with environment variable
3: binary
4: little-endian 32-bit
5: big-endian 32-bit
6: unicode string with a symbolic link
7: multiple unicode strings
data - blob of data to be interpreted depending on
type
What: /config/usb-gadget/gadget/strings What: /config/usb-gadget/gadget/strings
Date: Jun 2013 Date: Jun 2013
KernelVersion: 3.11 KernelVersion: 3.11
...@@ -79,3 +113,14 @@ Description: ...@@ -79,3 +113,14 @@ Description:
product - gadget's product description product - gadget's product description
manufacturer - gadget's manufacturer description manufacturer - gadget's manufacturer description
What: /config/usb-gadget/gadget/os_desc
Date: May 2014
KernelVersion: 3.16
Description:
This group contains "OS String" extension handling attributes.
use - flag turning "OS Desctiptors" support on/off
b_vendor_code - one-byte value used for custom per-device and
per-interface requests
qw_sign - an identifier to be reported as "OS String"
proper
...@@ -114,14 +114,17 @@ What: /sys/bus/iio/devices/iio:deviceX/in_temp_raw ...@@ -114,14 +114,17 @@ What: /sys/bus/iio/devices/iio:deviceX/in_temp_raw
What: /sys/bus/iio/devices/iio:deviceX/in_tempX_raw What: /sys/bus/iio/devices/iio:deviceX/in_tempX_raw
What: /sys/bus/iio/devices/iio:deviceX/in_temp_x_raw What: /sys/bus/iio/devices/iio:deviceX/in_temp_x_raw
What: /sys/bus/iio/devices/iio:deviceX/in_temp_y_raw What: /sys/bus/iio/devices/iio:deviceX/in_temp_y_raw
What: /sys/bus/iio/devices/iio:deviceX/in_temp_z_raw What: /sys/bus/iio/devices/iio:deviceX/in_temp_ambient_raw
What: /sys/bus/iio/devices/iio:deviceX/in_temp_object_raw
KernelVersion: 2.6.35 KernelVersion: 2.6.35
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
Description: Description:
Raw (unscaled no bias removal etc.) temperature measurement. Raw (unscaled no bias removal etc.) temperature measurement.
If an axis is specified it generally means that the temperature If an axis is specified it generally means that the temperature
sensor is associated with one part of a compound device (e.g. sensor is associated with one part of a compound device (e.g.
a gyroscope axis). Units after application of scale and offset a gyroscope axis). The ambient and object modifiers distinguish
between ambient (reference) and distant temperature for contact-
less measurements. Units after application of scale and offset
are milli degrees Celsius. are milli degrees Celsius.
What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input What: /sys/bus/iio/devices/iio:deviceX/in_tempX_input
...@@ -210,6 +213,14 @@ Contact: linux-iio@vger.kernel.org ...@@ -210,6 +213,14 @@ Contact: linux-iio@vger.kernel.org
Description: Description:
Scaled humidity measurement in milli percent. Scaled humidity measurement in milli percent.
What: /sys/bus/iio/devices/iio:deviceX/in_X_mean_raw
KernelVersion: 3.5
Contact: linux-iio@vger.kernel.org
Description:
Averaged raw measurement from channel X. The number of values
used for averaging is device specific. The converting rules for
normal raw values also applies to the averaged raw values.
What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset
What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
...@@ -784,6 +795,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en ...@@ -784,6 +795,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_x_en
What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en What: /sys/.../iio:deviceX/scan_elements/in_incli_y_en
What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en What: /sys/.../iio:deviceX/scan_elements/in_pressureY_en
What: /sys/.../iio:deviceX/scan_elements/in_pressure_en What: /sys/.../iio:deviceX/scan_elements/in_pressure_en
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_en
KernelVersion: 2.6.37 KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
Description: Description:
...@@ -799,6 +811,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type ...@@ -799,6 +811,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_voltageY_supply_type
What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type What: /sys/.../iio:deviceX/scan_elements/in_timestamp_type
What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type What: /sys/.../iio:deviceX/scan_elements/in_pressureY_type
What: /sys/.../iio:deviceX/scan_elements/in_pressure_type What: /sys/.../iio:deviceX/scan_elements/in_pressure_type
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_type
KernelVersion: 2.6.37 KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
Description: Description:
...@@ -845,6 +858,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index ...@@ -845,6 +858,7 @@ What: /sys/.../iio:deviceX/scan_elements/in_incli_y_index
What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index What: /sys/.../iio:deviceX/scan_elements/in_timestamp_index
What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index What: /sys/.../iio:deviceX/scan_elements/in_pressureY_index
What: /sys/.../iio:deviceX/scan_elements/in_pressure_index What: /sys/.../iio:deviceX/scan_elements/in_pressure_index
What: /sys/.../iio:deviceX/scan_elements/in_rot_quaternion_index
KernelVersion: 2.6.37 KernelVersion: 2.6.37
Contact: linux-iio@vger.kernel.org Contact: linux-iio@vger.kernel.org
Description: Description:
...@@ -881,6 +895,25 @@ Description: ...@@ -881,6 +895,25 @@ Description:
on-chip EEPROM. After power-up or chip reset the device will on-chip EEPROM. After power-up or chip reset the device will
automatically load the saved configuration. automatically load the saved configuration.
What: /sys/.../iio:deviceX/in_illuminanceY_input
What: /sys/.../iio:deviceX/in_illuminanceY_raw
What: /sys/.../iio:deviceX/in_illuminanceY_mean_raw
KernelVersion: 3.4
Contact: linux-iio@vger.kernel.org
Description:
Illuminance measurement, units after application of scale
and offset are lux.
What: /sys/.../iio:deviceX/in_intensityY_raw
What: /sys/.../iio:deviceX/in_intensityY_ir_raw
What: /sys/.../iio:deviceX/in_intensityY_both_raw
KernelVersion: 3.4
Contact: linux-iio@vger.kernel.org
Description:
Unit-less light intensity. Modifiers both and ir indicate
that measurements contains visible and infrared light
components or just infrared light, respectively.
What: /sys/.../iio:deviceX/in_intensity_red_integration_time What: /sys/.../iio:deviceX/in_intensity_red_integration_time
What: /sys/.../iio:deviceX/in_intensity_green_integration_time What: /sys/.../iio:deviceX/in_intensity_green_integration_time
What: /sys/.../iio:deviceX/in_intensity_blue_integration_time What: /sys/.../iio:deviceX/in_intensity_blue_integration_time
...@@ -891,3 +924,12 @@ Contact: linux-iio@vger.kernel.org ...@@ -891,3 +924,12 @@ Contact: linux-iio@vger.kernel.org
Description: Description:
This attribute is used to get/set the integration time in This attribute is used to get/set the integration time in
seconds. seconds.
What: /sys/bus/iio/devices/iio:deviceX/in_rot_quaternion_raw
KernelVersion: 3.15
Contact: linux-iio@vger.kernel.org
Description:
Raw value of quaternion components using a format
x y z w. Here x, y, and z component represents the axis about
which a rotation will occur and w component represents the
amount of rotation.
What /sys/bus/iio/devices/iio:deviceX/in_proximity_raw
Date: March 2014
KernelVersion: 3.15
Contact: Matt Ranostay <mranostay@gmail.com>
Description:
Get the current distance in meters of storm (1km steps)
1000-40000 = distance in meters
What /sys/bus/iio/devices/iio:deviceX/sensor_sensitivity
Date: March 2014
KernelVersion: 3.15
Contact: Matt Ranostay <mranostay@gmail.com>
Description:
Show or set the gain boost of the amp, from 0-31 range.
18 = indoors (default)
14 = outdoors
...@@ -250,3 +250,24 @@ Description: ...@@ -250,3 +250,24 @@ Description:
valid. For example, writing a 2 to this file when sriov_numvfs valid. For example, writing a 2 to this file when sriov_numvfs
is not 0 and not 2 already will return an error. Writing a 10 is not 0 and not 2 already will return an error. Writing a 10
when the value of sriov_totalvfs is 8 will return an error. when the value of sriov_totalvfs is 8 will return an error.
What: /sys/bus/pci/devices/.../driver_override
Date: April 2014
Contact: Alex Williamson <alex.williamson@redhat.com>
Description:
This file allows the driver for a device to be specified which
will override standard static and dynamic ID matching. When
specified, only a driver with a name matching the value written
to driver_override will have an opportunity to bind to the
device. The override is specified by writing a string to the
driver_override file (echo pci-stub > driver_override) and
may be cleared with an empty string (echo > driver_override).
This returns the device to standard matching rules binding.
Writing to driver_override does not automatically unbind the
device from its current driver or make any attempt to
automatically load the specified driver. If no driver with a
matching name is currently loaded in the kernel, the device
will not bind to any driver. This also allows devices to
opt-out of driver binding using a driver_override name such as
"none". Only a single driver may be specified in the override,
there is no support for parsing delimiters.
...@@ -128,7 +128,7 @@ Description: Discover cpuidle policy and mechanism ...@@ -128,7 +128,7 @@ Description: Discover cpuidle policy and mechanism
What: /sys/devices/system/cpu/cpu#/cpufreq/* What: /sys/devices/system/cpu/cpu#/cpufreq/*
Date: pre-git history Date: pre-git history
Contact: cpufreq@vger.kernel.org Contact: linux-pm@vger.kernel.org
Description: Discover and change clock speed of CPUs Description: Discover and change clock speed of CPUs
Clock scaling allows you to change the clock speed of the Clock scaling allows you to change the clock speed of the
...@@ -146,7 +146,7 @@ Description: Discover and change clock speed of CPUs ...@@ -146,7 +146,7 @@ Description: Discover and change clock speed of CPUs
What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus What: /sys/devices/system/cpu/cpu#/cpufreq/freqdomain_cpus
Date: June 2013 Date: June 2013
Contact: cpufreq@vger.kernel.org Contact: linux-pm@vger.kernel.org
Description: Discover CPUs in the same CPU frequency coordination domain Description: Discover CPUs in the same CPU frequency coordination domain
freqdomain_cpus is the list of CPUs (online+offline) that share freqdomain_cpus is the list of CPUs (online+offline) that share
......
What: /sys/class/leds/blink1::<serial>/rgb
Date: January 2013
Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Description: The ThingM blink1 is an USB RGB LED. The color notation is
3-byte hexadecimal. Read this attribute to get the last set
color. Write the 24-bit hexadecimal color to change the current
LED color. The default color is full white (0xFFFFFF).
For instance, set the color to green with: echo 00FF00 > rgb
What: /sys/class/leds/blink1::<serial>/fade
Date: January 2013
Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Description: This attribute allows to set a fade time in milliseconds for
the next color change. Read the attribute to know the current
fade time. The default value is set to 0 (no fade time). For
instance, set a fade time of 2 seconds with: echo 2000 > fade
What: /sys/class/leds/blink1::<serial>/play
Date: January 2013
Contact: Vivien Didelot <vivien.didelot@savoirfairelinux.com>
Description: This attribute is used to play/pause the light patterns. Write 1
to start playing, 0 to stop. Reading this attribute returns the
current playing status.
What: /sys/devices/../../gisb_arb_timeout
Date: May 2014
KernelVersion: 3.17
Contact: Florian Fainelli <f.fainelli@gmail.com>
Description:
Returns the currently configured raw timeout value of the
Broadcom Set Top Box internal GISB bus arbiter. Minimum value
is 1, and maximum value is 0xffffffff.
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_req
Date: Feb 2014
Contact: Li Jun <b47624@freescale.com>
Description:
Can be set and read.
Set a_bus_req(A-device bus request) input to be 1 if
the application running on the A-device wants to use the bus,
and to be 0 when the application no longer wants to use
the bus(or wants to work as peripheral). a_bus_req can also
be set to 1 by kernel in response to remote wakeup signaling
from the B-device, the A-device should decide to resume the bus.
Valid values are "1" and "0".
Reading: returns 1 if the application running on the A-device
is using the bus as host role, otherwise 0.
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_bus_drop
Date: Feb 2014
Contact: Li Jun <b47624@freescale.com>
Description:
Can be set and read
The a_bus_drop(A-device bus drop) input is 1 when the
application running on the A-device wants to power down
the bus, and is 0 otherwise, When a_bus_drop is 1, then
the a_bus_req shall be 0.
Valid values are "1" and "0".
Reading: returns 1 if the bus is off(vbus is turned off) by
A-device, otherwise 0.
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/b_bus_req
Date: Feb 2014
Contact: Li Jun <b47624@freescale.com>
Description:
Can be set and read.
The b_bus_req(B-device bus request) input is 1 during the time
that the application running on the B-device wants to use the
bus as host, and is 0 when the application no longer wants to
work as host and decides to switch back to be peripheral.
Valid values are "1" and "0".
Reading: returns if the application running on the B device
is using the bus as host role, otherwise 0.
What: /sys/bus/platform/devices/ci_hdrc.0/inputs/a_clr_err
Date: Feb 2014
Contact: Li Jun <b47624@freescale.com>
Description:
Only can be set.
The a_clr_err(A-device Vbus error clear) input is used to clear
vbus error, then A-device will power down the bus.
Valid value is "1"
...@@ -7,19 +7,30 @@ Description: ...@@ -7,19 +7,30 @@ Description:
subsystem. subsystem.
What: /sys/power/state What: /sys/power/state
Date: August 2006 Date: May 2014
Contact: Rafael J. Wysocki <rjw@rjwysocki.net> Contact: Rafael J. Wysocki <rjw@rjwysocki.net>
Description: Description:
The /sys/power/state file controls the system power state. The /sys/power/state file controls system sleep states.
Reading from this file returns what states are supported, Reading from this file returns the available sleep state
which is hard-coded to 'freeze' (Low-Power Idle), 'standby' labels, which may be "mem", "standby", "freeze" and "disk"
(Power-On Suspend), 'mem' (Suspend-to-RAM), and 'disk' (hibernation). The meanings of the first three labels depend on
(Suspend-to-Disk). the relative_sleep_states command line argument as follows:
1) relative_sleep_states = 1
"mem", "standby", "freeze" represent non-hibernation sleep
states from the deepest ("mem", always present) to the
shallowest ("freeze"). "standby" and "freeze" may or may
not be present depending on the capabilities of the
platform. "freeze" can only be present if "standby" is
present.
2) relative_sleep_states = 0 (default)
"mem" - "suspend-to-RAM", present if supported.
"standby" - "power-on suspend", present if supported.
"freeze" - "suspend-to-idle", always present.
Writing to this file one of these strings causes the system to Writing to this file one of these strings causes the system to
transition into that state. Please see the file transition into the corresponding state, if available. See
Documentation/power/states.txt for a description of each of Documentation/power/states.txt for a description of what
these states. "suspend-to-RAM", "power-on suspend" and "suspend-to-idle" mean.
What: /sys/power/disk What: /sys/power/disk
Date: September 2006 Date: September 2006
......
...@@ -73,6 +73,11 @@ Perl ...@@ -73,6 +73,11 @@ Perl
You will need perl 5 and the following modules: Getopt::Long, Getopt::Std, You will need perl 5 and the following modules: Getopt::Long, Getopt::Std,
File::Basename, and File::Find to build the kernel. File::Basename, and File::Find to build the kernel.
BC
--
You will need bc to build kernels 3.10 and higher
System utilities System utilities
================ ================
......
...@@ -660,15 +660,23 @@ There are a number of driver model diagnostic macros in <linux/device.h> ...@@ -660,15 +660,23 @@ There are a number of driver model diagnostic macros in <linux/device.h>
which you should use to make sure messages are matched to the right device which you should use to make sure messages are matched to the right device
and driver, and are tagged with the right level: dev_err(), dev_warn(), and driver, and are tagged with the right level: dev_err(), dev_warn(),
dev_info(), and so forth. For messages that aren't associated with a dev_info(), and so forth. For messages that aren't associated with a
particular device, <linux/printk.h> defines pr_debug() and pr_info(). particular device, <linux/printk.h> defines pr_notice(), pr_info(),
pr_warn(), pr_err(), etc.
Coming up with good debugging messages can be quite a challenge; and once Coming up with good debugging messages can be quite a challenge; and once
you have them, they can be a huge help for remote troubleshooting. Such you have them, they can be a huge help for remote troubleshooting. However
messages should be compiled out when the DEBUG symbol is not defined (that debug message printing is handled differently than printing other non-debug
is, by default they are not included). When you use dev_dbg() or pr_debug(), messages. While the other pr_XXX() functions print unconditionally,
that's automatic. Many subsystems have Kconfig options to turn on -DDEBUG. pr_debug() does not; it is compiled out by default, unless either DEBUG is
A related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to the defined or CONFIG_DYNAMIC_DEBUG is set. That is true for dev_dbg() also,
ones already enabled by DEBUG. and a related convention uses VERBOSE_DEBUG to add dev_vdbg() messages to
the ones already enabled by DEBUG.
Many subsystems have Kconfig debug options to turn on -DDEBUG in the
corresponding Makefile; in other cases specific files #define DEBUG. And
when a debug message should be unconditionally printed, such as if it is
already inside a debug-related #ifdef secton, printk(KERN_DEBUG ...) can be
used.
Chapter 14: Allocating memory Chapter 14: Allocating memory
......
此差异已折叠。
...@@ -4,22 +4,26 @@ ...@@ -4,22 +4,26 @@
James E.J. Bottomley <James.Bottomley@HansenPartnership.com> James E.J. Bottomley <James.Bottomley@HansenPartnership.com>
This document describes the DMA API. For a more gentle introduction This document describes the DMA API. For a more gentle introduction
of the API (and actual examples) see of the API (and actual examples), see Documentation/DMA-API-HOWTO.txt.
Documentation/DMA-API-HOWTO.txt.
This API is split into two pieces. Part I describes the API. Part II This API is split into two pieces. Part I describes the basic API.
describes the extensions to the API for supporting non-consistent Part II describes extensions for supporting non-consistent memory
memory machines. Unless you know that your driver absolutely has to machines. Unless you know that your driver absolutely has to support
support non-consistent platforms (this is usually only legacy non-consistent platforms (this is usually only legacy platforms) you
platforms) you should only use the API described in part I. should only use the API described in part I.
Part I - dma_ API Part I - dma_ API
------------------------------------- -------------------------------------
To get the dma_ API, you must #include <linux/dma-mapping.h> To get the dma_ API, you must #include <linux/dma-mapping.h>. This
provides dma_addr_t and the interfaces described below.
A dma_addr_t can hold any valid DMA or bus address for the platform. It
can be given to a device to use as a DMA source or target. A CPU cannot
reference a dma_addr_t directly because there may be translation between
its physical address space and the bus address space.
Part Ia - Using large dma-coherent buffers Part Ia - Using large DMA-coherent buffers
------------------------------------------ ------------------------------------------
void * void *
...@@ -33,20 +37,21 @@ to make sure to flush the processor's write buffers before telling ...@@ -33,20 +37,21 @@ to make sure to flush the processor's write buffers before telling
devices to read that memory.) devices to read that memory.)
This routine allocates a region of <size> bytes of consistent memory. This routine allocates a region of <size> bytes of consistent memory.
It also returns a <dma_handle> which may be cast to an unsigned
integer the same width as the bus and used as the physical address
base of the region.
Returns: a pointer to the allocated region (in the processor's virtual It returns a pointer to the allocated region (in the processor's virtual
address space) or NULL if the allocation failed. address space) or NULL if the allocation failed.
It also returns a <dma_handle> which may be cast to an unsigned integer the
same width as the bus and given to the device as the bus address base of
the region.
Note: consistent memory can be expensive on some platforms, and the Note: consistent memory can be expensive on some platforms, and the
minimum allocation length may be as big as a page, so you should minimum allocation length may be as big as a page, so you should
consolidate your requests for consistent memory as much as possible. consolidate your requests for consistent memory as much as possible.
The simplest way to do that is to use the dma_pool calls (see below). The simplest way to do that is to use the dma_pool calls (see below).
The flag parameter (dma_alloc_coherent only) allows the caller to The flag parameter (dma_alloc_coherent() only) allows the caller to
specify the GFP_ flags (see kmalloc) for the allocation (the specify the GFP_ flags (see kmalloc()) for the allocation (the
implementation may choose to ignore flags that affect the location of implementation may choose to ignore flags that affect the location of
the returned memory, like GFP_DMA). the returned memory, like GFP_DMA).
...@@ -61,24 +66,24 @@ void ...@@ -61,24 +66,24 @@ void
dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, dma_free_coherent(struct device *dev, size_t size, void *cpu_addr,
dma_addr_t dma_handle) dma_addr_t dma_handle)
Free the region of consistent memory you previously allocated. dev, Free a region of consistent memory you previously allocated. dev,
size and dma_handle must all be the same as those passed into the size and dma_handle must all be the same as those passed into
consistent allocate. cpu_addr must be the virtual address returned by dma_alloc_coherent(). cpu_addr must be the virtual address returned by
the consistent allocate. the dma_alloc_coherent().
Note that unlike their sibling allocation calls, these routines Note that unlike their sibling allocation calls, these routines
may only be called with IRQs enabled. may only be called with IRQs enabled.
Part Ib - Using small dma-coherent buffers Part Ib - Using small DMA-coherent buffers
------------------------------------------ ------------------------------------------
To get this part of the dma_ API, you must #include <linux/dmapool.h> To get this part of the dma_ API, you must #include <linux/dmapool.h>
Many drivers need lots of small dma-coherent memory regions for DMA Many drivers need lots of small DMA-coherent memory regions for DMA
descriptors or I/O buffers. Rather than allocating in units of a page descriptors or I/O buffers. Rather than allocating in units of a page
or more using dma_alloc_coherent(), you can use DMA pools. These work or more using dma_alloc_coherent(), you can use DMA pools. These work
much like a struct kmem_cache, except that they use the dma-coherent allocator, much like a struct kmem_cache, except that they use the DMA-coherent allocator,
not __get_free_pages(). Also, they understand common hardware constraints not __get_free_pages(). Also, they understand common hardware constraints
for alignment, like queue heads needing to be aligned on N-byte boundaries. for alignment, like queue heads needing to be aligned on N-byte boundaries.
...@@ -87,7 +92,7 @@ for alignment, like queue heads needing to be aligned on N-byte boundaries. ...@@ -87,7 +92,7 @@ for alignment, like queue heads needing to be aligned on N-byte boundaries.
dma_pool_create(const char *name, struct device *dev, dma_pool_create(const char *name, struct device *dev,
size_t size, size_t align, size_t alloc); size_t size, size_t align, size_t alloc);
The pool create() routines initialize a pool of dma-coherent buffers dma_pool_create() initializes a pool of DMA-coherent buffers
for use with a given device. It must be called in a context which for use with a given device. It must be called in a context which
can sleep. can sleep.
...@@ -102,25 +107,26 @@ from this pool must not cross 4KByte boundaries. ...@@ -102,25 +107,26 @@ from this pool must not cross 4KByte boundaries.
void *dma_pool_alloc(struct dma_pool *pool, gfp_t gfp_flags, void *dma_pool_alloc(struct dma_pool *pool, gfp_t gfp_flags,
dma_addr_t *dma_handle); dma_addr_t *dma_handle);
This allocates memory from the pool; the returned memory will meet the size This allocates memory from the pool; the returned memory will meet the
and alignment requirements specified at creation time. Pass GFP_ATOMIC to size and alignment requirements specified at creation time. Pass
prevent blocking, or if it's permitted (not in_interrupt, not holding SMP locks), GFP_ATOMIC to prevent blocking, or if it's permitted (not
pass GFP_KERNEL to allow blocking. Like dma_alloc_coherent(), this returns in_interrupt, not holding SMP locks), pass GFP_KERNEL to allow
two values: an address usable by the cpu, and the dma address usable by the blocking. Like dma_alloc_coherent(), this returns two values: an
pool's device. address usable by the CPU, and the DMA address usable by the pool's
device.
void dma_pool_free(struct dma_pool *pool, void *vaddr, void dma_pool_free(struct dma_pool *pool, void *vaddr,
dma_addr_t addr); dma_addr_t addr);
This puts memory back into the pool. The pool is what was passed to This puts memory back into the pool. The pool is what was passed to
the pool allocation routine; the cpu (vaddr) and dma addresses are what dma_pool_alloc(); the CPU (vaddr) and DMA addresses are what
were returned when that routine allocated the memory being freed. were returned when that routine allocated the memory being freed.
void dma_pool_destroy(struct dma_pool *pool); void dma_pool_destroy(struct dma_pool *pool);
The pool destroy() routines free the resources of the pool. They must be dma_pool_destroy() frees the resources of the pool. It must be
called in a context which can sleep. Make sure you've freed all allocated called in a context which can sleep. Make sure you've freed all allocated
memory back to the pool before you destroy it. memory back to the pool before you destroy it.
...@@ -187,9 +193,9 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size, ...@@ -187,9 +193,9 @@ dma_map_single(struct device *dev, void *cpu_addr, size_t size,
enum dma_data_direction direction) enum dma_data_direction direction)
Maps a piece of processor virtual memory so it can be accessed by the Maps a piece of processor virtual memory so it can be accessed by the
device and returns the physical handle of the memory. device and returns the bus address of the memory.
The direction for both api's may be converted freely by casting. The direction for both APIs may be converted freely by casting.
However the dma_ API uses a strongly typed enumerator for its However the dma_ API uses a strongly typed enumerator for its
direction: direction:
...@@ -198,31 +204,30 @@ DMA_TO_DEVICE data is going from the memory to the device ...@@ -198,31 +204,30 @@ DMA_TO_DEVICE data is going from the memory to the device
DMA_FROM_DEVICE data is coming from the device to the memory DMA_FROM_DEVICE data is coming from the device to the memory
DMA_BIDIRECTIONAL direction isn't known DMA_BIDIRECTIONAL direction isn't known
Notes: Not all memory regions in a machine can be mapped by this Notes: Not all memory regions in a machine can be mapped by this API.
API. Further, regions that appear to be physically contiguous in Further, contiguous kernel virtual space may not be contiguous as
kernel virtual space may not be contiguous as physical memory. Since physical memory. Since this API does not provide any scatter/gather
this API does not provide any scatter/gather capability, it will fail capability, it will fail if the user tries to map a non-physically
if the user tries to map a non-physically contiguous piece of memory. contiguous piece of memory. For this reason, memory to be mapped by
For this reason, it is recommended that memory mapped by this API be this API should be obtained from sources which guarantee it to be
obtained only from sources which guarantee it to be physically contiguous physically contiguous (like kmalloc).
(like kmalloc).
Further, the bus address of the memory must be within the
Further, the physical address of the memory must be within the dma_mask of the device (the dma_mask is a bit mask of the
dma_mask of the device (the dma_mask represents a bit mask of the addressable region for the device, i.e., if the bus address of
addressable region for the device. I.e., if the physical address of the memory ANDed with the dma_mask is still equal to the bus
the memory anded with the dma_mask is still equal to the physical address, then the device can perform DMA to the memory). To
address, then the device can perform DMA to the memory). In order to
ensure that the memory allocated by kmalloc is within the dma_mask, ensure that the memory allocated by kmalloc is within the dma_mask,
the driver may specify various platform-dependent flags to restrict the driver may specify various platform-dependent flags to restrict
the physical memory range of the allocation (e.g. on x86, GFP_DMA the bus address range of the allocation (e.g., on x86, GFP_DMA
guarantees to be within the first 16Mb of available physical memory, guarantees to be within the first 16MB of available bus addresses,
as required by ISA devices). as required by ISA devices).
Note also that the above constraints on physical contiguity and Note also that the above constraints on physical contiguity and
dma_mask may not apply if the platform has an IOMMU (a device which dma_mask may not apply if the platform has an IOMMU (a device which
supplies a physical to virtual mapping between the I/O memory bus and maps an I/O bus address to a physical memory address). However, to be
the device). However, to be portable, device driver writers may *not* portable, device driver writers may *not* assume that such an IOMMU
assume that such an IOMMU exists. exists.
Warnings: Memory coherency operates at a granularity called the cache Warnings: Memory coherency operates at a granularity called the cache
line width. In order for memory mapped by this API to operate line width. In order for memory mapped by this API to operate
...@@ -281,9 +286,9 @@ cache width is. ...@@ -281,9 +286,9 @@ cache width is.
int int
dma_mapping_error(struct device *dev, dma_addr_t dma_addr) dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
In some circumstances dma_map_single and dma_map_page will fail to create In some circumstances dma_map_single() and dma_map_page() will fail to create
a mapping. A driver can check for these errors by testing the returned a mapping. A driver can check for these errors by testing the returned
dma address with dma_mapping_error(). A non-zero return value means the mapping DMA address with dma_mapping_error(). A non-zero return value means the mapping
could not be created and the driver should take appropriate action (e.g. could not be created and the driver should take appropriate action (e.g.
reduce current DMA mapping usage or delay and try again later). reduce current DMA mapping usage or delay and try again later).
...@@ -291,7 +296,7 @@ reduce current DMA mapping usage or delay and try again later). ...@@ -291,7 +296,7 @@ reduce current DMA mapping usage or delay and try again later).
dma_map_sg(struct device *dev, struct scatterlist *sg, dma_map_sg(struct device *dev, struct scatterlist *sg,
int nents, enum dma_data_direction direction) int nents, enum dma_data_direction direction)
Returns: the number of physical segments mapped (this may be shorter Returns: the number of bus address segments mapped (this may be shorter
than <nents> passed in if some elements of the scatter/gather list are than <nents> passed in if some elements of the scatter/gather list are
physically or virtually adjacent and an IOMMU maps them with a single physically or virtually adjacent and an IOMMU maps them with a single
entry). entry).
...@@ -299,7 +304,7 @@ entry). ...@@ -299,7 +304,7 @@ entry).
Please note that the sg cannot be mapped again if it has been mapped once. Please note that the sg cannot be mapped again if it has been mapped once.
The mapping process is allowed to destroy information in the sg. The mapping process is allowed to destroy information in the sg.
As with the other mapping interfaces, dma_map_sg can fail. When it As with the other mapping interfaces, dma_map_sg() can fail. When it
does, 0 is returned and a driver must take appropriate action. It is does, 0 is returned and a driver must take appropriate action. It is
critical that the driver do something, in the case of a block driver critical that the driver do something, in the case of a block driver
aborting the request or even oopsing is better than doing nothing and aborting the request or even oopsing is better than doing nothing and
...@@ -335,7 +340,7 @@ must be the same as those and passed in to the scatter/gather mapping ...@@ -335,7 +340,7 @@ must be the same as those and passed in to the scatter/gather mapping
API. API.
Note: <nents> must be the number you passed in, *not* the number of Note: <nents> must be the number you passed in, *not* the number of
physical entries returned. bus address entries returned.
void void
dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size, dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle, size_t size,
...@@ -350,7 +355,7 @@ void ...@@ -350,7 +355,7 @@ void
dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems, dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
enum dma_data_direction direction) enum dma_data_direction direction)
Synchronise a single contiguous or scatter/gather mapping for the cpu Synchronise a single contiguous or scatter/gather mapping for the CPU
and device. With the sync_sg API, all the parameters must be the same and device. With the sync_sg API, all the parameters must be the same
as those passed into the single mapping API. With the sync_single API, as those passed into the single mapping API. With the sync_single API,
you can use dma_handle and size parameters that aren't identical to you can use dma_handle and size parameters that aren't identical to
...@@ -391,10 +396,10 @@ The four functions above are just like the counterpart functions ...@@ -391,10 +396,10 @@ The four functions above are just like the counterpart functions
without the _attrs suffixes, except that they pass an optional without the _attrs suffixes, except that they pass an optional
struct dma_attrs*. struct dma_attrs*.
struct dma_attrs encapsulates a set of "dma attributes". For the struct dma_attrs encapsulates a set of "DMA attributes". For the
definition of struct dma_attrs see linux/dma-attrs.h. definition of struct dma_attrs see linux/dma-attrs.h.
The interpretation of dma attributes is architecture-specific, and The interpretation of DMA attributes is architecture-specific, and
each attribute should be documented in Documentation/DMA-attributes.txt. each attribute should be documented in Documentation/DMA-attributes.txt.
If struct dma_attrs* is NULL, the semantics of each of these If struct dma_attrs* is NULL, the semantics of each of these
...@@ -458,7 +463,7 @@ Note: where the platform can return consistent memory, it will ...@@ -458,7 +463,7 @@ Note: where the platform can return consistent memory, it will
guarantee that the sync points become nops. guarantee that the sync points become nops.
Warning: Handling non-consistent memory is a real pain. You should Warning: Handling non-consistent memory is a real pain. You should
only ever use this API if you positively know your driver will be only use this API if you positively know your driver will be
required to work on one of the rare (usually non-PCI) architectures required to work on one of the rare (usually non-PCI) architectures
that simply cannot make consistent memory. that simply cannot make consistent memory.
...@@ -492,30 +497,29 @@ continuing on for size. Again, you *must* observe the cache line ...@@ -492,30 +497,29 @@ continuing on for size. Again, you *must* observe the cache line
boundaries when doing this. boundaries when doing this.
int int
dma_declare_coherent_memory(struct device *dev, dma_addr_t bus_addr, dma_declare_coherent_memory(struct device *dev, phys_addr_t phys_addr,
dma_addr_t device_addr, size_t size, int dma_addr_t device_addr, size_t size, int
flags) flags)
Declare region of memory to be handed out by dma_alloc_coherent when Declare region of memory to be handed out by dma_alloc_coherent() when
it's asked for coherent memory for this device. it's asked for coherent memory for this device.
bus_addr is the physical address to which the memory is currently phys_addr is the CPU physical address to which the memory is currently
assigned in the bus responding region (this will be used by the assigned (this will be ioremapped so the CPU can access the region).
platform to perform the mapping).
device_addr is the physical address the device needs to be programmed device_addr is the bus address the device needs to be programmed
with actually to address this memory (this will be handed out as the with to actually address this memory (this will be handed out as the
dma_addr_t in dma_alloc_coherent()). dma_addr_t in dma_alloc_coherent()).
size is the size of the area (must be multiples of PAGE_SIZE). size is the size of the area (must be multiples of PAGE_SIZE).
flags can be or'd together and are: flags can be ORed together and are:
DMA_MEMORY_MAP - request that the memory returned from DMA_MEMORY_MAP - request that the memory returned from
dma_alloc_coherent() be directly writable. dma_alloc_coherent() be directly writable.
DMA_MEMORY_IO - request that the memory returned from DMA_MEMORY_IO - request that the memory returned from
dma_alloc_coherent() be addressable using read/write/memcpy_toio etc. dma_alloc_coherent() be addressable using read()/write()/memcpy_toio() etc.
One or both of these flags must be present. One or both of these flags must be present.
...@@ -572,7 +576,7 @@ region is occupied. ...@@ -572,7 +576,7 @@ region is occupied.
Part III - Debug drivers use of the DMA-API Part III - Debug drivers use of the DMA-API
------------------------------------------- -------------------------------------------
The DMA-API as described above as some constraints. DMA addresses must be The DMA-API as described above has some constraints. DMA addresses must be
released with the corresponding function with the same size for example. With released with the corresponding function with the same size for example. With
the advent of hardware IOMMUs it becomes more and more important that drivers the advent of hardware IOMMUs it becomes more and more important that drivers
do not violate those constraints. In the worst case such a violation can do not violate those constraints. In the worst case such a violation can
...@@ -690,11 +694,11 @@ architectural default. ...@@ -690,11 +694,11 @@ architectural default.
void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr); void debug_dmap_mapping_error(struct device *dev, dma_addr_t dma_addr);
dma-debug interface debug_dma_mapping_error() to debug drivers that fail dma-debug interface debug_dma_mapping_error() to debug drivers that fail
to check dma mapping errors on addresses returned by dma_map_single() and to check DMA mapping errors on addresses returned by dma_map_single() and
dma_map_page() interfaces. This interface clears a flag set by dma_map_page() interfaces. This interface clears a flag set by
debug_dma_map_page() to indicate that dma_mapping_error() has been called by debug_dma_map_page() to indicate that dma_mapping_error() has been called by
the driver. When driver does unmap, debug_dma_unmap() checks the flag and if the driver. When driver does unmap, debug_dma_unmap() checks the flag and if
this flag is still set, prints warning message that includes call trace that this flag is still set, prints warning message that includes call trace that
leads up to the unmap. This interface can be called from dma_mapping_error() leads up to the unmap. This interface can be called from dma_mapping_error()
routines to enable dma mapping error check debugging. routines to enable DMA mapping error check debugging.
...@@ -16,7 +16,7 @@ To do ISA style DMA you need to include two headers: ...@@ -16,7 +16,7 @@ To do ISA style DMA you need to include two headers:
#include <asm/dma.h> #include <asm/dma.h>
The first is the generic DMA API used to convert virtual addresses to The first is the generic DMA API used to convert virtual addresses to
physical addresses (see Documentation/DMA-API.txt for details). bus addresses (see Documentation/DMA-API.txt for details).
The second contains the routines specific to ISA DMA transfers. Since The second contains the routines specific to ISA DMA transfers. Since
this is not present on all platforms make sure you construct your this is not present on all platforms make sure you construct your
...@@ -50,7 +50,7 @@ early as possible and not release it until the driver is unloaded.) ...@@ -50,7 +50,7 @@ early as possible and not release it until the driver is unloaded.)
Part III - Address translation Part III - Address translation
------------------------------ ------------------------------
To translate the virtual address to a physical use the normal DMA To translate the virtual address to a bus address, use the normal DMA
API. Do _not_ use isa_virt_to_phys() even though it does the same API. Do _not_ use isa_virt_to_phys() even though it does the same
thing. The reason for this is that the function isa_virt_to_phys() thing. The reason for this is that the function isa_virt_to_phys()
will require a Kconfig dependency to ISA, not just ISA_DMA_API which will require a Kconfig dependency to ISA, not just ISA_DMA_API which
......
...@@ -98,5 +98,5 @@ DMA_ATTR_FORCE_CONTIGUOUS ...@@ -98,5 +98,5 @@ DMA_ATTR_FORCE_CONTIGUOUS
By default DMA-mapping subsystem is allowed to assemble the buffer By default DMA-mapping subsystem is allowed to assemble the buffer
allocated by dma_alloc_attrs() function from individual pages if it can allocated by dma_alloc_attrs() function from individual pages if it can
be mapped as contiguous chunk into device dma address space. By be mapped as contiguous chunk into device dma address space. By
specifing this attribute the allocated buffer is forced to be contiguous specifying this attribute the allocated buffer is forced to be contiguous
also in physical memory. also in physical memory.
...@@ -14,7 +14,8 @@ DOCBOOKS := z8530book.xml device-drivers.xml \ ...@@ -14,7 +14,8 @@ DOCBOOKS := z8530book.xml device-drivers.xml \
genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \ genericirq.xml s390-drivers.xml uio-howto.xml scsi.xml \
80211.xml debugobjects.xml sh.xml regulator.xml \ 80211.xml debugobjects.xml sh.xml regulator.xml \
alsa-driver-api.xml writing-an-alsa-driver.xml \ alsa-driver-api.xml writing-an-alsa-driver.xml \
tracepoint.xml drm.xml media_api.xml w1.xml tracepoint.xml drm.xml media_api.xml w1.xml \
writing_musb_glue_layer.xml
include Documentation/DocBook/media/Makefile include Documentation/DocBook/media/Makefile
......
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
!Efs/mpage.c !Efs/mpage.c
!Efs/namei.c !Efs/namei.c
!Efs/buffer.c !Efs/buffer.c
!Efs/bio.c !Eblock/bio.c
!Efs/seq_file.c !Efs/seq_file.c
!Efs/filesystems.c !Efs/filesystems.c
!Efs/fs-writeback.c !Efs/fs-writeback.c
......
...@@ -125,7 +125,7 @@ location of the buffers in device memory can be determined with the ...@@ -125,7 +125,7 @@ location of the buffers in device memory can be determined with the
<structfield>m.offset</structfield> and <structfield>length</structfield> <structfield>m.offset</structfield> and <structfield>length</structfield>
returned in a &v4l2-buffer; are passed as sixth and second parameter to the returned in a &v4l2-buffer; are passed as sixth and second parameter to the
<function>mmap()</function> function. When using the multi-planar API, <function>mmap()</function> function. When using the multi-planar API,
struct &v4l2-buffer; contains an array of &v4l2-plane; structures, each &v4l2-buffer; contains an array of &v4l2-plane; structures, each
containing its own <structfield>m.offset</structfield> and containing its own <structfield>m.offset</structfield> and
<structfield>length</structfield>. When using the multi-planar API, every <structfield>length</structfield>. When using the multi-planar API, every
plane of every buffer has to be mapped separately, so the number of plane of every buffer has to be mapped separately, so the number of
...@@ -699,7 +699,12 @@ linkend="v4l2-buf-type" /></entry> ...@@ -699,7 +699,12 @@ linkend="v4l2-buf-type" /></entry>
buffer. It depends on the negotiated data format and may change with buffer. It depends on the negotiated data format and may change with
each buffer for compressed variable size data like JPEG images. each buffer for compressed variable size data like JPEG images.
Drivers must set this field when <structfield>type</structfield> Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream.</entry> refers to an input stream, applications when it refers to an output stream.
If the application sets this to 0 for an output stream, then
<structfield>bytesused</structfield> will be set to the size of the
buffer (see the <structfield>length</structfield> field of this struct) by
the driver. For multiplanar formats this field is ignored and the
<structfield>planes</structfield> pointer is used instead.</entry>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
...@@ -861,7 +866,11 @@ should set this to 0.</entry> ...@@ -861,7 +866,11 @@ should set this to 0.</entry>
<entry></entry> <entry></entry>
<entry>The number of bytes occupied by data in the plane <entry>The number of bytes occupied by data in the plane
(its payload). Drivers must set this field when <structfield>type</structfield> (its payload). Drivers must set this field when <structfield>type</structfield>
refers to an input stream, applications when it refers to an output stream.</entry> refers to an input stream, applications when it refers to an output stream.
If the application sets this to 0 for an output stream, then
<structfield>bytesused</structfield> will be set to the size of the
plane (see the <structfield>length</structfield> field of this struct)
by the driver.</entry>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
......
...@@ -79,13 +79,13 @@ ...@@ -79,13 +79,13 @@
<entry>Entity id, set by the application.</entry> <entry>Entity id, set by the application.</entry>
</row> </row>
<row> <row>
<entry>struct &media-pad-desc;</entry> <entry>&media-pad-desc;</entry>
<entry>*<structfield>pads</structfield></entry> <entry>*<structfield>pads</structfield></entry>
<entry>Pointer to a pads array allocated by the application. Ignored <entry>Pointer to a pads array allocated by the application. Ignored
if NULL.</entry> if NULL.</entry>
</row> </row>
<row> <row>
<entry>struct &media-link-desc;</entry> <entry>&media-link-desc;</entry>
<entry>*<structfield>links</structfield></entry> <entry>*<structfield>links</structfield></entry>
<entry>Pointer to a links array allocated by the application. Ignored <entry>Pointer to a links array allocated by the application. Ignored
if NULL.</entry> if NULL.</entry>
...@@ -153,12 +153,12 @@ ...@@ -153,12 +153,12 @@
&cs-str; &cs-str;
<tbody valign="top"> <tbody valign="top">
<row> <row>
<entry>struct &media-pad-desc;</entry> <entry>&media-pad-desc;</entry>
<entry><structfield>source</structfield></entry> <entry><structfield>source</structfield></entry>
<entry>Pad at the origin of this link.</entry> <entry>Pad at the origin of this link.</entry>
</row> </row>
<row> <row>
<entry>struct &media-pad-desc;</entry> <entry>&media-pad-desc;</entry>
<entry><structfield>sink</structfield></entry> <entry><structfield>sink</structfield></entry>
<entry>Pad at the target of this link.</entry> <entry>Pad at the target of this link.</entry>
</row> </row>
......
...@@ -772,7 +772,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see ...@@ -772,7 +772,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
</row> </row>
<row id="V4L2-PIX-FMT-H264-MVC"> <row id="V4L2-PIX-FMT-H264-MVC">
<entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry> <entry><constant>V4L2_PIX_FMT_H264_MVC</constant></entry>
<entry>'MVC'</entry> <entry>'M264'</entry>
<entry>H264 MVC video elementary stream.</entry> <entry>H264 MVC video elementary stream.</entry>
</row> </row>
<row id="V4L2-PIX-FMT-H263"> <row id="V4L2-PIX-FMT-H263">
...@@ -812,7 +812,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see ...@@ -812,7 +812,7 @@ extended control <constant>V4L2_CID_MPEG_STREAM_TYPE</constant>, see
</row> </row>
<row id="V4L2-PIX-FMT-VP8"> <row id="V4L2-PIX-FMT-VP8">
<entry><constant>V4L2_PIX_FMT_VP8</constant></entry> <entry><constant>V4L2_PIX_FMT_VP8</constant></entry>
<entry>'VP8'</entry> <entry>'VP80'</entry>
<entry>VP8 video elementary stream.</entry> <entry>VP8 video elementary stream.</entry>
</row> </row>
</tbody> </tbody>
......
...@@ -242,6 +242,22 @@ ...@@ -242,6 +242,22 @@
</tgroup> </tgroup>
</table> </table>
<table frame="none" pgwide="1" id="v4l2-event-src-change">
<title>struct <structname>v4l2_event_src_change</structname></title>
<tgroup cols="3">
&cs-str;
<tbody valign="top">
<row>
<entry>__u32</entry>
<entry><structfield>changes</structfield></entry>
<entry>
A bitmask that tells what has changed. See <xref linkend="src-changes-flags" />.
</entry>
</row>
</tbody>
</tgroup>
</table>
<table pgwide="1" frame="none" id="changes-flags"> <table pgwide="1" frame="none" id="changes-flags">
<title>Changes</title> <title>Changes</title>
<tgroup cols="3"> <tgroup cols="3">
...@@ -270,6 +286,23 @@ ...@@ -270,6 +286,23 @@
</tbody> </tbody>
</tgroup> </tgroup>
</table> </table>
<table pgwide="1" frame="none" id="src-changes-flags">
<title>Source Changes</title>
<tgroup cols="3">
&cs-def;
<tbody valign="top">
<row>
<entry><constant>V4L2_EVENT_SRC_CH_RESOLUTION</constant></entry>
<entry>0x0001</entry>
<entry>This event gets triggered when a resolution change is
detected at an input. This can come from an input connector or
from a video decoder.
</entry>
</row>
</tbody>
</tgroup>
</table>
</refsect1> </refsect1>
<refsect1> <refsect1>
&return-value; &return-value;
......
<refentry id="vidioc-dv-timings-cap"> <refentry id="vidioc-dv-timings-cap">
<refmeta> <refmeta>
<refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP</refentrytitle> <refentrytitle>ioctl VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP</refentrytitle>
&manvol; &manvol;
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>VIDIOC_DV_TIMINGS_CAP</refname> <refname>VIDIOC_DV_TIMINGS_CAP</refname>
<refname>VIDIOC_SUBDEV_DV_TIMINGS_CAP</refname>
<refpurpose>The capabilities of the Digital Video receiver/transmitter</refpurpose> <refpurpose>The capabilities of the Digital Video receiver/transmitter</refpurpose>
</refnamediv> </refnamediv>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<varlistentry> <varlistentry>
<term><parameter>request</parameter></term> <term><parameter>request</parameter></term>
<listitem> <listitem>
<para>VIDIOC_DV_TIMINGS_CAP</para> <para>VIDIOC_DV_TIMINGS_CAP, VIDIOC_SUBDEV_DV_TIMINGS_CAP</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
...@@ -54,10 +55,19 @@ ...@@ -54,10 +55,19 @@
interface and may change in the future.</para> interface and may change in the future.</para>
</note> </note>
<para>To query the capabilities of the DV receiver/transmitter applications can call <para>To query the capabilities of the DV receiver/transmitter applications
this ioctl and the driver will fill in the structure. Note that drivers may return can call the <constant>VIDIOC_DV_TIMINGS_CAP</constant> ioctl on a video node
and the driver will fill in the structure. Note that drivers may return
different values after switching the video input or output.</para> different values after switching the video input or output.</para>
<para>When implemented by the driver DV capabilities of subdevices can be
queried by calling the <constant>VIDIOC_SUBDEV_DV_TIMINGS_CAP</constant> ioctl
directly on a subdevice node. The capabilities are specific to inputs (for DV
receivers) or outputs (for DV transmitters), applications must specify the
desired pad number in the &v4l2-dv-timings-cap; <structfield>pad</structfield>
field. Attempts to query capabilities on a pad that doesn't support them will
return an &EINVAL;.</para>
<table pgwide="1" frame="none" id="v4l2-bt-timings-cap"> <table pgwide="1" frame="none" id="v4l2-bt-timings-cap">
<title>struct <structname>v4l2_bt_timings_cap</structname></title> <title>struct <structname>v4l2_bt_timings_cap</structname></title>
<tgroup cols="3"> <tgroup cols="3">
...@@ -127,7 +137,14 @@ different values after switching the video input or output.</para> ...@@ -127,7 +137,14 @@ different values after switching the video input or output.</para>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
<entry><structfield>reserved</structfield>[3]</entry> <entry><structfield>pad</structfield></entry>
<entry>Pad number as reported by the media controller API. This field
is only used when operating on a subdevice node. When operating on a
video node applications must set this field to zero.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[2]</entry>
<entry>Reserved for future extensions. Drivers must set the array to zero.</entry> <entry>Reserved for future extensions. Drivers must set the array to zero.</entry>
</row> </row>
<row> <row>
......
<refentry id="vidioc-enum-dv-timings"> <refentry id="vidioc-enum-dv-timings">
<refmeta> <refmeta>
<refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS</refentrytitle> <refentrytitle>ioctl VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</refentrytitle>
&manvol; &manvol;
</refmeta> </refmeta>
<refnamediv> <refnamediv>
<refname>VIDIOC_ENUM_DV_TIMINGS</refname> <refname>VIDIOC_ENUM_DV_TIMINGS</refname>
<refname>VIDIOC_SUBDEV_ENUM_DV_TIMINGS</refname>
<refpurpose>Enumerate supported Digital Video timings</refpurpose> <refpurpose>Enumerate supported Digital Video timings</refpurpose>
</refnamediv> </refnamediv>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
<varlistentry> <varlistentry>
<term><parameter>request</parameter></term> <term><parameter>request</parameter></term>
<listitem> <listitem>
<para>VIDIOC_ENUM_DV_TIMINGS</para> <para>VIDIOC_ENUM_DV_TIMINGS, VIDIOC_SUBDEV_ENUM_DV_TIMINGS</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
...@@ -61,14 +62,21 @@ standards or even custom timings that are not in this list.</para> ...@@ -61,14 +62,21 @@ standards or even custom timings that are not in this list.</para>
<para>To query the available timings, applications initialize the <para>To query the available timings, applications initialize the
<structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings; <structfield>index</structfield> field and zero the reserved array of &v4l2-enum-dv-timings;
and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl with a pointer to this and call the <constant>VIDIOC_ENUM_DV_TIMINGS</constant> ioctl on a video node with a
structure. Drivers fill the rest of the structure or return an pointer to this structure. Drivers fill the rest of the structure or return an
&EINVAL; when the index is out of bounds. To enumerate all supported DV timings, &EINVAL; when the index is out of bounds. To enumerate all supported DV timings,
applications shall begin at index zero, incrementing by one until the applications shall begin at index zero, incrementing by one until the
driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a driver returns <errorcode>EINVAL</errorcode>. Note that drivers may enumerate a
different set of DV timings after switching the video input or different set of DV timings after switching the video input or
output.</para> output.</para>
<para>When implemented by the driver DV timings of subdevices can be queried
by calling the <constant>VIDIOC_SUBDEV_ENUM_DV_TIMINGS</constant> ioctl directly
on a subdevice node. The DV timings are specific to inputs (for DV receivers) or
outputs (for DV transmitters), applications must specify the desired pad number
in the &v4l2-enum-dv-timings; <structfield>pad</structfield> field. Attempts to
enumerate timings on a pad that doesn't support them will return an &EINVAL;.</para>
<table pgwide="1" frame="none" id="v4l2-enum-dv-timings"> <table pgwide="1" frame="none" id="v4l2-enum-dv-timings">
<title>struct <structname>v4l2_enum_dv_timings</structname></title> <title>struct <structname>v4l2_enum_dv_timings</structname></title>
<tgroup cols="3"> <tgroup cols="3">
...@@ -82,8 +90,16 @@ application.</entry> ...@@ -82,8 +90,16 @@ application.</entry>
</row> </row>
<row> <row>
<entry>__u32</entry> <entry>__u32</entry>
<entry><structfield>reserved</structfield>[3]</entry> <entry><structfield>pad</structfield></entry>
<entry>Reserved for future extensions. Drivers must set the array to zero.</entry> <entry>Pad number as reported by the media controller API. This field
is only used when operating on a subdevice node. When operating on a
video node applications must set this field to zero.</entry>
</row>
<row>
<entry>__u32</entry>
<entry><structfield>reserved</structfield>[2]</entry>
<entry>Reserved for future extensions. Drivers and applications must
set the array to zero.</entry>
</row> </row>
<row> <row>
<entry>&v4l2-dv-timings;</entry> <entry>&v4l2-dv-timings;</entry>
...@@ -103,7 +119,7 @@ application.</entry> ...@@ -103,7 +119,7 @@ application.</entry>
<term><errorcode>EINVAL</errorcode></term> <term><errorcode>EINVAL</errorcode></term>
<listitem> <listitem>
<para>The &v4l2-enum-dv-timings; <structfield>index</structfield> <para>The &v4l2-enum-dv-timings; <structfield>index</structfield>
is out of bounds.</para> is out of bounds or the <structfield>pad</structfield> number is invalid.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
......
...@@ -154,6 +154,26 @@ ...@@ -154,6 +154,26 @@
frame interval in between them.</para> frame interval in between them.</para>
</entry> </entry>
</row> </row>
<row>
<entry><constant>V4L2_EVENT_SOURCE_CHANGE</constant></entry>
<entry>5</entry>
<entry>
<para>This event is triggered when a source parameter change is
detected during runtime by the video device. It can be a
runtime resolution change triggered by a video decoder or the
format change happening on an input connector.
This event requires that the <structfield>id</structfield>
matches the input index (when used with a video device node)
or the pad index (when used with a subdevice node) from which
you want to receive events.</para>
<para>This event has a &v4l2-event-src-change; associated
with it. The <structfield>changes</structfield> bitfield denotes
what has changed for the subscribed pad. If multiple events
occurred before application could dequeue them, then the changes
will have the ORed value of all the events generated.</para>
</entry>
</row>
<row> <row>
<entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry> <entry><constant>V4L2_EVENT_PRIVATE_START</constant></entry>
<entry>0x08000000</entry> <entry>0x08000000</entry>
......
此差异已折叠。
...@@ -41,8 +41,7 @@ An interrupt controller driver creates and registers an irq_domain by ...@@ -41,8 +41,7 @@ An interrupt controller driver creates and registers an irq_domain by
calling one of the irq_domain_add_*() functions (each mapping method calling one of the irq_domain_add_*() functions (each mapping method
has a different allocator function, more on that later). The function has a different allocator function, more on that later). The function
will return a pointer to the irq_domain on success. The caller must will return a pointer to the irq_domain on success. The caller must
provide the allocator function with an irq_domain_ops structure with provide the allocator function with an irq_domain_ops structure.
the .map callback populated as a minimum.
In most cases, the irq_domain will begin empty without any mappings In most cases, the irq_domain will begin empty without any mappings
between hwirq and IRQ numbers. Mappings are added to the irq_domain between hwirq and IRQ numbers. Mappings are added to the irq_domain
......
...@@ -12,6 +12,8 @@ lockdep-splat.txt ...@@ -12,6 +12,8 @@ lockdep-splat.txt
- RCU Lockdep splats explained. - RCU Lockdep splats explained.
NMI-RCU.txt NMI-RCU.txt
- Using RCU to Protect Dynamic NMI Handlers - Using RCU to Protect Dynamic NMI Handlers
rcu_dereference.txt
- Proper care and feeding of return values from rcu_dereference()
rcubarrier.txt rcubarrier.txt
- RCU and Unloadable Modules - RCU and Unloadable Modules
rculist_nulls.txt rculist_nulls.txt
......
...@@ -114,12 +114,16 @@ over a rather long period of time, but improvements are always welcome! ...@@ -114,12 +114,16 @@ over a rather long period of time, but improvements are always welcome!
http://www.openvms.compaq.com/wizard/wiz_2637.html http://www.openvms.compaq.com/wizard/wiz_2637.html
The rcu_dereference() primitive is also an excellent The rcu_dereference() primitive is also an excellent
documentation aid, letting the person reading the code documentation aid, letting the person reading the
know exactly which pointers are protected by RCU. code know exactly which pointers are protected by RCU.
Please note that compilers can also reorder code, and Please note that compilers can also reorder code, and
they are becoming increasingly aggressive about doing they are becoming increasingly aggressive about doing
just that. The rcu_dereference() primitive therefore just that. The rcu_dereference() primitive therefore also
also prevents destructive compiler optimizations. prevents destructive compiler optimizations. However,
with a bit of devious creativity, it is possible to
mishandle the return value from rcu_dereference().
Please see rcu_dereference.txt in this directory for
more information.
The rcu_dereference() primitive is used by the The rcu_dereference() primitive is used by the
various "_rcu()" list-traversal primitives, such various "_rcu()" list-traversal primitives, such
......
PROPER CARE AND FEEDING OF RETURN VALUES FROM rcu_dereference()
Most of the time, you can use values from rcu_dereference() or one of
the similar primitives without worries. Dereferencing (prefix "*"),
field selection ("->"), assignment ("="), address-of ("&"), addition and
subtraction of constants, and casts all work quite naturally and safely.
It is nevertheless possible to get into trouble with other operations.
Follow these rules to keep your RCU code working properly:
o You must use one of the rcu_dereference() family of primitives
to load an RCU-protected pointer, otherwise CONFIG_PROVE_RCU
will complain. Worse yet, your code can see random memory-corruption
bugs due to games that compilers and DEC Alpha can play.
Without one of the rcu_dereference() primitives, compilers
can reload the value, and won't your code have fun with two
different values for a single pointer! Without rcu_dereference(),
DEC Alpha can load a pointer, dereference that pointer, and
return data preceding initialization that preceded the store of
the pointer.
In addition, the volatile cast in rcu_dereference() prevents the
compiler from deducing the resulting pointer value. Please see
the section entitled "EXAMPLE WHERE THE COMPILER KNOWS TOO MUCH"
for an example where the compiler can in fact deduce the exact
value of the pointer, and thus cause misordering.
o Do not use single-element RCU-protected arrays. The compiler
is within its right to assume that the value of an index into
such an array must necessarily evaluate to zero. The compiler
could then substitute the constant zero for the computation, so
that the array index no longer depended on the value returned
by rcu_dereference(). If the array index no longer depends
on rcu_dereference(), then both the compiler and the CPU
are within their rights to order the array access before the
rcu_dereference(), which can cause the array access to return
garbage.
o Avoid cancellation when using the "+" and "-" infix arithmetic
operators. For example, for a given variable "x", avoid
"(x-x)". There are similar arithmetic pitfalls from other
arithmetic operatiors, such as "(x*0)", "(x/(x+1))" or "(x%1)".
The compiler is within its rights to substitute zero for all of
these expressions, so that subsequent accesses no longer depend
on the rcu_dereference(), again possibly resulting in bugs due
to misordering.
Of course, if "p" is a pointer from rcu_dereference(), and "a"
and "b" are integers that happen to be equal, the expression
"p+a-b" is safe because its value still necessarily depends on
the rcu_dereference(), thus maintaining proper ordering.
o Avoid all-zero operands to the bitwise "&" operator, and
similarly avoid all-ones operands to the bitwise "|" operator.
If the compiler is able to deduce the value of such operands,
it is within its rights to substitute the corresponding constant
for the bitwise operation. Once again, this causes subsequent
accesses to no longer depend on the rcu_dereference(), causing
bugs due to misordering.
Please note that single-bit operands to bitwise "&" can also
be dangerous. At this point, the compiler knows that the
resulting value can only take on one of two possible values.
Therefore, a very small amount of additional information will
allow the compiler to deduce the exact value, which again can
result in misordering.
o If you are using RCU to protect JITed functions, so that the
"()" function-invocation operator is applied to a value obtained
(directly or indirectly) from rcu_dereference(), you may need to
interact directly with the hardware to flush instruction caches.
This issue arises on some systems when a newly JITed function is
using the same memory that was used by an earlier JITed function.
o Do not use the results from the boolean "&&" and "||" when
dereferencing. For example, the following (rather improbable)
code is buggy:
int a[2];
int index;
int force_zero_index = 1;
...
r1 = rcu_dereference(i1)
r2 = a[r1 && force_zero_index]; /* BUGGY!!! */
The reason this is buggy is that "&&" and "||" are often compiled
using branches. While weak-memory machines such as ARM or PowerPC
do order stores after such branches, they can speculate loads,
which can result in misordering bugs.
o Do not use the results from relational operators ("==", "!=",
">", ">=", "<", or "<=") when dereferencing. For example,
the following (quite strange) code is buggy:
int a[2];
int index;
int flip_index = 0;
...
r1 = rcu_dereference(i1)
r2 = a[r1 != flip_index]; /* BUGGY!!! */
As before, the reason this is buggy is that relational operators
are often compiled using branches. And as before, although
weak-memory machines such as ARM or PowerPC do order stores
after such branches, but can speculate loads, which can again
result in misordering bugs.
o Be very careful about comparing pointers obtained from
rcu_dereference() against non-NULL values. As Linus Torvalds
explained, if the two pointers are equal, the compiler could
substitute the pointer you are comparing against for the pointer
obtained from rcu_dereference(). For example:
p = rcu_dereference(gp);
if (p == &default_struct)
do_default(p->a);
Because the compiler now knows that the value of "p" is exactly
the address of the variable "default_struct", it is free to
transform this code into the following:
p = rcu_dereference(gp);
if (p == &default_struct)
do_default(default_struct.a);
On ARM and Power hardware, the load from "default_struct.a"
can now be speculated, such that it might happen before the
rcu_dereference(). This could result in bugs due to misordering.
However, comparisons are OK in the following cases:
o The comparison was against the NULL pointer. If the
compiler knows that the pointer is NULL, you had better
not be dereferencing it anyway. If the comparison is
non-equal, the compiler is none the wiser. Therefore,
it is safe to compare pointers from rcu_dereference()
against NULL pointers.
o The pointer is never dereferenced after being compared.
Since there are no subsequent dereferences, the compiler
cannot use anything it learned from the comparison
to reorder the non-existent subsequent dereferences.
This sort of comparison occurs frequently when scanning
RCU-protected circular linked lists.
o The comparison is against a pointer that references memory
that was initialized "a long time ago." The reason
this is safe is that even if misordering occurs, the
misordering will not affect the accesses that follow
the comparison. So exactly how long ago is "a long
time ago"? Here are some possibilities:
o Compile time.
o Boot time.
o Module-init time for module code.
o Prior to kthread creation for kthread code.
o During some prior acquisition of the lock that
we now hold.
o Before mod_timer() time for a timer handler.
There are many other possibilities involving the Linux
kernel's wide array of primitives that cause code to
be invoked at a later time.
o The pointer being compared against also came from
rcu_dereference(). In this case, both pointers depend
on one rcu_dereference() or another, so you get proper
ordering either way.
That said, this situation can make certain RCU usage
bugs more likely to happen. Which can be a good thing,
at least if they happen during testing. An example
of such an RCU usage bug is shown in the section titled
"EXAMPLE OF AMPLIFIED RCU-USAGE BUG".
o All of the accesses following the comparison are stores,
so that a control dependency preserves the needed ordering.
That said, it is easy to get control dependencies wrong.
Please see the "CONTROL DEPENDENCIES" section of
Documentation/memory-barriers.txt for more details.
o The pointers are not equal -and- the compiler does
not have enough information to deduce the value of the
pointer. Note that the volatile cast in rcu_dereference()
will normally prevent the compiler from knowing too much.
o Disable any value-speculation optimizations that your compiler
might provide, especially if you are making use of feedback-based
optimizations that take data collected from prior runs. Such
value-speculation optimizations reorder operations by design.
There is one exception to this rule: Value-speculation
optimizations that leverage the branch-prediction hardware are
safe on strongly ordered systems (such as x86), but not on weakly
ordered systems (such as ARM or Power). Choose your compiler
command-line options wisely!
EXAMPLE OF AMPLIFIED RCU-USAGE BUG
Because updaters can run concurrently with RCU readers, RCU readers can
see stale and/or inconsistent values. If RCU readers need fresh or
consistent values, which they sometimes do, they need to take proper
precautions. To see this, consider the following code fragment:
struct foo {
int a;
int b;
int c;
};
struct foo *gp1;
struct foo *gp2;
void updater(void)
{
struct foo *p;
p = kmalloc(...);
if (p == NULL)
deal_with_it();
p->a = 42; /* Each field in its own cache line. */
p->b = 43;
p->c = 44;
rcu_assign_pointer(gp1, p);
p->b = 143;
p->c = 144;
rcu_assign_pointer(gp2, p);
}
void reader(void)
{
struct foo *p;
struct foo *q;
int r1, r2;
p = rcu_dereference(gp2);
if (p == NULL)
return;
r1 = p->b; /* Guaranteed to get 143. */
q = rcu_dereference(gp1); /* Guaranteed non-NULL. */
if (p == q) {
/* The compiler decides that q->c is same as p->c. */
r2 = p->c; /* Could get 44 on weakly order system. */
}
do_something_with(r1, r2);
}
You might be surprised that the outcome (r1 == 143 && r2 == 44) is possible,
but you should not be. After all, the updater might have been invoked
a second time between the time reader() loaded into "r1" and the time
that it loaded into "r2". The fact that this same result can occur due
to some reordering from the compiler and CPUs is beside the point.
But suppose that the reader needs a consistent view?
Then one approach is to use locking, for example, as follows:
struct foo {
int a;
int b;
int c;
spinlock_t lock;
};
struct foo *gp1;
struct foo *gp2;
void updater(void)
{
struct foo *p;
p = kmalloc(...);
if (p == NULL)
deal_with_it();
spin_lock(&p->lock);
p->a = 42; /* Each field in its own cache line. */
p->b = 43;
p->c = 44;
spin_unlock(&p->lock);
rcu_assign_pointer(gp1, p);
spin_lock(&p->lock);
p->b = 143;
p->c = 144;
spin_unlock(&p->lock);
rcu_assign_pointer(gp2, p);
}
void reader(void)
{
struct foo *p;
struct foo *q;
int r1, r2;
p = rcu_dereference(gp2);
if (p == NULL)
return;
spin_lock(&p->lock);
r1 = p->b; /* Guaranteed to get 143. */
q = rcu_dereference(gp1); /* Guaranteed non-NULL. */
if (p == q) {
/* The compiler decides that q->c is same as p->c. */
r2 = p->c; /* Locking guarantees r2 == 144. */
}
spin_unlock(&p->lock);
do_something_with(r1, r2);
}
As always, use the right tool for the job!
EXAMPLE WHERE THE COMPILER KNOWS TOO MUCH
If a pointer obtained from rcu_dereference() compares not-equal to some
other pointer, the compiler normally has no clue what the value of the
first pointer might be. This lack of knowledge prevents the compiler
from carrying out optimizations that otherwise might destroy the ordering
guarantees that RCU depends on. And the volatile cast in rcu_dereference()
should prevent the compiler from guessing the value.
But without rcu_dereference(), the compiler knows more than you might
expect. Consider the following code fragment:
struct foo {
int a;
int b;
};
static struct foo variable1;
static struct foo variable2;
static struct foo *gp = &variable1;
void updater(void)
{
initialize_foo(&variable2);
rcu_assign_pointer(gp, &variable2);
/*
* The above is the only store to gp in this translation unit,
* and the address of gp is not exported in any way.
*/
}
int reader(void)
{
struct foo *p;
p = gp;
barrier();
if (p == &variable1)
return p->a; /* Must be variable1.a. */
else
return p->b; /* Must be variable2.b. */
}
Because the compiler can see all stores to "gp", it knows that the only
possible values of "gp" are "variable1" on the one hand and "variable2"
on the other. The comparison in reader() therefore tells the compiler
the exact value of "p" even in the not-equals case. This allows the
compiler to make the return values independent of the load from "gp",
in turn destroying the ordering between this load and the loads of the
return values. This can result in "p->b" returning pre-initialization
garbage values.
In short, rcu_dereference() is -not- optional when you are going to
dereference the resulting pointer.
...@@ -24,7 +24,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT ...@@ -24,7 +24,7 @@ CONFIG_RCU_CPU_STALL_TIMEOUT
timing of the next warning for the current stall. timing of the next warning for the current stall.
Stall-warning messages may be enabled and disabled completely via Stall-warning messages may be enabled and disabled completely via
/sys/module/rcutree/parameters/rcu_cpu_stall_suppress. /sys/module/rcupdate/parameters/rcu_cpu_stall_suppress.
CONFIG_RCU_CPU_STALL_VERBOSE CONFIG_RCU_CPU_STALL_VERBOSE
......
...@@ -326,11 +326,11 @@ used as follows: ...@@ -326,11 +326,11 @@ used as follows:
a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock() a. synchronize_rcu() rcu_read_lock() / rcu_read_unlock()
call_rcu() rcu_dereference() call_rcu() rcu_dereference()
b. call_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh() b. synchronize_rcu_bh() rcu_read_lock_bh() / rcu_read_unlock_bh()
rcu_dereference_bh() call_rcu_bh() rcu_dereference_bh()
c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched() c. synchronize_sched() rcu_read_lock_sched() / rcu_read_unlock_sched()
preempt_disable() / preempt_enable() call_rcu_sched() preempt_disable() / preempt_enable()
local_irq_save() / local_irq_restore() local_irq_save() / local_irq_restore()
hardirq enter / hardirq exit hardirq enter / hardirq exit
NMI enter / NMI exit NMI enter / NMI exit
...@@ -794,10 +794,22 @@ in docbook. Here is the list, by category. ...@@ -794,10 +794,22 @@ in docbook. Here is the list, by category.
RCU list traversal: RCU list traversal:
list_entry_rcu
list_first_entry_rcu
list_next_rcu
list_for_each_entry_rcu list_for_each_entry_rcu
list_for_each_entry_continue_rcu
hlist_first_rcu
hlist_next_rcu
hlist_pprev_rcu
hlist_for_each_entry_rcu hlist_for_each_entry_rcu
hlist_for_each_entry_rcu_bh
hlist_for_each_entry_continue_rcu
hlist_for_each_entry_continue_rcu_bh
hlist_nulls_first_rcu
hlist_nulls_for_each_entry_rcu hlist_nulls_for_each_entry_rcu
list_for_each_entry_continue_rcu hlist_bl_first_rcu
hlist_bl_for_each_entry_rcu
RCU pointer/list update: RCU pointer/list update:
...@@ -806,28 +818,38 @@ RCU pointer/list update: ...@@ -806,28 +818,38 @@ RCU pointer/list update:
list_add_tail_rcu list_add_tail_rcu
list_del_rcu list_del_rcu
list_replace_rcu list_replace_rcu
hlist_del_rcu
hlist_add_after_rcu hlist_add_after_rcu
hlist_add_before_rcu hlist_add_before_rcu
hlist_add_head_rcu hlist_add_head_rcu
hlist_del_rcu
hlist_del_init_rcu
hlist_replace_rcu hlist_replace_rcu
list_splice_init_rcu() list_splice_init_rcu()
hlist_nulls_del_init_rcu
hlist_nulls_del_rcu
hlist_nulls_add_head_rcu
hlist_bl_add_head_rcu
hlist_bl_del_init_rcu
hlist_bl_del_rcu
hlist_bl_set_first_rcu
RCU: Critical sections Grace period Barrier RCU: Critical sections Grace period Barrier
rcu_read_lock synchronize_net rcu_barrier rcu_read_lock synchronize_net rcu_barrier
rcu_read_unlock synchronize_rcu rcu_read_unlock synchronize_rcu
rcu_dereference synchronize_rcu_expedited rcu_dereference synchronize_rcu_expedited
call_rcu rcu_read_lock_held call_rcu
kfree_rcu rcu_dereference_check kfree_rcu
rcu_dereference_protected
bh: Critical sections Grace period Barrier bh: Critical sections Grace period Barrier
rcu_read_lock_bh call_rcu_bh rcu_barrier_bh rcu_read_lock_bh call_rcu_bh rcu_barrier_bh
rcu_read_unlock_bh synchronize_rcu_bh rcu_read_unlock_bh synchronize_rcu_bh
rcu_dereference_bh synchronize_rcu_bh_expedited rcu_dereference_bh synchronize_rcu_bh_expedited
rcu_dereference_bh_check
rcu_dereference_bh_protected
rcu_read_lock_bh_held
sched: Critical sections Grace period Barrier sched: Critical sections Grace period Barrier
...@@ -835,7 +857,12 @@ sched: Critical sections Grace period Barrier ...@@ -835,7 +857,12 @@ sched: Critical sections Grace period Barrier
rcu_read_unlock_sched call_rcu_sched rcu_read_unlock_sched call_rcu_sched
[preempt_disable] synchronize_sched_expedited [preempt_disable] synchronize_sched_expedited
[and friends] [and friends]
rcu_read_lock_sched_notrace
rcu_read_unlock_sched_notrace
rcu_dereference_sched rcu_dereference_sched
rcu_dereference_sched_check
rcu_dereference_sched_protected
rcu_read_lock_sched_held
SRCU: Critical sections Grace period Barrier SRCU: Critical sections Grace period Barrier
...@@ -843,6 +870,8 @@ SRCU: Critical sections Grace period Barrier ...@@ -843,6 +870,8 @@ SRCU: Critical sections Grace period Barrier
srcu_read_lock synchronize_srcu srcu_barrier srcu_read_lock synchronize_srcu srcu_barrier
srcu_read_unlock call_srcu srcu_read_unlock call_srcu
srcu_dereference synchronize_srcu_expedited srcu_dereference synchronize_srcu_expedited
srcu_dereference_check
srcu_read_lock_held
SRCU: Initialization/cleanup SRCU: Initialization/cleanup
init_srcu_struct init_srcu_struct
...@@ -850,9 +879,13 @@ SRCU: Initialization/cleanup ...@@ -850,9 +879,13 @@ SRCU: Initialization/cleanup
All: lockdep-checked RCU-protected pointer access All: lockdep-checked RCU-protected pointer access
rcu_dereference_check rcu_access_index
rcu_dereference_protected
rcu_access_pointer rcu_access_pointer
rcu_dereference_index_check
rcu_dereference_raw
rcu_lockdep_assert
rcu_sleep_check
RCU_NONIDLE
See the comment headers in the source code (or the docbook generated See the comment headers in the source code (or the docbook generated
from them) for more information. from them) for more information.
......
...@@ -132,6 +132,20 @@ Example: ...@@ -132,6 +132,20 @@ Example:
platform_set_drvdata(), but left the variable "dev" unused, platform_set_drvdata(), but left the variable "dev" unused,
delete it. delete it.
If your patch fixes a bug in a specific commit, e.g. you found an issue using
git-bisect, please use the 'Fixes:' tag with the first 12 characters of the
SHA-1 ID, and the one line summary.
Example:
Fixes: e21d2170f366 ("video: remove unnecessary platform_set_drvdata()")
The following git-config settings can be used to add a pretty format for
outputting the above style in the git log or git show commands
[core]
abbrev = 12
[pretty]
fixes = Fixes: %h (\"%s\")
3) Separate your changes. 3) Separate your changes.
...@@ -443,7 +457,7 @@ person it names. This tag documents that potentially interested parties ...@@ -443,7 +457,7 @@ person it names. This tag documents that potentially interested parties
have been included in the discussion have been included in the discussion
14) Using Reported-by:, Tested-by:, Reviewed-by: and Suggested-by: 14) Using Reported-by:, Tested-by:, Reviewed-by:, Suggested-by: and Fixes:
If this patch fixes a problem reported by somebody else, consider adding a If this patch fixes a problem reported by somebody else, consider adding a
Reported-by: tag to credit the reporter for their contribution. Please Reported-by: tag to credit the reporter for their contribution. Please
...@@ -498,6 +512,12 @@ idea was not posted in a public forum. That said, if we diligently credit our ...@@ -498,6 +512,12 @@ idea was not posted in a public forum. That said, if we diligently credit our
idea reporters, they will, hopefully, be inspired to help us again in the idea reporters, they will, hopefully, be inspired to help us again in the
future. future.
A Fixes: tag indicates that the patch fixes an issue in a previous commit. It
is used to make it easy to determine where a bug originated, which can help
review a bug fix. This tag also assists the stable kernel team in determining
which stable kernel versions should receive your fix. This is the preferred
method for indicating a bug fixed by the patch. See #2 above for more details.
15) The canonical patch format 15) The canonical patch format
......
...@@ -296,7 +296,7 @@ specifies the path to the controller. In order to use these GPIOs in Linux ...@@ -296,7 +296,7 @@ specifies the path to the controller. In order to use these GPIOs in Linux
we need to translate them to the corresponding Linux GPIO descriptors. we need to translate them to the corresponding Linux GPIO descriptors.
There is a standard GPIO API for that and is documented in There is a standard GPIO API for that and is documented in
Documentation/gpio.txt. Documentation/gpio/.
In the above example we can get the corresponding two GPIO descriptors with In the above example we can get the corresponding two GPIO descriptors with
a code like this: a code like this:
......
...@@ -46,5 +46,7 @@ swp_emulation ...@@ -46,5 +46,7 @@ swp_emulation
- SWP/SWPB emulation handler/logging description - SWP/SWPB emulation handler/logging description
tcm.txt tcm.txt
- ARM Tightly Coupled Memory - ARM Tightly Coupled Memory
uefi.txt
- [U]EFI configuration and runtime services documentation
vlocks.txt vlocks.txt
- Voting locks, low-level mechanism relying on memory system atomic writes. - Voting locks, low-level mechanism relying on memory system atomic writes.
...@@ -234,6 +234,11 @@ Berlin family (Digital Entertainment) ...@@ -234,6 +234,11 @@ Berlin family (Digital Entertainment)
Core: Marvell PJ4B (ARMv7), Tauros3 L2CC Core: Marvell PJ4B (ARMv7), Tauros3 L2CC
Homepage: http://www.marvell.com/digital-entertainment/armada-1500/ Homepage: http://www.marvell.com/digital-entertainment/armada-1500/
Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf Product Brief: http://www.marvell.com/digital-entertainment/armada-1500/assets/Marvell-ARMADA-1500-Product-Brief.pdf
88DE3114, Armada 1500 Pro
Design name: BG2-Q
Core: Quad Core ARM Cortex-A9, PL310 L2CC
Homepage: http://www.marvell.com/digital-entertainment/armada-1500-pro/
Product Brief: http://www.marvell.com/digital-entertainment/armada-1500-pro/assets/Marvell_ARMADA_1500_PRO-01_product_brief.pdf
88DE???? 88DE????
Design name: BG3 Design name: BG3
Core: ARM Cortex-A15, CA15 integrated L2CC Core: ARM Cortex-A15, CA15 integrated L2CC
......
...@@ -41,16 +41,9 @@ fffe8000 fffeffff DTCM mapping area for platforms with ...@@ -41,16 +41,9 @@ fffe8000 fffeffff DTCM mapping area for platforms with
fffe0000 fffe7fff ITCM mapping area for platforms with fffe0000 fffe7fff ITCM mapping area for platforms with
ITCM mounted inside the CPU. ITCM mounted inside the CPU.
fff00000 fffdffff Fixmap mapping region. Addresses provided ffc00000 ffdfffff Fixmap mapping region. Addresses provided
by fix_to_virt() will be located here. by fix_to_virt() will be located here.
ffc00000 ffefffff DMA memory mapping region. Memory returned
by the dma_alloc_xxx functions will be
dynamically mapped here.
ff000000 ffbfffff Reserved for future expansion of DMA
mapping region.
fee00000 feffffff Mapping of PCI I/O space. This is a static fee00000 feffffff Mapping of PCI I/O space. This is a static
mapping within the vmalloc space. mapping within the vmalloc space.
......
STiH407 Overview
================
Introduction
------------
The STiH407 is the new generation of SoC for Multi-HD, AVC set-top boxes
and server/connected client application for satellite, cable, terrestrial
and IP-STB markets.
Features
- ARM Cortex-A9 1.5 GHz dual core CPU (28nm)
- SATA2, USB 3.0, PCIe, Gbit Ethernet
Document Author
---------------
Maxime Coquelin <maxime.coquelin@st.com>, (c) 2014 ST Microelectronics
UEFI, the Unified Extensible Firmware Interface, is a specification
governing the behaviours of compatible firmware interfaces. It is
maintained by the UEFI Forum - http://www.uefi.org/.
UEFI is an evolution of its predecessor 'EFI', so the terms EFI and
UEFI are used somewhat interchangeably in this document and associated
source code. As a rule, anything new uses 'UEFI', whereas 'EFI' refers
to legacy code or specifications.
UEFI support in Linux
=====================
Booting on a platform with firmware compliant with the UEFI specification
makes it possible for the kernel to support additional features:
- UEFI Runtime Services
- Retrieving various configuration information through the standardised
interface of UEFI configuration tables. (ACPI, SMBIOS, ...)
For actually enabling [U]EFI support, enable:
- CONFIG_EFI=y
- CONFIG_EFI_VARS=y or m
The implementation depends on receiving information about the UEFI environment
in a Flattened Device Tree (FDT) - so is only available with CONFIG_OF.
UEFI stub
=========
The "stub" is a feature that extends the Image/zImage into a valid UEFI
PE/COFF executable, including a loader application that makes it possible to
load the kernel directly from the UEFI shell, boot menu, or one of the
lightweight bootloaders like Gummiboot or rEFInd.
The kernel image built with stub support remains a valid kernel image for
booting in non-UEFI environments.
UEFI kernel support on ARM
==========================
UEFI kernel support on the ARM architectures (arm and arm64) is only available
when boot is performed through the stub.
When booting in UEFI mode, the stub deletes any memory nodes from a provided DT.
Instead, the kernel reads the UEFI memory map.
The stub populates the FDT /chosen node with (and the kernel scans for) the
following parameters:
________________________________________________________________________________
Name | Size | Description
================================================================================
linux,uefi-system-table | 64-bit | Physical address of the UEFI System Table.
--------------------------------------------------------------------------------
linux,uefi-mmap-start | 64-bit | Physical address of the UEFI memory map,
| | populated by the UEFI GetMemoryMap() call.
--------------------------------------------------------------------------------
linux,uefi-mmap-size | 32-bit | Size in bytes of the UEFI memory map
| | pointed to in previous entry.
--------------------------------------------------------------------------------
linux,uefi-mmap-desc-size | 32-bit | Size in bytes of each entry in the UEFI
| | memory map.
--------------------------------------------------------------------------------
linux,uefi-mmap-desc-ver | 32-bit | Version of the mmap descriptor format.
--------------------------------------------------------------------------------
linux,uefi-stub-kern-ver | string | Copy of linux_banner from build.
--------------------------------------------------------------------------------
For verbose debug messages, specify 'uefi_debug' on the kernel command line.
...@@ -85,6 +85,10 @@ The decompressed kernel image contains a 64-byte header as follows: ...@@ -85,6 +85,10 @@ The decompressed kernel image contains a 64-byte header as follows:
Header notes: Header notes:
- code0/code1 are responsible for branching to stext. - code0/code1 are responsible for branching to stext.
- when booting through EFI, code0/code1 are initially skipped.
res5 is an offset to the PE header and the PE header has the EFI
entry point (efi_stub_entry). When the stub has done its work, it
jumps to code0 to resume the normal boot process.
The image must be placed at the specified offset (currently 0x80000) The image must be placed at the specified offset (currently 0x80000)
from the start of the system RAM and called there. The start of the from the start of the system RAM and called there. The start of the
......
...@@ -285,15 +285,13 @@ If a caller requires memory barrier semantics around an atomic_t ...@@ -285,15 +285,13 @@ If a caller requires memory barrier semantics around an atomic_t
operation which does not return a value, a set of interfaces are operation which does not return a value, a set of interfaces are
defined which accomplish this: defined which accomplish this:
void smp_mb__before_atomic_dec(void); void smp_mb__before_atomic(void);
void smp_mb__after_atomic_dec(void); void smp_mb__after_atomic(void);
void smp_mb__before_atomic_inc(void);
void smp_mb__after_atomic_inc(void);
For example, smp_mb__before_atomic_dec() can be used like so: For example, smp_mb__before_atomic() can be used like so:
obj->dead = 1; obj->dead = 1;
smp_mb__before_atomic_dec(); smp_mb__before_atomic();
atomic_dec(&obj->ref_count); atomic_dec(&obj->ref_count);
It makes sure that all memory operations preceding the atomic_dec() It makes sure that all memory operations preceding the atomic_dec()
...@@ -302,15 +300,10 @@ operation. In the above example, it guarantees that the assignment of ...@@ -302,15 +300,10 @@ operation. In the above example, it guarantees that the assignment of
"1" to obj->dead will be globally visible to other cpus before the "1" to obj->dead will be globally visible to other cpus before the
atomic counter decrement. atomic counter decrement.
Without the explicit smp_mb__before_atomic_dec() call, the Without the explicit smp_mb__before_atomic() call, the
implementation could legally allow the atomic counter update visible implementation could legally allow the atomic counter update visible
to other cpus before the "obj->dead = 1;" assignment. to other cpus before the "obj->dead = 1;" assignment.
The other three interfaces listed are used to provide explicit
ordering with respect to memory operations after an atomic_dec() call
(smp_mb__after_atomic_dec()) and around atomic_inc() calls
(smp_mb__{before,after}_atomic_inc()).
A missing memory barrier in the cases where they are required by the A missing memory barrier in the cases where they are required by the
atomic_t implementation above can have disastrous results. Here is atomic_t implementation above can have disastrous results. Here is
an example, which follows a pattern occurring frequently in the Linux an example, which follows a pattern occurring frequently in the Linux
...@@ -487,12 +480,12 @@ Finally there is the basic operation: ...@@ -487,12 +480,12 @@ Finally there is the basic operation:
Which returns a boolean indicating if bit "nr" is set in the bitmask Which returns a boolean indicating if bit "nr" is set in the bitmask
pointed to by "addr". pointed to by "addr".
If explicit memory barriers are required around clear_bit() (which If explicit memory barriers are required around {set,clear}_bit() (which do
does not return a value, and thus does not need to provide memory not return a value, and thus does not need to provide memory barrier
barrier semantics), two interfaces are provided: semantics), two interfaces are provided:
void smp_mb__before_clear_bit(void); void smp_mb__before_atomic(void);
void smp_mb__after_clear_bit(void); void smp_mb__after_atomic(void);
They are used as follows, and are akin to their atomic_t operation They are used as follows, and are akin to their atomic_t operation
brothers: brothers:
...@@ -500,13 +493,13 @@ brothers: ...@@ -500,13 +493,13 @@ brothers:
/* All memory operations before this call will /* All memory operations before this call will
* be globally visible before the clear_bit(). * be globally visible before the clear_bit().
*/ */
smp_mb__before_clear_bit(); smp_mb__before_atomic();
clear_bit( ... ); clear_bit( ... );
/* The clear_bit() will be visible before all /* The clear_bit() will be visible before all
* subsequent memory operations. * subsequent memory operations.
*/ */
smp_mb__after_clear_bit(); smp_mb__after_atomic();
There are two special bitops with lock barrier semantics (acquire/release, There are two special bitops with lock barrier semantics (acquire/release,
same as spinlocks). These operate in the same way as their non-_lock/unlock same as spinlocks). These operate in the same way as their non-_lock/unlock
......
...@@ -270,6 +270,11 @@ When oom event notifier is registered, event will be delivered. ...@@ -270,6 +270,11 @@ When oom event notifier is registered, event will be delivered.
2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM) 2.7 Kernel Memory Extension (CONFIG_MEMCG_KMEM)
WARNING: Current implementation lacks reclaim support. That means allocation
attempts will fail when close to the limit even if there are plenty of
kmem available for reclaim. That makes this option unusable in real
life so DO NOT SELECT IT unless for development purposes.
With the Kernel memory extension, the Memory Controller is able to limit With the Kernel memory extension, the Memory Controller is able to limit
the amount of kernel memory used by the system. Kernel memory is fundamentally the amount of kernel memory used by the system. Kernel memory is fundamentally
different than user memory, since it can't be swapped out, which makes it different than user memory, since it can't be swapped out, which makes it
...@@ -535,16 +540,13 @@ Note: ...@@ -535,16 +540,13 @@ Note:
5.3 swappiness 5.3 swappiness
Similar to /proc/sys/vm/swappiness, but affecting a hierarchy of groups only. Overrides /proc/sys/vm/swappiness for the particular group. The tunable
Please note that unlike the global swappiness, memcg knob set to 0 in the root cgroup corresponds to the global swappiness setting.
really prevents from any swapping even if there is a swap storage
available. This might lead to memcg OOM killer if there are no file
pages to reclaim.
Following cgroups' swappiness can't be changed. Please note that unlike during the global reclaim, limit reclaim
- root cgroup (uses /proc/sys/vm/swappiness). enforces that 0 swappiness really prevents from any swapping even if
- a cgroup which uses hierarchy and it has other cgroup(s) below it. there is a swap storage available. This might lead to memcg OOM killer
- a cgroup which uses hierarchy and not the root of hierarchy. if there are no file pages to reclaim.
5.4 failcnt 5.4 failcnt
...@@ -754,7 +756,6 @@ You can disable the OOM-killer by writing "1" to memory.oom_control file, as: ...@@ -754,7 +756,6 @@ You can disable the OOM-killer by writing "1" to memory.oom_control file, as:
#echo 1 > memory.oom_control #echo 1 > memory.oom_control
This operation is only allowed to the top cgroup of a sub-hierarchy.
If OOM-killer is disabled, tasks under cgroup will hang/sleep If OOM-killer is disabled, tasks under cgroup will hang/sleep
in memory cgroup's OOM-waitqueue when they request accountable memory. in memory cgroup's OOM-waitqueue when they request accountable memory.
......
...@@ -68,21 +68,27 @@ the operations defined in clk.h: ...@@ -68,21 +68,27 @@ the operations defined in clk.h:
int (*is_enabled)(struct clk_hw *hw); int (*is_enabled)(struct clk_hw *hw);
unsigned long (*recalc_rate)(struct clk_hw *hw, unsigned long (*recalc_rate)(struct clk_hw *hw,
unsigned long parent_rate); unsigned long parent_rate);
long (*round_rate)(struct clk_hw *hw, unsigned long, long (*round_rate)(struct clk_hw *hw,
unsigned long *); unsigned long rate,
unsigned long *parent_rate);
long (*determine_rate)(struct clk_hw *hw, long (*determine_rate)(struct clk_hw *hw,
unsigned long rate, unsigned long rate,
unsigned long *best_parent_rate, unsigned long *best_parent_rate,
struct clk **best_parent_clk); struct clk **best_parent_clk);
int (*set_parent)(struct clk_hw *hw, u8 index); int (*set_parent)(struct clk_hw *hw, u8 index);
u8 (*get_parent)(struct clk_hw *hw); u8 (*get_parent)(struct clk_hw *hw);
int (*set_rate)(struct clk_hw *hw, unsigned long); int (*set_rate)(struct clk_hw *hw,
unsigned long rate,
unsigned long parent_rate);
int (*set_rate_and_parent)(struct clk_hw *hw, int (*set_rate_and_parent)(struct clk_hw *hw,
unsigned long rate, unsigned long rate,
unsigned long parent_rate, u8 index); unsigned long parent_rate,
u8 index);
unsigned long (*recalc_accuracy)(struct clk_hw *hw, unsigned long (*recalc_accuracy)(struct clk_hw *hw,
unsigned long parent_accuracy); unsigned long parent_accuracy);
void (*init)(struct clk_hw *hw); void (*init)(struct clk_hw *hw);
int (*debug_init)(struct clk_hw *hw,
struct dentry *dentry);
}; };
Part 3 - hardware clk implementations Part 3 - hardware clk implementations
......
...@@ -24,7 +24,8 @@ netlink based networking for inter-process communication in a significantly ...@@ -24,7 +24,8 @@ netlink based networking for inter-process communication in a significantly
easier way: easier way:
int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *)); int cn_add_callback(struct cb_id *id, char *name, void (*callback) (struct cn_msg *, struct netlink_skb_parms *));
void cn_netlink_send(struct cn_msg *msg, u32 __group, int gfp_mask); void cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __group, int gfp_mask);
void cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __group, int gfp_mask);
struct cb_id struct cb_id
{ {
...@@ -71,15 +72,21 @@ void cn_del_callback(struct cb_id *id); ...@@ -71,15 +72,21 @@ void cn_del_callback(struct cb_id *id);
struct cb_id *id - unique connector's user identifier. struct cb_id *id - unique connector's user identifier.
int cn_netlink_send(struct cn_msg *msg, u32 __groups, int gfp_mask); int cn_netlink_send_multi(struct cn_msg *msg, u16 len, u32 portid, u32 __groups, int gfp_mask);
int cn_netlink_send(struct cn_msg *msg, u32 portid, u32 __groups, int gfp_mask);
Sends message to the specified groups. It can be safely called from Sends message to the specified groups. It can be safely called from
softirq context, but may silently fail under strong memory pressure. softirq context, but may silently fail under strong memory pressure.
If there are no listeners for given group -ESRCH can be returned. If there are no listeners for given group -ESRCH can be returned.
struct cn_msg * - message header(with attached data). struct cn_msg * - message header(with attached data).
u16 len - for *_multi multiple cn_msg messages can be sent
u32 port - destination port.
If non-zero the message will be sent to the
given port, which should be set to the
original sender.
u32 __group - destination group. u32 __group - destination group.
If __group is zero, then appropriate group will If port and __group is zero, then appropriate group will
be searched through all registered connector users, be searched through all registered connector users,
and message will be delivered to the group which was and message will be delivered to the group which was
created for user with the same ID as in msg. created for user with the same ID as in msg.
...@@ -111,7 +118,7 @@ acknowledge number MUST be the same + 1. ...@@ -111,7 +118,7 @@ acknowledge number MUST be the same + 1.
If we receive a message and its sequence number is not equal to one we If we receive a message and its sequence number is not equal to one we
are expecting, then it is a new message. If we receive a message and are expecting, then it is a new message. If we receive a message and
its sequence number is the same as one we are expecting, but its its sequence number is the same as one we are expecting, but its
acknowledge is not equal to the acknowledge number in the original acknowledge is not equal to the sequence number in the original
message + 1, then it is a new message. message + 1, then it is a new message.
Obviously, the protocol header contains the above id. Obviously, the protocol header contains the above id.
......
...@@ -20,6 +20,7 @@ Contents: ...@@ -20,6 +20,7 @@ Contents:
--------- ---------
1. CPUFreq core and interfaces 1. CPUFreq core and interfaces
2. CPUFreq notifiers 2. CPUFreq notifiers
3. CPUFreq Table Generation with Operating Performance Point (OPP)
1. General Information 1. General Information
======================= =======================
...@@ -92,3 +93,31 @@ values: ...@@ -92,3 +93,31 @@ values:
cpu - number of the affected CPU cpu - number of the affected CPU
old - old frequency old - old frequency
new - new frequency new - new frequency
3. CPUFreq Table Generation with Operating Performance Point (OPP)
==================================================================
For details about OPP, see Documentation/power/opp.txt
dev_pm_opp_init_cpufreq_table - cpufreq framework typically is initialized with
cpufreq_frequency_table_cpuinfo which is provided with the list of
frequencies that are available for operation. This function provides
a ready to use conversion routine to translate the OPP layer's internal
information about the available frequencies into a format readily
providable to cpufreq.
WARNING: Do not use this function in interrupt context.
Example:
soc_pm_init()
{
/* Do things */
r = dev_pm_opp_init_cpufreq_table(dev, &freq_table);
if (!r)
cpufreq_frequency_table_cpuinfo(policy, freq_table);
/* Do other things */
}
NOTE: This function is available only if CONFIG_CPU_FREQ is enabled in
addition to CONFIG_PM_OPP.
dev_pm_opp_free_cpufreq_table - Free up the table allocated by dev_pm_opp_init_cpufreq_table
...@@ -228,3 +228,22 @@ is the corresponding frequency table helper for the ->target ...@@ -228,3 +228,22 @@ is the corresponding frequency table helper for the ->target
stage. Just pass the values to this function, and the unsigned int stage. Just pass the values to this function, and the unsigned int
index returns the number of the frequency table entry which contains index returns the number of the frequency table entry which contains
the frequency the CPU shall be set to. the frequency the CPU shall be set to.
The following macros can be used as iterators over cpufreq_frequency_table:
cpufreq_for_each_entry(pos, table) - iterates over all entries of frequency
table.
cpufreq-for_each_valid_entry(pos, table) - iterates over all entries,
excluding CPUFREQ_ENTRY_INVALID frequencies.
Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and
"table" - the cpufreq_frequency_table * you want to iterate over.
For example:
struct cpufreq_frequency_table *pos, *driver_freq_table;
cpufreq_for_each_entry(pos, driver_freq_table) {
/* Do something with pos */
pos->frequency = ...
}
...@@ -35,8 +35,8 @@ Mailing List ...@@ -35,8 +35,8 @@ Mailing List
------------ ------------
There is a CPU frequency changing CVS commit and general list where There is a CPU frequency changing CVS commit and general list where
you can report bugs, problems or submit patches. To post a message, you can report bugs, problems or submit patches. To post a message,
send an email to cpufreq@vger.kernel.org, to subscribe go to send an email to linux-pm@vger.kernel.org, to subscribe go to
http://vger.kernel.org/vger-lists.html#cpufreq and follow the http://vger.kernel.org/vger-lists.html#linux-pm and follow the
instructions there. instructions there.
Links Links
......
Power Management Service Unit(PMSU) Power Management Service Unit(PMSU)
----------------------------------- -----------------------------------
Available on Marvell SOCs: Armada 370 and Armada XP Available on Marvell SOCs: Armada 370, Armada 38x and Armada XP
Required properties: Required properties:
- compatible: "marvell,armada-370-xp-pmsu" - compatible: should be one of:
- "marvell,armada-370-pmsu" for Armada 370 or Armada XP
- "marvell,armada-380-pmsu" for Armada 38x
- "marvell,armada-370-xp-pmsu" was used for Armada 370/XP but is now
deprecated and will be removed
- reg: Should contain PMSU registers location and length. First pair - reg: Should contain PMSU registers location and length.
for the per-CPU SW Reset Control registers, second pair for the
Power Management Service Unit.
Example: Example:
armada-370-xp-pmsu@d0022000 { armada-370-xp-pmsu@22000 {
compatible = "marvell,armada-370-xp-pmsu"; compatible = "marvell,armada-370-pmsu";
reg = <0xd0022100 0x430>, reg = <0x22000 0x1000>;
<0xd0020800 0x20>;
}; };
Marvell Armada CPU reset controller
===================================
Required properties:
- compatible: Should be "marvell,armada-370-cpu-reset".
- reg: should be register base and length as documented in the
datasheet for the CPU reset registers
cpurst: cpurst@20800 {
compatible = "marvell,armada-370-cpu-reset";
reg = <0x20800 0x20>;
};
Axxia AXM55xx device tree bindings
Boards using the AXM55xx SoC need to have the following properties:
Required root node property:
- compatible = "lsi,axm5516"
Boards:
LSI AXM5516 Validation board (Amarillo)
compatible = "lsi,axm5516-amarillo", "lsi,axm5516"
Coherency fabric Coherency fabric
---------------- ----------------
Available on Marvell SOCs: Armada 370 and Armada XP Available on Marvell SOCs: Armada 370, Armada 375, Armada 38x and Armada XP
Required properties: Required properties:
- compatible: "marvell,coherency-fabric" - compatible: the possible values are:
* "marvell,coherency-fabric", to be used for the coherency fabric of
the Armada 370 and Armada XP.
* "marvell,armada-375-coherency-fabric", for the Armada 375 coherency
fabric.
* "marvell,armada-380-coherency-fabric", for the Armada 38x coherency
fabric.
- reg: Should contain coherency fabric registers location and - reg: Should contain coherency fabric registers location and
length. First pair for the coherency fabric registers, second pair length.
for the per-CPU fabric registers registers.
* For "marvell,coherency-fabric", the first pair for the coherency
fabric registers, second pair for the per-CPU fabric registers.
Example: * For "marvell,armada-375-coherency-fabric", only one pair is needed
for the per-CPU fabric registers.
* For "marvell,armada-380-coherency-fabric", only one pair is needed
for the per-CPU fabric registers.
Examples:
coherency-fabric@d0020200 { coherency-fabric@d0020200 {
compatible = "marvell,coherency-fabric"; compatible = "marvell,coherency-fabric";
...@@ -19,3 +36,8 @@ coherency-fabric@d0020200 { ...@@ -19,3 +36,8 @@ coherency-fabric@d0020200 {
}; };
coherency-fabric@21810 {
compatible = "marvell,armada-375-coherency-fabric";
reg = <0x21810 0x1c>;
};
...@@ -178,13 +178,19 @@ nodes to be present and contain the properties described below. ...@@ -178,13 +178,19 @@ nodes to be present and contain the properties described below.
Usage and definition depend on ARM architecture version. Usage and definition depend on ARM architecture version.
# On ARM v8 64-bit this property is required and must # On ARM v8 64-bit this property is required and must
be one of: be one of:
"spin-table"
"psci" "psci"
"spin-table"
# On ARM 32-bit systems this property is optional and # On ARM 32-bit systems this property is optional and
can be one of: can be one of:
"allwinner,sun6i-a31"
"arm,psci"
"marvell,armada-375-smp"
"marvell,armada-380-smp"
"marvell,armada-xp-smp"
"qcom,gcc-msm8660" "qcom,gcc-msm8660"
"qcom,kpss-acc-v1" "qcom,kpss-acc-v1"
"qcom,kpss-acc-v2" "qcom,kpss-acc-v2"
"rockchip,rk3066-smp"
- cpu-release-addr - cpu-release-addr
Usage: required for systems that have an "enable-method" Usage: required for systems that have an "enable-method"
......
Samsung Exynos SYSRAM for SMP bringup:
------------------------------------
Samsung SMP-capable Exynos SoCs use part of the SYSRAM for the bringup
of the secondary cores. Once the core gets powered up it executes the
code that is residing at some specific location of the SYSRAM.
Therefore reserved section sub-nodes have to be added to the mmio-sram
declaration. These nodes are of two types depending upon secure or
non-secure execution environment.
Required sub-node properties:
- compatible : depending upon boot mode, should be
"samsung,exynos4210-sysram" : for Secure SYSRAM
"samsung,exynos4210-sysram-ns" : for Non-secure SYSRAM
The rest of the properties should follow the generic mmio-sram discription
found in ../../misc/sysram.txt
Example:
sysram@02020000 {
compatible = "mmio-sram";
reg = <0x02020000 0x54000>;
#address-cells = <1>;
#size-cells = <1>;
ranges = <0 0x02020000 0x54000>;
smp-sysram@0 {
compatible = "samsung,exynos4210-sysram";
reg = <0x0 0x1000>;
};
smp-sysram@53000 {
compatible = "samsung,exynos4210-sysram-ns";
reg = <0x53000 0x1000>;
};
};
...@@ -4,8 +4,11 @@ ...@@ -4,8 +4,11 @@
** Timer node required properties: ** Timer node required properties:
- compatible : Should be "arm,cortex-a9-global-timer" - compatible : should contain
Driver supports versions r2p0 and above. * "arm,cortex-a5-global-timer" for Cortex-A5 global timers.
* "arm,cortex-a9-global-timer" for Cortex-A9 global
timers or any compatible implementation. Note: driver
supports versions r2p0 and above.
- interrupts : One interrupt to each core - interrupts : One interrupt to each core
......
...@@ -12,6 +12,7 @@ SoC and board used. Currently known SoC compatibles are: ...@@ -12,6 +12,7 @@ SoC and board used. Currently known SoC compatibles are:
"marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100), "marvell,berlin2" for Marvell Armada 1500 (BG2, 88DE3100),
"marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005) "marvell,berlin2cd" for Marvell Armada 1500-mini (BG2CD, 88DE3005)
"marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????) "marvell,berlin2ct" for Marvell Armada ? (BG2CT, 88DE????)
"marvell,berlin2q" for Marvell Armada 1500-pro (BG2Q, 88DE3114)
"marvell,berlin3" for Marvell Armada ? (BG3, 88DE????) "marvell,berlin3" for Marvell Armada ? (BG3, 88DE????)
* Example: * Example:
...@@ -22,3 +23,104 @@ SoC and board used. Currently known SoC compatibles are: ...@@ -22,3 +23,104 @@ SoC and board used. Currently known SoC compatibles are:
... ...
} }
* Marvell Berlin2 chip control binding
Marvell Berlin SoCs have a chip control register set providing several
individual registers dealing with pinmux, padmux, clock, reset, and secondary
CPU boot address. Unfortunately, the individual registers are spread among the
chip control registers, so there should be a single DT node only providing the
different functions which are described below.
Required properties:
- compatible: shall be one of
"marvell,berlin2-chip-ctrl" for BG2
"marvell,berlin2cd-chip-ctrl" for BG2CD
"marvell,berlin2q-chip-ctrl" for BG2Q
- reg: address and length of following register sets for
BG2/BG2CD: chip control register set
BG2Q: chip control register set and cpu pll registers
* Marvell Berlin2 system control binding
Marvell Berlin SoCs have a system control register set providing several
individual registers dealing with pinmux, padmux, and reset.
Required properties:
- compatible: should be one of
"marvell,berlin2-system-ctrl" for BG2
"marvell,berlin2cd-system-ctrl" for BG2CD
"marvell,berlin2q-system-ctrl" for BG2Q
- reg: address and length of the system control register set
* Clock provider binding
As clock related registers are spread among the chip control registers, the
chip control node also provides the clocks. Marvell Berlin2 (BG2, BG2CD, BG2Q)
SoCs share the same IP for PLLs and clocks, with some minor differences in
features and register layout.
Required properties:
- #clock-cells: shall be set to 1
- clocks: clock specifiers referencing the core clock input clocks
- clock-names: array of strings describing the input clock specifiers above.
Allowed clock-names for the reference clocks are
"refclk" for the SoCs osciallator input on all SoCs,
and SoC-specific input clocks for
BG2/BG2CD: "video_ext0" for the external video clock input
Clocks provided by core clocks shall be referenced by a clock specifier
indexing one of the provided clocks. Refer to dt-bindings/clock/berlin<soc>.h
for the corresponding index mapping.
* Pin controller binding
Pin control registers are part of both register sets, chip control and system
control. The pins controlled are organized in groups, so no actual pin
information is needed.
A pin-controller node should contain subnodes representing the pin group
configurations, one per function. Each subnode has the group name and the muxing
function used.
Be aware the Marvell Berlin datasheets use the keyword 'mode' for what is called
a 'function' in the pin-controller subsystem.
Required subnode-properties:
- groups: a list of strings describing the group names.
- function: a string describing the function used to mux the groups.
Example:
chip: chip-control@ea0000 {
compatible = "marvell,berlin2-chip-ctrl";
#clock-cells = <1>;
reg = <0xea0000 0x400>;
clocks = <&refclk>, <&externaldev 0>;
clock-names = "refclk", "video_ext0";
spi1_pmux: spi1-pmux {
groups = "G0";
function = "spi1";
};
};
sysctrl: system-controller@d000 {
compatible = "marvell,berlin2-system-ctrl";
reg = <0xd000 0x100>;
uart0_pmux: uart0-pmux {
groups = "GSM4";
function = "uart0";
};
uart1_pmux: uart1-pmux {
groups = "GSM5";
function = "uart1";
};
uart2_pmux: uart2-pmux {
groups = "GSM3";
function = "uart2";
};
};
...@@ -6,6 +6,8 @@ provided by Arteris. ...@@ -6,6 +6,8 @@ provided by Arteris.
Required properties: Required properties:
- compatible : Should be "ti,omap3-l3-smx" for OMAP3 family - compatible : Should be "ti,omap3-l3-smx" for OMAP3 family
Should be "ti,omap4-l3-noc" for OMAP4 family Should be "ti,omap4-l3-noc" for OMAP4 family
Should be "ti,dra7-l3-noc" for DRA7 family
Should be "ti,am4372-l3-noc" for AM43 family
- reg: Contains L3 register address range for each noc domain. - reg: Contains L3 register address range for each noc domain.
- ti,hwmods: "l3_main_1", ... One hwmod for each noc domain. - ti,hwmods: "l3_main_1", ... One hwmod for each noc domain.
......
...@@ -80,7 +80,10 @@ SoCs: ...@@ -80,7 +80,10 @@ SoCs:
compatible = "ti,omap5432", "ti,omap5" compatible = "ti,omap5432", "ti,omap5"
- DRA742 - DRA742
compatible = "ti,dra7xx", "ti,dra7" compatible = "ti,dra742", "ti,dra74", "ti,dra7"
- DRA722
compatible = "ti,dra722", "ti,dra72", "ti,dra7"
- AM4372 - AM4372
compatible = "ti,am4372", "ti,am43" compatible = "ti,am4372", "ti,am43"
...@@ -102,6 +105,12 @@ Boards: ...@@ -102,6 +105,12 @@ Boards:
- OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board - OMAP4 DuoVero with Parlor : Commercial expansion board with daughter board
compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4"; compatible = "gumstix,omap4-duovero-parlor", "gumstix,omap4-duovero", "ti,omap4430", "ti,omap4";
- OMAP4 VAR-STK-OM44 : Commercial dev kit with VAR-OM44CustomBoard and VAR-SOM-OM44 w/WLAN
compatible = "variscite,var-stk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
- OMAP4 VAR-DVK-OM44 : Commercial dev kit with VAR-OM44CustomBoard, VAR-SOM-OM44 w/WLAN and LCD touchscreen
compatible = "variscite,var-dvk-om44", "variscite,var-som-om44", "ti,omap4460", "ti,omap4";
- OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x - OMAP3 EVM : Software Development Board for OMAP35x, AM/DM37x
compatible = "ti,omap3-evm", "ti,omap3" compatible = "ti,omap3-evm", "ti,omap3"
...@@ -120,5 +129,8 @@ Boards: ...@@ -120,5 +129,8 @@ Boards:
- AM437x GP EVM - AM437x GP EVM
compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43" compatible = "ti,am437x-gp-evm", "ti,am4372", "ti,am43"
- DRA7 EVM: Software Developement Board for DRA7XX - DRA742 EVM: Software Development Board for DRA742
compatible = "ti,dra7-evm", "ti,dra7" compatible = "ti,dra7-evm", "ti,dra742", "ti,dra74", "ti,dra7"
- DRA722 EVM: Software Development Board for DRA722
compatible = "ti,dra72-evm", "ti,dra722", "ti,dra72", "ti,dra7"
...@@ -8,6 +8,7 @@ Required properties: ...@@ -8,6 +8,7 @@ Required properties:
- compatible : should be one of - compatible : should be one of
"arm,armv8-pmuv3" "arm,armv8-pmuv3"
"arm,cortex-a17-pmu"
"arm,cortex-a15-pmu" "arm,cortex-a15-pmu"
"arm,cortex-a12-pmu" "arm,cortex-a12-pmu"
"arm,cortex-a9-pmu" "arm,cortex-a9-pmu"
......
...@@ -21,7 +21,15 @@ to #0. ...@@ -21,7 +21,15 @@ to #0.
Main node required properties: Main node required properties:
- compatible : Must be "arm,psci" - compatible : should contain at least one of:
* "arm,psci" : for implementations complying to PSCI versions prior to
0.2. For these cases function IDs must be provided.
* "arm,psci-0.2" : for implementations complying to PSCI 0.2. Function
IDs are not required and should be ignored by an OS with PSCI 0.2
support, but are permitted to be present for compatibility with
existing software when "arm,psci" is later in the compatible list.
- method : The method of calling the PSCI firmware. Permitted - method : The method of calling the PSCI firmware. Permitted
values are: values are:
...@@ -45,6 +53,8 @@ Main node optional properties: ...@@ -45,6 +53,8 @@ Main node optional properties:
Example: Example:
Case 1: PSCI v0.1 only.
psci { psci {
compatible = "arm,psci"; compatible = "arm,psci";
method = "smc"; method = "smc";
...@@ -53,3 +63,28 @@ Example: ...@@ -53,3 +63,28 @@ Example:
cpu_on = <0x95c10002>; cpu_on = <0x95c10002>;
migrate = <0x95c10003>; migrate = <0x95c10003>;
}; };
Case 2: PSCI v0.2 only
psci {
compatible = "arm,psci-0.2";
method = "smc";
};
Case 3: PSCI v0.2 and PSCI v0.1.
A DTB may provide IDs for use by kernels without PSCI 0.2 support,
enabling firmware and hypervisors to support existing and new kernels.
These IDs will be ignored by kernels with PSCI 0.2 support, which will
use the standard PSCI 0.2 IDs exclusively.
psci {
compatible = "arm,psci-0.2", "arm,psci";
method = "hvc";
cpu_on = < arbitrary value >;
cpu_off = < arbitrary value >;
...
};
Rockchip platforms device tree bindings
---------------------------------------
- bq Curie 2 tablet:
Required root node properties:
- compatible = "mundoreader,bq-curie2", "rockchip,rk3066a";
- Radxa Rock board:
Required root node properties:
- compatible = "radxa,rock", "rockchip,rk3188";
...@@ -2,6 +2,10 @@ SAMSUNG Exynos SoC series PMU Registers ...@@ -2,6 +2,10 @@ SAMSUNG Exynos SoC series PMU Registers
Properties: Properties:
- compatible : should contain two values. First value must be one from following list: - compatible : should contain two values. First value must be one from following list:
- "samsung,exynos3250-pmu" - for Exynos3250 SoC,
- "samsung,exynos4210-pmu" - for Exynos4210 SoC,
- "samsung,exynos4212-pmu" - for Exynos4212 SoC,
- "samsung,exynos4412-pmu" - for Exynos4412 SoC,
- "samsung,exynos5250-pmu" - for Exynos5250 SoC, - "samsung,exynos5250-pmu" - for Exynos5250 SoC,
- "samsung,exynos5420-pmu" - for Exynos5420 SoC. - "samsung,exynos5420-pmu" - for Exynos5420 SoC.
second value must be always "syscon". second value must be always "syscon".
......
SAMSUNG S5P/Exynos SoC series System Registers (SYSREG) SAMSUNG S5P/Exynos SoC series System Registers (SYSREG)
Properties: Properties:
- compatible : should contain "samsung,<chip name>-sysreg", "syscon"; - compatible : should contain two values. First value must be one from following list:
For Exynos4 SoC series it should be "samsung,exynos4-sysreg", "syscon"; - "samsung,exynos4-sysreg" - for Exynos4 based SoCs,
- "samsung,exynos5-sysreg" - for Exynos5 based SoCs.
second value must be always "syscon".
- reg : offset and length of the register set. - reg : offset and length of the register set.
Example: Example:
...@@ -10,3 +12,8 @@ Example: ...@@ -10,3 +12,8 @@ Example:
compatible = "samsung,exynos4-sysreg", "syscon"; compatible = "samsung,exynos4-sysreg", "syscon";
reg = <0x10010000 0x400>; reg = <0x10010000 0x400>;
}; };
syscon@10050000 {
compatible = "samsung,exynos5-sysreg", "syscon";
reg = <0x10050000 0x5000>;
};
ST STi Platforms Device Tree Bindings
---------------------------------------
Boards with the ST STiH415 SoC shall have the following properties:
Required root node property:
compatible = "st,stih415";
Boards with the ST STiH416 SoC shall have the following properties:
Required root node property:
compatible = "st,stih416";
Boards with the ST STiH407 SoC shall have the following properties:
Required root node property:
compatible = "st,stih407";
...@@ -8,6 +8,8 @@ interrupt generation, MMC and NOR Flash control etc. ...@@ -8,6 +8,8 @@ interrupt generation, MMC and NOR Flash control etc.
Required node properties: Required node properties:
- compatible value : = "arm,vexpress,sysreg"; - compatible value : = "arm,vexpress,sysreg";
- reg : physical base address and the size of the registers window - reg : physical base address and the size of the registers window
Deprecated properties, replaced by GPIO subnodes (see below):
- gpio-controller : specifies that the node is a GPIO controller - gpio-controller : specifies that the node is a GPIO controller
- #gpio-cells : size of the GPIO specifier, should be 2: - #gpio-cells : size of the GPIO specifier, should be 2:
- first cell is the pseudo-GPIO line number: - first cell is the pseudo-GPIO line number:
...@@ -16,35 +18,86 @@ Required node properties: ...@@ -16,35 +18,86 @@ Required node properties:
2 - NOR FLASH WPn 2 - NOR FLASH WPn
- second cell can take standard GPIO flags (currently ignored). - second cell can take standard GPIO flags (currently ignored).
Control registers providing pseudo-GPIO lines must be represented
by subnodes, each of them requiring the following properties:
- compatible value : one of
"arm,vexpress-sysreg,sys_led"
"arm,vexpress-sysreg,sys_mci"
"arm,vexpress-sysreg,sys_flash"
- gpio-controller : makes the node a GPIO controller
- #gpio-cells : size of the GPIO specifier, must be 2:
- first cell is the function number:
- for sys_led : 0..7 = LED 0..7
- for sys_mci : 0 = MMC CARDIN, 1 = MMC WPROT
- for sys_flash : 0 = NOR FLASH WPn
- second cell can take standard GPIO flags (currently ignored).
Example: Example:
v2m_sysreg: sysreg@10000000 { v2m_sysreg: sysreg@10000000 {
compatible = "arm,vexpress-sysreg"; compatible = "arm,vexpress-sysreg";
reg = <0x10000000 0x1000>; reg = <0x10000000 0x1000>;
gpio-controller;
#gpio-cells = <2>; v2m_led_gpios: sys_led@08 {
compatible = "arm,vexpress-sysreg,sys_led";
gpio-controller;
#gpio-cells = <2>;
};
v2m_mmc_gpios: sys_mci@48 {
compatible = "arm,vexpress-sysreg,sys_mci";
gpio-controller;
#gpio-cells = <2>;
};
v2m_flash_gpios: sys_flash@4c {
compatible = "arm,vexpress-sysreg,sys_flash";
gpio-controller;
#gpio-cells = <2>;
};
}; };
This block also can also act a bridge to the platform's configuration This block also can also act a bridge to the platform's configuration
bus via "system control" interface, addressing devices with site number, bus via "system control" interface, addressing devices with site number,
position in the board stack, config controller, function and device position in the board stack, config controller, function and device
numbers - see motherboard's TRM for more details. numbers - see motherboard's TRM for more details. All configuration
controller accessible via this interface must reference the sysreg
The node describing a config device must refer to the sysreg node via node via "arm,vexpress,config-bridge" phandle and define appropriate
"arm,vexpress,config-bridge" phandle (can be also defined in the node's topology properties - see main vexpress node documentation for more
parent) and relies on the board topology properties - see main vexpress details. Each child of such node describes one function and must
node documentation for more details. It must also define the following define the following properties:
property: - compatible value : must be one of (corresponding to the TRM):
- arm,vexpress-sysreg,func : must contain two cells: "arm,vexpress-amp"
- first cell defines function number (eg. 1 for clock generator, "arm,vexpress-dvimode"
2 for voltage regulators etc.) "arm,vexpress-energy"
- device number (eg. osc 0, osc 1 etc.) "arm,vexpress-muxfpga"
"arm,vexpress-osc"
"arm,vexpress-power"
"arm,vexpress-reboot"
"arm,vexpress-reset"
"arm,vexpress-scc"
"arm,vexpress-shutdown"
"arm,vexpress-temp"
"arm,vexpress-volt"
- arm,vexpress-sysreg,func : must contain a set of two cells long groups:
- first cell of each group defines the function number
(eg. 1 for clock generator, 2 for voltage regulators etc.)
- second cell of each group defines device number (eg. osc 0,
osc 1 etc.)
- some functions (eg. energy meter, with its 64 bit long counter)
are using more than one function/device number pair
Example: Example:
mcc { mcc {
compatible = "arm,vexpress,config-bus";
arm,vexpress,config-bridge = <&v2m_sysreg>; arm,vexpress,config-bridge = <&v2m_sysreg>;
osc@0 { osc@0 {
compatible = "arm,vexpress-osc"; compatible = "arm,vexpress-osc";
arm,vexpress-sysreg,func = <1 0>; arm,vexpress-sysreg,func = <1 0>;
}; };
energy@0 {
compatible = "arm,vexpress-energy";
arm,vexpress-sysreg,func = <13 0>, <13 1>;
};
}; };
...@@ -80,12 +80,17 @@ but also control clock generators, voltage regulators, gather ...@@ -80,12 +80,17 @@ but also control clock generators, voltage regulators, gather
environmental data like temperature, power consumption etc. Even environmental data like temperature, power consumption etc. Even
the video output switch (FPGA) is controlled that way. the video output switch (FPGA) is controlled that way.
Nodes describing devices controlled by this infrastructure should The controllers are not mapped into normal memory address space
point at the bridge device node: and must be accessed through bridges - other devices capable
of generating transactions on the configuration bus.
The nodes describing configuration controllers must define
the following properties:
- compatible value:
compatible = "arm,vexpress,config-bus";
- bridge phandle: - bridge phandle:
arm,vexpress,config-bridge = <phandle>; arm,vexpress,config-bridge = <phandle>;
This property can be also defined in a parent node (eg. for a DCC) and children describing available functions.
and is effective for all children.
Platform topology Platform topology
...@@ -197,7 +202,7 @@ Example of a VE tile description (simplified) ...@@ -197,7 +202,7 @@ Example of a VE tile description (simplified)
}; };
dcc { dcc {
compatible = "simple-bus"; compatible = "arm,vexpress,config-bus";
arm,vexpress,config-bridge = <&v2m_sysreg>; arm,vexpress,config-bridge = <&v2m_sysreg>;
osc@0 { osc@0 {
......
Broadcom GISB bus Arbiter controller
Required properties:
- compatible: should be "brcm,gisb-arb"
- reg: specifies the base physical address and size of the registers
- interrupt-parent: specifies the phandle to the parent interrupt controller
this arbiter gets interrupt line from
- interrupts: specifies the two interrupts (timeout and TEA) to be used from
the parent interrupt controller
Optional properties:
- brcm,gisb-arb-master-mask: 32-bits wide bitmask used to specify which GISB
masters are valid at the system level
- brcm,gisb-arb-master-names: string list of the litteral name of the GISB
masters. Should match the number of bits set in brcm,gisb-master-mask and
the order in which they appear
Example:
gisb-arb@f0400000 {
compatible = "brcm,gisb-arb";
reg = <0xf0400000 0x800>;
interrupts = <0>, <2>;
interrupt-parent = <&sun_l2_intc>;
brcm,gisb-arb-master-mask = <0x7>;
brcm,gisb-arb-master-names = "bsp_0", "scpu_0", "cpu_0";
};
...@@ -197,7 +197,7 @@ to be set by the operating system and that are guaranteed to be free of overlaps ...@@ -197,7 +197,7 @@ to be set by the operating system and that are guaranteed to be free of overlaps
with one another or with the system memory ranges. with one another or with the system memory ranges.
Each entry in the property refers to exactly one window. If the operating system Each entry in the property refers to exactly one window. If the operating system
choses to use a different set of mbus windows, it must ensure that any address chooses to use a different set of mbus windows, it must ensure that any address
translations performed from downstream devices are adapted accordingly. translations performed from downstream devices are adapted accordingly.
The operating system may insert additional mbus windows that do not conflict The operating system may insert additional mbus windows that do not conflict
......
...@@ -21,8 +21,8 @@ Optional properties: ...@@ -21,8 +21,8 @@ Optional properties:
- fixed-divider : If clocks have a fixed divider value, use this property. - fixed-divider : If clocks have a fixed divider value, use this property.
- clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register - clk-gate : For "socfpga-gate-clk", clk-gate contains the gating register
and the bit index. and the bit index.
- div-reg : For "socfpga-gate-clk", div-reg contains the divider register, bit shift, - div-reg : For "socfpga-gate-clk" and "socfpga-periph-clock", div-reg contains
and width. the divider register, bit shift, and width.
- clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls - clk-phase : For the sdmmc_clk, contains the value of the clock phase that controls
the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second the SDMMC CIU clock. The first value is the clk_sample(smpsel), and the second
value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct value is the cclk_in_drv(drvsel). The clk-phase is used to enable the correct
......
...@@ -6,6 +6,16 @@ This binding uses the common clock binding[1]. ...@@ -6,6 +6,16 @@ This binding uses the common clock binding[1].
Required properties: Required properties:
- compatible : shall be one of the following: - compatible : shall be one of the following:
"atmel,at91sam9x5-sckc":
at91 SCKC (Slow Clock Controller)
This node contains the slow clock definitions.
"atmel,at91sam9x5-clk-slow-osc":
at91 slow oscillator
"atmel,at91sam9x5-clk-slow-rc-osc":
at91 internal slow RC oscillator
"atmel,at91rm9200-pmc" or "atmel,at91rm9200-pmc" or
"atmel,at91sam9g45-pmc" or "atmel,at91sam9g45-pmc" or
"atmel,at91sam9n12-pmc" or "atmel,at91sam9n12-pmc" or
...@@ -15,8 +25,18 @@ Required properties: ...@@ -15,8 +25,18 @@ Required properties:
All at91 specific clocks (clocks defined below) must be child All at91 specific clocks (clocks defined below) must be child
node of the PMC node. node of the PMC node.
"atmel,at91sam9x5-clk-slow" (under sckc node)
or
"atmel,at91sam9260-clk-slow" (under pmc node):
at91 slow clk
"atmel,at91rm9200-clk-main-osc"
"atmel,at91sam9x5-clk-main-rc-osc"
at91 main clk sources
"atmel,at91sam9x5-clk-main"
"atmel,at91rm9200-clk-main": "atmel,at91rm9200-clk-main":
at91 main oscillator at91 main clock
"atmel,at91rm9200-clk-master" or "atmel,at91rm9200-clk-master" or
"atmel,at91sam9x5-clk-master": "atmel,at91sam9x5-clk-master":
...@@ -54,6 +74,63 @@ Required properties: ...@@ -54,6 +74,63 @@ Required properties:
"atmel,at91sam9x5-clk-utmi": "atmel,at91sam9x5-clk-utmi":
at91 utmi clock at91 utmi clock
Required properties for SCKC node:
- reg : defines the IO memory reserved for the SCKC.
- #size-cells : shall be 0 (reg is used to encode clk id).
- #address-cells : shall be 1 (reg is used to encode clk id).
For example:
sckc: sckc@fffffe50 {
compatible = "atmel,sama5d3-pmc";
reg = <0xfffffe50 0x4>
#size-cells = <0>;
#address-cells = <1>;
/* put at91 slow clocks here */
};
Required properties for internal slow RC oscillator:
- #clock-cells : from common clock binding; shall be set to 0.
- clock-frequency : define the internal RC oscillator frequency.
Optional properties:
- clock-accuracy : define the internal RC oscillator accuracy.
For example:
slow_rc_osc: slow_rc_osc {
compatible = "atmel,at91sam9x5-clk-slow-rc-osc";
clock-frequency = <32768>;
clock-accuracy = <50000000>;
};
Required properties for slow oscillator:
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : shall encode the main osc source clk sources (see atmel datasheet).
Optional properties:
- atmel,osc-bypass : boolean property. Set this when a clock signal is directly
provided on XIN.
For example:
slow_osc: slow_osc {
compatible = "atmel,at91rm9200-clk-slow-osc";
#clock-cells = <0>;
clocks = <&slow_xtal>;
};
Required properties for slow clock:
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : shall encode the slow clk sources (see atmel datasheet).
For example:
clk32k: slck {
compatible = "atmel,at91sam9x5-clk-slow";
#clock-cells = <0>;
clocks = <&slow_rc_osc &slow_osc>;
};
Required properties for PMC node: Required properties for PMC node:
- reg : defines the IO memory reserved for the PMC. - reg : defines the IO memory reserved for the PMC.
- #size-cells : shall be 0 (reg is used to encode clk id). - #size-cells : shall be 0 (reg is used to encode clk id).
...@@ -85,24 +162,57 @@ For example: ...@@ -85,24 +162,57 @@ For example:
/* put at91 clocks here */ /* put at91 clocks here */
}; };
Required properties for main clock internal RC oscillator:
- interrupt-parent : must reference the PMC node.
- interrupts : shall be set to "<0>".
- clock-frequency : define the internal RC oscillator frequency.
Optional properties:
- clock-accuracy : define the internal RC oscillator accuracy.
For example:
main_rc_osc: main_rc_osc {
compatible = "atmel,at91sam9x5-clk-main-rc-osc";
interrupt-parent = <&pmc>;
interrupts = <0>;
clock-frequency = <12000000>;
clock-accuracy = <50000000>;
};
Required properties for main clock oscillator:
- interrupt-parent : must reference the PMC node.
- interrupts : shall be set to "<0>".
- #clock-cells : from common clock binding; shall be set to 0.
- clocks : shall encode the main osc source clk sources (see atmel datasheet).
Optional properties:
- atmel,osc-bypass : boolean property. Specified if a clock signal is provided
on XIN.
clock signal is directly provided on XIN pin.
For example:
main_osc: main_osc {
compatible = "atmel,at91rm9200-clk-main-osc";
interrupt-parent = <&pmc>;
interrupts = <0>;
#clock-cells = <0>;
clocks = <&main_xtal>;
};
Required properties for main clock: Required properties for main clock:
- interrupt-parent : must reference the PMC node. - interrupt-parent : must reference the PMC node.
- interrupts : shall be set to "<0>". - interrupts : shall be set to "<0>".
- #clock-cells : from common clock binding; shall be set to 0. - #clock-cells : from common clock binding; shall be set to 0.
- clocks (optional if clock-frequency is provided) : shall be the slow clock - clocks : shall encode the main clk sources (see atmel datasheet).
phandle. This clock is used to calculate the main clock rate if
"clock-frequency" is not provided.
- clock-frequency : the main oscillator frequency.Prefer the use of
"clock-frequency" over automatic clock rate calculation.
For example: For example:
main: mainck { main: mainck {
compatible = "atmel,at91rm9200-clk-main"; compatible = "atmel,at91sam9x5-clk-main";
interrupt-parent = <&pmc>; interrupt-parent = <&pmc>;
interrupts = <0>; interrupts = <0>;
#clock-cells = <0>; #clock-cells = <0>;
clocks = <&ck32k>; clocks = <&main_rc_osc &main_osc>;
clock-frequency = <18432000>;
}; };
Required properties for master clock: Required properties for master clock:
......
...@@ -10,12 +10,12 @@ This binding uses the common clock binding: ...@@ -10,12 +10,12 @@ This binding uses the common clock binding:
Required properties: Required properties:
- compatible - compatible
Shall have one of the following values: Shall have a value of the form "brcm,<model>-<which>-ccu",
- "brcm,bcm11351-root-ccu" where <model> is a Broadcom SoC model number and <which> is
- "brcm,bcm11351-aon-ccu" the name of a defined CCU. For example:
- "brcm,bcm11351-hub-ccu" "brcm,bcm11351-root-ccu"
- "brcm,bcm11351-master-ccu" The compatible strings used for each supported SoC family
- "brcm,bcm11351-slave-ccu" are defined below.
- reg - reg
Shall define the base and range of the address space Shall define the base and range of the address space
containing clock control registers containing clock control registers
...@@ -26,12 +26,48 @@ Required properties: ...@@ -26,12 +26,48 @@ Required properties:
Shall be an ordered list of strings defining the names of Shall be an ordered list of strings defining the names of
the clocks provided by the CCU. the clocks provided by the CCU.
Device tree example:
slave_ccu: slave_ccu {
compatible = "brcm,bcm11351-slave-ccu";
reg = <0x3e011000 0x0f00>;
#clock-cells = <1>;
clock-output-names = "uartb",
"uartb2",
"uartb3",
"uartb4";
};
ref_crystal_clk: ref_crystal {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <26000000>;
};
uart@3e002000 {
compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart";
status = "disabled";
reg = <0x3e002000 0x1000>;
clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>;
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
reg-shift = <2>;
reg-io-width = <4>;
};
BCM281XX family
---------------
CCU compatible string values for SoCs in the BCM281XX family are:
"brcm,bcm11351-root-ccu"
"brcm,bcm11351-aon-ccu"
"brcm,bcm11351-hub-ccu"
"brcm,bcm11351-master-ccu"
"brcm,bcm11351-slave-ccu"
BCM281XX family SoCs use Kona CCUs. The following table defines The following table defines the set of CCUs and clock specifiers for
the set of CCUs and clock specifiers for BCM281XX clocks. When BCM281XX family clocks. When a clock consumer references a clocks,
a clock consumer references a clocks, its symbolic specifier its symbolic specifier (rather than its numeric index value) should
(rather than its numeric index value) should be used. These be used. These specifiers are defined in:
specifiers are defined in "include/dt-bindings/clock/bcm281xx.h". "include/dt-bindings/clock/bcm281xx.h"
CCU Clock Type Index Specifier CCU Clock Type Index Specifier
--- ----- ---- ----- --------- --- ----- ---- ----- ---------
...@@ -64,30 +100,40 @@ specifiers are defined in "include/dt-bindings/clock/bcm281xx.h". ...@@ -64,30 +100,40 @@ specifiers are defined in "include/dt-bindings/clock/bcm281xx.h".
slave pwm peri 9 BCM281XX_SLAVE_CCU_PWM slave pwm peri 9 BCM281XX_SLAVE_CCU_PWM
Device tree example: BCM21664 family
---------------
CCU compatible string values for SoCs in the BCM21664 family are:
"brcm,bcm21664-root-ccu"
"brcm,bcm21664-aon-ccu"
"brcm,bcm21664-master-ccu"
"brcm,bcm21664-slave-ccu"
slave_ccu: slave_ccu { The following table defines the set of CCUs and clock specifiers for
compatible = "brcm,bcm11351-slave-ccu"; BCM21664 family clocks. When a clock consumer references a clocks,
reg = <0x3e011000 0x0f00>; its symbolic specifier (rather than its numeric index value) should
#clock-cells = <1>; be used. These specifiers are defined in:
clock-output-names = "uartb", "include/dt-bindings/clock/bcm21664.h"
"uartb2",
"uartb3",
"uartb4";
};
ref_crystal_clk: ref_crystal { CCU Clock Type Index Specifier
#clock-cells = <0>; --- ----- ---- ----- ---------
compatible = "fixed-clock"; root frac_1m peri 0 BCM21664_ROOT_CCU_FRAC_1M
clock-frequency = <26000000>;
};
uart@3e002000 { aon hub_timer peri 0 BCM21664_AON_CCU_HUB_TIMER
compatible = "brcm,bcm11351-dw-apb-uart", "snps,dw-apb-uart";
status = "disabled"; master sdio1 peri 0 BCM21664_MASTER_CCU_SDIO1
reg = <0x3e002000 0x1000>; master sdio2 peri 1 BCM21664_MASTER_CCU_SDIO2
clocks = <&slave_ccu BCM281XX_SLAVE_CCU_UARTB3>; master sdio3 peri 2 BCM21664_MASTER_CCU_SDIO3
interrupts = <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>; master sdio4 peri 3 BCM21664_MASTER_CCU_SDIO4
reg-shift = <2>; master sdio1_sleep peri 4 BCM21664_MASTER_CCU_SDIO1_SLEEP
reg-io-width = <4>; master sdio2_sleep peri 5 BCM21664_MASTER_CCU_SDIO2_SLEEP
}; master sdio3_sleep peri 6 BCM21664_MASTER_CCU_SDIO3_SLEEP
master sdio4_sleep peri 7 BCM21664_MASTER_CCU_SDIO4_SLEEP
slave uartb peri 0 BCM21664_SLAVE_CCU_UARTB
slave uartb2 peri 1 BCM21664_SLAVE_CCU_UARTB2
slave uartb3 peri 2 BCM21664_SLAVE_CCU_UARTB3
slave uartb4 peri 3 BCM21664_SLAVE_CCU_UARTB4
slave bsc1 peri 4 BCM21664_SLAVE_CCU_BSC1
slave bsc2 peri 5 BCM21664_SLAVE_CCU_BSC2
slave bsc3 peri 6 BCM21664_SLAVE_CCU_BSC3
slave bsc4 peri 7 BCM21664_SLAVE_CCU_BSC4
...@@ -44,10 +44,9 @@ For example: ...@@ -44,10 +44,9 @@ For example:
clocks by index. The names should reflect the clock output signal clocks by index. The names should reflect the clock output signal
names for the device. names for the device.
clock-indices: If the identifyng number for the clocks in the node clock-indices: If the identifying number for the clocks in the node
is not linear from zero, then the this mapping allows is not linear from zero, then this allows the mapping of
the mapping of identifiers into the clock-output-names identifiers into the clock-output-names array.
array.
For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
...@@ -58,7 +57,7 @@ For example, if we have two clocks <&oscillator 1> and <&oscillator 3>: ...@@ -58,7 +57,7 @@ For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
clock-output-names = "clka", "clkb"; clock-output-names = "clka", "clkb";
} }
This ensures we do not have any empty nodes in clock-output-names This ensures we do not have any empty strings in clock-output-names
==Clock consumers== ==Clock consumers==
......
* Samsung Exynos3250 Clock Controller
The Exynos3250 clock controller generates and supplies clock to various
controllers within the Exynos3250 SoC.
Required Properties:
- compatible: should be one of the following.
- "samsung,exynos3250-cmu" - controller compatible with Exynos3250 SoC.
- reg: physical base address of the controller and length of memory mapped
region.
- #clock-cells: should be 1.
Each clock is assigned an identifier and client nodes can use this identifier
to specify the clock which they consume.
All available clocks are defined as preprocessor macros in
dt-bindings/clock/exynos3250.h header and can be used in device
tree sources.
Example 1: An example of a clock controller node is listed below.
cmu: clock-controller@10030000 {
compatible = "samsung,exynos3250-cmu";
reg = <0x10030000 0x20000>;
#clock-cells = <1>;
};
Example 2: UART controller node that consumes the clock generated by the clock
controller. Refer to the standard clock bindings for information
about 'clocks' and 'clock-names' property.
serial@13800000 {
compatible = "samsung,exynos4210-uart";
reg = <0x13800000 0x100>;
interrupts = <0 109 0>;
clocks = <&cmu CLK_UART0>, <&cmu CLK_SCLK_UART0>;
clock-names = "uart", "clk_uart_baud0";
};
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册