You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver updates from Greg KH: "Here is the big char/misc driver update for 4.4-rc1. Lots of different driver and subsystem updates, hwtracing being the largest with the addition of some new platforms that are now supported. Full details in the shortlog. All of these have been in linux-next for a long time with no reported issues" * tag 'char-misc-4.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (181 commits) fpga: socfpga: Fix check of return value of devm_request_irq lkdtm: fix ACCESS_USERSPACE test mcb: Destroy IDA on module unload mcb: Do not return zero on error path in mcb_pci_probe() mei: bus: set the device name before running fixup mei: bus: use correct lock ordering mei: Fix debugfs filename in error output char: ipmi: ipmi_ssif: Replace timeval with timespec64 fpga: zynq-fpga: Fix issue with drvdata being overwritten. fpga manager: remove unnecessary null pointer checks fpga manager: ensure lifetime with of_fpga_mgr_get fpga: zynq-fpga: Change fw format to handle bin instead of bit. fpga: zynq-fpga: Fix unbalanced clock handling misc: sram: partition base address belongs to __iomem space coresight: etm3x: adding documentation for sysFS's cpu interface vme: 8-bit status/id takes 256 values, not 255 fpga manager: Adding FPGA Manager support for Xilinx Zynq 7000 ARM: zynq: dt: Updated devicetree for Zynq 7000 platform. ARM: dt: fpga: Added binding docs for Xilinx Zynq FPGA manager. ver_linux: proc/modules, limit text processing to 'sed' ...
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
What: /config/stp-policy
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Description:
|
||||
This group contains policies mandating Master/Channel allocation
|
||||
for software sources wishing to send trace data over an STM
|
||||
device.
|
||||
|
||||
What: /config/stp-policy/<device>.<policy>
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Description:
|
||||
This group is the root of a policy; its name is a concatenation
|
||||
of an stm device name to which this policy applies and an
|
||||
arbitrary string. If <device> part doesn't match an existing
|
||||
stm device, mkdir will fail with ENODEV; if that device already
|
||||
has a policy assigned to it, mkdir will fail with EBUSY.
|
||||
|
||||
What: /config/stp-policy/<device>.<policy>/device
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Description:
|
||||
STM device to which this policy applies, read only. Same as the
|
||||
<device> component of its parent directory.
|
||||
|
||||
What: /config/stp-policy/<device>.<policy>/<node>
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Description:
|
||||
Policy node is a string identifier that software clients will
|
||||
use to request a master/channel to be allocated and assigned to
|
||||
them.
|
||||
|
||||
What: /config/stp-policy/<device>.<policy>/<node>/masters
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Description:
|
||||
Range of masters from which to allocate for users of this node.
|
||||
Write two numbers: the first master and the last master number.
|
||||
|
||||
What: /config/stp-policy/<device>.<policy>/<node>/channels
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Description:
|
||||
Range of channels from which to allocate for users of this node.
|
||||
Write two numbers: the first channel and the last channel
|
||||
number.
|
||||
|
||||
@@ -8,13 +8,6 @@ Description: (RW) Enable/disable tracing on this specific trace entiry.
|
||||
of coresight components linking the source to the sink is
|
||||
configured and managed automatically by the coresight framework.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/status
|
||||
Date: November 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (R) List various control and status registers. The specific
|
||||
layout and content is driver specific.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/addr_idx
|
||||
Date: November 2014
|
||||
KernelVersion: 3.19
|
||||
@@ -251,3 +244,79 @@ Date: November 2014
|
||||
KernelVersion: 3.19
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RW) Define the event that controls the trigger.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/cpu
|
||||
Date: October 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Holds the cpu number this tracer is affined to.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmccr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Configuration Code register
|
||||
(0x004). The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmccer
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Configuration Code Extension
|
||||
register (0x1e8). The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmscr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM System Configuration
|
||||
register (0x014). The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmidr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM ID register (0x1e4). The
|
||||
value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmcr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Main Control register (0x000).
|
||||
The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtraceidr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Trace ID register (0x200).
|
||||
The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmteevr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Trace Enable Event register
|
||||
(0x020). The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtsscr
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Trace Start/Stop Conrol
|
||||
register (0x018). The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtecr1
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Enable Conrol #1
|
||||
register (0x024). The value is read directly from the HW.
|
||||
|
||||
What: /sys/bus/coresight/devices/<memory_map>.[etm|ptm]/mgmt/etmtecr2
|
||||
Date: September 2015
|
||||
KernelVersion: 4.4
|
||||
Contact: Mathieu Poirier <mathieu.poirier@linaro.org>
|
||||
Description: (RO) Print the content of the ETM Enable Conrol #2
|
||||
register (0x01c). The value is read directly from the HW.
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/masters/*
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Configure output ports for STP masters. Writing -1
|
||||
disables a master; any
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_port
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RO) Output port type:
|
||||
0: not present,
|
||||
1: MSU (Memory Storage Unit)
|
||||
2: CTP (Common Trace Port)
|
||||
4: PTI (MIPI PTI).
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_drop
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Data retention policy setting: keep (0) or drop (1)
|
||||
incoming data while output port is in reset.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_null
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) STP NULL packet generation: enabled (1) or disabled (0).
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_flush
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Force flush data from byte packing buffer for the output
|
||||
port.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_reset
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RO) Output port is in reset (1).
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-gth/outputs/[0-7]_smcfreq
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) STP sync packet frequency for the port. Specifies the
|
||||
number of clocks between mainenance packets.
|
||||
@@ -0,0 +1,33 @@
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/wrap
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Configure MSC buffer wrapping. 1 == wrapping enabled.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/mode
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Configure MSC operating mode:
|
||||
- "single", for contiguous buffer mode (high-order alloc);
|
||||
- "multi", for multiblock mode;
|
||||
- "ExI", for DCI handler mode;
|
||||
- "debug", for debug mode.
|
||||
If operating mode changes, existing buffer is deallocated,
|
||||
provided there are no active users and tracing is not enabled,
|
||||
otherwise the write will fail.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/nr_pages
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Configure MSC buffer size for "single" or "multi" modes.
|
||||
In single mode, this is a single number of pages, has to be
|
||||
power of 2. In multiblock mode, this is a comma-separated list
|
||||
of numbers of pages for each window to be allocated. Number of
|
||||
windows is not limited.
|
||||
Writing to this file deallocates existing buffer (provided
|
||||
there are no active users and tracing is not enabled) and then
|
||||
allocates a new one.
|
||||
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-pti/mode
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Configure PTI output width. Currently supported values
|
||||
are 4, 8, 12, 16.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-pti/freerunning_clock
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) 0: PTI trace clock acts as a strobe which only toggles
|
||||
when there is trace data to send. 1: PTI trace clock is a
|
||||
free-running clock.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-pti/clock_divider
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Configure PTI port clock divider:
|
||||
- 0: Intel TH clock rate,
|
||||
- 1: 1/2 Intel TH clock rate,
|
||||
- 2: 1/4 Intel TH clock rate,
|
||||
- 3: 1/8 Intel TH clock rate.
|
||||
@@ -0,0 +1,13 @@
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-<device><id>/active
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RW) Writes of 1 or 0 enable or disable trace output to this
|
||||
output device. Reads return current status.
|
||||
|
||||
What: /sys/bus/intel_th/devices/<intel_th_id>-msc<msc-id>/port
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description: (RO) Port number, corresponding to this output device on the
|
||||
switch (GTH).
|
||||
@@ -19,3 +19,10 @@ KernelVersion: 4.2
|
||||
Contact: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Description: Stores mei client device uuid
|
||||
Format: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
|
||||
|
||||
What: /sys/bus/mei/devices/.../version
|
||||
Date: Aug 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Tomas Winkler <tomas.winkler@intel.com>
|
||||
Description: Stores mei client protocol version
|
||||
Format: %d
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
What: /sys/class/fpga_manager/<fpga>/name
|
||||
Date: August 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alan Tull <atull@opensource.altera.com>
|
||||
Description: Name of low level fpga manager driver.
|
||||
|
||||
What: /sys/class/fpga_manager/<fpga>/state
|
||||
Date: August 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alan Tull <atull@opensource.altera.com>
|
||||
Description: Read fpga manager state as a string.
|
||||
The intent is to provide enough detail that if something goes
|
||||
wrong during FPGA programming (something that the driver can't
|
||||
fix) then userspace can know, i.e. if the firmware request
|
||||
fails, that could be due to not being able to find the firmware
|
||||
file.
|
||||
|
||||
This is a superset of FPGA states and fpga manager driver
|
||||
states. The fpga manager driver is walking through these steps
|
||||
to get the FPGA into a known operating state. It's a sequence,
|
||||
though some steps may get skipped. Valid FPGA states will vary
|
||||
by manufacturer; this is a superset.
|
||||
|
||||
* unknown = can't determine state
|
||||
* power off = FPGA power is off
|
||||
* power up = FPGA reports power is up
|
||||
* reset = FPGA held in reset state
|
||||
* firmware request = firmware class request in progress
|
||||
* firmware request error = firmware request failed
|
||||
* write init = preparing FPGA for programming
|
||||
* write init error = Error while preparing FPGA for
|
||||
programming
|
||||
* write = FPGA ready to receive image data
|
||||
* write error = Error while programming
|
||||
* write complete = Doing post programming steps
|
||||
* write complete error = Error while doing post programming
|
||||
* operating = FPGA is programmed and operating
|
||||
@@ -41,18 +41,15 @@ Description:
|
||||
When read, this entry provides the current state of an Intel
|
||||
MIC device in the context of the card OS. Possible values that
|
||||
will be read are:
|
||||
"offline" - The MIC device is ready to boot the card OS. On
|
||||
"ready" - The MIC device is ready to boot the card OS. On
|
||||
reading this entry after an OSPM resume, a "boot" has to be
|
||||
written to this entry if the card was previously shutdown
|
||||
during OSPM suspend.
|
||||
"online" - The MIC device has initiated booting a card OS.
|
||||
"booting" - The MIC device has initiated booting a card OS.
|
||||
"online" - The MIC device has completed boot and is online
|
||||
"shutting_down" - The card OS is shutting down.
|
||||
"resetting" - A reset has been initiated for the MIC device
|
||||
"reset_failed" - The MIC device has failed to reset.
|
||||
"suspending" - The MIC device is currently being prepared for
|
||||
suspend. On reading this entry, a "suspend" has to be written
|
||||
to the state sysfs entry to ensure the card is shutdown during
|
||||
OSPM suspend.
|
||||
"suspended" - The MIC device has been suspended.
|
||||
|
||||
When written, this sysfs entry triggers different state change
|
||||
operations depending upon the current state of the card OS.
|
||||
@@ -62,8 +59,6 @@ Description:
|
||||
sysfs entries.
|
||||
"reset" - Initiates device reset.
|
||||
"shutdown" - Initiates card OS shutdown.
|
||||
"suspend" - Initiates card OS shutdown and also marks the card
|
||||
as suspended.
|
||||
|
||||
What: /sys/class/mic/mic(x)/shutdown_status
|
||||
Date: October 2013
|
||||
@@ -126,7 +121,7 @@ Description:
|
||||
the card. This sysfs entry can be written with the following
|
||||
valid strings:
|
||||
a) linux - Boot a Linux image.
|
||||
b) elf - Boot an elf image for flash updates.
|
||||
b) flash - Boot an image for flash updates.
|
||||
|
||||
What: /sys/class/mic/mic(x)/log_buf_addr
|
||||
Date: October 2013
|
||||
@@ -155,3 +150,17 @@ Description:
|
||||
daemon to set the log buffer length address. The correct log
|
||||
buffer length address to be written can be found in the
|
||||
System.map file of the card OS.
|
||||
|
||||
What: /sys/class/mic/mic(x)/heartbeat_enable
|
||||
Date: March 2015
|
||||
KernelVersion: 3.20
|
||||
Contact: Ashutosh Dixit <ashutosh.dixit@intel.com>
|
||||
Description:
|
||||
The MIC drivers detect and inform user space about card crashes
|
||||
via a heartbeat mechanism (see the description of
|
||||
shutdown_status above). User space can turn off this
|
||||
notification by setting heartbeat_enable to 0 and enable it by
|
||||
setting this entry to 1. If this notification is disabled it is
|
||||
the responsibility of user space to detect card crashes via
|
||||
alternative means such as a network ping. This setting is
|
||||
enabled by default.
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
What: /sys/class/stm/<stm>/masters
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description:
|
||||
Shows first and last available to software master numbers on
|
||||
this STM device.
|
||||
|
||||
What: /sys/class/stm/<stm>/channels
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description:
|
||||
Shows the number of channels per master on this STM device.
|
||||
@@ -0,0 +1,11 @@
|
||||
What: /sys/class/stm_source/<stm_source>/stm_source_link
|
||||
Date: June 2015
|
||||
KernelVersion: 4.3
|
||||
Contact: Alexander Shishkin <alexander.shishkin@linux.intel.com>
|
||||
Description:
|
||||
stm_source device linkage to stm device, where its tracing data
|
||||
is directed. Reads return an existing connection or "<none>" if
|
||||
this stm_source is not connected to any stm device yet.
|
||||
Write an existing (registered) stm device's name here to
|
||||
connect that device. If a device is already connected to this
|
||||
stm_source, it will first be disconnected.
|
||||
@@ -0,0 +1,19 @@
|
||||
Xilinx Zynq FPGA Manager
|
||||
|
||||
Required properties:
|
||||
- compatible: should contain "xlnx,zynq-devcfg-1.0"
|
||||
- reg: base address and size for memory mapped io
|
||||
- interrupts: interrupt for the FPGA manager device
|
||||
- clocks: phandle for clocks required operation
|
||||
- clock-names: name for the clock, should be "ref_clk"
|
||||
- syscon: phandle for access to SLCR registers
|
||||
|
||||
Example:
|
||||
devcfg: devcfg@f8007000 {
|
||||
compatible = "xlnx,zynq-devcfg-1.0";
|
||||
reg = <0xf8007000 0x100>;
|
||||
interrupts = <0 8 4>;
|
||||
clocks = <&clkc 12>;
|
||||
clock-names = "ref_clk";
|
||||
syscon = <&slcr>;
|
||||
};
|
||||
@@ -33,6 +33,12 @@ Optional properties in the area nodes:
|
||||
|
||||
- compatible : standard definition, should contain a vendor specific string
|
||||
in the form <vendor>,[<device>-]<usage>
|
||||
- pool : indicates that the particular reserved SRAM area is addressable
|
||||
and in use by another device or devices
|
||||
- export : indicates that the reserved SRAM area may be accessed outside
|
||||
of the kernel, e.g. by bootloader or userspace
|
||||
- label : the name for the reserved partition, if omitted, the label
|
||||
is taken from the node name excluding the unit address.
|
||||
|
||||
Example:
|
||||
|
||||
@@ -48,4 +54,14 @@ sram: sram@5c000000 {
|
||||
compatible = "socvendor,smp-sram";
|
||||
reg = <0x100 0x50>;
|
||||
};
|
||||
|
||||
device-sram@1000 {
|
||||
reg = <0x1000 0x1000>;
|
||||
pool;
|
||||
};
|
||||
|
||||
exported@20000 {
|
||||
reg = <0x20000 0x20000>;
|
||||
export;
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
Freescale i.MX6 On-Chip OTP Controller (OCOTP) device tree bindings
|
||||
|
||||
This binding represents the on-chip eFuse OTP controller found on
|
||||
i.MX6Q/D, i.MX6DL/S, i.MX6SL, and i.MX6SX SoCs.
|
||||
|
||||
Required properties:
|
||||
- compatible: should be one of
|
||||
"fsl,imx6q-ocotp" (i.MX6Q/D/DL/S),
|
||||
"fsl,imx6sl-ocotp" (i.MX6SL), or
|
||||
"fsl,imx6sx-ocotp" (i.MX6SX), followed by "syscon".
|
||||
- reg: Should contain the register base and length.
|
||||
- clocks: Should contain a phandle pointing to the gated peripheral clock.
|
||||
|
||||
Example:
|
||||
|
||||
ocotp: ocotp@021bc000 {
|
||||
compatible = "fsl,imx6q-ocotp", "syscon";
|
||||
reg = <0x021bc000 0x4000>;
|
||||
clocks = <&clks IMX6QDL_CLK_IIM>;
|
||||
};
|
||||
@@ -0,0 +1,25 @@
|
||||
On-Chip OTP Memory for Freescale i.MX23/i.MX28
|
||||
|
||||
Required properties :
|
||||
- compatible :
|
||||
- "fsl,imx23-ocotp" for i.MX23
|
||||
- "fsl,imx28-ocotp" for i.MX28
|
||||
- #address-cells : Should be 1
|
||||
- #size-cells : Should be 1
|
||||
- reg : Address and length of OTP controller registers
|
||||
- clocks : Should contain a reference to the hbus clock
|
||||
|
||||
= Data cells =
|
||||
Are child nodes of mxs-ocotp, bindings of which as described in
|
||||
bindings/nvmem/nvmem.txt
|
||||
|
||||
Example for i.MX28:
|
||||
|
||||
ocotp: ocotp@8002c000 {
|
||||
compatible = "fsl,imx28-ocotp", "fsl,ocotp";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x8002c000 0x2000>;
|
||||
clocks = <&clks 25>;
|
||||
status = "okay";
|
||||
};
|
||||
@@ -0,0 +1,38 @@
|
||||
= Rockchip eFuse device tree bindings =
|
||||
|
||||
Required properties:
|
||||
- compatible: Should be "rockchip,rockchip-efuse"
|
||||
- reg: Should contain the registers location and exact eFuse size
|
||||
- clocks: Should be the clock id of eFuse
|
||||
- clock-names: Should be "pclk_efuse"
|
||||
|
||||
= Data cells =
|
||||
Are child nodes of eFuse, bindings of which as described in
|
||||
bindings/nvmem/nvmem.txt
|
||||
|
||||
Example:
|
||||
|
||||
efuse: efuse@ffb40000 {
|
||||
compatible = "rockchip,rockchip-efuse";
|
||||
reg = <0xffb40000 0x20>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
clocks = <&cru PCLK_EFUSE256>;
|
||||
clock-names = "pclk_efuse";
|
||||
|
||||
/* Data cells */
|
||||
cpu_leakage: cpu_leakage {
|
||||
reg = <0x17 0x1>;
|
||||
};
|
||||
};
|
||||
|
||||
= Data consumers =
|
||||
Are device nodes which consume nvmem data cells.
|
||||
|
||||
Example:
|
||||
|
||||
cpu_leakage {
|
||||
...
|
||||
nvmem-cells = <&cpu_leakage>;
|
||||
nvmem-cell-names = "cpu_leakage";
|
||||
};
|
||||
@@ -0,0 +1,19 @@
|
||||
On-Chip OTP Memory for Freescale Vybrid
|
||||
|
||||
Required Properties:
|
||||
compatible:
|
||||
- "fsl,vf610-ocotp" for VF5xx/VF6xx
|
||||
#address-cells : Should be 1
|
||||
#size-cells : Should be 1
|
||||
reg : Address and length of OTP controller and fuse map registers
|
||||
clocks : ipg clock we associate with the OCOTP peripheral
|
||||
|
||||
Example for Vybrid VF5xx/VF6xx:
|
||||
|
||||
ocotp: ocotp@400a5000 {
|
||||
compatible = "fsl,vf610-ocotp";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
reg = <0x400a5000 0xCF0>;
|
||||
clocks = <&clks VF610_CLK_OCOTP>;
|
||||
};
|
||||
@@ -1,11 +1,15 @@
|
||||
* OMAP HDQ One wire bus master controller
|
||||
|
||||
Required properties:
|
||||
- compatible : should be "ti,omap3-1w"
|
||||
- compatible : should be "ti,omap3-1w" or "ti,am4372-hdq"
|
||||
- reg : Address and length of the register set for the device
|
||||
- interrupts : interrupt line.
|
||||
- ti,hwmods : "hdq1w"
|
||||
|
||||
Optional properties:
|
||||
- ti,mode: should be "hdq": HDQ mode "1w": one-wire mode.
|
||||
If not specified HDQ mode is implied.
|
||||
|
||||
Example:
|
||||
|
||||
- From omap3.dtsi
|
||||
@@ -14,4 +18,5 @@ Example:
|
||||
reg = <0x480b2000 0x1000>;
|
||||
interrupts = <58>;
|
||||
ti,hwmods = "hdq1w";
|
||||
ti,mode = "hdq";
|
||||
};
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
FPGA Manager Core
|
||||
|
||||
Alan Tull 2015
|
||||
|
||||
Overview
|
||||
========
|
||||
|
||||
The FPGA manager core exports a set of functions for programming an FPGA with
|
||||
an image. The API is manufacturer agnostic. All manufacturer specifics are
|
||||
hidden away in a low level driver which registers a set of ops with the core.
|
||||
The FPGA image data itself is very manufacturer specific, but for our purposes
|
||||
it's just binary data. The FPGA manager core won't parse it.
|
||||
|
||||
|
||||
API Functions:
|
||||
==============
|
||||
|
||||
To program the FPGA from a file or from a buffer:
|
||||
-------------------------------------------------
|
||||
|
||||
int fpga_mgr_buf_load(struct fpga_manager *mgr, u32 flags,
|
||||
const char *buf, size_t count);
|
||||
|
||||
Load the FPGA from an image which exists as a buffer in memory.
|
||||
|
||||
int fpga_mgr_firmware_load(struct fpga_manager *mgr, u32 flags,
|
||||
const char *image_name);
|
||||
|
||||
Load the FPGA from an image which exists as a file. The image file must be on
|
||||
the firmware search path (see the firmware class documentation).
|
||||
|
||||
For both these functions, flags == 0 for normal full reconfiguration or
|
||||
FPGA_MGR_PARTIAL_RECONFIG for partial reconfiguration. If successful, the FPGA
|
||||
ends up in operating mode. Return 0 on success or a negative error code.
|
||||
|
||||
|
||||
To get/put a reference to a FPGA manager:
|
||||
-----------------------------------------
|
||||
|
||||
struct fpga_manager *of_fpga_mgr_get(struct device_node *node);
|
||||
|
||||
void fpga_mgr_put(struct fpga_manager *mgr);
|
||||
|
||||
Given a DT node, get an exclusive reference to a FPGA manager or release
|
||||
the reference.
|
||||
|
||||
|
||||
To register or unregister the low level FPGA-specific driver:
|
||||
-------------------------------------------------------------
|
||||
|
||||
int fpga_mgr_register(struct device *dev, const char *name,
|
||||
const struct fpga_manager_ops *mops,
|
||||
void *priv);
|
||||
|
||||
void fpga_mgr_unregister(struct device *dev);
|
||||
|
||||
Use of these two functions is described below in "How To Support a new FPGA
|
||||
device."
|
||||
|
||||
|
||||
How to write an image buffer to a supported FPGA
|
||||
================================================
|
||||
/* Include to get the API */
|
||||
#include <linux/fpga/fpga-mgr.h>
|
||||
|
||||
/* device node that specifies the FPGA manager to use */
|
||||
struct device_node *mgr_node = ...
|
||||
|
||||
/* FPGA image is in this buffer. count is size of the buffer. */
|
||||
char *buf = ...
|
||||
int count = ...
|
||||
|
||||
/* flags indicates whether to do full or partial reconfiguration */
|
||||
int flags = 0;
|
||||
|
||||
int ret;
|
||||
|
||||
/* Get exclusive control of FPGA manager */
|
||||
struct fpga_manager *mgr = of_fpga_mgr_get(mgr_node);
|
||||
|
||||
/* Load the buffer to the FPGA */
|
||||
ret = fpga_mgr_buf_load(mgr, flags, buf, count);
|
||||
|
||||
/* Release the FPGA manager */
|
||||
fpga_mgr_put(mgr);
|
||||
|
||||
|
||||
How to write an image file to a supported FPGA
|
||||
==============================================
|
||||
/* Include to get the API */
|
||||
#include <linux/fpga/fpga-mgr.h>
|
||||
|
||||
/* device node that specifies the FPGA manager to use */
|
||||
struct device_node *mgr_node = ...
|
||||
|
||||
/* FPGA image is in this file which is in the firmware search path */
|
||||
const char *path = "fpga-image-9.rbf"
|
||||
|
||||
/* flags indicates whether to do full or partial reconfiguration */
|
||||
int flags = 0;
|
||||
|
||||
int ret;
|
||||
|
||||
/* Get exclusive control of FPGA manager */
|
||||
struct fpga_manager *mgr = of_fpga_mgr_get(mgr_node);
|
||||
|
||||
/* Get the firmware image (path) and load it to the FPGA */
|
||||
ret = fpga_mgr_firmware_load(mgr, flags, path);
|
||||
|
||||
/* Release the FPGA manager */
|
||||
fpga_mgr_put(mgr);
|
||||
|
||||
|
||||
How to support a new FPGA device
|
||||
================================
|
||||
To add another FPGA manager, write a driver that implements a set of ops. The
|
||||
probe function calls fpga_mgr_register(), such as:
|
||||
|
||||
static const struct fpga_manager_ops socfpga_fpga_ops = {
|
||||
.write_init = socfpga_fpga_ops_configure_init,
|
||||
.write = socfpga_fpga_ops_configure_write,
|
||||
.write_complete = socfpga_fpga_ops_configure_complete,
|
||||
.state = socfpga_fpga_ops_state,
|
||||
};
|
||||
|
||||
static int socfpga_fpga_probe(struct platform_device *pdev)
|
||||
{
|
||||
struct device *dev = &pdev->dev;
|
||||
struct socfpga_fpga_priv *priv;
|
||||
int ret;
|
||||
|
||||
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
|
||||
/* ... do ioremaps, get interrupts, etc. and save
|
||||
them in priv... */
|
||||
|
||||
return fpga_mgr_register(dev, "Altera SOCFPGA FPGA Manager",
|
||||
&socfpga_fpga_ops, priv);
|
||||
}
|
||||
|
||||
static int socfpga_fpga_remove(struct platform_device *pdev)
|
||||
{
|
||||
fpga_mgr_unregister(&pdev->dev);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
The ops will implement whatever device specific register writes are needed to
|
||||
do the programming sequence for this particular FPGA. These ops return 0 for
|
||||
success or negative error codes otherwise.
|
||||
|
||||
The programming sequence is:
|
||||
1. .write_init
|
||||
2. .write (may be called once or multiple times)
|
||||
3. .write_complete
|
||||
|
||||
The .write_init function will prepare the FPGA to receive the image data.
|
||||
|
||||
The .write function writes a buffer to the FPGA. The buffer may be contain the
|
||||
whole FPGA image or may be a smaller chunk of an FPGA image. In the latter
|
||||
case, this function is called multiple times for successive chunks.
|
||||
|
||||
The .write_complete function is called after all the image has been written
|
||||
to put the FPGA into operating mode.
|
||||
|
||||
The ops include a .state function which will read the hardware FPGA manager and
|
||||
return a code of type enum fpga_mgr_states. It doesn't result in a change in
|
||||
hardware state.
|
||||
@@ -81,6 +81,9 @@ Code Seq#(hex) Include File Comments
|
||||
0x22 all scsi/sg.h
|
||||
'#' 00-3F IEEE 1394 Subsystem Block for the entire subsystem
|
||||
'$' 00-0F linux/perf_counter.h, linux/perf_event.h
|
||||
'%' 00-0F include/uapi/linux/stm.h
|
||||
System Trace Module subsystem
|
||||
<mailto:alexander.shishkin@linux.intel.com>
|
||||
'&' 00-07 drivers/firewire/nosy-user.h
|
||||
'1' 00-1F <linux/timepps.h> PPS kit from Ulrich Windl
|
||||
<ftp://ftp.de.kernel.org/pub/linux/daemons/ntp/PPS/>
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user